应用程序处于后台时的iOS通知 [英] iOS Notification when App is in Background
问题描述
我想知道是否可以在iOS中启动后台进程。在我的后台进程每隔30分钟就应该调用一个函数,以便在我的数据库中检查是否有新消息等,以便发送通知。我不想实现推送通知。
我不知道在哪里实现这个功能,如果有覆盖功能,例如在AppDelegate中。
i want to know if it is possible to launch a background process in iOS. In my background process every 30 minutes there should a function get called, in order to check in my database if there are new messages, etc in order to send a notification. I don't want to implement push notifications. I don't know where to implement this feature, and if there are override functions e.g. in the AppDelegate.
感谢您的帮助,
hannes
Thanks for your help, hannes
推荐答案
你想要的是背景提取,从iOS 7开始提供:
What you want is called "Background Fetch" and is available starting from iOS 7:
https://www.objc.io/issues/5-ios7/multitasking/
这篇关于应用程序处于后台时的iOS通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!