<!--
{
  "documentType" : "article",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/documents-data-and-pasteboard",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Documents, Data, and Pasteboard"
}
-->

# Documents, Data, and Pasteboard

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

## Topics

### Documents

[Developing a Document-Based App](/documentation/AppKit/developing-a-document-based-app)

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

[`NSDocument`](/documentation/AppKit/NSDocument)

An abstract class that defines the interface for macOS documents.

[`NSDocumentController`](/documentation/AppKit/NSDocumentController)

An object that manages an app’s documents.

[`NSPersistentDocument`](/documentation/AppKit/NSPersistentDocument)

A document object that can integrate with Core Data.

### User Preferences

[`NSUserDefaultsController`](/documentation/AppKit/NSUserDefaultsController)

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

  <doc://com.apple.documentation/documentation/Foundation/NSUbiquitousKeyValueStore>

### Pasteboard

[`NSPasteboard`](/documentation/AppKit/NSPasteboard)

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

[`NSPasteboardItem`](/documentation/AppKit/NSPasteboardItem)

An item on a pasteboard.

[`NSPasteboardReading`](/documentation/AppKit/NSPasteboardReading)

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

[`NSPasteboardWriting`](/documentation/AppKit/NSPasteboardWriting)

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

[`NSPasteboardItemDataProvider`](/documentation/AppKit/NSPasteboardItemDataProvider)

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

[`NSPasteboard.ContentsOptions`](/documentation/AppKit/NSPasteboard/ContentsOptions)

Options for preparing the pasteboard.

[`NSPasteboardTypeOwner`](/documentation/AppKit/NSPasteboardTypeOwner)

An object that serves as a data provider for data types that use lazy data fulfillment from a pasteboard request.

### 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](/documentation/AppKit/supporting-drag-and-drop-through-file-promises)

Receive and provide file promises to support dragged app files and pasteboard operations.

[Supporting Table View Drag and Drop Through File Promises](/documentation/AppKit/supporting-table-view-drag-and-drop-through-file-promises)

Share data between macOS apps during drag and drop by using an item provider.

[Supporting Collection View Drag and Drop Through File Promises](/documentation/AppKit/supporting-collection-view-drag-and-drop-through-file-promises)

Share data between macOS apps during drag and drop by using an item provider.

[`NSFilePromiseProvider`](/documentation/AppKit/NSFilePromiseProvider)

An object that provides a promise for the pasteboard.

[`NSFilePromiseProviderDelegate`](/documentation/AppKit/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.

[`NSFilePromiseReceiver`](/documentation/AppKit/NSFilePromiseReceiver)

An object that receives a file promise from the pasteboard.

### Object Editing

[`NSEditor`](/documentation/AppKit/NSEditor)

[`NSEditorRegistration`](/documentation/AppKit/NSEditorRegistration)

A set of methods that controllers can implement to enable an editor view to inform the controller when it has uncommitted changes.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)