Skip to content

Commit 271d4c8

Browse files
author
Fran Montiel
committed
Add DEVELOPMENT.md
1 parent 7c255cb commit 271d4c8

1 file changed

Lines changed: 75 additions & 0 deletions

File tree

DEVELOPMENT.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Setting up the environment
2+
Install Node & Watchman using Homebrew
3+
4+
For Android, install:
5+
- Java Development Kit
6+
- Android Studio with Android SDK
7+
8+
For iOS, install:
9+
- XCode with command line tools
10+
- Cocoapods
11+
12+
Please follow the guide on https://reactnative.dev/docs/environment-setup
13+
14+
# Running the example
15+
On Android:
16+
- Open Android Studio and run an emulator
17+
- Execute the following command under the example folder: `yarn android`
18+
19+
On iOS:
20+
- Execute the following command under the example folder: `yarn ios`
21+
22+
On Web:
23+
- Please use [this private project](https://bitbucket.org/bugfender/rn-bugfender-development) and execute `yarn web`
24+
25+
## Update React Native version
26+
Try with the official react native upgrade command:
27+
```bash
28+
npx react-native upgrade
29+
```
30+
31+
If it does not work you can create a new updated library from scratch:
32+
1. Using [create-react-native-library tool] (https://reactnative.dev/docs/native-modules-setup)
33+
34+
2. Be sure to select a Native library using Java & Objective-C
35+
36+
3. Add the following lines to the `package.json` of the newly created library (be sure to use the latest version):
37+
```json
38+
"dependencies": {
39+
"@bugfender/common": "1.0.0-alpha.5",
40+
"@bugfender/sdk": "^2.1.0"
41+
}
42+
```
43+
44+
4. Add "dom" into the "lib" object on `tsconfig.json`:
45+
```json
46+
"lib": [
47+
"esnext",
48+
"dom"
49+
],
50+
```
51+
52+
5. On **android/src/build.gradle** add the following to the dependencies:
53+
```gradle
54+
implementation 'com.bugfender.sdk:android:3.+'
55+
```
56+
57+
6. Copy `RnBugfenderModule.java` and `RnBufgenerPackage.java` to **android/src/main/java/com.bugfender.react**
58+
59+
7. Add the Bugfender dependency to the podspec on the **root** folder
60+
```ruby
61+
s.dependency 'BugfenderSDK', '~> 1.10.5'
62+
```
63+
64+
8. Copy `RnBugefnder.h` && `RnBugefnder.mm` to **ios/**
65+
66+
9. Copy `App.tsx` & add `bugfenderKey.json` into **example/src/**, see `bugfenderKey.json` format below:
67+
```json
68+
{
69+
"bugfenderKey": "<your Bugfdender key>"
70+
}
71+
```
72+
73+
10. Run `pod install` under **example/ios/**
74+
75+
11. You should be ready to run the example using `yarn android` & `yarn ios`

0 commit comments

Comments
 (0)