<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVMetadataMachineReadableCodeObject",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVMetadataMachineReadableCodeObject"
  },
  "title" : "AVMetadataMachineReadableCodeObject"
}
-->

# AVMetadataMachineReadableCodeObject

Barcode information detected by a metadata capture output.

```
class AVMetadataMachineReadableCodeObject
```

## Overview

The `AVMetadataMachineReadableCodeObject` class is a concrete subclass of [`AVMetadataObject`](/documentation/AVFoundation/AVMetadataObject) defining the features of a detected one-dimensional or two-dimensional barcode.

An `AVMetadataMachineReadableCodeObject` instance represents a single detected machine readable code in an image.  It’s an immutable object describing the features and payload of a barcode.

On supported platforms, the [`AVCaptureMetadataOutput`](/documentation/AVFoundation/AVCaptureMetadataOutput) class outputs arrays of detected machine readable code objects.

## Topics

### Getting machine-readable code values

[`corners`](/documentation/AVFoundation/AVMetadataMachineReadableCodeObject/corners-58qbe)

A Swift array of corner points.

[`corners`](/documentation/AVFoundation/AVMetadataMachineReadableCodeObject/corners-8f6bv)

The points defining the (x, 	y) locations of the corners.

[`descriptor`](/documentation/AVFoundation/AVMetadataMachineReadableCodeObject/descriptor)

A barcode description for use in Core Image.

[`stringValue`](/documentation/AVFoundation/AVMetadataMachineReadableCodeObject/stringValue)

Returns the error-corrected data decoded into a human-readable string.

### Constants

[Machine-readable object types](/documentation/AVFoundation/machine-readable-object-types)

Constants used to specify the type of barcode to scan.



---

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)