HOWTO remove device tokens received by Apple APNS feedback

后端 未结 6 1996
慢半拍i
慢半拍i 2021-02-09 19:39

I am successfully fetching Apple APNS feedback data via PHP. The structure that I am getting (after some processing) looks something like this:

timestamp

device

6条回答
  •  花落未央
    2021-02-09 19:55

    @fyasar,

    So your recommendation is to store the device token against device id(or some key). When a feedback is received for a device token, remove that device token row from DB, right? If have understood right, that wouldn't work in scenario were a user installs app, uninstalls it and then installs it again all with in a short duration and the feedback service was queried only after all this happened. In this case, if timestamp in feedback is not considered, device token will be removed which is incorrect as user has again installed the app and reregistered for push notification.

    My question is this, as suggested in apple doc and many blogs, on registration, when device token is persisted, timestamp has to be persisted along with it. What time zone's ISO time should be persisted or what is the time zone on which feedback service returns the timestamp.

提交回复
热议问题