Xcode - WatchOS app takes really long time to install on a real device

Hello all. I am wondering if anyone has had issues running their WatchOS application on a real device from Xcode/knows a way around this. It is painful whenever I try to run my watchOS application on a real device. Most of the time it doesn't even run. The times it does successfully install and run on my device, it usually takes 5-15 minutes to finish.

I didn't have these issues a couple of years ago on earlier versions of Xcode and WatchOS. This issue has only been occurring recently.

Im using a MacBook Pro 2018, an Apple Watch Series 5, and Xcode 12 Beta 2 (I had the same issues on Xcode 11 too).

Any help would be greatly appreciated. Thank you.
Hello, zmak,

Unfortunately, yes. But it was already mentioned in the watchOS Release Notes.

Good that you are already on Xcode 12 Beta. My own experience is, that being on the Big Sur Version 11.0 Beta is a MUST if you want to run watchOS 7.0 on-device.

In the Release Notes, there are some nice euphemisms stating that you might consider running it under Big Sur… That is Apple jargon telling you, you should better do so ;-)

In your Library on Mac, you could also delete the Derived Data directory under Developer that will be re-created when you compile new projects. I usually do that from time to time in order to have a clean start.

When re-opening your project in Xcode 12 Beta, in Preferences go to your Account information and select your developer name and/or team information.

I had the impression that clicking the Download Manual Profiles button resulted in better and quicker compilation of projects running on-device.

It would usually start earlier deploying the app on-device…

Under Product > Scheme > Manage Schemes, I usually delete any schemes and click onto the Autocreate Schemes now button.

Last but not least, it seemed to be beneficial to have an iPhone app to be installed first on iPhone and only then switch to the watchOS target build when you have it run at least once.

Even if you have set a Supports Running Without iOS App Installation check mark (Targets > …WatchKit Extension > General > Deployment Info), re-check on-device whether the app has been properly installed on Watch, — or the app of your compiling project already shows up in the iOS Watch app (being installed already or available for installation).

Toggling these settings there (in the iOS Watch app) might influence how quickly apps start eventually off on-device.

Yes, I know, it is a cumbersome long process to run builds on-device for the time being.

I cannot even tell you, which part of my hints does the trick… Once you see the loading indicator on Watch already, only the device getting dark again might interrupt you for some more time. But it clearly indicates that it will work from this moment on.

If it is getting stuck there (more than twenty seconds), I re-build for a second time. Normally, this will result in a much quicker build on-device. From that moment on, it usually builds properly several times in a row.

I hope that this will help you a bit, please let me/us in the forum know about your progress and your own observations.

Thank you, kind regards ;-)
Hello, zmak,

Oh, and I forgot about one thing. If you are desperate ;-)

Deleting the watchOS Developer Profile on Watch, un- and then re-pairing your Watch, might bring up the dialogue asking you (on Watch) whether you trust your connected developer Mac.

I was under the impression, once this question popped up and was successfully answered (again), the build and run process had less problems.

Your trust in your Mac should be stored for Watch development anyway deep in their developer backyards, but I do not remember that I was asked whether I trusted my computer, only because I installed the last and current Beta of watchOS.

I suppose, it should work properly out of the box, but since un-pairing and re-pairing is only a question of minutes on Watch Series 5, I think it is worth giving it a try in order to (re-)invoke this question of trusting your Mac.

Kind regards ;-)

One workaround I had the most luck with is to run the iOS target on the iPhone the watch is attached to, wait for it to install on the watch (check for progress in the Watch app) and then run it manually from the watch. There's no debugging this way though.

Xcode - WatchOS app takes really long time to install on a real device
 
 
Q