Categories
ios iphone Mac OS X

Xcode: “No match for certificate/private key” error and resolution

An app we were building for the iPad was recently approved by the client. Being a more capable organization, the client wanted us to build the app for them using their Apple developer and app store credentials for submission. To do that they sent us the three necessary files:

  • Public Key (Distribution)
  • Private Key (Distribution)
  • Mobile Provisioning Profile (Distribution > AppStore)

I also modified the app's bundle identifier to reflect the identifier specified by the client.

I merrily added the keys and certificate to the OS X key chain. Yet Xcode was unable to build using these updated credentials. The error that was reported was:
"Profile does not match any valid certificate/private key pair in the default keychain"

After digging around I pinged my friend Glenn Martin from Intrepid Development to see if he knew what was wrong. Glenn actually knew what went wrong: apparently OS X 10.6.8 imports keys to the System key chain instead of the Login key chain. Xcode only looks at the Login key chain. All the was necessary to fix the issue was to drag and drop the key in the Keychain Access application from the System key chain to the Login one. Mindless fix to a truly frustrating problem.

Hope it helps you.

Share
Share