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


class AVCaptureMetadataOutput : AVCaptureOutput


An AVCaptureMetadataOutput object intercepts metadata objects emitted by its associated capture connection and forwards them to a delegate object for processing. You can use instances of this class to process specific types of metadata included with the input data. You use this class the way you do other output objects, typically by adding it as an output to an AVCaptureSession object.


Configuring Metadata Capture

var availableMetadataObjectTypes: [AVMetadataObject.ObjectType]

An array of strings identifying the types of metadata objects that can be captured.

var metadataObjectTypes: [AVMetadataObject.ObjectType]!

An array of strings identifying the types of metadata objects to process.

var rectOfInterest: CGRect

A rectangle of interest for limiting the search area for visual metadata.

Receiving Captured Metadata Objects

var metadataObjectsDelegate: AVCaptureMetadataOutputObjectsDelegate?

The delegate of the capture metadata output object.

var metadataObjectsCallbackQueue: DispatchQueue?

The dispatch queue on which to execute the delegate’s methods.

protocol AVCaptureMetadataOutputObjectsDelegate

Methods for receiving metadata produced by a metadata capture output.

Creating Metadata Output


Creates a new capture metadata output.


Inherits From

Conforms To

See Also

Metadata Capture

class AVCaptureMetadataInput

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

class AVMetadataFaceObject

Face information detected by a metadata capture output.

class AVMetadataMachineReadableCodeObject

Barcode 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