50

I tried to add my iPhone to Xcode4 to test my Application on it. I added the device in the Apple Developer-Center and downloaded the Provision-Profile. We pay 99$ per month for the account and I'm not the only person who use this account. So there is already an "older" certificate present which I tried to add to my keychain-manager. But I see a red-text above it (translated from german) "This certificate has been signed by an unknown instance.".

In my XCode-Device Manager in the Provisioning-Section there's also an error: "XCode could not find a valid private-key/certificate pair for this profile in your keychain."

I really don't understand what I have to do now. These keys may really not exist in my keychain, I can't find them. So how I have to create them know and how can I use them if there is already one certificate in the Apple Dev-Center?

Michael Currie
  • 11,166
  • 7
  • 39
  • 54
Kevin Glier
  • 1,047
  • 2
  • 13
  • 26
  • Here was my personal savior. These certificates had me pulling my hair out. http://stackoverflow.com/questions/2714517/a-valid-signing-identity-matching-this-profile-could-not-be-found-in-your-key (The longer explanation from Simon Alexander) – Mike Anson Apr 12 '11 at 14:22
  • I found this link working great for me. Follow this link,describing certain steps for creating provisional profile as well certificates [http://mobiforge.com/developing/story/deploying-iphone-apps-real-devices](http://mobiforge.com/developing/story/deploying-iphone-apps-real-devices) – Ajay Sharma Mar 22 '11 at 14:05

6 Answers6

46

To generate a certificate on the Apple provisioning profile website, firstly you have to generate keys on your mac, then upload the public key. Apple will generate your certificates with this key. When you download your certificates, tu be able to use them you need to have the private key.

The error "XCode could not find a valid private-key/certificate pair for this profile in your keychain." means you don't have the private key.

Maybe because your Mac was reinstalled, maybe because this key was generated on another Mac. So to be able to use your certificates, you need to find this key and install it on the keychain.

If you can not find it you can generate new keys restart this process on the provisioning profile website and get new certificates you will able to use.

Ludovic Landry
  • 10,946
  • 9
  • 45
  • 79
  • 4
    The other developer may be able to export the private key and copy it to your machine. Or as suggested here you can generate your own development private key, certificate and provisioning profiles. – koregan Mar 22 '11 at 13:45
  • Hm, I created my own provisioning-profiles and added the device. But I don't know how to create the private key so that it is accepted by the certificate. – Kevin Glier Mar 22 '11 at 14:50
  • 1
    How do i generate my pair of keys? public and private? – Mr_Nizzle Apr 03 '11 at 16:56
  • 15
    Everything is explained here: https://developer.apple.com/ios/manage/distribution/index.action – Ludovic Landry Apr 04 '11 at 08:40
1

My problem was my Target profile didn't have the proper code signing option selected:

Target Menu -> Code Signing -> Code Signing Identity

Choose "iPhone developer" then select the provisional profile you created.

supermoogle
  • 1,167
  • 9
  • 7
0

This also can happen if the device you are trying to run on has some older version of the provisioning profile you are using that points to an old, expired or revoked certificate or a certificate without associated private key. Delete any invalid Provisioning Profiles under your device section in Xcode organizer.

borisgolovnev
  • 1,740
  • 15
  • 17
0

When I tried to select the development provisioning profile in Code Signing Identity is would say "profile doesn't match any valid certificate". So when I followed the two step process below it worked:

1) Under "Code Signing Identity" for Development change to "Don't Code Sign".
2) Then Under "Code Signing Identity" for Development you will be able to select your provisioning profile for Development.

Drove me nuts, but stumbled upon the solution.

James Testa
  • 2,841
  • 4
  • 39
  • 59
0

I had a similar situation: multiple developers using the same private key, but I couldn't find mine anymore after upgrade to Lion. The very simple fix was to export the private key for the specific certificate (in my case the Development cert) from the other machine, move it to my computer and drag it into keychain access there. Xcode immediately picked it up and I was good to go.

mmattke
  • 701
  • 6
  • 6
0

your Apple developer certificate might have expired or else ur system date is greater than your account expiry date

Ravi
  • 1,749
  • 5
  • 20
  • 37