Reputation: 291
It is possible to indicate time to live value for Apple push notification? For example if push was not delivered in 10 sec to kill them, or to ignore them when it will arrive.
Upvotes: 1
Views: 3531
Reputation: 393936
Yes, it's possible, if you are using one of the enhanced binary formats which contain the expiration property.
Expiration date
4 bytes
A UNIX epoch date expressed in seconds (UTC) that identifies when the notification is no longer valid and can be discarded.
If this value is non-zero, APNs stores the notification tries to deliver the notification at least once. Specify zero to indicate that the notification expires immediately and that APNs should not store the notification at all.
Upvotes: 2