Skip to content

Sentry + dSYM Setup

Onset includes a guarded OnsetCrashReporter.configure() hook. It starts Sentry only when:

  • Sentry-Cocoa is linked into the iOS app target.
  • SENTRY_DSN is provided as a build setting and expands into Supporting/Info.plist.

App Target Setup

  1. Add Sentry-Cocoa via Swift Package Manager: https://github.com/getsentry/sentry-cocoa
  2. Link the Sentry product to the Onset iOS app target.
  3. Add SENTRY_DSN to Debug/Release build settings or .xcconfig values.

dSYM Upload

Add a Run Script build phase after “Embed Frameworks” when Sentry auth is configured:

if [ -n "$SENTRY_AUTH_TOKEN" ] && [ -n "$SENTRY_ORG" ] && [ -n "$SENTRY_PROJECT" ]; then
  "${BUILD_DIR%Build/*}SourcePackages/checkouts/sentry-cocoa/upload-symbols" \
    --auth-token "$SENTRY_AUTH_TOKEN" \
    --org "$SENTRY_ORG" \
    --project "$SENTRY_PROJECT" \
    "$DWARF_DSYM_FOLDER_PATH"
fi

Keep SENTRY_AUTH_TOKEN out of source control and configure it in CI/App Store build environment variables.