简体   繁体   中英

WatchKit App doesn't contain any WatchKit Extensions

While archiving an iOS app on Xcode during the compilation phase; I get the error -

"error: WatchKit App doesn't contain any WatchKit Extensions. Verify that the value of NSExtensionPointIdentifier in your WatchKit Extension's Info.plist is set to com.apple.watchkit." even though I have confirmed that this is set correct.

Then, why is this happening?

Thanks

Check build settings in watchappextension target if you have correct watch extension Info.plist file path. In my case, i had watch plist set.

I had similar issue. To solve that, I've modified the extension identifier so that it has watchkit's identifier as prefix. This is because, unless identifiers are prefix, those won't be allowed to embed on Xcode settings.

Check list:

  1. In main iOS app settings on general tab, add your watchkit app in the embedded binaries section. Note that, if you ever deleted build folder, the embedded watchkit app may not be displayed in this section even if you just added there. 应用程序设置,常规标签

  2. Make sure you see the watchkit app both in target dependancy & embedded binaries section. If not, add them on the build phases tab of your iOS app. 应用程序设置,构建阶段选项卡

  3. Now on settings of watchkit app, add your extension in the embedded binaries. Watchkit设置,“常规”选项卡

  4. You should see the watchkit extension both in target dependancy & embedded binaries section. If not, add them on the build phases tab of your watchkit app. Watchkit设置,“构建阶段”选项卡

  5. On build settings of the extension, make sure bitcode is enabled. Base sdk should be latest iOS sdk. Watchkit扩展设置,“构建设置”选项卡

  6. See the watchkit app identifier is a prefix of the extension. I've renamed the product module (both for watchkit app & extension) to avoid spaces. Watchkit扩展>构建设置>打包

You should now be able to build or archive with proper mobile provisions. By the way, my Xcode version is 9.3.

退出XCode,删除派生数据,再次启动XCode并清理项目

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM