I would like to ask, which method has been called whenever the user quit the app totally.
What I mean for quit the app totally is after the user tap the Home button, the app actually is running at the background but whenever the user double tap the Home button, then tap and hold on an app icon and then tap the RED MINUS sign to quit the app.
I'm trying to save my data whenever the app goes to background and load the data whenever the apps go back to active (foreground). It's work as long as I didn't quit the app totally.
If I quit the app by tapping the red minus sign and relaunch the app again, all my saved data is gone? Weird case is, sometimes it is saved and can be loaded, but mostly it won't be saved.
I have double check with my save method and try to NSLog it, I got the all the data saved but just don't know why it cannot be loaded after the user quit the app by tapping red minus sign.
Anyone know what happens on my app? BTW, I'm using NSUserDefaults to save my data and load my data.
[appDefaults setObject: object objectForKey: @"key"]; [appDefaults objectForKey: @"key"];