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
- Find on which Mac You are going to submit the mobile apps to the App store
- Make sure to register for an iOS Developer Account
- Create an App ID in iTunes Connect
Creating a Distribution Certificate
1. In the Mac go to the folder Applications > Utilities and open Keychain Access.
2. Click Keychain Access > Certificate Assistant > Request a Certificate from a Certificate Authority.
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
4. Save file to the hard drive.
• The assistant creates a Certificate Signing Request (CSR) file which includes a public/private key pair.
5. For Login into the iOS Developer Console and click Account at the top
6. Click on “Certificates, Identifiers & Profiles.”
7. To add the new certificate Go to Certificates and click on the “+” button.
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.
9. Once again click “Continue”
You created your CSR file in the previous steps, so there’s no need to create another one.
10. Click on “Choose File” and select the CSR file you created previously and then click on “Continue.”
11. Click on the “Download” button to download a .cer file to your machine and then click “Done.”
12. Double-click the .cer file to install it in Keychain Access.
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).
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.
3. If it asks for the password, leave it blank and click on “Ok.”
4. After that it asks for the computer password, enter it and click on “Allow.”
5. Your .p12 file will be saved in the location you specified.
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.