Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode - account already has valid iOS Distribution Certificate

Tags:

xcode

ios

My developer team has recently added a new distribution certificate to our Apple Developer account. I downloaded it, and it is now on my Keychain. However, I get this message in Xcode:

You have a valid iOS Distribution certificate in the Member Center, but it is not installed locally. If your signing identity is installed on another Mac, you can export a developer profile on that Mac and import it on this Mac. You can also revoke your current certificate and request a new one.

When I go to Preferences > Accounts > View Details, I only see 1 certificate signing identity "iOS Development". How do I add the new Distribution certificate? I thought it was enough to just install it on my Keychain. When I try to drag the certificate from my Keychain to the signing identities in the View Details section, it doesn't work because I can't drag it in there.

I thought downloading the distribution certificate was enough to have it "installed locally" as Xcode said, but apparently it's not effective.

Any help or advice would be appreciated. Thanks.

like image 851
Rafi Avatar asked Jun 14 '15 02:06

Rafi


People also ask

How do I update my iOS distribution certificate?

Distribution Certificates Must Be Renewed Periodically To continue distribution, navigate to the Devices organizer in Xcode. Select the expired profile and click Renew Profile in the red bar at the top. This will renew your expired certificate and add it to the provisioning profile.

What happens if distribution certificate expires iOS?

If your certificate expires, passes that are already installed on users' devices will continue to function normally. However, you'll no longer be able to sign new passes or send updates to existing passes. If your certificate is revoked, your passes will no longer function properly.

How long is an iOS distribution certificate valid?

You are responsible for managing your team's certificates and provisioning profiles. Apple Developer Enterprise Program certificates expire after three years and provisioning profiles expire after one year.


2 Answers

Xcode / Preferences / Accounts - your apple id, is a member of the developer team? To the bottom right (of Accounts tab), under team name, it may default to "(your name) (Personal Team)", but there should also be another choice "(your team's name)". So if your team is named "The Awesome Team", then "The Awesome Team" should be selected under "Team Name", not your personal name.

UPDATE:
How to "select the team name" has varied from version to version of Xcode.
First step is to click on the team name.
Then click on a button below it. In one version, that button said "Show Details..". As I write this, the button says "Download all profiles".

Another alternative is to double-click the team name. This should pop up some dialog.

To verify that the desired team is still selected, you will have to quit Xcode, open it again, go to Preferences / Accounts again.

UPDATE #2:
In newer versions of Xcode, it seems that the real problem is "Automatically Manage Signing" isn't making the desired choice. Find that, and turn it off, then select the desired certificate. Sagar Mody's answer explains a bit more.


If still not working for you, but works for someone else, might be worth asking them for screenshots of what they see in (1) Member Center in browser - Certificates, Provisioning Profiles, (2) Xcode / Preferences / Account, (3) "View Details" for their account. Worst case, ask them to temporarily change their password, and try THEIR account on your computer, verify you can get everything working if you log in as them. If you can do that, then there is something not set up right for your account. Try to find a difference in Member Center, or in those Xcode screenshots.

like image 147
ToolmakerSteve Avatar answered Oct 03 '22 09:10

ToolmakerSteve


The answer above by @toolmakersteve is technically right.

To achieve that what I did was, disabled "Automatically Manage Signing" then in Signing (Debug) / (Release) select "Eligible" bundle identifier.

From https://develop.apple.com/accounts download the Distribution Profile of XC: (Eligible bundle identifier). Double click on it install into Keychain Access.

Ensure in Xcode under "Signing Certificate" it shows "iPhone Distribution: (Organisation Name)" and not "iPhone Developer: (Your / Developer Name"

Now build and archive and the export worked successfully for me. Hope this solves the issue for you too. This was really frustrating.

like image 40
Sagar Mody Avatar answered Oct 03 '22 11:10

Sagar Mody