Skip to content

Instantly share code, notes, and snippets.

@jtrobman
Created May 5, 2014 13:44
Show Gist options
  • Save jtrobman/a96814de2a96a4201d67 to your computer and use it in GitHub Desktop.
Save jtrobman/a96814de2a96a4201d67 to your computer and use it in GitHub Desktop.
create the pem file for apple push notification service
To use the Apple Push Notification Service, you need to download your iOS Certificate from the Apple Developer site and import them into your Mac keychain. Next step, export the private key as key.p12 and the cert as cert.p12 then run these shell commands.
openssl pkcs12 -clcerts -nokeys -out apns-cert.pem -in cert.p12
openssl pkcs12 -nocerts -out apns-key.pem -in key.p12
openssl rsa -in apns-key.pem -out apns-key-noenc.pem
cat apns-cert.pem apns-key-noenc.pem > apns.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment