Step 2: Generate iOS distribution certificate
The P12 file is the key that enables you to create and configure your applications on the Apple Developer account.
Please note: if this is your first application, you probably want us to sign the application on your behalf and take good care of this procedure. In this case, we need this file before generating IPA.
This step begins in the Apple iOS Developer Account.
Declare a certificate
- Go on Certificates, IDs & Profiles on your developer space on the left-hand menu.
- Click on Certificates, and on the button +
- Select iOS Distribution (App Store and Ad Hoc) in Software section
- Click on Continue to the interface where you need to upload your CSR (Certificate Signing Request)
Create your CSR
Mac OS
- Open the Keychain Access. It's in the folder Applications and Utilities
- On the upper menu, select Preferences
- In this window, click on Certificates. Turn off the OCSP and the CRL and close that window.
- On the upper menu, select Certificate Assistant and Request a Certificate from a Certificate Authority
- Add the user email address and the common name. The email address has to be the same as this one you chose when you created your Apple Developer account. The CA email address is not obligatory. Click on Saved to disk
Windows
We highly recommend Windows users to generate this request from a Mac computer. If you are a Windows addict, use Open SSL.
- Install OpenSSL on the computer. You may need to also install the Visual C++ 2008 redistributable files that you can find on the Open SSL downloading page (but you don't need to install Visual C++ on your computer.)
- Open a Windows command line and access the OpenSSL bin directory (c:\OpenSSL\bin, for example).
- Create your personal key by entering this text in the command line:
openssl genrsa -out mykey.key 2048 - Save this personal key. You'll need it later on. When you're using OpenSSL, pay attention to all the warning/error messages. Even when OpenSSL sends you a warning, sometimes the files continue to come out, but there's a risk they'll be useless in the end. So if you see a warning message, check the syntax and execute the command once again.
- Create the CSR file by entering the following text in the command line:
openssl req -new -key mykey.key -out CertificateSigningRequest.certSigningRequest -subj “/emailAddress=yourAddress@example.com, CN=John Doe, C=US”
Replace the email address, the CN value (name of the certificate) and the C value (country) with your contact details.
Download your certificate
- Once you have your CSR, go back on Apple Developer and continue the process. You were there :
- Click on Continue and upload your CSR file
- Download the iOS Distribution file (CER). That's your certificate.
Create a P12 file
- Open it by double clicking and add it in your Keychain
- Select your private key and your certificate in Keychain Access, right click and export them in .p12 file
- Choose your password. You will need it later on PandaSuite but it's not necessary.