Alex Rivera | Logout

Why does Xcode auto-install a (duplicate and expired) certificate in the keychain?

Asked 2011-03-17T07:02:19.227
27

Possible Duplicate:
xCode 4 -reinstalls keychain certs that I delete

The question says it all in a nutshell.

When building a project in Xcode, I receive the error message from the Check dependencies step:

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.

Quit Xcode, restart, watching Keychain, and TA-DA! the expired certificate reappears.

I feel like I'm back on a virus-infected windows machine.

Since the project builds and executes properly when the cert is deleted, the only problem is the automatic installation xcode does.


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. :)

Edit
Report

1 Answer

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?

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.

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)

answered 2011-03-18T15:00:00.913

Your Answer