---
title: "writeObjects(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nspasteboard/writeobjects(_:)"
---

# writeObjects(_:)

Writes an array of objects to the receiver.

## Declaration

```swift
func writeObjects(_ objects: [any NSPasteboardWriting]) -> Bool
```

## Parameters

- `objects`: An array of objects that implement the doc://com.apple.appkit/documentation/AppKit/NSPasteboardWriting protocol (including instances of doc://com.apple.appkit/documentation/AppKit/NSPasteboardItem).

## Return Value

Return Value true if the array was successfully added, otherwise false.

## See Also

### Writing data

- [clearContents()](appkit/nspasteboard/clearcontents().md)
- [setData(_:forType:)](appkit/nspasteboard/setdata(_:fortype:).md)
- [setPropertyList(_:forType:)](appkit/nspasteboard/setpropertylist(_:fortype:).md)
- [setString(_:forType:)](appkit/nspasteboard/setstring(_:fortype:).md)
- [NSPasteboard.PasteboardType](appkit/nspasteboard/pasteboardtype.md)
