From ad3e2d795200ee5c5166432d4fc9dddc6e09aa27 Mon Sep 17 00:00:00 2001 From: guoqing <guoqingkuku@163.com> Date: Thu, 6 Mar 2025 14:47:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:ios=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/lib/main.dart | 31 ++++++++++++++++--------------- example/pubspec.yaml | 2 +- ios/Classes/AliyunFacePlugin.m | 5 ++++- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 8564097..1ca5d7e 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -47,8 +47,9 @@ class _MyAppState extends State<MyApp> { try { // 璋冪敤璁よ瘉鎺ュ彛锛孋ertifyId闇€瑕佽皟鐢ㄦ湇鍔″櫒绔帴鍙h幏鍙栥€� // 姣忎釜CertifyId鍙兘浣跨敤涓€娆★紝鍚﹀垯浼氳繑鍥瀋ode: "2002(iOS), 1001(Android)"銆� - verifyResult = await _aliyunFacePlugin.verify( - "certifyId", "shad04694918b4b774a74bc7e538fc67") ?? + verifyResult = await _aliyunFacePlugin.verify({ + "certifyId": "shad04694918b4b774a74bc7e538fc67", + }) ?? '-1,error'; } on PlatformException { verifyResult = '-2,exception'; @@ -66,19 +67,19 @@ class _MyAppState extends State<MyApp> { appBar: AppBar(title: const Text('Aliyun face plugin demo')), body: Center( child: Column(children: <Widget>[ - Text('$_infos\n'), - ElevatedButton( - onPressed: () async { - getMetaInfos(); - }, - child: Text("getMetaInfos")), - ElevatedButton( - onPressed: () async { - startVerify(); - }, - child: Text("startVerify")), - ])), + Text('$_infos\n'), + ElevatedButton( + onPressed: () async { + getMetaInfos(); + }, + child: Text("getMetaInfos")), + ElevatedButton( + onPressed: () async { + startVerify(); + }, + child: Text("startVerify")), + ])), ), ); } -} \ No newline at end of file +} diff --git a/example/pubspec.yaml b/example/pubspec.yaml index b5d5baf..2413931 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -3,7 +3,7 @@ description: Demonstrates how to use the aliyun_face_plugin plugin. # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev - +version: 1.0.1+1 environment: sdk: '>=3.0.0 <4.0.0' diff --git a/ios/Classes/AliyunFacePlugin.m b/ios/Classes/AliyunFacePlugin.m index 68e4841..b7eaabe 100644 --- a/ios/Classes/AliyunFacePlugin.m +++ b/ios/Classes/AliyunFacePlugin.m @@ -45,8 +45,11 @@ NSMutableDictionary *extParams = [NSMutableDictionary new]; UIViewController *vc = [self viewControllerWithWindow:nil]; [extParams setValue:vc forKey:@"currentCtr"]; // 蹇呴』瑕佺殑鍙傛暟 + NSString *useVideo = [arguments objectForKey:@"ext_params_key_use_video"]; - if(useVideo!=nil && useVideo=="1"){ + NSLog(@"useVideo: %@.", useVideo); + + if(useVideo!=nil && [useVideo isEqual:@"1"]){ [extParams setValue:@"true" forKey:@"returnVideo"]; } -- 2.17.1