identifier
A unique identifier of the running session.
Declaration
var identifier: UUID { get }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!)")
}