In iOS 4 applications go to the background instead of terminating. For this reason I have to register for:
[[NSNotificationCenter defaultCenter] addObserver:
If you want to test the reception of such a notification, add following key to your Info.plist file: Application does not run in background
and set it to YES. The internal name is
.
This will tell iOS and the simulator, that your application wants to terminate rather than being sent to background when the home button is pressed. In this case, the UIApplicationWillTerminateNotification
is sent.
For testing, this should suffice.
Hope this helps.