You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
551 B
20 lines
551 B
import Foundation
|
|
import OpenIMCore
|
|
|
|
public class BaseCallback: NSObject, Open_im_sdk_callbackBaseProtocol {
|
|
|
|
private let result:FlutterResult
|
|
|
|
init(result:@escaping FlutterResult) {
|
|
self.result = result
|
|
}
|
|
|
|
public func onError(_ errCode: Int32, errMsg: String?) {
|
|
print("BaseResult: " + errMsg!)
|
|
safeMainAsync { self.result(FlutterError(code: "\(errCode)", message: errMsg, details: nil)) }
|
|
}
|
|
|
|
public func onSuccess(_ data: String?) {
|
|
safeMainAsync { self.result(data) }
|
|
}
|
|
}
|
|
|