IOS api 不断调用 [英] IOS api call continuously

查看:24
本文介绍了IOS api 不断调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有一个应用程序,当博客中有新文章时,用户可以在其中设置余数.并且我们可以通过发送api请求来查看博客中是否有新文章.我应该如何让应用程序不断地向 api 发送请求.有没有其他方法可以做到这一点,或者我们应该不断地向 api 发送请求.如果是这样,我们应该在多少时间间隔内发送.

If I have a app in which the user can set remainders for when there is a new article in a blog. And we can find out if there is a new article in the blog by sending a api request. How should I make the app to continuously send requests to the api. Is there an other way to do this or should we just keep sending requests to api continuously. And if so in how much time interval should we send it.

谢谢

推荐答案

在这种情况下,将更新检查委托给某种服务器端将是理想的选择.服务器端逻辑可以向您的客户端发送推送通知.

In this case delegating the check for updates to some sort of server side would be ideal. The server side logic could send push notifications to your clients.

这篇关于IOS api 不断调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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