This document targets v0.1.13. You can check the running version with
OneS1ght.sdkVersion.OneS1ght is the single static entry point for the whole app — you never create an instance, and every API is
called on the type. All APIs are called on the main actor (@MainActor).
Lifecycle
Parameters of
initialize:
The default
baseURL is https://console.ones1ght.com/api/sdk/v1.
Positioning session — FloorSession
- SwiftUI
- UIKit
Callbacks
Session callbacks live on theFloorSession instance; the debug log lives on the OneS1ght type.
LogLevel
Comparable, so you can filter with level >= .warn.
“No zones registered on this floor” is a normal state — nobody has drawn a zone in
the console yet — so it is
.info, not a failure.Space lookup
One method per endpoint, with a list and a single-item pair.Setting the floor
Profiles
Your member IDs never reach the server — the mapping stays with you.
Data upload
Coordinates are uploaded at 300 points or 60 seconds, whichever comes first. The remainder is also sent when the app goes to the background and onend().
State
Errors — SdkError
SdkError covers the five errors the SDK itself throws. Communication failures arrive as ApiError.
Both types expose an error code through .code.
- SwiftUI
- UIKit
Positioning runtime errors (
E4001–E4003) and space setup errors (E3001–E3004) are not thrown — they are logged only.
Check them through onDebugLog or the console log analyzer. Full list
Models
Coordinates — live coordinates
Building · Floor
Locator · FloorLocators
Zone
These judgement parameters come from the zone metadata on the server and are set per zone in the console under
Space management → select a zone → SDK zone judgement (how to set them).
You can also test whether an arbitrary point is inside a zone with
zone.contains(Position(x:y:)).
Trigger — personalized action
MockPositioningProvider — for testing
session.begin(provider:) to exercise the SDK pipeline without UWB.
ZoneEventStatus is .enter · .dwell · .exit.
Threading
- Every
OneS1ghtAPI is@MainActor. Call them directly from SwiftUI views and.task; from a background context, wrap them inawait MainActor.run { … }. - Callbacks (
onPositionand the rest) are also invoked on the main actor — updating the UI directly is safe.