Monday, May 17, 2010

IPhone OS 4: The multi-tasking myth

I have nothing against apple, from their overpriced consumer electronics to there world class software. But once in a while they really grind my gears, to quote Peter Griffin.

Recently i had a prospective client who wanted to take advantage of iPhone OS 4 new "multitasking" feature. I had to break the bad news to them that there is no true multi tasking,just apis to allow specific things to be done in the background.

And that is the key phase "multitasking api", real multitasking doesn't require an api it just happens. Sure you might need some events to determine focus, but beyond that you just write code as if your app was the only one in existence.

So heres a quick run down of mulitasking on the iPhone. If your application adheres to any of the following use cases then checkout the new 4.0 sdk

Always on VOIP client 
Receive device location updates
Play music in the background
Send messages to be received after a predetermined interval.
Operate for an addition 5-10 seconds after termination.

For everything else the solution is push notifications, Yay!