views:

263

answers:

1

I'm seeing the dreaded "Code Sign error: The identity 'iPhone Developer' doesn't match any valid certificate/private key pair in the default keychain" error.

Strange, as it used to work. Not sure what changed.

A few of the symptoms I've noticed beyond this:

  • In the project info, for Code Signing Identity, instead of saying "iPhone Developer: My Name Here", it only says "iPhone Developer", followed by a list of grayed out Provisioning Profiles with the error message "profile doesn't match any valid certificate/private key pair in the keychain."
  • In the organizer, if I click the "Developer Profile" sidebar entry, it shows one entry in the "Identities" pane, "iPhone Distribution: My Name Here". However, no profiles show in the Provisioning Profiles pane.
  • In the organizer, if I click the "Provisioning Profiles" sidebar entry, for each of the profiles there it reports "A valid signing identity matching this profile could not be found in your keychain."


I've tried a handful of the usual folk cures for this ailment, without success so far, such as:

  • Cleared my old keypairs and expired developer identity cert out of the keychain.
  • Deleted my old developer profile, created a new one, and regenerated the provisioning profile after.
  • Reconfirmed: The App ID on the provisioning portal for this app is a pure wildcard ID. (The "Bundle Identifier" in the info.plist is just the appname, no reversed domain prefix.)
  • Restored my iPhone.
  • Overstalled the latest version of Xcode.
A: 

And mysteriously, it clears up.

Here's the last thing I did:

  • Removed all old downloaded copies of my developer identity from the downloads folder.
  • Removed the developer identity from the keychain.
  • Removed (minused away) all old provisioning profiles from the phone in XCode's organizer. (If you just do it on the phone, Organizer puts them back the next time you plug if.) This step was performed with the development iPhone plugged in, so the removal was immediate.
  • Meticulously followed the instructions step by step to create & download a new developer identity.
  • Confirmed in the provisioning portal that all my provisioning profiles were marked as invalid.
  • Clicked "modify" on one wildcard provisioning profile.
  • Re-checked the box for my developer identity and clicked through.
  • Reloaded the page to see the Provisioning Profile ready for download. Downloaded it.
  • Relaunched the organizer window.

At this point, the Developer Profile heading for the Organizer window showed ALL the old (removed) provisioning profiles with my Developer Identity, when I clicked that heading.

  • Dragged the modified and redownloaded provisioning profile to the Organizer.

And now the app runs on my phone.

Frustrating, as I feel I'd done all this, but some detail must have been missed along the way.

baudot