views:

333

answers:

3

I am working on an app for the iphone 4.0. The app was originally on the 2.2.1. I upgraded it to a universal app, but now it seems to be multitasking. When I press the menu button while running the app, instead of exiting it closes but when I relaunched the app it resumes where I left off. I am assuming this is multitasking? I want it to exit, is there a way in the settings?

My guess is that the ipad target upgrade changed the plist somehow? Any thoughts?

Thanks,

+11  A: 

Open your info.plist file

Add The Key UIApplicationExitsOnSuspend or Select Application does not run in background

Set the new key to YES or Fill in the tick box

Jesse Naugher
Thanks, it works! I see you copy and pasted this from here http://maniacdev.com/2010/07/screw-multi-tasking-how-to-make-your-ios-4-apps-exit-for-real/, but still THANKS!
Kevin
The official documentation is at http://tinyurl.com/2fgkf5p .
jsumners
+3  A: 

That's not multitasking, that's Fast app switching which is now the default and is preferred in iOS 4.0.

If you disable it, that means you app has to be reloaded every time the user switches to it instead of allowing it to stay in memory. It will take longer to reload it each time.

It would be better if you implement applicationWillEnterForeground: and refresh your view rather than force the user to have to wait while your app reloads.

progrmr
Oo cool. Didn't know that was the fast app switching, I'll look into it. Thanks for the suggestion, bug the app I'm working on is security sensitive, so we would rather have it exit than save the settings (haven't implemented a log out feature, yet).
Kevin
A: 

Very helpful series of posts. Thanks!