Skip to content

Instantly share code, notes, and snippets.

@vikrant-Ios
Last active January 10, 2018 10:42
Show Gist options
  • Save vikrant-Ios/9e83856f1ce924e4f9372027168bb101 to your computer and use it in GitHub Desktop.
Save vikrant-Ios/9e83856f1ce924e4f9372027168bb101 to your computer and use it in GitHub Desktop.
Create PEM file for push notification
# Convert the .p12 file into a .pem file:
$ openssl pkcs12 -nocerts -in Filename.p12 -out FileName.pem
# Convert the .cer file into a .pem file:
$ openssl x509 -in apns_development.cer -inform der -out PushCert.pem
# Finally, combine the certificate and key into a single .pem file
$ cat PushCert.pem FileName.pem > final.pem
# Finally use final.pem or FileName.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment