<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/AnchoringComponent/ObjectAnchoringSource/init(name:in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation18AnchoringComponentV06ObjectC6SourceV4name2inAESS_So8NSBundleCtcfc"
  },
  "title" : "init(name:in:)"
}
-->

# init(name:in:)

Creates the object anchoring source by reference object file asset with provided name and bundle.

```
init(name: String, in bundle: Bundle = .main)
```

## Parameters

`name`

The name of the reference object in the bundle.

`bundle`

The bundle to load from.

---

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)