[英]iOS : perform task in background when app is force quit by user
In iOS application, I want to upload data on server when internet available.在 iOS 应用程序中,我想在互联网可用时在服务器上上传数据。 Now problem is, if user has force quit the application then how I can re-invoke the application or can do task in background when internet is available?
现在的问题是,如果用户强制退出应用程序,那么我如何重新调用应用程序或在互联网可用时在后台执行任务? Is there any possible way in iOS?
在iOS中有什么可能的方法吗?
Apple is not allowing to run code after the user force quits the app.在用户强制退出应用程序后,Apple 不允许运行代码。 There are just some special rules to reactivate the app like blutooth implementation.
只有一些特殊规则可以重新激活应用程序,例如蓝牙实现。 For normal server task, you just can work while the user not force quits the app.
对于普通的服务器任务,您可以在用户不强制退出应用程序的情况下工作。
Not even with special rules you can reactivate your app.即使有特殊规则,您也无法重新激活您的应用程序。 Bluetooth reactivation and co only works if the app gets killed by memory issues or something similiar.
蓝牙重新激活和 co 仅在应用程序被内存问题或类似问题杀死时才有效。 If the user force quits the app, the app will not run until next app start.
如果用户强制退出该应用程序,该应用程序将不会运行,直到下一个应用程序启动。
The iOS will give you 3mins to run a background task. iOS 会给你 3 分钟的时间来运行后台任务。 Take a look at https://medium.com/@abhimuralidharan/finite-length-tasks-in-background-ios-swift-60f2db4fa01b
看看https://medium.com/@abhimuralidharan/finite-length-tasks-in-background-ios-swift-60f2db4fa01b
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.