<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSArray/arrayWithArray:",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSArray(cm)arrayWithArray:"
  },
  "title" : "arrayWithArray:"
}
-->

# arrayWithArray:

Creates and returns an array containing the objects in another given array.

```
+ (instancetype) arrayWithArray:(NSArray<id> *) array;
```

## Parameters

`array`

An array.

## Return Value

An array containing the objects in `anArray`.

## See Also

[`- (instancetype) initWithObjects:(ObjectType) firstObj;`](/documentation/Foundation/NSArray/initWithObjects:)

Initializes a newly allocated array by placing in it the objects in the argument list.



---

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)