Tells the delegate that the user closed one or more of the app's scenes from the app switcher.
- iOS 13.0+
- Mac Catalyst 13.0+
- tvOS 13.0+
The singleton app object.
The session objects associated with the discarded scenes.
When the user removes a scene from the app switcher, UIKit calls this method before discarding the scene's associated session object altogether. (UIKit also calls this method to discard scenes that it can no longer display.) If your app is not running, UIKit calls this method the next time your app launches.
Use this method to update your app's data structures and to release any resources associated with the scene. For example, you might use this method to update your app's interface to incorporate the content associated with the scenes.
UIKit calls this method only when dismissing scenes permanently. It doesn't call it when the system disconnects a scene to free up memory. Memory reclamation deletes the scene objects, but preserves the sessions associated with those scenes.