From 000224c34615f14a226fd6496bda692d35d15666 Mon Sep 17 00:00:00 2001 From: Sean Date: Tue, 27 Aug 2024 10:34:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/build.gradle | 4 ++-- ios/Classes/Api/MOPAppletDelegate.m | 22 ++++++++++------------ ios/mop.podspec | 6 +++--- pubspec.yaml | 2 +- 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 7158907..c681d68 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -91,6 +91,6 @@ kapt { } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.finogeeks.lib:finapplet:2.45.5' - implementation 'com.finogeeks.mop:plugins:2.45.5' + implementation 'com.finogeeks.lib:finapplet:2.45.7' + implementation 'com.finogeeks.mop:plugins:2.45.7' } \ No newline at end of file diff --git a/ios/Classes/Api/MOPAppletDelegate.m b/ios/Classes/Api/MOPAppletDelegate.m index 71f72a8..a10c35b 100644 --- a/ios/Classes/Api/MOPAppletDelegate.m +++ b/ios/Classes/Api/MOPAppletDelegate.m @@ -44,36 +44,34 @@ } - (BOOL)appletInfo:(FATAppletInfo *)appletInfo didClickMoreBtnAtPath:(NSString *)path { - __block BOOL flag; - CFRunLoopRef runLoop = CFRunLoopGetCurrent(); - + NSLog(@"appletInfo:didClickMoreBtnAtPath"); + __block BOOL flag = NO; FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; [channel invokeMethod:@"extensionApi:customCapsuleMoreButtonClick" arguments:@{@"appId": appletInfo.appId} result:^(id _Nullable result) { if ([result isKindOfClass:[NSNumber class]]) { flag = [result boolValue]; } - CFRunLoopStop(runLoop); + CFRunLoopStop(CFRunLoopGetMain()); }]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - CFRunLoopStop(runLoop); + CFRunLoopStop(CFRunLoopGetMain()); }); CFRunLoopRun(); return flag; } - (NSArray> *)customMenusInApplet:(FATAppletInfo *)appletInfo atPath:(NSString *)path { - NSLog(@"customMenusInApplet:%@,appletInfo=%@",path,appletInfo); - __block NSArray *list; - CFRunLoopRef runLoop = CFRunLoopGetCurrent(); + NSLog(@"customMenusInApplet"); + __block NSArray *list = @[]; FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; [channel invokeMethod:@"extensionApi:getCustomMenus" arguments:@{@"appId": appletInfo.appId} result:^(id _Nullable result) { + CFRunLoopStop(CFRunLoopGetMain()); if ([result isKindOfClass:[NSArray class]]) { list = result; } - CFRunLoopStop(runLoop); }]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - CFRunLoopStop(runLoop); + CFRunLoopStop(CFRunLoopGetMain()); }); CFRunLoopRun(); @@ -196,7 +194,7 @@ static NSString *scheme = @"fatae55433be2f62915";//App对应的scheme NSString *album = [MOPTools fat_currentLanguageIsEn] ? @"Album" : @"从相册选择"; UIAlertAction *chooseAlbumAction = [UIAlertAction actionWithTitle:album style:UIAlertActionStyleDefault handler:^(UIAlertAction *_Nonnull action) { NSDictionary *params = @{@"name":@"chooseAvatarAlbum"}; - + FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; [channel invokeMethod:@"extensionApi:chooseAvatarAlbum" arguments:params result:^(id _Nullable result) { !bindChooseAvatar?: bindChooseAvatar(result); @@ -205,7 +203,7 @@ static NSString *scheme = @"fatae55433be2f62915";//App对应的scheme NSString *camera = [MOPTools fat_currentLanguageIsEn] ? @"Camera" : @"拍照"; UIAlertAction *photoAction = [UIAlertAction actionWithTitle:camera style:UIAlertActionStyleDefault handler:^(UIAlertAction *_Nonnull action) { NSDictionary *params = @{@"name":@"chooseAvatarPhoto"}; - + FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; [channel invokeMethod:@"extensionApi:chooseAvatarPhoto" arguments:params result:^(id _Nullable result) { !bindChooseAvatar?: bindChooseAvatar(result); diff --git a/ios/mop.podspec b/ios/mop.podspec index e74f586..1b4c8c5 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -21,8 +21,8 @@ A finclip miniprogram flutter sdk. s.vendored_libraries = 'Classes/FinAppletExt/Vendor/Lame/libmp3lame.a' s.static_framework = true - s.dependency 'FinApplet' , '2.45.5' -# s.dependency 'FinAppletExt' - s.dependency 'FinAppletBLE' , '2.45.5' + s.dependency 'FinApplet' , '2.45.7' + # s.dependency 'FinAppletExt' , '2.45.7' + s.dependency 'FinAppletBLE' , '2.45.7' end diff --git a/pubspec.yaml b/pubspec.yaml index 49d2792..e354211 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.45.5' +version: '2.45.7' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: