• 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: Jeffrey Walton <email@hidden>
  • Date: Mon, 04 Apr 2011 19:20:26 -0400

On Sat, Apr 2, 2011 at 9:53 PM, Quincey Morris
<email@hidden> wrote:
> On Apr 2, 2011, at 18:01, Jeffrey Walton wrote:
>
>> 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?
>
> No, you should save the state, but it's explained here:
>
>        http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/CoreApplication/CoreApplication.html
>
> (search for all occurrences of "applicationWillTerminate", since the information you need is spread out) that you don't get the notification in the circumstances you describe.
>
> I think you'll need to force a low-memory termination to test the code path through 'applicationWillTerminate:'. I couldn't see an easier way to make it happen with an iOS 4.0 backgroundable multitasking-aware app.
>
Thanks Quincey. I do see where iOS will terminate the application
(SIGKILL) rather than calling applicationWillTerminate (the two
paragraphs under "Responding to Application Termination" coupled with
foreground/background/suspend state).

It sure would be nice if we could count on applicationWillTerminate
all the time. A SIGKILL without applicationWillTerminate seems kind of
rude :(

Jeff
_______________________________________________

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

  • Follow-Ups:
    • Re: applicationWillTerminate not received
      • From: David Duncan <email@hidden>
References: 
 >applicationWillTerminate not received (From: Jeffrey Walton <email@hidden>)
 >Re: applicationWillTerminate not received (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: textField - setIntegerValue
  • Next by Date: Re: Trying to subclass UISwitch
  • Previous by thread: Re: applicationWillTerminate not received
  • Next by thread: Re: applicationWillTerminate not received
  • Index(es):
    • Date
    • Thread