Search code examples
github-actionscrashlyticsfastlanexcode14dsym

How to send dSYM from Xcode 14 to Firebase from GitHub Actions (Not self hosted use case) + Fastlane


We small company and we use GitHub Actions as CI system and use it with not self-hosted workers on our own macs but as cloud solution that GH Actions provided by default. Also we use Fastlane.

Before Xcode 14 we downloaded dSYM file manually and uploaded one to Firebase with each release. But now we can't do this because bitcode is not enabled and so on...

Can anyone help us resolve this problem? I remind you, we do not use GitHub Actions with self-hosted workers so we don't have access to worker. These workers are virtual macs and they are recreating with each new build from scratch.


Solution

  • You can add a run script to your app that will get executed when building it. This run script will upload the dSYMs for you automatically.

    This is the run script from the documentation:

    "${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run"
    

    NOTE: The document I share has some extra steps, make sure to follow them.

    This script will do some validations and then will upload the symbols asynchronously. In some scenarios, when building in a CI environment, the process could get closed before the dSYMs get uploaded. See this other question for reference.

    Another option would be running this other script instead:

    ${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/upload-symbols --build-phase
    

    This script will do the upload as part of the build process. The caveat is that this will make the build time a bit longer.