Configure Apple Push Notifications

This page describes the steps to configure Apple Push Notification service (APNs) with TalkJS.

Add capabilities

To ensure your app properly handles push notifications, you need to enable the following two capabilities in your Xcode project:

  • From Background Modes, select the Remote notifications capability
  • Select Push Notifications capability

Follow the Apple Developer guide on adding capabilities to your app.

Configure APNs using an authentication token signing key

To configure APNs using an authentication token signing key, add the following to the Settings page of your TalkJS dashboard:

  • a token signing key (.p8 file format only)
  • the Key ID for the authentication token signing key you want to use
  • your Apple Developer Team ID
  • a bundle ID for each app you want to receive push notifications
    • If you provide multiple bundle IDs, add the bundle IDs as a comma-separated list.

You now have configured APNs using an authentication token signing key. Authentication token signing keys don't expire, so you can set this up once and forget about it.

Obtain an authentication token signing key and Key ID

To obtain an APNs authentication token signing key from Apple, take the following steps:

  1. Login to your Apple Developer account on developer.apple.com.
  2. In the Certificates, Identifiers & Profiles section, click Keys.
  3. Click the + (plus) button to create a new key.
  4. Enter a Key Name and select the enable checkbox for Apple Push Notifications service (APNs).
  5. Click Continue, and then click Register.
  6. Apple gives you an authentication token signing key, specified as a text file (with a .p8 file extension) and displays a 10-character string with the Key ID. Save the key file and copy the Key ID.

You now have an authentication token signing key and its associated Key ID that you need to configure APNs.

Configure APNs using a .p12 certificate (deprecated)

Configuring APNs using a .p12 certificate is deprecated. Push notifications will continue to work as long as your certificate remains valid and hasn't expired.

If your certificate has expired or is marked as an "Invalid configuration", you need to configure APNs using a token signing key.