Returns a user activity object encapsulating the current state of the specified scene.
- iOS 13.0+
- Mac Catalyst 13.0+
- tvOS 13.0+
The scene whose state information is needed.
Use this method to return an
NSUser object with information about your scene's data. Save enough information to be able to retrieve that data again after UIKit disconnects and then reconnects the scene. User activity objects are meant for recording what the user was doing, so you don't need to save the state of your scene's UI.
After calling this method, and before archiving the
NSUser object and saving it to disk, UIKit lets you add state information in the following ways:
NSUserobject contains a delegate, UIKit calls the delegate's
Activity Will Save(_:)