Xcode 6 beta 2 issue exporting .ipa: "Your account already has a valid iOS distribution certificate"

3254523 picture 3254523 · Jun 26, 2014 · Viewed 90.7k times · Source

I'm having trouble exporting an app for Ad Hoc Distribution on Xcode 6 beta 2:

Failed to locate or generate matching signing assets

When exporting my project for ad hoc development on Xcode 6, I receive this alert. I've tried exporting it on Xcode 5 and had no problems at all saving the .ipa. Is anyone experiencing this problem as well?

Answer

Alexander Vasenin picture Alexander Vasenin · Sep 26, 2014

I've had the same issue two days ago. Turns out the problem was:

  1. I have my own developer distribution certificate with a proper private key
  2. I have enterprise developer distribution certificate of my client without a private key
  3. I try to make an enterprise distribution package for my client
  4. Xcode throws at me vague error: Your account already has a valid iOS distribution certificate

The solution is: get a private key for enterprise account of my client. There are 2 possible options:

  1. Ask you client for credentials to access his enterprise developer account on Apple website. Revoke old certificate and recreate it. You'll create the private key in the process. BEWARE: revoking an enterprise distribution certificate invalidates all apps that were signed and deployed with that certificate (official info).
  2. Ask your client to export his private key from his Keychain Access application as a *.p12 file and send it to you with a password. You can't download the existing private key from the Apple website. The only way to get it is to ask your client. I did it and it and I was able to finally make the package.

How to find out if you have a private key for a certificate: Open Keychain Access application. Choose certificates. Find your certificate. If you see small grey triangle on the left side of the certificate, open it and you see your private key. No triangle = no private key.

How to find if you have a private key for certificate