18
votes

I am trying to debug and run the app on apple watch simulator. I have tried by using different target for notification, Glance and Watch app but apple simulator don't shows any thing.. It stuck in waiting for attach process of extension. I just see a black screen for the Apple Watch Simulator.

What did I do wrong?

How to overcome this issue ?

enter image description here

9
I have tried to re running the app couple of times, also tried Restarted Xcode some times.NSAnant
I had this problem too. Deleting and recreating the target scheme helped for me.zisoft
@zisoft tried couple of times to delete and recreating the target was helped me. Thanks a lot!!!NSAnant
Posted that as an answer. Cool that it helped you.zisoft

9 Answers

10
votes

This post from the dev forums solved my issue. More specifically, this excerpt:

  • In order for Watch apps to function properly, certain properties must match across the Watch app and its App Extension (18857540):
  • The WKAppBundleIdentifier property of NSExtensionAttributes in the WatchKit App Extension’s Info.plist must match the CFBundleIdentifier of WatchKit App's Info.plist.
  • The WKCompanionAppBundleIdentifier property of the WatchKit App's Info.plist must match the CFBundleIdentifier of the Containing iOS App's Info.plist.
5
votes

I have exactly same problem. I created a new project and added WatchKit extension in Xcode 6.2 beta 4 with WatchKit. I tried all ways mentioned in other answers but still failed to let watch app run in the simulator. Finally, I made it work.

My steps:

  1. Delete the containing app in the iPhone simulator.
  2. Clean your project in Xcode.
  3. Do not run the containing app, run the WatchKit app from Xcode.
4
votes

I had the same issue. The only thing that helped was to delete and recreate the target scheme.

2
votes

Before spending a lot of time on changing things, restart Xcode. Sometimes, this solves the problem.

Even if everything is configured correctly, it may take 20 seconds to attach the process to the debugger.

1
votes

You need to run the Watch App target and then from iPhone/iPad simulator check (Hardware -> External displays), any one of the Apple Watch options.

1
votes

I was experiencing the same issue. Mainly when creating an app extension in an existing app.

I was able to consistenly solve it by doing the following steps:

  • Make sure that the app extension gets the .appex extension. XCode tends to set it to .app. You can do this under 'build settings' -> 'wrapper'.

  • Under the 'Build Phases' tab in your target, your app extension should be listed under 'Embed App Extensions'. If you don't see this section, you can enforce it by adding a normal app extension to your app (fe. action extension). The section will now be visible. Replace the dummy extension you just created with the Watch app extension.

Start the host app and then start the Watch app, it should be working now.

0
votes

I had some trouble on iPhone 6 simulator, but each time I switch on iPhone5S it works.

0
votes

In my case the trouble was caused by a scheme with missing target although not the one I was trying to run. Hope that helps somebody.

0
votes

I was running into this problem as well and tried a few of the suggestions above. I found that deleting and recreating the target scheme resolved it. Everything is working fine now.