Is UIApplicationExitsOnSuspend anything else that I am missing?

So, I know that it was beaten to death, but I still can’t find a solution.

I have UIApplicationExitsOnSuspend set to <true/> in Info.plist and still both in the simulator and on the iPhone 4 device, does the application go into standby mode instead of terminating?

Any ideas on what else you can do to get it to stop acting? Perhaps there are methods that I need to remove from the application delegate? Any ideas?

+6
iphone ios4 terminate
source share
6 answers

Did you make a clean build, uninstall the application from both the simulator and the device, and reinstall it? This is the only key that affects it. Also, make sure that you are building the base SDK installed in iOS 4.0.

UIApplicationExitsOnSuspend (Boolean - iOS) indicates that the application should be terminated and not moved to the background when it is completed. Applications associated with the iPhone SDK 4.0 or later can enable this key and set its value to YES to prevent the application from automatically starting in the background and pausing the application. When the value of this key is YES, the application is terminated and cleared from memory, and not moved to the background. If this key is missing or set to NO, the application usually moves to the background.

+6
source share

I had the same problem as Cyril: I inserted "YES" as the value, but this made the default key for String instead of "Boolean". Therefore, right-click and make sure its type is Boolean.

+5
source share

Configuring YES for UIApplicationExitsOnSuspend worked well for me the first time, but I did not understand, since my application was shown with a double click.

"double-clicking on the home button will always show your application, since this is a list of recently used applications. (Link: http://www.apple.com/iphone/features/multitasking.html )"

If the applicationWillTerminate delegate method is called, then you are done with this. (Add a breakpoint or NSLog to check)

Just a hint. Hope this helps someone like me ..;)

+3
source share

I had the same problem when you add the UIApplicationExitsOnSuspend key, make sure you right-click on it and select the value type> Boolean. Otherwise, Xcode will ignore it. Hope this helps.

+2
source share

It is important to note that your AppDelegate methods "applicationDidEnterBackground" and "applicationWilLTerminate" are called (in that order), even if your UIApplicationExitsOnSuspend is marked as (logical) "YES".

0
source share

This seems to have changed (for the better) in xCode4 / iOS4.3. The boolean value is now "Application does not work in the background", and - well - it works for me ..

David

-one
source share

All Articles