I\'m working on a project in Xcode version 4.2.1 and in iOS 5.0. I\'m wondering which function will be called when you completely terminate an application, which means even
Here's a good overview of the application lifecycle notifications & delegate messages on iOS 4.0 and newer. In short...
Your app will generally never see willTerminate, because the system generally only terminates your app once it's already suspended (in the background). Once your app is suspended, it gets no further chance to act(*), so there's no callback for that.
The didEnterBackground delegate message or notification should be considered your last chance to clean things up or save state before possible termination.
(*) Okay, your app can do stuff if it's in one of the supported background execution modes, like audio, VoIP, or navigation, but in that case it either hasn't been suspended yet or it's been un-suspended with an entry point specific to that background mode.