• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: applicationWillTerminate not received
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: applicationWillTerminate not received


  • Subject: Re: applicationWillTerminate not received
  • From: Matt Neuburg <email@hidden>
  • Date: Tue, 05 Apr 2011 06:21:54 -0700

On Sat, 02 Apr 2011 21:01:46 -0400, Jeffrey Walton <email@hidden> 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 = email@hidden, <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 (email@hidden)

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:

This email sent to email@hidden

  • Prev by Date: lockFocus mystery in screensaver
  • Next by Date: diable localization
  • Previous by thread: Re: applicationWillTerminate not received
  • Next by thread: Category Question
  • Index(es):
    • Date
    • Thread