6
votes

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

For now, all I have is a watch interface.storyboard with a single label just to verify the entire building process. The app runs fine on the simulator (iPhone 6 (8.3)) and the Watch simulator.

When I run it on the iPhone and Apple Watch, it runs on the iPhone, installs on the Apple Watch, but then just displays a wait status when trying to run it on the Apple Watch.

The error in Xcode says "Waiting to attach", and when I try to attach it via Xcode > Debug > Attach to Process, it says "Lost connection to iPhone".

I am using Xcode 6.3.1.

6

6 Answers

9
votes

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

  • Build the main iPhone app first, then stop it and build the WatchKit app
  • Wait some time for the attachment to finish (it can take 20 seconds or so)
  • I found that tapping the app icon on the Apple Watch sometimes helps to re-establish a lost connection. After tapping the app icon, the app often starts to update. So tap on your Apple Watch app after the message Waiting to attachappears.
  • If waiting does not help, stop all processes (make sure that the stop button in Xcode becomes gray) and then build and run your code again
  • Sometimes, restarting Xcode helps to solve problems
  • Force-quit your app on the Apple Watch as explained here
  • If that still does not help, deinstall and reinstall your WatchKit extension using the Apple Watchapp on your iPhone

Other things you could try:

  • Clean your project
  • Uninstall and re-install your watch app using the Apple Watchapp on your iPhone
  • Delete your iPhone app from the device
  • Delete/recreate the target scheme
  • In the WatchKit app target settings, set "Skip Install" to NO
1
votes

I discovered that my WatchKit Bundle Names in my info.plist were not consistent. Ensure that the prefixes are exactly correct.

0
votes

It was really never working for me.

I was able to fix it to remove any specific architectures in the build settings of the app target and leave it to Automatic (remove ARCHS = ... in project file)

0
votes

Restarting the watch solved this for me.

  1. Press and Hold the side button until you see the Power Off Slider.
  2. Drag the slider to turn off your device completely. (Note it is NOT a button to press)
  3. After you turn off your Apple Watch, press and hold the side button again until you see the Apple logo.

From this Apple Support Page: https://support.apple.com/en-gb/HT204510

0
votes

I was developing a findersync extension for Mac and faced similar issue with XCode 7.2.1 and i found my changing bundle identifier of the extension project, it fixes the issue. I know this is not a permanent solution but atleast it will help you keep going forward if nothing else works

-1
votes

I have the same issue I have already two watch apps in the App Store but the current project with only some Interface objects runs fine in simulator but not on the watch I get only the waiting symbol and then it switch back to the apps screen on the watch. I found the issue it was a setting of the Build architecture in the build setting. I used Xcode automatic problem solver to change the old project. Now it works fine.