---
title: "restoreUserActivityState(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiuseractivityrestoring/restoreuseractivitystate(_:)"
---

# restoreUserActivityState(_:)

Restores the state necessary to continue the specified user activity.

## Declaration

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

## Parameters

- `userActivity`: The user activity to continue.

## Discussion

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 application(_:continue:restorationHandler:). Your implementation should use the state data contained in the specified user activity’s userInfo dictionary to restore the object.
