<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPasteboard/canReadObject(forClasses:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPasteboard(im)canReadObjectForClasses:options:"
  },
  "title" : "canReadObject(forClasses:options:)"
}
-->

# canReadObject(forClasses:options:)

Returns a Boolean value that indicates whether the receiver contains any items that can be represented as an instance of any class in a given array.

```
func canReadObject(forClasses classArray: [AnyClass], options: [NSPasteboard.ReadingOptionKey : Any]? = nil) -> Bool
```

## Parameters

`classArray`

An array of class objects.

    Classes in the array must conform to the [`NSPasteboardReading`](/documentation/AppKit/NSPasteboardReading)     protocol.

`options`

A dictionary that specifies options to refine the search for pasteboard items, for example to restrict the search to file URLs with particular content types. For valid dictionary keys, see `Pasteboard Reading Options`.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the receiver contains any items that can be represented as an instance of a class specified in `classArray`, otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## See Also

[`readObjects(forClasses:options:)`](/documentation/AppKit/NSPasteboard/readObjects(forClasses:options:))

Reads from the receiver objects that best match the specified array of classes.



---

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)