<!--
{
  "availability" : [
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ARKit",
  "identifier" : "/documentation/ARKit/BarcodeAnchor",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "ARKit"
    ],
    "preciseIdentifier" : "s:5ARKit13BarcodeAnchorV"
  },
  "title" : "BarcodeAnchor"
}
-->

# BarcodeAnchor

A barcode’s position in a person’s surroundings.

```
struct BarcodeAnchor
```

## Overview

A `BarcodeAnchor` describes a barcode that ARKit detects in a person’s surroundings. A barcode anchor has exactly one <doc://com.apple.documentation/documentation/Vision/BarcodeSymbology> that indicates which type of barcode the framework detects. It also includes properties, such as the barcode’s payload data,  which is a decoded string value of that data.

## Topics

### Getting barcode information

[`var extent: SIMD3<Float>`](/documentation/ARKit/BarcodeAnchor/extent)

The extent of the detected barcode’s bounds.

[`var originFromAnchorTransform: simd_float4x4`](/documentation/ARKit/BarcodeAnchor/originFromAnchorTransform)

The transform from the barcode anchor to the origin coordinate system.

[`var payloadData: Data`](/documentation/ARKit/BarcodeAnchor/payloadData)

The encoded payload data of the detected barcode.

[`var payloadString: String?`](/documentation/ARKit/BarcodeAnchor/payloadString)

The decoded payload string value of the detected barcode.

[`var symbology: BarcodeAnchor.Symbology`](/documentation/ARKit/BarcodeAnchor/symbology-swift.property)

The symbology of the detected barcode.

[`enum Symbology`](/documentation/ARKit/BarcodeAnchor/Symbology-swift.enum)

Values that describe specific kinds of barcodes.

[`var id: UUID`](/documentation/ARKit/BarcodeAnchor/id)

The unique identifier of an anchor.

### Instance Properties

[`var description: String`](/documentation/ARKit/BarcodeAnchor/description)

A textual representation of this anchor.

### Default Implementations

[ARKitCoordinateSpaceProviding Implementations](/documentation/ARKit/BarcodeAnchor/ARKitCoordinateSpaceProviding-Implementations)

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Identifiable`](/documentation/Swift/Identifiable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Anchor`](/documentation/ARKit/Anchor)

[`ARKitCoordinateSpaceProviding`](/documentation/ARKit/ARKitCoordinateSpaceProviding)

[`Escapable`](/documentation/Swift/Escapable)

[`Copyable`](/documentation/Swift/Copyable)

[`Sendable`](/documentation/Swift/Sendable)

---

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)