Watchkit 扩展 - 找不到匹配的配置文件 [英] Watchkit Extension - No matching provisioning profiles found

查看:36
本文介绍了Watchkit 扩展 - 找不到匹配的配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个 iPhone 应用程序,其中还包含一个 WatchKit 扩展程序,我可以在模拟器中正常运行,但是在尝试部署到 iPhone 时,我遇到了 WatchKit 扩展程序目标的配置问题:

I have created an iPhone app that also includes a WatchKit extension, I can run this fine in the simulator but when trying to deploy to an iPhone I get a provisioning issue for the WatchKit Extention target:

在您的构建设置(XXXX")中指定的配置文件的 AppID 为XXXX",与您的包标识符XXXX.watchkitextension"不匹配.Xcode 可以通过从会员中心."

"The provisioning profile specified in your build settings ("XXXX") has an AppID of "XXXX" which does not match your bundle identifier "XXXX.watchkitextension". Xcode can resolve this issue by downloading a new provisioning profile from the Member Center."

Xcode 自动创建了后缀为 .watchkitextension 和 .watchkitapp 的 WatchKit 目标,但这似乎会导致在使用配置文件并部署到 iPhone 时出现问题.

Xcode automatically created the WatchKit targets with the suffix .watchkitextension and .watchkitapp but this seems to cause the issues when using a provisioning profile and deploying to an iPhone.

如果我删除 watchkit 目标,它运行良好,但这显然不是解决方案.

If I remove the watchkit targets it runs fine, but this is obviously not a solution.

感谢您的帮助

推荐答案

您需要在开发者门户中使用正确的 Watchkit 应用程序和 Watchkit 扩展程序包标识符创建两个新的 AppID.包标识符必须扩展主应用程序标识符,所以如果你的应用程序是 com.myapp 它应该是 com.myapp.watchkitextensioncom.myapp.watchkitapp

You need to create two new AppIDs in the Developer Portal with the correct bundle identifier for your Watchkit app and Watchkit extension. The bundle identifier has to extend the main apps identifier, so if your app is com.myapp it should be com.myapp.watchkitextension and com.myapp.watchkitapp

您还需要为 AppID 创建相关的配置文件,一个用于扩展程序,一个用于应用程序.
如果您在 Watch 应用中使用它们,请添加所需的附加组件(如钥匙串).

You also need to create the related Provisioning Profiles for the AppIDs, one for the extension and one for the app.
Add required add ons (like Keychain) if you are using them in your Watch app.

总而言之,您将需要 6 个 PP,其中 3 个用于开发,3 个用于存档/存储.随着 Xcode 6.3 团队的开发配置停止工作(对我来说)

All in all you will need six PPs, 3 for development, 3 for archiving/store. With Xcode 6.3 team provisioning for development stopped working (for me)

接下来转到 Xcode > Preferences > Accounts > YOUR_ACCOUNT > View Details ...,CTRL+单击其中一个配置文件并在 Finder 中打开.将所有配置文件移至废纸篓,然后刷新配置文件.

Next goto Xcode > Preferences > Accounts > YOUR_ACCOUNT > View Details ..., CTRL+Click one of the Profiles and open in Finder. Move all Profiles to Trash, then refresh the Profiles.

在您的目标中,请确保您为主要应用目标、Watchkit 扩展目标和 Watchkit 应用目标设置了正确的团队,同时确保为主应用目标和 Watchkit 扩展目标分配了正确的配置文件(Watchkit 应用程序配置文件无法设置,但会自动分配使用 Xcode 6.3 可以设置).

In your targets make sure you have the correct Team set for your main App target, the Watchkit extension target and the Watchkit App target, also make sure you have the right Provisioning Profiles assigned to main App target and the Watchkit extension target (Watchkit app Provisioning Profile can not be set but will be assigned automatically With Xcode 6.3 it can has to be set).

确保一切正常,清理构建文件夹:在 Xcode 中保持命令并执行 Product > Clean build folders ...

To be sure all is fine clean build folder: In Xcode hold command and do Product > Clean build folders ...

现在您可以存档了.

这篇关于Watchkit 扩展 - 找不到匹配的配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆