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

# writingOptions(forType:pasteboard:)

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

```
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 [`writableTypes(for:)`](/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

Options for writing data of type type to `pasteboard`. Return `0` for no options, or a value given in [Pasteboard Writing Options](/documentation/AppKit/pasteboard-writing-options).

## Discussion

Do not perform other pasteboard operations in the method implementation.

---

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)