Why does the WatchKit extension trigger a “Pending attach” message on the actual Apple Watch, but not in the simulator?

I have a published iOS application and am trying to add a WatchKit extension for it.

At the moment, all I have is an interface.storyboard with one label to test the entire building process. The application works great on the simulator (iPhone 6 (8.3)) and the Watch simulator.

When I launch it on the iPhone and Apple Watch, it launches on the iPhone, installs on the Apple Watch, but then just displays the standby state when trying to run it on the Apple Watch.

The error in Xcode says “Waiting for connection” , and when I try to connect it through Xcode > Debug > Attach to Process , it says “Lost connection to iPhone” .

I am using Xcode 6.3.1.

+5
source share
6 answers

The message Waiting to attach worries many people. Here are a few things you can do:

  • First, create the main iPhone app, then stop it and create the WatchKit app.
  • Wait for a while to complete the attachment (it may take about 20 seconds)
  • I found that tapping the app icon on the Apple Watch sometimes helps restore a lost connection. After clicking the application icon, the application often starts updating. Therefore, click on the Apple Watch app after the message Waiting to attach appears.
  • If the wait does not help, stop all processes (make sure that the stop button in Xcode turns gray), and then create and run your code again.
  • Restarting Xcode sometimes helps resolve problems.
  • Force open the Apple Watch app as described here.
  • If this still does not help, uninstall and reinstall the WatchKit extension using the Apple Watch app on your iPhone

Other things you could try:

  • Clean up project
  • Uninstall and reinstall the watch app using the Apple Watch app on your iPhone
  • Uninstall the iPhone application from the device
  • Delete / recreate target schema
  • In the target settings of the WatchKit app, set “Skip installation" to NO
+7
source

I found that my WatchKit package names in my info.plist were not consistent. Make sure the prefixes are correct.

+1
source

It really never worked for me.

I managed to fix it to remove any specific architectures in the application build settings and leave it in automatic mode (delete ARCHS = ... in the project file)

0
source

Resetting the watch solved this for me.

  • Press and hold the side button until you see the power off slider.
  • Drag the slider to completely turn off the device. (Please note that this is NOT a button to click)
  • After turning off the Apple Watch, press and hold the side button again until you see the Apple logo.

On this Apple support page: https://support.apple.com/en-gb/HT204510

0
source

I was developing the findersync extension for Mac and had a similar problem with Xcode 7.2.1, and I found my changing package identifier in the extension project, it fixes the problem. I know that this is not a permanent solution, but at least it will help you continue to work if nothing works.

0
source

I have the same problem. I already have two applications for viewing in the App Store, but the current project with some interface objects works fine in the simulator, but not on the watch, I get only a wait symbol, and then it switches back to the application screen on the watch. I found that this is a Build architecture configuration issue in assembly configuration. I used the automatic Xcode solution algorithm to modify the old project. Now it works great.

-1
source

All Articles