Asks the system to activate an existing scene, or create a new scene and associate it with your app.
- iOS 13.0+Beta
- tvOS 13.0+Beta
The session whose scene you want to activate. Specify
nilwhen you want the system to create a new scene for your app.
A user activity object to dispatch to the session's scene. Use this object to communicate details about a task you want the scene to perform.
Information for the system to use when creating or activating the scene. For information about how to create this object, see
.Activation Request Options
An error handler block to execute if a problem occurs. The method does not execute this block when it successfully activates the scene. This block has no return value and has the following parameter:
NSErrorobject describing the problem that occurred.
Call this method when you want the system to display one of your app's scenes. For example, you might call this method to dispatch work to the scene in the form of an
NSUser object. When activating an existing session whose scene is no longer in memory, the system creates a new scene and connects it to your app. Similarly, specifying
nil for the
scene parameter causes the system to create a new scene and corresponding session.