Test Development/Production Push Notification using Apple Push Notification Console

Apple announced the new Push Notification Console for testing the Development and Production push notification. The new Push Notifications Console makes it easy to send test notifications to Apple devices through the Apple Push Notification service (APNs). You can access logs that provide insights into the delivery process and leverage tools to generate and validate tokens.

1. Login to CloudKit Console

The new Push Notification Console is part of the Apple CloudKit Console. In order to access the Push Notification Console we need to login to CloudKit Console. After login you'll see this screen -

Click on the Push Notification to access Push Notification Console.

1. Send a test push notifications

The Push Notifications Console includes a new intuitive web interface that lets you easily initiate push notifications for validating the end-to-end push functionality. First of all, we need to select the application bundle identifier to send a test push notification to that application. If push notification is not enabled for the selected application then you'll see the following screen -

If you select the application have enabled the push notification then you'll see the following screen -

Once you fill in all the information you can send the test push notification to the device. The history of the messages sent through this tool makes it easy to quickly iterate by adjusting notification attributes and trying again. You can also generate the cURL command for the same notification by clicking on the Get cURL Command button at the top right.

2. Verify push notification delivery in the development environment

After APNs receives a push notification, it can undergo several state transitions before it reaches the device. The delivery of a push notification depends on a device's battery, network connectivity, and many other factors. APNs might deliver the notification immediately, defer delivery, make multiple attempts to deliver, or discard it based on those conditions.

You can use the Delivery Log to monitor a notification's delivery and give you insight into what happens to the notifications you send. To access this information, provide an apns-unique-id, an identifier that APNs return in response to each notification request.

Here is another case when we tried to send a test push notification to an offline device -

3. Device Token Validator

You can use the Device Token Validator tool to determine the validity of the device token. To verify a device token associated with a bundle ID, select the Tools from top menu and then select Device Token Validator. Now enter the device token you want to validate -

You can also generate and validate the JWT token.


Discussion

Read Community Guidelines
You've successfully subscribed to Developer Insider
Great! Next, complete checkout for full access to Developer Insider
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.