views:

102

answers:

3

Is this now a mandatory requirement before uploading to the app-store? As I understand it, making my app compatible with multitasking is something extra that I need to implement. (?)

+4  A: 

No.

It's not something extra. It's an opt-out process. Read this Apple doc.

My personal opinions is that if you don't actively support multi-tasking, you should opt-out from it.

Yuji
For what it's worth, in my opinion you should support fast app switching, even if you don't support anything else. As users become accustomed to switching to recently-launched apps with fast switching, it will seem weird and less-functional if yours isn't there and the user has to hunt it down again in springboard.
Matthew Frederick
That's not the case. You can check by yourself, but a program is added to "recently-launched app" independent of whether or not it supports multi-tasking. That's not a list of apps staying in the background. As far as an app launch fast enough, you don't see a difference. Of course Apple won't make that kind of artificial distinction :)
Yuji
+1  A: 

It is not mandatory to support multitasking.

To disable multitasking, you can use the UIApplicationExitsOnSuspend key in your info.plist file, which may appear as "Application does not run in background."

See http://developer.apple.com/library/mac/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html for more information.

GregInYEG
+1  A: 

Your app does not need to take advantage of the multitasking features, but it DOES need to gracefully handle being put in the background and never receiving a notice that the application will quit. More specifically:

Under previous versions of the OS when the user quit the app (by pressing the home button) the App Delegate's

applicationWillTerminate

was called. Under iOS 4 pressing the device's home button instead puts the app in the background, calling the App Delegate's

applicationDidEnterBackground

When the app is brought to the foreground again the OS call's the App Delegate's

applicationWillEnterForeground

This most commonly caused trouble for older apps when state changes -- user preferences, data files, high scores, etc. -- were being written out and saved when applicationWillTerminate was called. Now that it's no longer being called, some apps fail to save user information.

Most anything that you were doing when applicationWillTerminate was called should now also be placed in applicationDidEnterBackground, depending on what your app does.

Additionally, it's possible that some things you were doing in application didFinishLaunchingWithOptions will also need to be done in applicationWillEnterForeground, depending on what your app does.

Matthew Frederick