Programmatically generate APNS certificate

Viewed 878

Is there a way to programmatically generate the Apple Push Notification Service (APNS) certificate? I'd like to write a script that automatically renews our APNS certificate every year by creating a new one and uploading it to our server.

2 Answers

I believe you can use some automation tools to do it

If we look at APNS certificate generation guide https://developers.connectycube.com/ios/how-to-create-apns-certificate - we can see that we need some automation for Web and Desktop tasks

For Web we can use Selenium IDE. For Desktop we can use Apple Automator

I believe we can write scripts for both and then combine into single bash run script

Also, there is a fastlane pem generator that also can be used for such purpose

I recommend to think twice before start doing it - it's only need to be done once per year, so maybe it's faster to to so manually than spend time for building such a script :)

Related