Search code examples
iosios5keychain

Accidentally deleted the keys in my KeyChain Access and now can't put new ones in


I accidentally deleted the keys in my Keychain Access on my local computer which I use to archive the code when I am ready to submit a new binary.

What I am trying to do to fix this is to go to my IOS PROVISIONING PORTAL, and click on the certificated nav item on the left, and download the dev and production certificates. I do download them, and then drag them to the KeyChain icon, but I am not sure that is doing anything.

And when I try to archive the code, I get this error:

Code Sign error: The identity 'iPhone Distribution: dist_name' doesn't match any valid, non-expired certificate/private key pair in your keychains

Any idea why this is happening and how to fix it?

EDIT:

When I tried to revoke my production certificate, the system said that if I do that, my current live app will no longer work.


Solution

  • There are countless posts regarding this on S.O. already.

    When this happens, your best bet is to begin from SCRATCH. Delete all provisioning profiles and re-do the whole procedure.

    Else, you'll be stuck for hours trying to solve problems that may or may not be yours.