Can't build and run watchOS 2

I can build, run and debug watchOS 1 apps absolutely fine. When I try and build/run watchOS 2, Xcode runs for a bit, beachballs after a while and then it eventually stops. I can usually get the app on by manually installing via the iOS Apple Watch app.


No debugger or logs though..


Has anyone figured out a workaround or is this just not possible in the current beta?


Simulator builds are all ok but I'm experimenting with Core Motion so it only really works on device..


Note.. I'm trying with a brand new project, no changes. I believe everything is correctly provisioned..

I can get a watchos2 app to run fine in the simulator. Just hangs Xcode and or just spins on watch. Has anybody got an watch2 app to work on the watch?

Can you confirm that the watch is actually running OS2? Idont mean to state obvious and my intention is nto insult, a number of people I have seen having problems here have not successfully installed OS2 on the watch. Yes I have successfully built to the watch from xcode though there are significant problems in doing so, anytinig with images in it for example seems to cause problems for me.

Yes the watch is on Version 2 (13S5254w).

I cannot build my watchOS 2 app, and Xcode won't even let me run my parent application. Plus I cannot open the Apple Watch App on my iPhone it just hangs without any content on screen, then the app crashes. I hope they fix this in the next beta.

The error I get in the Simulator is "Couldn’t communicate with a helper application."

I have no idea how to get it working either and there's a rather ominous log saying starting services on a paired watch isn't supported in the system log.

6/13/15 7:27:41.953 PM Xcode[31093]: AMDeviceSecureStartService (thread 0x70000158f000): Starting services on paired watches not supported

I get the exact same. Also when trying to install apps on to my watch via TestFlight on iOS.

Definitely running watchos 2. I can easily confirm by using the timeline feature on the watch face.

Some additional information from doing some experiments at the weekend:


  • I can build and run the iOS app containing the watchapp
  • I can use the Apple Watch app on iOS 9 to then add the app to the watch
  • After sending the app to the watch I'm able to launch and run manually (via watch UI)
  • I still cannot build and run or debug via Xcode
  • There also don't seem to be any options to attach to an already running watch app
  • I am however able to build, run and debug watchos 1 apps on the device
  • Everything pretty much works when using the simulator


Judging by the fact nobody else seems to be able to debug on device, I'm guessing we need to wait for the next beta 😟


Any Apple engineers about who can gives us some pointers?

I'm able to debug on the device now. I had to erase it for it to work though.

Did the 'trust this computer' diaglog ever show on the watch? Unpairing and then re-pairing and restarting Xcode should bring it up. Once the computer is trusted you should be able to debug from Xcode.

Aha, it didn't! I'll give this as go tomorrow.

I unpaired and re-paired my Watch to my phone per the recommendation here. This took quite a while (over an hour?) for the Watch to recover from as it had to undergo a restore (unfortunately losing my activity information in the process).


After it came back to life and I got the "Trust/Don't Trust" dialog after firing up Xcode, it took another several hours before Xcode finally recognized my phone + Watch as a viable target. Xcode crashed constantly, as well. I was just about to head home for the day when I tried debugging my app one more time and ... it worked!


If I have to do this again, I believe the solution to saving the activity data is to perform an encrypted backup to iTunes first, and then unpair/pair.


Regardless, thank you for this solution, @MrBit!

Can't build and run watchOS 2
 
 
Q