首页 > 解决方案 > 应用程序安装错误消息允许密钥白名单

问题描述

我终于成功构建了手表应用程序,但是当我尝试在设备上调试时收到此错误消息。

WatchKit 应用程序的 Info.plist 包含一个不在 WatchKit 应用程序允许密钥白名单中的密钥。

这是我的清单

<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/>

标签: ioswatchkitapple-watch

解决方案


与我的一个开源应用程序中的 WatchOS plist 相比 - https://github.com/bravelocation/yeltzland-ios/blob/master/watchkitapp/Info.plist - 我没有 NSExtension 密钥。

那将是我要删除的第一个键,看看它是否是罪魁祸首。


推荐阅读