Assuming that you’ve just installed a fresh Snow Leopard on your Mac. If you want to use again your iPhone for developing you have to import your personal iPhone public and private development key into the keychain. (Given that you’ve hopefully created a backup of your keys before reinstalling
). Unfortunately it’s currently impossible to import these certificates via a double-click or a drag & drop action etc. The keychain always prints the following annoying error message:
An error has occurred. Unable to import an item. The contents of an item cannot be retrieved.
But don’t worry! There is a simple workaround available. Just start the Terminal.app and use the following commands to manually import both keys. Please replace priv_key.p12 and pub_key.pem with your personal key files. That’s it!
1 2 | security import priv_key.p12 -k ~/Library/Keychains/login.keychain security import pub_key.pem -k ~/Library/Keychains/login.keychain |







Had the same problem, thank for the trick Stephan!
Also it seem that some project preferences did not copy correctly. So, after importing the keys, I had to check the menu “Edit Project Setting” -> “Build” tab -> “Code Signing identity”. Also my info.plist file had to be reviewed, some variables are managed by Xcode so I had to reset it in order use the same application profile.
If this can help others…
I had the same problem. I attempting to bring some work home. At work we use 10.5, at home I have 10.6.
I did as you suggest, but still get the error.(Not the warning, though)
In “Organizer/iPhone Development/Provisioning Profiles”, the yellow tab says “A valid signing identity matching this profile could not be found in your keychain.”
In Keychain Access, the Certificate appears under “Certificates” and the Key appears under “Keys”, but they don’t seem to be linked together: None of them show disclosure triangles.
(I have another Certificate/Key for MobileMe and these DO show each other on disclosure).
Also, I only exported the private key (.p12 file), NOT the public key (.PEM file), Is this wrong? Now it’s weekend and I’m at home, I am stuck to iPhone Simulator until monday…
WHY DOES IT HAVE TO BE SOOOOO COMPLICATED?
What did I do against Apple? (laughs, anyone?)
Figuring out -viewDidUnload and -didReceiveMemoryWarning was a lot easier…
Hi Nicolas,
Yep, that’s most likely the crux of the matter. You must import your private (P12) und public key (PEM) ’cause both keys form the so-called “valid signing identity”.
That’s right! In many cases developing for other (mobile) platforms is not that tricky.
– Stephan