Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save chrislavender/e2daf0a21f23f4b8e1d0 to your computer and use it in GitHub Desktop.
Save chrislavender/e2daf0a21f23f4b8e1d0 to your computer and use it in GitHub Desktop.
Script to upload .dSYM files for BitCode enabled apps to New Relic
#!/bin/bash
# Currently New Relic doesn't provide a script to upload .dSYM files for BitCode enabled apps.
# To use this...
# 1) Replace <APP_NAME> & <APPLICATION_TOKEN> with info from the New Relic Mobile tab's Settings -> Application.
# 2) download the dSYM files for a given build from iTunesConnect
# 3) run this script from with in the directory that contains the .dSYM files
count=0
for DSYM in $( ls -d *".dSYM/" ); do
count=`expr $count + 1`
echo $DSYM
UUID=$(xcrun dwarfdump --uuid $DSYM | tr '[:upper:]' '[:lower:]' | tr -d '-' | awk '{print $2}' | xargs | sed 's/ /,/g')
echo $UUID
ZIPNAME="$count-dSYM.zip"
echo $ZIPNAME
/usr/bin/zip --recurse-paths --quiet --filesync $ZIPNAME $DSYM
curl -F dsym=@$ZIPNAME -F buildId=$UUID -F appName="<APP_NAME>" -H "X-APP-LICENSE-KEY: <APPLICATION_TOKEN>" https://mobile-symbol-upload.newrelic.com/symbol
rm $ZIPNAME
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment