APNS (Apple Push Notification Service) is a platform service which is created by Apple Inc. This service enables developers to send push notifications in iOS devices. For this, you must have a Paid Apple Developer. Please follow below steps to create .p12 certificate require to send push notifications -









1. First login in your apple developer account by using this URL: First login in your apple developer account by using this URL: https://developer.apple.com/account/













2. Now select "Certificates" from the left menu. Click on the "+" button from the right.









3. Now select “Apple Push Notification service SSL (Production)” and click “Continue” button -













4. Now, select the app ID from Drop down list and click on “Continue” -













5. Now we need to create CSR. To create CSR follow the steps under “About Creating a Certificate Signing Request (CSR)” -













6. Now upload ".certSigningRequest" file which you have generated (in Step 5), then click on "Generate" button -









7. Now click on "Done" to finish the registration process, The page will be refreshed and you will able to see the download option for this -









After downloading the certificate just double click on downloaded file. This will add the certificate in your keychain access.





8. Now open “Keychain” in your system, look for the certificate you have just installed in step 7. If you are not sure which certificate that was - That should start with “Apple Production IOS Push Services” and followed by app’s bundle ID.

















9. Now, Expand the certificate, you should able to see the private key with your name or your company name. Select both items by using the "Select" key on your keyboard. Now right click and choose “Export 2 items” -













Then save this p12 file with a valid name like "pushcert.p12" to your Desktop. Now you will be prompted to enter a password to protect this p12 file, You can select skip the password or enter a password option.





10. Now open the terminal and move in your directory where you have this p12 file. Run below command to generate pem file -





openssl pkcs12 -in pushcert.p12 -out pushcerts.pem -nodes -clcerts







