ios Xcode 版本 8 中的代码签名问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39565906/
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
Code signing issue in Xcode version 8
提问by Rohitax Rajguru
I updated my Xcode to version 8 after iOS 10 release. Apple made some changes in code signing process and it is now available in general section of target settings. But the issue is my production provisioning profile is showing as ineligible one. This error message is coming:
在 iOS 10 发布后,我将我的 Xcode 更新到了版本 8。Apple 在代码签名过程中进行了一些更改,现在可以在目标设置的常规部分中使用。但问题是我的生产配置文件显示为不合格。此错误消息即将到来:
"xxxproductionprovisioningprofile" doesn't include signing certificate "iPhone Distribution: xxx (xxx)".
“xxxproductionprovisioningprofile”不包括签名证书“iPhone Distribution:xxx (xxx)”。
I again created the provisioning profile using same distribution certificate. The distribution certificate is present in keychain too. Everything was working fine in Xcode version 7.3 and earlier. Any help is appreciated.
我再次使用相同的分发证书创建了配置文件。分发证书也存在于钥匙串中。在 Xcode 7.3 及更早版本中一切正常。任何帮助表示赞赏。
回答by Husein Behboodi Rad
I faced this too, and fixed it by:
我也遇到了这个问题,并通过以下方式修复了它:
1- removing all certificates of my account from keychain,
1- 从钥匙串中删除我帐户的所有证书,
2- removing all provisioning profiles from xcode and then
2- 从 xcode 中删除所有配置文件,然后
3- downloading provisioning profiles again via xcode and also
3- 通过 xcode 再次下载配置文件
4- adding certificates again to the keychain.
4- 再次向钥匙串添加证书。
回答by Nishu_Priya
I was facing the same problem, I also tried removing all certificates from my login keychain, but the problem was still coming... Then, luckily one day, I opened system keychain and found that there were more than one distribution certificates added there.I deleted those from there. And then the problem got finally solved :)
我也遇到了同样的问题,我也尝试从我的登录钥匙串中删除所有证书,但问题仍然存在......然后,幸运的是有一天,我打开系统钥匙串,发现那里添加了不止一个分发证书。我从那里删除了那些。然后问题终于解决了:)
So, if you are facing this problem, make sure you delete your certificates from login as well as system keychain and add them again to the login keychain. Hope it helps.
因此,如果您遇到此问题,请确保从登录和系统钥匙串中删除您的证书,并将它们重新添加到登录钥匙串中。希望能帮助到你。
回答by mgentilc
I faced the same issue, fixed it without having to delete and download everything again.
我遇到了同样的问题,无需再次删除和下载所有内容即可修复它。
I simply enabled Automatic Signing, waited for it to detect my signing certificates, and then disabled it. After that, I was able to reselect the desired provisioning profiles and the Signing Certificated were detected as they should.
我只是启用了自动签名,等待它检测到我的签名证书,然后将其禁用。之后,我能够重新选择所需的配置文件,并按应有的方式检测到签名证书。
回答by Javier Landa-Torres
Ok, if you don't want delete all the previsional profiles and certificates, neither use Automatic Provisional Profiles, try this steps:
好的,如果您不想删除所有的临时配置文件和证书,也不要使用自动临时配置文件,请尝试以下步骤:
Delete Provisional Profile from Accounts (cmd + ,), where you can see the list of the all Provisional Profiles according with your user.
Delete the Certificate from Keychain (Login - Certificates - Search the Certificate that is causing conflict)
From Developer Panel (Certificates, IDs & Profiles - Provisioning Profiles) enable your Provisional Profile that are giving you conflict with the Certificate that you want to use.
Download manually you Provisional Profile (it should be green color in its indicator).
From Developer Panel, go to Certificates section and download the Certificate that is associated with the Provisional Profile that you updated in the previous step.
Double click to Certificate that you downloaded to install and verify that it is in the Keychain
Double click to Provisional Profile that you downloaded.
Go to Xcode (Project - Targets - General) and in the section named "Singing (Debug or Release)" you will can see in Elegible the new Provisional Profile.
从帐户中删除临时配置文件 (cmd + ,),您可以在其中查看与您的用户相符的所有临时配置文件的列表。
从钥匙串中删除证书(登录 - 证书 - 搜索导致冲突的证书)
从开发人员面板(证书、ID 和配置文件 - 配置配置文件)启用您的临时配置文件,该配置文件与您要使用的证书发生冲突。
手动下载您的临时配置文件(它的指示器应该是绿色)。
从开发人员面板,转到证书部分并下载与您在上一步中更新的临时配置文件关联的证书。
双击您下载的证书进行安装并验证它是否在钥匙串中
双击您下载的临时配置文件。
转到 Xcode(项目 - 目标 - 常规),在名为“唱歌(调试或发布)”的部分中,您将可以在 Elegible 中看到新的临时配置文件。
It see that you need to update both of them (Certificate and Provisional Profile), but if you delete one, the another one keep the previous references and Xcode not update automatically. I did this and it works perfectly.
它看到您需要更新它们(证书和临时配置文件),但是如果您删除一个,另一个会保留以前的引用并且 Xcode 不会自动更新。我这样做了,而且效果很好。
回答by BHuelse
I got the same error after updating from Xcode7 to Xcode8. I dont need to install the certificates.
从 Xcode7 更新到 Xcode8 后,我遇到了同样的错误。我不需要安装证书。
In my case I only have to go to Xocde -> "Preferences"->"Accounts".
There I have to login againmy existing account, the login was expired.
- IMPORTANT: After this, restart Xcode.
就我而言,我只需要转到Xocde -> "Preferences"->"Accounts"。
在那里我必须再次登录我现有的帐户,登录已过期。
- 重要提示:在此之后,重新启动 Xcode。
Then everything works as expected.
然后一切都按预期进行。
best regards
此致
回答by Jacob Giberson
I ran into the same issues, but in order to solve it I ended up generating an additional 'App Store provisioning profile' and 'Ad hoc provisioning profile'.
我遇到了同样的问题,但为了解决它,我最终生成了一个额外的“App Store 配置文件”和“临时配置文件”。
Hope that helps others.
希望能帮助别人。
回答by Yu Chai
This problem is due to private key in the certificate in your profile not match that in your keychain. I resolve this by
此问题是由于您个人资料中证书中的私钥与您的钥匙串中的私钥不匹配。我解决了这个问题
- delete all iPhone Developer certificate in keychain.
- delete all certificate in apple account.
- using xcode "Manage Certificates" to add certificate, sometime you still have certificate in your Mac, but I do not know where it is for now, and if added successfully, your apple account will display that certificate too, and then you can create your profile with that certificate and download ... goto 5
- if you use "Manage Certificates" can't add certificate, you can create a new certificate, and do remain steps.
- finish.
- 删除钥匙串中的所有 iPhone 开发者证书。
- 删除苹果账户中的所有证书。
- 使用xcode“管理证书”添加证书,有时你的Mac中还有证书,但我现在不知道它在哪里,如果添加成功,你的苹果帐户也会显示该证书,然后你可以创建你的带有该证书的配置文件并下载... goto 5
- 如果您使用“管理证书”无法添加证书,您可以创建一个新证书,并执行剩余步骤。
- 结束。
回答by yiqi chen
As @mgentilc says, automatic signing works. Simply enable Automatically manage signing in General -> Signing, Xcode will create and update profiles, app IDs, and certificates automatically.
正如@mgentilc 所说,自动签名有效。只需在常规 -> 签名中启用自动管理签名,Xcode 将自动创建和更新配置文件、应用程序 ID 和证书。
回答by Trinstan
Following the steps below:
按照以下步骤操作:
- Select the Target --> General --> Signing --> select the desired Team (It must the Super account)
- Then select the Build Settings in Target, keep the Development team with the same with Selected team. Set the Provisioning Profile with Automatic and Code Signing Identity with iOS Developer.
- Select the Project --> Build Settings. Set the Provisioning Profile and Code Signing Identity with Details information
- 选择目标 --> 常规 --> 签名 --> 选择所需的团队(必须是超级帐户)
- 然后在 Target 中选择 Build Settings,让 Development team 与 Selected team 保持一致。使用 iOS Developer 设置具有自动和代码签名标识的配置文件。
- 选择项目 --> 构建设置。使用详细信息设置配置文件和代码签名标识