[Update]
This commit is contained in:
parent
3c5e640abf
commit
57c4f06c86
@ -52,5 +52,5 @@ android {
|
||||
dependencies {
|
||||
// 本地依赖,现将aar复制到libs/io/openim/core-sdk/0.0.1/ 下,命名core-sdk-0.0.1.aar
|
||||
// implementation 'io.openim:core-sdk:0.0.1@aar'
|
||||
implementation 'io.openim:core-sdk:3.1.0-e@aar'
|
||||
implementation 'io.openim:core-sdk:3.1.0-e-1.0.0@aar'
|
||||
}
|
@ -20,6 +20,10 @@ public class IMManager extends BaseManager {
|
||||
CommonUtil.runMainThreadReturn(result, initialized);
|
||||
}
|
||||
|
||||
public void unInitSDK(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.unInitSDK(value(methodCall, "operationID")));
|
||||
}
|
||||
|
||||
public void login(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.login(
|
||||
new OnBaseListener(result, methodCall),
|
||||
|
@ -8,6 +8,7 @@ public class IMMananger: BaseServiceManager {
|
||||
public override func registerHandlers() {
|
||||
super.registerHandlers()
|
||||
self["initSDK"] = initSDK
|
||||
self["unInitSDK"] = unInitSDK
|
||||
self["login"] = login
|
||||
self["logout"] = logout
|
||||
self["getLoginStatus"] = getLoginStatus
|
||||
@ -59,10 +60,14 @@ public class IMMananger: BaseServiceManager {
|
||||
}
|
||||
|
||||
func initSDK(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
callBack(result,Open_im_sdkInitSDK(ConnListener(channel: self.channel), methodCall[string: "operationID"], methodCall.toJsonString()))
|
||||
callBack(result, Open_im_sdkInitSDK(ConnListener(channel: self.channel), methodCall[string: "operationID"], methodCall.toJsonString()))
|
||||
addObservers()
|
||||
}
|
||||
|
||||
func unInitSDK(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
callBack(result, Open_im_sdkUnInitSDK(methodCall[string: "operationID"]))
|
||||
}
|
||||
|
||||
func login(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkLogin(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "userID"], methodCall[string: "token"])
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ A new Flutter project.
|
||||
s.dependency 'Flutter'
|
||||
s.platform = :ios, '11.0'
|
||||
|
||||
s.dependency 'OpenIMSDKCore','3.1.0-e'
|
||||
s.dependency 'OpenIMSDKCore','3.1.0-e-1.0.0'
|
||||
s.static_framework = true
|
||||
# s.vendored_frameworks = 'Framework/*.framework'
|
||||
# Flutter.framework does not contain a i386 slice.
|
||||
|
@ -490,6 +490,11 @@ class IMManager {
|
||||
));
|
||||
}
|
||||
|
||||
/// 反初始化SDK
|
||||
Future<dynamic> unInitSDK() {
|
||||
return _channel.invokeMethod('unInitSDK', _buildParam({}));
|
||||
}
|
||||
|
||||
/// 登录
|
||||
/// [userID] 用户id
|
||||
/// [token] 登录token,从业务服务器上获取
|
||||
|
Loading…
x
Reference in New Issue
Block a user