Xcode build never finishes when using Firebase upload-symbols in Build Phase Run Script

3k Views Asked by At

I have Firebase Analytics and Crashlytics enabled in my app. As per the Firebase website, I have implemented the following in my Run Script, under Build Phases in Xcode:

find dSYM_directory -name "*.dSYM" | xargs -I \{\} $PODS_ROOT/FirebaseCrashlytics/upload-symbols -gsp /path/to/GoogleService-Info.plist -p platform \{\}

I receive the following output from Xcode:

Running upload-symbols in Build Phase mode
Validating build environment for Crashlytics...
Validation succeeded. Exiting because upload-symbols was run in validation mode

The script allegedly completes its work successfully, as reported in Console.app. See attached screen capture for output. Console.app output from upload-symbols script

The build progress does not progress any further after receiving the message above in Xcode. It is stuck at Building 2069 of 2081 tasks. I can successfully run this script manually, after a new app version has been distributed. But the whole point of Google providing this script for Firebase is to automate the whole process.

Has anyone had success in implementing the upload-symbols script in their Run Script? Any ideas why my Build stalls and never finishes?

2

There are 2 best solutions below

10
Mitchell D On BEST ANSWER

I realised I needed to add an input file for the run script. See below for implementation.

Input file required

0
Michael Braley On

I have found one other option that's working reliably. Modify your Run Script to the following: ${PODS_ROOT}/FirebaseCrashlytics/upload-symbols -bp That's it, just a single line. We discovered this by running upload-symbols --help from a terminal. Which said the following about the -bp, --build-phase command line argument. "Build Phase Mode is meant to run as an Xcode Run Script Build Phase. It finds the dSYMs and platform from the build environment variables, instead of having the caller pass them in. With this flag, <path> and --platform can be omitted."

You can also add the -d flag which logs a large but what appears to be very relevant information. Which is often hard to find in this process.

enter image description here