6 ms·
Apple iOS Background Tasks
- 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.
- hprotagonist 7y agoThis could be handy for things like cronios(https://routinehub.co/shortcut/1267 https://routinehub.co/shortcut/1267) which really spiffs up Shortcuts.
- akmarinov 7y agoNo need, that’s now baked into the Shortucts app itself.
- cordite 7y agoOh, will this finally fix youtube uploading on mobile?
- votepaunchy 7y agoAnd Nikon SnapBridge!
- bithavoc 7y agoApps are able to upload and download in background with iOS 12 by telling iOS to upload or download it for you and wake up the app once the upload is done(failed or succeeded). It even retries on connection fails, etc. It's called Background Transfer Services
- harshaw 7y agoI haven't been an IOS developer in year but there used to be (in the IOS7 days) a way to run some limited tasks in the background, especially to handle push notifications IIRC. Sounds like this is an improvement - but isn't this years and years overdue? I assume this is trivial on Android.
- isatty 7y agoAnd I’m also sure it’s abused to heck on Android.
- kkarakk 7y agoOreo added limits on background execution and they're going to further tighten the screws later. it doesn't even matter actually as the way OEMs implement killing apps to save battery if all unique(for eg huge rams aren't even used on xiaomi devices as the task scheduler will kill any apps above the limit of 6)
- omni 7y agoIf Spotify doesn't finally use this to download songs without requiring me to open the app then I'm going to riot
- p2t2p 7y agoI stopped using Spotify exactly because quality of their apps is just not acceptable.
- ardit33 7y agoJust curious, What do you use instead?
- matt-attack 7y agoApple Music is pretty killer. No complaints.
- BadassFractal 7y agoIs the catalog comparable? Does it have anything like Discover Weekly?
- cachvico 7y agoThey're very comparable (I'm a paid user of both). I've discovered realms of amazing music through the recommendation engines of both of them.
- r00fus 7y agoI find more stuff on Spotify than Apple Music. I am a huge Apple fan, but Spotify is better in so many ways (Discover weekly and other lists like “piano ballads” - which while not perfect are better than I get on Apple Music) Maybe it’s because my wife and I share music lists or something but the recommendation engine in Apple Music is not good for me.
- adrr 7y agoCouldn’t you do this with silent push notifications that you could use to make the app download new content?
- dangwu 7y agoThat kind of work is more on the order of seconds - not minutes. And it obviously requires a service-side component (push notifications) while this doesn’t.
- orev 7y agoHopefully this allows real alarm clock type apps that you don’t have to have in the foreground. But reading the description I’m not sure that’s the purpose.
- keyle 7y agoAs a developer I can't believe this wasn't a thing already. As a user, I'm scared of it being abused / misused. And I trust myself more as a user than the average guy as a developer!
- rolltiide 7y agoCan anyone from Apple chime in about the vetting process which results in Apple releasing features 5-8 years behind similar offerings, when it isn't the first?
- illumin8 7y agoNot from Apple, just a happy customer. I'm actually thankful that Apple forces developers to respect my battery life. Battery life on Android has been a shit-show for years because any app can burn your battery down by constantly downloading who knows what in the background (probably ads).
- joemag 7y agoThat was the single biggest difference I observed when I switched from Android to Apple 4 years ago. I no longer had periodic episodes where my phone would burn through 80% of my battery in 30 minutes, while getting lava hot. Not sure if Android has figured background tasks in the last 4 years, but the inconvenience of not having background tasks was greatly outweighed by having predictable battery life and performance.
- koyote 7y agoThis is something that has not really been an issue with android for many years. My OnePlus 6t lasts at least 2 days with moderate use. Other phones last even longer.
- kevin_thibedeau 7y agoAndroid has clamped down on background activity. You can also install a firewall to block all unapproved network io, even Google's.
- Yetanfou 7y agoAndroid gives both the user as well as the developer more freedom to do as they see fit. This can lead to abuse or just sloppy programming which drains power. It can also lead to devices running for a week on a single charge, running only such software as the user has chosen and not reporting any spurious data to the likes of Apple and Google. I've seen examples of both scenarios and have been using Android devices in the latter category for about 8 years now. Freedom comes with responsibility,, a burden which is not for everyone to carry. Those who cannot or do not want to carry it have to trust someone else - Apple, Google, Huawei, Samsung, Nokia, etc - to carry it. Those who can and are willing to do so have the opportunity to tailor Android to their own needs. I'm in the latter category and would not trade places with the former.
- trixie_ 7y agoBackground tasks are partly to blame for a device's performance degradation over time - see Windows and Android devices. I have more apps than anyone on my iPhone and the performance is still great. I can just imagine if all the stupid games I download were trying to run background tasks as well. I hope Apple lets us control what apps have permission to do this. Also I hope 'low power mode' auto-disables background tasks. Developers are going to take advantage of this in a way that often will not benefit the user.
- bottled_poe 7y agoAgreed. I’m very concerned about the impact this will have on battery life and general performance.
- pjscott 7y agoThis could be great for battery life, if it allows the system to better schedule tasks that were going to happen anyway. For example, consider a photo app that auto-tags people's faces: rather than running that battery-draining computation while you're using the app, it could run at 4 AM when your phone is plugged in and has been locked for a while.
- ozmbie 7y agoYou can already set "background app refresh" permissions on a per app basis in iOS12 (and it is disabled system wide if you're in low power mode). I hope this carries through to the new background tasks in iOS13.
- joemag 7y agoFrankly, looking at all my apps, the only use-case I have for background tasks is Google Photos, who I want to automatically upload my recent photos to the cloud. A very distant second would be communication apps running some kind of reconciliation once or twice a day, in case some notifications were missed. I have no desires for any of my other apps to execute any tasks in the background.
- 7y ago
- kccqzy 7y agoAs a user I'm going to turn this off as soon as possible. The background app refresh feature is widely misused by app developers for tracking purposes, and it destroys battery life. I see no drawback when apps can't do things in the background. Maybe you'll now have to wait a few extra seconds for your mail app to download your latest mail or for your weather app to fetch the latest weather. It's really no big deal. Of course this is my particular personal preference. YMMV.
- xenospn 7y agoSome apps depend on location information and that can change when the app isn’t running (think alert system or apps that track stuff). But even for these, I don’t see why they can’t wake up and go back to sleep after 5 seconds, and leave all the heavy lifting to a server in the cloud that can send a notification if anything more serious is necessary.
- m463 7y agoI suspect notifications are abused too. I'm uncertain, but doesn't receiving a notification run an app?
- lathiat 7y agoThey explicitly mentioned in the keynote that they are closing a couple of loopholes used for tracking including browsing for nearby bluetooth and wifi networks instead of actually requesting your location with the location API. You can now also approve location requests each time they occur, instead of having to allow them always/when using app. I imagine this is exactly why.
- ozgung 7y agoDoes anyone know if we can use GPU (metal) with this new API. It wasn’t possible before.
- saagarjha 7y agoNot sure, but they give examples of training machine learning models in the background when connected to power, so it's quite likely.
- Veen 7y agoI wonder if this is the mechanism used by the new Shortcuts time triggers.