证书身份"iPhone Developer:"在钥匙串中出现多次.代码签名工具只需要一个 [英] Certificate identity 'iPhone Developer: ' appears more than once in the keychain. The codesign tool requires there only be one

查看:327
本文介绍了证书身份"iPhone Developer:"在钥匙串中出现多次.代码签名工具只需要一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我已经完全把头发拔了.

Ok, I am completely pulling my hair out on this one.

7月份,我创建了一个配置文件,以便可以在iPad上进行测试.

Back in July I created a provisioning profile so I could test on my iPad.

然后在8月底,我尝试将我的第一个应用程序提交到iTunes Store.这个过程简直就是一场噩梦,我为此感到挣扎.很多.最后,我找到了一个包含相对较新信息的教程,只有逐步学习它,我才能真正了解到这一点.不幸的是,这样做的结果是我创建了一个新的配置文件.

Then at the end of August I tried submitting my first App to the iTunes Store. The process was a complete nightmare, and I struggled. A lot. In the end I found a tutorial with relatively recent information in it, and only by following it step by step could I actually get anywhere with this. Unfortunately the result of this was that I created a new provisioning profile.

现在,当我尝试在iPad上进行测试时,在Xcode中出现以下错误:

Now when I try to test on my iPad I get the following error in Xcode:

Certificate identity 'iPhone Developer: MyName' appears more than once in the keychain. The codesign tool requires there only be one.

我检查了钥匙串,并确定有两个供开发的配置文件,一个来自7月,另一个是我8月份提交给iTunes Store的文件.

I check the keychain, and sure enough there are the two provisioning profiles for development, one from July and the one I used to submit to the iTunes Store in August.

现在我想做的是摆脱旧的,然后将我的iPad连接到新的iPad.我可以摆脱旧的罚款,但是我无法将iPad连接到新的iPad,iPad坚持使用旧的配置文件,甚至在Ive删除它后将其重新连接到钥匙串上.

Now what I want to do is get rid of the old one, and then connect my iPad up to the new one. I can get rid of the old one fine, but I cannot connect my iPad to the new one, it insists on using the old profile, even to the point of re-attaching it to the keychain after Ive deleted it.

谁能告诉我:

如何将我的iPad连接到新的配置文件?

在我们这样做的时候,谁能说明为什么整个过程如此复杂和困难?考虑到Apple的界面设计得如此好且流畅,因此注册证书并将其应用于不同设备和Apps的过程似乎倒退了.最初,我怀疑这只是我自己,但是在搜索这些错误消息时发现,在此过程中,有很多人在各个方面都在挣扎.

And while we are at it, can anyone shed any light on why this entire process is so convoluted and difficult? Considering that so much of Apples interface is so well designed and fluid, this process of registering certificates and applying them to different devices and Apps seems so backwards. I initially suspected this was just me, but googling for these error messages reveals that there are many who are struggling at various points along this process.

推荐答案

这与Xcode和钥匙串无关.

This has nothing to do with Xcode and everything to do with keychain.

  1. 打开钥匙串.
  2. 找到与您的配置文件相关的签名证书.
  3. 删除一个.您可能想保留较新的版本,因此请查看失效日期并删除最先失效的版本.
  4. 重新启动Xcode

如果您的配置文件不与新证书绑定,则可能需要更新,但它不会像创建新证书那样痛苦.

You may need to update your provisioning profile if it isn't tied to the new certificate, but it won't be as painful as creating a new certificate.

这里是Xcode中代码签名的工作原理的广泛概述.内容不多,但将说明您的配置出了什么问题以及如何解决它.

Here's a broad overview of how code signing in Xcode works. It a bit much but will explain what's wrong with your configuration, and how you can fix it.

  • 该机制包含三个部分,可确保您是自己所说的人,并确保您的应用程序可以在所需位置运行.

  • There are three parts to the mechanism that ensures that you are who you say you are and that your app is allowed to run where it wants to.

  1. 您有一对密钥,一个公开密钥和一个私有密钥.您的公共密钥与您的私有密钥相匹配,后者可以识别您的身份.
  2. 您的密钥用于生成证书.通常,您将在App Store或通过Ad Hoc发行获得一份开发证书和一份发行证书.这些证书可让您配置您的应用.
  3. 每个证书用于生成配置文件.概要文件必须附加到开发或发行证书中.分发配置文件可以在App Store上运行,也可以包含设备ID列表,这些ID可以运行使用该配置文件签名的应用.
  1. You've got a pair of keys, one public and one private. Your public key matches your private key, which identifies you.
  2. Your keys are used to generate certificates. Generally, you'll have one certificate for development and one for distribution,either on the App Store or via Ad Hoc distribution. These certificates permit you to provision your apps.
  3. Each certificate is used to generate provisioning profiles. The profiles must be attached to either a development or a distribution certification. A distribution profile either works on the App Store, or it contains a list of device IDs which may run apps signed with that profile.

  • 如果您的证书已过期,则使用该证书创建的配置文件将无效.在这种情况下,请同时替换证书和配置文件.从钥匙串访问"生成证书签名请求(CSR),并将其上传到开发人员门户.

  • If your certificate is expired, the provisioning profiles that are created with it are going to be invalid. In this case, replace both the certificate and the profiles. Generate a certificate signing request (CSR) from Keychain Access and upload it to the developer portal.

    如果您的钥匙串中有多个证书,则Xcode将不知道要使用哪个证书.如果您续订证书而不删除旧证书,则可能会发生这种情况. (如果您导出了开发者资料,然后又导入了它,也可能会发生.您的旧证书将继续使用.)

    If you have multiple certificates in your keychain, Xcode won't know which one to use. This may happen if you renew your certificate and don't remove the old one. (It may also happen if you exported your developer profile and then imported it later. Your old certificates will carry over.)

    如果您的配置文件已过期或无效,则可以在开发人员门户中续订它,而无需生成新的CSR.您可以将其附加到现有的有效证书上.

    If your provisioning profile is expired or invalid, you can renew it in the developer portal without generating a new CSR. You can just attach it to an existing valid certificate.

    证书不能在不移动请求它的原始密钥对的情况下从一台机器转移到另一台机器.从钥匙串"导出证书也将导出密钥.

    Certificates can't be carried over from one machine to another without moving the original key pair that requested it. Exporting the certificate from Keychain will export the keys as well.

    这篇关于证书身份"iPhone Developer:"在钥匙串中出现多次.代码签名工具只需要一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆