Exporting code signing files
How to code sign iOS apps
Exporting code signing files
You may want to export your certificates and profiles to use them locally on another computer or to use them for code signing your builds running on CI servers.
Exporting signing certificate from Xcode
- Open Xcode and navigate to Xcode > Preferences… > Accounts.
- In the left column, select your Apple ID.
- Then on the right side of the window, select your personal or team account and click Manage Certificates… .
- Control-click on the certificate you’d like to export and select Export certificate from the menu.
- A dialog box will appear asking you to enter the name of the certificate and choose the location for saving the file. You will be also required to enter a password to secure the certificate.
- Click Save. This will save the certificate in
.p12
format to the specified location.
Exporting signing certificate from keychain
- Open Keychain Access by searching for it in Spotlight.
- Select login in the Keychains section at the top of the window and click My Certificates in the Category submenu.
- Locate your certificate. The name of the certificate should start with Apple Development or Apple Distribution depending on the type of the certificate.
- Control-click the certificate and select Export [certificate name].
- You are then prompted to save the certificate. Leave the file format field filled as
Personal Information Exchange (.p12)
because saving the certificate with the .cer
extension will not include your private key.
- Enter a password to protect the certificate and verify it.
Downloading provisioning profiles from App Store Connect
The easiest way to export a provisioning profile is to download it from Apple Developer portal.
- Log in to Apple Developer portal.
- Navigate to Certificates, Identifiers & Profiles > Profiles.
- Select the provisioning profile you would like to export and click Download.
- Save it to have it ready.
You can also download the manually created provisioning profiles using Xcode. Open Xcode and select Xcode > Preferences > Accounts > Download Manual Profiles. This will download and save the provisioning profiles to ~/Library/MobileDevice/Provisioning Profiles/
.