I downloaded the Distribution provision certificate, the ios_distribution certificate and the aps_production.cer for push notifications. I installed them all in the key chain. The primary Distribution certificate does not have a private key with it. My development certificate does and has worked fine. It's similar to the linked issue but I've done those steps.
Stackoverflow link
You're missing the .p12 file which correspond to the private key associated to your certificate when you first created it in the keychain app.
You probably are working on a different Mac that the one used to generate the public/private keys. You just have to export it and then import it on the new Mac.
Related
I've created a Certificate Signing Request (CSR) file using KeyChain on an iMac and MacBook. I have successfully uploaded the CSR file to Apple for generating a Pass Type ID certificate. I can download and install the certificate to the machine the CSR file was generated from.
The problem now is I cannot export the certificate AND the private key because there is no private key associated with the certificate! Very strange considering the CSR file came from this machine.
I have followed the Apple guide and they make no mention to this potentially being a problem so there's no troubleshooting help there.
I do not know what's going wrong here so please shed light on this if you can. Thanks.
Solved
The Common Name had to match the name used in the id.
I'm trying to make an app store build for a project that I recently inherited. After downloading and importing the distribution certificate, Xcode (naturally, since I don't have the private key) fails with "...doesn't match any valid, non-expired certificate/private...". I suppose I can create a new distribution cert but I prefer to use the existing one. Will it be sufficient to obtain and import the private key into my keychain?
Short answer: Yes. Export it from the other machine and import it back to your keychain.
I am trying transfer my developer certificate under the keychain to someone. I exported the item. And also send him the provisioning profile which includes his device ID.
He installed my certificate to his keychain and also the provisioning profile to his xcode.
However, The provisioning profile under his xcode complains of there's no Valid signing Identity. Well I already sent him the certificate.
What's wrong?
You have to export the matching private key with the Developer Certificate, you can select both the private key and Certificate and export at the same time.
Does he have multiple certificates with the same name in his keychain? In which case he may have to delete the one that is not applicable for this profile when he is trying to build the app (he can reinstall the deleted certificate later). Also, ask him to delete and reinstall the profile. Is there any more information he is getting with the error?
Along with the development & distribution certificates that you provided, you also need to export your private key as a *.p12 file. When he is importing this elements into the Keychain application ensure he selects the "login" keychain.
I have one big problem. I am having iphone developer account and now i have given all the controls to my developer so he has created certificate in account and install it. But he didn't know that if we want to use this information on multi system then we need to keep .p12 certificates and we have to install this certificates on another machine.
We don't have this .p12 certificate and we want to use another machine so what should i do for this things?. How can i delete current certificate from account and create another CSR and certificates for all machine?.
If anyone knows then please drops some line.
Thanks,
iPhone Dev.
If you still have the machine he created the Certificate Signing Requests (CSR) on, then you can export the private key from Keychain Access. Just find the key and export it.
If the private key is no longer available then you need to revoke the existing certificate and create a new one again. There are plenty of questions on Stackoverflow about this, e.g.
Lost Private Key For iPhone Distribution Certificate. What could be solutions?
I've been able to generate and use my development cert & provision for some time. I did have some problems after upgrading xcode, in that the login certs where getting trashed/removed, but I fixed that.
I'm trying to create my distribution cert & provision. I've noticed that the distribution cert doesn't have a private key - you can't expand the cert when clicking on it. Not sure if that's an issue or not. When I drag the distribution profile into Organizer, it comes up with the error message, "A valid signing identity matching this profile could not be found in your keychain".
I've tried putting the distribution cert in both login and system. I also DO have the WWDRCA cert installed.
Any ideas - A real pain ...
It sounds like you do not have the keys corresponding to the certificates in your keychain. If you posted screenshots of your keychain entries and your code signing configuration, it would be easier to see exactly what is going on.
Also make sure you have the Apple certificate in your keychain.
Check if you have still got your private key on login keychain. That's what happens to me. I encountered this same problem when I copied my project from iMac to Macbook Pro. I found out I didn't have my private key installed on the Macbook. So I exported my private key, copied and installed it to the Macbook, and it fixed it!
I've documented the information here: http://www.creatistblog.com/2009/09/iphone-developer-provisioning.html