Skip to content

Commit 359f7ca

Browse files
authored
Update README (#487)
1 parent 2b40e93 commit 359f7ca

File tree

1 file changed

+10
-50
lines changed

1 file changed

+10
-50
lines changed

README.md

Lines changed: 10 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -48,61 +48,21 @@ Updating to a new version? Check the [Update Guide](#update-guide) before bumpin
4848
react-native link instabug-reactnative
4949
```
5050

51-
### Using CocoaPods (iOS only)
51+
## Initializing Instabug
5252

53-
Alternatively, for iOS you can use [CocoaPods](https://cocoapods.org/) for managing dependencies.
53+
To start using Instabug, import it as follows.
5454

55-
1. In Terminal, navigate to your React Native directory and install the `instabug-reactnative` package:
56-
57-
```bash
58-
npm install instabug-reactnative
59-
```
60-
61-
2. Add the following to your `Podfile`:
62-
63-
```ruby
64-
pod 'instabug-reactnative', :path => '../node_modules/instabug-reactnative'
65-
pod 'React', :path => '../node_modules/react-native', :subspecs => [
66-
'Core',
67-
'CxxBridge',
68-
'DevSupport'
69-
]
70-
71-
# Required React native dependencies
72-
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
73-
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
74-
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/GLog.podspec'
75-
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
76-
77-
# To make sure that archiving works correctly in Xcode, React has to be
78-
# removed from the Pods project as it's already included in the main project.
79-
post_install do |installer|
80-
installer.pods_project.targets.each do |target|
81-
if target.name == "React"
82-
target.remove_from_project
83-
end
84-
end
85-
end
86-
```
87-
88-
3. Install `instabug-reactnative`:
89-
90-
```bash
91-
pod install
92-
```
93-
94-
## Using Instabug
95-
1. To start using Instabug, import it into your `index.ios.js` and `index.android.js` file.
96-
97-
```javascript
98-
import Instabug from 'instabug-reactnative';
99-
```
100-
2. Then initialize it in the `constructor` or `componentWillMount`. This line will let the Instabug SDK work with the default behavior. The SDK will be invoked when the device is shaken. You can customize this behavior through the APIs (You can skip this step if you are building an Android app only).
55+
```javascript
56+
import Instabug from 'instabug-reactnative';
57+
```
58+
* ### iOS
59+
Initialize it in the `constructor` or `componentWillMount`. This line will let the Instabug SDK work with the default behavior. The SDK will be invoked when the device is shaken. You can customize this behavior through the APIs.
10160

10261
```javascript
10362
Instabug.startWithToken('IOS_APP_TOKEN', [Instabug.invocationEvent.shake]);
10463
```
105-
3. Open `android/app/src/main/java/[...]/MainApplication.java` (You can skip this step if you are building an iOS app only)
64+
* ### Android
65+
1. Open `android/app/src/main/java/[...]/MainApplication.java`
10666
* Make sure to import the package class:
10767
`import com.instabug.reactlibrary.RNInstabugReactnativePackage;`
10868
* **For React Native >= 0.60**
@@ -143,7 +103,7 @@ Alternatively, for iOS you can use [CocoaPods](https://cocoapods.org/) for manag
143103
144104
You can find your app token by selecting the SDK tab from your [**Instabug dashboard**](https://dashboard.instabug.com/app/sdk/).
145105
146-
4. Make sure the following snippet is added to your project level `build.gradle`. This should be added automatically upon linking. If not, you can add it manually.
106+
2. Make sure the following snippet is added to your project level `build.gradle`. This should be added automatically upon linking. If not, you can add it manually.
147107
```dart
148108
allprojects {
149109
repositories {

0 commit comments

Comments
 (0)