Skip to content

Commit ec7d137

Browse files
committed
集成IM
1 parent 98c1b9f commit ec7d137

342 files changed

Lines changed: 17609 additions & 81 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,30 @@
11
# ReactNativeMobxFrame
22
快速开发RN项目
3-
### 安装运行
4-
###### React-Native "0.59.4" Android studio版本3.x Xcode最新版
5-
1. yarn install
6-
2. yarn run android or yarn run ios-xsmax
3+
4+
- 开发工具
5+
- React-Native "0.59.4"
6+
- VSCode
7+
- Android studio版本3.x
8+
- Xcode
9+
10+
### 安装运行(Android和iOS均以适配)
11+
12+
- yarn install
13+
- yarn run android or yarn run ios-xsmax
714
### 项目描述
815
#### 目前使用了3.x版本的react-navigation,实现自定义底部tab;使用mobx进行相关状态管理。
16+
17+
18+
### 加入网易云信IM功能
19+
##### 目前项目中直接使用官方demo的key,相关界面及功能也是直接引用了官方的UI,未做大规模修改。
20+
##### 在引入云信IM所需要的相关组件时,发现realm这个组件在高版本node(8以上版本)时install不成功,所以需要降低node版本来使用(对于RN 0.60及以上版本来说似乎冲突了,需要高版本node支持);在推送方面,主要是安卓端所支持的厂家不是很多,也是比较尴尬;
21+
22+
23+
##### 此前有使用过极光的IM,也存在着一些问题:主要是数据源问题,在ios端时离线消息不能及时获取到,导致数据短暂丢失(该问题暂未解决);极光的UI方面直接是引用的原生相关组件(并不是很完善,需做相关处理)
24+
25+
##### 目前RN端IM的第三方组件的维护力度不是很大,还需努力前行。
26+
27+
28+
### [安卓下载地址](http://d.6short.com/npgd)
29+
30+
![](android_download.jpg)

android/app/build.gradle

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ import com.android.build.OutputFile
7373
*/
7474

7575
project.ext.react = [
76-
entryFile: "index.js"
76+
entryFile: "index.js"
7777
]
7878

7979
apply from: "../../node_modules/react-native/react.gradle"
@@ -116,18 +116,30 @@ android {
116116
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
117117
}
118118
}
119+
120+
121+
signingConfigs {
122+
release {
123+
storeFile file(RELEASE_STORE_FILE)
124+
storePassword RELEASE_STORE_PASSWORD
125+
keyAlias RELEASE_KEY_ALIAS
126+
keyPassword RELEASE_KEY_PASSWORD
127+
}
128+
}
129+
119130
buildTypes {
120131
release {
121132
minifyEnabled enableProguardInReleaseBuilds
122133
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
134+
signingConfig signingConfigs.release
123135
}
124136
}
125137
// applicationVariants are e.g. debug, release
126138
applicationVariants.all { variant ->
127139
variant.outputs.each { output ->
128140
// For each separate APK per architecture, set a unique version code as described here:
129141
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
130-
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]
142+
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
131143
def abi = output.getFilter(OutputFile.ABI)
132144
if (abi != null) { // null for the universal-debug, universal-release variants
133145
output.versionCodeOverride =
@@ -148,6 +160,12 @@ dependencies {
148160
implementation fileTree(dir: "libs", include: ["*.jar"])
149161
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
150162
implementation "com.facebook.react:react-native:+" // From node_modules
163+
implementation project(':realm')
164+
implementation project(':react-native-audio')
165+
implementation project(':react-native-sound')
166+
implementation project(':react-native-image-picker')
167+
implementation project(':react-native-vector-icons')
168+
151169
}
152170

153171
// Run this once to be able to run the application with BUCK
47.5 MB
Binary file not shown.

android/app/release/output.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
68.7 KB
Binary file not shown.
64 KB
Binary file not shown.
13.1 KB
Binary file not shown.
56.9 KB
Binary file not shown.
162 KB
Binary file not shown.
122 KB
Binary file not shown.

0 commit comments

Comments
 (0)