Mobile SDKs
Understand the Ansight SDK family, shared runtime capabilities, and where to start for .NET, iOS, Android, React Native, Expo, Flutter, and Cordova/Capacitor integrations.
Ansight SDKs embed a local development runtime in your app. The runtime connects to the local Ansight CLI host, streams live app evidence, and can expose opt-in tool surfaces to developers and agents. The CLI is the canonical setup, connection, inspection, and automation interface.
Use this section as the platform-neutral map. Each platform overview is a short installation and initialization path; its dedicated Packages page contains the complete package reference.
For a source-aligned comparison of every implemented runtime, capture, tooling, workflow, and build-safety surface, see the SDK Feature Catalog.
Supported SDKs
| SDK | Runtime target | Start here |
|---|---|---|
| .NET, .NET MAUI, Android, iOS, and Mac Catalyst apps. | .NET SDK Overview | |
| Native Swift, SwiftUI, and UIKit apps. | iOS SDK Overview | |
| Native Kotlin, Jetpack Compose, and Android View apps. | Android SDK Overview | |
| React Native apps backed by the native iOS and Android SDKs. | React Native SDK Overview | |
| Expo | Expo development builds using the React Native bridge. | Expo setup |
| Flutter apps backed by the native iOS and Android SDKs. | Flutter SDK Overview | |
| Cordova-family and Ionic apps using the Capacitor 8 bridge. | Cordova / Capacitor SDK Overview |
Core Capabilities
| Capability | What it provides |
|---|---|
| Enrollment and host connection | Automatic loopback registration for host-local targets, one-use CLI QR enrollment for physical devices, remembered reconnect, and clear-text development session transport. |
| Host auto-probe | SDK-owned remembered-host retry behavior that reconnects after the host disappears and later reappears while the runtime is active. |
| Session capture | Periodic JPEG screenshots, screen-view changes, touch input, lifecycle state, and app logs for replay and CLI timeline review. |
| Crash capture | Bounded native crash evidence stored app-privately and delivered after the next launch. See Crash Capture. |
| Trends telemetry | Runtime sampling for metrics such as memory, FPS, battery where supported, and platform-specific channels. |
| Live client logs | Explicit app-to-host log events that appear alongside screenshots, telemetry, and tool results. |
| Artifacts | App-defined diagnostic exports that people and agents can discover and retrieve through the CLI during a session. |
| Remote tools | Optional read, write, and critical tool surfaces for visual trees, files, preferences, secure storage, databases, reflection, custom tools, and platform-specific inspection. |
| Tool guards | Runtime policy that can deny discovery and execution, restrict tools to read-only access, or allow selected write/critical workflows in trusted builds. |
| Offline and annotated evidence | .NET-only offline capture/export/upload and Debug-only annotated feedback workflows that preserve evidence when a live host session is unavailable. |
Availability and API names vary by platform. Use the platform-specific articles before relying on a capability in app code.
Important: Screen capture will result in an FPS drop while frames are rendered or captured, encoded, and transported. Keep periodic JPEG capture scoped to development or QA sessions, and disable it for trend-focused runs unless visual evidence is required.
Host Auto-Probe
The .NET, Android, iOS, React Native and Expo, Flutter, and Cordova/Capacitor
SDKs expose the same connection loop. While active, host auto-probe first tries
local loopback registration for simulators, emulators, Mac Catalyst, and desktop
apps, then retries remembered registrations. The app can start before the host
and reconnect when ansight host run becomes available. Probing pauses while a
live session is connected and resumes after the retry delay when that session
is lost. The option is enabled by default in runtime defaults and all-in-one
developer presets.
| Field | Default |
|---|---|
| enabled | true |
| initial delay | 1000 ms |
| probe interval while disconnected | 5000 ms |
| retry delay after a lost session | 10000 ms |
| client name | unset |
Use each platform’s withoutHostAutoProbe() / WithoutHostAutoProbe() helper,
or set the enabled flag to false, for flows where reconnects should only happen
after an explicit app action.
Common Integration Flow
- Install the CLI, run
ansight doctor, and start the local host withansight host run. - Choose the SDK page for your app platform and check the Feature Catalog.
- Install the platform packages or products.
- Initialize the runtime in the platform startup location called out by the setup page, such as Android
Application.onCreate(), iOSAppDelegatelaunch, .NETMauiProgram, React Native or Expo JavaScript bootstrap, Fluttermain(), or Capacitor app bootstrap. - Configure security and tool guard policy before registering broad tool suites.
- Launch a simulator, emulator, Mac Catalyst app, or desktop app; it registers automatically over loopback. For a physical device, run
ansight pairing issue --qrand open the SDK scanner once. - Confirm the connection with
ansight session list --connected --json, then enable the capture, telemetry, logs, artifacts, and tools needed for the workflow.