0

Just out of curiosity, do sandbox push notifications for iOS expire? The reason I am asking is, yesterday my push notifications were working perfectly for my device and since then I haven't changed the code. Today I wanted to push another notification to further test and all of a sudden, no notification was received. I had to reinstall the app and get another token for it to work.

So, do sandbox tokens expire, or do I possibly have a more serious issue at hand when I go to live?

Christopher Smit
  • 813
  • 11
  • 22
  • you can check this.https://stackoverflow.com/questions/19782470/what-happen-if-a-apns-device-token-expired – Kumar Reddy Dec 20 '17 at 16:48
  • I know about that and I am following those steps to save the token and so on. But if I leave the project for a while and I try to send a notification again at a later stage with the token that worked a few hours ago without changing my code, nothing happens. I need to reinstall the app and get a new token for it to work, but that too will stop working again after a few hours – Christopher Smit Dec 20 '17 at 17:39
  • as of now nowhere it is documented regarding the token expiry. But as an experience and from an architectural point, device tokens will not expire for a smaller duration of time. Because it will create a lot of effort for APNS to generate a new token every time if that is the case. Anyway, you can check your server logs to see the acknowledgement you receive from APNS if it is a failure to deliver a notification. – Kumar Reddy Dec 20 '17 at 17:43
  • Thanks, I hope this is just something weird with the sandbox environment. It seems like sometimes it pushes and sometimes it doesn’t. I literally just received 5 notifications that I tried sending earlier, maybe they just took a while to come through. If you want you can post your last comment as an answer and I’ll accept. – Christopher Smit Dec 20 '17 at 17:45

1 Answers1

1

As of now nowhere it is documented regarding the token expiry. But as an experience and from an architectural point, device tokens will not expire for a smaller duration of time. Because it will create a lot of effort for APNS to generate a new token every time if that is the case. Anyway, you can check your server logs to see the acknowledgement you receive from APNS if it is a failure to deliver a notification.

Kumar Reddy
  • 766
  • 6
  • 15