<!--
{
  "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/UIScene",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIScene"
  },
  "title" : "UIScene"
}
-->

# UIScene

An object that represents one instance of your app’s user interface.

```
@MainActor class UIScene
```

## Overview

UIKit creates a scene object for each instance of your app’s UI that the user or your app requests. Typically, UIKit creates a [`UIWindowScene`](/documentation/UIKit/UIWindowScene) object instead of a [`UIScene`](/documentation/UIKit/UIScene) object, but you use the methods and properties of this class to access information about a scene.

Every scene object has an associated delegate object, an object that adopts the [`UISceneDelegate`](/documentation/UIKit/UISceneDelegate) protocol. When the state of the scene changes, the scene object notifies its delegate object and posts appropriate notifications to registered observer objects. Use the delegate object and notifications to respond to changes in the state of the scene. For example, use it to determine when your scene moves to the background.

You don’t create scene objects directly. You can programmatically ask UIKit to create a scene object for your app by calling the [`requestSceneSessionActivation(_:userActivity:options:errorHandler:)`](/documentation/UIKit/UIApplication/requestSceneSessionActivation(_:userActivity:options:errorHandler:)) method of [`UIApplication`](/documentation/UIKit/UIApplication). UIKit also creates scenes in response to user interactions. When configuring your app’s scene support, specify [`UIWindowScene`](/documentation/UIKit/UIWindowScene) objects instead of [`UIScene`](/documentation/UIKit/UIScene) objects.

## Topics

### Creating a scene object

[`-  initWithSession:connectionOptions:`](/documentation/UIKit/UIScene/init(session:connectionOptions:))

Creates a scene object using the specified session and connection information.

### Managing the life cycle of a scene

[`delegate`](/documentation/UIKit/UIScene/delegate)

The object you use to receive life-cycle events associated with the scene.

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

The core methods you use to respond to life-cycle events occurring within a scene.

### Getting the scene attributes

[`activationState`](/documentation/UIKit/UIScene/activationState-swift.property)

The current execution state of the scene.

[`ActivationState`](/documentation/UIKit/UIScene/ActivationState-swift.enum)

Constants that indicate the foreground or background execution state of your app.

[`title`](/documentation/UIKit/UIScene/title)

A user-visible string you supply to help users differentiate among your app’s scenes.

[`subtitle`](/documentation/UIKit/UIScene/subtitle)

A string that the app displays in the title bar of a window when running in macOS.

### Specifying the scene’s activation conditions

[`activationConditions`](/documentation/UIKit/UIScene/activationConditions)

The conditions that define when UIKit activates the scene object.

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

The set of conditions that define when UIKit activates the current scene.

### Specifying the scene’s destruction conditions

[`destructionConditions`](/documentation/UIKit/UIScene/destructionConditions-9rfrj)

[`destructionConditions`](/documentation/UIKit/UIScene/destructionConditions-1a41l)

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

Specifies when UIKit destroys the current scene.

### Responding to life cycle notifications

[`UISceneWillConnectNotification`](/documentation/UIKit/UIScene/willConnectNotification)

A notification that indicates that UIKit added a scene to your app.

[`UISceneDidDisconnectNotification`](/documentation/UIKit/UIScene/didDisconnectNotification)

A notification that indicates that UIKit removed a scene from your app.

[`UISceneWillEnterForegroundNotification`](/documentation/UIKit/UIScene/willEnterForegroundNotification)

A notification that indicates that a scene is about to begin running in the foreground and become visible to the user.

[`UISceneDidActivateNotification`](/documentation/UIKit/UIScene/didActivateNotification)

A notification that indicates that the scene is now onscreen and responding to user events.

[`UISceneWillDeactivateNotification`](/documentation/UIKit/UIScene/willDeactivateNotification)

A notification that indicates that the scene is about to resign the active state and stop responding to user events.

[`UISceneDidEnterBackgroundNotification`](/documentation/UIKit/UIScene/didEnterBackgroundNotification)

A notification that indicates that the scene is running in the background and is no longer onscreen.

### Working with system protection manager

[`systemProtectionManager`](/documentation/UIKit/UIScene/systemProtectionManager-swift.property)

The system protection manager associated with this scene.

[`SystemProtectionManager`](/documentation/UIKit/UIScene/SystemProtectionManager-swift.class)

A class that represents the status of system protection for the scene.

[`UISceneSystemProtectionDidChangeNotification`](/documentation/UIKit/UIScene/systemProtectionDidChangeNotification)

A notification posted when the system-protection attributes of a scene change.

### Getting the scene’s session

[`session`](/documentation/UIKit/UIScene/session)

The session associated with the scene.

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

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

### Opening URLs

[`-  openURL:options:completionHandler:`](/documentation/UIKit/UIScene/open(_:options:completionHandler:))

Attempts to open the resource at the specified URL asynchronously.

[`OpenExternalURLOptions`](/documentation/UIKit/UIScene/OpenExternalURLOptions)

Options you specify when asking a scene to open a URL.

### Supporting state restoration

[`-  completeStateRestoration`](/documentation/UIKit/UIScene/completeStateRestoration())

[`-  extendStateRestoration`](/documentation/UIKit/UIScene/extendStateRestoration())

### Getting the pointer lock state

[`pointerLockState`](/documentation/UIKit/UIScene/pointerLockState)

The pointer lock state for the scene.

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

An object that contains information about a scene’s pointer lock state.

### Constants

[`ActivationRequestOptions`](/documentation/UIKit/UIScene/ActivationRequestOptions)

An object that contains information you want the system to use when activating the session associated with a scene.

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

An object you pass to UIKit to permanently remove a scene and its associated session from your app.

[`OpenURLOptions`](/documentation/UIKit/UIScene/OpenURLOptions)

Options that UIKit provides when asking your app to open a URL.

## Relationships

### Conforms To

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

[`CVarArg`](/documentation/Swift/CVarArg)

[`Sendable`](/documentation/Swift/Sendable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

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

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

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSTouchBarProvider`](/documentation/AppKit/NSTouchBarProvider)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

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

### Inherited By

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

### Inherits From

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

---

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)