<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ARKit",
  "identifier" : "/documentation/ARKit/ARReferenceObject",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "ARKit"
    ],
    "preciseIdentifier" : "c:objc(cs)ARReferenceObject"
  },
  "title" : "ARReferenceObject"
}
-->

# ARReferenceObject

The description of a 3D object that you want ARKit to detect in the physical environment.

```
class ARReferenceObject
```

## Overview

Object detection in ARKit lets you trigger AR content when the session recognizes a known 3D object. For example, your app could detect sculptures in an art museum and provide a virtual curator, or detect tabletop gaming figures and create visual effects for the game.

To provide a known 3D object for detection, you scan a real-world object using ARKit:

1. Run an AR session using [`ARObjectScanningConfiguration`](/documentation/ARKit/ARObjectScanningConfiguration) to enable collection of high-fidelity spatial mapping data.
2. In that session, point the device camera at the real-world object from various angles, allowing ARKit to build up an internal map of the object and its surroundings. For an example of guiding user interactions to produce good scan data, see [Scanning and Detecting 3D Objects](/documentation/ARKit/scanning-and-detecting-3d-objects).
3. Determine the portion of the session’s world coordinate space representing the object to be recognized, and call [`createReferenceObject(transform:center:extent:completionHandler:)`](/documentation/ARKit/ARSession/createReferenceObject(transform:center:extent:completionHandler:)) to get that portion as an [`ARReferenceObject`](/documentation/ARKit/ARReferenceObject) ready for use in object detection.
4. To save the reference object for use later or elsewhere, use the [`export(to:previewImage:)`](/documentation/ARKit/ARReferenceObject/export(to:previewImage:)) method to create an `.arobject` file.

To detect objects in an AR session, pass a collection of reference objects to your session configuration’s [`detectionObjects`](/documentation/ARKit/ARWorldTrackingConfiguration/detectionObjects) property. You need not scan and detect objects in the same app: For example, you might create one app for scanning museum collections that outputs `.arobject` files, then bundle those files into another app meant for museum visitors.

To bundle reference objects into an app, use your Xcode project’s asset catalog:

1. In your asset catalog, use the Add (+) button to create an AR Resource Group.
2. Drag `.arobject` into the resource group to create AR Reference Object entries in the asset catalog.
3. Optionally, use the Xcode inspector panel to provide a descriptive name for the object, which appears as the [`name`](/documentation/ARKit/ARReferenceObject/name) property at runtime and can be useful for debugging.

## Topics

### Loading Reference Objects

[`init(archiveURL:)`](/documentation/ARKit/ARReferenceObject/init(archiveURL:))

Loads a reference object from the specified file URL.

[`referenceObjects(inGroupNamed:bundle:)`](/documentation/ARKit/ARReferenceObject/referenceObjects(inGroupNamed:bundle:))

Loads all reference objects in the specified AR Resource Group in your Xcode project’s asset catalog.

### Examining a Reference Object

[`name`](/documentation/ARKit/ARReferenceObject/name)

A descriptive name for the reference object.

[`resourceGroupName`](/documentation/ARKit/ARReferenceObject/resourceGroupName)

[`center`](/documentation/ARKit/ARReferenceObject/center)

The center point of the reference object’s space-mapping data.

[`extent`](/documentation/ARKit/ARReferenceObject/extent)

The size of the reference object’s space-mapping data.

[`scale`](/documentation/ARKit/ARReferenceObject/scale)

A scale factor for the local coordinate space the reference object defines.

### Saving Recorded Objects

[`export(to:previewImage:)`](/documentation/ARKit/ARReferenceObject/export(to:previewImage:))

Writes a binary representation of the object to the specified file URL.

[`archiveExtension`](/documentation/ARKit/ARReferenceObject/archiveExtension)

The standard filename extension for exported [`ARReferenceObject`](/documentation/ARKit/ARReferenceObject) instances.

### Creating Derivative Reference Objects

[`applyingTransform(_:)`](/documentation/ARKit/ARReferenceObject/applyingTransform(_:))

Returns a new reference object created by applying the specified transform to this reference object’s geometric data.

[`merging(_:)`](/documentation/ARKit/ARReferenceObject/merging(_:))

Returns a new reference object that combines spatial information from both this reference object and another.

### Debugging a Reference Object

[`rawFeaturePoints`](/documentation/ARKit/ARReferenceObject/rawFeaturePoints)

A coarse representation of the space-mapping data contained in the reference object.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)