Skip to main content

Import

Initialization

.initialize

Verifies your OneS1ght API key and loads your tenant settings. It does not start the positioning engine or check device support.

.requestPermission

Requests the app permissions needed to use the positioning engine.

.setLanguage

Sets the language of SDK log messages.
ko: Korean, ja: Japanese, en: English, nil: system language

.onDebugLog

Receives SDK logs.
level: log level, message: log message

.reset

Discards the session. APIs then throw notInitialized until initialize is called again (another key is allowed).

State

.isInitialized

Returns whether initialization succeeded.

.deviceAvailability

Tells whether the device supports positioning and, if not, why.

.googleMapKey

Returns the Google Maps API key for displaying the floor plan.

.sdkVersion

Returns the SDK version in use.

Profiles

.createProfile

Creates a new personalization profile. Returns a unique profile ID on success.

.identify

Links the profile that collected positioning data is grouped under. Set nil to unlink.

.fetchProfile

Fetches the profile’s attributes.

.replaceProfile

Replaces the profile’s attributes. The previous data is deleted.

.deleteProfile

Permanently deletes the profile.

Space lookup

.buildings

Fetches every building that belongs to the tenant.

.floors

Fetches the floors of a building.

.floor

Fetches the details of the selected floor.

.zones

Fetches every zone on the selected floor.

.locators

Fetches the locators on the selected floor.

Setting the floor

.setFloorMap

Sets the floor to start positioning on.

.refreshZones

Fetches the latest zone data.

Positioning session

.floorSession

Gets the positioning session. It is one app-wide instance (singleton), not tied to a floor.

.begin

Starts positioning the user.

.end

Stops positioning the user.

.pause · .resume

Pauses and resumes positioning. Unlike end, the positioning engine inside the SDK keeps running.

.isRunning · .isPaused

Returns whether positioning is running and whether it is paused.

Session events

.onPosition

Fires with the user’s coordinates in real time, at the engine’s rate. The 4-per-second default applies only to server uploads.

.onZoneEnter · .onZoneExit

Fires when the user enters or exits a zone.

.onZoneDwell

Fires when the dwell time in a zone exceeds the threshold (dwellSeconds).

.onTriggers

Fires when an in-space event (campaign) is triggered.

.onFloorDetected

Fires with the floor ID when the floor is found from locator BLE signals, and with nil when the floor is lost.

.onStopped

Fires when positioning stops.

.onConfigChanged

Fires when settings change in the console.

Data upload

Coordinates are uploaded automatically every 300 entries or 60 seconds, as well as when the app goes to the background and on end().

.uploadPendingPositions

Uploads buffered coordinates immediately.

.discardPendingPositions

Discards buffered coordinates.

Error handling

Failures arrive as SdkError (SDK state) and ApiError (communication). See Error codes for what each code means. In Objective-C the code is in NSError.userInfo[@"sdkCode"].

Models

Lists are [T], bytes are Data.

Coordinates

Building · Floor

Locator · FloorLocators

Zone

Trigger

Objective-C bridge

Add the file below to your app target and build once; <Product Module Name>-Swift.h is generated.
OneS1ghtBridge.swift

Limitations

  • UWB positioning is foreground only — it stops in the background and resumes when the app returns.
  • The coordinate buffer is in memory — unsent coordinates are lost if the app is force-quit.
  • Positioning does not work on the simulator.