I tried and tried to generate a .pem file, every time generating certificates from the client\'s account and then generating the .pem file using the terminal, but it\'s of n
it is very simple after exporting the Cert.p12 and key.p12, Please find below command for the generating 'apns' .pem file.
https://www.sslshopper.com/ssl-converter.html
command to create apns-dev.pem from Cert.pem and Key.pem
openssl rsa -in Key.pem -out apns-dev-key-noenc.pem
cat Cert.pem apns-dev-key-noenc.pem > apns-dev.pem
Above command is useful for both Sandbox and Production.