WatchKit扩展包标识符 [英] WatchKit Extension bundle identifiers
问题描述
我正在尝试构建我的应用程序,但失败了。我在下面看到消息。
I am trying to build my app but it failed. I am shown the message below.
错误:WatchKit扩展程序不包含任何捆绑标识符与 com.domain.appname匹配的WatchKit应用程序.watchkitapp。验证WatchKit扩展的Info.plist中WKAppBundleIdentifier的值是否与WatchKit应用的Info.plist中CFBundleIdentifier的值相匹配。
error: WatchKit Extension doesn't contain any WatchKit apps whose bundle identifiers match "com.domain.appname.watchkitapp". Verify that the value of WKAppBundleIdentifier in your WatchKit Extension's Info.plist matches the value of CFBundleIdentifier in your WatchKit App's Info.plist.
I最近将 com.domain.appname.watchkitapp
更改为 com.domain.differentappname.watchkitapp
。
我找不到更改位置。
推荐答案
更改捆绑包标识符时请务必小心,这是设置它们的方式(您需要在 iPhone应用, Watchkit Extension 的Info.plist中更改每个标识符以及 Watchkit应用):
You have to be careful when changing the bundle identifiers, and here's how they should be set (you need to change each identifier in the Info.plist for the iPhone app, for the Watchkit Extension and for the Watchkit App):
随意设置任何捆绑包标识符(捆绑包标识符属性)。
Set any bundle identifier as you like (the "Bundle identifier" property).
示例:
Bundle identifier: com.fruitcompany.orange
WatchKit App Info.plist
此处的捆绑包标识符必须带有iPhone应用程序的标识符,例如(示例):
WatchKit App Info.plist
The bundle identifier here must be prefixed with the identifier of the iPhone application, like this(example):
Bundle identifier: com.fruitcompany.orange.watchkit
您还需要更改必须与iPhone应用程序捆绑包标识符匹配的 WKCompanionAppBundleIdentifier
,如下所示:
You also need to change the WKCompanionAppBundleIdentifier
which must match with the iPhone application bundle identifier, like this:
WKCompanionAppBundleIdentifier: com.fruitcompany.orange
Watchkit Extension Info.plist:
此处必须的捆绑包标识符必须以iPhone应用程序,例如:
Watchkit Extension Info.plist:
The bundle identifier here must be prefixed with the identifier of the iPhone application, like this(example):
Bundle identifier: com.fruitcompany.orange.watchkit.extension
您还需要在<$ c $下设置 WKAppBundleIdentifier
c> NSExtension 属性。
You also need to set the WKAppBundleIdentifier
under the NSExtension
attribute.
WKAppBundleIdentifier
标识符必须与WatchKit应用包标识符匹配,如下所示:
The WKAppBundleIdentifier
identifier must match with the WatchKit app bundle identifier like this:
WKAppBundleIdentifier: com.fruitcompany.orange.watchkit
这篇关于WatchKit扩展包标识符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!