Xcode - iPhone - profile doesn't match any valid certificate-/private-key pair in the default keychain

106,511

Solution 1

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.

Solution 2

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.

Share:
106,511
Kevin Glier
Author by

Kevin Glier

I'm a developer since 2009, mostly working on Web Applications with PHP and later on with ASP.net and also partially Java. Further on I am a experienced Angular (2) developer (several years experience, from alpha 3 on). I like to focus on usability and ergonomic design.

Updated on September 01, 2020

Comments

  • Kevin Glier
    Kevin Glier over 3 years

    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?

  • koregan
    koregan about 13 years
    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.
  • Kevin Glier
    Kevin Glier about 13 years
    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.
  • Mr_Nizzle
    Mr_Nizzle about 13 years
    How do i generate my pair of keys? public and private?
  • Ludovic Landry
    Ludovic Landry about 13 years