在离线或飞行模式下处理远程推送通知
Handling remote push notification while offline or airplane mode
推送通知服务
我现在正在使用 OneSignal 向我的 iphone
推送通知服务
申请状态:
假设我的应用程序在后台 运行 但设备处于飞行模式。
我从一个信号发送 3 条消息“测试 1”,“测试 2”,“测试 3" 在 apns 提供的 "body" 和 "title" 中。
当我关闭飞行模式并将我的设备恢复到在线状态时,只有“测试 3”到达,剩下的“测试 1" & "测试 2" 没有出现。
是不是因为APNS通知限制?我觉得还不如2KB.Did我做错了什么?我真的需要帮助来指导我。
求助:
那么,如果设备离线,我们如何处理许多通知?
是的,APNS 只为无法访问的设备存储一条最新消息。这记录在 Apple Developer Library.
中
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 app 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.
确保后台数据不丢失的最可靠方法是将每个用户的数据存储在您的服务器上,然后使用后台通知指示您的应用从您的服务器获取最新数据而不是获取它来自通知元数据本身。
推送通知服务
我现在正在使用 OneSignal 向我的 iphone
推送通知服务申请状态:
假设我的应用程序在后台 运行 但设备处于飞行模式。
我从一个信号发送 3 条消息“测试 1”,“测试 2”,“测试 3" 在 apns 提供的 "body" 和 "title" 中。
当我关闭飞行模式并将我的设备恢复到在线状态时,只有“测试 3”到达,剩下的“测试 1" & "测试 2" 没有出现。
是不是因为APNS通知限制?我觉得还不如2KB.Did我做错了什么?我真的需要帮助来指导我。
求助: 那么,如果设备离线,我们如何处理许多通知?
是的,APNS 只为无法访问的设备存储一条最新消息。这记录在 Apple Developer Library.
中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 app 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.
确保后台数据不丢失的最可靠方法是将每个用户的数据存储在您的服务器上,然后使用后台通知指示您的应用从您的服务器获取最新数据而不是获取它来自通知元数据本身。