Search code examples
iosxcodeprovisioning-profileios-provisioning

How to transfer Apple provisioning profiles from one user to another in an osx machine?


My osx machine has 2 users. User1 has Xcode installed with an Apple ID & I am able to command line build my app & launch it on an ios device. I want to command line build my app from User2 as well but if I do, it gives me the following error:

Code Sign error: No matching provisioning profiles found: No provisioning profiles matching an applicable signing identity were found.

I understand that User2 is missing the Apple provisioning profileswhich user1 has. My question is:

How do I transfer the provisioning profiles from user1 to user2 ?


Solution

  • In Xcode 8, because Apple is allowing iOS developer accounts to create multiple development certificates, you can simply change the project settings to automatic code signing and it should generate a new private key, certificate, and provisioning profile for User 2.

    On older versions of Xcode, or if you don't want to use automatic code signing, you will need to export the private key tied to the certificate from User 1 as a .p12 file and install it in User 2's keychain.

    To do this,

    • As User 1, open up the keychain access app.
    • Select the iOS development certificate and right click to export it.
    • Copy it to somewhere the User 2 account can get to it
    • Log in as User 2.
    • Go into Keychain Access as User 2, and import the .p12 file.

    Once you have done that, you can log into developer.apple.com and download the certificate and provisioning profile for the app and they will now work, because they have the private key required for the certificate used to sign the app.