I build iOS apps

I build iOS apps

iOS 4 and Disabling Multitasking

iOS 4 delivers long awaiting and much anticipated multitasking support for iOS apps. Detailed information on supporting multitasking in your app can be found via Apple’s iPhone Application Programming Guide. If you’ve installed iPhone SDK 4 and are now building apps with it, one very important point to note is:

Applications linked against iPhone OS 4 and later are automatically assumed to support multitasking and to implement the appropriate methods to handle transitions to the background state. However, work is still required to ensure that your application transitions smoothly between the foreground and background.

Therefore, if you set your Xcode project’s target to a Base SDK of 4.0, your application is expected to support multitasking. In some cases having your app moved to the background instead of being terminated may not be appropriate. It is possible to opt out of background execution by adding the UIApplicationExitsOnSuspend key to your project’s Info.plist and setting its’ value to YES. This effectively disables multitasking for your app and will force it to terminate instead of being suspended by the OS.