Firebase upload symbol files build error: Unexpected argument 'ServiceAccount.json'

This is the script I use in my practice project.

JSON_FILE=${SRCROOT}/*****/ServiceAccount.json
GOOGLE_APP_ID=1:**********:ios:*********

defaults write com.google.SymbolUpload version -integer 1

JSON=$(cat "${JSON_FILE}")
/usr/bin/plutil -replace "app_${GOOGLE_APP_ID//:/_}" -json "${JSON}" "$HOME/Library/Preferences/com.google.SymbolUpload.plist"
"${PODS_ROOT}"/FirebaseCrash/upload-sym

If your JSON file is in the project folder "XYZ" then you only need this "JSON_FILE=${SRCROOT}/XYZ/ServiceAccount.json" or if it is in a subFolder of XYZ then like this "JSON_FILE=${SRCROOT}/XYZ/subFolder/ServiceAccount.json"

And set you GOOGLE_APP_ID and that is it. sorry for bad English. Hope It helps :)


This works for me. Just removed " from method described on Firebase docs.

GOOGLE_APP_ID=1:**********:ios:************
"${PODS_ROOT}"/FirebaseCrash/upload-sym ${SRCROOT}/******/GoogleCrashKey.json

It seems that upload-sym script has been changed to take one parameter since FirebaseCrash 1.0.7.

Check your FirebaseCrash pod version by pod outdated and update it if you are using older one.