Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Crashlytics setup on iOS?

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!

like image 945
Lucas P. Avatar asked Dec 18 '17 11:12

Lucas P.


People also ask

How does Firebase Crashlytics work in iOS?

Firebase Crashlytics automatically processes your debug symbol (. dSYM) files to give you deobfuscated, human-readable crash reports.

How do I turn on Firebase Crashlytics?

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.

Does Firebase work with iOS?

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.


3 Answers

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.

like image 164
Lucas P. Avatar answered Sep 22 '22 20:09

Lucas P.


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.

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

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

  3. If you keep seeing this in your Xcode console, [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

like image 24
MkVal Avatar answered Sep 22 '22 20:09

MkVal


The issue for me was I was using the old Fabric before and I had to remove the key from my info.plist

like image 42
MobileMon Avatar answered Sep 18 '22 20:09

MobileMon