Why Apple won't let you run in the background on the iPhone

by Volker Weber

Unless you’ve been stranded on a remote Pacific isle, you’re no doubt aware of the current furor over third party iPhone applications not being able to run in the background. To be blunt, I’ve never seen so many experts without a fricken’ clue. If you haven’t written code using the jailbreak tool chain, your opinions on the iPhone SDK, based entirely on what you see in a simulator, just aren’t relevant. You might as well be explaining the nuances of brain surgery.

As someone who has been involved in iPhone development for the past six months, please let me offer you a healthy dose of reality.

More >

2008-03-19 :: email :: bookmark :: digg

Comments

OK, the radios (both EDGE and WiFi) may have significant power requirements. But IMHO it is a bad solution to almost disable them. :-)

The Nokia 770 / N800 / N810 devices do not have such restrictions for developers. Even some default apps are designed to run as background apps, reconnecting WiFi and checking for updates every few instants. Those devices last more than 2 days on battery.

Then again, the Nokia devices only have Wifi and Bluetooth, but no cellular radio, so that's one hungry component less compared to an iPhone.

It will be interesting to see how ActiveSync bears on the iPhone battery. The Treo 750 is very quickly asking for a recharge, where the E90 is still going strong.

I have to say that something about this doesn't seem quite right since, just as others have mentioned, products from the Nokia & Blackberry stables do seem to manage the illusion of near permanent connection - to support push email for example?

Sure, if it's Wifi based then there's a bigger hit, but just keeping a cellular connection open shouldn't kill the battery. After all, that's what it's designed to do!

In any case, just as I reflect on this comment before posting, the issue is running apps in the background, not running apps that drain the batteries through 'over use' of the radios, isn't it? Not to run any apps in the background sounds like a return to Mac OS 9 to me, where that limitation was imposed rather than essential. I would suggest that in the case of the iPhone, this limitation has been imposed by policy or design not as some sort of 'physiological' limitation of the platform. My E90 runs many apps in the background. Some run the radio/wifi, others don't and the impact on the battery life varies accordingly, but the point is that it will run apps in the background.

I think I should join the throngs of uninformed non-SDK developer types who scratch their head and murmur 'Doh' at the lack of a background app capability. Where do I buy a ticket to the Pacific Island - or is it too crowded now?

John Ash, 2008-03-19 17:13

John, the iPhone is also running plenty of apps in the background. Apple has chosen to not let SDK developers do that. As Craig Hockenberry writes, that may be a good decision fow now.

OTOH, it pretty much rules out that IBM could do anything interesting in the near future on the iPhone, if they cannot convince Apple to do it for them.

Right, John, somebody needs to tell RIM and Nokia that what they're doing in the "constantly connected" department just isn't feasible/possible.

Dang, and here I was thinking that my E61 could actually keep a connection open all day long for 2 days.

I could imagine that it's just an undocumented feature that you need to place a
struct timespec timeOut,remains;
timeOut.tv_sec = 0;
timeOut.tv_nsec = 100000000; /* 10 milliseconds */
nanosleep(&timeOut, &remains); instruction into your main loop to let background apps process normally.

Now, really. Where's the problem for Apple to design, say, a queue where requests for "connectivity" line up? It should be fairly easy for them to provide such a thing and by doing so limit the "pounding on the battery". Ok, you'd also have to implement another queue for the responses received from the network and make sure to deliver the right response to the right recipient but even that should be fairly easy to do.

Stefan, you can't start from scratch if it it turns out to be not as easy. You make commitments with an SDK.

Post a comment











Shall I remember this for you?




Use your full name and a working email address. Unless you want your comment to be removed. No kidding.



Recent comments

Pierre Lalonde on Fifty at 03:07
Dennis Wegner on Fifty at 22:13
Mitch Wolfson on Fifty at 22:07
Henrik Heigl on Fifty at 22:01
Matthias Lorz on Again & Again at 21:33
Samuel Orsenne on Fifty at 19:57
Ingo Seifert on Fifty at 13:29
Chris Coates on Fifty at 12:20
Marc Beckersjuergen on Again & Again at 12:09
Paul Mooney on Fifty at 10:32
Vesey Crichton on Fifty at 10:18
Colin Williams on Fifty at 08:41
Henry Ferlauto on Fifty at 04:45
Frank Stangenberg on Fifty at 01:02
Stefan Rubner on Fifty at 23:58
Andreas Eufinger on Fifty at 22:07
Helmut Weiss on Fifty at 22:03
Werner Götz on Fifty at 21:33
Hans Bornich on Fifty at 21:17
Gregg Eldred on Fifty at 21:03
Alex Boschmans on Fifty at 20:59
Bruce Elgort on Fifty at 20:26
Markus Heyl on Fifty at 18:08
Stefan Heinz on Fifty at 17:57
Christian Holsing on Fifty at 16:34

Ceci n'est pas un blog

vowe.net is a personal website published by Volker Weber a.k.a. vowe. I am an author, consultant and systems architect based in Darmstadt, Germany.

rss Click here to subscribe

Hello

About me
Contact
Publications
Certificates
Frequently asked questions
Join the network

Twitter Updates

Follow the conversation

Poll

Rhodin's heritage?

Getting poll results. Please wait...

Local time is 04:51

visitors.gif
112 visitors online

News

Other sources of news, imported into my own format to make them more accessible:

Heise Online
Schlagzeilen
Weather
Blog roll

Archives

As most of my articles roll off the front page rather quickly, I am making an archive of previous posts available here. You can also use the handy search box at the top of the page if you are looking for something particular.

Last 30 days
More archives

Got the T-shirt?

Got the T-shirt?
Are you buying from the US?

Systems Architecture

This site runs on an Apache web server on top of the Linux operating system. The content is managed with MovableType 2.661 which is implemented in Perl. Last but not least the HTML code your browser sees is put together with PHP.

© 1992-2008 Volker Weber.
All Rights Reserved.

Impressum