Skip to content

Instantly share code, notes, and snippets.

@0x0a0d
Last active October 19, 2021 05:55
Show Gist options
  • Select an option

  • Save 0x0a0d/6be7690190a0347dad6cdd5dd810b322 to your computer and use it in GitHub Desktop.

Select an option

Save 0x0a0d/6be7690190a0347dad6cdd5dd810b322 to your computer and use it in GitHub Desktop.
Sentry upload debug symbols command react-native

iOS

Push app to testflight, after app processed, download symbols, then run

BUILT_DATE=$(ls -t ~/Library/Developer/Xcode/Archives | head -n1);XARCHIVE=$(ls -t ~/Library/Developer/Xcode/Archives/$BUILT_DATE/ | head -n1);SENTRY_PROPERTIES=./ios/sentry.properties node_modules/@sentry/cli/bin/sentry-cli upload-dif "$HOME/Library/Developer/Xcode/Archives/$BUILT_DATE/$XARCHIVE/dSYMs"

Android

Just run

SENTRY_PROPERTIES=./android/sentry.properties node_modules/@sentry/cli/bin/sentry-cli upload-dif "android/app/build/intermediates/merged_native_libs/release"

package.json

{
  // ...
  "scripts": {
    // ...
    "sentry:symbols:ios": "BUILT_DATE=$(ls -t ~/Library/Developer/Xcode/Archives | head -n1);XARCHIVE=$(ls -t ~/Library/Developer/Xcode/Archives/$BUILT_DATE/ | head -n1);SENTRY_PROPERTIES=./ios/sentry.properties node_modules/@sentry/cli/bin/sentry-cli upload-dif \"$HOME/Library/Developer/Xcode/Archives/$BUILT_DATE/$XARCHIVE/dSYMs\"",
    "sentry:symbols:android": "SENTRY_PROPERTIES=./android/sentry.properties node_modules/@sentry/cli/bin/sentry-cli upload-dif android/app/build/intermediates/merged_native_libs/release"
  },
  // ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment