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