Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot run app on real Apple Watch

my configuration: Apple Watch (WatchOS 2.0.1), iPhone 5S (iOS 9.1) Xcode 7.1 on MacOS X El Capitan.

I can run my app on the iPhone just fine. However, when I try to run my app on the Apple Watch, it seems like it's not possible. What I see in the status bar is the usual steps

Building MyApp on Apple Watch

Installing to Apple Watch

Running MyApp on Apple Watch

And then, in less that a second, it shows

Finished Running MyApp on Apple Watch

As if I had just pressed the stop button in Xcode (but without my having pressed it at all). No error message or warning. It just stops.

As a result, I'm not able to debug my app on the Apple Watch to see the log messages, memory usage, etc.

Any ideas? Thanks in advance for your help!

like image 253
ajpallares Avatar asked Nov 05 '15 16:11

ajpallares


People also ask

Why won't my apps work on my Apple Watch?

While a poor internet connection is the main reason why apps often fail to install on Apple Watch, there are other bottlenecks that you need to keep in mind. Incompatibility, cluttered storage, and miscellaneous software glitches are also responsible for the app installation issue on your watchOS issue.

Can you run apps on Apple Watch?

Your Apple Watch includes apps for a variety of communication, health, fitness, and timekeeping tasks. You can also choose to install third-party apps you have on your iPhone, and get new apps from the App Store, either on Apple Watch or from your iPhone. All your apps are on a single Home Screen.


2 Answers

When this happened to me, I fixed the issue by:

  1. Making sure there are no problems with your Main.storyboard and it has an initial view controller.
  2. Deleted app on phone
  3. Rebooted phone
  4. Rebooted watch
  5. Quit xcode and rebooted mac
like image 64
elprl Avatar answered Oct 09 '22 10:10

elprl


You could build the app to iPhone first, wait the watch app sync to watch. (Or you could sync it in companion by turn off and turn on the install switch manually)

Then keep the app running on watch, select Xcode->Debug->Attach to Process->XXXXX Extension(the name of your watch extension)

After a while you should be able to debug the watch app.

like image 26
RoCry Avatar answered Oct 09 '22 10:10

RoCry