Support for custom ARAnchor subclasses.


protocol ARAnchorCopying


An ARAnchor (or a instance of any anchor subclass) represents a position and orientation in world space, and optionally associates extra information with that point (like a name, or plane or image detection data). Each time ARKit generates an ARFrame object (describing the current environment as of a specific frame of live camera video), ARKit updates the anchors associated with the session as of that moment. Because anchor objects are immutable, ARKit must copy them to make changes from one ARFrame to the next.

If you create your own ARAnchor subclass, you must implement the init(anchor:) initializer required by this protocol. To ensure that any custom information in your subclass is maintained between successive frames, your implementation should copy any custom properties it declares.


Copying Anchors

init(anchor: ARAnchor)

Initializes a new anchor by copying custom information from another anchor.



Inherits From

Conforming Types

See Also


protocol ARTrackable

A real-world object in a scene for which ARKit tracks changes to position and orientation.