How can I force quit instead of going background?
Question: I have a quickie Xcode 4.2 question. In my code how can I force an iOS app to quit instead of going into background execution, likely to suspended mode?
Answer: An iOS 4+ application can explicitly avoid the background execution model by adding the UIApplicationExitsOnSuspend key to Info.plist file. Set it to YES. Read the documentation: “When the value of this key is YES, the application is terminated and purged from memory instead of moved to the background. If this key is not present, or is set to NO, the application moves to the background as usual.” Note that double-clicking on the home button will always bring your application up.
By the way, opting out of background execution is strongly discouraged. Sooner or later iOS devices will offer true multitasking. Why not prepare your code for such a world?