Firebase-ios-sdk: How to locate upload-dsyms utility if I install Crashlytics SDK via Swift Package Manager?

Created on 29 Oct 2020  路  11Comments  路  Source: firebase/firebase-ios-sdk

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 12.1
  • Firebase SDK version: 7.0.0
  • Installation method: Swift Package Manager (select one)
  • Firebase Component: Crashlytics

[REQUIRED] Step 2: Describe the problem

I can't locate an upload-dsyms utility.

Steps to reproduce:

  1. Install SDK via Swift Package Manager.
  2. Follow instructions in Crashlytics pane.
  3. Find out that all instructions are only for CocoaPods.
Docs Swift Package Manager crashlytics

Most helpful comment

+1 for getting the website updated. If it helps anyone here is my workaround to get the path of run:
SWIFT_PACKAGE_DIR="${BUILD_DIR%Build/*}SourcePackages/checkouts/firebase-ios-sdk/Crashlytics"

All 11 comments

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@lolgear Thanks for pointing this out. We should get the docs updated for using Crashlytics with Swift Package Manager.

In the meantime, a variation of the Carthage Crashlytics instructions should work.

It would be nice if you also release this tool via Homebrew, for example.

The same issue relates to Crashlytics鈥檚 run utility. I鈥檝e located the binary itself: it鈥檚 at ~/Library/Developer/Xcode/DerivedData/MyApp-abcde/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run.

However, the MyApp-abcde folder cannot be directly referenced using Xcode鈥檚 build variables, and hacks such as getting to ${BUILD_DIR} and then going up the directory hierarchy doesn鈥檛 seem to work since ${BUILD_DIR} resolves to different paths for running and archiving the app.

I asked a more general question about referencing the MyApp-abcde folder on Stack Overflow, but it has no answers yet.

+1 for getting the website updated. If it helps anyone here is my workaround to get the path of run:
SWIFT_PACKAGE_DIR="${BUILD_DIR%Build/*}SourcePackages/checkouts/firebase-ios-sdk/Crashlytics"

Here are the steps I took to upload DYSM's

1) Clone the Firebase SDK from master somewhere. git clone https://github.com/firebase/firebase-ios-sdk.git and then cd into the the Crashlytics/upload-symbols directly and run pwd note the full path

2) cd to the Archives folder in Xcode directory. Find the Archive you want and cd to the dSYMs folder. Run pwd my out put looked like this /Users/<user>/Library/Developer/Xcode/Archives/<archive date>/<archive file name>.xcarchive/dSYMs

3) The the full path to the GoogleService-Info.plist of your project.

4) Make an executable .sh file and combine all the paths like this:

/Users/<user>/Downloads/firebase-ios-sdk/Crashlytics/upload-symbols -gsp /Users/<user>/Desktop/<project folder>/<project files>/GoogleService-Info.plist -p ios /Users/<user>/Library/Developer/Xcode/Archives/<archive date>/<archive file name>.xcarchive/dSYMs

I run my new script and ~10 minutes later the Crashalytics console no longer showed that particular archive on the "Missing dSYMs" page

Any updates? 馃檭

We've updated the docs with the work around but in summary:

  • Use ${BUILD_DIR%Build/*}SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run as the run script that allows Xcode to upload your project's dSYM files.

  • Or: use the upload-symbols script to manually upload dSYM files. (Make sure that the file is executable; for usage notes and additional instructions, run without any parameters).

@elenadoty Thanks for the suggestion! When used with v7.3.1, the path doesn鈥檛 work and results in the following error: /Users/<REDACTED>/Library/Developer/Xcode/DerivedData/<REDACTED>/Build/ProductsSourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run: No such file or directory.

I鈥檝e been able to make the script work by using ${BUILD_DIR%Build/*}SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run as the path. It seems to produce the correct result for both Run and Archive actions, but it certainly needs some more testing.

The path suggested by @yakovmanshin and @aprato or downloading the run script and placing it in your project directory are the best ways to locate and include the utility at the moment. I'm going to close this bug for now, but if we implement an alternative solution we'll provide another update then.

Updated docs

Was this page helpful?
0 / 5 - 0 ratings