Skip to content

Commit a5a5f0f

Browse files
first commit
0 parents  commit a5a5f0f

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
2+
# react-native-react-native-easemob
3+
4+
## Getting started
5+
6+
`$ npm install react-native-react-native-easemob --save`
7+
8+
### Mostly automatic installation
9+
10+
`$ react-native link react-native-react-native-easemob`
11+
12+
### Manual installation
13+
14+
15+
#### iOS
16+
17+
1. In XCode, in the project navigator, right click `Libraries``Add Files to [your project's name]`
18+
2. Go to `node_modules``react-native-react-native-easemob` and add `RNReactNativeEasemob.xcodeproj`
19+
3. In XCode, in the project navigator, select your project. Add `libRNReactNativeEasemob.a` to your project's `Build Phases``Link Binary With Libraries`
20+
4. Run your project (`Cmd+R`)<
21+
22+
#### Android
23+
24+
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
25+
- Add `import com.reactlibrary.RNReactNativeEasemobPackage;` to the imports at the top of the file
26+
- Add `new RNReactNativeEasemobPackage()` to the list returned by the `getPackages()` method
27+
2. Append the following lines to `android/settings.gradle`:
28+
```
29+
include ':react-native-react-native-easemob'
30+
project(':react-native-react-native-easemob').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-react-native-easemob/android')
31+
```
32+
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
33+
```
34+
compile project(':react-native-react-native-easemob')
35+
```
36+
37+
#### Windows
38+
[Read it! :D](https://github.com/ReactWindows/react-native)
39+
40+
1. In Visual Studio add the `RNReactNativeEasemob.sln` in `node_modules/react-native-react-native-easemob/windows/RNReactNativeEasemob.sln` folder to their solution, reference from their app.
41+
2. Open up your `MainPage.cs` app
42+
- Add `using React.Native.Easemob.RNReactNativeEasemob;` to the usings at the top of the file
43+
- Add `new RNReactNativeEasemobPackage()` to the `List<IReactPackage>` returned by the `Packages` method
44+
45+
46+
## Usage
47+
```javascript
48+
import RNReactNativeEasemob from 'react-native-react-native-easemob';
49+
50+
// TODO: What to do with the module?
51+
RNReactNativeEasemob;
52+
```
53+

0 commit comments

Comments
 (0)