<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: -",
    "tvOS: 17.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISceneSessionActivationRequest-swift.struct/init(role:userActivity:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:5UIKit31UISceneSessionActivationRequestV4role12userActivity7optionsACSo0bC4Rolea_So06NSUserH0CSgSo0bdE7OptionsCSgtcfc"
  },
  "title" : "init(role:userActivity:options:)"
}
-->

# init(role:userActivity:options:)

Creates a scene session activation request object with a role, a user activity, and options that you provide.

```
init(role: UISceneSession.Role = .windowApplication, userActivity: NSUserActivity? = nil, options: UIScene.ActivationRequestOptions? = nil)
```

## Parameters

`role`

The role to request.

`userActivity`

A user activity to send to the newly activated scene.

`options`

Activation request options to further customize the request.

## Discussion

Create an activation request with this method when you want the system to activate a scene session appropriate for the `role` and `userActivity` you provide. The system activates an existing scene session when the scene session’s [`role`](/documentation/UIKit/UISceneSession/role-swift.property) matches the [`role`](/documentation/UIKit/UISceneSessionActivationRequest-swift.struct/role) you request, and the user activity’s <doc://com.apple.documentation/documentation/Foundation/NSUserActivity/targetContentIdentifier> satisfies the scene’s [`activationConditions`](/documentation/UIKit/UIScene/activationConditions). Otherwise, the system activates a new scene session.

---

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)