gpt4 book ai didi

ios 应用程序 - 从后台(?)模式定期更新

转载 作者:行者123 更新时间:2023-11-29 02:39:29 25 4
gpt4 key购买 nike

我希望我的应用程序在我的应用程序后台运行基于 HTTP 的天气请求。我相信我不能使用推送通知,因为我必须跟踪用户特定地理位置和他们关注的其他用户特定地点的天气。因此,如果单个应用程序能够每小时自动请求所有数据,那就更好了。有人可以指出我如何解决这个问题的正确方向吗?谢谢EL

最佳答案

为此,如果您的目标是 ios7 及更高版本,请使用Background App Refresh。以下是如何在您的应用中启用它并调用方法在后台更新的教程。

Background App Refresh Tutorial

But you cannot control that your app automatically wakes up to fetch data every hour because background app refresh doesn't allow this to happen. The OS itself gives time to perform and execute a specific method which has been registered depending on the frequency of your app use. And users can also switch off background app refresh for your app in settings of iOS

关于ios 应用程序 - 从后台(?)模式定期更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25963979/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com