4 ms·
"A request to launch your app in the background to execute a processing task that can take minutes to complete." Compared to the previous limit of 15 seconds,
by reimertz 7y ago
"A request to launch your app in the background to execute a processing task that can take minutes to complete."
Compared to the previous limit of 15 seconds, it's a pretty substantial change.
It seems you need to request it appropriate permissions though, so it's probably going to work similarly to how Background Fetch worked. If your app is used very seldom, your script might be running less frequent then you request.
- alvatech 7y agoSo the limit is increased to 1 minute? Is it possible to run a continuous task in the background (like foreground task in Android)?
- reimertz 7y agoI do not know. It says 'minutes' so I guess it's more than that.
- rishabhparikh 7y agoIt is possible, but not by default. Your app must request additional permissions for indefinite background execution. It's quite difficult to get your app approved with said permission.
- BoorishBears 7y agoWhat permission is that?
- NegativeLatency 7y agoLooks like it’s related to the stated use case of the app https://stackoverflow.com/a/11044108 https://stackoverflow.com/a/11044108
- kartickv 7y agoHow is this different from beginBackgroundTask? https://developer.apple.com/documentation/uikit/app_and_scenes/preparing_your_ui_to_run_in_the_background/extending_your_app_s_background_execution_time https://developer.apple.com/documentation/uikit/app_and_scen...
- eridius 7y agoThat API lets you say "don't suspend me yet, give me some time to finish my work before I go to sleep", but it's tied directly to an active session; once the app suspends, it doesn't wake up again until the user revisits it. The new background task API is "wake me up in the background at some point when the device is idle, so I can do some utility work, such as training my CoreML model with recent data".
- kartickv 7y agoThanks.