我想使用 iOS7 的后台获取功能以便每天 ping 服务器一次。 我不想提取任何新数据 - 但我只想知道该应用程序仍安装在手机上。
我可以启用后台获取,将最小后台获取间隔设置为 24 小时,并始终将 UIBackgroundFetchResultNoData
返回给 completionHandler
。
我不需要它每天都在准确的时间。一天一次就足够了。
Apple 会批准我在 App Store 上的应用程序吗? 我可以依靠 iOS 每天至少唤醒我的应用程序一次并执行此操作吗? 我担心如果答案总是 UIBackgroundFetchResultNoData iOS 将停止唤醒我的应用程序。
最佳答案
如果您的应用被用户终止,看起来后台获取和远程通知将不会工作。
根据UIApplicationDelegate Protocol Reference :
However, the system does not automatically launch your app if the user has force-quit it. In that situation, the user must relaunch your app or restart the device before the system attempts to launch your app automatically again.
关于ios - 使用 iOS7 Background Fetch 来 ping 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25718323/