WatchKit 应用程序不包含任何 WKAppBundleIdentifier 匹配的 WatchKit 扩展

问题描述 投票:0回答:2

这是我得到的错误代码

WatchKit App doesn't contain any WatchKit Extensions whose WKAppBundleIdentifier matches "com.rshelver.tallyCounter.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.

抱歉,我对 Swift atm 不太了解,我真的很新,我只是想了解一下

ios swift watchos-6
2个回答
2
投票

答案如下:在手表扩展程序和手表应用程序的信息 plist 中,它们需要遵守以下更改,如本例所示

https://github.com/gabrieloc/GIOVANNI/issues/11


0
投票

所以您不必点击链接:

不要使用 $(PRODUCT_BUNDLE_IDENTIFIER) 更改捆绑包标识符 到 com.xxxx.giovanni Xcode 似乎有问题。

对于所有遇到此问题的人,您只需要来自的 Info.plist 文件 watchOS 文件夹并更改 WKCompanionAppBundleIdentifier 和 在 NSExtensions 下 WatchKit 扩展的 Info.plist 中 -> NSExtensionsAttribute -> WKAppBundleIdentifier

这应该可以解决所有问题

基本上,如果您遇到此问题,请确保您的 WatchOS 应用程序和 WatchOS 扩展引用父应用程序的正确捆绑包标识符。

感谢 @Ehab Saifan 和 GitHub 用户 @ghost

© www.soinside.com 2019 - 2024. All rights reserved.