AR SDK Overview
The Treedis AR SDK localizes a device in a scanned space, anchors content there, and follows navigation routes supplied by the host application.
Choose an integration
| Integration | Engine and packaging | Host interface |
|---|---|---|
| iOS (Swift) | Compiled ARKit/RealityKit XCFramework, TreedisVPS |
VPSController and VPSSession |
| Android (Kotlin) | Compiled ARCore/SceneView AAR with Maven metadata | VPSController and VPSSession |
| Web UI | Host-presented WebView over the AR engine | TreedisVPS.send commands and named JavaScript callbacks |
Treedis supplies a versioned SDK archive for each platform: TreedisVPS-iOS-0.3.0.zip and TreedisVPS-Android-0.3.0.zip. Each contains compiled libraries, inference models, installation instructions, and third-party licenses. Request the archives and checksums from Treedis. Integrating the SDK requires no access to our source repositories. Neither platform embeds Unity or MultiSet.
Responsibilities
The SDKs own camera localization, online/offline engines, anchor updates, occlusion, AR objects, thread placement, route drawing and progress, floor changes, and AR events. The host owns UI, tour/account API requests, authentication, route requests, QR/App Clip invocation, push registration, and persistence. Supply those through values and adapters instead of depending on a particular Treedis deployment.
The iOS guide includes binary installation, the complete command/event reference, offline rules, a generic host example, and App Clip setup. The Kotlin guide covers the compiled Android package, adapters and lifecycle. Both distributions can power navigation, Connected Workers, or your own host application.
Commands and events
The command envelope is {type, data}. data is an object and contains the optional query requestId. Every command has a typed native method; JSON is an optional transport for host-presented web UI.
- Native iOS/Android: call
VPSControllermethods orsend; observe its delegate/listener,onEvent, or the session event streams. - Web: call
TreedisVPS.send(type, data). Named callbacks receive structured arguments, such asonNavigationComplete()andonPose(x,y,z,heading). onMessagereceives a structured{type,data}object on every platform. No callback needs JSON parsing.
For the controller, configure host adapters, set environment if required, load the tour, then start localization. Commands wait for engine readiness. Loading and successful localization have their own events; onReady means the engine accepts commands. setWindowSize scales intercepted taps only and is not required for localization.
Coordinates and content
All public positions use the Treedis tag/Showcase frame: Y up, metres. Navigation destinations, route nodes, content, pose events and localization hints share this frame in both native and web APIs. Hosts convert external QR/marker formats before calling the SDK. Object identifiers are strings; integer JSON IDs are normalized to strings.
Object types are TAG, THREAD, VS_IMAGE, VS_VIDEO, VS_OBJECT, VS_HTML, and POLYGON. The native engines render HTML with JavaScript disabled; interactive pages belong in host UI. Use GLB/glTF for shared 3D assets; iOS also supports Apple model formats. See each platform guide for asset formats and host requirements.

