Instance Method


Asks the system to dismiss an existing scene and remove it from the app switcher.


func requestSceneSessionDestruction(_ sceneSession: UISceneSession, options: UISceneDestructionRequestOptions?, errorHandler: ((Error) -> Void)? = nil)



The session whose scene you want to remove from the screen and app switcher.


Information for the system to use when dismissing the scene. For information about how to create this object, see UISceneDestructionRequestOptions.


An error handler block to execute if a problem occurs. The method does not execute this block when it successfully dismisses the scene. This block has no return value and has the following parameter:


The NSError object describing the problem that occurred.


If the specified scene is onscreen, calling this method dismisses it using the specified options. The method sends a disconnect notification to the scene and then calls your app delegate's application(_:didDiscardSceneSessions:) method.

See Also

Creating, Destroying, and Updating Scenes

func requestSceneSessionRefresh(UISceneSession)

Asks the system to update any system UI associated with the specified scene.