I'm trying to integrate Firebase Crashlytics into iOS my app, which has Firebase Crash Reporting enabled. I've followed the documentation here, but my build always fails when running the custom build phase:
"${PODS_ROOT}/Fabric/run"
The error in Xcode is the following:
error: Fabric: Configuration Issue
Fabric API key not valid. Your Fabric run script build phase should contain your API key: ./Fabric.framework/run INSERT_YOUR_API_KEY INSERT_YOUR_BUILD_SECRET
I do not have a Fabric API key and I suppose that they fabric keys should be taken care by the Firebase library. I have the Info.plist in my project, Firebase is fully functional, but I cannot get past the Fabric run phase. Any help on how to fix this is greatly appreciated!
Firebase Crashlytics automatically processes your debug symbol (. dSYM) files to give you deobfuscated, human-readable crash reports.
Implementation path. Start by adding Firebase to your app in the Firebase console. Add the Crashlytics SDK via CocoaPods, Gradle, or Pub, and Crashlytics starts collecting reports. Visit the Firebase console to track, prioritize, and fix issues in your app.
Go to the Firebase console. In the center of the project overview page, click the iOS+ icon to launch the setup workflow. If you've already added an app to your Firebase project, click Add app to display the platform options. Enter your app's bundle ID in the bundle ID field.
Finally figured it out, posting for anyone that might be baffled by the same problem.
If you've tried to install fabric via the OSX Fabric.app, or you were using Fabric Crashlytics in the past, then it will have added your Fabric API key to your Info.plist
, which the Fabric initialization build script is trying to read (I guess).
After deleting the Fabric keys form the Info.plist
the script works, without the need of any keys/params.
The Firebase docs should include a snippet warning on this.
If you follow closely the Getting Started documentation, you might be in for some frustrations. Trust me. I had my share of that.
Now here's what I can share with you.
If you previously had Fabric RunScript for that Target, then it's best if you delete that and create a new one, apply the GettingStarted instruction, and replace the $(INFOPLIST_PATH)
with GoogleService-Info.plist
.
There should be no Fabric configuration on your Info.plist
file anymore. It's this thing: <key>Fabric</key><dict>...</dict>
. If you still have that, time to say goodbye and let go of those feelings or face this issue.
[Fabric] failed to download settings Error Domain=FABNetworkError Code=-5... blah blah blah
, then go clean that Build Folder first (shift + cmd + k
).If your next build works, try force crashing your app and check out the crash logs on Firebase.
Here's my stack: Xcode 10.2.1 | Fabric 1.9 | Crashlytics 3.12
The issue for me was I was using the old Fabric before and I had to remove the key from my info.plist
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With