---
title: "writableTypes(for:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nspasteboardwriting/writabletypes(for:)"
---

# writableTypes(for:)

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

## Declaration

```swift
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

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

## Discussion

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 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

### Related Documentation

- [Drag and Drop](appkit/drag-and-drop.md)
- [NSPasteboard](appkit/nspasteboard.md)
- [Services Functions](appkit/services-functions.md)

### Required Methods

- [writingOptions(forType:pasteboard:)](appkit/nspasteboardwriting/writingoptions(fortype:pasteboard:).md)
- [NSPasteboard.WritingOptions](appkit/nspasteboard/writingoptions.md)
