iOS - Creating a Distribution Certificate and .p12 File

A distribution certificate identifies your team/organization within a distribution provisioning profile and allows you to submit your app to the Apple App Store.

A .p12 file contains the certificates Apple needs in order to build and publish apps.

The steps below will guide you through the process of creating an iOS Distribution Certificate and .p12 file. To read more about certificates and how they work in Apple's App Store, please visit the iOS Dev Center and consult the official Apple documentation.

Note: These steps must be done on a Mac that you will use to submit and publish your apps to the Apple App Store. While you can transfer access to another Mac computer, we recommend following these steps on the actual machine you will use to submit apps.

Before You Begin

How to Create a Distribution Certificate

1. On your Mac go to the folder Applications > Utilities and open Keychain Access.

On your Mac go to the folder Applications > Utilities and open Keychain Access.

2. Go to Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority.

Go to Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority.

3. Fill out the information in the Certificate Information window as specified below and click "Continue.".

  • In the User Email Address field, enter the email address to identify with this certificate
  • In the Common Name field, enter your name
  • In the Request group, click the "Saved to disk" option
Fill out the information in the Certificate Information window as specified below and click "Continue.".

4. Save the file to your hard drive.

The assistant creates a Certificate Signing Request (CSR) file which contains a public/private key pair.

Save the file to your hard drive.

5. To login into the iOS Developer Console goto <https://developer.apple.com> and click Account at the top

To login into the iOS Developer Console goto &lt;https://developer.apple.com&gt; and click Account at the top

6. Click "Certificates, Identifiers & Profiles."

Click &quot;Certificates, Identifiers &amp; Profiles.&quot;

7. Click on the "Certificates" link under "iOS Apps."

Click on the &quot;Certificates&quot; link under &quot;iOS Apps.&quot;

8. Go to Certificates > Production and click on the "+" button to add a new certificate.

Go to Certificates &gt; Production and click on the &quot;+&quot; button to add a new certificate.

9. Select "App Store and Ad Hoc" from the Production options and click "Continue."

Note: To use your certificates, you must have the intermediate signing certificate in your OS X system keychain. This is automatically installed by Xcode. However, if you need to reinstall the intermediate signing certificate click the link at the bottom of the page.
Select &quot;App Store and Ad Hoc&quot; from the Production options and click &quot;Continue.&quot;

10. Click on "Continue" again.

You created your CSR file in the previous steps, so there's no need to create another one.

Click on &quot;Continue&quot; again.

11. Click on "Choose File" and select the CSR file you created previously and then click on "Generate."

Click on &quot;Choose File&quot; and select the CSR file you created previously and then click on &quot;Generate.&quot;

12. Click on the "Download" button to download a .cer file to your machine and then click "Done."

Click on the &quot;Download&quot; button to download a .cer file to your machine and then click &quot;Done.&quot;

13. Double-click the .cer file to install it in Keychain Access.

It will have the name "iPhone Distribution <firstname> <lastname>" and will expire one year from today's date.

Double-click the .cer file to install it in Keychain Access.

How to Export a Distribution Certificate as a .p12 File

A .p12 file is a specially-formatted and encrypted file that contains your distribution certificate. It's embedded by the Mag+ Publishing portal when building your app. iTunes Connect checks for this file when you submit an app and will only accept the app if it contains a .p12 file that matches what you have configured in your iTunes Connect account.

1. On your Mac, launch Keychain Access, select the certificate entry and right-click on it to select "Export."

All certificates you have installed will be in the "login" keychain (Label 1) under the category "My Certificates" (Label 2).

On your Mac, launch Keychain Access, select the certificate entry and right-click on it to select &quot;Export.&quot;

2. In the window that appears, make sure the File Format is set to "Personal Information Exchange (.p12)" and click on "Save" to save it to your machine.

In the window that appears, make sure the File Format is set to &quot;Personal Information Exchange (.p12)&quot; and click on &quot;Save&quot; to save it to your machine.

3. When asked for a password, leave it blank and click on "Ok."

When asked for a password, leave it blank and click on &quot;Ok.&quot;

4. When asked for the computer password, enter it and click on "Allow."

When asked for the computer password, enter it and click on &quot;Allow.&quot;

5. Your .p12 file will be saved in the location you specified.

Your .p12 file will be saved in the location you specified.

6. Login to the Mag+ Publish portal <https://publish.magplus.com> and go to Apps > iOS > Certificate and Provisioning Files.

Login to the Mag+ Publish portal &lt;https://publish.magplus.com&gt; and go to Apps &gt; iOS &gt; Certificate and Provisioning Files.

7. Click on "Choose File" under the Distribution Certificate heading, select your distribution certificate, and click on "Save."

Click on &quot;Choose File&quot; under the Distribution Certificate heading, select your distribution certificate, and click on &quot;Save.&quot;

App Creation: Next Steps

Creating distribution certificates and .p12 files is only one step in creating an iOS app for distribution. Please refer to the additional articles in this section for information on setting up provisioning profiles and configuring in-app purchases. These items correspond to settings in the Mag+ Publish portal. The portal will actually build your customized iOS app. You will then upload this app to the Apple App Store or to your own internal distribution servers (for enterprise customers only).

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk