From 556da305a03f37226c381473d192b2b6038f0cb3 Mon Sep 17 00:00:00 2001 From: Sean Date: Mon, 17 Jun 2024 10:15:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E6=BB=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOPButtonOpenTypeDelegate.m | 34 ++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/ios/Classes/Api/MOPButtonOpenTypeDelegate.m b/ios/Classes/Api/MOPButtonOpenTypeDelegate.m index 7c38ad3..c6f3df1 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; }