Documents, Data, and Pasteboard

Organize your app's data and preferences, and share that data on the pasteboard or in iCloud.



Developing a Document-Based App

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


An abstract class that defines the interface for macOS documents.


An object that manages an app's documents.


A document object that can integrate with Core Data.

User Preferences


A controller that accesses user preference information for your app from the user’s defaults database.


An iCloud-based container of key-value pairs you use to share data among instances of your app running on a user's connected devices.



An object that transfers data to and from the pasteboard server.


An item on a pasteboard.


A set of methods that defines the interface for initializing an object from a pasteboard.


A set of methods that defines the interface for retrieving a representation of an object that can be written to a pasteboard.


A set of methods implemented by the data provider of a pasteboard item to provide the data for a particular UTI type.


Options for preparing the pasteboard.

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.


An object that provides a promise for the pasteboard.


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.


An object that receives a file promise from the pasteboard.

See Also

App Structure

App and Environment

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.

App Extensions

Extend your app's basic functionality to other parts of the system.