<!--
{
  "availability" : [
    "iOS: 6.0.0 - 13.2.0",
    "iPadOS: 6.0.0 - 13.2.0",
    "macCatalyst: 13.1.0 - 13.2.0",
    "tvOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIApplicationDelegate/application(_:shouldRestoreApplicationState:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIApplicationDelegate(im)application:shouldRestoreApplicationState:"
  },
  "title" : "application(_:shouldRestoreApplicationState:)"
}
-->

# application(_:shouldRestoreApplicationState:)

Asks the delegate whether to restore the app’s saved state.

```
optional func application(_ application: UIApplication, shouldRestoreApplicationState coder: NSCoder) -> Bool
```

## Parameters

`application`

Your singleton app object.

`coder`

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

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the app’s state should be restored; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

Apps must implement this method and the [`application(_:shouldSaveApplicationState:)`](/documentation/UIKit/UIApplicationDelegate/application(_:shouldSaveApplicationState:)) method for state preservation to occur. In addition, your implementation of this method must return <doc://com.apple.documentation/documentation/Swift/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 <doc://com.apple.documentation/documentation/Swift/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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)