ios Watchkit 扩展 - 找不到匹配的配置文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/28816339/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Watchkit Extension - No matching provisioning profiles found
提问by Edward Jones
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:
我创建了一个包含 WatchKit 扩展的 iPhone 应用程序,我可以在模拟器中正常运行,但是在尝试部署到 iPhone 时,我遇到了 WatchKit 扩展目标的配置问题:
"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."
“您的构建设置(“XXXX”)中指定的配置文件的 AppID 为“XXXX”,与您的包标识符“XXXX.watchkitextension”不匹配。Xcode 可以通过从会员中心下载新的配置文件来解决此问题。 ”
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.
Xcode 自动创建了后缀为 .watchkitextension 和 .watchkitapp 的 WatchKit 目标,但这似乎会导致在使用配置文件并部署到 iPhone 时出现问题。
If I remove the watchkit targets it runs fine, but this is obviously not a solution.
如果我删除 watchkit 目标,它运行良好,但这显然不是解决方案。
Thanks for your help
谢谢你的帮助
回答by dogsgod
You need to create two new AppIDsin 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
您需要创建两个新的AppIDs在开发者门户网站为您Watchkit应用和Watchkit推广正确的包标识符。软件包标识符必须延长主应用标识符,因此,如果您的应用程序是com.myapp
应该com.myapp.watchkitextension
和com.myapp.watchkitapp
You also need to create the related Provisioning Profilesfor 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.
您还需要为 AppID创建相关的配置文件,一个用于扩展,一个用于应用程序。
如果您在 Watch 应用中使用它们,请添加所需的附加组件(如钥匙串)。
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)
总而言之,您将需要 6 个 PP,3 个用于开发,3 个用于存档/存储。随着 Xcode 6.3 团队的开发配置停止工作(对我来说)
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.
接下来转到Xcode > Preferences > Accounts > YOUR_ACCOUNT > View Details ...,CTRL+单击其中一个配置文件并在 Finder 中打开。将所有配置文件移至废纸篓,然后刷新配置文件。
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 Edit: With Xcode 6.3 it can has to be set).
在你的目标中,确保你为你的主应用目标、Watchkit 扩展目标和 Watchkit 应用目标设置了正确的团队,同时确保你有正确的配置文件分配给主应用目标和 Watchkit 扩展目标(Watchkit app Provisioning配置文件无法设置,但会自动分配编辑:使用 Xcode 6.3 可以必须设置)。
To be sure all is fine clean build folder: In Xcode hold command and do Product > Clean build folders ...
确保一切正常,清理构建文件夹:在 Xcode 中执行命令并执行Product > Clean build folders ...
Now you are ready to archive.
现在您已准备好存档。
回答by christian mini
Im my case I've clean all my provisioning profile as suggested by other users, then I had to delete "code signing entitlements" from "Build Settings" in both App parent and extention target and after rebuild and archive, all work fine.
我的情况我已经按照其他用户的建议清理了我的所有配置文件,然后我不得不从 App 父级和扩展目标的“构建设置”中删除“代码签名权利”,在重建和存档后,一切正常。
回答by Magnus
I followed the Technical Q&A QA1814and that solved it all for me. Basically you set everything to Automaticand iOS Developer. Very important to set the Team: Nonefirst, do the changes and then change back to your Team, then restart Xcode.
我遵循了技术问答 QA1814,这为我解决了所有问题。基本上,您将所有内容都设置为Automatic和iOS Developer。设置团队非常重要:先无,进行更改,然后更改回您的团队,然后重新启动 Xcode。
My situation was that I already had the provisioning profiles and certificates set up for a "normal" iOS app. I had successfully published apps with that. Now I needed to get it to work after I added a new WatchKit target to my existing app.I got many error like "No matching provisioning profiles" etc. After many hours of trouble I followed the routes in the QA1814 article and voila! - Xcode solved everything for me. Didn't need to change/resolve/update anything in Member Center etc.
我的情况是我已经为“普通”iOS 应用程序设置了配置文件和证书。我已经成功地发布了应用程序。现在,我需要在将新的 WatchKit 目标添加到现有应用程序后使其工作。我遇到了很多错误,例如“没有匹配的配置文件”等。经过几个小时的麻烦之后,我按照 QA1814 文章中的路线进行了操作,瞧!- Xcode 为我解决了一切。不需要在会员中心等中更改/解决/更新任何内容。
Also important to use the Bundle ID's correctly.The WatchKit app and WatchKit Extension must use the same bundle ID prefix as the iOS App target.
正确使用 Bundle ID 也很重要。WatchKit 应用程序和 WatchKit 扩展必须使用与 iOS 应用程序目标相同的包 ID 前缀。
If the iOS app has bundle ID: [Bundle ID], the WatchKit targets needs to be:
如果 iOS 应用程序有 bundle ID: [Bundle ID],WatchKit 目标需要是:
- WatchKit App: [Bundle ID].watchkit
- WatchKit Extension: [Bundle ID].watchkit.extension
- WatchKit 应用程序:[捆绑 ID].watchkit
- WatchKit 扩展:[Bundle ID].watchkit.extension
回答by sakira
I made 3 App IDs (for container app, watchkit extension, and watchkit app) belong with 3 provisioning profiles. (I was going to use AppGroup, so my app cannot share single App ID.) Setting 2 provisioning profiles for container app and watchkit extension, the archive of the my app could not pass the Xcode's validation process.
我制作了 3 个应用 ID(用于容器应用、watchkit 扩展和 watchkit 应用)属于 3 个配置文件。(我打算使用 AppGroup,所以我的应用程序不能共享单个 App ID。)为容器应用程序和 watchkit 扩展设置 2 个配置文件,我的应用程序的存档无法通过 Xcode 的验证过程。
In my case, the critical point is to set the provisioning profile of the WATCHKIT APP. Setting it, it pass the validation process, and succeed to submit the app.
就我而言,关键点是设置 WATCHKIT APP 的配置文件。设置它,它通过验证过程,并成功提交应用程序。
My procedure of the setting is the following:
我的设置过程如下:
- In Xcode, open "TARGET" of WatchKit App.
- Select the "Build Settings" tab.
- In the next line of the tab, choose "All" not "Basic."
- The you can find "Provisioning Profile" line in "Code Signing" section.
- Set the appropriate provisioning profile of yours.
- 在 Xcode 中,打开 WatchKit App 的“TARGET”。
- 选择“构建设置”选项卡。
- 在选项卡的下一行中,选择“全部”而不是“基本”。
- 您可以在“代码签名”部分找到“配置文件”行。
- 设置您的适当配置文件。
For a while, I have believed 3rd party app developer cannot set provisioning profiles of WatchKit Apps in Xcode. Noticing that we can set it, the answer is now clear...
有一段时间,我一直认为 3rd 方应用程序开发人员无法在 Xcode 中设置 WatchKit 应用程序的配置文件。注意到我们可以设置它,答案现在很清楚......
回答by bolnad
usually when you get that error its because your bundle id doesn't match the app id that is on the provision.
通常,当您收到该错误时,是因为您的捆绑包 ID 与配置中的应用程序 ID 不匹配。
In the case of the watch extension, you need to add the application service App Group
to your app id identifier that is associated with your provision, on the developer.apple.com portal if you are sharing data or files between the extension and your app
对于手表扩展程序App Group
,如果您要在扩展程序和您的应用程序之间共享数据或文件,则需要在 developer.apple.com 门户上将应用程序服务添加到与您的配置相关联的应用程序 ID 标识符中
回答by mgyky
In my case problem was different than others. I try everything but didn't solve my problem. Let me explain my situation before explain how I solve it. First it starts with adding Today Extension to my project. I created different bundle ID for my App Extension. For example if my application's bundle ID com.company.appname, I created for my Extension something like this "com.company.appname.TodayExtension". I'm using XCode Version 6.3.2 (6D2105), and XCode automatically (The provisioning profile specified in your build settings (“AppName”) has an AppID of “BundleID” which does not match your bundle identifier “BundleID2”. Xcode can resolve this issue by downloading a new provisioning profile from the Member Center...Of course I click the 'Fix Issue' button) create an provision profile for Today Extension.
就我而言,问题与其他问题不同。我尝试了一切,但没有解决我的问题。在解释我如何解决它之前,让我解释一下我的情况。首先是将 Today Extension 添加到我的项目中。我为我的应用程序扩展创建了不同的包 ID。例如,如果我的应用程序的包 ID com.company.appname,我为我的扩展创建了类似“com.company.appname.TodayExtension”的内容。我正在使用 XCode 版本 6.3.2 (6D2105),并且 XCode 自动(在您的构建设置(“AppName”)中指定的配置文件的 AppID 为“BundleID”,这与您的包标识符“BundleID2”不匹配。Xcode 可以通过从会员中心下载新的配置文件来解决此问题...当然,我单击“修复问题”按钮)为 Today Extension 创建配置文件。
And just after that I added "app group" to my application and go on coding for a while. But when I try to send my application to the AppStore (Product/Archive/Submit to AppStore), I get this error that says "None of the valid provisioning profiles allowed the specified entitlements: beta-reports-active, com.apple.security.application-groups".
在那之后,我将“应用程序组”添加到我的应用程序并继续编码一段时间。但是,当我尝试将我的应用程序发送到 AppStore(产品/存档/提交到 AppStore)时,我收到此错误消息:“没有任何有效的配置文件允许指定的权利:beta-reports-active, com.apple.security .应用程序组”。
You must know that "app group" could be the key point for you too...
您必须知道“应用程序组”也可能是您的重点......
Please go to member center/Certificates, Identifiers & Profiles/Provisioning Profiles/Distribution section. Find your application's Distribution profile and select it. As you can see that status for your profile is "Invalid (like in my case). Then here's the solution, click Edit button, after that Generate button. Now please repeat this action for all "Invalid" profiles. After all your profiles are re validated, now you can go back to your XCode project and update local provisions in your Mac. Go to : 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".
请前往会员中心/证书、标识符和配置文件/供应配置文件/分发部分。找到您的应用程序的分发配置文件并选择它。正如您所看到的,您的个人资料的状态为“无效(就像我的情况一样)。那么这是解决方案,单击“编辑”按钮,然后单击“生成”按钮。现在请对所有“无效”个人资料重复此操作。在您的所有个人资料都重新验证,现在您可以返回到您的 XCode 项目并更新 Mac 中的本地配置。转到:Xcode > Preferences > Accounts > YOUR_ACCOUNT > View Details ...,CTRL+单击其中一个配置文件并在 Finder 中打开。所有配置文件到垃圾箱,然后刷新配置文件”。
Now Product/Clean and (hopefully for the last time) Product/Archive and Submit to AppStore.
现在产品/清洁和(希望是最后一次)产品/存档并提交到 AppStore。
Generally speaking, it's happen because you add app group to your application, but you didn't validate all of your profiles after that.
一般来说,这是因为您将应用程序组添加到您的应用程序,但之后您没有验证所有配置文件。
Maybe this will helps someone.
也许这会帮助某人。
回答by Tim
When you are in the Xcode update Your certificate and compile Your program again, real machine commissioning will be "Your build Settings specify a provisioning profile have the UUID 'XXX', clear, no to provisioning profile was found. The Xcode can resolve this issue by downloading a new provisioning profile from the Member Center.".
当你在 Xcode 中更新你的证书并再次编译你的程序时,真机调试会是“你的构建设置指定了一个配置文件有 UUID 'XXX',清除,没有找到配置文件。Xcode 可以解决这个问题通过从会员中心下载新的配置文件。”。
- Close the project, find project file XXXX. Xcodeproj, right-click on the file, select "Show Package Contents" (Show Package Contents).Will open a new Finder.
- Find the project in the newly opened Finder. Pbxproj, and open, find the UUID you all contain an error 'XXX' line, delete.
- Save, restart the project, then build, with respect to OK.
- 关闭工程,找到工程文件XXXX. Xcodeproj,右击文件,选择“Show Package Contents”(显示包内容)。会打开一个新的Finder。
- 在新打开的 Finder 中找到项目。pbxproj,打开,找到你的UUID都包含错误'XXX'行,删除。
- 保存,重启项目,然后build,就OK了。