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.
Follow-up to #294, which closed the Android side (manifest auto-init + release-time verification).
Problem
iOS has no manifest equivalent to Android
&sio.sentry.auto-init— sentry-cocoa starts only from code, viaSentrySDK.start(...). So on iOS everything before JSinitSentry()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_KEYmissing) killed the app beforeinitSentry()was reached, and Sentry captured nothing.Scope
plugins/withSentryNativeInit) that startsSentrySDKfrom the AppDelegate before React Native boots, with DSN and environment baked at prebuild.development/production) as on Android, so events land in the same environments.EXPO_PUBLIC_SENTRY_DSNis unset at prebuild (local dev without a DSN), same rule as Android.src/config/sentry.tswhen the gap is closed.Notes
A Sentry DSN is client configuration, not a secret. Upload auth tokens stay secret.