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

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

问题描述

我们的应用程序使用APNS收到推送通知。然而,我们的客户声称他们的一些设备没有收到通知,并辩称他们必须确保通知交付100%。但我看过<一个href=\"http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12\">somewhere这是APNS不是100%可靠的,应该有其未能发送通知的情况下。

我目前在恐慌我们如何能够确保APNS随时接收。我已阅读, 可能APNS未送达(设备可以脱机)的情况下。但是,这表明,即使该设备是联机(WiFi或3G)我们的测试中,有时APNS均未交付。

有可能APNS不会传递任何具体案例?或者是有什么我们(开发商)可以用codeS做,以确保接收的所有通知?我在code做的是刚刚注册应用程序来远程通知,写didRegisterForRemoteNotificationsWithDeviceToken,则抛出该设备令牌到我们的服务器。

任何帮助将是AP preciated,为我们的客户几乎杀了我们,如果所有没有收到APNS他们的设备!


解决方案

  1. APNS是基于苹果公司的服务器,而苹果不提供有关成功的消息传递任何保证。

  2. 如果应用程序是开放的(即正在使用的应用程序用户),而通知到达,iOS的犯规显示通知消息,你需要处理它。

  3. 的通知显示出来,只有当应用程序被后台或杀害。

  4. 也实现了对服务器端的反馈服务;将帮助你摆脱多余的老令牌(谁删除了直通设置应用程序或禁用通知用户)。

  5. 不要发送太多通知到设备的时间在短期内,怎么APNS缓存只有1消息/设备(如果设备脱机)。因此,当设备联机它可以提供的信息。我不知道多久的消息,虽然缓存。

或只是实施推... http://pusher.com

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.

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.

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.

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

解决方案

  1. APNS is based on Apple Servers, and Apple doesn't give any guarantee on successful message delivery.
  2. If the app is open (i.e. the user is using the app) while the notification arrives, iOS doesnt show a notification message, you need to handle it.
  3. Notification shows up only when the app is backgrounded or killed.
  4. Also implement feedback service on your server side; will help you get rid of old unwanted tokens(users who deleted the app or disabled notifications thru settings).
  5. Dont send too many notifications to a device within a short span of time, coz APNS caches only 1 message/device (if the device is offline). So it can deliver the message when the device comes online. Am not sure how long the message is cached though.

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

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

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