Asks the delegate whether the app’s state should be preserved.
- iOS 6.0–13.2Deprecated
- Mac Catalyst 13.0–13.2Deprecated
- tvOS 9.0–13.2Deprecated
Your singleton app object.
The keyed archiver into which you can put high-level state information.
YES if the app’s state should be preserved or
NO if it should not.
Apps must implement this method and the
application: method for state preservation to occur. In addition, your implementation of this method must return
YES each time UIKit tries to preserve the state of your app. You can return
NO to disable state preservation temporarily. For example, during testing, you could disable state preservation to test specific code paths.
You can add version information or any other contextual data to the provided coder object as needed. During restoration, you can use that information to help decide whether or not to proceed with restoring your app to its previous state.