Vastu · Developer guides · SDKs

Rooms, north
and device evidence.

Capture walls and openings on device. Confirm what each room is used for, review true north, and submit the vedika.roomCapture/1 contract to POST /v2/astrology/vastu/ar/room-capture.

Package inventory checked 13 October 2026. The native scanners are not yet run on a real phone under the current acceptance gates. On 13 October 2026 Swift 1.4.0 passed its macOS build and tests and its iOS simulator tests; on 12 October 2026 Swift 1.3.2 ran 102 tests on an iPhone 17 Pro simulator (Xcode 26.2), with 4 live-API smoke tests skipped. A simulator run is not a real-phone measurement. Android AR 1.1.1 exports its queue and overlay helpers; on 14 October 2026 its unit tests passed and a consumer app compiled against its release build. Synthetic replay proves geometry, never physical accuracy.

Install the published packages

Swift 1.4.0 · API client and RoomPlan module

Swift 1.4.0 exports VedikaSDK and VedikaRoomCapture. Add the products your app uses:

.package(url: "https://github.com/vedika-io/vedika-sdk-swift.git", from: "1.4.0")
// In your target dependencies:
.product(name: "VedikaSDK", package: "vedika-sdk-swift"),
.product(name: "VedikaRoomCapture", package: "vedika-sdk-swift")

The room module includes RoomCaptureScanView, CaptureOutbox, OverlayRelocalizationGate, LocalWorldMapStore and, since 1.3.2, PinnedFloorOverlayRenderer with FloorPlanAnchorTransform, FloorAnchorPose and FloorOverlayPolygon. Real-phone measurements remain a separate pending gate.

New in Swift 1.4.0 · save scans and floor remedies

Version 1.4.0, released 13 October 2026, adds opt-in account saves to the offline queue and native remedy markers on the floor. New queue files use an authenticated version-two format: 1.4.0 reads older queues, and older SDKs refuse newer files, so finish a new queue before downgrading an app.

RoomCaptureUploader.saveCapture already submits the typed VastuScansSaveRequest. A save retries with the same scanId and identical content; scan routes reject Idempotency-Key headers. Account saves are billed. Check data.persistence: account-store confirms storage; preview-only stores nothing.

Attach CaptureSaveOptions as saveAfterUpload when enqueueing. CaptureUploadAdapter.flush checkpoints the completed upload before saving. A restart or save retry sends only the save, with its retained scan ID. Supply separate prepareProof and prepareSaveProof callbacks when native attestation is required: bind the unchanged bodies to ar/room-capture and scans/save. Short-lived proofs are never stored in the queue.

RemedyFloorOverlay reads the returned rooms, audit and plan-analysis defects, recommended anchors and optional remedy catalogs. It keeps the full advice and separate remedy source; no placement citation is borrowed for a missing remedy source. Pass its polygons or the remedies: argument to PinnedFloorOverlayRenderer with the original floor pose and capture transform. Zones and remedies share the same hide-when-uncertain gate. Geometry runs in plain Swift; the ARKit renderer is iOS-only. Real-phone accuracy is not yet measured.

Android · API client 1.1.1 and AR module 1.1.1

Use the published Android client and Android AR module from JitPack:

// In dependencyResolutionManagement.repositories:
maven { url = uri("https://jitpack.io") }
// In your app dependencies:
implementation("com.github.vedika-io:vedika-sdk-android:1.1.1")
implementation("com.github.vedika-io:vedika-sdk-android-ar:1.1.1")

Android AR 1.1.1, released 14 October 2026, exports VastuArCoreCaptureView, VastuArCoreUploader (including saveCapture), CaptureOutbox, AndroidCaptureStore, CaptureUploadAdapter and LocalOverlayRelocalizer. A fresh app built from the JitPack artifact and real-phone scanning remain unverified.

New in Android AR 1.1.1 · tracking check fix

In 1.1.0, remedy markers could draw on a frame where the camera had lost tracking, before the tracking check ran. 1.1.1 runs the check first, so markers draw only on tracked frames. Upgrade from 1.1.0; the API is unchanged.

New in Android AR 1.1.0 · offline queue and floor remedies

The update adds the encrypted offline queue, overlay relocalization and floor remedy markers (FloorRemedyScene, FloorRemedyMarker) built from the remedies the API returns. Markers draw only while the floor anchor and camera are tracking. Local anchors belong to one session: after restart, rescan. Real-phone accuracy is not yet measured.

Known issue: ARCore 1.56.0, the latest published release, ships 64-bit libraries that fail the 16 KB page-size alignment check, so ARCore may fail to load on devices that use 16 KB pages. Version 1.0.2 has the same dependency. We will publish an update when a compliant ARCore release is available.

The browser AR room scan is Android Chrome only. Native iPhone and Android scanning is not yet accepted as a measured physical capability.

Capture and review

The Swift package adds VedikaRoomCapture. RoomCaptureScanView wraps the platform scanner with coaching, a room-type picker, explicit north confirmation and perimeter review. A LiDAR device runs RoomPlan. The simulator replays generated room JSON; it does not scan.

Pair calibrated magnetic compass samples with current camera poses. Fetch direction/declination using a recent location, show its correction and ask the person to confirm north. The adapter applies that correction once, exports metres with east/north axes, chains walls into the outline, and preserves door/window dimensions. No magnetic reading is silently called true north.

CapturedStructure needs labels for every room and a separately traced property boundary in its shared coordinate frame. RoomPlan section suggestions do not establish the room's use. Device JSON exports stay private; the committed fixtures are synthetic 4 × 5 m living and 3 × 4 m kitchen rooms.

Offline capture

Swift 1.3.2 and later include CaptureOutbox: keep one outbox owner per store. Its source uses a Keychain key and AES-GCM snapshots for property references, request IDs, idempotency IDs and retry checkpoints. Key loss fails closed. Its tests passed on an iOS simulator on 12 October 2026; real-phone behaviour is not yet measured. Android AR 1.1.0 and later ship the encrypted queue and offline retry; real-phone behaviour is not yet measured.

The Swift outbox contract defines unsynced, synced or failed entries. Resume sends the same JSON body and idempotency key after connectivity returns or the app restarts. Backoff is persisted before the request. This resumes an atomic JSON request, not a multipart transfer. HTTP 409 remains failed unless a trusted server readback establishes the same ID and body hash. A successful idempotent replay uses the normal success envelope.

Scan two floors and merge

Scan each floor on its own, record its floor index before scanning and measure its elevation above the building datum. Pick the same stair, or measured door, points on both plans (at least three, inside each floor's outline) and call FloorMerge.merge in Swift or Android AR. It posts ar/capture-merge with a caller-retained idempotency key. This ships with the next Swift and Android AR releases; it is not in Swift 1.4.0 or Android AR 1.1.1, and no phone has yet measured it.

The API links only captures on the same floor, so the shared points become one floor frame per floor and the request carries no links. The merge only translates: each scan keeps its recorded true north and there is no scale change. FloorMerge.prepare checks the floors and points first and throws FloorMergeRefused (Swift) or FloorMergeRefusedException (Android) before any request, so a bad link is never billed. The result carries the stated shared-point error, registration.describe(), as RMS and maximum metres. It measures how well your picked points agree, not survey accuracy.

Reuse overlays only after relocalization

The published Swift source includes LocalWorldMapStore to save an encrypted ARWorldMap and puts its local filename, plaintext hash and anchor IDs in the encrypted property-capture sidecar. The public capture schema stays unchanged. Restore verifies the hash and anchors. A gate checks normal tracking and current physical-landmark reprojection agreement for three consecutive frames; tracking loss or an error immediately hides overlays. The default 8-pixel tolerance is a policy threshold, not a measured accuracy promise.

Android AR 1.1.1 uses local anchors and exports its queue and relocalization helpers. Anchors belong to one ARCore session. There is no persistent Android world map or cross-session overlay restoration here: after an app restart, rescan and establish new landmarks. The overlay render callback is gated per frame; physical placement accuracy is not measured. Observations must be fresh marker detections or taps on physical landmarks, never saved screen pixels.

Device matrix

The published Swift 1.3.2 simulator evidence is dated 12 October 2026 (Xcode 26.2, iPhone 17 Pro simulator). Swift 1.4.0 passed macOS build/tests and iOS simulator tests on 13 October: 1.4.0 test run. Neither measures a real phone. Capability gates below describe supported platform interfaces; current physical cells are deliberately unfilled.

Measured versus pending
SurfaceGate / modeLocal evidencePhysical errors / completion
iOS simulator 26.3.1Synthetic Codable replay; no LiDAR scanPASS: build, two room adapters, structure adapter and replay/export UI; RoomPlan, compass and world tracking unavailablenot measured
iOS LiDAR deviceiOS 16+: single room; iOS 17+: structure; runtime isSupportedPlatform interface checked; physical scan not measurednot measured
iOS non-LiDARRoomPlan refused; use existing manual ARKit corner capture when supportedRuntime gate; physical manual capture not measurednot measured
Android emulatorARCore availability/install check; depth support checked at runtimeEmulator run not measured; 1.1.0 unit tests cover remedy geometry and tracking-loss hidingnot measured
Android physical deviceAPI 24+, ARCore supported; depth automatic when available, else manual cornersDevice run not measurednot measured

iOS exposes CLHeading.headingAccuracy in degrees; negative means uncalibrated. Android's sensor accuracy is an ordinal status, not an angular error. Do not report that ordinal as degrees. Actual heading and position errors need an independent reference.

Run on real devices

  1. Record device model, OS, mode and a unique trial ID. Survey a true-north reference and measure landmark coordinates independently.
  2. Run at least ten complete attempts per mode. Include failed attempts. For iOS, test LiDAR and non-LiDAR; for Android, test depth and depth-unavailable modes. Exercise offline enqueue, restart, online retry and tracking-loss overlay refusal.
  3. Record heading pairs, position pairs and compass accuracy only when observed. Leave absent values blank. Keep raw captures private.
  4. Run the repository harness. It computes circular heading error, Euclidean position error and completion rate from supplied trials, and preserves missing measurements.
python3 tests/vastu-lab/top25/native_device_harness.py trials.csv \
  --template --output measurements.json
# Fill trials.csv with actual observations, then:
python3 tests/vastu-lab/top25/native_device_harness.py trials.csv \
  --output measurements.json

Register your application

Attestation verifies application/device proof; capture geometry remains caller-reported. The simulator cannot prove App Attest or production Play Integrity. Register your own app with Vedika before testing on a physical device.

iOS · App Attest

  1. Use your Apple Team ID and bundle ID. Enable App Attest capability, set the production entitlement for release, and keep development and production enrollment separate.
  2. Provide Vedika the Team ID, bundle ID and environment through the authenticated integrator registration process. No shared Vedika identity is embedded in the SDK.
  3. Persist the generated key ID in your Keychain. Request ar/attestation/challenge for ios. A null challenge means not configured: surface it, never invent a proof.
  4. Use AppAttestCaptureProof.proof. First enrollment sends attestationObject; subsequent requests send assertion. Mark the key enrolled only after server verification. Losing a key requires enrollment again.

Android · Play Integrity

  1. Register your package name, Play signing certificate SHA-256 and integrity project with your own account. Give Vedika only the approved secret reference and identifiers through authenticated registration; never place service-account JSON in an app or repository.
  2. Prepare your Standard Integrity token provider. Fetch a single-use android challenge and pass the helper's hash to StandardIntegrityTokenRequest.setRequestHash. Supply the returned token to the proof adapter.
  3. Keep operation and body unchanged after binding. Challenges expire after five minutes. Refresh challenge/proof after expiry while retaining the queued body and billing ID.

Binding is SHA-256 over vedika-attest-v1\noperation\nchallenge\ncanonicalJson(body without deviceAttestation). Apple receives the raw 32-byte digest; Play receives unpadded base64url. The Swift and Kotlin helpers test the repository's shared vectors.

See Apple App Attest, Standard Play Integrity, ARCore anchor scope and Tink setup.