Instance Method

run(_:options:)

Starts AR processing for the session with the specified configuration and options.

Declaration

func run(_ configuration: ARConfiguration, options: ARSession.RunOptions = [])

Parameters

configuration

An object that defines motion and scene tracking behaviors for the session.

options

Options affecting how existing session state (if any) transitions to the new configuration.

If the session is running for the first time, this parameter has no effect.

Discussion

The session tracks device motion, captures and processes scene imagery from the device camera, and coordinates with your delegate object or ARSCNView or ARSKView view only when running.

Calling this method on a session that has already started transitions immediately to the new session configuration. The options parameter determines how existing session state transitions to the new configuration. By default, the session resumes device position tracking from the last known state and keeps any anchors you've added the session. After you call this method, the session runs asynchronously.

See Also

Configuring and Running a Session

struct ARSession.RunOptions

Options affecting how to transition an AR session's current state when you change its configuration.

var configuration: ARConfiguration?

An object that defines motion and scene tracking behaviors for the session.

func pause()

Pauses processing in the session.