Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 376
aaronsnoswell Avatar asked Nov 04 '13 04:11

aaronsnoswell


2 Answers

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.

like image 95
Jasper Blues Avatar answered Oct 22 '22 00:10

Jasper Blues


I managed to resolve this issue by creating a completely new provisioning profile in the iTunes Connect Provisioning Portal, then signing the code with that profile.

like image 41
aaronsnoswell Avatar answered Oct 21 '22 22:10

aaronsnoswell