# Choose a mobile SDK

> Connect iOS, Android, React Native, or Flutter activity to the same customer story.

Canonical page: https://anectico.com/docs/instrument/mobile/


Anectico's mobile SDKs share the same identity, session, event, error, crash, retry, and propagation
contract. Choose the SDK that owns your application's runtime:

| Application | Guide | Minimum or key requirement |
| --- | --- | --- |
| Native Apple | [iOS](/docs/instrument/ios) | iOS 15+, Swift Package Manager |
| Native Android | [Android](/docs/instrument/android) | minSdk 24, Kotlin/Gradle |
| React Native | [React Native](/docs/instrument/react-native) | React Native 0.73+, native build setup |
| Flutter | [Flutter](/docs/instrument/flutter) | Flutter plugin with native Android/iOS SDKs |

During early access, some registry packages may not be published. Use the source coordinate or
package artifact shown in the platform onboarding instructions.

## Shared behavior

Configure the SDK once at application startup, identify after login, and call `reset` at logout. A
stable `distinct_id` connects product events, caught errors, native crashes, and backend requests to
one customer. On Android, iOS, and their React Native bridges, `reset` also clears global
error-user context and buffered breadcrumbs so prior-account diagnostics cannot cross a shared-device
logout boundary.

Use a project-scoped key with `ingest:write` and `analytics:write`: mobile telemetry and errors use
the ingestion surface, while identity and application events use the diagnostic capture surface.
Never include read, management, or agent scopes in an application build.

Each SDK persists diagnostic events before batching and retries failed delivery with stable message
IDs. Fatal native crashes are spooled and sent on the next launch. Mobile SDKs do not currently
record native session replay.

Native Android additionally exposes durable `Anectico.captureLog` OTLP logs. It snapshots occurrence
time and customer/session/app/device context before an atomic sandbox write and retries across
process recreation. iOS, React Native, and Flutter do not yet expose the same public log API.

## Record an explicit agent run

All four mobile SDKs provide `startAgentRun` to record a source-declared `invoke_agent` span.
Start it when your app's agent begins work and end it once with the real terminal outcome; do not
use it as a generic checkout or network span. Options, status enums, validation, and return values
vary by language:

- [iOS agent runs](/docs/reference/ios-sdk#agent-runs)
- [Android agent runs](/docs/reference/android-sdk#agent-runs)
- [React Native agent runs](/docs/reference/react-native-sdk#agent-runs)
- [Flutter agent runs](/docs/reference/flutter-sdk#agent-runs)

## Releases and readable stacks

Set a stable `release` and optional `dist` for every production build. Upload the matching artifacts:

- iOS: dSYM;
- Android: R8/ProGuard `mapping.txt`;
- React Native: native artifacts plus Metro source maps; and
- Flutter: native artifacts. Obfuscated Dart frames are not currently symbolicated by Anectico.

Release and distribution values must match the captured error exactly. The same `release` value
also stamps the reserved `$release`/`$app_version` string properties on every captured event, not
only on errors — see each SDK's own guide and
[Reserved event properties](/docs/investigate/event-schema#reserved-properties).

## Connect a mobile request to the backend

Use the SDK's propagation helper to add W3C `traceparent` and `baggage` to calls sent to a trusted,
instrumented backend. Do not attach identity baggage to arbitrary third-party requests. The backend
must treat customer identity headers from public devices as untrusted and verify or replace them at
its gateway.

## Verify

Launch a release build, identify a test customer, capture one event and one caught error, and make one
request to an instrumented backend. Open **Customers** and confirm the mobile and backend evidence is
connected under the same ID. Then verify the Issue stack is readable after uploading symbols.
