Why You Should Stop Swiping up in The App Switcher and Killing Your Apps [Part 1]
When Apple introduced the new and improved App Switcher in iOS 7 it gave people the ability to easily close apps by swiping up on the preview card. Something happened where a large portion of people with iPhones became obsessed with swiping up and killing apps; almost as if they’re afraid of seeing them in the App Switcher at all. In this article, I will be covering what your iPhone is doing in the background, why you shouldn’t kill apps, and the exceptions for when you should.
I would also like to mention that the inspiration and most of the technical content of this article came from reddit user Secretss, who was kind enough to let me turn her write-up into an article.
To get started we will get some vocabulary out of the way by defining some terms relevant to iOS’s background memory management.
Backgrounding Capability
The grace period for background tasks in iOS is 10 minutes, which is set by default is the system’s configuration. That said, the app itself may be coded to have a shorter limit. This is what happens to your apps if they have backgrounding capability:
-
Foreground app gets minimized. (home button is pressed)
-
iOS to app, “Ok bro, you need to sleep now.”
-
App to iOS, “No wait! I’m not tired, I still have something to do!”
-
iOS to app, “Alright you have 10 minutes, then it’s bedtime.”
-
App does stuff/waits around.
-
10 minutes later, or sooner if the app is done with it’s activities it goes into hibernation, gets shelved and removed from active memory.
The above only applies if the app isn’t doing the following:
-
Using location services.
-
Giving navigation directions.
-
Using VoIP to wait for incoming calls.
-
Recording audio.
-
Playing music or in a call.
If the app falls into one of the categories above, then it will the app will stay in the background indefinitely. A example of when it’s a good idea to kill an app is after you’ve used navigation, but no longer need it (think: Google Maps). If you keep it open it’s going to be constantly requesting your location and therefore using up that precious battery.
There is speculation that some third-party navigation apps will go to sleep by themselves if left in the background too long or the phone is locked.
Background App Refresh (BAR):
This is a whole other thing that works outside of the 10 minutes grace period. An app with BAR enabled is allowed to wake up every now and then until it’s quit from the app switcher or the phone resprings/reboots. There is no 10 minute restriction here, and it’s important to understand that BAR is different from backgrounding. By “wakes up” I mean “opens a sleepy eye and downloads some stuff, then goes straight back to sleep”. If you kill the app from the app switcher, its BAR privilege is gone as well.
BAR-enabled apps are usually scheduled to wake up at opportune moments to update themselves. These moments include:
-
When the device is actively in use.
-
When the device is connected to wifi and/or a power source.
-
When a push notification for the app is received.
-
When location changes.
From Apple: “iOS learns patterns based on your use of the device and tries to predict when an app should be BAR-updated in the background. It also learns when the device is typically inactive, such as during the night, to reduce update frequency when the device is not in use.”
Another Reddit user, Niruga, mentions here that there is also what is called a “silent” push notification that apps can make use of to wake their app up for BAR-updates. Silent push notifications are not seen by the user. He provides the link to a post on Apple’s Developer Library on Push Notifications.
For example, Dropbox makes use of BAR and location to keep its photo upload working past 10 minutes for as long as it takes to finish uploading. It won’t be constantly uploading, since that’s not what BAR does. So what’s happening in Dropbox is that it uses location changes to make the app wake up and upload for 10 minutes before it goes to back to sleep, then waits for the next location change to make the app wake up again and continue where it left off, and repeat until all uploading is done, all without the user having to keep the app open in the foreground.
To decide whether or not to enable BAR, think about whether you trust the app developers not to abuse the function.
Stay tuned tomorrow for part two, where I’ll cover on what happens when you kill an app from your app switcher. Also, be sure to read my final thoughts and some tips as well in part two.