I have an app where I am saving data but when the app is killed in the background I have to delete all the saved data.
I tried using this method:
- (void
applicationWillTerminate:
is basically never called and you should no longer rely on it.
The app is not given any callback when it is killed so you can't do anything. You need to decide on a different approach based on the actual user requirement. This may involve encryption / not holding certain data on disk (only ever in memory) / etc...