My application is using remote notification to remind users of planned actions. User may be informed even after a few months.
Application is updating device token during each time it starts (sends the received token to the server).
But there is a problem. Sometimes device token becomes invalid. (backend-service got error "Invalid token" from APNS). I know that it's normal that device token can change. But there is a case when user set reminder on after a few months and doesn't use app during this time.
How do I update device token when it was expired and when application is turned off?