Instance Method

application(_:didDecodeRestorableStateWith:)

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

Declaration

optional func application(_ application: UIApplication, didDecodeRestorableStateWith coder: NSCoder)

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(_:willEncodeRestorableStateWith:) method and apply it to your app.

See Also

Managing App State Restoration

func application(UIApplication, shouldSaveApplicationState: NSCoder)

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

func application(UIApplication, shouldRestoreApplicationState: NSCoder)

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

func application(UIApplication, willEncodeRestorableStateWith: NSCoder)

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