Skip to main content
Version: 0.4.0

Events and handles

Each entry point reports through one onEvent closure. The SDK navigates inside its flows, so events say what happened — a property opened, a capture finished, something failed — and never ask you to push, pop, present or dismiss anything.

Event enums grow

New cases arrive in minor versions. Keep a default in exhaustive switches.

Handles​

Property and Floor are opaque references. A Property arrives from createProperty(name:floorCount:metadata:) / property(id:) or an event, and goes straight back into makePropertyViewController(property:onEvent:), presentProperty(_:from:onEvent:) or PropertyFlow; a Floor arrives in the capture events.

You cannot construct one, by design — a hand-built handle could only name a row that doesn't exist.

TypeProperties
Propertyid: String, name: String
Floorid: String, name: String?, number: Int?, propertyId: String

Both are Equatable. Store Property.id next to your own record to reopen it on a later launch.

PropertyFlowEvent​

CaseMeaning
openedProperty(Property)A property opened: pushed after the user selected it on the list, or presented after the user created it, with + on the list or in the flow presentPropertyCreation(from:metadata:onEvent:) presents. Not raised by a flow started on one property
closedProperty(Property)The user closed a property the SDK presented, and the screen it was presented over is showing again: the list, or your own. Raised for a property the user created in the flow, and for one presentProperty or .property(item:tours:onEvent:) presented
closedPropertyListThe user closed the list the SDK presented — with presentPropertyList or .propertyList(isPresented:tours:subtitle:onEvent:) — and your screen is showing again
structureCaptureFinished(Floor)The user confirmed a floor plan, from scratch or with rooms added to the existing one
panoramaCaptureFinished(Floor, capturedInSession: Int)Count is for this visit, not the floor total, and excludes scans the SDK discarded
failed(NoughtyToursError)Something the flow did on its own failed — a write, or building the next screen, which then is not shown

Where errors reach you​

Two paths, and they mean different things:

  • Thrown from an entry point, before you have a screen — the property was gone, or the read failed. Nothing is on screen yet, so you decide what to show.
  • Reported through failed — something inside the flow failed while the user was looking at it: a write, or a screen that could not be opened (for example capture on a device without LiDAR). The user stays on the screen they were on.

See Errors.