FirebaseCrashlytics

The Firebase Crashlytics API provides methods to annotate and manage fatal crashes, non-fatal errors, and ANRs captured and reported to Firebase Crashlytics.

By default, Firebase Crashlytics is automatically initialized.

Call Firebase.crashlytics to get the singleton instance of FirebaseCrashlytics.

Properties

Link copied to clipboard

The underlying Firebase Android SDK object.

Link copied to clipboard
Link copied to clipboard
val FirebaseCrashlytics.ios: FIRCrashlytics

The underlying Firebase iOS SDK object.

Functions

Link copied to clipboard

If automatic data collection is disabled, this method queues up all the reports on a device for deletion. Otherwise, this method is a no-op.

Link copied to clipboard

Checks whether the app crashed on its previous run.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun log(message: String)

Logs a message that's included in the next fatal, non-fatal, or ANR report.

Link copied to clipboard
fun recordException(exception: Throwable)

Records a non-fatal report to send to Crashlytics, with the exception's class, message and stack trace. On Apple platforms the stack frames are reported as code addresses of the Kotlin framework, which Crashlytics symbolicates from its dSYM; see Crashlytics on iOS in the README.

fun recordException(exception: Throwable, customKeys: Map<String, Any>)

Records a non-fatal report to send to Crashlytics.

Link copied to clipboard

If automatic data collection is disabled, this method queues up all the reports on a device to send to Crashlytics. Otherwise, this method is a no-op.

Link copied to clipboard

Enables or disables the automatic data collection configuration for Crashlytics.

Link copied to clipboard
fun setCustomKey(key: String, value: Boolean)
fun setCustomKey(key: String, value: Double)
fun setCustomKey(key: String, value: Float)
fun setCustomKey(key: String, value: Int)
fun setCustomKey(key: String, value: Long)
fun setCustomKey(key: String, value: String)

Sets a custom key and value that are associated with subsequent fatal, non-fatal, and ANR reports.

Link copied to clipboard
fun setCustomKeys(customKeys: Map<String, Any>)

Sets multiple custom keys and values that are associated with subsequent fatal, non-fatal, and ANR reports. This method is intended as an alternative to setCustomKey in order to reduce the computational load of writing out multiple key/value pairs at the same time.

Link copied to clipboard
fun setUserId(userId: String)

Records a user ID (identifier) that's associated with subsequent fatal, non-fatal, and ANR reports.

Link copied to clipboard
open override fun toString(): String