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.
Related
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.
Currently we are in the process of building multiple apps for the same client and for the convenience we are using a common provision profile for all the apps. etc :- com.companyname.*
However each app has a unique bundle identifier. etc : - com.companyname.appname
Today I noticed that once we save the user name on the key chain on a one app , it appears on the another app as well. So I think this common provision is the culprit here and is there any way that we can overcome this without using different provisions ?
For development you should also use a certificate (.cer) from Apple Developer Program. You create the certificate by sending your private key to Apple. After this procedure install .cer. For using key on several machines you need to create a .p12.
Once you have downloaded the Apple iPhone certificate from Apple, export it to the P12 certificate format. To do this on Mac OS:
Open the Keychain Access application (in the Applications/Utilities
folder).
If you have not already added the certificate to Keychain, select
File > Import. Then navigate to the certificate file (the .cer file)
you obtained from Apple.
Select the Keys category in Keychain Access.
Select the private key associated with your iPhone Development
Certificate. The private key is identified by the iPhone Developer: First Name
Last Name public certificate that is paired with it.
Select File -> Export Items.
Save your key in the Personal Information Exchange (.p12) file
format.
You will be prompted to create a password that is used when you
attempt to import this key on another computer.
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