Create cert, pem, and p12 files for your App. following this tutorial
Generate a certificate signing request. Use your own email address!
openssl req -new -key private.key -out CertificateSigningRequest.certSigningRequest
On the “What type of certificate do you need?” Apple page, say “iOS App Development”. Go through its little wizard and upload your
CertificateSigningRequest.certSigningRequest
file. It will give you back a DEV_APN.cer
file.
Convert ios_distribution.cer to ios_distribution.pem
openssl x509 -in DEV_APN.cer -inform DER -out DEV_APN.pem -outform PEM
Convert ios_distribution.pem to ios_distribution.p12. Enter a password and remember it for later.
openssl pkcs12 -export -inkey private.key -in DEV_APN.pem -out DEV_APN.p12
Create key file from the p12 file.
openssl pkcs12 -in DEV_APN.p12 -out DEV_APN_CERT_KEY.pem -nodes -clcerts
Create and name the key.pem and cert.pem files for node-apn.
cp DEV_APN.pem cert.pem
cp DEV_APN_CERT_KEY.pem key