@enfinitos/sdk-spatial-ar
EnfinitOS SDKs for the spatial / AR / glasses / hologram / volumetric substrates. Six per-platform sibling implementations:
| Path | Platform | Status |
|---|---|---|
visionos/ | Apple Vision Pro (visionOS 2+) Swift | full |
meta-xr/ | Meta Horizon OS (Quest 3 / Pro 2) C# | full |
android-xr/ | Android XR (Samsung Galaxy XR / Project Moohan) Kotlin | full |
unity-xr/ | Unity 6 LTS + OpenXR (cross-vendor) C# | full |
webxr/ | Browser WebXR Device API + Three.js / Babylon.js | full |
snap-spectacles/ | Snap Spectacles 5 Lens Studio | reference / stub |
All six speak the same wire shapes (SpatialPose, OverlaySpec, SpatialResolvedAsset, SpatialEventKind) so a customer that builds a creative for Vision Pro can ship the same campaign to a Quest or a WebXR Three.js host.
2026 platform notes
This section calls out which 2026 APIs the SDK uses and what's deprecated so anyone porting older code knows what to avoid.
visionOS
- Minimum: visionOS 2.0 (released Sep 2024, install base 100% by early 2026). Apple Vision Pro is the only consumer device; the rumored Vision Air launches H2 2026.
- RealityKit + ARKit — the production path. The SDK uses: -
RealityView(SwiftUI, visionOS 1.0+) for embedded volumetric content. -WorldAnchor(visionOS 2.0+) for persistent 6-DoF anchors. -ImageAnchorComponent(visionOS 2.0+) for marker tracking. -Entity.init(contentsOf:)async-loader for USDZ assets. - NOT used (deprecated / out of scope): - SceneKit on visionOS (feature-frozen). - The Metal-only path (research grade). - The pre-visionOS-2.0 session-bound
ARAnchorsubclasses. - Eye tracking governance:
RealityViewsurfaces the focused Entity, never the raw gaze ray. The SDK'sSpatialProofReporteruses the focused-entity surface; raw gaze access requires accessibility permissions the host app'sNSPrivacy*UsageDescriptiondeclares. - Privacy manifest: ships in
spatial-ar/PrivacyInfo.xcprivacydeclaringNSPrivacyAccessedAPICategoryUserDefaults+ boot time.
Meta Horizon OS (Quest)
- Meta XR All-in-One SDK (
com.meta.xr.sdk.all) — the renamed Oculus Integration. Quest 3, Quest 3S, Quest Pro 2 (announced 2026). - OVRSpatialAnchor + OVRSpatialAnchor.Cloud — supported path for persistent anchors. The legacy
OVRPlugin.SpatialAnchor*C-style API is deprecated since Meta XR SDK v60 (Q1 2024). - OpenXR 1.1: the underlying runtime. Customers cross-targeting Quest + Vision Pro + Android XR use the Unity XR SDK with the OpenXR provider directly.
- Hand tracking: Interaction SDK (
OVRHand). The Viewability scorer accepts the hand-pointer ray + gaze ray as inputs.
Android XR
- Android XR (Samsung Galaxy XR / Project Moohan) shipping 2026 on Android 15 (API 35).
- Jetpack XR (
androidx.xr.*) — Compose-based, the supported app surface. The SDK usesandroidx.xr.scenecorefor scene composition andandroidx.xr.runtimefor session lifecycle. - ARCore Earth Cloud Anchors — globally persistent anchors keyed to geographic coordinates. Requires GPS + a clear sky view to resolve.
- NOT used (deprecated / out of scope): - ARCore session-bound anchors (
Anchor.create(...)without cloud hosting). - ARFoundation 5.x (Unity-bound; the Android XR variant uses Jetpack XR + ARCore directly).
Unity XR (cross-vendor)
- Unity 6 LTS (Unity 6000.x stream, released 2024). UPM- packaged.
- XR Plug-in Management with OpenXR provider — the supported cross-vendor path. Vendor SDKs (Oculus Integration, etc.) are treated as opt-in for vendor-specific extensions.
UnityEngine.Awaitable— Unity 6's in-engine async primitive. The SDK uses Awaitable for the public async API; the olderTask-based path is supported viaAwaitable.AsTask().- OpenXR 1.1 is the assumed runtime. The SDK does not require any specific OpenXR extension; vendor-specific extensions (Meta's spatial entity, Apple's volumetric rendering) live in the per-vendor adapter modules.
WebXR
- WebXR Device API (W3C standard) — the SDK wraps it; does NOT reimplement it.
- Three.js r160+ and Babylon.js 7+ are the two engines the adapters target. Both have first-class WebXR support; the SDK exposes thin
EnfinitOSThreeAdapter/EnfinitOSBabylonAdapterclasses that plug into the engine's render loop. - Quest Browser is the most-featured WebXR runtime in 2026 (full AR + VR + hand-tracking + DOM-overlay). visionOS Safari is immersive-vr-only.
Snap Spectacles
- Spectacles 5 with Lens Studio + Spectacles Interaction Kit (SIK). Reference / stub only — full integration ships as a Lens Studio template, not a traditional SDK artifact.
Cross-vendor IAB viewability spec
All six SDKs implement the IAB Tech Lab + MRC "Measurement of Ad Inventory in 3D Spatial Environments" guidance (published late 2024 by the IAB Gaming SIG, applicable to all XR substrates in 2026):
- Coverage: ≥ 50% of the overlay's projected bounding box in the user's viewport.
- Viewing angle: ≤ 30° from the gaze ray to the overlay's surface normal.
- Dwell: ≥ 2000ms continuous.
Implementation:
- visionOS:
ProofReporter.swift::SpatialProofReporter. - Meta XR:
EnfinitOSViewabilityScorer.cs. - Android XR:
ViewabilityScorer.kt. - Unity XR:
ProofReporter.cs::ViewabilityScorer. - WebXR: applied per-frame in the host app's render loop; the SDK client exposes
reportViewable(overlay, dwellMs)for the host's computed score.
Getting started
See each per-platform sub-directory's README and the 30-line minimum-viable-integration sample at the top of each canonical client file:
visionos/Sources/EnfinitOSSpatial/EnfinitOSSpatialClient.swiftmeta-xr/csharp/EnfinitOSMetaXR.csandroid-xr/src/main/kotlin/com/enfinitos/spatial/xr/EnfinitOSXRClient.ktunity-xr/Runtime/EnfinitOSSpatialClient.cswebxr/src/webxrClient.ts
Endpoint surface
| SDK call | Platform endpoint | Status |
|---|---|---|
fetchOverlay | POST /runtime/resolve with substrate: "VOLUMETRIC" / "GLASSES" / "HUD" etc. + extensions.spatial | needs future API work (the resolve schema needs extensions.spatial cohort for anchorKind, runtime, hmdModel) |
reportImpression/Viewable/GazeEnter/Interaction | POST /runtime/event-ingest with kind: "interaction", payload.spatialEventKind: ... | existing |
createWorldAnchor (visionOS) / CreateAnchorAsync (Meta XR) | local; no platform endpoint (persistence stays on-device) | existing |
createEarthCloudAnchor (Android XR) | ARCore Cloud Anchors service (not EnfinitOS) | existing |