Distribution certificate / private key not installed

Michel picture Michel · Nov 13, 2017 · Viewed 86.8k times · Source

Using Xcode 9.1, after building an iOS app, I want to archive it and upload it to the appStore for beta-testing. But I get the following issue after clicking the button Upload to the App Store... and choosing Automatically manage signing:

"My Name" has one iOS Distribution certificate but its private key is not installed. Contact the creator of this certificate to get a copy of the private key.

I do not know why this "private key is not installed", but the Distribution certificate may have been created on a different computer or something. In any case:

What is the simplest way to retrieve the missing private key and install it? In order to make things work.

Answer

Tanjima Kothiya picture Tanjima Kothiya · Apr 29, 2018

Up to date (Jully 2020) (xcode 10 - 12)

  1. go to Xcode - Preferences - Accounts - Manage Certificates
  2. Click on the + at the bottom left, then Apple development
  3. Wait a little, then click Done

That's all. You may want to revoke the old certificat on developer.apple.com too.

Old answer

Step 1:- xcode -> product -> archives -> Click manage certificate enter image description here

Step 2 :- add ios distribution enter image description here