firebase-ios-sdk: Firebase Crashlytics integration
[REQUIRED] Step 1: Describe your environment
- Xcode version: 12 beta 6
- Firebase SDK version: 6.32.0
- Firebase Component: Crashlytics
- Component version: [Firebase/Crashlytics] Version 6.32.0
- Installation method:
Swift Package Manager
[REQUIRED] Step 2: Describe the problem
I am having issue running Crashlytics and connecting it to the console.
Steps to reproduce:
Crashlytics was added by following the instructions here. Then we build/run/crash the app but nothing seems to be popping in the console. Afterwards we aded the run and upload-symbols scripts as part of the directory. Still wasn’t able to connect the the firebase console.
Please provide us with documentation/steps how to integrate Crashlytics with SPM?
Relevant Code:
// TODO(you): code here to reproduce the problem
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 28 (3 by maintainers)
@tkrajacic in the build phase, try replacing
${PODS_ROOT}/FirebaseCrashlytics/runwith${BUILD_DIR%Build/*}SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/runHey folks, want to dig in further. We saw a case where GDTCORFlatFileStorage isn’t loading with binary frameworks. Can you try the following to confirm it’s the same issue:
Okay we (@glaures-ioki) solved the problem for us 🎉
The issue was (as @samedson depicted) that some frameworks where not linked to the main app target 🤭 Why can that happen?! Well quite easy, we integrated Firebase via Carthage for a long time now, upgraded it in that time a lot and we think that Google added some frameworks that where suddenly there after the upgrade but we forgot to link them to the target. The app was just building fine and also didn’t crash nor log anything regarding the missing frameworks. In detail the missing frameworks where (it was the missing GoogleDataTransport framework that prevented the crash report to get submitted to the server):
There are different solutions we came up to check what frameworks could be missing:
Carthage/Build/iOSto your project and compare them to your project.pod installand compare the frameworks CocoaPods links to your main app target.To prevent such issues to happen in future, Google could (additionally to handling it gracefully) execute some runtime checks on app start in the Firebase framework and at least print some logs when required frameworks are missing - wdyt?
Hope that helps some of you guys ✌️
We’re not on coe 12 yet. Also we can easily cche Carthage dependencies on Bitrise but not SPM ones. So Carthage is the better option. Apart from that why should the framewok be different when using SPM over Carthage? The source code behavior should be the same.
@stherold sorry, what about swift package manager?
@tkrajacic okay for Carthage integration I downloaded the framework from https://firebase.google.com/download/ios since the
runis not included at all in the Carthage download. I extracted the 2 scriptsrunandupload-symbolsinto a sub-directory of my project and call it as the last build phase via:${PROJECT_DIR}/dependencies/firebase-crashlytics-dsym-upload/runDoes this make sense?
@kevinrefermat oh I wasn’t asking for me. I was asking if that might be the user’s problem here.
Maybe a stupid question, but how did you run the build phase that previously ran the script
${PODS_ROOT}/FirebaseCrashlytics/run? It is not mentioned anywhere in the instructions.I tested right now and I can confirm it with the
Carthageintegration,Xcode 12.0 (12A7209)andFirebase 6.33.0.What exactly makes the website recognize the app? Is it the run script that runs at compile time or is it something at runtime?
As I wrote above crash reports get actually sent to the server.
If it is of some relevance, this is our Info.plist: