Codesign error: Certificate identity appearing twice Codesign error: Certificate identity appearing twice objective-c objective-c

Codesign error: Certificate identity appearing twice


I just had the same problem. It has been fixed.It came after I submitted an app and installed a few certificates to sign the app.

Quick Fix:Open up KEYCHAIN ACCESS > click on MY CERTIFICATES> in there you will probably see iPhone Developer: . You will probably see it TWICE! Select the one with the earliest Expiration date, right click and select DELETE.

Restart Xcode if you haven't.Works now. :)

Happy Coding.


I think I figured out why the simple delete is not working. Because the dev certificate is still stored in the provision profile, when I close/re-open the Xcode after deleting the certificate in Keychain, I saw the old certificate come back. So I delete it again. It worked.

The simple delete the profile solution did not work for me.

Solution that worked in my case:

  1. Quit Xcode
  2. If the Keychain access is open, keep it open.
  3. Launch Xcode now.
  4. See that the certificate Xcode was complaining about will be re-added into the keychain at launch from its cache.
  5. Go ahead and delete it.
  6. Compile and happy coding.


I just spent a fair amount of time struggling with this same issue. After all the attempts to fix it, I finally came to realize that it's a bug in Xcode. This post gave me a clue to fix it:certificates magically re appearing in your keychain

In my case, the matching private key was in the System keychain, and just had my name on it (hard to tell it was for provisioning). I had to:

  • Move the associated private key to 'login' keychain
  • Restarted Xcode and noticed that the private key was now showing as associated (confirms what it was for)
  • Delete the cert and private key
  • Restart Xcode and poof! It stopped adding my old cert

An interesting observation is that when you delete the certificate, it doesn't delete the associated private key. Visually, it shows the private key below the cert. Don't be fooled.

Good luck!