react-native-rongim
v1.0.3
Published
## Getting started
Downloads
4
Readme
react-native-rongim
Getting started
$ npm install react-native-rongim --save
Mostly automatic installation
$ react-native link react-native-rongim
###android 补充说明
- 按照融云官网集成IMKit 的步骤,想android 中引入 融云需要的 依赖的相关module
- IMLib IMKit CallKit CallLib
- 即时音视频 需要剔除掉 IMLib 和 CallLib 中libs 目录下 除"armeabi-v7a", "arm64-v8a" 以外的架构.so
defaultConfig {
...
ndk {
abiFilters "armeabi-v7a", "arm64-v8a"
}
}
- CallLib 中修改 AndroidManifest.xml 中的相关app key
<meta-data
android:name="RONG_CLOUD_APP_KEY"
android:value="你的key" />
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-rongim
and addRNRongim.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNRongim.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.hy.rongim.RNRongimPackage;
to the imports at the top of the file - Add
new RNRongimPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-rongim' project(':react-native-rongim').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-rongim/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-rongim')
Usage
import RNRongim from 'react-native-rongim';
// TODO: What to do with the module?
RNRongim;