简体   繁体   中英

WatchKit Simulator Won't Load App

Originally, I thought this was an issue of the code I was writing, but I've just downloaded four or five WatchKit projects even one from Apple. All of them, fail to load.

I've uninstalled Xcode, reinstalled it and still nothing. Any one else experiencing the same issue? Workarounds? Solutions?

截图

You can see in the screenshot above what the loading screen looks like.

I am already bloody sick of official Xcode 6.2 & WatchKit Simulator. It is so super flaky. Here's another fun fact, if there is some constraint in your storyboard that the watchKit doesn't like then it will also keep looping in an infinite loop without letting anyone know why its doing that. What you need to do is

  • Drag and drop & add another WKInterfaceController to your storyboard
  • Make that one your main by dragging the arrow on it
  • Delete the old watchKit app controller
  • Now start adding elements one by one and keep testing till it doesn't work any more on the simulator (infinite spin of death)
  • Try clean and build and even after that it keep the spin ball of death then the last change you made to the storyboard is what it didn't like.

I had to spend hours debugging this crap.

UPDATE: If the above steps don't work for you then try this

  • launch Xcode
  • compile and build & launch iPhone simulator
  • Now don't shutdown the simulator instead do Xcode --> Product --> Stop
  • This will keep the simulator running but swill top the iphone app running on it
  • Do Build --> Clean
  • Do build again
  • Now launch watchkit simulator
  • If you need to stop and start always do Xcode --> Product --> Stop
  • These steps have always worked for me while making watchkit apps

I experienced this a lot with Xcode 6.2 beta 1. I only got this a few times with beta 2 and 3. Here is what I would do to get it to work.

  1. Reset the simulator via menu->IOS Simulator->Reset Content and Settings…
  2. Quit the simulator
  3. Clean the Xcode project
  4. Restart Xcode
  5. Build and run the iOS App (not the Watch App)
  6. Stop the iOS App
  7. Build and run the Watch App

This would generally fix the app just spinning for me. With beta 1 sometimes I would have to do this two or three times to get it up and running. Once I had it running, it would usually not do it again for a while. With beta 2 and 3 I only saw this a few times.

I always get this issue with Xcode 6.3. I've spent a lot of time on resetting caches in simulator, cleaning/rebuilding projects and so on. But only one thing always helps me. I just add new blank interface controller on my storyboard and create sequence to it from my main controller.

截图

And when I get this infinite loading of my app, I just swipe to my blank controller and than back to my main controller. After that everything works fine.

In my case nothing here proposed helped. I had to select the module name in addition to the Custom Class name:

在此输入图像描述

This was as a result after renaming the watch kit app. Maybe this is helpful for someone else, since the "spinning wheel of death" itself doesn't give much insight :-/ .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM