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.
Asked
Active
Viewed 8,348 times
4 Answers
7
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();

Hardik Virani
- 1,687
- 7
- 23
- 36
7
It is now:
import crashlytics from '@react-native-firebase/crashlytics';
then
crashlytics().crash()

TechnoTim
- 3,065
- 1
- 23
- 28
4
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();

mysl
- 1,003
- 2
- 9
- 19

Nirmalsinh Rathod
- 5,079
- 4
- 26
- 56
0
You can import crashlytics and use crash() to do a native crash.
import crashlytics from 'react-native-fabric-crashlytics';
crashlytics().crash();

Scinfu
- 1,081
- 13
- 18