Generating a .p12 file

Open Keychain Access. Under the Keychain Access tab on the left top corner, select Certificate Assistant and select the option “request a certificate from a certificate authority” and fill in the following:

  • User email address
  • Common Name
  • CA email address (not necessary).

Select saved to disk option and continue. This will generate a CSR certificate.

whyuse whyuse

 

Visit https://developer.apple.com and login to Account with your credentials.

 

Click on to the tab named as Certificates, Identifiers & Profiles. The screen shown below will appear:

whyuse

 

Click on the Production tab under All types on the right corner. Once done, click on the '+' option beside main Certificates heading and select Apple Distribution option and click continue.

whyuse whyuse whyuse

 

choose file option upload the CER file you downloaded in step 1.a and click on Continue. Then click on Download. This will generate a .cer file.

Click on All Certificates. Under All Types, click on to Production. Download all the certificates under the Production which is iOS Distribution (Type).

whyuse whyuse whyuse whyuse

 

Double click on all the downloaded certificates in the folder you chose for the above step.

 

Go back to the Keychain access and click on Certificates tab on the left. Then right click on the distribution certificate with a drop down option and select the Export option. It is important to remember the Expiry Date for later steps. Ensure that the file format is .p12 and click on Save. A pop-up will open where in you can type a password of your choice.

whyuse whyuse whyuse whyuse

 

CONGRATULATIONS ! You have a .p12 file ready.

CREATING A PROVISION FILE(.mobileprovision)

To create a distribution provision profile for app store, visit https://developer.apple.com/account/ios/certificate

Here on the left side panel you will find Identifiers. Click on App IDs. Now click the ‘+’ button beside the Identifiers Heading. Click on AppIDs to register an App ID and click Continue.

whyuse whyuse

 

Choose iOS, tvOS, watchOS in Platform. Add your app name in Description and Bundle ID in the following format under Explicit App ID: “com.domainname.appname” ( For example com.plugxrinc.testapp ) Now click on Continue and then Register.

whyuse whyuse

 

Go back to the home page and click on Profiles on the left panel. Select iOS in the All Platforms option on the right top. Click on the '+' button beside the Profiles Heading.

whyuse

 

Under Distribution, you have options to create for Ad Hoc (create a distribution provisioning profile to install your app on a limited number of registered devices)

For Ad Hoc (optional)

  • Select Ad Hoc option and click Continue. whyuse
  •  

  • Select the App Id created in previous steps (com.domainname.appname) and press Continue whyuse
  •  

  • Select the certificate with date (as mentioned in step Keychain access, certicates tab) and press Continue whyuse
  •  

  • Select all the registered devices and click Continue. (not included in App Store process) whyuse
  •  

  • Provide a provisioning profile name and press Generate and then Download. whyuse whyuse

 

Congratulations! You have the .mobileprovision file for Ad Hoc