Skip to content

Instantly share code, notes, and snippets.

@jwheare
Forked from tominsam/gist:9b188e42a706df998f5d
Last active August 29, 2015 14:00
Show Gist options
  • Save jwheare/4920ebf8e128c9c4a290 to your computer and use it in GitHub Desktop.
Save jwheare/4920ebf8e128c9c4a290 to your computer and use it in GitHub Desktop.
Generating push certificates:
Go to iOS developer portal, go to "App IDs", open the production app ID and open
settings. Click "create certificate" and follow instructions to get
aps_production.cer and aps_development.cer. Make sure you use distinctive names
with date in the CSR so you can find the things later.
Import generated .cer files into keychain.
In keychain, select "my certificates" on the left, and expand the "apple
{development,production} IOS Push services" row that corresponds to the cert you
just made. Select the push services row on its own, without the row's child, and
file->export it as a single .p12 file.
run
openssl pkcs12 -in Certificates.p12 -nokeys -clcerts | openssl x509 > cert.pem
openssl pkcs12 -in Certificates.p12 -nocerts -nodes | openssl rsa > key.pem
The piped openssl commands at the end strip out the bag attributes.
Done!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment