Sentry + dSYM Setup¶
Onset includes a guarded OnsetCrashReporter.configure() hook. It starts Sentry only when:
Sentry-Cocoais linked into the iOS app target.SENTRY_DSNis provided as a build setting and expands intoSupporting/Info.plist.
App Target Setup¶
- Add Sentry-Cocoa via Swift Package Manager:
https://github.com/getsentry/sentry-cocoa - Link the
Sentryproduct to theOnsetiOS app target. - Add
SENTRY_DSNto Debug/Release build settings or.xcconfigvalues.
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.