To create Certificate .p12 for iOS, follow instruction:
- Login into the iOS Developer Console.
- Click "Account" at the top of the page.
- Click on "Certificates, Identifiers, & Profiles".
- Go to "Certificates" > "Production" and then to "iOS Certificates (Production)". Click "+".
- Under "Production" select "App Store" and "Ad Hoc".
- Scroll down then click "Continue". Follow the steps provided by Apple for "Creating a Certificate Signing Request (CSR)".
- Now it is time to create "Certificate Signing Request (CSR)" file. In your Spotlight window type in "Keychain" and click "Keychain Access".
- On the top menu bar for Keychain Access go to "Certificate Assistant" > Request a Certificate From a Certificate Authority…
- Enter your information: "Email Address" and "Certificate Common Name".
Note: The CA Email is not needed if you are saving the CSR to disk.
- Click "Saved to Disk" and click "Continue".
- Save the "Certificate Signing Request File" to a directory on your Mac.
- Go back to your developer account on developer.apple.com, in the "About Creating a Certificate Signing Request (CSR)" section click "Continue".
- In "Generate your certificate" section, under "Upload CSR File", choose the file saved two steps ago and click "Continue".
- Now, when your certificate is ready, click "Download" to download the certificate to your Mac.
- Give the certificate a name with a ".cer extension" and save to a location of your choice on your Mac.
- Locate the certificate in "Finder", and double-click the certificate file name to add to Keychain Access on your Mac. This needs to be done so you can create a P12 file from "Keychain Access".
- Open "Keychain Access" on your Mac.
- On the left navigation panel, under "Category", select "Certificates".
- In the search bar type: distribution.
- Locate your new certificate and expand it by clicking the triangle icon to the left of the certificate name. After expanding, you should see a private key under the distribution certificate.
- Right-click the distribution certificate and click Export "iPhone Distribution:….". to create a P12 certificate file containing the distribution certificate and the private key.
- Give the P12 certificate file a name and choose a specific location where you want to save the file. Click "Save".
- After saving, you are prompted to enter a password to protect the P12 certificate file. Click "OK" after entering and verifying your password.
Important: Please do not lose this password. You will need this password to use this P12 file for signing.
- Congratulations! Now you have a proper P12 certificate file that is ready for signing iOS apps.