HOWTO remove device tokens received by Apple APNS feedback

后端 未结 6 2112
慢半拍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 20:00

    neat explanation @argon, however I have another question about the timestamp.

    Every time when an app enables push notification, the device token is sent to the server. Should I taken the timestamp from my server as to be persisted along with device token as didRegisterForRemoteNotificationsWithDeviceToken only gives deviceToken and not time. If my server runs in different timezone and APNS is running at different timezone, then the registration time stored( along with device token) cannot be compared with timestamp received from APNS feedback to check the sequence of register -> uninstall -> reregister.

    I presume the APNS feedback timestamp is in UTC and the timestamp the server stores along with device token has to be converted to UTC before storing the ISO timestamp. This way both the timestamp will be in same timezone and diff check will be consistent.

    please clarify

提交回复
热议问题