Xcode 4 -reinstalls keychain certs that I delete

前端 未结 16 904
被撕碎了的回忆
被撕碎了的回忆 2020-12-12 14:36

I am getting this error:

CodeSign error: Certificate identity \'iPhone Developer: XXX\' appears more than once in the keychain. The codesign too

相关标签:
16条回答
  • 2020-12-12 15:30

    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?
    0 讨论(0)
  • 2020-12-12 15:32

    Just installed Xcode 4.6.1 and started having this problem again. The last time was a long time back. I deleted the old provisioning profiles and the certificates, but still could not build.

    This time it turns out that I had 2 certificates listed for me in the team account of the developer portal. The first was expired, the second was not. Xcode kept grabbing the first one it found while refreshing (or maybe both).

    I deleted both certificates from the keychain, then manually downloaded the good one from Apple's portal and manually added it to the keychain. Now I can build again.

    (And I sent a request to the team admin to remove the old certificate.)

    0 讨论(0)
  • 2020-12-12 15:33

    For what it's worth, @AndreasPrang, your answer worked when all of the above didn't. I could see the expired certificate was not anywhere in the keychain, yet when I did a build, Xcode said it was. Deleting the provisioning profiles (all of them), selecting my name in the Team section and clicking the refresh icon in the lower right of the organizer also did not help. Restarting Xcode didn't help, but shutting down XCode, deleting ~/Library/Developer/Xcode did. When I restarted XCode, it rebuilt everything and was happy.

    0 讨论(0)
  • 2020-12-12 15:34

    the above method not work for my case

    finally , i go to keychain

    and search the key by entering the name

    i finally found the cert which is supposed to be deleted before . then i deleted it and the problem solved

    it's really frustrating , and i don't know whether it's the bug ....... really exhausting.

    0 讨论(0)
提交回复
热议问题