增加自定义api返回值不是字典类型的判断
parent
d2262be6f1
commit
73f3a24e55
|
@ -23,9 +23,10 @@
|
||||||
[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);
|
||||||
// 先判断是否flutter发生错误
|
// 先判断是否flutter发生错误
|
||||||
BOOL isFlutterError = [result isKindOfClass:[FlutterError class]] || result == FlutterMethodNotImplemented;
|
// BOOL isFlutterError = [result isKindOfClass:[FlutterError class]] || result == FlutterMethodNotImplemented;
|
||||||
if (isFlutterError) {
|
BOOL isValid = [result isKindOfClass:[NSDictionary class]];
|
||||||
NSLog(@"extensionApi reslut:fail");
|
if (!isValid) {
|
||||||
|
NSLog(@"extensionApi reslut is not NSDictionary");
|
||||||
callback(FATExtensionCodeFailure,nil);
|
callback(FATExtensionCodeFailure,nil);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue