Native iOS app: creating certificates and provisioning profiles

This is a supplementary guide to main "Native Apps Compilation and Store Submit" documentation and covers certificates and provisioning profiles steps needed for native iOS app.

Guide assumes that you have enrolled in Apple Developer programm and that you have already run following commands from command line using main documentation ( Compilation > step 1):
$ cp package.tmpl.json package.json
$ npm run setup
$ npm run prepare
$ ionic cordova resources --force
$ ionic cordova platform remove ios
$ ionic cordova platform add ios

The next step is setting up iOS certificates and provisioning profiles.

Creating development and distibution certificates

To create certificates:

1. Open your iOS app project in xCode.
To open your project in xcode you will need to open .xcworkspace file within skmobileapp/application/platforms/ios/ folder.
File name will be the same as your ID (= iOS Bundle ID, =android package name) from application.config.json file, so it will be something like myappname.xcworkspace

2. On the upper menu click xCode > Preferences and click + button on the lower left side on the pop up window.
Enter your iTunes Connect developer account details and click Sign-In.

3. Then find your account on the left side bar and click Manage Certificates

4. In the pop up window click the drop down button on the left lower corner. And click iOS Developer. Developer certificate will be created automatically in your Apple Developer account.

5. Click drop down button one more time  and click iOS App Store. Distribution certificate will be automatically created in your Apple Developer account.

6. Go to  https://developer.apple.com/account/ios/certificate/certificateList.action and check whether created (via Xcode) certificates are indeed present.


Creating development and distribution provisioning profiles

Prior to creating provisioning profiles, add iOS mobile devices if there are any. If you don’t have iOS mobile devices skip this part and proceed further.

0. To add mobile devices:
- go to https://developer.apple.com/account/ios/device/
- click "+"icon to register a new device
- give your device a name
- enter your device's UDID (http://whatsmyudid.com/)
- follow on-screen instructions to finalize device registration

1. Creating distribution provisioning profile
- go to https://developer.apple.com/account/ios/profile/production
- click "+"icon to create a new provisioning profile
- select "App Store" under "Distribution" and click "Continue"
- select your App ID from the next drop down menu and click "Continue"
- select iOS Distribution certificate that should be added to profile, click "Continue"
- enter desired profile name, e. g. YourAppName Distribution and click "Generate". Do not click download

2. Creating deevelopment provisioning profile
- go to https://developer.apple.com/account/ios/profile/limited
- click "+"icon to create a new development profile
- select "iOS App Development" under "Development" and click "Continue"
- select your App ID from the next drop down menu and click "Continue"
- select iOS Development certificate that should be added to profile, click "Continue"
- enter desired profile name, e. g. YourAppName Development and click "Generate". Do not click download


Finalazing provisioning profile and certificates in xCode

1. Open your iOS app project in xCode.
To open your project in xcode you will need to open .xcworkspace file within skmobileapp/application/platforms/ios/ folder.
File name will be the same as your ID (= iOS Bundle ID, =android package name) from application.config.json file, so it will be something like myappname.xcworkspace

2. On the upper menu click xCode > Preferences and click + button on the lower left side on the pop up window.
Enter your iTunes Connect developer account details and click Sign-In.

3. Then find your account on the left side bar and click "Download All Profiles"


Enabling push notifications

1. Open your iOS app project in xCode.
To open your project in xcode you will need to open .xcworkspace file within skmobileapp/application/platforms/ios/ folder.
File name will be the same as your ID (= iOS Bundle ID, =android package name) from application.config.json file, so it will be something like myappname.xcworkspace


2. Go to "Capabilities" tab and select “ON“ for Push notifications feature

3. Generating a Certificate Request
You should generate a certificate request file so that you can use it to request for a development SSL certificate later on.
- Launch the Keychain Access application in your Mac OS X:
- Select Keychain Access → Certificate Assistant → Request a Certificate From a Certificate Authority:
- Enter the information required and check the ‘Saved to disk’ option. Click Continue:
- Save the certificate request using the suggested name and click Save. Click Done in the next screen:

4. Configuring an App ID for Push Notifications
- Click on Your App ID in the App IDs list and click Edit in the bottom of expanded page:
- Configuration page opens. Scroll a page to the end, Check the ‘Enable for Apple Push Notification service’ option and click the ‘Create Certificate’ button displayed to the right of the Development Push SSL Certificate:
- A wizard will appear. Click Continue:
- Click the Choose File button to locate the Certificate Request file that you have saved earlier (Generating a Certificate Request section). Click Generate:
- Your SSL Certificate will now be generated. Click Done to continue:

5. Make APNS certificates
- Now you can download certificate:
- The SSL Certificate that you download is named aps_developer_identity.cer. Double-click on it to install it in the Keychain Access application. The SSL certificate will be used by your provider application so that it can contact the APNs to send push notifications to your applications.
- Launch Keychain Assistant from your local Mac and from the ‘login’ keychain, filter by the ‘Certificates’ category. You will see an expandable option called “Apple Development iOS Push Services”:
- Expand this option then right click on “Apple Development iOS Push Services” → Export “Apple Development iOS Push Services …″. Save this as apns-dev-cert.p12 file somewhere you can access it. Enter the password for exporting (it can be empty):
- Enter your usual admin password for your computer to confirm and finalize the export process:

6. Making a .pem file
- Open Terminal on your Mac computer and Go to the folder where you downloaded the files e.g. Desktop.
- Convert the .cer file into a .pem file using following command:
    $ openssl x509 -in aps_development.cer -inform der -out MessageTestCert.pem
   MessageTestCert.pem file will be generated.
- Convert the private key’s .p12 file into a .pem file using following command:
    $



  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Native apps: 2.0.0 (build10) compilation and store submit

Documentation is in progress Table of contents: PreparationCompilationStore submit...

Native apps: 2.0.0 (build10) re-branding changes

Required graphical assets: icon.png: 1024x1024px, png image with no opacity.logo: at least...

Native apps: 2.0.0 ( build 10) local environment setup

Note: according SkaDate SLA  SkaDate support levels do not cover "direct assistance with third...

Native apps: 2.0.0 ( build 10) Firebase project credentials

This is a supplementary guide to main Native apps: 2.0.0 (build10) compilation and store submit...