1. Export the push certificate in the keychain Apple push notification Services certificate, named CER.P12, placed on PC desktop with password set to 123456
2. Export push private key in keychain Apple push notification Services private key, named Key.p12, placed on PC desktop with password set to 123456
3. Turn on the console program and use OpenSSL to turn cer.p12 and key.p12 into Cer.pem and KEY.PEM
The command is as follows:
OpenSSL pkcs12-clcerts-nokeys-out cer.pem-in cer.p12 generate Cer.pem file
openssl pkcs12 -nocerts -out key.pem -in key.p12 生成 key.pem文件
CER.PEM files and key.pem文件 give back to the background
4. Execution of commands
cat cer.pem key.pem > ck.pem
Generate Ck.pem File
5. Test sandbox environment, perform
openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert cer.pem -key key.pem
Test production environment, execute
openssl s_client -connect gateway.push.apple.com:2195 -cert cer.pem -key key.pem
Remember to publish what you need to be aware of, what the server wants to modify
[Reference link]:
Http://jingyan.baidu.com/article/c275f6ba25e94fe33d756719.html
iOS Apple push feature implementation steps