推送通知在被删除之前在队列中等待多长时间? [英] How long does a push notification sit in queue before being removed?

查看:28
本文介绍了推送通知在被删除之前在队列中等待多长时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在挖掘苹果为客户端推送通知的一些数据,但我一直无法找到答案是推送通知在离线设备的队列中等待多长时间已移除.

I've been digging around trying to uncover some data for apple's push notifications for a client and something I have been unable to find an answer to is how long a push notification will sit in queue for an offline device before it will be removed.

可能有很长一段时间,例如 2-3 个月,设备可能处于非活动状态和关机状态.我只是想知道在通知被自动删除之前我可以等待多长时间等待发送到离线设备(这就是我理解的情况).

There maybe long periods of time, 2-3 months for example, in which the device maybe inactive and powered off. I'm simply interested in knowing how long I can expect a notification to linger, waiting to be delivered to an offline device, before it gets automatically removed (which is what I understand to be what happens).

推荐答案

官方开发人员文档对此并不清楚.来自 developer.apple.com:

Official developer documentation isn't clear about this. From developer.apple.com:

Apple 推送通知服务包括默认的服务质量(QoS) 组件,执行存储和转发功能.如果 APNs尝试发送通知但设备处于离线状态,QoS存储通知.它每个只保留一个通知设备上的应用程序:最后一次收到的通知该应用程序的提供者.当离线设备以后重新连接,QoS 将存储的通知转发到设备.QoS 会在删除前在有限时间内保留通知

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 QoS stores the notification. It retains only one notification per application on a device: the last notification received from a provider for that application. When the offline device later reconnects, the QoS forwards the stored notification to the device. The QoS retains a notification for a limited period before deleting it.

但根据 PCWorld,这是 28 天:

But according to PCWorld, it's 28 days:

如果应用程序正在运行,它会立即收到通知.如果应用程序未运行,通知保留在手机中在应用程序下次启动时消耗.如果 iPhone 离线时发件人尝试发送,APNS 尝试发送通知28 天.

If the app is running, it gets the notification immediately. If the app isn't running, the notification is held in the phone to be consumed at the app's next launch. If the iPhone is offline when the sender attempts delivery, APNS attempts to send the notification for 28 days.

虽然 2009 年可能是 28 天,但如果今天有所不同,我也不会感到惊讶.文档中的歧义是 Apple 随意更改此超时期限的绝佳借口.

While 28 days may have been true in 2009, I wouldn't be surprised if its different today. The ambiguity in the documentation is a great excuse for Apple to change this timeout period willy-nilly.

这篇关于推送通知在被删除之前在队列中等待多长时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆