Now I can reproduce the issue 100% of the time:
Register for APNS token
Reinstall app
Register for APNS token
Go offline
Send a push notification to the new token
Send a push notification to the old token
Come back online
Expected:
iPhone shows alert in Notification Center
Actual:
Notification is never shown
In my opinion Apple should not allow alerts sent to invalid tokens to overwrite queued alerts for a valid token, but I'm guessing this it not an easy thing to change.
In any case I suppose I will take your advice and implement a Notification Service Extension to attempt to work around this behavior.
Thank you for all of your help Argun.
Topic:
App & System Services
SubTopic:
Notifications
Tags: