---
title: "merge(_:mode:)"
framework: coremedia
role: symbol
role_heading: Instance Method
path: "coremedia/cmattachmentbearerattachments/merge(_:mode:)"
---

# merge(_:mode:)

Sets a collection of attachments on the object.

## Declaration

```swift
func merge(_ attachments: [String : Any], mode: CMAttachmentBearerAttachments.Mode)
```

## Parameters

- `attachments`: The attachments to set on this object.
- `mode`: The mode with which to add the attachments.

## See Also

### Managing Attachments

- [CMAttachmentBearerAttachments.Mode](coremedia/cmattachmentbearerattachments/mode.md)
- [removeAll()](coremedia/cmattachmentbearerattachments/removeall().md)
