How to prevent my app from running in the background on the iPhone

See opting out of background execution in the iphone application programming guide:

“If you do not want your application to remain in the background when it is quit, you can explicitly opt out of the background execution model by adding the UIApplicationExitsOnSuspend key to your application’s Info.plist file and setting its value to YES.

When an application opts out, it cycles between the not running, inactive, and active states and never enters the background or suspended states.

When the user taps the Home button to quit the application, the applicationWillTerminate: method of the application delegate is called and the application has approximately five seconds to clean up and exit before it is terminated and moved back to the not running state.”

Leave a Comment