1. Login to the IPhone Developer Connection Portal and click App IDs
2. Create an App ID that does not use wildcard characters. Wildcard IDs cannot be used with push Notification Services. For example, our iphone program ID looks like this: AB123346CD.com.serverdensity.iphone
3. Click the "Configure" next to the app ID and press the button to produce a push notification license. Follow the steps guided by the wizard to generate a signature and upload, and finally download the generated license. This step is also mentioned in the Apple documentation.
4. Introduce your aps_developer_identity.cer into the keychain by double-clicking the. cer file.
5. Start the Keychain assistant on the Mac, and then select the Certificates category in the login keychain. You will see an extensible option, "Apple Development Push Services"
6. Extend this option and then right-click "Apple Development push Services" > Export "apple Development push Services ID123". Save as a apns-dev-cert.p12 file.
7. These files need to be converted to PEM format via a terminal command:
Help
1 2 3 |
OpenSSL pkcs12-clcerts-nokeys-out Apns-dev-cert.pem -in APNS-DEV-CERT.P12 OpenSSL pkcs12-nocerts-out apns-dev-key.pem-in APNS-DEV-KEY.P12 |
The second statement, you must set up an RSA password for him, if you want to remove the password, or in the export/conversion do not set or execute:
Help
1 |
OpenSSL rsa-in apns-dev-key.pem-out Unencrypted.pem |
8. Finally, you need to synthesize the keys and license files as APNS-DEV.PEM files, which need to be used when connecting to APNs:
Help
1 |
Cat Apns-dev-cert.pem Unencrypted.pem > Apns-dev.pem |
9. To make a final test of the certificate made, with SSL connection.
Development state server Address gateway.sandbox.push.apple.com 2195
Product Status server address gateway.push.apple.com 2195
Help
1 2 |
OpenSSL S_client-connect gateway.sandbox.push.apple.com:2195 -cert Apns-dev-cert.pem-key Unencrypted.pem |
See if it works.
Note: The last thing I noticed was the pit I had planted myself. Certificates are divided into two types that are developed and used after the release of the program.