Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to locate upload-dsyms utility if I install Crashlytics SDK via Swift Package Manager? #6864

Closed
lolgear opened this issue Oct 29, 2020 · 11 comments

Comments

@lolgear
Copy link

lolgear commented Oct 29, 2020

[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.
@google-oss-bot
Copy link

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 lolgear changed the title How to locate upload-dsyms script if I install Crashlytics SDK via Swift Package Manager? How to locate upload-dsyms utility if I install Crashlytics SDK via Swift Package Manager? Oct 29, 2020
@paulb777
Copy link
Member

@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.

@paulb777 paulb777 added the Docs label Oct 29, 2020
@paulb777
Copy link
Member

@lolgear
Copy link
Author

lolgear commented Oct 29, 2020

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

@yakovmanshin
Copy link
Contributor

The same issue relates to Crashlytics’s run utility. I’ve located the binary itself: it’s 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’s build variables, and hacks such as getting to ${BUILD_DIR} and then going up the directory hierarchy doesn’t 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.

@aprato
Copy link

aprato commented Nov 2, 2020

+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"

@joninsky
Copy link

joninsky commented Nov 20, 2020

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

@denys-meloshyn
Copy link

Any updates? 🙃

@elenadoty
Copy link
Contributor

elenadoty commented Jan 7, 2021

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).

@yakovmanshin
Copy link
Contributor

@elenadoty Thanks for the suggestion! When used with v7.3.1, the path doesn’t 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’ve 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.

@elenadoty
Copy link
Contributor

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

@firebase firebase locked and limited conversation to collaborators Feb 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants