I have an iPad application targeting iOS 6.0. I cannot get state preservation to work and I do not know what is wrong. If someone could point it out, I'd appreciate it.
In the AppDelegate I have set:
public override bool ShouldSaveApplicationState(UIApplication application, NSCoder coder)
{
return true;
}
public override bool ShouldRestoreApplicationState(UIApplication application, NSCoder coder)
{
return true;
}
And in the two UIViewController classes that I want to preserve, in the constructor I set:
this.RestorationIdentifier = "MyRestorationID";
I don't know what else to do. When I test the application with the simulator, when I switch to a different app, I can see that :
- App entering background state.
- App is terminating.
When I try to restore the App, all state is lost.
Any help will be greatly appreciated.