Crashlytics is a powerful real-time crash reporting tool offered by Firebase. It helps developers identify, prioritize, and fix stability issues in mobile apps quickly. This guide will walk you through setting up Crashlytics in your Android and iOS applications.
Before integrating Crashlytics, ensure you have the following:
Follow these steps to integrate Crashlytics in your Android app:
buildscript {
dependencies {
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.5'
}
}
build.gradle:
plugins {
id 'com.android.application'
id 'com.google.firebase.crashlytics'
}
dependencies {
implementation 'com.google.firebase:firebase-crashlytics:18.4.3'
}
To integrate Crashlytics in an iOS app:
Podfile:
pod 'Firebase/Crashlytics'
pod install
AppDelegate.swift:
import Firebase
FirebaseApp.configure()
After setup, it’s good practice to generate a test crash to confirm integration:
throw RuntimeException("Test Crash"); in your activity.fatalError("Test Crash") in Swift.Crashlytics.log() and
Crashlytics.setCustomKey().