Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WatchKit App won't compile: "error: WatchKit Extension doesn't contain any WatchKit apps"

There are several posts on this issue but none of the proposed solutions work in my case. I am trying to integrate the WatchKit into a simple, sample app (I've tried a couple now) by following the instructions provided by Apple. When I compile I get the following error message:

"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 have successfully compiled and run the Apple Watch "Catalog" example so I know things are working from an iPhone to Watch perspective. It seems like something is not right when I try to integrate with an existing app. I have seen the posts here on this topic (e.g. WatchKit app wont run on simulator) but none of the fixes work in my case; the bundle IDs all appear to be correct. Note I am trying to compile and run on an iPhone 6 not on the simulator. Any suggestions?

like image 746
jamey Avatar asked Aug 18 '15 03:08

jamey


3 Answers

This error occurred for me when I changed the bundle id of my main iOS App. This is what I did in the project explorer

  1. Under WatchApp --> plist

    WKCompanionAppBundleIdentifier ==> Give the id of the iOS App (com.xxxx.appname)

  2. Under WatchApp Extension --> plist NSExtension-->NSExtensionAttributes-->WKAppBundleIdentifier ==> Give the id of your watchkit app (eg: com.xxxx.appname.watchkitapp)

this fixed the error for me.

like image 194
anoop4real Avatar answered Nov 20 '22 13:11

anoop4real


I ran into this problem on XCode Version 10.2 (10E125), i realizes when i changed WatchkitApp Bundle identifier one key in watchkitapp extension did not changed and stayed as old bundle identifier.

the path to plist: /Users/.../YourXcodeProjectFolder/Project/YourWatchkitExtensionFolder/info.plist

the problem occurd here:

<key>NSExtension</key>
<dict>
    <key>NSExtensionAttributes</key>
    <dict>
        <key>WKAppBundleIdentifier</key>
        <string>com.applecode.water.watchkit</string>
    </dict>
    <key>NSExtensionPointIdentifier</key>
    <string>com.apple.watchkit</string>
</dict>

the key WKAppBundleIdentifier was made the problem, so i changed it by my self.

like image 42
Mohammad Reza Koohkan Avatar answered Nov 20 '22 12:11

Mohammad Reza Koohkan


I noticed this on Xcode version 8.2.1. Here is how I fixed it.

Go to "WatchKit App" -> Build Settings -> Packaging -> Product Name

Change it so any string different from current string. Agreed that it is a bizarre solution as called in the link below.

Source: https://blogofpuneet.wordpress.com/2015/05/02/xcode-build-error-watchkit-extension-doesnt-contain-any-watchkit-apps-verify-that-the-value-of-wkwatchkitapp-in-your-watchkit-apps-info-plist-is-set-to-yes/

like image 5
Neutral Plant Avatar answered Nov 20 '22 12:11

Neutral Plant