application(_:shouldRestoreApplicationState:)
Asks the delegate whether to restore the app’s saved state.
Declaration
optional func application(_ application: UIApplication, shouldRestoreApplicationState coder: NSCoder) -> BoolParameters
- application:
Your singleton app object.
- coder:
The keyed archiver containing the app’s previously saved state information.
Mentioned in
Return Value
true if the app’s state should be restored; otherwise, false.
Discussion
Apps must implement this method and the application(_:shouldSaveApplicationState:) method for state preservation to occur. In addition, your implementation of this method must return true each time UIKit tries to restore the state of your app. You can use the information in the provided coder object to decide whether or not to proceed with state restoration. For example, you might return false if the data in the coder is from a different version of your app and can’t be effectively restored to the current version.
See Also
Deprecated
application(_:didRegister:)application(_:didReceive:)application(_:didReceiveRemoteNotification:)application(_:handleActionWithIdentifier:for:completionHandler:)application(_:handleActionWithIdentifier:for:withResponseInfo:completionHandler:)application(_:handleActionWithIdentifier:forRemoteNotification:completionHandler:)application(_:handleActionWithIdentifier:forRemoteNotification:withResponseInfo:completionHandler:)application(_:handleOpen:)application(_:open:sourceApplication:annotation:)application(_:willChangeStatusBarOrientation:duration:)application(_:didChangeStatusBarOrientation:)application(_:willChangeStatusBarFrame:)application(_:didChangeStatusBarFrame:)application(_:handle:completionHandler:)application(_:performFetchWithCompletionHandler:)