<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "XPC",
  "identifier" : "/documentation/XPC/xpc_array_get_value(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "XPC"
    ],
    "preciseIdentifier" : "c:@F@xpc_array_get_value"
  },
  "title" : "xpc_array_get_value(_:_:)"
}
-->

# xpc_array_get_value(_:_:)

Returns the value at the specified index in the array.

```
func xpc_array_get_value(_ xarray: xpc_object_t, _ index: Int) -> xpc_object_t
```

## Parameters

`xarray`

The array object which is to be examined.

`index`

The index of the value to obtain. This value must lie within the range of indexes as specified in [`xpc_array_set_value(_:_:_:)`](/documentation/XPC/xpc_array_set_value(_:_:_:)).

## Return Value

The object at the specified index within the array.

## Discussion

This method does not grant the caller a reference to the underlying object, and thus the caller is not responsible for releasing the object.

---

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)