Xcode "The private key for is not installed on this mac - distributing"

IosXcodeApp Store

Ios Problem Overview


I always get this message when I try to submit my app to the app store.

Here is a picture of the message:

picture

It would be great if someone could help me resolve that problem so I can submit my app to the store.

Ios Solutions


Solution 1 - Ios

Try following these steps:

  1. Revoke your existing iOS Distribution Certificate from the iOS developer website.
  2. Generate a new iOS Distribution Certificate by going to XCode Preferences->Accounts->View Details and then clicking the + underneath the list of signing identities.
  3. Go back to the developer website and make sure all your provisioning profiles are configured with the new certificate. (They should all be listed as Active when you are done.)
  4. Go back to XCode and refresh your list of provisioning profiles.

I had the same issue as you did and this resolved it just fine.

Solution 2 - Ios

This solved it for me without starting all the way from scratch:

  1. Open Keychain Access on the machine that was used to generate the private keys
  2. Select Keychains->Login and Category->Certificates on the left hand side
  3. Locate the two certificates iPhone Developer: [your developer name] and iPhone Distribution: [your developer name]
  4. Select both, right click and choose Export 2 items...
  5. Enter a password of choice, save to disk and get the .p12-file over to the other machine that won't sign
  6. Open the file, enter the password and you should be good to go.

Solution 3 - Ios

Having a similar problem, after several days of testing, checking, try to repairing and so on, what worked for me was simply:

  1. Open Xcode's preferences (Accounts panel)
  2. Click on "Manage Certificates".
  3. Add a new certificate.

Then everything started working again.

enter image description here

Solution 4 - Ios

I also experienced this and fought the process for 4 hours. finally i did the following

  1. Deleted all the Private and public keys and certifications in my Keychain Access
  2. Deleted all Provisioning profiles
  3. Deleted all AppID's - (Probably didn;t need to do this by I wanted a clean slate)
  4. Deleted my certifications on the Developer.Apple site
  5. Created new Wildcard Development Profile
  6. Created new Profile SPECIFIC to the App that I was deploying (So it had the appname instead of *, in the AppID)
  7. Created a new development Certificate from the Website.
  8. Downloaded the intermediate certificate (Worldwide Developer Relations Certificate Authority) since I wiped that off my Keychain too
  9. Created the Certification Signing Request (CSR), followed the instructions to the letter to add it to my keychain access. and Uploaded the CSR.
  10. Once the Certification was added, I made sure to rename the public and Private Keys, and added comments to the info box - so I could remember what I did.
  11. Created a new Distribution Cert by repeating Steps 7,9, 10 for the Distribution so I could get it onto the App Store.

Hopefiully this helps someone to know that you can wipe everything out and start over. I loaded all the certs on an olf Macbook Pro that started flaking out last week. So I got a new Mac Air last week, but Icouldn;t remember what keys, and I certainly didn't remember I had 2 sets of Private and Public one for the Development, and 1 for the Distribution. (If you have more that 1 distribution, I believe you would have additional sets.)

Steve

Solution 5 - Ios

It is worth checking in Keychain Access to make sure you don't have multiple keys with the same name. Also, very often when I have run into Code Signing issues, the fastes solution has been to start the process over (create new keypairs, certs and provisioning profiles).

Best of luck!

Solution 6 - Ios

Ran into the same issue and after cursing at Apple , I realized it was my fault.

1.- Go to developer.apple.com / Certificates / Production
2.- Download your certificate

This worked for me thank after trying other answers.

Solution 7 - Ios

Go to Preferences -> Accounts -> Select the Apple ID you're using -> click "View Details…" button -> then click the plus button and select the "iOS Distribution" button. More details here.

Solution 8 - Ios

It seems that you have got as far as generating a distribution certificate, so you must have generated a key pair at some point. Do you develop on multiple machines? Export the developer profile from the machine that has it and import it into this machine.

Solution 9 - Ios

It's simple, login to the user's account (maybe on different mac) which was used to create the distribution certificate. Open Keychain Access and export their private key. Then install it to your Keychain.

Solution 10 - Ios

My problem was Xcode was not on the Access control list for the private key. You can fix this in the keychain access without generating a new key pair.

Open keychain access. On the left side select login and My Certificates. Select your distribution certificate and double click your private key. Select access control and add Xcode to the list if its not there.

Restart Xcode and make a new archive. It should find the private key now.

Solution 11 - Ios

I actually just closed and reopened xCode and then everything was back to normal.

Solution 12 - Ios

I have another answer (in addition to my prior post). Today, my private key expired (as I found looking at KeyChain Access), and a new one was in the list. How? Idk... Maybe from using the XCode "fix the problem" button I was presented, or by pulling an update for provisioning profiles as I described in my other post a new one was created automatically?...

Anyway, I logged in the development center, found the provisioning profile I wanted to use and clicked "edit". I was then able to select "Certificates". I found that the one wanted was not selected. I selected it and clicked "generate" to recreate the provisioning profile. Then I was able to download it. I dragged and dropped the file onto my XCode dock icon. That fixed it!

Solution 13 - Ios

I've got the solution:

Your company has a Company (Enterprise Distribution).pem and CompanyEnterpriseDistribution.p12 you have to install them as well.

Solution 14 - Ios

I have a company account in apple. I solved the problem by:

1)in the developer website Certificates, Identifiers & Profiles
2)under Provisioning Profiles -> development
3)went to my development Provisioning -> edit
4)then download , and double click.

Solution 15 - Ios

Try this..

  • In Your "System preferences" select "Security and Privacy".

  • Click on 'Lock' icon on bottom left corner.

  • Change 'Allow apps downloaded from' from "Anywhere" to "Mac App store and identified developers".

-Then try to build.

Solution 16 - Ios

For those who are trying to update an app after some time, you need to renew your Porvisioning Profile in Apple Development Center, and then simply go to Certificates on the left hand side on your Apple Development Center, download the distribution certificate, and open it.

Xcode will do the rest and let you run the app.

Cheers!

Solution 17 - Ios

For me it is that i have not installed my production certificate. (I have already installed development certificate which)

After downloading the production certificate and installed to key chain it worked for me.

Solution 18 - Ios

This solved it for me without starting all the way from scratch:

  1. reGenerate file "CertificateSigningRequest.certSigningRequest" by other macbook.
  2. reGenerate Certificates "******* Grid Information Technology Co.,Ltd"
  3. reGenerate Provisioning Profiles

Solution 19 - Ios

I am building and distributing development ipa's for my beta iOS app. I have repeatedly had to add new devices to list of those allowed, and have had many woes created by this. This time I'm documenting and sharing such a problem and the solution...

I added a new udid to my list in the developer center, built an archive and found the ipa was not found in the profile embedded in the ipa. So, I refreshed my provisioning profiles in XCode (to get an updated list) and this error was caused with the private key missing (as depicted in the start of this thread).

I then couldn't build another archive. Further, this created code signing errors when attempting to build the project.

After much pain I fixed it like this:

In XCode, go to Preferences...Account Tab. Click the add button (middle left) and select "iOS Development". This will create a new signing identity.

You should now be able to use the new provisioning profile to create the archive.

Also, the build errors should be fixed. Back in the project, "General" tab, select the "team" and retry the build. There may be some additional permissions dialogs. Click "fix" or "always allow" when prompted.

Note: The Member Center and Key Chain list will become a mess, with duplicates for signing ids, but at least everything works. You may want to try cleaning it up...

Solution 20 - Ios

I created a new Distribution certificate, then edited my existing provisioning profile to point to that new certificate, then in Xcode > preferences > account > view details I updated my signing certificates.

worked like a charm

Solution 21 - Ios

this will happen because you have format your mac and reinstall it or you are developing from new mac .

if you can not do the above and have your old certicate and profiles exported from the old mac

you will need to remove the wild card provissioning profiles from apple developer center , and also from certifcates you have to remove the old ones just the general development and production certificates .

then you will have to create new ones and to create new provisioning profiles for the app you need to upload to apple .

you do not need to delete all the provisiong profiles for now , but for sure you will need to create new ones for apps that you do not create for it .

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionFabian BoulegueView Question on Stackoverflow
Solution 1 - IosBen VisnessView Answer on Stackoverflow
Solution 2 - IosKent RobinView Answer on Stackoverflow
Solution 3 - IosCueView Answer on Stackoverflow
Solution 4 - IosSESPROULView Answer on Stackoverflow
Solution 5 - IosFluffheadView Answer on Stackoverflow
Solution 6 - IosAlex NolascoView Answer on Stackoverflow
Solution 7 - IosThomasWView Answer on Stackoverflow
Solution 8 - IosJimView Answer on Stackoverflow
Solution 9 - IosAtul ManwarView Answer on Stackoverflow
Solution 10 - IoszpragView Answer on Stackoverflow
Solution 11 - IosSer PounceView Answer on Stackoverflow
Solution 12 - IosBuvinJView Answer on Stackoverflow
Solution 13 - IosSamView Answer on Stackoverflow
Solution 14 - IosTtheTankView Answer on Stackoverflow
Solution 15 - IoshmdeepView Answer on Stackoverflow
Solution 16 - IosV1 TechnologiesView Answer on Stackoverflow
Solution 17 - IosSahan MaldeniyaView Answer on Stackoverflow
Solution 18 - IostinklView Answer on Stackoverflow
Solution 19 - IosBuvinJView Answer on Stackoverflow
Solution 20 - IosajbrausView Answer on Stackoverflow
Solution 21 - IosalbaitiView Answer on Stackoverflow