<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPasteboardWriting",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSPasteboardWriting"
  },
  "title" : "NSPasteboardWriting"
}
-->

# NSPasteboardWriting

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

```
protocol NSPasteboardWriting : NSObjectProtocol
```

## Overview

The Cocoa framework classes <doc://com.apple.documentation/documentation/Foundation/NSString>, <doc://com.apple.documentation/documentation/Foundation/NSAttributedString>, <doc://com.apple.documentation/documentation/Foundation/NSURL>, [`NSColor`](/documentation/AppKit/NSColor), [`NSSound`](/documentation/AppKit/NSSound), [`NSImage`](/documentation/AppKit/NSImage), and [`NSPasteboardItem`](/documentation/AppKit/NSPasteboardItem) implement this protocol. You can make your custom class conform to this protocol so that you can write instances of the class to a pasteboard using the [`writeObjects(_:)`](/documentation/AppKit/NSPasteboard/writeObjects(_:)) method of [`NSPasteboard`](/documentation/AppKit/NSPasteboard).

## Topics

### Required Methods

[`writableTypes(for:)`](/documentation/AppKit/NSPasteboardWriting/writableTypes(for:))

Returns an array of UTI strings of data types the receiver can write to a given pasteboard.

[`writingOptions(forType:pasteboard:)`](/documentation/AppKit/NSPasteboardWriting/writingOptions(forType:pasteboard:))

Returns options for writing data of a specified type to a given pasteboard.

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

Type to specify options for writing to a pasteboard.

### Property List for Type

[`pasteboardPropertyList(forType:)`](/documentation/AppKit/NSPasteboardWriting/pasteboardPropertyList(forType:))

Returns a property list object to represent the receiver on a pasteboard as an object of a specified type.

### Constants

[Pasteboard Writing Options](/documentation/AppKit/pasteboard-writing-options)

Constant to specify options for writing to a pasteboard, used by [`writingOptions(forType:pasteboard:)`](/documentation/AppKit/NSPasteboardWriting/writingOptions(forType:pasteboard:)).

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

Type to specify options for writing to a pasteboard.



---

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)