---
title: "init(pasteboardPropertyList:ofType:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nspasteboardreading/init(pasteboardpropertylist:oftype:)"
---

# init(pasteboardPropertyList:ofType:)

Initializes an instance with a property list object and a type string.

## Declaration

```swift
init?(pasteboardPropertyList propertyList: Any, ofType type: NSPasteboard.PasteboardType)
```

## Parameters

- `propertyList`: A property list containing data to initialize the receiver. By default, the property list object is an instance of NSData. If you implement doc://com.apple.appkit/documentation/AppKit/NSPasteboardReading/readingOptions(forType:pasteboard:) and specify an option other than doc://com.apple.appkit/documentation/AppKit/NSPasteboard/ReadingOptions/asData, the propertyList may be any other property list object.
- `type`: A UTI supported by the receiver for reading (one of the types returned by doc://com.apple.appkit/documentation/AppKit/NSPasteboardReading/readableTypes(for:)).

## Return Value

Return Value An object initialized using the data in propertyList.

## Discussion

Discussion This method is considered optional because, if readableTypes(for:) returns just a single type, and that type uses the asKeyedArchive reading option, then instances are initialized using init(coder:) instead of this method.

## See Also

### Related Documentation

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