I need to save my NSUserDefault
when my app is completely quit in iOS.
not didenterbackground
and foreground
.
Only when user kill my app w
From Apple Doc :
For apps that do not support background execution or are linked against iOS 3.x or earlier, this method is always called when the user quits the app. For apps that support background execution, this method is generally not called when the user quits the app because the app simply moves to the background in that case. However, this method may be called in situations where the app is running in the background (not suspended) and the system needs to terminate it for some reason.
It's not necessary that applicationWillTerminate
will be called when app exits, it may not be called when your app supports background execution.
You can use UIApplicationExitsOnSuspend to specifies that the app should be terminated rather than moved to the background when it is quit.
I afraid, there isn't any delegate method which will surly handle app's force-quite scenario.
Hope this may help you in solving your problem.