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

  1. Open Xcode and navigate to Xcode > Preferences… > Accounts.
  2. In the left column, select your Apple ID.
  3. Then on the right side of the window, select your personal or team account and click Manage Certificates… .
  4. Control-click on the certificate you’d like to export and select Export certificate from the menu. Select Export certificate
  5. 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. Save certificate
  6. Click Save. This will save the certificate in .p12 format to the specified location.

Exporting signing certificate from keychain

  1. Open Keychain Access by searching for it in Spotlight.
  2. Select login in the Keychains section at the top of the window and click My Certificates in the Category submenu.
  3. Locate your certificate. The name of the certificate should start with Apple Development or Apple Distribution depending on the type of the certificate.
  4. Control-click the certificate and select Export [certificate name]. Select Export certificate
  5. 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. Save certificate
  6. 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.

  1. Log in to Apple Developer portal.
  2. Navigate to Certificates, Identifiers & Profiles > Profiles.
  3. Select the provisioning profile you would like to export and click Download.
  4. 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/.