<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPasteboard/init(name:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPasteboard(cm)pasteboardWithName:"
  },
  "title" : "init(name:)"
}
-->

# init(name:)

Returns the pasteboard with the specified name.

```
init(name: NSPasteboard.Name)
```

## Parameters

`name`

The name of the pasteboard. The names of standard pasteboards are given in `Pasteboard Names`.

## Return Value

The pasteboard associated with the given name, or a new `NSPasteboard` object if the application does not yet have a pasteboard object for the specified name.

## Discussion

Other names can be assigned to create private pasteboards for other purposes.

---

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)