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

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

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

编辑:

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


当前回答

以下是我所做的。

Make sure your certificates have not expired, make sure you delete all the expired ones. Get new ones etc, Once you have make sure all that is the way it should be, then focus on your project files. in finder , go to your .xcodeproj files then show package contentes. open project.pbxproj in xcode or textedit. find every refrense to PROVISIONING_PROFILE and remove the GUID, just leave empty "" Depending on your project you should have about 12+ refrences, remove all of the GUIDS. Save file, then reopen your project in XCODE Re select the correct provision profiles for all possible code signings( they should not all be the same) Build your project and you should be good to go.

我认为Xcode在某种程度上混淆了,从项目中删除了所有的Provision Profiles。Pbxproj,然后重新选择一个有效的配置文件将使它直。

其他回答

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

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

我发现我需要拖动distribution_identity。我从开发人员程序门户网站上的“Certificates -> Distribution”页面下载的cer文件到密钥链访问程序中,然后这个错误就消失了。

对我来说,只有当证书和两个密钥都在Login keychain中时,它才有效。我之前创建了一个开发钥匙链,但是Xcode管理器在那里找不到钥匙。所以我把它们移回登录,退出钥匙链工具-瞧,Xcode管理器中的错误消失了!这是在3.1.3 SDK的雪豹10.6.2上。

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!

对于两个不同的配置概要文件(开发和分发),有两个不同的证书。您必须在keychain中安装两个证书。在iPhone开发者计划入口:

证书->开发->下载 证书->分发->下载

双击这两个证书。之后,两个证书都必须出现在Keychain中。