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
val FirebaseCrashlytics.android: FirebaseCrashlytics
Link copied to clipboard
val FirebaseCrashlytics.ios: FIRCrashlytics

Functions

Link copied to clipboard
actual fun deleteUnsentReports()
expect fun deleteUnsentReports()

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.

actual fun deleteUnsentReports()
Link copied to clipboard

Checks whether the app crashed on its previous run.

Link copied to clipboard
actual fun log(message: String)
expect fun log(message: String)

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

actual fun log(message: String)
Link copied to clipboard
actual fun recordException(exception: Throwable)
expect fun recordException(exception: Throwable)

Records a non-fatal report to send to Crashlytics.

actual fun recordException(exception: Throwable)
Link copied to clipboard
actual fun sendUnsentReports()
expect fun sendUnsentReports()

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.

actual fun sendUnsentReports()
Link copied to clipboard

Enables or disables the automatic data collection configuration for Crashlytics.

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

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

actual fun setCustomKey(key: String, value: Boolean)
actual fun setCustomKey(key: String, value: Double)
actual fun setCustomKey(key: String, value: Float)
actual fun setCustomKey(key: String, value: Int)
actual fun setCustomKey(key: String, value: Long)
actual fun setCustomKey(key: String, value: String)
Link copied to clipboard
actual fun setCustomKeys(customKeys: Map<String, Any>)
expect 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.

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

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

actual fun setUserId(userId: String)