Step 1. Save app data
Step 2: Save session data
Step 3. Restore the app's state