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

*爱你&永不变心* 提交于 2019-12-09 16:37:57

问题


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.


回答1:


In Xcode 5 this has been moved to:

Xcode>Preferences>Accounts>View Details button>




回答2:


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.




回答3:


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)




回答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.



来源:https://stackoverflow.com/questions/4156128/how-to-install-a-certificate-in-xcode-preparing-for-app-store-submission

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!