diff --git a/ios/Classes/MopPlugin.m b/ios/Classes/MopPlugin.m index 4b7e617..f6678f2 100644 --- a/ios/Classes/MopPlugin.m +++ b/ios/Classes/MopPlugin.m @@ -149,6 +149,19 @@ static MopPlugin *_instance; [PhizLanguageData sharedInstance].countryCode = cCode; [PhizLanguageData sharedInstance].languageCode = cLang; } + else if ([@"getMiniShareInfo" isEqualToString:call.method]) { + NSString *appId = call.arguments[@"appId"]; + FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; + [channel invokeMethod:@"extensionApi:forwardApplet" arguments:@{@"appletInfo":contentInfo} result:^(id _Nullable result2) { + if([result2 isKindOfClass:[FlutterError class]]|| [result2 isKindOfClass:[FlutterMethodNotImplemented class] ]) + { + result(nil); + }else + { + result(result); + } + }]; + } else { MOPApiRequest* request = [[MOPApiRequest alloc] init]; request.command = call.method; diff --git a/lib/mop.dart b/lib/mop.dart index 4d6c194..f45884f 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -1323,4 +1323,9 @@ class Mop { void moveCurrentAppletToFront() async { return await _channel.invokeMethod("moveCurrentAppletToFront"); } + + ///获取分享信息 + Future getMiniShareInfo(String appId) async { + return await _channel.invokeMethod("getMiniShareInfo", {"appId": appId}); + } }