Trying to submit my app to TestFlight. I am getting stuck with a missing private key error. What's weird is that the private key does exist. I can see it in KeyChain. I've only ever used one Mac for development, so it's not like I need to get it from another machine.

I tried revoking the cert and deleting all the Apple Distribution certs/keys from my Keychain. Then I went through the Distribute App process again. Xcode offered to generate a distribution cert for me. I did that. Does it appear to have created two of them? One looks normal, but the second one is grayed out and says "Not in keychain".

The "missing private key" error says I have one Apple Distribution certificate but its private key is not installed. Contact the creator of this certificate to get a copy of the private key.

I've looked at a bunch of discussion posts and StackOverflow posts about this, but nothing seems to apply to my specific issue. At least, I tried all those techniques and nothing seems to work.

This is the image of Xcode signing certificates Xcode signing certificates:

certificate

App distribution while uploading on App Store:

store

1

There are 1 answers

0
Phil On

I had the same problem and after a frustrating afternoon I got round it using manual signing as per a post I found over on the apple forums. When manually signing I chose to use the existing iOS dist cert instead. Not tried with the apple dist cert that auto signing was trying to use.

iOS Distribution: Missing Private Key

Mine too is an app that's only ever been distributed from this Mac. The first hint of trouble was a message saying there was no distribution certificate so I accepted when Xcode offered to create one. After that it was just as you showed in your screenshots .. one greyed out, one looks ok. Private key is listed in Keychain Access but still get the message in Xcode when trying an ad-hoc build on Mojave, Xcode 11.3.1.