From 615b1a3ad73509b217d503c2a59c1db4f8c64307 Mon Sep 17 00:00:00 2001 From: Sean Date: Mon, 17 Jun 2024 09:54:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=8F=E8=94=BD=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/lib/main.dart | 2 +- ios/Classes/Api/MOPButtonOpenTypeDelegate.m | 34 ++++++++++----------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 4d43812..e1afd19 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -81,7 +81,7 @@ class _MyAppState extends State { print(res); Mop.instance.registerAppletHandler(MyAppletHandler()); - // Mop.instance.registerExtensionApi('getUserProfile', getUserProfile); + Mop.instance.registerExtensionApi('getUserProfile', getUserProfile); Mop.instance.registerExtensionApi('pushNativePage', pushNativePage); diff --git a/ios/Classes/Api/MOPButtonOpenTypeDelegate.m b/ios/Classes/Api/MOPButtonOpenTypeDelegate.m index c6f3df1..7c38ad3 100644 --- a/ios/Classes/Api/MOPButtonOpenTypeDelegate.m +++ b/ios/Classes/Api/MOPButtonOpenTypeDelegate.m @@ -25,29 +25,29 @@ - (BOOL)getUserInfoWithAppletInfo:(FATAppletInfo *)appletInfo bindGetUserInfo:(void (^)(NSDictionary *result))bindGetUserInfo { - FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; - NSLog(@"getUserInfoWithAppletInfo:%@", channel); - [channel invokeMethod:@"extensionApi:getUserInfo" arguments:nil result:^(id _Nullable result) { - NSDictionary *userInfo; - if (![result isKindOfClass:[NSDictionary class]]) { - userInfo = @{@"errMsg":@"getUserInfo:fail return value format invalid"}; - } else { - userInfo = result; - } - bindGetUserInfo(userInfo); - }]; +// FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; +// NSLog(@"getUserInfoWithAppletInfo:%@", channel); +// [channel invokeMethod:@"extensionApi:getUserInfo" arguments:nil result:^(id _Nullable result) { +// NSDictionary *userInfo; +// if (![result isKindOfClass:[NSDictionary class]]) { +// userInfo = @{@"errMsg":@"getUserInfo:fail return value format invalid"}; +// } else { +// userInfo = result; +// } +// bindGetUserInfo(userInfo); +// }]; return YES; } - (BOOL)getUserProfileWithAppletInfo:(FATAppletInfo *)appletInfo bindGetUserProfile:(void (^)(NSDictionary *result))bindGetUserProfile { - FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; - [channel invokeMethod:@"extensionApi:getUserProfile" - arguments:nil - result:^(id result) { - bindGetUserProfile ? bindGetUserProfile(result) : nil; - }]; +// FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; +// [channel invokeMethod:@"extensionApi:getUserProfile" +// arguments:nil +// result:^(id result) { +// bindGetUserProfile ? bindGetUserProfile(result) : nil; +// }]; return YES; }