0

A while ago I was working with iOs on a mac. Due to an accident the machine is lost and I can't recover anything from it. I bought a new one and installed xcode. When trying to compile for a device I get an error saying "There are no valid certificates/private key pairs in the default keychain".

I went to the provisioning portal and I got my developer certificate and added it to the keychain (the login one). I also added the provisioning file I used before to the mac (It was already on the iOs device).

In the organizer tab under status I see a warning: "Valid signing identity not found".

I'm still new to the whole apple development thing and I have no clue as to what should I do.

Could you guys please help me?

Thank you

Sanctus2099
  • 1,669
  • 5
  • 22
  • 40

3 Answers3

3

You need to toss the existing development cert, and provide a new signing request from the keychain. The thing you are missing is your private key, since you cannot get that just make a new one.

In the future, use Time Machine... it's invaluable. Also you can export the private key to save to a USB stick for extra backup.

Kendall Helmstetter Gelner
  • 74,769
  • 26
  • 128
  • 150
1

Go to https://developer.apple.com/ios/manage/overview/index.action (or the iOS provisioning portal!)

and then go to Provisioning. Then click new profile and create your profile and then download it. Then open the provisioning file and then your computer will ask you if you want to add it to the Library. Accept it and then you should have it in your computer. Next open Xcode and open the organizer and then click the device that your using to test and click Provisioning Profiles. Then click import and select the provisioning file that you just downloaded. Then in your project select the appropriate profile in your build settings! Then try and it should work! You can't use your old certificate so just toss that one out. Good Luck!

sridvijay
  • 1,526
  • 18
  • 39
1

You cannot use the same certificate you downloaded from developer portal if you did not backup the key. You cannot use the certificate without the key. You should have backed up the key on previous machine and now you would just download the certificate and pair it up with backed up key.

If you didn't back up the key, you have to revoke the old certificate and create a new one. And when you are finished remember to backup your certificate key.

Happened to me, so I know by doing it the wrong way ;)

Ladislav
  • 7,223
  • 5
  • 27
  • 31