NSAnant
NSAnant

Reputation: 816

Apple watch simulator issue

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

Upvotes: 18

Views: 8176

Answers (9)

dk87
dk87

Reputation: 1

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.

Upvotes: 0

Ranza
Ranza

Reputation: 324

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.

Upvotes: 0

John
John

Reputation: 8548

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.

Upvotes: 2

Lizza
Lizza

Reputation: 2819

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.

Upvotes: 10

Vince Yuan
Vince Yuan

Reputation: 10633

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.

Upvotes: 5

Cap
Cap

Reputation: 2044

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

Upvotes: 0

Tom Schurmans
Tom Schurmans

Reputation: 36

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.

Upvotes: 1

zisoft
zisoft

Reputation: 23078

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

Upvotes: 4

msk
msk

Reputation: 8905

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.

Upvotes: 1

Related Questions