Follow

Notification Management: How to create PEM File

PEM file is used to setup Apple Push Notification. In this tutorial, you will be guided to generate a PEM file. Please follow our user guide step by step.

Step 1: Go to website https://developer.apple.com and login your Apple Developer Account.

1.png

Step 2: Select Certificates, Identifiers, Profiles

2.png

Step 3: Select tab Production, then Click on (+)Add button on Top-Right to add a new Certificate

3.png

Step 4: On Select Type page, select Apple Push Notification service SSL (Sanbox & Production). Then click Continue

4.png

Step 5: On this page, select the App ID you want to PUSH notification. Then click Continue

5.png

Click Continue

6.png

Step 6: Go to Generate your certificate

7.png

Step 7: Prepare on your MaC (or computer runs with MacOS)

  • Open Spotlight search and search “keychain”.
  • Follow Keychain Access/ Certificate Assistant/ Request a Certificate from a Certificate Authority

8.png

You are directed to “Certificate Information”. Please fill out all required information: 

  • Your Apple account email as “User Email Address”
  • app_pushnotification as “Common Name”

Tick on “Saved to disk”. Next, save this file as “app_pushnotification” and then you will get . certSigningRequest file on your Desktop

9.png10.png

 

Step 9: Please come back to your account on developer.apple.com, you need to click “Choose file” to upload the app_pushnotification.certSigningRequest file you have just created. Then, click “Continue”.

11.png

12.png

Step 10: After that, double click on the file you have just downloaded, change file’s name as app_pushnotification.cer, move this file to your Desktop and open “Keychain Access”. Now find “app_pushnotification” and “Apple Push Services:<your App ID>” and export these 2 items. Then, save this file as “app_pushnotification” and move to your Desktop. Please note that the file format is (.p12).

13.png14.png15.png16.png17.png

Step 11: Create PEM file

18.png

 

Open a Terminal and execute the following steps.
Go to the folder where you downloaded the files, in this case is the Desktop:

  1. cd ~/Desktop/
  2. openssl pkcs12 -in app_pushnotification.p12 -out app_pushnotification.pem -nodes –clcerts     <Note: You need to enter the password you entered on Step 10>
  3. openssl x509 -in app_pushnotification.cer -inform der -out app_pushnotificationpass.pem
  4. cat app_pushnotificationpass.pem app_pushnotification.pem > app_pushnotification_end.pem

The file app_pushnotification_end.pem is the one you need.

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments