I'm trying to use the new Saving/Restoring app state feature on iOS 6, but (application:shouldRestoreApplicationState:) method is not called if I killed the app so it doesn't restore the app state, but If I'm running it from the debugger it gets called.
It worked when I added (Application does not run in background) in the plist and set it to YES, I don't want to set it to YES though. I was wondering if anyone got it working without setting the (Application does not run in background) to YES.
From the Apple docs:
From experience, the easiest way is to put your app into the background by pressing the home button (or Command+Shift+H for the simulator). Then use the Xcode stop button. As the docs suggests, a debug exit gesture also works.
Update:
I found a small work around. The app saves its state in Library/Saved Application State/[Bundle ID]-[App Name].savedState/data.data.
When using the simulator, you can copy this file and drop it in anytime you want to restore to that specific state.
Similarly, on a device you can generate a .xcappdata archive from the organizer. Then, you can upload the .xcappdata archive when you want to restore from that saved state.