<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIPasteboard/init(name:create:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIPasteboard(cm)pasteboardWithName:create:"
  },
  "title" : "init(name:create:)"
}
-->

# init(name:create:)

Returns a pasteboard that you identify by name, optionally creating it if it doesn’t exist.

```
init?(name pasteboardName: UIPasteboard.Name, create: Bool)
```

## Parameters

`pasteboardName`

A string or string constant that identifies (or should identify) the pasteboard. To create a pasteboard with a `nil` name, specify a `nil` value for this parameter.

`create`

A Boolean value that specifies whether to create the pasteboard if it doesn’t already exist. Specify <doc://com.apple.documentation/documentation/Swift/false> for system pasteboards or if you want to use an existing app pasteboard.

## Return Value

A pasteboard object you can use to transfer data within an app or between apps that have the same team ID.

## Discussion

Call this method to create custom app pasteboards. (You can also use it to obtain the general pasteboard, but the [`general`](/documentation/UIKit/UIPasteboard/general) class method exists for that purpose.) App pasteboards this method returns aren’t persistent, existing only until the app quits. Starting in iOS 10, persistent, named pasteboards are deprecated. Instead, use a shared container, as described in the overview for the [`UIPasteboard`](/documentation/UIKit/UIPasteboard) class.

---

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)