An object encapsulating a user activity supported by this document.
- iOS 8.0+
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
On iOS, for
NSUser objects managed by UIKit to become current, you must either call
become explicitly or have the document’s
NSUser object also set on a
UIView object that is in the view hierarchy when the app comes to the foreground.
If the document becomes non-ubiquitous, its
user 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
user object is being shared with other objects that need to be kept in sync as the document moves into and out of iCloud.