mirror of
https://github.com/status-im/instabug-reactnative.git
synced 2025-03-01 13:40:42 +00:00
1.7 KiB
1.7 KiB
instabug-reactnative
Dependencies
react-native
version >0.26
Installation
iOS
$ npm install https://github.com/Instabug/instabug-reactnative --save
$ rnpm link instabug-reactnative
- Open your app
.xcodeproj
file - Add the following line to your "Podfile":
pod 'Instabug', '~> 6.0.0'
- run
pod install
- Run your project (
Cmd+R
)<
Android (Pending)
$ npm install https://github.com/Instabug/instabug-reactnative --save
$ rnpm link instabug-reactnative
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.instabug.reactlibrary.RNInstabugReactnativePackage;
to the imports at the top of the file - Add
new RNInstabugReactnativePackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':instabug-reactnative' project(':instabug-reactnative').projectDir = new File(rootProject.projectDir, '../node_modules/instabug-reactnative/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':instabug-reactnative')
Usage
import Instabug from'instabug-reactnative';
class testApp extends Component {
constructor() {
super();
Instabug.startWithToken('YOUR_TOKEN', Instabug.constants.invocationEvent.floatingButton);
}
...
}
iOS
If your app doesn't already access the microphone or photo library, you'll need to add the following 2 keys to your app's info.plist file:
NSMicrophoneUsageDescription
NSPhotoLibraryUsageDescription
License
This software is released under MIT License.
© 2016 Instabug. All rights reserved.