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

# UISceneActivationConditions

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

```
@MainActor class UISceneActivationConditions
```

## Overview

When an event occurs that requires the activation of a scene, UIKit routes the event to the scene best suited to handle it. UIKit determines which scene is the best by evaluating the target content identifier of the event against the predicates in each scene’s [`UISceneActivationConditions`](/documentation/UIKit/UISceneActivationConditions) object. You create [`UISceneActivationConditions`](/documentation/UIKit/UISceneActivationConditions) objects for your scenes and use them to prioritize which events each scene handles. Use the [`prefersToActivateForTargetContentIdentifierPredicate`](/documentation/UIKit/UISceneActivationConditions/prefersToActivateForTargetContentIdentifierPredicate) predicate to designate the scene as the primary handler of an event.

Many different objects contain a <doc://com.apple.documentation/documentation/Foundation/NSUserActivity/targetContentIdentifier> property, including <doc://com.apple.documentation/documentation/Foundation/NSUserActivity>, <doc://com.apple.documentation/documentation/UserNotifications/UNNotificationContent>, and [`UIApplicationShortcutItem`](/documentation/UIKit/UIApplicationShortcutItem). When creating those objects, fill that property with a value that uniquely describes the event and matches your scenes’ predicates. Every event must match at least one scene.

## Topics

### Creating an activation conditions object

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

Creates a new activation conditions object.

[`-  initWithCoder:`](/documentation/UIKit/UISceneActivationConditions/init(coder:))

Restores an activation conditions object from the specified archive.

### Specifying the conditions

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

The set of conditions for which UIKit chooses to activate this scene over others.

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

Conditions for which UIKit can activate the scene if a better alternative doesn’t exist.

## Relationships

### Conforms To

[`NSCoding`](/documentation/Foundation/NSCoding)

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

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

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

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

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

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

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

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

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)