Alex Cebotari
Alex Cebotari

Reputation: 291

Apple push notification time to live

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

Answers (1)

Eran
Eran

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.

(Source)

Upvotes: 2

Related Questions