iphone - 网络连接恢复后Iphone是否收到所有推送通知

标签 iphone ios objective-c push-notification

我正在开发一个带有推送通知的应用程序。

当发送方正在发送消息时接收方未连接到 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/

相关文章:

ios - 将 AVCaptureVideoPreviewLayer 输出裁剪为正方形

iphone - UINavigationBar 右键选择

iphone - 如何在浏览器中启动 YouTube 视频而不点击播放图标

iphone - 将 NSData 复制到 int32_t 变量中

ios - 每次架构更改时我都需要打开和关闭连接吗?

iOS/OS X 带宽管理 NSURLSession

iphone - 出现 Storyboard之前的选项卡栏项目标题

ios - Objective-C 中的 block 总是能保证捕获变量吗?

iOS swift : Separate AppDelegate for XCTest

objective-c - Swift Extension 无法向 Objective-C 类添加重载方法