这事让我非常担心。我刚刚下载了iPhone 3.0 SDK,但现在我无法让我的配置文件工作。以下是我的尝试:

删除所有配置配置文件 删除登录keychain 创建新的“登录”钥匙链,使它 默认的 创建一个新的证书签名请求 创建新的开发人员和分销渠道 证书在苹果开发者中心 下载并安装它们 下载并安装WWDR证书 创建一个新的配置文件和 双击它来安装

所有的证书报告都是有效的,但是Xcode仍然不能识别它们。接下来我该试试什么?

编辑:

我完全重新安装了Mac OS X,从一个新的安装安装了3.0 SDK,仍然有同样的问题。


当前回答

我登录了开发人员帐户并撤销了开发证书。撤销和下载开发证书后,我双击新下载的证书,这一次私钥在开发证书下的KeyChain访问。

其他回答

Because I keep coming back to this question, I will leave my answer here for the solution that works for me. It turns out that for a same public/private key developer identifier of me, it's installed twice in my keychain. Both have private key. But when I compare, one is private key of me within my developer organisation, and another one is private key of me as a personal developer. It turns out Xcode keeps trying using the wrong key. Removing the wrong duplicate key solves all the problem. Hey future me, check this one first next time!

如果你有新的mac,你可以去 IOS开发中心->供应门户->证书->开发->撤销并创建新证书。我的问题解决了。我的错误是“代码签名错误:身份'iPhone开发人员'不匹配任何有效的,未过期的证书/私钥对在您的钥匙串”

这里的每个人都错了。你所需要做的就是按照苹果在“管理你的数字身份”中提供的步骤操作。

它指导你通过Xcode导出你的证书,并通过Xcode重新导入。它工作得很好,但要确保你的用户名在两台电脑上是相同的,否则就会失败。

Xcode 4需要注意的是:在组织者的左边有两个不同的区域:

库>配置配置文件 设备>您的设备>配置文件

我总是把我的配置文件放在2中。即使在清洁和正确安装之后,它也不能工作。然后我发现。最后我找到了刷新按钮。如果您在1中选择“自动设备供应”。然后单击刷新,然后所有内容都得到验证(2中没有黄色警告。了)。

For Xcode 13 (maybe earlier?) - The key to this is to use the "Build Settings" tab, not the "Signing and Capabilities" tab in your Target Settings. Once you are in "Build Settings", search for the "Signing" section (you can type "Signing" in the search box). There you will see a sub-section called Code Signing Identity. In that section you can click on each line and directly choose any certificate you have in your keychain. You need to do that for all of the relevant configurations (the ones that you want to upload to TestFlight/AppStore). When you go back to the "Signing and Capabilities" tab, you should see the results of what you did and the error should have gone away.

我从下面的答案中得到了灵感:https://stackoverflow.com/a/37043501/826946

但我认为明确地列出这一点可能会有所帮助。