---
title: "writingOptions(forType:pasteboard:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nspasteboardwriting/writingoptions(fortype:pasteboard:)"
---

# writingOptions(forType:pasteboard:)

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

## Declaration

```swift
optional func writingOptions(forType type: NSPasteboard.PasteboardType, pasteboard: NSPasteboard) -> NSPasteboard.WritingOptions
```

## Parameters

- `type`: One of the types the receiver supports for writing (one of the UTIs returned by its implementation of doc://com.apple.appkit/documentation/AppKit/NSPasteboardWriting/writableTypes(for:)).
- `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 Options for writing data of type type to pasteboard. Return 0 for no options, or a value given in Pasteboard Writing Options.

## Discussion

Discussion Do not perform other pasteboard operations in the method implementation.

## See Also

### Required Methods

- [writableTypes(for:)](appkit/nspasteboardwriting/writabletypes(for:).md)
- [NSPasteboard.WritingOptions](appkit/nspasteboard/writingoptions.md)
