The description of an image you want ARKit to detect in the physical environment.
- iOS 11.3+
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
ARReference class encapsulates this information. To enable image detection in an AR session, pass a collection of reference images to your session configuration's
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
nameproperty at runtime and can be useful for debugging.)