Search code examples
iosiphonexcodeprovisioning-profile

XCode: The private key for "<foo> (from '<bar>')" is not installed on this Mac


I have previously developed and released an iOS App with 'Company A'. Company A has just recently transferred ownership of the Application to 'Company B' (as per the instructions at the bottom of this iOS developer document). This worked fine and the App now shows up in iTunes Connect under Company B's account.

I am now attempting to release an update for the App and having problems with XCode. I have removed all previous accounts from XCode, added the Company B account, build the new App and archived it, but when I try to 'Validate' or 'Distribute' from the XCode organiser, I get the error

The private key for "Company A (from 'Company B')" is not installed on this Mac.

XCode Code Signing Error Screenshot

I have tried removing all iPhone Developer and iPhone distribution certificates from my Keychain, then revoking the Company B developer and distribution certificates, then re-creating them and installing them in my Keychain, but the error is the same.

What do I need to do to correct this error?


Solution

  • One way to solve this problem, as you've indicated, is to make a new provisioning profile from a newly generated public/private key pair.

    Another way to solve this problem is to export the settings (ie private key) from a previous installation of Xcode (if you still have them) and port them to the new installation. In 'Organizer' choose 'Export Settings'.

    The latter option is useful in a multi-member team scenario where you'd like to avoid disrupting other team members.