ARReferenceImage
A 2D image that you want ARKit to detect in the physical environment.
Declaration
class ARReferenceImageOverview
To accurately detect the position and orientation of a 2D image in the real world, ARKit requires preprocessed image data and knowledge of the image’s real-world dimensions. The ARReferenceImage class encapsulates this information. To enable image detection in an AR session, pass a collection of reference images to your session configuration’s detectionImages property.
Typically, you create reference images in your Xcode project’s asset catalog:
In your asset catalog, use the Add (+) button to create an AR Resource Group.
Drag image files into the resource group to create AR Reference Image entries in the asset catalog.
For each reference image, use the Xcode inspector panel to provide the real-world size at which you want ARKit to recognize the image. (You can also provide a descriptive name, which appears as the name property at runtime and can be useful for debugging.)