---
title: userActivity
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiscenesessionactivationrequest-swift.struct/useractivity
---

# userActivity

A user activity to send to the newly activated scene.

## Declaration

```swift
var userActivity: NSUserActivity? { get set }
```

## Discussion

Discussion The system sends the userActivity to the session’s scene upon activation, regardless of whether the scene session already exists. If you don’t provide a scene session to activate, the system uses the targetContentIdentifier of the user activity to determine which scene session to activate. When the user activity’s targetContentIdentifier satisfies the prefersToActivateForTargetContentIdentifierPredicate, the system activates that scene’s session to handle the user activity.

## See Also

### Managing request details

- [options](uikit/uiscenesessionactivationrequest-swift.struct/options.md)
- [role](uikit/uiscenesessionactivationrequest-swift.struct/role.md)
- [session](uikit/uiscenesessionactivationrequest-swift.struct/session.md)
