A OpenIM flutter demo, only support android and ios.
- git clone https://github.com/OpenIMSDK/Open-IM-Flutter-Demo.git
- modify the server address in config.dart
- flutter pub get
- flutter run
flutter_openim_widget [demo使用的ui库]
flutter_openim_sdk [demo使用的im库]
答:stable分支2.10.1
答:flutter的release包默认是开启了混淆,可以使用命令:flutter build release --no -shrink,如果此命令无效可如下操作
在android/build.gradle配置的release配置加入以下配置
release {
minifyEnabled false
useProguard false
shrinkResources false
}
答:在混淆规则里加入以下规则
-keep class io.openim.**{*;}
-keep class open_im_sdk.**{*;}
-keep class open_im_sdk_callback.**{*;}
答:因为Demo去掉了某些cpu架构,如果你想运行在模拟器上请按以下方式:
在android/build.gradle配置加入
ndk {
abiFilters "arm64-v8a", "armeabi-v7a", "armeabi", "x86", "x86_64"
}
答:插件依赖方式flutter_openim_sdk: ^xxx 只能运行在真机上。如果既想在模拟器上运行又想在真机上运行,可以使用以下依赖方式:
flutter_openim_sdk:
git:
url: https://github.com/OpenIMSDK/Open-IM-SDK-Flutter.git
ref: fix-ios-simulator
答:请将cup架构设置为arm64,然后依次如下操作
- flutter clean
- flutter pub get
- cd ios
- pod install
- 连接真机后运行Archive
答:11.0