Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIApplicationExitsOnSuspend anything else I'm missing?

So I know this has been beaten to death but I still can't figure out a solution.

I have my UIApplicationExitsOnSuspend set to <true/> in the Info.plist and still both in the simulator as well as on an iPhone 4 device, the app goes into standby instead of terminating?

Any ideas of what else could one do to get it to terminate? Perhaps are there methods that I need to remove from the app delegate? Any ideas?

like image 704
schone Avatar asked Aug 02 '10 14:08

schone


5 Answers

Did you do a clean build, delete the app from both the simulator and the device, and re-install? That's the only key that affects it. Also, make sure you are building with base SDK set to iOS 4.0.

UIApplicationExitsOnSuspend (Boolean - iOS) specifies that the application should be terminated rather than moved to the background when it is quit. Applications linked against iPhone SDK 4.0 or later can include this key and set its value to YES to prevent being automatically opted-in to background execution and application suspension. 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.

like image 96
iwasrobbed Avatar answered Nov 20 '22 06:11

iwasrobbed


I had the same problem that Cyril identifies: I pasted "YES" in as the value, but that made the key default to String instead of "Boolean". So right-click the key and make sure its type is Boolean.

like image 24
Rob Winchester Avatar answered Nov 20 '22 07:11

Rob Winchester


Setting YES to UIApplicationExitsOnSuspend , worked well for me from the first time,But i didn realize,as my app was shown when double-clicking.

"double-clicking on the home button will always show your app , as it is a list of recently used apps. ( Ref: http://www.apple.com/iphone/features/multitasking.html ) "

If applicationWillTerminate delegate method is called, then you are done with that.. (Add a break point or NSLog to check )

Just a tip. Hope this helps some one like me..;)

like image 35
gopikrishnan Avatar answered Nov 20 '22 07:11

gopikrishnan


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

like image 2
Cyril Avatar answered Nov 20 '22 07:11

Cyril


This appears to have changed (for the better) in Xcode4 / iOS 4.3. The boolean is now "Application does not run in background", and - well - it works for me.

like image 1
ICL1901 Avatar answered Nov 20 '22 06:11

ICL1901