crashlytics
The Firebase Crashlytics service interface.
This module is available for the default app only.
Example
Get the Crashlytics service for the default app:
const defaultAppCrashlytics = firebase.crashlytics();
Properties
isCrashlyticsCollectionEnabled
</>Whether Crashlytics reporting is enabled.
isCrashlyticsCollectionEnabled: true;
Methods
checkForUnsentReports
</>Determines whether there are any unsent crash reports cached on the device. The callback only executes if automatic data collection is disabled.
checkForUnsentReports(): Promise<boolean>;
crash
</>Cause your app to crash for testing purposes. This is a native crash and will not contain a javascript stack trace.
crash(): void;
deleteUnsentReports
</>Deletes any unsent reports on the device. This method only applies if automatic data collection is disabled.
deleteUnsentReports(): Promise<void>;
didCrashOnPreviousExecution
</>Returns a boolean value indicating whether the app crashed during the previous execution.
didCrashOnPreviousExecution(): Promise<boolean>;
log
</>Log a message that will appear in any subsequent Crash or Non-fatal error reports.
log(message: string): void;
sendUnsentReports
</>Enqueues any unsent reports on the device to upload to Crashlytics. This method only applies if automatic data collection is disabled.
sendUnsentReports(): void;
setAttribute
</>Sets a string value to be associated with the given attribute name which will be visible in the Firebase Crashlytics console.
setAttribute(name: string, value: string): Promise<null>;
setAttributes
</>Like setAttribute
but for multiple attributes.
setAttributes(attributes: { [key: string]: string }): Promise<null>;