Instance Method

application:didDecodeRestorableStateWithCoder:

Tells your delegate to restore any high-level state information as part of the state restoration process.

Declaration

- (void)application:(UIApplication *)application didDecodeRestorableStateWithCoder:(NSCoder *)coder;

Parameters

application

Your singleton app object.

coder

The keyed archiver containing the app’s previously saved state information.

Discussion

The state restoration system calls this method as the final step in the state restoration process. By the time this method is called, all other restorable objects will have been restored and put back into their previous state. You can use this method to read any high-level app data you saved in the application:willEncodeRestorableStateWithCoder: method and apply it to your app.

See Also

Managing App State Restoration

- application:shouldSaveApplicationState:

Asks the delegate whether the app’s state should be preserved.

- application:shouldRestoreApplicationState:

Asks the delegate whether the app’s saved state information should be restored.

- application:viewControllerWithRestorationIdentifierPath:coder:

Asks the delegate to provide the specified view controller.

- application:willEncodeRestorableStateWithCoder:

Tells your delegate to save any high-level state information at the beginning of the state preservation process.

UIApplicationStateRestorationBundleVersionKey

The version of your app responsible for creating the restoration archive.

UIApplicationStateRestorationSystemVersionKey

The version of the system on which your app created the restoration archive.

UIApplicationStateRestorationTimestampKey

The time at which your app created the restoration archive.

UIApplicationStateRestorationUserInterfaceIdiomKey

The user interface idiom that was in effect when your app created the restoration archive.

UIStateRestorationViewControllerStoryboardKey

A reference to the storyboard that contains the view controller.