From 497546886fd9d776c221fd670047c0ed1d94c1c4 Mon Sep 17 00:00:00 2001 From: Sean Date: Wed, 6 Dec 2023 15:23:21 +0800 Subject: [PATCH] xj --- ios/Classes/Api/MOPAppletDelegate.m | 7 +++---- ios/Classes/MopPlugin.h | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ios/Classes/Api/MOPAppletDelegate.m b/ios/Classes/Api/MOPAppletDelegate.m index f92da4a..9245269 100644 --- a/ios/Classes/Api/MOPAppletDelegate.m +++ b/ios/Classes/Api/MOPAppletDelegate.m @@ -51,8 +51,8 @@ FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; [channel invokeMethod:@"extensionApi:getUserInfo" arguments:nil result:^(id _Nullable result) { - CFRunLoopStop(runLoop); userInfo = result; + CFRunLoopStop(runLoop); }]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ CFRunLoopStop(runLoop); @@ -68,11 +68,10 @@ FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; NSLog(@"appletInfo:didClickMoreBtnAtPath,appId=%@,path=%@,channel=%@",appletInfo.appId,path,channel); [channel invokeMethod:@"extensionApi:customCapsuleMoreButtonClick" arguments:@{@"appId": appletInfo.appId} result:^(id _Nullable result) { - CFRunLoopStop(runLoop); - if ([result isKindOfClass:[NSNumber class]]) { flag = [result boolValue]; } + CFRunLoopStop(runLoop); }]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ CFRunLoopStop(runLoop); @@ -88,11 +87,11 @@ CFRunLoopRef runLoop = CFRunLoopGetCurrent(); FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; [channel invokeMethod:@"extensionApi:getCustomMenus" arguments:@{@"appId": appletInfo.appId} result:^(id _Nullable result) { - CFRunLoopStop(runLoop); if ([result isKindOfClass:[NSArray class]]) { list = result; NSLog(@"customMenusInApplet2222:list=%@",list); } + CFRunLoopStop(runLoop); }]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ CFRunLoopStop(runLoop); diff --git a/ios/Classes/MopPlugin.h b/ios/Classes/MopPlugin.h index 62cb5f0..76c822c 100644 --- a/ios/Classes/MopPlugin.h +++ b/ios/Classes/MopPlugin.h @@ -10,6 +10,7 @@ @property FlutterMethodChannel *shareMethodChannel; @property FlutterMethodChannel *shareAppletMethodChannel; @property FlutterMethodChannel *appletMethodChannel; +@property FlutterMethodChannel *phizMethodChannel; + (instancetype) instance; @end