iPhone 开发人员不匹配任何有效证书 (Xcode)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8194338/
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
iPhone developer doesn't match any valid certificate (Xcode)
提问by Cian Heffernan
Hi I've kind of been cornered by apple here, I submitted a technical support query, one of the free ones thats comes free when you pay into the developer program only to be told that they won't be in the office until after Thanksgiving, a problem I overlooked as I am from Ireland. I really need help on this as I've tried looking in forums and I've tried solutions that were given for similar problems but I still can't crack it.
嗨,我在这里被苹果逼到了绝境,我提交了一个技术支持查询,其中一个是免费的,当您向开发者计划付款时才免费提供,但被告知他们要到感恩节后才能到办公室,这是我来自爱尔兰时忽略的问题。我真的需要这方面的帮助,因为我尝试在论坛中查找并尝试过针对类似问题提供的解决方案,但我仍然无法破解。
The screenshot images can be seen on this page.. http://www.heffernanwebservices.ie/blank.html
截图图片可以在这个页面上看到.. http://www.heffernanwebservices.ie/blank.html
Here it goes...
来了...
DESCRIPTION OF PROBLEM On trying to build my project "Mulligan IRL" in xcode i get the following error " Code Sign error: The identity 'iPhone Developer: Cian Heffernan (8ELM27DL8F)' doesn't match any valid certificate/private key pair in the default keychain"
问题描述在尝试在 xcode 中构建我的项目“Mulligan IRL”时,我收到以下错误“代码签名错误:身份‘iPhone 开发人员:Cian Heffernan (8ELM27DL8F)’与默认钥匙串”
[Screenshot 1]
[截图1]
When I navigate to code signing in the build settings of the project i can see that when I click code signing identity for iphone developer or iphone distribution it has "(no profiles currently match) beside them. I then headed to the keychain access window in utilities and look in certificates and find that both the developer and distribution certificates will not expire until next August and November. Next I headed to the organizer in xcode. I see in provisioning profiles I have 8 profiles there! I don't know why I have so many.(2nd attachment)
当我导航到项目的构建设置中的代码签名时,我可以看到,当我单击 iphone 开发人员或 iphone 发行版的代码签名标识时,它旁边有“(当前没有匹配的配置文件)。然后我前往钥匙串访问窗口实用程序并查看证书,发现开发人员和分发证书都将在明年 8 月和 11 月到期。接下来我前往 xcode 的组织者。我在配置文件中看到我有 8 个配置文件!我不知道为什么我有这么多。(第二个附件)
[Screenshot 2]
[截图2]
As you can see ONE of the iOS team provisioning profiles will expire in 11days so I just tried to renew that. When I try this I get an error:(3rd attachment)
正如您所看到的,其中一个 iOS 团队配置文件将在 11 天后过期,所以我只是尝试更新它。当我尝试这个时,我收到一个错误:(第三个附件)
[Screenshot 3]
[截图3]
I then head to the provisioning portal to see why it wasn't found but I can see the profile. (4th attachment)
然后我前往配置门户,看看为什么没有找到它,但我可以看到配置文件。(第四个附件)
[Screenshot 4]
[截图4]
I have no idea why I am getting this error. I would appreciate any help on the matter.
我不知道为什么会收到此错误。我将不胜感激。
回答by Michal Kopec
For certificate to be valid it needs to be associated in your Keychain with a private key. Find the "iPhone Developer..." certificate in your Keychain and see if it's got a private key associated with it.
要使证书有效,它需要在您的钥匙串中与私钥相关联。在您的钥匙串中找到“iPhone Developer...”证书,看看它是否有与之关联的私钥。
This can occur when you develop on two or more computers. You need to export the certificate+private key pair from the computer where you generated the private key first. Then import it onto all computers you do development on.
当您在两台或多台计算机上开发时可能会发生这种情况。您需要先从生成私钥的计算机导出证书+私钥对。然后将其导入到您进行开发的所有计算机上。
See Apple's Transferring Your Identitiesfor more detailed info.
有关更多详细信息,请参阅 Apple 的“传输您的身份”。
回答by Jesse Rusak
This could be caused by not having the private key associated with your certificate in your keychain. You can verify this by going to Keychain Access and choosing "Certificates" from the "Category" area at the bottom left. If your developer certificate does not appear when filtering that way, you are missing the private key for it.
这可能是由于您的钥匙串中没有与您的证书相关联的私钥造成的。您可以通过转到钥匙串访问并从左下角的“类别”区域中选择“证书”来验证这一点。如果以这种方式过滤时您的开发人员证书没有出现,则您缺少它的私钥。
If this is the case, you'll have to add your private key to the keychain, or else just reject and re-issue your development certificate with a new private key (you can find steps for this in the provisioning portal.)
如果是这种情况,您必须将您的私钥添加到钥匙串中,否则只需拒绝并使用新的私钥重新颁发您的开发证书(您可以在配置门户中找到相关步骤。)
回答by hanumanDev
回答by user1429980
I was using AppCode, but for me simply adding a new Keychain via Keychain Access called iPhone Developerallowed me to start building in AppCode.
我正在使用 AppCode,但对我来说,只需通过名为iPhone Developer 的Keychain Access 添加一个新的 Keychain ,就可以开始在 AppCode 中构建。
回答by Gonen
Apple has a great article regarding Certificates and Provisioning-Profiles,
with excellent troubleshooting:
Apple 有一篇关于 Certificates and Provisioning-Profiles 的很棒的文章,
其中包含出色的故障排除:
iOS Code Signing Troubleshooting
The most useful part I found was regarding cleanup of old provisioning-profiles from Xcode:
我发现的最有用的部分是关于从 Xcode 清理旧的配置文件:
"Keep Your Profile Library Clean
...You need to manually remove provisioning profiles you are not using,
otherwise, Xcode will reimport potentially old or duplicate certificates into the keychain
and that can cause build errors."
“保持您的配置文件库清洁
......您需要手动删除您不使用的配置文件,
否则,Xcode 会将可能旧的或重复的证书重新导入钥匙串
,这可能会导致构建错误。“
And as a weapon of last resort, you can use this procedure:
How do I delete/revoke my certificates and start over fresh?
作为最后的手段,您可以使用以下程序:
如何删除/撤销我的证书并重新开始?