A OpenIM flutter demo, only support android and ios.
- git clone https://github.com/OpenIMSDK/Open-IM-Flutter-Demo.git
- 修改 config.dart文件里的服务器地址为自己搭建的服务器地址
- 运行flutter pub get
- 运行flutter run
demo里使用的ui库链接:flutter_openim_widget
demo使用的im库链接:flutter_openim_sdk
答:stable分支3.0.1
答:因为sdk的原因demo目前只能运行在android跟ios设备上
答:flutter的release包默认是开启了混淆,可以使用命令:flutter build release --no -shrink,如果此命令无效可如下操作
在android/app/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"
}
答:请将cpu架构设置为arm64,然后依次如下操作
- flutter clean
- flutter pub get
- cd ios
- pod install
- 连接真机后运行Archive
答:13.0
Could not build the precompiled application for the device.
Error (Xcode): Signing for "TOCropViewController-TOCropViewControllerBundle" requires a development team. Select a development team
in the Signing & Capabilities editor.
Error (Xcode): Signing for "DKImagePickerController-DKImagePickerController" requires a development team. Select a development team
in the Signing & Capabilities editor.
Error (Xcode): Signing for "DKPhotoGallery-DKPhotoGallery" requires a development team. Select a development team in the Signing &
Capabilities editor.
在Podfile添加以下代码:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO" end
end
end