UISceneActivationConditions
The set of conditions that define when UIKit activates the current scene.
Declaration
@MainActor class UISceneActivationConditionsOverview
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 object. You create UISceneActivationConditions objects for your scenes and use them to prioritize which events each scene handles. Use the prefersToActivateForTargetContentIdentifierPredicate predicate to designate the scene as the primary handler of an event.
Many different objects contain a targetContentIdentifier property, including NSUserActivity, UNNotificationContent, and 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.