Search code examples
ioswatchkitapple-watch

App installation error message whitelist of allowed keys


I finally got my watch application build successfully but I'm getting this error message when I try to debug on the device.

The WatchKit app's Info.plist contains a key that is not in the whitelist of allowed keys for a WatchKit app.

Here is my plist

<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>AIM WatchKit App</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSExtension</key>
<dict>
    <key>NSExtensionAttributes</key>
    <dict>
        <key>WKAppBundleIdentifier</key>
        <string><-obfuscated-></string>
    </dict>
    <key>NSExtensionPointIdentifier</key>
    <string>com.apple.watchkit</string>
</dict>
<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>WKCompanionAppBundleIdentifier</key>
<string><-obfuscated-></string>
<key>WKWatchKitApp</key>
<true/>


Solution

  • Comparing to a WatchOS plist in one of my open source apps - https://github.com/bravelocation/yeltzland-ios/blob/master/watchkitapp/Info.plist - I don’t have a NSExtension key.

    That would be the first key I’d delete to see if it was the culprit.