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

# writableTypes(for:)

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

```
func writableTypes(for pasteboard: NSPasteboard) -> [NSPasteboard.PasteboardType]
```

## Parameters

`pasteboard`

A pasteboard.

    You can use this argument to provide different options based on the pasteboard name, if you need to.

## Return Value

An array of UTI strings of data types the receiver can write to `pasteboard`.

## Discussion

By default, data for the first returned type is put onto the pasteboard immediately, with the remaining types being promised.

To change the default behavior, implement -writingOptionsForType:pasteboard: and return [`promised`](/documentation/AppKit/NSPasteboard/WritingOptions/promised) to lazily provide data for types, return no option to provide the data for that type immediately.  Use the pasteboard argument to provide different types based on the pasteboard name, if desired.  Do not perform other pasteboard operations in the method implementation.

## See Also

[Drag and Drop](/documentation/AppKit/drag-and-drop)

Support the direct manipulation of your app’s content using drag and drop.

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

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

[Services Functions](/documentation/AppKit/services-functions)

Configure the contents of your app’s Services menu.



---

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)