Barcode information detected by a metadata capture output.


class AVMetadataMachineReadableCodeObject : AVMetadataObject


The AVMetadataMachineReadableCodeObject class is a concrete subclass of 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 is an immutable object describing the features and payload of a barcode.

On supported platforms, the AVCaptureMetadataOutput class outputs arrays of detected machine readable code objects.


Getting Machine Readable Code Values

var corners: [CGPoint]

A Swift array of corner points.

var descriptor: CIBarcodeDescriptor?

A barcode description for use in Core Image.

var stringValue: String?

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


Machine-Readable Object Types

Constants used to specify the type of barcode to scan.


Inherits From

Conforms To

See Also

Metadata Capture

class AVCaptureMetadataInput

A capture input for providing timed metadata to a capture session.

class AVCaptureMetadataOutput

A capture output for processing timed metadata produced by a capture session.

class AVMetadataFaceObject

Face information detected by a metadata capture output.

class AVMetadataObject

The abstract superclass for objects provided by a metadata capture output.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software