Reputation: 36373
When enabling an iOS app for push notifications, you need to create a sandbox SSL certificate to be used by your server to communicate with APNS. Does that sandbox certificate also need to be added to your development computer's keychain?
Upvotes: 2
Views: 1024
Reputation: 3955
All certificats things about APNS are only used by the server that communicate with Apple Push News servers.
Here are my 'steps' to create the needed files for your server to communicate with Apple servers:
- create a Certificat Signing Request from Keychain -> BASENAME.csr
- from Keychain, export the private key -> BASENAME privateKey.p12
- in Apple Developer portal, create 2 certificates -> BASENAME dev.cer and BASENAME prod.cer
-- using
openssl
command
- convert the private key .p12 file into a .pem file
- convert dev .cer file into a .pem file -> BASENAME dev.pem
-- using
cat
command
- combine the dev certificate file and the private key file into a single .pem file -> BASENAME dev certKey.pem
-- using
openssl
command
- convert prod .cer file into a .pem file -> BASENAME prod.pem
-- using
cat
command
- combine the prod certificate file and the private key file into a single .pem file -> BASENAME prod certKey.pem
Then, you must use the '* cetKey.pem' file with you SSL connection to Apple server (use '* dev certKey.pem' during development to use sandboxed Apple APNS servers, and '* prod certKey.pem' for your production app to communicate with production Apple APNS servers).
Then you can test the connection to Apple production (final) APNS servers:
openssl s_client -connect gateway.push.apple.com:2195 -cert "* prod.pem" -key "privateKey.pem"
or to the sandbox (dev) Apple APNS Servers:
openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert "* dev.pem" -key "privateKey.pem"
Upvotes: 2
Reputation: 656
The SSL certificate is associated with the respective development/distribution certificate and is unique to every appID.
You do not need to install SSL certificate on your development machine.
For more: http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
Upvotes: 2