Instance Property

identifier

A unique identifier of the running session.

Declaration

@property(atomic, strong, readonly) NSUUID *identifier;

Discussion

This property might change after you call the run function, but not immediately. Therefore, to get the new value, listen for its change using key-value observation.

// Use key-value observation to monitor my ARSession's identifier.
var sessionIDObservation: NSKeyValueObservation?
...
sessionIDObservation = observe(
    .arView.session.identifier,
    options: [.old, .new]) { 
        object, change in
        print("SessionID changed to: \(change.newValue!)")
    }

See Also

Configuring and Running a Session

- runWithConfiguration:options:

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

- runWithConfiguration:

Starts AR processing for the session with the specified configuration.

ARSessionRunOptions

Options for transitioning an AR session's current state when you change its configuration.

configuration

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

- pause

Pauses processing in the session.