An object that encapsulates a user activity supported by this document.
- macOS 10.10+
NSDocument automatically creates
NSUser objects for iCloud-based documents if the app’s
Info property list file includes a
CFBundle key of
NSUbiquitous. The value of
NSUbiquitous is a string that is used for the
NSUser object’s activity type. The document's URL is put into the
user dictionary with the
NSUser objects managed by
become when any of the document window controller's window's become main. Otherwise, you need to invoke
[[document user at appropriate times.
If the document becomes non-ubiquitous, its
NSDocument property is
NSUser objects that are managed by AppKit but which have no associated documents (or responders) are automatically invalidated.
This property can be used from any thread. It is KVO observable in case the
NSDocument object is being shared with other objects that need to be kept in sync as the document moves into and out of iCloud.