Possible Duplicate:
xCode 4 -reinstalls keychain certs that I delete可能重复:xCode 4 - 重新安装我删除的密钥链证书
The question says it all in a nutshell.
这个问题简而言之。
When building a project in Xcode, I receive the error message from the Check dependencies step:
在Xcode中构建项目时,我收到来自Check dependencies步骤的错误消息:
CodeSign error: Certificate identity 'iPhone Developer: xxxxx' appears more than once in the keychain. The codesign tool requires there only be one.
Problem is, this certificate identity is reinstalled whenever Xcode is launched. It is an expired certificate too, that causes extra confusion. So I delete it in keychain, and build the project and everything works.
问题是,每当启动Xcode时,都会重新安装此证书标识。它也是一个过期的证书,会造成额外的混乱。所以我在keychain中删除它,并构建项目,一切正常。
Quit Xcode, restart, watching Keychain, and TA-DA! the expired certificate reappears.
退出Xcode,重新启动,观看Keychain和TA-DA!过期的证书重新出现。
I feel like I'm back on a virus-infected windows machine.
我觉得我又回到了受病毒感染的Windows机器上。
Since the project builds and executes properly when the cert is deleted, the only problem is the automatic installation xcode does.
由于项目在删除证书时正确构建和执行,唯一的问题是xcode的自动安装。
Edit:
编辑:
I think it's got to be related to an examination that xcode does of the keychain, for whatever reason. Then xcode decides to install the cert based on its checkup of keychain, though it's a faulty decision. I could probably solve this problem if I spent 24-48 hours, but I'm able to keep working, without quitting Xcode. :)
我认为无论出于何种原因,它都必须与xcode对钥匙串的检查有关。然后xcode决定根据其对钥匙串的检查来安装证书,尽管这是一个错误的决定。如果我花了24-48小时,我可以解决这个问题,但我能够继续工作,而不会退出Xcode。 :)
5 个解决方案
#1
22
I had the same experience with XCode 3 (not 4) and removing the old certificate in Keychain only wouldn't work.
我对XCode 3(而不是4)有相同的经验,只删除Keychain中的旧证书是行不通的。
I also add to remove all of my old provisioning profiles using the old certificate with Organizer then quit XCode, remove the old certificate from Keychain and restart XCode.
我还添加了使用Organizer的旧证书删除所有旧的配置文件,然后退出XCode,从Keychain中删除旧证书并重新启动XCode。
Now it seems to work fine!
现在它似乎工作正常!
#2
4
You might want to try the solution from xCode 4 -reinstalls keychain certs that I delete
您可能希望尝试xCode 4的解决方案 - 重新安装我删除的密钥链证书
Kind regards, Frank
亲切的问候,弗兰克
#3
1
Not sure what's causing this for you, but two things to try out:
不确定是什么原因造成这种情况,但需要尝试两件事:
Firstly ... Xcode has historically had some bugs in this area that are only cured by quitting Xcode, deleting stuff from keychain, rebooting OS X (really - no idea what's in XCode that can survive an app restart, but I've seen it happen), and then restarting XCode. I haven't seen any of those for well over a year, but could be a regression bug?
首先...... Xcode历史上在这个领域有一些缺陷,只能通过退出Xcode,删除钥匙串中的东西,重新启动OS X来解决(真的 - 不知道XCode中的内容可以在应用程序重启后继续存在,但我已经看过了发生),然后重新启动XCode。我一年多没见过这些,但可能是一个回归错误?
Secondly ... although it doesn't handle certs, if you're not already you should be using iPhone Configuration Utility (http://support.apple.com/kb/dl851) for the provisioning profiles part if possible - it often provides manual fixes for Xcode bugs in this area.
其次......虽然它不处理证书,如果你还没有,你应该使用iPhone配置工具(http://support.apple.com/kb/dl851)作为配置文件部分,如果可能的话 - 它经常为此区域中的Xcode错误提供手动修复。
Oh, thirdly (nobody expects the spanish inquisition): if you check Console, it sometimes contains extra debugging / error info for the commandline tools in Xcode that deal with certs and cert-signing (including error messages that appear nowhere else)
哦,第三(没人希望西班牙语的调查):如果你检查Console,它有时包含Xcode中处理证书和证书签名的命令行工具的额外调试/错误信息(包括其他地方没有出现的错误消息)
#4
0
Delete all your provisioning profiles liked to the expired certificate from organizer.
从组织者中删除所有过期证书所需的配置文件。
Go to the provisioning portal create the new certificate. After that for each provisioning profile, edit them by selecting the certificate checkbox on the edit page and save them, then re-download the profiles.
转到配置门户创建新证书。之后,对于每个配置文件,通过选择编辑页面上的证书复选框进行编辑并保存,然后重新下载配置文件。
#5
0
For posterity, here's the strategy to get around this problem in our automated build script:
对于后代,这是在我们的自动构建脚本中解决此问题的策略:
- Before building, move the ~/Library/MobileDevices/Provisioning Profiles directory aside
- 在构建之前,将〜/ Library / MobileDevices / Provisioning Profiles目录移到一边
- Check to see if the iPhone Configuration Utility is running and close it (certs always reappear if this app is open. In XCode 4.1 you need to close the organizer too.)
- 检查iPhone配置实用程序是否正在运行并关闭它(如果此应用程序处于打开状态,证书总会重新出现。在XCode 4.1中,您还需要关闭管理器。)
- Run you build
- 跑你建立
- Move the Provisioning Profiles directory back
- 移回Provisioning Profiles目录
- Profit?
- 利润?
#1
22
I had the same experience with XCode 3 (not 4) and removing the old certificate in Keychain only wouldn't work.
我对XCode 3(而不是4)有相同的经验,只删除Keychain中的旧证书是行不通的。
I also add to remove all of my old provisioning profiles using the old certificate with Organizer then quit XCode, remove the old certificate from Keychain and restart XCode.
我还添加了使用Organizer的旧证书删除所有旧的配置文件,然后退出XCode,从Keychain中删除旧证书并重新启动XCode。
Now it seems to work fine!
现在它似乎工作正常!
#2
4
You might want to try the solution from xCode 4 -reinstalls keychain certs that I delete
您可能希望尝试xCode 4的解决方案 - 重新安装我删除的密钥链证书
Kind regards, Frank
亲切的问候,弗兰克
#3
1
Not sure what's causing this for you, but two things to try out:
不确定是什么原因造成这种情况,但需要尝试两件事:
Firstly ... Xcode has historically had some bugs in this area that are only cured by quitting Xcode, deleting stuff from keychain, rebooting OS X (really - no idea what's in XCode that can survive an app restart, but I've seen it happen), and then restarting XCode. I haven't seen any of those for well over a year, but could be a regression bug?
首先...... Xcode历史上在这个领域有一些缺陷,只能通过退出Xcode,删除钥匙串中的东西,重新启动OS X来解决(真的 - 不知道XCode中的内容可以在应用程序重启后继续存在,但我已经看过了发生),然后重新启动XCode。我一年多没见过这些,但可能是一个回归错误?
Secondly ... although it doesn't handle certs, if you're not already you should be using iPhone Configuration Utility (http://support.apple.com/kb/dl851) for the provisioning profiles part if possible - it often provides manual fixes for Xcode bugs in this area.
其次......虽然它不处理证书,如果你还没有,你应该使用iPhone配置工具(http://support.apple.com/kb/dl851)作为配置文件部分,如果可能的话 - 它经常为此区域中的Xcode错误提供手动修复。
Oh, thirdly (nobody expects the spanish inquisition): if you check Console, it sometimes contains extra debugging / error info for the commandline tools in Xcode that deal with certs and cert-signing (including error messages that appear nowhere else)
哦,第三(没人希望西班牙语的调查):如果你检查Console,它有时包含Xcode中处理证书和证书签名的命令行工具的额外调试/错误信息(包括其他地方没有出现的错误消息)
#4
0
Delete all your provisioning profiles liked to the expired certificate from organizer.
从组织者中删除所有过期证书所需的配置文件。
Go to the provisioning portal create the new certificate. After that for each provisioning profile, edit them by selecting the certificate checkbox on the edit page and save them, then re-download the profiles.
转到配置门户创建新证书。之后,对于每个配置文件,通过选择编辑页面上的证书复选框进行编辑并保存,然后重新下载配置文件。
#5
0
For posterity, here's the strategy to get around this problem in our automated build script:
对于后代,这是在我们的自动构建脚本中解决此问题的策略:
- Before building, move the ~/Library/MobileDevices/Provisioning Profiles directory aside
- 在构建之前,将〜/ Library / MobileDevices / Provisioning Profiles目录移到一边
- Check to see if the iPhone Configuration Utility is running and close it (certs always reappear if this app is open. In XCode 4.1 you need to close the organizer too.)
- 检查iPhone配置实用程序是否正在运行并关闭它(如果此应用程序处于打开状态,证书总会重新出现。在XCode 4.1中,您还需要关闭管理器。)
- Run you build
- 跑你建立
- Move the Provisioning Profiles directory back
- 移回Provisioning Profiles目录
- Profit?
- 利润?