<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIUserActivityRestoring/restoreUserActivityState(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIUserActivityRestoring(im)restoreUserActivityState:"
  },
  "title" : "restoreUserActivityState(_:)"
}
-->

# restoreUserActivityState(_:)

Restores the state necessary to continue the specified user activity.

```
func restoreUserActivityState(_ userActivity: NSUserActivity)
```

## Parameters

`userActivity`

The user activity to continue.

## Discussion

Implement this method to restore an object’s state using the specified user activity. The system calls this method on any objects passed to the restoration handler in <doc://com.apple.documentation/documentation/AppKit/NSApplicationDelegate/application(_:continue:restorationHandler:)>. Your implementation should use the state data contained in the specified user activity’s <doc://com.apple.documentation/documentation/Foundation/NSUserActivity/userInfo> dictionary to restore the object.

---

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)