ios - 我可以运行后台线程,即使应用程序已关闭

标签 ios background background-thread background-task

我有一个应用程序,它会在特定时间提醒用户。现在,我想每 60 分钟(或其他持续时间: future 1 天、1 周......)从服务器同步数据。即使应用程序已经关闭,它也必须运行。

我也听到了很多不同的答案,但大多数是“iOS 不允许开发者创建后台线程”。有人可以帮我确认一下吗?

如果不能做后台线程,有没有其他的解决办法?

我期待听到任何人的任何答案!

谢谢, 瑞安

最佳答案

如果您只需要定期提醒用户,本地通知确实可以安排并且很容易实现。如果您需要实际更新内容,请查看后台获取:https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html

关于ios - 我可以运行后台线程,即使应用程序已关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27699505/

相关文章:

ios - 从ios中转换后的ImageView objective-c 获取图像

objective-c - NSMutableURLRequest setHTTPBody 方法导致应用程序崩溃并出现 SIGABRT 警告

ios - 如何使用后台操作管理出队单元

Android:不能使用 android.R.drawable 作为 textview 的背景图片

ios - iOS performSelectorInBackground内部的performSelectorInBackground

ios - iPhone 付费应用中的 Google Maps API

android - MIDI乐谱如下

ios - 应用程序在后台 iOS 中播放音频

Flutter:如何在 dart 的后台线程上运行函数

ios - 神奇的记录 - 在主线程 block ui 中获取,在后台返回 nil