Tells the delegate that the data for continuing an activity is available.
- macOS 10.10+
The app continuing the user activity.
The activity object containing the data associated with the task the user was performing. Use the data in this object to recreate what the user was doing.
A block to execute if your app creates or fetches objects to perform the task. Calling this block is optional and is only needed when specific objects are capable of continuing the activity. You can copy this block and call it at a later time. When calling a saved copy of the block, you must call it from the app’s main thread. This block has no return value and takes the following parameter:
true if this method handled continuing the activity;
false to have AppKit attempt to continue the activity.
The app calls this method when it receives the data associated with the user activity. Use the data stored in the
NSUser object to re-create the user’s activity. This method is your opportunity to update your app so that it can perform the associated task.
If this user activity object was created automatically by having
NSUbiquitous in a
CFBundle entry, AppKit can automatically restore the
NSUser in macOS if this method returns
false, or if it is unimplemented. It does this by creating a document of the appropriate type using the URL stored in the
user dictionary under the
NSUser. The system calls the
NSDocument method restoreUserActivityState(_:) on the document.