Delite Studio
Five-star iPhone, iPad, Android, and OS X apps
  • Home
  • WordPress
    • Push Notifications for WordPress
      • Documentation
      • FAQs
      • Library for iOS
      • Library for Android
  • Apps
    • Picture Transfer
    • Local Cloud
      • For iOS
      • For Android
    • File Storage
    • File Transfer
      • For iOS
      • For Mac
      • For Android
      • For Windows
    • File Extractor
    • Localizable Strings Merge
    • Delite Blocks
  • About
  • Contact
  • Account
    • Cart
  • English
    • Italiano
Select Page ...

Configuring iOS Push Notifications

Enabling Push Notifications in Xcode project

  1. Choose View → Navigators → Show Project Navigator.
  2. Choose the target from the Project/Targets pop-up menu or in the Targets section of the second sidebar if it appears.
  3. Click Capabilities to view app services you can add to your app.
  4. In the Capabilities pane, if Push Notifications isn’t enabled, click the switch in the Push Notifications section.
  5. In Member Center, the Push Notifications service will appear as Configurable (not Enabled) until you create a client SSL certificate (option 2).

From Push Notifications for WordPress version 5.1 onwards we suggest you to enable HTTP/2-based Apple Push Notification service (APNs) to establish a Token-Based connection (option 1).

Option 1: obtain an Encryption Key and Key ID from Apple

You need an APNs authentication token signing key to generate the tokens used by your server. One token is enough to distribute notifications for all of your company’s apps, allows your app to connect to both the development and production environments and doesn't expire.

You must be a Apple Developer Program member to be able to create an authentication token.

To create the private key:

  1. Go to your Apple's dev center.
  2. In Certificates, Identifiers & Profiles, select Keys from the sidebar
  3. Click the Add button (+) in the upper-left corner.
  4. Under Key Description, enter a unique name for the key.
  5. Select the checkbox next to the capabilities you want to enable, then click Continue.
  6. Review the key configuration, then click Confirm.
  7. Click Download to generate and download the key, it is saved as a text file with a .p8 file extension in the Downloads folder.
  8. Click Done.
  9. Proceed with Configure Push Notifications for WordPress

WARNING: Save this file in a secure place because the key is not saved in your developer account and you won’t be able to download it again. If the Download button is disabled, you previously downloaded the key.

Option 2: creating a Universal Push Notification Client SSL Certificate

You use Member Center to generate a push notification client SSL certificate that allows your notification server to connect to the APNs. Each App ID is required to have its own client SSL certificate. The client SSL certificate Member Center generates is a universal certificate that allows your app to connect to both the development and production environments.

You must be a Apple Developer Program member to be able to create a push notification certificate.

To generate a universal client SSL certificate:

  1. Go to your Apple's dev center.
  2. In Certificates, Identifiers & Profiles, select Certificates.
  3. Click the Add button (+) in the upper-right corner.
  4. Under Production, select the "Apple Push Notification service SSL (Sandbox & Production)" checkbox, and click Continue.
  5. Choose the explicit App ID that matches your bundle ID from the App ID pop-up menu, and click Continue.
  6. Follow the instructions on the next webpage to create a certificate request on your Mac, and click Continue.
  7. Click Choose File.
  8. In the dialog that appears, select the certificate request file (with a .certSigningRequest extension), and click Choose.
  9. Click Generate.
  10. Click Download and save the file (aps.cer).
  11. Click Done.

Generate the SSL certificate for Push Notifications for WordPress

  1. Load aps.cer in the Keychain Access double-clicking on it.
  2. From the Keychain Access application select the certificate (search for "Apple Push Services") and press the right mouse button.
  3. Select "Export" and save it as Certificates.p12 using a password that you remember.
  4. From the command line, in the same directory where you have saved the certificates enter this command:
    $ openssl x509 -in aps.cer -inform der -out Cert.pem
  5. Then, from the same position enter this:
    $ openssl pkcs12 -nocerts -out Key.pem -in Certificates.p12
    It will ask an import password (the one you have used in step 3) and then a secure password for the certificate (the one you will use in Push Notifications for WordPress).
  6. At this point merge the certificate and the key together:
    $ cat Cert.pem Key.pem > ck.pem
    The ck.pem file will be the one you have to use in Push Notifications for WordPress.

Configure Push Notifications for WordPress

If you have followed option 1, then:

  1. Go to Push Notifications → Settings → iOS tab.
  2. Check Use HTTP/2-based Apple Push Notification service (APNs)
  3. Enter the Bundle ID of your app.
  4. Enter the Key ID generated.
  5. Enter your team ID.
  6. Paste the content of the p8 file you have generated, as is.
  7. Click Save Settings.

Else you have to follow those steps for option 2:

  1. Go to Push Notifications → Settings → iOS tab.
  2. Click the Upload button.
  3. Drag and drop the ck.pem file generated.
  4. Click Select.
  5. Enter the password you have selected for the certificate.
  6. Click Save Settings.

With the new certificate system implemented by Apple you can use the same certificate both in distribution and development.

Renew a Universal Push Notification Client SSL Certificate

To renew a universal push notification client SSL certificate:

  1. Go to your Apple's dev center.
  2. In Certificates, Identifiers & Profiles, select App IDs.
  3. Choose the explicit App ID that matches your App ID from the pop-up menu, and click Edit.
  4. Press Create Certificate... under Production SSL Certificate, follow the instructions on the next webpage to create a certificate request on your Mac, and click Continue.
  5. Click Choose File.
  6. In the dialog that appears, select the certificate request file (with a .certSigningRequest extension), and click Choose.
  7. Click Generate.
  8. Click Download and save the file (aps.cer).
  9. Click Done.

Then follow Generate the SSL certificate for Push Notifications for WordPress and Configure Push Notifications for WordPress to use the renewed certificate in Push Notifications for WordPress.

  • Push Notifications for WordPress

    • Documentation
    • FAQs
    • What are the differences between Push Notifications for WordPress and Push Notifications for WordPress (LITE)?
    • Features
    • Changelog
    • Configuring iOS Push Notifications
    • Configuring Android Push Notifications
    • Configuring Safari Push Notifications
    • Configuring Web Push Notifications
    • Configuring Telegram Bot
    • Push Notifications library for iOS
    • Push Notifications library for Android
    • Local Cloud for iOS

      Local Cloud for iOS
      iPad / iPhone / Mac / Windows
      Picture Transfer for iOS

      Picture Transfer for iOS
      iPad / iPhone / Mac / Windows
      File Transfer for Mac

      File Transfer for Mac
      Mac
    Delite Studio S.r.l. © 2011 - 2019. All Rights Reserved. — P. IVA e Cod. Fisc. IT03402240042 — Privacy Policy
    We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkMore info