A configuration that uses the back-facing camera to collect high-fidelity spatial data for use in scanning 3D objects for later detection.


class ARObjectScanningConfiguration : ARConfiguration


To detect a real-world 3D object in an AR experience, your ARWorldTrackingConfiguration needs a high-fidelity 3D scan of that object—an ARReferenceObject. Running a session with ARObjectScanningConfiguration enables the high-fidelity data collection needed for object scanning. After you’ve scanned an object in a session with this configuration, call createReferenceObject(transform:center:extent:completionHandler:) to extract a region of the session’s internal spatial-mapping data for use as a reference object.

Aside from the object scanning capability, ARObjectScanningConfiguration is similar to ARWorldTrackingConfiguration: both track device position and orientation with six degrees of freedom (6DOF) and support plane detection and hit testing. To enable higher-fidelity object scanning, object-scanning sessions omit other features of world-tracking sessions.


Creating a Configuration


Initializes a new object scanning configuration.

Enabling Plane Detection

var planeDetection: ARWorldTrackingConfiguration.PlaneDetection

A value specifying whether and how the session attempts to automatically detect flat surfaces in the camera-captured image.

Managing Device Camera Behavior

var isAutoFocusEnabled: Bool

A Boolean value that determines whether the device camera uses fixed focus or autofocus behavior.


Inherits From

Conforms To

See Also

Object Detection

Scanning and Detecting 3D Objects

Record spatial features of real-world objects, then use the results to find those objects in the user’s environment and trigger AR content.

class ARReferenceObject

A 3D object to be recognized in the real-world environment during a world-tracking AR session.

class ARObjectAnchor

Information about the position and orientation of a real-world 3D object detected in a world-tracking AR session.