To run an app on an iOS device, you need to code sign it. One of the files that you need for signing it is a
P12 certificate file. The entire process of obtaining it is split into three parts.
- Create a Certificate Signing Request.
- Create a Development or Production Certificate
- Convert the Certificate Into a P12 File
Based on your development scenario, you can perform these steps using AppBuilder or manually. This article elaborates on both options.
One of the easiest ways to create a certificate signing request, is using AppBuilder. The process is explained in detail in this article: Create a certificate signing request.
On a Mac machine, you can create a certificate signing request using Keychain Access. To do so, follow the steps below:
- Go to
Applications/Utilitiesand open Keychain Access.
- In the Preferences menu, turn off both Online Certificate Status Protocol (OCSP) and Certificate Revocation List (CRL).
From the Keychain Access menu, choose Certificate Assistant -> Request a Certificate From a Certificate Authority...
If instead of Request a Certificate From a Certificate Authority..., you see Request a Certificate From a Certificate Authority with key..., you need to first install the Apple intermediate certificate (Apple Worldwide Developer Relations Certification Authority). You can find instructions for installing the intermediate certificate in the Apple documentation at this address: Installing Missing Intermediate Certificate Authorities.
Fill in the required User Email Address and Common Name fields. Leave the CA Email Address field blank.
- Check Saved to Disk.
- Click Continue.
The Certificate Assistant creates the certificate signing request and saves it on your machine.
To create a Development or Production certificate:
- In your browser, in the iOS Dev Center, click Certificates, Identifiers & Profiles.
- Click Certificates.
- Click +.
- Select the type of certificate you want to create and click Continue.
- On the About Creating a Certificate Signing Request (CSR) page, click Continue.
- On the Generate Your Certificate page, click Choose File.
- Browse to the location where the
CSRfile for your code signing request is stored, select it, and confirm the upload.
- Click Generate.
- Click Download to download your certificate.
Now, you have the
CER file representing your certificate. However, it cannot be used outside of your machine, so in order to use it in AppManager, you need to export a
To get a
P12 file from AppBuilder, you need to perform two steps:
- Add the cryptographic identity (CER file) into AppBuilder
- Export the cryptographic identity into a P12 file
On a Mac machine, you can double-click the downloaded
CER file, thus opening Keychain Access and installing your new certificate. To export a
- In Keychain Access, under Keychains, select System.
- Under Category, select My Certificates.
- Select your certificate and select File -> Export Items.
- Provide a name for the certificate and make sure that File Format is set to Personal Information Exchange .p12.
- Click Save.
- Provide a password for the certificate when prompted and click OK. AppManager will ask you about this password when you upload the certificate in it.
- Type in your admin password when prompted and click Modify Keychain.
You now have the
P12 file needed for re-signing your app in App Distribution Portal.