APNS(Apple 推送通知服务)可靠性 [英] APNS (Apple Push Notification Service) reliability

查看:42
本文介绍了APNS(Apple 推送通知服务)可靠性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的应用程序使用 APNS 接收推送通知.但是,我们的客户声称他们的一些设备没有收到通知,并争辩说他们必须"确保 100% 地发送通知.但我读过某处 APNS 不是100% 可靠,并且应该存在未发送通知的情况.

Our app uses APNS to receive Push Notifications. However, our client claims that some of their devices were not receiving notifications and argues to they 'must' make sure the notifications to be delivered 100%. But I have read somewhere that APNS is not 100% reliable and there should be cases which the notifications are not delivered.

我目前对如何确保随时接收 APNS 感到恐慌.我读过一个案例,可能APNS未交付(设备可能离线).但我们的测试表明,即使设备在线(Wifi 或 3G),有时也无法交付 APNS.

I'm currently panic at how we could make sure APNS to received anytime. I have read that a case which may APNS not delivered (device may offline). But our test showing that even the device is online (Wifi or 3G), sometimes APNS were not delivered.

APNS 是否有任何特定情况可能无法交付?或者我们(开发人员)可以用代码做些什么来确保收到所有通知?我在代码中所做的只是将应用程序注册到远程通知并编写 didRegisterForRemoteNotificationsWithDeviceToken,然后将设备令牌扔到我们的服务器.

Is there any specific case which may APNS will not delivered? Or is there anything we (developers) can do with codes to make sure to receive all notifications? What I have done in the code is just registering the app to remote notification and write didRegisterForRemoteNotificationsWithDeviceToken, then throw the device token to our server.

任何帮助将不胜感激,因为如果我们的客户的所有设备都没有收到 APNS,他们几乎会杀死我们!

Any help would be appreciated, for our client almost kill us if ALL of their devices not receiving APNS!

推荐答案

  1. APNS 基于 Apple Servers,Apple 不对消息成功传递提供任何保证.
  2. 如果在通知到达时应用处于打开状态(即用户正在使用应用),iOS 不会显示通知消息,您需要处理它.
  3. 通知仅在应用后台运行或终止时显示.
  4. 也在你的服务器端实现反馈服务;将帮助您摆脱旧的不需要的令牌(通过设置删除应用或禁用通知的用户).
  5. 不要在短时间内向设备发送太多通知,因为 APNS 仅缓存 1 条消息/设备(如果设备处于离线状态).因此,它可以在设备上线时传递消息.不过我不确定消息缓存了多长时间.

或者只是实现 Pusher...http://pusher.com

Or just implement Pusher... http://pusher.com

这篇关于APNS(Apple 推送通知服务)可靠性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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