How to install a certificate in Xcode (preparing for app store submission)

117,964

Solution 1

Under

Provisioning -> Distribution -> Distribution Provisioning Profiles

I downloaded the desired certificate again and installed it. Now I don't see an empty file in Xcode. The build also works now (no code sign error).

What I also did: I downloaded the WWDR and installed it, but I don't know if that was the reason (because I think it's always the same)

Solution 2

In Xcode 5 this has been moved to:

Xcode>Preferences>Accounts>View Details button>

Solution 3

You can update your provisioning certificates in XCode at:

Organizer -> Devices -> LIBRARY -> Provisioning Profiles

There is a refresh button :) So if you have created the certificate manually in iTunes connect, then you need to press this button or download the certificate manually.

Solution 4

These instructions are for XCode 6.4 (since I couldn't find the update for the recent versions even this was a bit outdated)

a) Part on the developers' website:

Sign in into: https://developer.apple.com/

Member Center

Certificates, Identifiers & Profiles

Certificates>All

Click "+" to add, and then follow the instructions. You will need to open "Keychain Access.app", there under "Keychain Access" menu > "Certificate Assistant>", choose "Request a Certificate From a Certificate Authority" etc.

b) XCode part:

After all, you need to go to XCode, and open XCode>Preferences..., choose your Apple ID > View Details... > click that rounded arrow to update as well as "+" to check for iOS Distribution or iOS Developer Signing Identities.

Share:
117,964
testing
Author by

testing

Updated on November 24, 2020

Comments

  • testing
    testing over 3 years

    I wan't to select my distribution profile in Code Signing Identity in the build tab of targets. But all my certificates (developer, ad hoc, ...) are grayed out. So it seems that the new profile XXX.mobileprovision is not installed. The guidelines say

    Download the distribution profile and install it in the Xcode Organizer. Drag the .mobileprovision file to the Provisioning Profiles list under IPHONE DEVELOPMENT in the Organizer.

    But nothing happens. No green plus icon appears.

    If I double click the profile Xcode shows me an empty file ...

    Can someone help me out?

    Additional information:

    First I created an Ad-Hoc profile (with another bundle identifier), which works (now). The certificate owner and the user name on the Mac are not the same (but the private key was created under this username). In Xcode I can only see the old developer certificate (from the Ad-Hoc profile).

    I set the app to Release.

  • David T.
    David T. about 11 years
    doh! i kept trying to put it under the actual device. which is impossible
  • TheEhsanSarshar
    TheEhsanSarshar about 3 years
    where is Provisioning tab. I am using xcode 11.3
  • testing
    testing about 3 years
    @Ehsansarshar: As other answers has stated, this has been updated. Now you can either go into Member Center and download it there or you go your Xcode preferences.