65 comments

[ 3.1 ms ] story [ 140 ms ] thread
"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.

So the limit is increased to 1 minute? Is it possible to run a continuous task in the background (like foreground task in Android)?
I do not know. It says 'minutes' so I guess it's more than that.
How is this different from beginBackgroundTask? https://developer.apple.com/documentation/uikit/app_and_scen...
That 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".

This could be handy for things like cronios(https://routinehub.co/shortcut/1267) which really spiffs up Shortcuts.
No need, that’s now baked into the Shortucts app itself.
I'm really keen on getting my hands on it. I have a shortcut that downloads videos from youtube and puts them into a folder. If I to be able to have a shortcut that does in in background while my phone is charging, that would be amazing.
Oh, will this finally fix youtube uploading on mobile?
Apps 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
I 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.
And I’m also sure it’s abused to heck on Android.
Oreo 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)
If Spotify doesn't finally use this to download songs without requiring me to open the app then I'm going to riot
I stopped using Spotify exactly because quality of their apps is just not acceptable.
Just curious, What do you use instead?
Apple Music is pretty killer. No complaints.
Is the catalog comparable? Does it have anything like Discover Weekly?
They'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.
I 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.

I use Apple Music + bring a lot of my personal collection into it. Luckily it also is able to sync this collection across devices.

I believe that the catalogue in Spotify is a bit better, at least I didn't see "this song is not available in your country" messages in Spotify. In Apple Music I see it all the time.

My thoughts:

Apple Music is so much more baked into the Apple ecosystem, isn’t a rip off (as I might expect), and doesn’t have crappy selection (as I was afraid of — it has pretty much all of the niche stuff I didn’t expect it to).

iCloud and Apple Music are just part of the device purchase for me tbh. The whole thing is supposed to work together, and it does for the most part.

Someone mentioned regional licensing issues on Apple Music, which makes sense. I have not seen that yet in the US.

On iOS? This feature is new in iOS 13, so there was no way Spotify could have offered this capability before, right? Of course, there is no such limitation for Apple's apps.
I'm not complaining about this feature, I'm talking about overall feeling of their priorities. It took them ages to have an Apple Watch up with folks like VOX had it no time. Their priorities are unclear, highly voted feature take ages to appear in the apps, the apps itself look like compromise and attempt to save on developers and reuse as much of web version as possible. It just doesn't feel like a carefully designed experience. I'm not saying Apple Music is perfect or anybody else, I just choose the less annoying thing for myself.
Background transfer service could do this. Also, background fetch and background notifications both allowed arbitrary background execution, but only up to 30 seconds.

This feature replaces background fetch.

Netflix seems to make it work just fine with their Smart Downloads feature
I use apple music because of the homepod but i miss Spotify. Discover weekly was good, automatic genre stations were good and didn’t repeat themselves and it has a much better ecosystem of custom curated playlists compared to apple. Apple music ux is a bit clunky at times and Spotify buffered songs better
Spotify has been somewhat deceptive when talking about the APIs they've been given before, so I'm not particularly hopeful.
Couldn’t you do this with silent push notifications that you could use to make the app download new content?
That 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.
Hopefully 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.
As 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!
Can 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?
Not 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).

That 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.
This 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.

Android has clamped down on background activity. You can also install a firewall to block all unapproved network io, even Google's.
Android 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.

Background 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.
Agreed. I’m very concerned about the impact this will have on battery life and general performance.
This 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.
You 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.
Frankly, 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.

IMO, any app that needs to download file sin background needs this. Audible and Pocket Casts for me personally because there are times when I want to download files for offline use and I have to keep the app open till the download is not complete.
On Apple's platforms you can get this with a background NSURLSession. It lets you express concepts like "Download this URL at a convenient time, preferably when the device is plugged in and connected to Wifi" or "Start downloading this now, but keep going even after this app is closed."

It's definitely more work to figure out than regular foreground URL fetching, though.

https://developer.apple.com/documentation/foundation/url_loa...

And unfortunatelly iOS version doesn't use background tasks. So when in background it won't sync any of your photos. And app will also warn you about that.
I'm quite confident they'll give it its own permission flag, ask you about it, and ensure that any apps which use it will work without it.

I'd love for Dropbox to be able to upload my camera photos without requiring me to manually open the app every couple minutes.

Which is why both UWP and Android are increasingly adding more restrictions on background tasks as well.
to be fair, background tasks can also be really cool. for example voice com. which does not need your phone to be awake anymore... like discrod currently does...
As 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.

Some 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.
Those apps can use geofencing API for these purposes.
Not if the phone needs to update while it's location hasn't changed.
I suspect notifications are abused too. I'm uncertain, but doesn't receiving a notification run an app?
They 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.

Does anyone know if we can use GPU (metal) with this new API. It wasn’t possible before.
Not sure, but they give examples of training machine learning models in the background when connected to power, so it's quite likely.
I wonder if this is the mechanism used by the new Shortcuts time triggers.