Enable Push for your app ID

To prepare for push notifications on iOS, you need to create a push-enabled App ID and a production push certificate.

If you already have a push-enabled App ID and a production push certificate, you can skip this section. Note that you may still need to complete steps 9 and above in order to convert your certificate to the right format.

  1. Log in to your Apple developer account.
  2. In the iOS Apps menu, click Identifiers.
  3. Note: If you don't yet have an App ID, click + to create one.
    In the App IDs section, select the App ID that you use for App Store and/or ad-hoc distribution and click Edit.
  4. Select the checkbox to enable Push Notifications. Then, click Create Certificate.
    Instructions for generating a Certificate Signing Request (CSR) appear.
  5. Follow the instructions to generate the CSR, and then click Continue.
  6. In the Generate Your Certificate pane, click Choose File.
  7. Navigate to the CSR file you created in the previous step and select it. Click Generate.
  8. Click Download Now to download the certificate file to your download location. Open the .cer file to install it in your keychain. When you are finished, click Done.
  9. Double-click the file to launch Keychain Access. Ensure that the certificate in your login keychain is installed on the computer you are using for provider development.
  10. In Keychain Access, ensure that your certificate User ID matches your application’s Bundle ID.
    You can find your application's Bundle ID in Xcode by clicking on the project in the navigator and selecting General > Identity. The Bundle ID is shown on the top.
  11. Select the certificate, choose File > Export Item, and export it as a Personal Information Exchange (.p12) file.
  12. In a terminal, run the following command.
    openssl pkcs12 -in CertificateName.p12 -out CertificateName.pem -nodes
    Note: Ensure that the password is correct. The private key can sometimes fail to be included in the certificate when the wrong password is entered.
  13. Make a note of the .pem file location.