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


class AVMetadataObject : NSObject


The AVMetadataObject class is an abstract class that defines the basic properties associated with a piece of metadata. These attributes reflect information either about the metadata itself or the media from which the metadata originated. Subclasses are responsible for providing appropriate values for each of the relevant properties.

You should not subclass AVMetadataObject directly. Instead, you use one of the defined subclasses provided by the AVFoundation framework. Similarly, you do not create instances of this class yourself but use an AVCaptureMetadataOutput object to retrieve them from the captured data.


Getting the Type of Metadata

Getting the Media-Related Attributes

var time: CMTime

The media time value associated with the metadata object.

var duration: CMTime

The duration of the media associated with this metadata object.

var bounds: CGRect

The bounding rectangle associated with the metadata.


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 AVMetadataMachineReadableCodeObject

Barcode information detected 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