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

你说的曾经没有我的故事 提交于 2019-12-02 18:57:50

I had the same experience with XCode 3 (not 4) and removing the old certificate in Keychain only wouldn't work.

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.

Now it seems to work fine!

Frank Schmitt

You might want to try the solution from xCode 4 -reinstalls keychain certs that I delete

Kind regards, Frank

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)

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.

For posterity, here's the strategy to get around this problem in our automated build script:

  1. Before building, move the ~/Library/MobileDevices/Provisioning Profiles directory aside
  2. 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.)
  3. Run you build
  4. Move the Provisioning Profiles directory back
  5. Profit?
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!