Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WatchKit app wont run on simulator

error: WatchKit Extension doesn't contain any WatchKit apps. Verify that the value of WKWatchKitApp in your WatchKit App's Info.plist is set to YES.

I kept getting this error and didn't know why after searching all the other questions here, took forever to figure this out.

like image 763
ZachNag Avatar asked Apr 03 '15 04:04

ZachNag


People also ask

How to run watchOS app in simulator?

To run an app on the simulator, you simply select the scheme for your WatchKit application by choosing it in the lefthand side of the scheme selector, and select an iPhone simulator and Apple Watch combination in the righthand side of the scheme selector (see Figure 1-4).

How to debug Apple Watch Xcode?

Basically select the Watch App as the scheme in xcode, hit build+run which will build the iOS app and WatchKit app, install the WatchKit app on to the Watch and attach the debugger to the WatchKit Extension.

How do I pair my Apple Watch simulator with my iPhone simulator?

How do I get the watch simulator to appear when I select an iPhone simulator in Device? In the Devices window under Simulators, select an iPhone 5 and later simulator. Under the Paired Watches table, click the Add button (+).

What is a WatchKit extension?

Your WatchKit extension connects to controls and views in the storyboard using WKInterfaceObject subclasses such as WKInterfaceButton and WKInterfaceLabel . These interface objects act as proxies for your storyboard elements. Use the interface elements to configure the elements in code.


2 Answers

The solution was really simple. A while back I had removed a few files and re-added them to the extension, but they didn't get added back to compile sources.

Added the exention's .m files back into it's compile sources and the error went away.

Very misleading error message.

like image 183
ZachNag Avatar answered Oct 10 '22 15:10

ZachNag


this solved the problem for me:

  • go to WatchKit Extension | Build Phases | Copy Bundle Resources
  • click the +
  • search the products folder and choose WatchKit App.app

afterwards clean and rebuild

like image 31
donmarkusi Avatar answered Oct 10 '22 16:10

donmarkusi