I am sending push notification via APN from my server.
lets say, there is an event at 3 PM so for this at 1 PM i am sending the push notification to all of my users from my server that there is an event at 3 PM. Now, if some devices are offline (not connected to internet) then they will not receive the push notification right away instead they will get the notification when connected to the internet. So if user connects to the internet at 5 PM then there is no use of receiving the push notification at that time.
So my question is, can we cancel/stop this push notifications being sent after particular time?
Thanks in advance!!
You can send an expiration date, so the push notification will be discarded.
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html