Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When an app crashes does either the 'applicationWillTerminate' or 'applicationDidEnterBackground' get called?

Tags:

ios

When an app crashes does either the 'applicationWillTerminate' or 'applicationDidEnterBackground' get called or am I hoping for too much?

Apple's documentation states "This [applicationWillTerminate] method lets your application know that it is about to be terminated and purged from memory entirely". When an app crashes it gets "terminated and purged from memory" right? So does that mean it gets called?

This is all in relation to the iPhone and iOS just to be stupidly clear.

like image 268
user1135469 Avatar asked Apr 19 '12 04:04

user1135469


1 Answers

When an app crashes, it usually gets killed immediately.

No delegates or methods or delegate methods get called after that, since the being-killed app is probably in a really bad state and whatever data you might want to write out could be corrupted and non-usable.

like image 115
Michael Dautermann Avatar answered Sep 21 '22 23:09

Michael Dautermann