iOS APNS“尽力而为”倒退 [英] iOS APNS "best-effort" fallback

查看:121
本文介绍了iOS APNS“尽力而为”倒退的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法理解这一点。文档中所述的APNS具有尽力交付,即无法保证交付。但是,如果我要在我的客户端/服务器应用程序中使用推送通知模型,我必须以某种方式使用它们。

I cannot seem the have my head around this. APNS as stated in the documentation has best-effort delivery, i.e. delivery is not guaranteed. However, if I am to use the push-notification model in my client/server application, I have to use them somehow.

通用模型如下所示:服务器上有新数据 - >服务器然后发送推送通知,通知客户端有新数据可用 - >客户端下载新数据。

The general model looks as follows: there is new data on the server -> the server then sends a push notification informing the client(s) that there is new data available -> client downloads new data.

问题是,如果我不能100%依赖通知,我可以使用什么样的回退机制,以便我可以确保客户收到服务器上可用的新数据?确保客户端使用APNS获得最新数据的方法是什么?

The question is then, if I cannot rely 100% on the notification to be delivered, what kind of fallback mechanism can I use so that I can ensure that the client receives the new data available on the server ? What is the way to ensure that the client has the most-up-to-date data using APNS ?

推荐答案


确保客户使用APNS获得最新数据的方法是什么?

What is the way to ensure that the client has the most-up-to-date data using APNS ?

那里使用 APNS无法做到这一点。当应用程序被带到前台时,您的客户端需要查询您的服务器以查看是否有新数据,无论您可能丢失或收到任何推送通知。

There is no way to do this with just APNS. Your client needs to query your server when the app is brought to the foreground to see if there is new data, regardless of any push notifications you may have lost or received.

这篇关于iOS APNS“尽力而为”倒退的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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