Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin Studio on my Mac - No valid iPhone code signing keys found in keychain - Signing Identity: Missing private key

So I'm trying to run a project in Xamarin Studio on my device. I'm getting the error "No valid iOS code signing keys found in keychain."

I generated a brand new iOS development certificate as seen here:

enter image description here

I then downloaded the certificate and opened it to add it to keychain. Here it is in keychain:

enter image description here

Then I created a provisioning profile. I added the appropriate devices, and set the certificate to the one I just generated. Viewing the edit section of the provisioning profile you can see it is set to the correct certificate:

enter image description here

After all of this I went into Xcode, then clicked Xcode->preferences. I added my AppleID and viewed the details on the account. Everything seems to be there except the iOS development signing identity says "Missing private key."

enter image description here

I'm assuming this is why I get the error in Xamarin Studio. How can I fix this?

like image 223
Jared Price Avatar asked Oct 20 '22 18:10

Jared Price


1 Answers

A private key is generated when you generate a code signing request certificate (CSR). If you did not create the CSR from the same Mac in which you are downloading certificate, it will not have the private key used to generate the certificate. If you did create the CSR from the same Mac, then probably your private key is deleted.

The best solution now is to create a new CSR, create a new Development/Distribution certificate and a new provisioning profile.

like image 128
Fawad Masud Avatar answered Oct 22 '22 20:10

Fawad Masud