react-native-bmrt
v0.1.5
Published
React Native bridge module for interacting with Appinventiv’s BMRT
Maintainers
Readme
react-native-bmrt
React Native bridge module for interacting with Appinventiv’s BMRT
Installation
npm install react-native-bmrtUsage
import { launchBmrt, crashInitialise, NetworkLog } from 'react-native-bmrt';
// ...
if (Platform.OS == 'ios') {
launchBmrt('<IOS-APP-TOKEN>');
} else if (Platform.OS === 'android') {
launchBmrt('<ANDROID-APP-TOKEN>');
}
React.useLayoutEffect(() => {
NetworkLog();
}, []);
React.useEffect(() => {
crashInitialise(navigationRef); // Pass reference of navigation
}, []);Requirements
For android minSdkVersion 24 is required.
Extra Steps for Android
Step 1: Generate Access Token from GitLab
- Go to your GitLab profile.
- Select "Preferences".
- Inside Preferences, navigate to "Access Tokens".
- Create a new token.
- After creating the token replace the ‘YOUR_ACCESS_TOKEN_HERE’ with your token.
Step 2: Add the following to your android/build.gradle:
maven {
url "https://gitlab.appinvent.in/api/v4/projects/4537/packages/maven"
credentials(HttpHeaderCredentials) {
name = 'Private-Token'
value = 'YOUR_ACCESS_TOKEN_HERE'
}
authentication {
header(HttpHeaderAuthentication)
}
}
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library
