1

For Android devices I am using dryRun attribute to control message is delivered to device or not, generally I have used this parameter to check the pntoken is invalid or not without sending a sample message to device.

I am searching for same attributes or a way to check whether token is valid, expired or invalid for IOS devices.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Ahmet Karakaya
  • 9,899
  • 23
  • 86
  • 141

2 Answers2

0

There is no Dry run option for iOS but you might want to go with message without any alert.

{
    "aps": {
      "category": "categoryName"
    }
}

With above payload call will go through but nothing should show up on the device.

Ramneek Handa
  • 53
  • 1
  • 10
-1

Based on this documentation, to run a quick test of your push notification setup for Apple Push Notification Service (APNS), use the Send Test Notification page.

Here are the steps that you need to do.

  1. Enter a connection token string in the Recipient field, OR search for a recipient by clicking Search, and then select one of the search results. By default, the Search results list displays the five devices most recently registered for your connected app.

a. To find other devices, enter a user name in the Search text box.

b. Click Go to generate a list of all devices currently registered under that user name.

  1. Optionally, for Alert, enter an alert message or dictionary per Apple’s specifications.

  2. For Badge, enter a badge number or 0 for no badge.

  3. For Sound, enter the name of a sound file in the application bundle, or enter default to use the system default alert sound.

  4. Optionally, to use a custom payload, enter your payload’s JSON value in the Custom Payload field.

  5. Click Send to send the test push notification, or click Clear to reset the form.

For more information, check this SO question and this thread if it can help you.

Community
  • 1
  • 1
KENdi
  • 7,576
  • 2
  • 16
  • 31