On Sat, 02 Apr 2011 21:01:46 -0400, Jeffrey Walton <noloa...@gmail.com> said: >Hi All, > >I'm using NSLog and breakpoints to trace application life cycle >messages on an iPhone. I'm receiving applicationDidBecomeActive, >applicationWillResignActive, applicationDidEnterBackground, >applicationWillEnterForeground, etc as expected. > >If I perform the following, the application does not appear to receive >the applicationWillTerminate message. >* enter background by pressing Home >* double press Home to list tasks >* delete the [background] task (tap down and hold for 'Red X') > >I planned on saving some state when the applicationWillTerminate was >invoked. Are things working as expected? Should I abandon my plans to >save state during termination? >
Yes. Apple is clear about this. If you're going to live in a multitasking world, then assume you will *never* receive applicationWillTerminate. Save state when backgrounding (or before, incrementally, as Apple recommends). I can list for you the few situations in which applicationWillTerminate is received, if you really want me to, but I don't see what good that list would do you. Alternatively, if you insist on working this way, then check the box that says you don't multitask. m. -- matt neuburg, phd = m...@tidbits.com, <http://www.apeth.net/matt/> A fool + a tool + an autorelease pool = cool! Programming iOS 4! http://www.apeth.net/matt/default.html#iosbook_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com