I developed an ipad application.
Some part of the application will bring the user out of the application, to open safari browser.
Supposedly, if the user double click the HOME button to launch the multitasking panel, and select my app again, my app SHOULD RESUME to previous state.
But I noticed that, my app is currently behaving unpredictably.
Sometimes it is able to resume to previous state.
Sometimes it restarts from the very beginning state (even if i juz left the app for less than 1 minute).
How is this behaviour designed?
P/S: Currently I didnt put any single line of code to control this behaviour.
This is expected behavior.
When leaving your app it goes to background, but it may be killed by the system at any time. Also, some older devices don’t support backgrounding at all.
You really should save all state when entering background – see the app delegate methods and notifications.