Unable to upload Crashlytics dSYM file during build phase due to script error

Jamie McAllister picture Jamie McAllister · Jan 22, 2018 · Viewed 8k times · Source

I'm trying to add Firebase Crashlytics to my Swift 4 iOS app.

I have the SDK installed but I'm having some issues with this dSYM thing, the firebase console tells me I need to upload the dSYM file before I can see any errors.

So I have set up the debug information format to DWARF with dSYM file for both debug and release and still nothing.

So I'm trying to add this script to my build phases (as instructed by Firebase's documentation)

find dSYM_directory -name "*.dSYM" | xargs -I \{\} $PODS_ROOT/Fabric/upload-symbols -gsp /Users/jamie/Documents/CalTest/CalTest/GoogleService-Info.plist -p platform \{\}

Now I have a build error that says

find: dSYM_directory: No such file or directory

What have I done wrong? I've followed the documentation step by step.

Edit

I have found the dSYM location and I still have the error on the firebase console.

This script now looks like this:

find "/Users/jamie/Library/Developer/Xcode/DerivedData/CalTest-eijpetsowazsmsegwizzgopcdpcq/Build/Products/Debug-iphoneos" -name "*.dSYM" | xargs -I \{\} $PODS_ROOT/Fabric/upload-symbols -gsp "/Users/jamie/Documents/CalTest/CalTest/GoogleService-Info.plist" -p "ios" \{\}

Answer

Alexizamerican picture Alexizamerican · Jan 23, 2018

dSYM_directory is just a placeholder in the example script. You need to point the upload-symbols script to the directory where your apps dSYMs are. Replace dSYM_directory with the actual path and it will work.