<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISceneSession",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UISceneSession"
  },
  "title" : "UISceneSession"
}
-->

# UISceneSession

An object that contains information about one of your app’s scenes.

```
@MainActor class UISceneSession
```

## Overview

A [`UISceneSession`](/documentation/UIKit/UISceneSession) object manages a unique runtime instance of your scene. When the user adds a new scene to your app, or when you request one programmatically, the system creates a session object to track that scene. The session contains a unique identifier and the configuration details of the scene. UIKit maintains the session information for the lifetime of the scene itself, destroying the session in response to the user closing the scene in the app switcher.

You don’t create session objects directly. UIKit creates sessions in response to user interactions with your app. You can also ask UIKit to create a new scene and session programmatically by calling the [`requestSceneSessionActivation(_:userActivity:options:errorHandler:)`](/documentation/UIKit/UIApplication/requestSceneSessionActivation(_:userActivity:options:errorHandler:)) method of [`UIApplication`](/documentation/UIKit/UIApplication). UIKit initializes the session with default configuration data based on the contents of your app’s `Info.plist` file.

## Topics

### Getting the scene information

[`scene`](/documentation/UIKit/UISceneSession/scene)

The scene associated with the current session.

[`role`](/documentation/UIKit/UISceneSession/role-swift.property)

The role played by the scene’s content.

[`UISceneSession.Role`](/documentation/UIKit/UISceneSession/Role-swift.struct)

Constants that indicate the possible roles for a scene.

### Getting the scene configuration details

[`configuration`](/documentation/UIKit/UISceneSession/configuration)

The configuration data for creating the scene.

[`UISceneConfiguration`](/documentation/UIKit/UISceneConfiguration)

Information about the objects and storyboard for UKit to use when creating a particular scene.

### Identifying the scene

[`persistentIdentifier`](/documentation/UIKit/UISceneSession/persistentIdentifier)

A unique identifier that persists for the lifetime of the session.

### Getting additional session information

[`stateRestorationActivity`](/documentation/UIKit/UISceneSession/stateRestorationActivity)

An activity object you can use to restore the previous contents of your scene’s interface.

[`userInfo`](/documentation/UIKit/UISceneSession/userInfo)

Custom attributes that you can associate with the scene.



---

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)