Documents, Files, and iCloud

Manage your app's data using documents and store it to the local file system or to iCloud.



Developing a Document-Based App

Write an app that creates, manages, edits, and saves text documents.

class NSDocumentController

An object that manages an app's documents.

class NSPersistentDocument

A document object that can integrate with Core Data.

class NSDocument

An abstract class that defines the interface for macOS documents.

File Promises

File promises support UTI-based drag and drop functions, including drag flocking. When possible, they're pasteboard compliant and file coordinated.

Supporting Drag and Drop Through File Promises

Receive file promises to support dragged files from other apps and provide file promises to support pasteboard operations of your app’s custom file types.

class NSFilePromiseProvider

An object that provides a promise for the pasteboard.

protocol NSFilePromiseProviderDelegate

A set of methods that provides the name of the promised file and writes the file to the destination directory when the file promise is fulfilled.

class NSFilePromiseReceiver

An object that receives a file promise from the pasteboard.


protocol NSCloudSharingValidation

A protocol that a Cloud-sharing toolbar item uses to get validation of an item.

protocol NSCloudSharingServiceDelegate

A protocol that a Cloud-sharing service implements to handle status changes and errors.

See Also

App Structure

Core App

Learn about the objects that you use to interact with the system.

Cocoa Bindings

Automatically synchronize your data model with your app's interface using Cocoa Bindings.

Resource Management

Manage the storyboards and nib files containing your app's user interface, and learn how to load data that is stored in resource files.