matthewpalmer
matthewpalmer

Reputation: 2649

"The private key for ... is not installed on this Mac" – distribution and provisioning profiles in Xcode

I've tried looking at the other answers for this but there's a lot of incomplete or conflicting information, but if you have a good link that would be great.

When I try to distribute my app I get this error:

1

I've tried creating a new distribution profile from Certificates, Identifiers & Profiles at developer.apple.com, but none of these seem to work.

I have a Time Machine backup from before I did a clean install of Mavericks to upgrade, and I also have a code saved to a text file in my Dropbox (I'm not sure if it's a private key – I doubt it) which looks like 'df9a79...' around thirty characters long.

I just can't seem to find the right link to guide me through the entire process of key creation, iTunes connect and developer.apple.com. I've done this before – I'm currently just trying to submit an update to the App Store.

My app update status is currently Waiting For Upload.

Here is my Keychain:

2

3

4

I've tried removing duplicates (e.g. those in the first screenshot), but that didn't seem to help. If you have any suggestions or links I'd love to hear them.

Thanks for your help.

Upvotes: 5

Views: 19262

Answers (5)

fionaom
fionaom

Reputation: 11

Another resolution to this is restart Xcode. I had the same issue after creating a new provisioning profile, and after restarting Xcode I no longer had the issue.

Upvotes: 1

Ben Golding
Ben Golding

Reputation: 776

I had this problem and eventually realised that I'd originally installed my provisioning certificate on another machine. The private key was only on that machine, and there was only a public key on my new machine. I needed to install my private key on my new machine so I could sign my app and submit it.

On my original machine, I went to Xcode>Preferences>Accounts and used "Export accounts" (under the cog) to save a copy of my accounts. I transferred the generated .developerprofile to my other machine and dropped it on Xcode there. That installed the private key for the provisioning profile on that machine and I was able to submit my app.

Upvotes: 1

Graham Dawson
Graham Dawson

Reputation: 539

After experiencing this error, I tried submitting to the app store via Application Loader, signing the app with my AdHoc certificate instead of the app store certificate, as that one didn't generate the same error.

The submission was accepted by Apple with no validation errors.

This is a temporary workaround, but it may be helpful if you need a quick submission.

Upvotes: 0

spaleja
spaleja

Reputation: 1435

In your keychain, there are two keys named 'Matthew Palmer'. Those two entries for the same name can be conflicting. Try by removing those both and install it again.

Upvotes: 11

Parvendra Singh
Parvendra Singh

Reputation: 985

I hope you make a Distribution Provising Certificate at developer.apple.com.

Chose that profile there , if you are not, create that, first you need to create that certificate before proceeding.

Upvotes: 2

Related Questions