Skip links

How to Create Distribution Certificate and .p12 File for iOS

The Distribution certification helps to find your team or company within a distribution provisioning profile. And it also enables you to submit your mobile app on the Apple App Store. A .p12 file has the certificate which Apple requires to create and publish an app on the store. The below steps will help you to Create Distribution Certificate and .p12 file.

Note: The following steps should be done only on a Mac which will be used to submit and publish your mobile apps on the app store. And, when you are trying to transfer access to another Mac computer. We recommend following these steps on the actual machine you will use to submit apps.

Before you start

Creating a Distribution Certificate

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

keychain apps

2. Click Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority.

certificate assistant

3. Fill 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
  • Common Name field, enter your name
  • In the Request group, click the “Saved to disk” option
certificate information

4. Save file to the hard drive.
• The assistant creates a Certificate Signing Request (CSR) file which includes a public/private key pair.

certificate signing request

5. For Login into the iOS Developer Console and click Account at the top

certificates

6. Click on “Certificates, Identifiers & Profiles.”

certificate identifiers

7. To add the new certificate Go to Certificates and click on the “+” button.

certificates

8. Choose “App Store and Ad Hoc” from the Production options and click “Continue.”

Note: To use the certificates, you must have the intermediate signing certificate in your OS X system keychain. This is automatically installed by Xcode. If you need to reinstall the intermediate signing certificate click the link at the bottom of the page.

create a new certificate

9. Once again click “Continue”
You created your CSR file in the previous steps, so there’s no need to create another one.

create a new certificate 1

10. Click on “Choose File” and select the CSR file you created previously and then click on “Continue.”

create a new certificate 2

11. Click on the “Download” button to download a .cer file to your machine and then click “Done.”

download your certificate

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

install certificate

Steps to Export a Distribution Certificate as a .p12 File

A .p12 file is a specially-formatted and encrypted file that includes your distribution certificate. It is embedded by the mag+ Publishing portal while building your app. iTunes Connect checks for this file while you are submitting an app and It 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).

export distributor

2. In the window, ensure the File Format is set to “Personal Information Exchange (.p12)” and click on “Save” to save it to your machine.

certificatesp12

3. If it asks for the password, leave it blank and click on “Ok.”

enter password

4. After that it asks for the computer password, enter it and click on “Allow.”

enter computer password

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

certificate

6. Login to the mag+ Publish portal  and go to Apps > iOS > Certificate and Provisioning Files.

The above are the steps to create the Distribution certificate and the a .p12 file.