APNs authentication configuration

更新时间:
复制 MD 格式

To use the push service for an iOS application, configure authentication in the Mobile Push console. You can use two authentication methods: certificate-based (p12) and token-based (p8). This topic describes how to configure both methods.

Method 1: Authenticate using a p12 certificate

Prerequisites

Obtain a push certificate. For more information, see iOS Push Certificate Configuration Guide.

First-time certificate upload

  1. Log on to the EMAS console and select Mobile Push.

  2. In the navigation pane on the left, select Overview to go to the Overview page.

  3. If you have not configured a certificate, a message appears: Development certificate not configured. Production certificate not configured. Configure now? Click OK to go to the Application Configuration page.

  4. Set Authentication Method to p12 Certificate. Then, upload your .p12 certificate and enter the Push Certificate Password.

    Important

    The push certificate must be password-protected to be saved. It takes effect only after successful validation.

  5. Enter a test token and click Test Push.

  6. After the test is successful, click Save to complete the configuration.

    After the certificate is uploaded, a message appears: The development/production environment certificate will expire on yyyy-MM-dd hh-mm.

Important
  • The new p12 certificate takes effect for online pushes within 10 minutes.

  • Dynamic Island on iOS supports only p8 certificates.

  • If you configure both p12 and p8 certificates, p8 certificates are used by default for regular notification pushes.

image

Certificate is about to expire

Warning
  • Within 30 days before the certificate expires, a message appears in the interface to remind you to replace the certificate. We will also send you multiple expiration reminders by text message and email. For more information, see How to Subscribe to or Unsubscribe from iOS p12 Certificate Expiration Reminders.

  • After the certificate expires, your push service will be interrupted. To avoid service disruptions, monitor the certificate expiration date and replace it promptly.

When the certificate is about to expire, the system displays the following message. Update the certificate promptly. For more information, see First-time certificate upload.

image

Certificate has expired

Warning

After the certificate expires, you cannot send push notifications to iOS. To continue using the push service, replace the certificate.

After the certificate expires, the system displays the following message. Update the certificate promptly. For more information, see First-time certificate upload.

image

Method 2: Authenticate using a p8 certificate

Prerequisites

Obtain the Team ID, Key ID, and p8 certificate from the Apple Developer website.

Procedure

Obtain the Team ID

  1. Log on to the Apple Developer website to access your developer account.

  2. On the home page, find Membership Details and record the Team ID.

    image

Obtain the Key ID and p8 certificate

  1. On your developer account home page, scroll to the Program Resources area.

  2. Click the identifier icon to go to the Certificates, Identifiers & Profiles page.

    image

  3. On the Certificates, Identifiers & Profiles page, select from the navigation pane on the left Keys, and click + to create a new one.

    image

  4. Enter a Key Name, select the APNs service, and click the Configure button for APNs.

    image

  5. Set Environment to Sandbox & Production and click Save.

    Important

    The console supports only p8 certificates of the Sandbox & Production type.

  6. Return to the Register a New Key page and click Continue.

  7. On the next page, click Register.

    image

  8. Click Download to download the certificate and record the Key ID.

    image

Upload the p8 certificate

  1. Log on to the EMAS console and select Mobile Push.

  2. In the navigation pane on the left, select Overview to go to the Overview page.

  3. If you have not configured a certificate, a message appears: Development certificate not configured. Production certificate not configured. Configure now? Click OK to go to the Application Configuration page.

  4. Set Authentication Method to p8 Certificate. Then, upload your downloaded p8 certificate and enter the Key ID and Team ID.

  5. In the test certificate area, select a Test Environment.

  6. Based on your testing needs, select a Device Token type and enter the device token or device ID for testing.

  7. After you complete the settings, click the Send Test button.

  8. After the test is successful, click Save to complete the configuration.

    Important
    • The new p8 certificate takes effect for online pushes within 10 minutes.

    • Dynamic Island on iOS supports only p8 certificates.

    • If you configure both p12 and p8 certificates, p8 certificates are used by default for regular notification pushes.

    image