<!--
{
  "availability" : [
    "DriverKit: -",
    "iOS: -",
    "iPadOS: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DriverKit",
  "identifier" : "/documentation/DriverKit/OSArray/merge",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "DriverKit"
    ],
    "preciseIdentifier" : "c:@S@OSArray@F@merge#*1$@S@OSArray#"
  },
  "title" : "merge"
}
-->

# merge

Appends all members of an array to this array.

```
bool merge(const OSArray *otherArray);
```

## Parameters

`otherArray`

All members of thie array will be appended to the array.

## Return Value

true on success, which retains all the added objects, or false on failure which does not retain the objects.

## Discussion

Appends all members of an array to this array. The array capacity will be grown if necessary.

---

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)