Protocol

ARSessionObserver

Methods you can implement to respond to changes in the state of an AR session.

Declaration

@protocol ARSessionObserver

Overview

This protocol defines optional methods common to the ARSessionDelegate, ARSCNViewDelegate, and ARSKViewDelegate protocols. You can implement this protocol's methods when adopting one of those protocols.

Topics

Responding to Tracking Quality Changes

- session:cameraDidChangeTrackingState:

Informs the delegate of changes to the quality of ARKit's device position tracking.

Handling Interruptions

- sessionWasInterrupted:

Tells the delegate that the session has temporarily stopped processing frames and tracking device position.

- sessionInterruptionEnded:

Tells the delegate that the session has resumed processing frames and tracking device position.

- sessionShouldAttemptRelocalization:

Asks the delegate whether to attempt recovery of world-tracking state after an interruption.

Receiving Audio Data

- session:didOutputAudioSampleBuffer:

Tells the delegate that a new sample buffer of recorded audio is available.

Handling Errors

- session:didFailWithError:

Tells the delegate that the session has stopped running due to an error.

ARErrorDomain

The error domain for NSError objects produced by an AR session.

ARErrorCode

Error codes for NSError objects produced by an AR session.

Managing Collaboration

- session:didOutputCollaborationData:

Called when the session created collaboration data.

Beta

Relationships

Inherits From

See Also

Responding to Events

delegate

An object you provide to receive captured video images and tracking information, or to respond to changes in session status.

delegateQueue

The dispatch queue through which the session calls your delegate methods.

ARSessionDelegate

Methods you can implement to receive captured video frame images and tracking state from an AR session.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software