Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Certificate added but It shows missing private key

Tags:

ios

swift

Right now I'm developing apps on a brand new macbook. I have downloaded the certSigninRequest

enter image description here

Now I have added both the ios distribution certificate and the private key which is (certSigninRequest)

enter image description here

But whenever I try to export my app it keeps saying missing private key. I have added to my Keychain already

enter image description here

like image 791
sinusGob Avatar asked Mar 07 '23 16:03

sinusGob


1 Answers

For your case, the appropriate way to use the Distribution Certificate to be legal on other machine(s) is to export it from the current machine that uses the certificate.

To do this:

  • Navigate the the keychain access.
  • Go to the targeted certificate, expand it and select both the certificate and the private key:

enter image description here

  • Right click and select "Export 2 items...".
  • Obviously, you should fill the required info, such as the name of the exported file and a password.

The output of the above steps would be a .p12 file, which should be installed on the other machine(s). Note that revoking the original certificate will also makes this exported file to be invalid.

Do not request a new distribution certificate for the new machine, it will automatically revoke the previous one (which leads to make the first machine's certificate to be invalid). This thing is you would generate only one Distribution Certificate -by generating a "CertificateSigningRequest" file from the current machine- and then export it to be able to install it on the other machines, which means that all machines use the same distribution certificate.

Also, the following questions might be related to your case:

  • missing private key in the distribution certificate on keychain
  • How can I add private key to the distribution certificate?
like image 91
Ahmad F Avatar answered Mar 12 '23 16:03

Ahmad F