I'm building my app using React Native and I want to catch crashes that happen on both Objective-C and JavaScript sides of the app.
I installed Crashlytics SDK using their guide and installer and everything went smooth. I do get to see crashes from the Objective-C side, but not crashes that occurs from JavaScript.
Do I need to do something special to catch JavaScript errors and report them to Crashlytics?
Thanks, Ran.
Install the following react native firebase crashlytics dependencies Click on the android icon on the firebase dashboard to setup application Write your app name and register 2. Download the google-services.json file and put it on your — projectname/android/app — folder.
React Native Crashlytics module by default installs a global javascript exception handler, and it records a crash with a javascript stack trace any time an unhandled javascript exception is thrown.
Getting started with React Native will help you to know more about the way you can make a React Native project. We are going to use react-native init to make our React Native App. Assuming that you have node installed, you can use npm to install the react-native-cli command line utility. Open the terminal and go to the workspace and run
React Native Crashlytics provides you with the recordError API to help record these errors. This API records the stack trace and the information it captures during a fatal crash. You can view these in the Firebase console as well.
I just wrote a blog post about this:
Add Crashlytics to your React Native iOS app
The approach I took was to override the logging function of react native to be able to log my own stuff and see it on the crash logs and also generated a sourcemap in order to the see full stack trace.
You could use react-native-fabric It has a good guide and has js methods for both crashlytics and answer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With