Mobile

Full-fidelity crash reporting and observability for native and cross-platform mobile apps. Every mobile SDK shares the same architecture, so what you learn on one platform carries to the others.

What the mobile SDKs give youlink

  • Crash capture - uncaught JVM/Swift exceptions, native signals (Android NDK C/C++, iOS/macOS Mach signals), ANRs (Android) and app hangs (iOS), captured with the context needed for server-side symbolication.
  • Release health - sessions are tracked automatically so every release shows its crash-free rate.
  • Breadcrumbs - app lifecycle and network requests are recorded automatically and attached to the next event, so you see what led up to a crash.
  • Offline-first delivery - events persist to an on-device queue and upload in batches (50 events / 5 s by default) when the network allows, with exponential-backoff retry. A crash captured on the subway arrives when the user resurfaces.
  • Redaction on device - sensitive keys (passwords, tokens, card numbers and your own sensitiveFields) are scrubbed before anything leaves the phone.

Credentials - no secrets in the applink

Mobile apps are decompilable, so they never carry your DSN secret. Each project has dedicated mobile credentials:

  1. Dashboard → Org → BugWatch → your project → Mobile credentialsReveal.
  2. Copy the projectId (bwp_…) and the appSecret into your app's build configuration.
  3. On every batch the SDK signs a 5-minute HMAC token on device (x-bugwatch-token) - the appSecret itself is never transmitted.
  4. Suspect a leak? Rotate invalidates the old secret; ship the new one in your next build. Older builds keep reporting until their token version is retired.

Clock skew matters: tokens more than 60 seconds in the future (or past their 5-minute expiry) are rejected - a device with a badly wrong clock will drop events until it syncs.

Diagnosing a silent SDKlink

Both native SDKs perform a handshake (POST /api/v1/bugwatch/ingest/mobile/hello, same token, empty or identity-only body, nothing ingested or billed) when they start, and expose the outcome through connectionState / testConnection(). A refusal is never silent: the response names the reason and the dashboard records it.

ReasonMeaningFix
signature_invalidThe app secret in this build does not match the projectCopy the current secret from Settings, Mobile credentials, and rebuild. Rotated the secret? Older builds keep failing until updated
project_unavailableNo active project has this projectIdCheck the projectId; the project may have been deleted or deactivated
mobile_ingest_disabledMobile ingest is switched off for the projectEnable it under Settings, Mobile credentials
token_expiredThe token had already expired on arrivalThe device clock is behind
clock_aheadThe token was issued more than 60 s in the futureThe device clock is ahead
token_missing / token_malformedNo or unreadable x-bugwatch-tokenInitialise the SDK with projectId and app secret; use a supported SDK version

The project's setup page shows a Mobile SDK connection panel: per platform, the last accepted handshake (SDK version, device model, OS, app version, time) and the last rejected one with its reason and hint. Accepted and rejected are tracked separately, so a working production fleet and one developer with a stale secret are both visible at once.

Pick your platformlink

PlatformPackagePage
Android (Kotlin/Java, NDK)cloud.newinstance:bugwatch - Maven CentralAndroid
iOS & macOS (Swift)BugWatch - CocoaPods / Swift PMiOS & macOS
React Native (+ Expo)@newinstance/bugwatch-react-native - npmReact Native
Flutterbugwatch - pub.devFlutter

Each page covers installation, initialisation, configuration, automatic capture, symbolication and troubleshooting.

Readable stack traceslink

Release builds are minified/obfuscated, so upload symbolication artifacts per release in CI - R8/ProGuard mappings and native .so symbols (Android), dSYMs (iOS/macOS), JS source maps (React Native), --split-debug-info output (Flutter). The per-platform pages give the exact commands; the wire contract lives in Source Maps & Symbols.