Search code examples
iosnotificationsapple-push-notificationstokenpush

APNS DeviceToken gets invalid after some time


I have some strange kind of problem with my iOS 13 device and I am not sure what the reason behind that is.

I get a valid APNS token(normal non VOIP pushes) which Im using to push to multiple times a day. This can go on for 2-7 days. But after doing pretty much nothing(app is not opened) my token gets invalid. I get an 400 error "BadDeviceToken" which makes no sense at all to me. If the token worked and I didn't request a new one, how can it get bad? The strangest about all of this is that the same app also requests VOIP tokens which are usable forever and can still be used even if the normal token gets invalid.

Anybody else with this problem or somebody who can point me in the right direction ?

Thanks guys


Solution

  • Switching from sandbox environment to production problem is gone.