IPHONEIOSPEM Push APNs
Previously wrote an article: the implementation of the iOS message push mechanism, this article generated a p12 file, but PHP is used by the Pem file, the generated method and the P12 file is somewhat different.
I. CSR documents
1. Generate Certificate Signing Request (CSR)
2, fill in your mailbox and common name, and choose to save to the hard disk.
Click Continue:
This generates a Push.certsigningrequest file locally.
Second, SSL certificate file
1. Log in to iOS Provisioning Portal with the account you paid for, and create a new app ID, which can be referenced in the iOS app's real-computer debugging, which results in the following record:
2. Click on the Configure on the right:
3, click Development Push SSL Certificate line after the Configure:
4. Click Continue:
5, select the previous generated push.certsigningrequest file, click Generate, appear the following page:
6. Click Continue:
7. Click Download, and name the file aps_developer_identity.cer.
8. Click Done and you will notice that the status becomes enabled:
9. Double-click the aps_developer_identity.cer to install it on the computer.
Note: The Apple Push Notification Service column for some app IDs is grayed out and the Configure button is not allowed because APNs does not support app IDs with wildcard characters.
Three, keychain Select login, type Select all items, in the right list, choose the push certificate and the corresponding private key, and export 2 items, named CK.P12.
Iv. execute the following command to generate the Ck.pem file.
iOS code
- OpenSSL pkcs12-in ck.p12-out ck.pem-nodes
Generation of PEM files in the iOS messaging push mechanism