Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I avoid the error "Error Launching 'AppName' WatchKit Extension" when trying to build and run a WatchKit Extension on an actual Apple Watch?

When I try to build and run a WatchKit extension on my real Apple Watch, I sometimes get the following error message:

"Error Launching 'AppName' WatchKit Extension - Launch of Apple Watch Application was canceled"

I've tried to build the parent application for the iPhone and then again for my WatchKit app but I still get the error message.

Does anyone know what causes this error message and how to deal with it?

like image 616
vomako Avatar asked May 15 '15 13:05

vomako


1 Answers

This seems to happen when it takes a long time to install the WatchKit App on the actual watch and Xcode times out waiting for the process to start due to the long install time. It can take a long time for two reasons:

  1. It sometimes takes a while for the Watch to "notice" the App needs updating before it begins the transfer.
  2. If your Apple Watch app has a lot of images or other content it needs to transfer to the watch, the actual transfer over Bluetooth can take a long time.

If you want to avoid this error, here are some tips, adapting from this blog post, which can also show you how to speed up your app installs: http://www.sneakycrab.com/blog/2015/5/28/speeding-up-slow-install-times-when-debugging-on-a-real-apple-watch

  1. Choose the iOS base scheme in Xcode to build and install on your phone. (Not the WatchKit App Extension)
  2. Hit stop in Xcode.
  3. Get iOS to notice it needs to begin installing the Watch app. There are two ways, either a) open the page for your app in the Apple Watch Companion App on your phone, or b) tapping on your app directly on the Watch (when you see the spinner, you can hit the crown to go back to the app icon screen, and you should see it start to load)
  4. Once the app is installed on your watch, switch to the WatchKit Extension scheme and hit play, it will be waiting to attach debugging
  5. Launch your app manually.
like image 110
thealienisreal Avatar answered Sep 29 '22 15:09

thealienisreal