fastlane: upload_symbols_to_crashlytics did not handle SPM Crashlytics Solution
New Issue Checklist
- Updated fastlane to the latest version
- I read the Contribution Guidelines
- I read docs.fastlane.tools
- I searched for existing GitHub issues
Issue Description
upload_symbols_to_crashlytics not working with Firebase Crashlytics SPM Solution.
Error Message
Failed to find Fabric's upload_symbols binary at /Applications/Fabric.app/**/upload-symbols or ./Pods/**/upload-symbols. Please specify the location of the binary explicitly by using the binary_path option
To Fix this Bug, we need to add some code on Line 105 in https://github.com/fastlane/fastlane/blob/master/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb#L105
params[:binary_path] ||= (Dir["/Applications/Fabric.app/**/upload-symbols"] + Dir["./Pods/Fabric/upload-symbols"] + Dir["./scripts/upload-symbols"] + Dir["./Pods/FirebaseCrashlytics/upload-symbols"]).last
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 9
- Comments: 55 (2 by maintainers)
Commits related to this issue
- fix: Add support for using Crashlytic's upload_symbols from SPM https://github.com/fastlane/fastlane/issues/17288 — committed to chedabob/fastlane by chedabob 3 years ago
- fix: Add support for using Crashlytic's upload_symbols from SPM https://github.com/fastlane/fastlane/issues/17288 — committed to chedabob/fastlane by chedabob 3 years ago
- fix: Add support for using Crashlytic's upload_symbols from SPM https://github.com/fastlane/fastlane/issues/17288 — committed to chedabob/fastlane by chedabob 3 years ago
Yet another approach, based on #12232:
Still relevant
EDIT (due to me misreading your last lines): The simple solution could be just to specify the path to your scripts folder (and manually copying the upload script there) in your
Fastfile.Still relevant
I ended up with the following solution in case if Firebase provided through SPM, but you still using Cocopods and hence has a workspace and different build schemes (which is frequent case)
I modified the script and used it like this:
@StefaniOSApps I use this command:
xcodebuild -showBuildSettings | grep -m 1 "BUILD_DIR" | grep -oEi "\/.*" | sed 's/Build\/Products/SourcePackages\/checkouts\/firebase-ios-sdk\/Crashlytics\/upload-symbols/'to get the path to upload-symbols and I put it in a environment variable:After that I use the Ruby ENV constant in the Fastfile to get the path:
/cc @iOSGeekster
Seems like a good solution, we need to locate firebase package in case of using SPM what upload_symbols_to_crashlytics can’t do for now. Looking forward to have something similar and universal under the hood of upload_symbols_to_crashlytics script
Hi I provide a better solution as workaround,
Modify crashlytics script on Build Phases from
to
hmm I need a clean solution … this looks like as a workaround
Still relevant
Same issue on latest version
I found this solution that worked out great for me. Credits to Sarun!
Still relevant for apps with enabled bitcode and Xcode 13.
Are there any other reasons to use this lane except for syncing dSYMs for apps with enabled bitcode? 🤔 Apple is deprecating Bitcode in Xcode 14, so this won’t be an issue anymore?
Still relevant
Thanks for re-opening @joshdholtz. Of note Firebase is tracking the issue as well as it’s not as ideal having to find it in the build artifacts. I’d hold off fixing this in
fastlaneuntil they determine their solution. https://github.com/firebase/firebase-ios-sdk/issues/6864I for now just decided to follow @iOSGeekster’s solution to copy it to
./scripts/upload-symbols. Also because Fastlane already looks for it there, you don’t even need to addbinary_pathto theupload_symbols_to_crashlyticscall. Nice and clean I just need to now track them making changes to that script.Awsome!!!
For react native this worked for me:
Changed to using Firebase SPM recently, still broken.
Same issue on latest version