Get Topic Id from Device Token in Apple Push Notification for DeviceTokenNotForTopic exception

1.6k Views Asked by At

Currently I'm using Pushy to send Push Notification for iOS devices. Everything is working fine, except I'm getting exceptions for some devices with response (DeviceTokenNotForTopic)

Do we have any way to decode Device Token to get Topic associated?

The device token example as 195d2ab5bce448b692dbb6de91452e0fbac0e6c09a599525bce52accc8a6b34a

Thanks,

1

There are 1 best solutions below

0
On

DeviceTokenNotForTopic can occur for the following reasons:

  1. The iOS Bundle ID was changed since device was registered for notifications
  2. The iOS Bundle ID configured in the Pushy Dashboard doesn't match the actual Bundle ID of the app installed on the device
  3. The iOS device uninstalled your app, rendering the device token invalid.
  4. The APNs Auth Key you uploaded to the Pushy Dashboard belongs to a different Apple Developer Account than the one your app is distributed under.

Please check the following:

  1. Do the Pushy device tokens you're trying to send still have your app installed on those devices?
  2. Does the iOS Bundle ID in Pushy Dashboard precisely equal the Bundle ID string in Xcode? Copy-paste to make sure there are no typos
  3. Please uninstall your app completely on a test device. Install it and call pushy.register(). What device token is returned? Try sending a notification immediately to that device.
  4. Please ensure you uploaded an APNs Auth Key to the Pushy Dashboard from the right Apple Developer Account that owns the app.