log 日志
parent
1b566ef884
commit
731d616d16
|
@ -15,15 +15,18 @@
|
|||
{
|
||||
NSLog(@"MOP_registerExtensionApi");
|
||||
FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
|
||||
[[FATClient sharedClient] registerExtensionApi:self.name handle:^(id param, FATExtensionApiCallback callback) {
|
||||
NSLog(@"invoke ExtensionApi:");
|
||||
NSLog(@"%@",self.name);
|
||||
NSLog(@"%@",param);
|
||||
[[FATClient sharedClient] registerExtensionApi:self.name handler:^(FATAppletInfo *appletInfo, id param, FATExtensionApiCallback callback) {
|
||||
NSLog(@"channel:%@---invoke ExtensionApi:%@, param:%@", channel, self.name, param);
|
||||
|
||||
NSString *invokeMessage = [NSString stringWithFormat:@"channel:[%@]---invoke ExtensionApi:[%@]", [channel description], self.name];
|
||||
[[FATClient sharedClient].toolManager addConsoleLog:invokeMessage consoleLevel:FATConsoleLevelLog appletId:appletInfo.appId completion:nil];
|
||||
|
||||
NSString *api = [@"extensionApi:" stringByAppendingString:self.name];
|
||||
[channel invokeMethod:api arguments:param result:^(id _Nullable result) {
|
||||
NSLog(@"extensionApi reslut:%@",result);
|
||||
NSString *callbackMessage = [NSString stringWithFormat:@"extensionApi [%@] callbck ",self.name];
|
||||
[[FATClient sharedClient].toolManager addConsoleLog:callbackMessage consoleLevel:FATConsoleLevelLog appletId:appletInfo.appId completion:nil];
|
||||
// 先判断是否flutter发生错误
|
||||
// BOOL isFlutterError = [result isKindOfClass:[FlutterError class]] || result == FlutterMethodNotImplemented;
|
||||
BOOL isValid = [result isKindOfClass:[NSDictionary class]];
|
||||
if (!isValid) {
|
||||
NSLog(@"extensionApi reslut is not NSDictionary");
|
||||
|
|
Loading…
Reference in New Issue