Been pulling my hair all morning over this, we’ve got a client that has his own credentials for distribution. I downloaded the AppStore provisioning profile associated with the appID in his provisioning portal and also downloaded his distribution certificate from there.
Since I can’t sign until I have a valid cert/private key pair, I asked him to export his so that I can import it into my keychain. However, when I imported the resulting p12, instead of associating itself with the certificate, it went on and created a new self-signed root certificate and the private key associated itself with it.
Confused, I tried to export one of my own unused private key, delete it and imported it and it correctly went under the associated certificate (a push notification certificate). So I asked him if he exported the correct private key. He assures me he did, and even went on and exported both the certificate and the key for me.
The certificate he issued me is correctly the one I downloaded in his portal, but the p12 is still not associating itself with the certificate! I don’t know what I’m doing wrong… anyone have clue/lead on this?
Have them follow the instructions here:
http://developer.apple.com/library/ios/#recipes/xcode_help-devices_organizer/articles/export_signing_assets.html
The yourself, follow the instructions here:
http://developer.apple.com/library/ios/#recipes/xcode_help-devices_organizer/articles/import_signing_assets.html#//apple_ref/doc/uid/TP40010392-CH9-SW1
Now, that’s the theory anyways. When you do this there is an error in iOS when importing the file. I ran into this myself. Apparently it’s been broken since 2009. The solution is to import manually from the command line. You need both the .p12 and the .pem files previously exported from your client.
To export the .p12 (private key) and .pem (public key):
Then you need to manually import them into your keychain:
http://www.arlt.eu/blog/2009/12/01/importing-iphone-keys-p12-and-pem-into-snow-leopards-keychain/
After that is done, you will have all you need to sign the app using their distribution certificate (which you can download from developer center)