<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVDepthData/converting(toDepthDataType:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVDepthData(im)depthDataByConvertingToDepthDataType:"
  },
  "title" : "converting(toDepthDataType:)"
}
-->

# converting(toDepthDataType:)

Returns a derivative depth data object by converting the depth data map to the specified data type.

```
func converting(toDepthDataType depthDataType: OSType) -> Self
```

## Parameters

`depthDataType`

The data type to convert to. This value must be one of the formats present in the [`availableDepthDataTypes`](/documentation/AVFoundation/AVDepthData/availableDepthDataTypes-472g0) array.

## Return Value

A new, converted depth data object.

## Discussion

This method raises an exception if you pass an invalid `depthDataType` value.

---

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)