我正在开发一个带有推送通知的应用程序。
当发送方正在发送消息时接收方未连接到 WIFI/互联网,当接收方重新连接到互联网时,接收方是否会收到所有已发送的消息?
最佳答案
有一个队列将在他/她获得 Internet 访问权限后发送给用户。但是,如果用户“长时间”没有互联网,则无法保证一定会发送/接收通知。
Apple 文档对于什么时间被认为是长时间非常模糊。 (参见 documentation)
Apple Push Notification service includes a default Quality of Service (QoS) component that performs a store-and-forward function.
If APNs attempts to deliver a notification but the device is offline, the notification is stored for a limited period of time, and delivered to the device when it becomes available.
Only one recent notification for a particular application is stored. If multiple notifications are sent while the device is offline, each new notification causes the prior notification to be discarded. This behavior of keeping only the newest notification is referred to as coalescing notifications.
If the device remains offline for a long time, any notifications that were being stored for it are discarded.
但是我听说 APNS 会在大约 25-30 天内尝试重新发送通知。然而,没有官方文件支持这一点!
关于iphone - 网络连接恢复后Iphone是否收到所有推送通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17275594/