Ios – Xcode – account already has valid iOS Distribution Certificate

iosxcode

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.

Best Answer

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.