I see this happen more times than I care to admit. Friends, acquaintances, and even strangers in public toying with their iPhone, pulling up the recently used apps list and killing everything. Not just a single app, but every last item, including the “Phone” and “Messages” application. If this is you, stop it. Stop it right now.
The flawed logic here is that with less things running, they will achieve better battery life or have the iOS device perform better on the task they are currently working on. And it makes sense; anyone that has ever used a laptop knows that the battery will die quicker if you’re multitasking heavily instead of running a single lightweight application.
iOS takes a more battery-conscious approach to multitasking because it is specifically designed to be used in a mobile environment. Even though I’ve read about this claim in the past, until now I never had a solid source to back up the talk. Recently, iOS developer Fraser Speirs posted an excellent video (below) explaining iOS Multitasking that answers many of these mysteries. I take absolutely no credit for the video, but it’s something that anyone who practices obsessive task-quitting should watch.
iOS Multitasking Explained
In this demo, he uses an iPad, but the same principles apply to an iPhone or iPod Touch, as they are all iOS devices.
Before publishing this video, Fraser wrote an detailed technical blog post about how iOS manages applications. I encourage you to visit his site and read up more on this topic for those that want a more exhaustive explanation.
Too Long; Didn’t Watch
Fraser demonstrates that once home button is pressed, the currently running iOS app immediately stops using the CPU and will be suspended in memory. If you launch another application and it needs more memory than is currently available, iOS will automatically force quit, or kill suspended applications as needed to make room for the currently running app.
Some incorrectly call the menu that comes up when double-tapping the home button the “Task Switcher” or “Multitasking Screen.” This gives the false impression that these iOS apps are still active and running. The screen should be better know as the “Recently Used Apps List.” It will list applications even if they have been completely ejected from memory.
Fraser explains that there are only five types of applications that are allowed to run in the background:
- Apps that play audio while in the Background state. A good example is Instacast while it’s playing a podcast.
- Apps that track your location in the Background. For example, you still want voice prompts from your TomTom navigation app, even if another app is Active.
- Apps that listen for incoming VOIP calls. If you use Skype on iOS, you can receive incoming Skype calls while the app is in the Background.
- Newsstand apps that are downloading new content.
- Apps that receive continuous updates from an external accessory in the Background.
Applications of this nature will continue to use the CPU in the background until their suspension conditions are met. As soon as those tasks are complete (e.g. your destination is reached/the download is complete) all well-behaved apps will immediately be suspended, and stop consuming any CPU time.
So unless you have a critically low battery that you absolutely need to save for another task AND are currently using a program that falls into the five categories listed above, stop micro-managing applications on your iOS device.