From 73f3a24e5521750c37f2a2a0b1473a39b9da242b Mon Sep 17 00:00:00 2001 From: wanghualei Date: Tue, 15 Nov 2022 22:05:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89ap?= =?UTF-8?q?i=E8=BF=94=E5=9B=9E=E5=80=BC=E4=B8=8D=E6=98=AF=E5=AD=97?= =?UTF-8?q?=E5=85=B8=E7=B1=BB=E5=9E=8B=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOP_registerExtensionApi.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ios/Classes/Api/MOP_registerExtensionApi.m b/ios/Classes/Api/MOP_registerExtensionApi.m index c1dedaf..04a5d99 100644 --- a/ios/Classes/Api/MOP_registerExtensionApi.m +++ b/ios/Classes/Api/MOP_registerExtensionApi.m @@ -23,9 +23,10 @@ [channel invokeMethod:api arguments:param result:^(id _Nullable result) { NSLog(@"extensionApi reslut:%@",result); // 先判断是否flutter发生错误 - BOOL isFlutterError = [result isKindOfClass:[FlutterError class]] || result == FlutterMethodNotImplemented; - if (isFlutterError) { - NSLog(@"extensionApi reslut:fail"); +// BOOL isFlutterError = [result isKindOfClass:[FlutterError class]] || result == FlutterMethodNotImplemented; + BOOL isValid = [result isKindOfClass:[NSDictionary class]]; + if (!isValid) { + NSLog(@"extensionApi reslut is not NSDictionary"); callback(FATExtensionCodeFailure,nil); return; }