1
votes

I register for push notifications with my device with my device token from APNS. I've registered on channel A, but never receive notifications. Is there an easy way to troubleshoot this?

1

1 Answers

3
votes

This is a question we get a lot. This most often is due to the fact that the device push registration token invalid. There are many reasons why a token will become invalid. Very often it is due to the user deleting the app from their device. If they reinstall, it will need a new push token.

The best practice is to make sure that the token is valid by asking for the token every time the app cold starts - meaning 1didFinishLaunching` is invoked. Caching this token on the device and comparing it with each fetch will let you know if the currently registered token has been invalidated. For more details on best practices, please read PubNub KB article, Can I prevent my iOS end users having an invalid registration token?.

To troubleshoot push notification issues with PubNub (even if they are not PubNub root cause), please review How can I troubleshoot my push notification issues. This will layout step by step the process for getting to the root cause of the issue. This also works for PubNub GCM push notification issues.