---
title: "canReadObject(forClasses:options:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nspasteboard/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.

## Declaration

```swift
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 doc://com.apple.appkit/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

Return Value true if the receiver contains any items that can be represented as an instance of a class specified in classArray, otherwise false.

## See Also

### Related Documentation

- [readObjects(forClasses:options:)](appkit/nspasteboard/readobjects(forclasses:options:).md)

### Validating contents

- [availableType(from:)](appkit/nspasteboard/availabletype(from:).md)
- [canReadItem(withDataConformingToTypes:)](appkit/nspasteboard/canreaditem(withdataconformingtotypes:).md)
- [types](appkit/nspasteboard/types.md)
- [types(filterableTo:)](appkit/nspasteboard/types(filterableto:).md)
