Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/systangotechnologies/crashalert
Set of React Native components that allow reporting of the crashes in RN applications.
https://github.com/systangotechnologies/crashalert
crash crash-dump crash-reporting crash-reporting-tool hybrid-apps mobile-app react-native
Last synced: about 2 months ago
JSON representation
Set of React Native components that allow reporting of the crashes in RN applications.
- Host: GitHub
- URL: https://github.com/systangotechnologies/crashalert
- Owner: SystangoTechnologies
- License: mit
- Created: 2016-12-29T10:58:44.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-20T10:57:20.000Z (about 6 years ago)
- Last Synced: 2024-11-16T21:49:16.292Z (2 months ago)
- Topics: crash, crash-dump, crash-reporting, crash-reporting-tool, hybrid-apps, mobile-app, react-native
- Language: JavaScript
- Size: 111 MB
- Stars: 70
- Watchers: 5
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Crashalert
As a mobile app developer, you’ve likely faced your own unique challenges in detecting, reproducing and debugging run-time crashes in React Native applications. Of course we need a crash analyzer tool that can track these crashes.
## What is Crashalert?
This is a reporter that stores user action steps and runtime crashes info that you can analyze on [Crashlyzer](https://github.com/SystangoTechnologies/Crashlyzer) with a detailed specification of the tracked crashes. You no longer need to change existing code, you just need to import `react-native-crashalert` components in your js classes rather than `react-native`.
### Supported Versions
Version 3.0.5 supports react-native >= 0.52.0
### Platforms
`Crashalert` supports both the platforms `android` and `iOS`.
### Installation
`$ yarn react-native-crashalert` or `npm install --save react-native-crashalert`
## How to analyze the crashes?
To analyze your app crashes, you should follow Node server and Web client installation [here](https://github.com/SystangoTechnologies/Crashlyzer)
**NOTE:** Please follow the [link here](FLOW_README.md) for the complete installation guide of `Crashlyzer`.
## Basic usage
First of all, you'll need to add following code in your `app.js` or any top hierarchy component in `constructor` or `componentWillMount()` method. This is required configuration for crash reporter.
```javascript
import { CrashReporter } from 'react-native-crashalert'
CrashReporter.setConfiguration({
hostURL: 'http://localhost:8000', // Replace this URL with your Server base url, in my case I have setup the node server on my machine itself using docker container
enableReporter: true // pass false here if you don't want to enable reporting the crashes
});```
**NOTE:** In case `localhost` url is not working in any platform `android/iOS` then you need to replace the value of `hostURL` to your machine's **local IP Address** in `setConfiguration` method.
### Sample
You can simply try the following sample code :
```javascript
// Import the component 'react-native-crashalert' module
import {Button} from 'react-native-crashalert';// Within your render function
this.pressLogin()}>
LOG IN// Adding your styles...
var styles = StyleSheet.create({
button: {
height:35,
backgroundColor: '#F57B20',
alignSelf:'center',
marginTop:10,
width:100
}});
```**NOTE :** Following are some additional props which might be used to pass manual information associated with the component otherwise the `default` information of the component will get passed.
## Example:
The example app `RNCrashExamples` demonstrated the use of our crash reporter library. It is also having some additional features i.e. [`Eslint`](https://www.themarketingtechnologist.co/eslint-with-airbnb-javascript-style-guide-in-webstorm/), [`Code-Push`](https://github.com/Microsoft/react-native-code-push), [`React-Navigation`](https://reactnavigation.org/) and [`Redux`](https://redux.js.org/) are integrated. You need to add your code-push keys for android and iOS in their respective mapping files, you can follow the inline link of code-push for more details. The code-push is optional in the example app for debug mode.
### The components which can be used:
- Button
- TouchableOpacity
- TouchableHeighlight
- TouchableWithoutFeedback
- TouchableNativeFeedback## Additional props
- searchText : To get the searched text on the `TextInput` component.(NOTE : While using `TextInput` component, you need to pass the `text` value in this field)
- actionOn : To associate extra information related to the component used.
- textStyle: To give a custom style of Text### Troubleshoot
If you experience the following issue in **android** while building the example app:
`ENOENT: no such file or directory, open '/Users/macmini33/Desktop/demo/RNCrashExamples/android/app/build/intermediates/assets/debug/CodePushHash'`
**Fix:** You need to create two (assets and debug) folders to the following path:
`rootDir -> android -> app -> build -> intermediates -> assets -> debug`
## License
MIT
## Contributors
[Arpit Khandelwal](https://www.linkedin.com/in/arpitkhandelwal1984/), [Akhilesh Mourya](https://www.linkedin.com/in/akhilesh-mourya-54705232/), [Rituraj Mandloi](https://www.linkedin.com/in/rituraj-mandloi-57b97a171/)