I’m using the latest XCode (6.1) and I need to submit the app as soon as possible, but I can’t seem to get around the “Your account already has a valid iOS distribution certificate” error.
I have the client’s provisioning profile and I have his distribution certificate (which is valid) and his private key (I’ve checked using Keychain, it’s definitely there). The bundle ID is also correct. I’ve deleted my provisioning profiles and certificates and reinstalled the client’s many times now.
What could be causing this issue? I’ve seen a lot of topics here on SO with this problem, so I apologise beforehand for creating yet another clone, but I really don’t know how to fix this.
edit: I’m running a brand new install of Yosemite by the way
Got it solved by editing the iOS Distribution Provision Profile in the Developer Member Center.
For some reason there were 2 certificates to choose from for the Distribution Provisioning Profile. I switched over to the other certificate and I could Validate and Submit my Archive build for beta testing.
So, you may have more than one certificate for signing your Provision profiles. Make sure you have the right one (by trying all of them) and hopefully that should work.
I tried many things like Exporting Developer profile from Xcode Accounts and importing it in the organizer, installing the provision profiles from the member center, adding them to my keychain. But none of those worked. It started working only after editing the appropriate Provisioning Profile manually.
You could also trying removing all your available Provisioning Profiles and let Xcode create new ones for you. This will work too.
I also had this issue, which turned out to be caused by an attempt to export for ad hoc deployment using a development provisioning profile instead of a distribution profile. It seems this is no longer supported in Xcode 6.1. Once I created an ad hoc profile and installed that the problem went away. A more useful error message would have saved me hours of work and would be greatly appreciated, Apple.
This thread was helpful:
Besides all the other answers, there’s one more possibility after 2/15/2016: the old World Wide certificate expired and I guess everyone has already downloaded the new cert (or check this out). However, you’ll be seeing this error if you haven’t remove the expired one. You may need to choose
View -> Show Expired Certificates to unhide expired certs. If the error is still there, try regenerate provisioning profile as advised by the others.
I was moving to new Mac when I faced this issue.
On your older Mac:
Preferences > Accounts > Select Account > Details.
- In the dropdown right click on
iOS Distribution(or whatever is the name of your distribution certificate).
- Set a password for the
- Move and install this
.p12in the new mac.
Another possible cause for the problem (at least in my case) was that in my Keychain Access, I had two certificates for the team I was working with. One was expired, and the other one was the one I wanted to use. Deleting the expired certificate in Keychain Access solved the issue.
I ran into this problem, and I wanted to avoid screwing up my push notifications.
The easy fix for me was to just go to developer.apple.com > project > certifications, ids, and profiles > profiles > create a new profile (for development or distribution)
Download the created profile, drag and drop the profile over the Xcode icon, and then in your project target, set the new profile as the provisioning profile.
This fixed my problem–it may provide further help in the future.
The error message could mean that you need to get the Distribution certificate and private key from the developer who created them.
This can happen if some other team member has pressed the enticing “Reset” button (which means revoke certificate and create a new one).
Here is a picture what the revoked certificate looks like:
You can export the valid certificate from the developer who created
it and import it to other team members keychains.
- Go to “Keychain Access” app.
- Click on the “Login” in the top left box
- Click on the “Certificates” on the bottom left box
- Check which team member has the valid certificate:
- when clicking on the “iPhone Distribution” certificate
- everyone else sees “This certificate is revoked” in red at the top.
- (Maybe backup the deleted certificate to avoid doing anything irreversible)
- delete the revoked certificates
- Export the one valid certificate and distribute to team
- Import the certificate file for everyone else
Today I was solve problem by delete from keychain old certificate Apple Worldwide Developer Relations Certification Authority and install new one (exp. in 2023)
I’ll add to here because while the accepted answer got me on the right track it wasn’t the solution. There was a second (automatically created by Xcode) distro cert which I revoked. After doing that a new error came up. (“An App ID with Identifier ” is not available”… it also wasn’t helpful) Eventually this lead me to the fact that my App Id in the member portal didn’t have entitlements matching the build.
I solved this issue by editing the provisioning profile in the member center which is used in my app and re-install the provisioning profile.
I recently changed computer.
The reason for me was that I had several developer certificates in the Apple Developer member portal.
The solution was :
- Go to Apple Developer Portal
- Go Under Certificates -> Production
- Click on “Revoke” for the oldest certificates and keep the most recent one
Revoking certificates won´t affect your Apple Store apps :).
I had this happen to me when I accidentally reset the certificate on another mac. Here’s my scenario.
Mac1 – Had working certificate.
Mac2 – I accidentally reset the iOS distribution certificate
Mac1 stopped working and I get the message “Your account already has a valid distribution certificate”
The fix was
On Mac2, Keychain access -> certificates -> iOS Distribution certificate (for you/your company) -> export to p12 file (it will ask you to set a password)
Copy the exported file to Mac1
On Mac1, Keychain access -> certificates -> iOS Distribution certificate (for you/your company) -> delete (this is the old one that does not work)
On Mac1, double click the p12 file (then enter your password).
You should see a new iOS distribution certificate (for you/your company) in the certificate section of Keychain access.
This fixed the issue for me on Mac1.
Got it solved by deleting the provisioning profile which is managed by Xcode
(XC iOS Ad Hoc: *) from the member center