phiz_2.45.7.1
Sean 2024-08-27 10:34:09 +08:00
parent adb36ce8ba
commit 000224c346
4 changed files with 16 additions and 18 deletions

View File

@ -91,6 +91,6 @@ kapt {
} }
dependencies { dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.finogeeks.lib:finapplet:2.45.5' implementation 'com.finogeeks.lib:finapplet:2.45.7'
implementation 'com.finogeeks.mop:plugins:2.45.5' implementation 'com.finogeeks.mop:plugins:2.45.7'
} }

View File

@ -44,36 +44,34 @@
} }
- (BOOL)appletInfo:(FATAppletInfo *)appletInfo didClickMoreBtnAtPath:(NSString *)path { - (BOOL)appletInfo:(FATAppletInfo *)appletInfo didClickMoreBtnAtPath:(NSString *)path {
__block BOOL flag; NSLog(@"appletInfo:didClickMoreBtnAtPath");
CFRunLoopRef runLoop = CFRunLoopGetCurrent(); __block BOOL flag = NO;
FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
[channel invokeMethod:@"extensionApi:customCapsuleMoreButtonClick" arguments:@{@"appId": appletInfo.appId} result:^(id _Nullable result) { [channel invokeMethod:@"extensionApi:customCapsuleMoreButtonClick" arguments:@{@"appId": appletInfo.appId} result:^(id _Nullable result) {
if ([result isKindOfClass:[NSNumber class]]) { if ([result isKindOfClass:[NSNumber class]]) {
flag = [result boolValue]; flag = [result boolValue];
} }
CFRunLoopStop(runLoop); CFRunLoopStop(CFRunLoopGetMain());
}]; }];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
CFRunLoopStop(runLoop); CFRunLoopStop(CFRunLoopGetMain());
}); });
CFRunLoopRun(); CFRunLoopRun();
return flag; return flag;
} }
- (NSArray<id<FATAppletMenuProtocol>> *)customMenusInApplet:(FATAppletInfo *)appletInfo atPath:(NSString *)path { - (NSArray<id<FATAppletMenuProtocol>> *)customMenusInApplet:(FATAppletInfo *)appletInfo atPath:(NSString *)path {
NSLog(@"customMenusInApplet:%@,appletInfo=%@",path,appletInfo); NSLog(@"customMenusInApplet");
__block NSArray *list; __block NSArray *list = @[];
CFRunLoopRef runLoop = CFRunLoopGetCurrent();
FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
[channel invokeMethod:@"extensionApi:getCustomMenus" arguments:@{@"appId": appletInfo.appId} result:^(id _Nullable result) { [channel invokeMethod:@"extensionApi:getCustomMenus" arguments:@{@"appId": appletInfo.appId} result:^(id _Nullable result) {
CFRunLoopStop(CFRunLoopGetMain());
if ([result isKindOfClass:[NSArray class]]) { if ([result isKindOfClass:[NSArray class]]) {
list = result; list = result;
} }
CFRunLoopStop(runLoop);
}]; }];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
CFRunLoopStop(runLoop); CFRunLoopStop(CFRunLoopGetMain());
}); });
CFRunLoopRun(); CFRunLoopRun();
@ -196,7 +194,7 @@ static NSString *scheme = @"fatae55433be2f62915";//App对应的scheme
NSString *album = [MOPTools fat_currentLanguageIsEn] ? @"Album" : @"从相册选择"; NSString *album = [MOPTools fat_currentLanguageIsEn] ? @"Album" : @"从相册选择";
UIAlertAction *chooseAlbumAction = [UIAlertAction actionWithTitle:album style:UIAlertActionStyleDefault handler:^(UIAlertAction *_Nonnull action) { UIAlertAction *chooseAlbumAction = [UIAlertAction actionWithTitle:album style:UIAlertActionStyleDefault handler:^(UIAlertAction *_Nonnull action) {
NSDictionary *params = @{@"name":@"chooseAvatarAlbum"}; NSDictionary *params = @{@"name":@"chooseAvatarAlbum"};
FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
[channel invokeMethod:@"extensionApi:chooseAvatarAlbum" arguments:params result:^(id _Nullable result) { [channel invokeMethod:@"extensionApi:chooseAvatarAlbum" arguments:params result:^(id _Nullable result) {
!bindChooseAvatar?: bindChooseAvatar(result); !bindChooseAvatar?: bindChooseAvatar(result);
@ -205,7 +203,7 @@ static NSString *scheme = @"fatae55433be2f62915";//App对应的scheme
NSString *camera = [MOPTools fat_currentLanguageIsEn] ? @"Camera" : @"拍照"; NSString *camera = [MOPTools fat_currentLanguageIsEn] ? @"Camera" : @"拍照";
UIAlertAction *photoAction = [UIAlertAction actionWithTitle:camera style:UIAlertActionStyleDefault handler:^(UIAlertAction *_Nonnull action) { UIAlertAction *photoAction = [UIAlertAction actionWithTitle:camera style:UIAlertActionStyleDefault handler:^(UIAlertAction *_Nonnull action) {
NSDictionary *params = @{@"name":@"chooseAvatarPhoto"}; NSDictionary *params = @{@"name":@"chooseAvatarPhoto"};
FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel];
[channel invokeMethod:@"extensionApi:chooseAvatarPhoto" arguments:params result:^(id _Nullable result) { [channel invokeMethod:@"extensionApi:chooseAvatarPhoto" arguments:params result:^(id _Nullable result) {
!bindChooseAvatar?: bindChooseAvatar(result); !bindChooseAvatar?: bindChooseAvatar(result);

View File

@ -21,8 +21,8 @@ A finclip miniprogram flutter sdk.
s.vendored_libraries = 'Classes/FinAppletExt/Vendor/Lame/libmp3lame.a' s.vendored_libraries = 'Classes/FinAppletExt/Vendor/Lame/libmp3lame.a'
s.static_framework = true s.static_framework = true
s.dependency 'FinApplet' , '2.45.5' s.dependency 'FinApplet' , '2.45.7'
# s.dependency 'FinAppletExt' # s.dependency 'FinAppletExt' , '2.45.7'
s.dependency 'FinAppletBLE' , '2.45.5' s.dependency 'FinAppletBLE' , '2.45.7'
end end

View File

@ -1,6 +1,6 @@
name: mop name: mop
description: A Finogeeks MiniProgram Flutter SDK. description: A Finogeeks MiniProgram Flutter SDK.
version: '2.45.5' version: '2.45.7'
homepage: https://github.com/finogeeks/mop-flutter-sdk homepage: https://github.com/finogeeks/mop-flutter-sdk
environment: environment: