我有一台苹果机,用Xcode 4开发iPhone应用。 我现在有一台新麦金塔电脑,新安装了……一切。

当打开在旧Mac上构建的Xcode项目时,我无法在配置为开发版iPhone的iPhone上运行应用程序。 Xcode 4管理器告诉我在配置文件中“没有找到有效的签名标识”。

我猜这与我之前在旧Mac上生成的.certSigningRequest文件有关(我有该文件的备份),但我必须在新Mac上处理它吗?

另一件奇怪的事情是,我在管理器中看不到我的5个现有配置文件(在苹果配置门户上定义),即使刷新并输入我的配置门户登录名和密码后:


当前回答

I had the same error but the issue was slightly different. We have a team of developers but we all use the same Apple ID (Developer Account), so when I generated the Provisioning profile, I kept getting the same error as in the subject question. Then although I had downloaded the certificate (that gets prompted as part of the Development Provisioning Assistant steps), I was still getting that error. Then I found the issue was that our Apple Developer account was using a Certificate that was generated on my work mate machine, so I needed to revoke it, and generate a new certificate, then create the provisioning profile.

摘要,从中得到的教训是,用于配置配置文件的证书必须在将使用配置配置文件的同一台计算机上生成。当你有一个开发团队共享同一个Apple ID时,这一点尤其重要。 希望它能帮助到一些人

其他回答

我今天早上遇到了这个问题,当时我刚刚用不同的证书打开了一个旧应用程序,并允许它访问钥匙链。我的另一个应用程序,工作得很好,停止工作与这个错误。我一直在拔我的头发,直到现在,我只是这样做:

Xcode菜单>首选项>帐户> THE_APPLE_ID_THAT_YOU_ARE_USING >查看详细信息

在新窗口中,在签名标识的左下角按下+按钮并选择iOS Development。它会重新添加身份,之后我的问题就解决了,应用程序又能在设备上运行了。

你必须去你的开发者网站,找到你的证书,为你当前的MAC生成一个新的证书,并将它添加到你的钥匙链上。

然后,您将需要再次添加配置文件。现在应该可以了。基本上,你需要执行与第一次获得开发证书时相同的步骤。

对我来说,诀窍是发现即使我可以在登录下看到开发人员证书,但它不在我的证书下。修复方法是从旧mac上的keychain中导出证书,然后将其导入到My Certificates/login上的新mac。

我解决了“有效的签名身份未找到”错误或多或少:

Make sure that the certificate in your iOS developer program is also listed in your keychain access and is valid (compare the issue dates). If it is not, either transfer it from your old mac using the instructions from apple reference OR delete it from the website and your keychain access and then recreate it, re-download it and drag it over Xcode. Delete any existing development or distribution provisioning profiles and recreate them based on your new certificate, redownload them and verify from keychain access that everything is valid.

在Xcode 4.2和更高版本(包括Xcode 4.6)中,有一种更好的方法可以将你的整个开发人员配置文件迁移到新机器上。在你现有的机器上,启动Xcode并执行以下操作:

打开组织者(Shift-Command-2)。 选择设备选项卡。 在左上角LIBRARY下面选择Developer Profile,它可能在标题库下面,也可能在名为TEAMS的标题下面。 的左下角选择Export 窗外。Xcode要求你选择一个文件名和密码。

编辑Xcode 4.4:

使用Xcode 4.4,在第3步,在LIBRARY下选择Provisioning Profiles。然后用鼠标或Command-A选择您的配置文件。

此外,苹果正在改进Xcode在这方面的管理方式,一些用户报告说,在右下角的刷新按钮可以做到这一点。因此,请先尝试单击Refresh,如果没有帮助,则执行导出/导入序列。

WP添加的Xcode 4.6图片

为Xcode 5.0或更新版本编辑:

打开Xcode ->首选项('命令' + ',') 从列表中选择Apple ID。 点击窗口左下角的SETTING图标,然后选择EXPORT ACCOUNTS…Xcode要求你选择一个文件名和密码。

在你的新机器上,启动Xcode并导入上面导出的配置文件。效果非常好。

Xcode 5.0的图片由Ankur添加