React Native wrapper around the native BugBattle SDKs
$ yarn add react-native-bugbattle
$ npm install react-native-bugbattle
- React Native 0.60+
Since version 0.60, React Native supports auto linking. This means no additional step is needed on your end.
- React Native <= 0.59
$ react-native link react-native-bugbattle
Special note for iOS using cocoapods
, run:
$ cd ios && pod install && cd ..
This library exposes all the native BugBattle SDK methods to JS with included TypeScript declaration files.
import BugBattle, { BugBattleActivationMethod } from 'react-native-bugbattle';
BugBattle.initialise("YOUR_API_KEY", BugBattleActivationMethod.SHAKE);
BugBattle.startBugReporting();
BugBattle.setAppBarColor("#AAAAAA");
BugBattle.setUserEmail("[email protected]");
BugBattle.attachCustomData({
userId : "YOUR_USER_ID",
age : 21
// ...
});
BugBattle.trackStep("SCREEN_VIEW", "HOME SCREEN");