4
votes

I am working on react-native-firebase crashlytics. I am using rnfirebase starter kit. There we have crashlytics integrated with the project. Now, I want to crash my app to check the crash report.

3

3 Answers

7
votes

You need to import packages react-native-fabric and another line in initial file.

    import Fabric from 'react-native-fabric';
    var { Crashlytics } = Fabric;
    Crashlytics.crash();
5
votes

It is now:

import crashlytics from '@react-native-firebase/crashlytics';

then

crashlytics().crash()

https://rnfirebase.io/crashlytics/usage

3
votes

You need to need to import the crashlytics and use crash() to do a manual crash.

import crashlytics from 'react-native-fabric-crashlytics';

Calling the code below should crash your application:

crashlytics().crash();