What exactly is Background App Refresh, and if I switch it off would I still get app notfications when my clients book with me or message me thru the app, would my weather app auto update, and will my ad blocker apps still work?

44 views
0

What exactly is Background App Refresh, and if I switch it off would I still get app notfications when my clients book with me or message me thru the app, would my weather app auto update, and will my ad blocker apps still work?

In: 1

Apps on iOS have a really, really weird lifecycle compared to how apps work on a PC.

On a PC, an app is “running” or “not running”. Even if you minimize or hide a window, the app is still running.

On iOS, an app has “active”, “backgrounded”, and “not running”. When an app is “active” it’s allowed to run code and do whatever it wants. When it is “backgrounded”, it is NOT allowed to run code. At any time, iOS might close a backgrounded app.

What happens when you background an app is basically iOS tells it “you are being backgrounded”. Then the app has a quick chance to say, “Wait, I need a little time to clean up.” It can request up to 10 minutes, and iOS allows it to run code for that time interval. If it hasn’t said, “I’m done cleaning up!” by then, iOS forcibly stops it. In this context “cleaning up” usually means saving whatever is on the screen so if the app is closed by iOS nothing is lost, but there are a handful of other things an app might do.

This was clunky for some kinds of apps that display constantly changing data like weather apps. It meant if you made the app active again, you’d have to wait for it to load new weather data to get up-to-date information. “Background App Refresh” is a feature Apple added to iOS to address this case. When an app asks for this feature *and* you enable the feature, the app is able to periodically do a little bit of work even if it’s backgrounded. That lets it load new data so if you make it active again, you can see more up-to-date data without a delay.

This isn’t the only feature that lets apps do more things from the background though, so it’s not the full answer to your question.

For example, music apps like Spotify can keep playing music even when backgrounded or if the phone is locked. Part of how a developer configures the app is stating it is “a media player” and that tells iOS it wants the ability to do those special things.

Your ad blocker registers as a “Safari Extension” (or some other fancy name I don’t remember). That means there’s a part of the app that Safari always loads, so it gets to do things while Safari is the active app that normal apps would not be able to do.

Push Notifications are kind of different, so while your Weather app might not be able to update itself in the background there are still ways you can get weather alerts or other notifications from it. This is sort of a complicated topic.

Basically there are about a dozen “categories” of apps that you can tell Apple you are writing as part of your program’s build information, and if you claim to be in that “category” then you are allowed some *very specific* privileges in the background. Apple usually requires that you prove you use these features for what they are intended for. So if I claimed to be a music player but was trying to use my extra privileges to mine crypto, my app would likely get rejected from the App Store.

Letting apps do things in the background means they can affect the performance of the phone, use more data, and consume more battery. That’s why Apple makes app developers claim up-front they need this feature and why you can turn off Background App Refresh for individual apps. If you feel like it uses too much data/battery and don’t mind waiting a little longer when starting backgrounded apps, it’s fine to turn it off.