Skip to content

[Core] Cover pre-JS startup blind spot for Sentry on iOS #314

Description

@KacperKozak

Follow-up to #294, which closed the Android side (manifest auto-init + release-time verification).

Problem

iOS has no manifest equivalent to Android&s io.sentry.auto-init — sentry-cocoa starts only from code, via SentrySDK.start(...). So on iOS everything before JS initSentry() runs is uncaptured: native startup (BLE module, Mapbox, Kotlin/Swift static init) and root module evaluation.

That is the exact failure class of the 0.81.1 Android black screen: a throw during root module evaluation (EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY missing) killed the app before initSentry() was reached, and Sentry captured nothing.

Scope

  • Config plugin (peer of plugins/withSentryNativeInit) that starts SentrySDK from the AppDelegate before React Native boots, with DSN and environment baked at prebuild.
  • Environment must match the JS side (development / production) as on Android, so events land in the same environments.
  • No-op when EXPO_PUBLIC_SENTRY_DSN is unset at prebuild (local dev without a DSN), same rule as Android.
  • Release-time verification once an iOS release workflow exists — there is none today, so this is a note, not work.
  • Update the iOS caveat comment in src/config/sentry.ts when the gap is closed.

Notes

A Sentry DSN is client configuration, not a secret. Upload auth tokens stay secret.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreApp shell, storage, lifecycle, infraarea:nativeTouches native side (modules/vesc-ble, Swift/Kotlin)enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions