WatchKit App doesn't contain any WatchKit Extensions.

Quite abrupdedly my project stopped executing by reporting error:

error: WatchKit App doesn't contain any WatchKit Extensions. Verify that the value of NSExtensionPointIdentifier in your WatchKit Extension's Info.plist is set to com.apple.watchkit.

Of course NSExtensionPointIdentifier is correctly set to com.apple.watchkit.

What could it be and how to fix it?


This is the relevant part of the info.plist file:

<key>NSExtension</key>

<dict>

<key>NSExtensionAttributes</key>

<dict>

<key>WKAppBundleIdentifier</key>

<string>com.information.inArrivo.watchkitapp</string>

</dict>

<key>NSExtensionPointIdentifier</key>

<string>com.apple.watchkit</string>

</dict>

Replies

Try to Clean and Re-Build your project.

If this does not solve your issue, Select your iOS app from Targets -> Build Phases -> Embed Watch Content

Remove your WatchKit app (if exists) and re-add it from Products folder.

Then Clean and Build your project.

I have deleted the derived folder several times. The Watchkit app is there and I may delete it, yet I am nt clear how to re-add it, what do you mean by Product folder?

Conversely if I execute the project on the simulator I have no errors of thi kind but intead when it is about to launche the simulator it return:

The file “inArrivoHD” couldn’t be opened because you don’t have permission to view it.

Select your Project from the Project Navigator (on the left).

Then, on the right, select your iOS Target.

Select Build Phases tab.

Expand Embed Watch Content

Remove your WatchKit app from the list (if exists), press the "+" button, search for Products folder and re-add your WatchKit app.

Nope: your suggestion did not fix things: when I compile the project on the simulator I still have error:

"The file <ProductName> couldn't be opened because you don't have permissions to view it" at the end of the compilation.

And when I do it on the device I still have the watchkit error.


I deleted the Watch-app from the Embed Watch Content section, added it again from the + button and deleted the derived folder.


Yet nothing changed.

I ended up restoring the project from the Time Machine at a time when the problem wa not present and replacing the updated files and the installation on the iPhone went fine.

I get this problem quite often, mostly after I clean the build folders. What works for me is to navigate to the Info.plist of my watchkit extension, open it and expand the NSExtension->NSExtensionPointIdentifier. I double-click on the "com apple watchkit" and press enter.

Building and running then works for me.

I do that the same.but not select iOS app.

Select your watchOS app from Targets -> Build Phases -> Embed App Extensions

Remove your WatchKit app Extensions (if exists) and re-add it from Products folder

In my case I had problem with building of the extension library. In fact it was not built and I had two errors:

1. From linker about absense of the extension library.

2. From Xcode about "missing" NSExtensionPointIdentifier key.


Fix of linking error also fixed this message.

In my case it was necessary to add WatchKit Extension to
  1. WatchKit App target -> General -> Frameworks, Libraries and Embedded Content

  2. WatchKit App target -> Build Phases -> Dependencies