30

I have some problems with my developer certificate and profile. I have certificate of developer program on my office Mac. I want to develop and test the app on my device at home, so I have added my device and generated provision profile from office Mac. Download and install *.cer and provision on my home Mac, but I saw the error:

The identity 'iPhone Developer' doesn't match any valid, non-expired certificate/private key pair in your keychains

How to transfer keys from office Mac to my home Mac?

Nirav Bhatt
  • 6,940
  • 5
  • 45
  • 89
Max
  • 817
  • 1
  • 10
  • 29

3 Answers3

41
  • Open your keychain program at workplace.
  • Select My certificates section. Select entries listed as iOS Developer certificate, iOS Distribution Certificate etc. For the sake of simplicity select everything that you find related to your membership.
  • Select Export.
  • It will ask you enter choice of password. Enter it.
  • It will export p12 file. Transfer this file to your home mac.
  • At home mac, import this p12 file into your Keychain Program.
  • Start XCode and try to build again using the provisioning profile.
  • If the above does not work, try the entire thing with Keys section of your Keychain program.
Nirav Bhatt
  • 6,940
  • 5
  • 45
  • 89
  • 10
    Disclaimer: Don't blame anyone here if you do this and your boss gets angry that you took a piece of company "property" home with you (OP and whoever else reads this question as well). A private key should be guarded well. – borrrden Jul 29 '13 at 06:32
  • @borrrden , he allowed :) – Max Jul 29 '13 at 06:39
  • Fantastic answer, you just saved me a ton of time redoing all of this non-sense, thank you very much!! – kformeck Feb 13 '17 at 15:07
  • It's Awosome Answer But I am faced one more issue here, After Importing Certificate it's again says as Import Developer Profile. When I am Click That But It's Can't Work any One Help me. – Abdulla Sirajudeen Aug 01 '17 at 07:05
29

I think you need to export your office machine's developer profile, and then import it on your home machine. In xCode 4.x this was done from the Team in Organizer, and in xCode 5+ it is under accounts:

Your account is shown under XcodePreferencesAccounts, and can be exported by clicking the gear icon () in the lower-left.

Exporting Your Developer Profile

Jason
  • 2,223
  • 2
  • 20
  • 28
  • 4
    I think this is the superior response. It more directly addresses the problem and is less error-prone. At least in my experience, the accepted answer (fiddling with Keychain Access) didn't work. – T'Pol Jun 22 '16 at 16:20
  • it did not work for me , it is showing error on another MAC like there is an error while importing the profile file . do you know what is happening there or do i have to follow another way ? – Moxarth Nov 15 '17 at 05:26
1

I used to get into similar issues I like to call CERT-Hell. I assume you have permissions to actually do what you are attempting. The best thing I have ever done was the use the built in processing within Xcode in the Organizer under Window. You never have to worry about actually importing certs, etc.

enter image description here

You will have to fanagle with it a little since I dont know what you have done already but the jist of it is that you can let XCode manage all your certificates for provisioning. Hope this helps you. enter image description here

logixologist
  • 3,694
  • 4
  • 28
  • 46