From a4dfe2f8e6e6e7eef931a67faf7e88e49758d0c4 Mon Sep 17 00:00:00 2001 From: Weicheng Zhu Date: Wed, 18 Aug 2021 22:10:15 +0800 Subject: [PATCH 001/107] migrate to null safe --- example/.flutter-plugins-dependencies | 2 +- example/lib/main.dart | 238 +++++++++++++------------- example/pubspec.lock | 42 ++--- example/pubspec.yaml | 2 +- example/test/widget_test.dart | 46 ++--- lib/mop.dart | 58 +++---- pubspec.lock | 38 ++-- pubspec.yaml | 4 +- 8 files changed, 215 insertions(+), 215 deletions(-) diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index 46de6ce..058679d 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-08-13 09:53:09.007824","version":"2.2.2"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/weichengzhu/dev/flutter/mop-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/weichengzhu/dev/flutter/mop-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-08-18 22:10:00.612245","version":"2.2.3"} \ No newline at end of file diff --git a/example/lib/main.dart b/example/lib/main.dart index b488f98..dd67e41 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,124 +1,124 @@ -import 'package:flutter/material.dart'; -import 'dart:async'; -import 'dart:io'; -import 'package:mop/mop.dart'; +// import 'package:flutter/material.dart'; +// import 'dart:async'; +// import 'dart:io'; +// import 'package:mop/mop.dart'; -void main() => runApp(MyApp()); +// void main() => runApp(MyApp()); -class MyApp extends StatefulWidget { - @override - _MyAppState createState() => _MyAppState(); -} +// class MyApp extends StatefulWidget { +// @override +// _MyAppState createState() => _MyAppState(); +// } -class _MyAppState extends State { - @override - void initState() { - super.initState(); - init(); - } +// class _MyAppState extends State { +// @override +// void initState() { +// super.initState(); +// init(); +// } - // Platform messages are asynchronous, so we initialize in an async method. - Future init() async { - if (Platform.isIOS) { - final res = await Mop.instance.initialize( - '22LyZEib0gLTQdU3MUauAZ0pZVbKTWGmNN6Lx8hXhIkA', '74bde5fad53a817c', - apiServer: 'https://api.finclip.com', apiPrefix: '/api/v1/mop'); - print(res); - } else if (Platform.isAndroid) { - final res = await Mop.instance.initialize( - '22LyZEib0gLTQdU3MUauAZ0pZVbKTWGmNN6Lx8hXhIkA', '74bde5fad53a817c', - apiServer: 'https://api.finclip.com', apiPrefix: '/api/v1/mop'); - print(res); - } - if (!mounted) return; - } +// // Platform messages are asynchronous, so we initialize in an async method. +// Future init() async { +// if (Platform.isIOS) { +// final res = await Mop.instance.initialize( +// '22LyZEib0gLTQdU3MUauAZ0pZVbKTWGmNN6Lx8hXhIkA', '74bde5fad53a817c', +// apiServer: 'https://api.finclip.com', apiPrefix: '/api/v1/mop'); +// print(res); +// } else if (Platform.isAndroid) { +// final res = await Mop.instance.initialize( +// '22LyZEib0gLTQdU3MUauAZ0pZVbKTWGmNN6Lx8hXhIkA', '74bde5fad53a817c', +// apiServer: 'https://api.finclip.com', apiPrefix: '/api/v1/mop'); +// print(res); +// } +// if (!mounted) return; +// } - // 5e637a18cbfae4000170fa7a - @override - Widget build(BuildContext context) { - return MaterialApp( - home: Scaffold( - appBar: AppBar( - title: const Text('凡泰极客小程序 Flutter 插件'), - ), - body: Center( - child: Container( - padding: EdgeInsets.only( - top: 20, - ), - child: Column( - children: [ - Container( - width: 140, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(5)), - gradient: LinearGradient( - colors: const [Color(0xFF12767e), Color(0xFF0dabb8)], - stops: const [0.0, 1.0], - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - ), - ), - child: FlatButton( - onPressed: () { - Mop.instance.openApplet('5ea03fa563cb900001d73863', - path: 'pages/index/index', query: ''); - }, - child: Text( - '打开画图小程序', - style: TextStyle(color: Colors.white), - ), - ), - ), - SizedBox(height: 30), - Container( - width: 140, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(5)), - gradient: LinearGradient( - colors: const [Color(0xFF12767e), Color(0xFF0dabb8)], - stops: const [0.0, 1.0], - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - ), - ), - child: FlatButton( - onPressed: () { - Mop.instance.openApplet('5ea0401463cb900001d73865'); - }, - child: Text( - '打开官方小程序', - style: TextStyle(color: Colors.white), - ), - ), - ), - SizedBox(height: 30), - Container( - width: 140, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(5)), - gradient: LinearGradient( - colors: const [Color(0xFF12767e), Color(0xFF0dabb8)], - stops: const [0.0, 1.0], - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - ), - ), - child: FlatButton( - onPressed: () { - Mop.instance.openApplet('5ea0412663cb900001d73867'); - }, - child: Text( - '我的对账单', - style: TextStyle(color: Colors.white), - ), - ), - ), - ], - ), - ), - ), - ), - ); - } -} +// // 5e637a18cbfae4000170fa7a +// @override +// Widget build(BuildContext context) { +// return MaterialApp( +// home: Scaffold( +// appBar: AppBar( +// title: const Text('凡泰极客小程序 Flutter 插件'), +// ), +// body: Center( +// child: Container( +// padding: EdgeInsets.only( +// top: 20, +// ), +// child: Column( +// children: [ +// Container( +// width: 140, +// decoration: BoxDecoration( +// borderRadius: BorderRadius.all(Radius.circular(5)), +// gradient: LinearGradient( +// colors: const [Color(0xFF12767e), Color(0xFF0dabb8)], +// stops: const [0.0, 1.0], +// begin: Alignment.topCenter, +// end: Alignment.bottomCenter, +// ), +// ), +// child: FlatButton( +// onPressed: () { +// Mop.instance.openApplet('5ea03fa563cb900001d73863', +// path: 'pages/index/index', query: ''); +// }, +// child: Text( +// '打开画图小程序', +// style: TextStyle(color: Colors.white), +// ), +// ), +// ), +// SizedBox(height: 30), +// Container( +// width: 140, +// decoration: BoxDecoration( +// borderRadius: BorderRadius.all(Radius.circular(5)), +// gradient: LinearGradient( +// colors: const [Color(0xFF12767e), Color(0xFF0dabb8)], +// stops: const [0.0, 1.0], +// begin: Alignment.topCenter, +// end: Alignment.bottomCenter, +// ), +// ), +// child: FlatButton( +// onPressed: () { +// Mop.instance.openApplet('5ea0401463cb900001d73865'); +// }, +// child: Text( +// '打开官方小程序', +// style: TextStyle(color: Colors.white), +// ), +// ), +// ), +// SizedBox(height: 30), +// Container( +// width: 140, +// decoration: BoxDecoration( +// borderRadius: BorderRadius.all(Radius.circular(5)), +// gradient: LinearGradient( +// colors: const [Color(0xFF12767e), Color(0xFF0dabb8)], +// stops: const [0.0, 1.0], +// begin: Alignment.topCenter, +// end: Alignment.bottomCenter, +// ), +// ), +// child: FlatButton( +// onPressed: () { +// Mop.instance.openApplet('5ea0412663cb900001d73867'); +// }, +// child: Text( +// '我的对账单', +// style: TextStyle(color: Colors.white), +// ), +// ), +// ), +// ], +// ), +// ), +// ), +// ), +// ); +// } +// } diff --git a/example/pubspec.lock b/example/pubspec.lock index 75c4c64..9909940 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,56 +5,56 @@ packages: dependency: transitive description: name: async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.6.1" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" characters: dependency: transitive description: name: characters - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" clock: dependency: transitive description: name: clock - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" collection: dependency: transitive description: name: collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.15.0" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.1.3" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" flutter: @@ -71,14 +71,14 @@ packages: dependency: transitive description: name: matcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.10" meta: dependency: transitive description: name: meta - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" mop: @@ -87,12 +87,12 @@ packages: path: ".." relative: true source: path - version: "2.33.5" + version: "2.33.3" path: dependency: transitive description: name: path - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0" sky_engine: @@ -104,58 +104,58 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" test_api: dependency: transitive description: name: test_api - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.3.0" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" sdks: dart: ">=2.12.0 <3.0.0" - flutter: ">=1.10.0" + flutter: ">=2.2.3" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index bd40a2d..ce89754 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -3,7 +3,7 @@ description: Demonstrates how to use the mop plugin. publish_to: 'none' environment: - sdk: '>=2.1.0 <3.0.0' + sdk: '>=2.12.0 <3.0.0' dependencies: flutter: diff --git a/example/test/widget_test.dart b/example/test/widget_test.dart index 9808a6f..e7b7478 100644 --- a/example/test/widget_test.dart +++ b/example/test/widget_test.dart @@ -1,27 +1,27 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. +// // This is a basic Flutter widget test. +// // +// // To perform an interaction with a widget in your test, use the WidgetTester +// // utility that Flutter provides. For example, you can send tap and scroll +// // gestures. You can also use WidgetTester to find child widgets in the widget +// // tree, read text, and verify that the values of widget properties are correct. -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; +// import 'package:flutter/material.dart'; +// import 'package:flutter_test/flutter_test.dart'; -import 'package:mop_example/main.dart'; +// import 'package:mop_example/main.dart'; -void main() { - testWidgets('Verify Platform version', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(MyApp()); +// void main() { +// testWidgets('Verify Platform version', (WidgetTester tester) async { +// // Build our app and trigger a frame. +// await tester.pumpWidget(MyApp()); - // Verify that platform version is retrieved. - expect( - find.byWidgetPredicate( - (Widget widget) => widget is Text && - widget.data.startsWith('Running on:'), - ), - findsOneWidget, - ); - }); -} +// // Verify that platform version is retrieved. +// expect( +// find.byWidgetPredicate( +// (Widget widget) => widget is Text && +// widget.data.startsWith('Running on:'), +// ), +// findsOneWidget, +// ); +// }); +// } diff --git a/lib/mop.dart b/lib/mop.dart index 7590e2d..feeef6d 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -11,9 +11,9 @@ typedef ExtensionApiHandler = Future Function(dynamic params); class Mop { static final Mop _instance = new Mop._internal(); - MethodChannel _channel; - EventChannel _mopEventChannel; - int eventId = 0; + late MethodChannel _channel; + late EventChannel _mopEventChannel; + late int eventId = 0; List> _mopEventQueye = >[]; Map _extensionApis = {}; @@ -22,7 +22,7 @@ class Mop { return _instance; } - Mop._internal() { + Mop._internal() { print('mop: _internal'); // init _channel = new MethodChannel('mop'); @@ -70,11 +70,11 @@ class Mop { /// [disablePermission] is optional. /// Future initialize(String appkey, String secret, - {String apiServer, - String apiPrefix, - String cryptType, - bool disablePermission, - String userId, + {required String apiServer, + required String apiPrefix, + required String cryptType, + required bool disablePermission, + required String userId, bool encryptServerData = false, bool debug = false}) async { final Map ret = await _channel.invokeMethod('initialize', { @@ -103,26 +103,26 @@ class Mop { /// [cryptType] is optional. cryptType, should be MD5/SM Future openApplet( final String appId, { - final String path, - final String query, - final int sequence, - final String apiServer, - final String apiPrefix, - final String fingerprint, - final String cryptType, - final String scene, + required final String path, + required final String query, + required final int sequence, + required final String apiServer, + required final String apiPrefix, + required final String fingerprint, + required final String cryptType, + required final String scene, }) async { Map params = {'appId': appId}; Map param = {}; - if (path != null) param["path"] = path; - if (query != null) param["query"] = query; + param["path"] = path; + param["query"] = query; if (param.length > 0) params["params"] = param; - if (sequence != null) params["sequence"] = sequence; - if (apiServer != null) params["apiServer"] = apiServer; - if (apiPrefix != null) params["apiPrefix"] = apiPrefix; - if (fingerprint != null) params["fingerprint"] = fingerprint; - if (cryptType != null) params["cryptType"] = cryptType; - if (scene != null) param["scene"] = scene; + params["sequence"] = sequence; + params["apiServer"] = apiServer; + params["apiPrefix"] = apiPrefix; + params["fingerprint"] = fingerprint; + params["cryptType"] = cryptType; + param["scene"] = scene; final Map ret = await _channel.invokeMethod('openApplet', params); return ret; } @@ -135,7 +135,7 @@ class Mop { /// Future> currentApplet() async { final ret = await _channel.invokeMapMethod("currentApplet"); - return Map.from(ret); + return Map.from(ret!); } /// @@ -160,7 +160,7 @@ class Mop { Future sdkVersion() async { return await _channel .invokeMapMethod("sdkVersion") - .then((value) => value["data"]); + .then((value) => value?["data"]); } /// @@ -178,7 +178,7 @@ class Mop { String qrCode, String apiServer) async { final ret = await _channel.invokeMapMethod("parseAppletInfoFromWXQrCode", {"qrCode": qrCode, "apiServer": apiServer}); - return Map.from(ret); + return Map.from(ret!); } /// @@ -226,7 +226,7 @@ class Mop { Future getSMSign(String plainText) async { var result = await _channel.invokeMapMethod("smsign", {'plainText': plainText}); - var data = result['data']['data']; + var data = result?['data']['data']; print(data); return data; } diff --git a/pubspec.lock b/pubspec.lock index 65b1ee6..98ff506 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,49 +5,49 @@ packages: dependency: transitive description: name: async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.6.1" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" characters: dependency: transitive description: name: characters - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" clock: dependency: transitive description: name: clock - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" collection: dependency: transitive description: name: collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.15.0" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" flutter: @@ -64,21 +64,21 @@ packages: dependency: transitive description: name: matcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.10" meta: dependency: transitive description: name: meta - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" path: dependency: transitive description: name: path - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0" sky_engine: @@ -90,58 +90,58 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" test_api: dependency: transitive description: name: test_api - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.3.0" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" sdks: dart: ">=2.12.0 <3.0.0" - flutter: ">=1.10.0" + flutter: ">=2.2.3" diff --git a/pubspec.yaml b/pubspec.yaml index 5356e25..6246efe 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,8 +4,8 @@ version: '2.33.3' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: - sdk: '>=2.1.0 <3.0.0' - flutter: '^1.10.0' + sdk: '>=2.12.0 <3.0.0' + flutter: '^2.2.3' dependencies: flutter: From e46c5238bcbc9b1d776719c4b66f30dbcbb320c8 Mon Sep 17 00:00:00 2001 From: Weicheng Zhu Date: Wed, 18 Aug 2021 22:12:50 +0800 Subject: [PATCH 002/107] migrate to null safe --- example/lib/main.dart | 238 +++++++++++++++++----------------- example/test/widget_test.dart | 46 +++---- lib/mop.dart | 38 +++--- 3 files changed, 161 insertions(+), 161 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index dd67e41..b488f98 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,124 +1,124 @@ -// import 'package:flutter/material.dart'; -// import 'dart:async'; -// import 'dart:io'; -// import 'package:mop/mop.dart'; +import 'package:flutter/material.dart'; +import 'dart:async'; +import 'dart:io'; +import 'package:mop/mop.dart'; -// void main() => runApp(MyApp()); +void main() => runApp(MyApp()); -// class MyApp extends StatefulWidget { -// @override -// _MyAppState createState() => _MyAppState(); -// } +class MyApp extends StatefulWidget { + @override + _MyAppState createState() => _MyAppState(); +} -// class _MyAppState extends State { -// @override -// void initState() { -// super.initState(); -// init(); -// } +class _MyAppState extends State { + @override + void initState() { + super.initState(); + init(); + } -// // Platform messages are asynchronous, so we initialize in an async method. -// Future init() async { -// if (Platform.isIOS) { -// final res = await Mop.instance.initialize( -// '22LyZEib0gLTQdU3MUauAZ0pZVbKTWGmNN6Lx8hXhIkA', '74bde5fad53a817c', -// apiServer: 'https://api.finclip.com', apiPrefix: '/api/v1/mop'); -// print(res); -// } else if (Platform.isAndroid) { -// final res = await Mop.instance.initialize( -// '22LyZEib0gLTQdU3MUauAZ0pZVbKTWGmNN6Lx8hXhIkA', '74bde5fad53a817c', -// apiServer: 'https://api.finclip.com', apiPrefix: '/api/v1/mop'); -// print(res); -// } -// if (!mounted) return; -// } + // Platform messages are asynchronous, so we initialize in an async method. + Future init() async { + if (Platform.isIOS) { + final res = await Mop.instance.initialize( + '22LyZEib0gLTQdU3MUauAZ0pZVbKTWGmNN6Lx8hXhIkA', '74bde5fad53a817c', + apiServer: 'https://api.finclip.com', apiPrefix: '/api/v1/mop'); + print(res); + } else if (Platform.isAndroid) { + final res = await Mop.instance.initialize( + '22LyZEib0gLTQdU3MUauAZ0pZVbKTWGmNN6Lx8hXhIkA', '74bde5fad53a817c', + apiServer: 'https://api.finclip.com', apiPrefix: '/api/v1/mop'); + print(res); + } + if (!mounted) return; + } -// // 5e637a18cbfae4000170fa7a -// @override -// Widget build(BuildContext context) { -// return MaterialApp( -// home: Scaffold( -// appBar: AppBar( -// title: const Text('凡泰极客小程序 Flutter 插件'), -// ), -// body: Center( -// child: Container( -// padding: EdgeInsets.only( -// top: 20, -// ), -// child: Column( -// children: [ -// Container( -// width: 140, -// decoration: BoxDecoration( -// borderRadius: BorderRadius.all(Radius.circular(5)), -// gradient: LinearGradient( -// colors: const [Color(0xFF12767e), Color(0xFF0dabb8)], -// stops: const [0.0, 1.0], -// begin: Alignment.topCenter, -// end: Alignment.bottomCenter, -// ), -// ), -// child: FlatButton( -// onPressed: () { -// Mop.instance.openApplet('5ea03fa563cb900001d73863', -// path: 'pages/index/index', query: ''); -// }, -// child: Text( -// '打开画图小程序', -// style: TextStyle(color: Colors.white), -// ), -// ), -// ), -// SizedBox(height: 30), -// Container( -// width: 140, -// decoration: BoxDecoration( -// borderRadius: BorderRadius.all(Radius.circular(5)), -// gradient: LinearGradient( -// colors: const [Color(0xFF12767e), Color(0xFF0dabb8)], -// stops: const [0.0, 1.0], -// begin: Alignment.topCenter, -// end: Alignment.bottomCenter, -// ), -// ), -// child: FlatButton( -// onPressed: () { -// Mop.instance.openApplet('5ea0401463cb900001d73865'); -// }, -// child: Text( -// '打开官方小程序', -// style: TextStyle(color: Colors.white), -// ), -// ), -// ), -// SizedBox(height: 30), -// Container( -// width: 140, -// decoration: BoxDecoration( -// borderRadius: BorderRadius.all(Radius.circular(5)), -// gradient: LinearGradient( -// colors: const [Color(0xFF12767e), Color(0xFF0dabb8)], -// stops: const [0.0, 1.0], -// begin: Alignment.topCenter, -// end: Alignment.bottomCenter, -// ), -// ), -// child: FlatButton( -// onPressed: () { -// Mop.instance.openApplet('5ea0412663cb900001d73867'); -// }, -// child: Text( -// '我的对账单', -// style: TextStyle(color: Colors.white), -// ), -// ), -// ), -// ], -// ), -// ), -// ), -// ), -// ); -// } -// } + // 5e637a18cbfae4000170fa7a + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar( + title: const Text('凡泰极客小程序 Flutter 插件'), + ), + body: Center( + child: Container( + padding: EdgeInsets.only( + top: 20, + ), + child: Column( + children: [ + Container( + width: 140, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(5)), + gradient: LinearGradient( + colors: const [Color(0xFF12767e), Color(0xFF0dabb8)], + stops: const [0.0, 1.0], + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + ), + ), + child: FlatButton( + onPressed: () { + Mop.instance.openApplet('5ea03fa563cb900001d73863', + path: 'pages/index/index', query: ''); + }, + child: Text( + '打开画图小程序', + style: TextStyle(color: Colors.white), + ), + ), + ), + SizedBox(height: 30), + Container( + width: 140, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(5)), + gradient: LinearGradient( + colors: const [Color(0xFF12767e), Color(0xFF0dabb8)], + stops: const [0.0, 1.0], + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + ), + ), + child: FlatButton( + onPressed: () { + Mop.instance.openApplet('5ea0401463cb900001d73865'); + }, + child: Text( + '打开官方小程序', + style: TextStyle(color: Colors.white), + ), + ), + ), + SizedBox(height: 30), + Container( + width: 140, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(5)), + gradient: LinearGradient( + colors: const [Color(0xFF12767e), Color(0xFF0dabb8)], + stops: const [0.0, 1.0], + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + ), + ), + child: FlatButton( + onPressed: () { + Mop.instance.openApplet('5ea0412663cb900001d73867'); + }, + child: Text( + '我的对账单', + style: TextStyle(color: Colors.white), + ), + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/example/test/widget_test.dart b/example/test/widget_test.dart index e7b7478..bf7d60e 100644 --- a/example/test/widget_test.dart +++ b/example/test/widget_test.dart @@ -1,27 +1,27 @@ -// // This is a basic Flutter widget test. -// // -// // To perform an interaction with a widget in your test, use the WidgetTester -// // utility that Flutter provides. For example, you can send tap and scroll -// // gestures. You can also use WidgetTester to find child widgets in the widget -// // tree, read text, and verify that the values of widget properties are correct. +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility that Flutter provides. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. -// import 'package:flutter/material.dart'; -// import 'package:flutter_test/flutter_test.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; -// import 'package:mop_example/main.dart'; +import 'package:mop_example/main.dart'; -// void main() { -// testWidgets('Verify Platform version', (WidgetTester tester) async { -// // Build our app and trigger a frame. -// await tester.pumpWidget(MyApp()); +void main() { + testWidgets('Verify Platform version', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(MyApp()); -// // Verify that platform version is retrieved. -// expect( -// find.byWidgetPredicate( -// (Widget widget) => widget is Text && -// widget.data.startsWith('Running on:'), -// ), -// findsOneWidget, -// ); -// }); -// } + // Verify that platform version is retrieved. + expect( + find.byWidgetPredicate( + (Widget widget) => widget is Text && + widget.data!.startsWith('Running on:'), + ), + findsOneWidget, + ); + }); +} diff --git a/lib/mop.dart b/lib/mop.dart index feeef6d..43aa802 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -70,11 +70,11 @@ class Mop { /// [disablePermission] is optional. /// Future initialize(String appkey, String secret, - {required String apiServer, - required String apiPrefix, - required String cryptType, - required bool disablePermission, - required String userId, + { String? apiServer, + String? apiPrefix, + String? cryptType, + bool? disablePermission, + String? userId, bool encryptServerData = false, bool debug = false}) async { final Map ret = await _channel.invokeMethod('initialize', { @@ -103,26 +103,26 @@ class Mop { /// [cryptType] is optional. cryptType, should be MD5/SM Future openApplet( final String appId, { - required final String path, - required final String query, - required final int sequence, - required final String apiServer, - required final String apiPrefix, - required final String fingerprint, - required final String cryptType, - required final String scene, + final String? path, + final String? query, + final int? sequence, + final String? apiServer, + final String? apiPrefix, + final String? fingerprint, + final String? cryptType, + final String? scene, }) async { Map params = {'appId': appId}; Map param = {}; param["path"] = path; param["query"] = query; if (param.length > 0) params["params"] = param; - params["sequence"] = sequence; - params["apiServer"] = apiServer; - params["apiPrefix"] = apiPrefix; - params["fingerprint"] = fingerprint; - params["cryptType"] = cryptType; - param["scene"] = scene; + if (sequence != null) params["sequence"] = sequence; + if (apiServer != null) params["apiServer"] = apiServer; + if (apiPrefix != null) params["apiPrefix"] = apiPrefix; + if (fingerprint != null) params["fingerprint"] = fingerprint; + if (cryptType != null) params["cryptType"] = cryptType; + if (scene != null) param["scene"] = scene; final Map ret = await _channel.invokeMethod('openApplet', params); return ret; } From 8912c892c1213aa2c9fdd144b0067280f26bd473 Mon Sep 17 00:00:00 2001 From: Weicheng Zhu Date: Wed, 18 Aug 2021 22:19:26 +0800 Subject: [PATCH 003/107] Update mop.dart --- lib/mop.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mop.dart b/lib/mop.dart index 43aa802..537046b 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -193,9 +193,9 @@ class Mop { return handler.getUserInfo(); }; _extensionApis["getCustomMenus"] = (params) async { - final res = await handler.getCustomMenus(params["appId"]); + final res = await handler.getCustomMenus(params["appId"]); List> list = []; - res?.forEach((element) { + res.forEach((element) { Map map = Map(); map["menuId"] = element.menuId; map["image"] = element.image; From 202e566557e9d0a2e3fb6bb54608182e1b5833bd Mon Sep 17 00:00:00 2001 From: Weicheng Zhu Date: Wed, 18 Aug 2021 22:27:20 +0800 Subject: [PATCH 004/107] Update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 33fb9e9..c98aa24 100644 --- a/README.md +++ b/README.md @@ -263,4 +263,9 @@ module.exports = { } ] } -``` \ No newline at end of file +``` + +## Debug +```text +ENABLE_BITCODE false +``` From 621f1cfaf0fa1d4ec13ae3dff048f229023cca90 Mon Sep 17 00:00:00 2001 From: Weicheng Zhu Date: Wed, 18 Aug 2021 22:28:20 +0800 Subject: [PATCH 005/107] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c98aa24..bd4e131 100644 --- a/README.md +++ b/README.md @@ -267,5 +267,6 @@ module.exports = { ## Debug ```text +## for ios ENABLE_BITCODE false ``` From b542f701c07ee3f2081632fac0eaf1d61855a0b2 Mon Sep 17 00:00:00 2001 From: hydrz Date: Sun, 10 Oct 2021 23:50:23 +0800 Subject: [PATCH 006/107] android embedding v2 --- .gitignore | 17 +- android/.classpath | 6 + .../org.eclipse.buildship.core.prefs | 13 ++ android/build.gradle | 53 ++---- android/build.gradle.tpl | 96 ---------- android/gradle.properties | 4 +- android/gradle/wrapper/gradle-wrapper.jar | Bin 53636 -> 0 bytes .../gradle/wrapper/gradle-wrapper.properties | 2 +- android/gradlew | 160 ---------------- android/gradlew.bat | 90 --------- .../com/finogeeks/mop/MopEventStream.java | 15 +- .../java/com/finogeeks/mop/MopPlugin.java | 177 ++++++++++++------ .../com/finogeeks/mop/MopPluginDelegate.java | 14 +- example/.flutter-plugins-dependencies | 2 +- example/.gitignore | 53 ++---- example/.metadata | 2 +- example/analysis_options.yaml | 29 +++ example/android/.gitignore | 13 ++ example/android/.project | 28 +++ .../org.eclipse.buildship.core.prefs | 13 ++ example/android/app/.classpath | 6 + example/android/app/.project | 34 ++++ .../org.eclipse.buildship.core.prefs | 2 + example/android/app/build.gradle | 26 +-- .../com/finogeeks/mop_example/Manifest.java | 7 - .../gen/com/finogeeks/mop_example/R.java | 7 - .../android/app/src/main/AndroidManifest.xml | 38 ++-- .../com/finogeeks/mop_example/Manifest.java | 7 - .../main/gen/com/finogeeks/mop_example/R.java | 7 - .../finogeeks/mop_example/MainActivity.java | 12 +- .../res/drawable-v21/launch_background.xml | 12 ++ .../app/src/main/res/values-night/styles.xml | 18 ++ .../app/src/main/res/values/styles.xml | 12 +- example/android/build.gradle | 10 +- example/android/gradle.properties | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- example/android/proguard-android.txt | 0 example/android/proguard-rules.pro | 5 - example/android/settings.gradle | 18 +- example/ios/.gitignore | 33 ++++ example/ios/Flutter/.last_build_id | 1 - example/ios/Flutter/AppFrameworkInfo.plist | 4 +- example/ios/Flutter/Debug.xcconfig | 1 - example/ios/Flutter/Flutter.podspec | 18 -- example/ios/Flutter/Release.xcconfig | 1 - example/ios/Podfile | 75 -------- example/ios/Podfile.lock | 3 - example/ios/Runner.xcodeproj/project.pbxproj | 139 +++----------- .../contents.xcworkspacedata | 2 +- .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../contents.xcworkspacedata | 3 - .../xcshareddata/WorkspaceSettings.xcsettings | 8 + example/ios/Runner/AppDelegate.h | 6 - example/ios/Runner/AppDelegate.m | 13 -- example/ios/Runner/AppDelegate.swift | 13 ++ example/ios/Runner/Info.plist | 4 +- example/ios/Runner/Runner-Bridging-Header.h | 1 + example/ios/Runner/main.m | 9 - example/lib/main.dart | 17 +- example/pubspec.lock | 75 +++++--- example/pubspec.yaml | 41 +++- example/test/widget_test.dart | 3 +- lib/api.dart | 8 +- lib/mop.dart | 84 ++++----- pubspec.lock | 67 ++++--- pubspec.yaml | 8 +- test/mop_test.dart | 2 + 67 files changed, 677 insertions(+), 986 deletions(-) create mode 100644 android/.classpath create mode 100644 android/.settings/org.eclipse.buildship.core.prefs delete mode 100644 android/build.gradle.tpl delete mode 100644 android/gradle/wrapper/gradle-wrapper.jar delete mode 100755 android/gradlew delete mode 100644 android/gradlew.bat create mode 100644 example/analysis_options.yaml create mode 100644 example/android/.gitignore create mode 100644 example/android/.project create mode 100644 example/android/.settings/org.eclipse.buildship.core.prefs create mode 100644 example/android/app/.classpath create mode 100644 example/android/app/.project create mode 100644 example/android/app/.settings/org.eclipse.buildship.core.prefs delete mode 100644 example/android/app/src/debug/gen/com/finogeeks/mop_example/Manifest.java delete mode 100644 example/android/app/src/debug/gen/com/finogeeks/mop_example/R.java delete mode 100644 example/android/app/src/main/gen/com/finogeeks/mop_example/Manifest.java delete mode 100644 example/android/app/src/main/gen/com/finogeeks/mop_example/R.java create mode 100644 example/android/app/src/main/res/drawable-v21/launch_background.xml create mode 100644 example/android/app/src/main/res/values-night/styles.xml delete mode 100644 example/android/proguard-android.txt delete mode 100644 example/android/proguard-rules.pro create mode 100644 example/ios/.gitignore delete mode 100644 example/ios/Flutter/.last_build_id delete mode 100644 example/ios/Flutter/Flutter.podspec delete mode 100644 example/ios/Podfile delete mode 100644 example/ios/Podfile.lock create mode 100644 example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings delete mode 100644 example/ios/Runner/AppDelegate.h delete mode 100644 example/ios/Runner/AppDelegate.m create mode 100644 example/ios/Runner/AppDelegate.swift create mode 100644 example/ios/Runner/Runner-Bridging-Header.h delete mode 100644 example/ios/Runner/main.m diff --git a/.gitignore b/.gitignore index e78390d..5cedef4 100644 --- a/.gitignore +++ b/.gitignore @@ -5,13 +5,9 @@ .packages .pub/ -build/ -# See https://www.dartlang.org/guides/libraries/private-files - # Files and directories created by pub .dart_tool/ .packages -build/ # If you're building an application, you may want to check-in your pubspec.lock pubspec.lock @@ -27,3 +23,16 @@ doc/api/ *.js_ *.js.deps *.js.map + +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures + + +android/bin/ +android/.project diff --git a/android/.classpath b/android/.classpath new file mode 100644 index 0000000..4a04201 --- /dev/null +++ b/android/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/android/.settings/org.eclipse.buildship.core.prefs b/android/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..1755e36 --- /dev/null +++ b/android/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,13 @@ +arguments= +auto.sync=false +build.scans.enabled=false +connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(7.0-rc-1)) +connection.project.dir= +eclipse.preferences.version=1 +gradle.user.home= +java.home=C\:/Program Files/Eclipse Foundation/jdk-11.0.12.7-hotspot +jvm.arguments= +offline.mode=false +override.workspace.settings=true +show.console.view=true +show.executions.view=true diff --git a/android/build.gradle b/android/build.gradle index c10705d..0a44504 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,39 +1,14 @@ - -apply plugin: 'com.android.library' - -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-kapt' -apply plugin: 'kotlin-android-extensions' - group 'com.finogeeks.mop' version '1.0' buildscript { repositories { google() - jcenter() - maven { - url "https://gradle.finogeeks.club/repository/finogeeks/" - credentials { - username "finclip" - password "Abcd@@1234" - } - } - maven { - url "https://gradle.finogeeks.club/repository/applet/" - credentials { - username "finclip" - password "Abcd@@1234" - } - } - maven { url "https://jitpack.io" } - + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61" - + classpath 'com.android.tools.build:gradle:4.1.0' } } @@ -60,14 +35,20 @@ rootProject.allprojects { } } +apply plugin: 'com.android.library' android { compileSdkVersion 28 + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + defaultConfig { minSdkVersion 21 - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } + buildTypes { release { minifyEnabled false @@ -75,22 +56,10 @@ android { } } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - lintOptions { - disable 'InvalidPackage' - } } -kapt { - arguments { - arg("moduleName", project.getName()) - } -} dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.finogeeks.lib:finapplet:2.34.1' - implementation 'com.finogeeks.mop:plugins:2.34.1' + implementation 'com.finogeeks.lib:finapplet:+' + implementation 'com.finogeeks.mop:plugins:+' } \ No newline at end of file diff --git a/android/build.gradle.tpl b/android/build.gradle.tpl deleted file mode 100644 index 3334d92..0000000 --- a/android/build.gradle.tpl +++ /dev/null @@ -1,96 +0,0 @@ - -apply plugin: 'com.android.library' - -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-kapt' -apply plugin: 'kotlin-android-extensions' - -group 'com.finogeeks.mop' -version '1.0' - -buildscript { - repositories { - google() - jcenter() - maven { - url "https://gradle.finogeeks.club/repository/finogeeks/" - credentials { - username "finclip" - password "Abcd@@1234" - } - } - maven { - url "https://gradle.finogeeks.club/repository/applet/" - credentials { - username "finclip" - password "Abcd@@1234" - } - } - maven { url "https://jitpack.io" } - - } - - dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61" - - } -} - -rootProject.allprojects { - repositories { - google() - jcenter() - maven { - url "https://gradle.finogeeks.club/repository/finogeeks/" - credentials { - username "finclip" - password "Abcd@@1234" - } - } - maven { - url "https://gradle.finogeeks.club/repository/applet/" - credentials { - username "finclip" - password "Abcd@@1234" - } - } - maven { url "https://jitpack.io" } - - } -} - - -android { - compileSdkVersion 28 - - defaultConfig { - minSdkVersion 21 - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - lintOptions { - disable 'InvalidPackage' - } -} - -kapt { - arguments { - arg("moduleName", project.getName()) - } -} -dependencies { - implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.finogeeks.lib:finapplet:__finapplet_version__' - implementation 'com.finogeeks.mop:plugins:__finapplet_version__' -} \ No newline at end of file diff --git a/android/gradle.properties b/android/gradle.properties index 1441b1d..94adc3a 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,3 +1,3 @@ org.gradle.jvmargs=-Xmx1536M - -android.enableR8=true +android.useAndroidX=true +android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 13372aef5e24af05341d49695ee84e5f9b594659..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 53636 zcmafaW0a=B^559DjdyHo$F^PVt zzd|cWgMz^T0YO0lQ8%TE1O06v|NZl~LH{LLQ58WtNjWhFP#}eWVO&eiP!jmdp!%24 z{&z-MK{-h=QDqf+S+Pgi=_wg$I{F28X*%lJ>A7Yl#$}fMhymMu?R9TEB?#6@|Q^e^AHhxcRL$z1gsc`-Q`3j+eYAd<4@z^{+?JM8bmu zSVlrVZ5-)SzLn&LU9GhXYG{{I+u(+6ES+tAtQUanYC0^6kWkks8cG;C&r1KGs)Cq}WZSd3k1c?lkzwLySimkP5z)T2Ox3pNs;PdQ=8JPDkT7#0L!cV? zzn${PZs;o7UjcCVd&DCDpFJvjI=h(KDmdByJuDYXQ|G@u4^Kf?7YkE67fWM97kj6F z973tGtv!k$k{<>jd~D&c(x5hVbJa`bILdy(00%lY5}HZ2N>)a|))3UZ&fUa5@uB`H z+LrYm@~t?g`9~@dFzW5l>=p0hG%rv0>(S}jEzqQg6-jImG%Pr%HPtqIV_Ym6yRydW z4L+)NhcyYp*g#vLH{1lK-hQQSScfvNiNx|?nSn-?cc8}-9~Z_0oxlr~(b^EiD`Mx< zlOLK)MH?nl4dD|hx!jBCIku-lI(&v~bCU#!L7d0{)h z;k4y^X+=#XarKzK*)lv0d6?kE1< zmCG^yDYrSwrKIn04tG)>>10%+ zEKzs$S*Zrl+GeE55f)QjY$ zD5hi~J17k;4VSF_`{lPFwf^Qroqg%kqM+Pdn%h#oOPIsOIwu?JR717atg~!)*CgXk zERAW?c}(66rnI+LqM^l7BW|9dH~5g1(_w$;+AAzSY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per/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index d757f3d..3c9d085 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/android/gradlew b/android/gradlew deleted file mode 100755 index 9d82f78..0000000 --- a/android/gradlew +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/android/gradlew.bat b/android/gradlew.bat deleted file mode 100644 index aec9973..0000000 --- a/android/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/android/src/main/java/com/finogeeks/mop/MopEventStream.java b/android/src/main/java/com/finogeeks/mop/MopEventStream.java index baed58d..42c9a29 100644 --- a/android/src/main/java/com/finogeeks/mop/MopEventStream.java +++ b/android/src/main/java/com/finogeeks/mop/MopEventStream.java @@ -5,9 +5,9 @@ import java.util.Map; import io.flutter.plugin.common.EventChannel; - -public class MopEventStream implements EventChannel.StreamHandler { +public class MopEventStream implements EventChannel.StreamHandler { EventChannel.EventSink mEventSlink; + @Override public void onListen(Object o, EventChannel.EventSink eventSink) { mEventSlink = eventSink; @@ -17,12 +17,13 @@ public class MopEventStream implements EventChannel.StreamHandler { public void onCancel(Object o) { mEventSlink = null; } - public void send(String channel,String event,Object body) { + + public void send(String channel, String event, Object body) { if (mEventSlink != null) { - Map map = new HashMap<>(); - map.put("channel",channel); - map.put("event",event); - map.put("body",body); + Map map = new HashMap<>(); + map.put("channel", channel); + map.put("event", event); + map.put("body", body); mEventSlink.success(map); } } diff --git a/android/src/main/java/com/finogeeks/mop/MopPlugin.java b/android/src/main/java/com/finogeeks/mop/MopPlugin.java index 0740f8c..75a9ce4 100644 --- a/android/src/main/java/com/finogeeks/mop/MopPlugin.java +++ b/android/src/main/java/com/finogeeks/mop/MopPlugin.java @@ -1,7 +1,9 @@ package com.finogeeks.mop; +import android.app.Activity; import android.content.Intent; import android.util.Log; +import androidx.lifecycle.Lifecycle; import com.finogeeks.mop.interfaces.Event; import com.finogeeks.mop.interfaces.FlutterInterface; @@ -11,6 +13,10 @@ import com.finogeeks.mop.service.MopPluginService; import java.util.HashMap; import java.util.Map; +import io.flutter.embedding.engine.plugins.FlutterPlugin; +import io.flutter.embedding.engine.plugins.activity.ActivityAware; +import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding; +import io.flutter.embedding.engine.plugins.lifecycle.FlutterLifecycleAdapter; import io.flutter.plugin.common.EventChannel; import io.flutter.plugin.common.MethodCall; import io.flutter.plugin.common.MethodChannel; @@ -22,78 +28,125 @@ import io.flutter.plugin.common.PluginRegistry.Registrar; /** * MopPlugin */ -public class MopPlugin implements MethodCallHandler { - private static final String LOG_TAG = MopPlugin.class.getSimpleName(); +public class MopPlugin implements FlutterPlugin, MethodCallHandler, ActivityAware { + private static final String LOG_TAG = MopPlugin.class.getSimpleName(); - private static final String CHANNEL = "mop"; - private PluginRegistry.Registrar registrar; - private FlutterInterface flutterInterface; - private MopPluginDelegate delegate; + private static final String CHANNEL = "mop"; + private static final String EVENT_CHANNEL = "plugins.mop.finogeeks.com/mop_event"; + private final FlutterInterface flutterInterface = new FlutterInterface(); + private final MopPluginDelegate delegate = new MopPluginDelegate(); + private final MopEventStream mopEventStream = new MopEventStream(); - /** - * Plugin registration. - */ - public static void registerWith(Registrar registrar) { - final MethodChannel channel = new MethodChannel(registrar.messenger(), CHANNEL); - final MopPluginDelegate delegate = new MopPluginDelegate(registrar.activity()); - final MopPlugin instance = new MopPlugin(registrar, delegate); - channel.setMethodCallHandler(instance); - final EventChannel eventChannel = new EventChannel(registrar.messenger(), "plugins.mop.finogeeks.com/mop_event"); - MopEventStream mopEventStream = new MopEventStream(); - eventChannel.setStreamHandler(mopEventStream); - MopPluginService.getInstance().initialize(registrar.activity(), mopEventStream, channel); + // These are null when not using v2 embedding. + private FlutterPluginBinding flutterPluginBinding; + private MethodChannel channel; + private EventChannel eventChannel; + private Lifecycle lifecycle; - } + /** + * Plugin registration. + */ + @SuppressWarnings("deprecation") + public static void registerWith(Registrar registrar) { + MethodChannel channel = new MethodChannel(registrar.messenger(), CHANNEL); + MopPluginDelegate delegate = new MopPluginDelegate(); + final MopPlugin plugin = new MopPlugin(); + channel.setMethodCallHandler(plugin); + registrar.addActivityResultListener(delegate); - MopPlugin(PluginRegistry.Registrar registrar, MopPluginDelegate delegate) { - this.registrar = registrar; - this.flutterInterface = new FlutterInterface(); - this.delegate = delegate; - } + EventChannel eventChannel = new EventChannel(registrar.messenger(), EVENT_CHANNEL); + final MopEventStream mopEventStream = new MopEventStream(); + eventChannel.setStreamHandler(mopEventStream); + MopPluginService.getInstance().initialize(registrar.activity(), mopEventStream, channel); + } - @Override - public void onMethodCall(MethodCall call, final Result result) { - registrar.addActivityResultListener(delegate); - ICallback callback = new ICallback() { - @Override - public void onSuccess(Object data) { - Map obj = new HashMap(); + @Override + public void onMethodCall(MethodCall call, final Result result) { + ICallback callback = new ICallback() { + @Override + public void onSuccess(Object data) { + Map obj = new HashMap(); - obj.put("success", true); - if (data != null) - obj.put("data", data); - obj.put("retMsg", "ok"); - result.success(obj); - } + obj.put("success", true); + if (data != null) + obj.put("data", data); + obj.put("retMsg", "ok"); + result.success(obj); + } - @Override - public void onFail(Object error) { - Map obj = new HashMap(); - obj.put("success", false); - obj.put("retMsg", error == null ? "" : error); - result.success(obj); - } + @Override + public void onFail(Object error) { + Map obj = new HashMap(); + obj.put("success", false); + obj.put("retMsg", error == null ? "" : error); + result.success(obj); + } - @Override - public void onCancel(Object cancel) { - result.notImplemented(); - } + @Override + public void onCancel(Object cancel) { + result.notImplemented(); + } - @Override - public void startActivityForResult(Intent intent, int requestCode) { + @Override + public void startActivityForResult(Intent intent, int requestCode) { - } - }; - Log.d(LOG_TAG, "mopplugin: invoke " + call.method); - Event event = new Event(call.method, call.arguments, callback); - delegate.setEvent(event); - this.flutterInterface.invokeHandler(event); -// if (call.method.equals("getPlatformVersion")) { -// result.success("Android " + android.os.Build.VERSION.RELEASE); -// } else { -// result.notImplemented(); -// } - } + } + }; + Log.d(LOG_TAG, "mopplugin: invoke " + call.method); + Event event = new Event(call.method, call.arguments, callback); + delegate.setEvent(event); + this.flutterInterface.invokeHandler(event); + // if (call.method.equals("getPlatformVersion")) { + // result.success("Android " + android.os.Build.VERSION.RELEASE); + // } else { + // result.notImplemented(); + // } + } + @Override + public void onAttachedToEngine(FlutterPluginBinding binding) { + this.flutterPluginBinding = binding; + channel = new MethodChannel(binding.getFlutterEngine().getDartExecutor(), CHANNEL); + channel.setMethodCallHandler(this); + EventChannel eventChannel = new EventChannel(binding.getFlutterEngine().getDartExecutor(), EVENT_CHANNEL); + eventChannel.setStreamHandler(mopEventStream); + } + + @Override + public void onDetachedFromEngine(FlutterPluginBinding binding) { + this.flutterPluginBinding = null; + } + + @Override + public void onAttachedToActivity(ActivityPluginBinding binding) { + binding.addActivityResultListener(delegate); + lifecycle = FlutterLifecycleAdapter.getActivityLifecycle(binding); + setServicesFromActivity(binding.getActivity()); + channel.setMethodCallHandler(this); + } + + @Override + public void onDetachedFromActivityForConfigChanges() { + lifecycle = null; + } + + @Override + public void onReattachedToActivityForConfigChanges(ActivityPluginBinding binding) { + binding.addActivityResultListener(delegate); + lifecycle = FlutterLifecycleAdapter.getActivityLifecycle(binding); + setServicesFromActivity(binding.getActivity()); + } + + @Override + public void onDetachedFromActivity() { + lifecycle = null; + channel.setMethodCallHandler(null); + } + + private void setServicesFromActivity(Activity activity) { + if (activity == null) + return; + MopPluginService.getInstance().initialize(activity, mopEventStream, channel); + } } diff --git a/android/src/main/java/com/finogeeks/mop/MopPluginDelegate.java b/android/src/main/java/com/finogeeks/mop/MopPluginDelegate.java index 23ec9a3..e953059 100644 --- a/android/src/main/java/com/finogeeks/mop/MopPluginDelegate.java +++ b/android/src/main/java/com/finogeeks/mop/MopPluginDelegate.java @@ -9,11 +9,8 @@ import com.finogeeks.mop.service.MopPluginService; import io.flutter.plugin.common.PluginRegistry; - public class MopPluginDelegate implements PluginRegistry.ActivityResultListener { - private Event mEvent; - private final Activity activity; public Event getEvent() { return mEvent; @@ -23,16 +20,11 @@ public class MopPluginDelegate implements PluginRegistry.ActivityResultListener this.mEvent = event; } - public MopPluginDelegate(final Activity activity) { - this.activity = activity; - - } @Override public boolean onActivityResult(int requestCode, int resultCode, Intent data) { - if (requestCode == Constants.REQUEST_CODE_CHOOSE - || requestCode == Constants.REQUEST_CODE_LOCATION_CHOOSE - ) { - MopPluginService.getInstance().getApisManager().getApiInstance(mEvent).onActivityResult(requestCode, resultCode, data, mEvent.getCallback()); + if (requestCode == Constants.REQUEST_CODE_CHOOSE || requestCode == Constants.REQUEST_CODE_LOCATION_CHOOSE) { + MopPluginService.getInstance().getApisManager().getApiInstance(mEvent).onActivityResult(requestCode, + resultCode, data, mEvent.getCallback()); } return true; } diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index 7d3d40b..11fa0fe 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-09-10 20:41:42.050199","version":"2.2.2"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"D:\\\\workspace\\\\mop-flutter-sdk\\\\","dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"C:\\\\Others\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-2.0.3\\\\","dependencies":[]},{"name":"mop","path":"D:\\\\workspace\\\\mop-flutter-sdk\\\\","dependencies":["flutter_plugin_android_lifecycle"]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"mop","dependencies":["flutter_plugin_android_lifecycle"]}],"date_created":"2021-10-10 23:31:08.079920","version":"2.5.1"} \ No newline at end of file diff --git a/example/.gitignore b/example/.gitignore index 2ddde2a..0fa6b67 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -22,52 +22,25 @@ # Flutter/Dart/Pub related **/doc/api/ +**/ios/Flutter/.last_build_id .dart_tool/ .flutter-plugins +.flutter-plugins-dependencies .packages .pub-cache/ .pub/ /build/ -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/**/GeneratedPluginRegistrant.java +# Web related +lib/generated_plugin_registrant.dart -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/Flutter/flutter_export_environment.sh -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* +# Symbolication related +app.*.symbols -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/example/.metadata b/example/.metadata index 386075d..0f055bf 100644 --- a/example/.metadata +++ b/example/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: 1aedbb1835bd6eb44550293d57d4d124f19901f0 + revision: ffb2ecea5223acdd139a5039be2f9c796962833d channel: stable project_type: app diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml new file mode 100644 index 0000000..61b6c4d --- /dev/null +++ b/example/analysis_options.yaml @@ -0,0 +1,29 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at + # https://dart-lang.github.io/linter/lints/index.html. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/example/android/.gitignore b/example/android/.gitignore new file mode 100644 index 0000000..6f56801 --- /dev/null +++ b/example/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/example/android/.project b/example/android/.project new file mode 100644 index 0000000..b87df96 --- /dev/null +++ b/example/android/.project @@ -0,0 +1,28 @@ + + + android + Project android created by Buildship. + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.buildship.core.gradleprojectnature + + + + 1633860434667 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/example/android/.settings/org.eclipse.buildship.core.prefs b/example/android/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..a1eaa33 --- /dev/null +++ b/example/android/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,13 @@ +arguments= +auto.sync=false +build.scans.enabled=false +connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) +connection.project.dir= +eclipse.preferences.version=1 +gradle.user.home= +java.home=C\:/Program Files/Eclipse Foundation/jdk-11.0.12.7-hotspot +jvm.arguments= +offline.mode=false +override.workspace.settings=true +show.console.view=true +show.executions.view=true diff --git a/example/android/app/.classpath b/example/android/app/.classpath new file mode 100644 index 0000000..4a04201 --- /dev/null +++ b/example/android/app/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/example/android/app/.project b/example/android/app/.project new file mode 100644 index 0000000..1f8babd --- /dev/null +++ b/example/android/app/.project @@ -0,0 +1,34 @@ + + + app + Project app created by Buildship. + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectnature + + + + 1633860434672 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/example/android/app/.settings/org.eclipse.buildship.core.prefs b/example/android/app/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..b1886ad --- /dev/null +++ b/example/android/app/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +connection.project.dir=.. +eclipse.preferences.version=1 diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 8b1ae42..d6d0a81 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -25,20 +25,20 @@ apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 28 + compileSdkVersion 30 - lintOptions { - disable 'InvalidPackage' + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.finogeeks.mopexample" + applicationId "com.finogeeks.mop_example" minSdkVersion 21 - targetSdkVersion 28 + targetSdkVersion 30 versionCode flutterVersionCode.toInteger() versionName flutterVersionName - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { @@ -48,22 +48,8 @@ android { signingConfig signingConfigs.debug } } - - packagingOptions { - // libsdkcore.so是被加固过的,不能被压缩,否则加载动态库时会报错 - doNotStrip "*/x86/libsdkcore.so" - doNotStrip "*/x86_64/libsdkcore.so" - doNotStrip "*/armeabi-v7a/libsdkcore.so" - doNotStrip "*/arm64-v8a/libsdkcore.so" - } } flutter { source '../..' } - -dependencies { - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test:runner:1.1.0' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' -} \ No newline at end of file diff --git a/example/android/app/src/debug/gen/com/finogeeks/mop_example/Manifest.java b/example/android/app/src/debug/gen/com/finogeeks/mop_example/Manifest.java deleted file mode 100644 index 59184ce..0000000 --- a/example/android/app/src/debug/gen/com/finogeeks/mop_example/Manifest.java +++ /dev/null @@ -1,7 +0,0 @@ -/*___Generated_by_IDEA___*/ - -package com.finogeeks.mop_example; - -/* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */ -public final class Manifest { -} \ No newline at end of file diff --git a/example/android/app/src/debug/gen/com/finogeeks/mop_example/R.java b/example/android/app/src/debug/gen/com/finogeeks/mop_example/R.java deleted file mode 100644 index 928e6be..0000000 --- a/example/android/app/src/debug/gen/com/finogeeks/mop_example/R.java +++ /dev/null @@ -1,7 +0,0 @@ -/*___Generated_by_IDEA___*/ - -package com.finogeeks.mop_example; - -/* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */ -public final class R { -} \ No newline at end of file diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index f44f8ea..77c19dc 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -1,33 +1,41 @@ - - - - + + android:name="io.flutter.embedding.android.NormalTheme" + android:resource="@style/NormalTheme" + /> + + + + diff --git a/example/android/app/src/main/gen/com/finogeeks/mop_example/Manifest.java b/example/android/app/src/main/gen/com/finogeeks/mop_example/Manifest.java deleted file mode 100644 index 59184ce..0000000 --- a/example/android/app/src/main/gen/com/finogeeks/mop_example/Manifest.java +++ /dev/null @@ -1,7 +0,0 @@ -/*___Generated_by_IDEA___*/ - -package com.finogeeks.mop_example; - -/* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */ -public final class Manifest { -} \ No newline at end of file diff --git a/example/android/app/src/main/gen/com/finogeeks/mop_example/R.java b/example/android/app/src/main/gen/com/finogeeks/mop_example/R.java deleted file mode 100644 index 928e6be..0000000 --- a/example/android/app/src/main/gen/com/finogeeks/mop_example/R.java +++ /dev/null @@ -1,7 +0,0 @@ -/*___Generated_by_IDEA___*/ - -package com.finogeeks.mop_example; - -/* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */ -public final class R { -} \ No newline at end of file diff --git a/example/android/app/src/main/java/com/finogeeks/mop_example/MainActivity.java b/example/android/app/src/main/java/com/finogeeks/mop_example/MainActivity.java index 55673ec..7260a2c 100644 --- a/example/android/app/src/main/java/com/finogeeks/mop_example/MainActivity.java +++ b/example/android/app/src/main/java/com/finogeeks/mop_example/MainActivity.java @@ -1,16 +1,6 @@ package com.finogeeks.mop_example; -import android.os.Bundle; - -import io.flutter.app.FlutterActivity; -import io.flutter.plugins.GeneratedPluginRegistrant; +import io.flutter.embedding.android.FlutterActivity; public class MainActivity extends FlutterActivity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - GeneratedPluginRegistrant.registerWith(this); - - - } } diff --git a/example/android/app/src/main/res/drawable-v21/launch_background.xml b/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/example/android/app/src/main/res/values-night/styles.xml b/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..449a9f9 --- /dev/null +++ b/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml index 00fa441..d74aa35 100644 --- a/example/android/app/src/main/res/values/styles.xml +++ b/example/android/app/src/main/res/values/styles.xml @@ -1,8 +1,18 @@ - + + diff --git a/example/android/build.gradle b/example/android/build.gradle index 9957ae3..622ddc5 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,28 +1,24 @@ - buildscript { repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61" + classpath 'com.android.tools.build:gradle:4.1.0' } } allprojects { repositories { google() - jcenter() + mavenCentral() } } rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { project.evaluationDependsOn(':app') } diff --git a/example/android/gradle.properties b/example/android/gradle.properties index 3992dbe..94adc3a 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -1,5 +1,3 @@ -android.enableJetifier=true -android.useAndroidX=true org.gradle.jvmargs=-Xmx1536M - -android.enableR8=true +android.useAndroidX=true +android.enableJetifier=true diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 63ab3ae..bc6a58a 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/example/android/proguard-android.txt b/example/android/proguard-android.txt deleted file mode 100644 index e69de29..0000000 diff --git a/example/android/proguard-rules.pro b/example/android/proguard-rules.pro deleted file mode 100644 index 4194f7b..0000000 --- a/example/android/proguard-rules.pro +++ /dev/null @@ -1,5 +0,0 @@ --keep class com.finogeeks.** {*;} - -# tbs --keep class com.tencent.smtt.** {*;} --keep class com.tencent.tbs.** {*;} \ No newline at end of file diff --git a/example/android/settings.gradle b/example/android/settings.gradle index 5a2f14f..44e62bc 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -1,15 +1,11 @@ include ':app' -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/example/ios/.gitignore b/example/ios/.gitignore new file mode 100644 index 0000000..151026b --- /dev/null +++ b/example/ios/.gitignore @@ -0,0 +1,33 @@ +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/example/ios/Flutter/.last_build_id b/example/ios/Flutter/.last_build_id deleted file mode 100644 index cc1326f..0000000 --- a/example/ios/Flutter/.last_build_id +++ /dev/null @@ -1 +0,0 @@ -9b8dc99cc1898757c03a06b2261ab8de diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist index 6b4c0f7..8d4492f 100644 --- a/example/ios/Flutter/AppFrameworkInfo.plist +++ b/example/ios/Flutter/AppFrameworkInfo.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) + en CFBundleExecutable App CFBundleIdentifier @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 8.0 + 9.0 diff --git a/example/ios/Flutter/Debug.xcconfig b/example/ios/Flutter/Debug.xcconfig index e8efba1..592ceee 100644 --- a/example/ios/Flutter/Debug.xcconfig +++ b/example/ios/Flutter/Debug.xcconfig @@ -1,2 +1 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/example/ios/Flutter/Flutter.podspec b/example/ios/Flutter/Flutter.podspec deleted file mode 100644 index 5ca3041..0000000 --- a/example/ios/Flutter/Flutter.podspec +++ /dev/null @@ -1,18 +0,0 @@ -# -# NOTE: This podspec is NOT to be published. It is only used as a local source! -# - -Pod::Spec.new do |s| - s.name = 'Flutter' - s.version = '1.0.0' - s.summary = 'High-performance, high-fidelity mobile apps.' - s.description = <<-DESC -Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS. - DESC - s.homepage = 'https://flutter.io' - s.license = { :type => 'MIT' } - s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } - s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } - s.ios.deployment_target = '8.0' - s.vendored_frameworks = 'Flutter.framework' -end diff --git a/example/ios/Flutter/Release.xcconfig b/example/ios/Flutter/Release.xcconfig index 399e934..592ceee 100644 --- a/example/ios/Flutter/Release.xcconfig +++ b/example/ios/Flutter/Release.xcconfig @@ -1,2 +1 @@ -#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/example/ios/Podfile b/example/ios/Podfile deleted file mode 100644 index b62db64..0000000 --- a/example/ios/Podfile +++ /dev/null @@ -1,75 +0,0 @@ -# Uncomment this line to define a global platform for your project -# platform :ios, '9.0' - -source 'https://git.finogeeks.club/finoapp-ios/FinPods' -source 'https://github.com/CocoaPods/Specs.git' - -# CocoaPods analytics sends network stats synchronously affecting flutter build latency. -ENV['COCOAPODS_DISABLE_STATS'] = 'true' - -project 'Runner', { - 'Debug' => :debug, - 'Profile' => :release, - 'Release' => :release, -} - -def parse_KV_file(file, separator='=') - file_abs_path = File.expand_path(file) - if !File.exists? file_abs_path - return []; - end - pods_ary = [] - skip_line_start_symbols = ["#", "/"] - File.foreach(file_abs_path) { |line| - next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } - plugin = line.split(pattern=separator) - if plugin.length == 2 - podname = plugin[0].strip() - path = plugin[1].strip() - podpath = File.expand_path("#{path}", file_abs_path) - pods_ary.push({:name => podname, :path => podpath}); - else - puts "Invalid plugin specification: #{line}" - end - } - return pods_ary -end - -target 'Runner' do - # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock - # referring to absolute paths on developers' machines. - system('rm -rf .symlinks') - system('mkdir -p .symlinks/plugins') - - # Flutter Pods - generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') - if generated_xcode_build_settings.empty? - puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first." - end - generated_xcode_build_settings.map { |p| - if p[:name] == 'FLUTTER_FRAMEWORK_DIR' - symlink = File.join('.symlinks', 'flutter') - File.symlink(File.dirname(p[:path]), symlink) - pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) - end - } - - # Plugin Pods - plugin_pods = parse_KV_file('../.flutter-plugins') - plugin_pods.map { |p| - symlink = File.join('.symlinks', 'plugins', p[:name]) - File.symlink(p[:path], symlink) - pod p[:name], :path => File.join(symlink, 'ios') - } -end - -# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. -install! 'cocoapods', :disable_input_output_paths => true - -post_install do |installer| - installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - config.build_settings['ENABLE_BITCODE'] = 'NO' - end - end -end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock deleted file mode 100644 index 6dc2ef8..0000000 --- a/example/ios/Podfile.lock +++ /dev/null @@ -1,3 +0,0 @@ -PODFILE CHECKSUM: fa591ea0d89752dd0191ae3f82c83db034678e82 - -COCOAPODS: 1.10.1 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 3bcf55a..035b54e 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -9,13 +9,10 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; - 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - AF7B8F29E858B4266D8A8AD0 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ABAEB264A095769DC71DEAE1 /* libPods-Runner.a */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -32,24 +29,19 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 073CDBAAF19B6FF1EF196501 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 4F9256BFB604D1207B06C14E /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - ABAEB264A095769DC71DEAE1 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - B62C1456907598F7FC4CC93E /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -57,21 +49,12 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - AF7B8F29E858B4266D8A8AD0 /* libPods-Runner.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 43950FB4B3EA29B9EA2BA804 /* Frameworks */ = { - isa = PBXGroup; - children = ( - ABAEB264A095769DC71DEAE1 /* libPods-Runner.a */, - ); - name = Frameworks; - sourceTree = ""; - }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -89,8 +72,6 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, - 9A4E54748C7B614766AAD771 /* Pods */, - 43950FB4B3EA29B9EA2BA804 /* Frameworks */, ); sourceTree = ""; }; @@ -105,37 +86,18 @@ 97C146F01CF9000F007C117D /* Runner */ = { isa = PBXGroup; children = ( - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 97C146FA1CF9000F007C117D /* Main.storyboard */, 97C146FD1CF9000F007C117D /* Assets.xcassets */, 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, ); path = Runner; sourceTree = ""; }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 97C146F21CF9000F007C117D /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 9A4E54748C7B614766AAD771 /* Pods */ = { - isa = PBXGroup; - children = ( - 073CDBAAF19B6FF1EF196501 /* Pods-Runner.debug.xcconfig */, - 4F9256BFB604D1207B06C14E /* Pods-Runner.release.xcconfig */, - B62C1456907598F7FC4CC93E /* Pods-Runner.profile.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -143,7 +105,6 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - BC8240216498EB68CEE5D926 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, @@ -167,16 +128,16 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 1020; - ORGANIZATIONNAME = "The Chromium Authors"; + ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { CreatedOnToolsVersion = 7.3.1; - DevelopmentTeam = H48LA2V876; + LastSwiftMigration = 1100; }; }; }; buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 3.2"; + compatibilityVersion = "Xcode 9.3"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( @@ -200,7 +161,6 @@ files = ( 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, ); @@ -237,28 +197,6 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; - BC8240216498EB68CEE5D926 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -266,8 +204,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, - 97C146F31CF9000F007C117D /* main.m in Sources */, + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -338,6 +275,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -348,23 +286,15 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = H48LA2V876; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - MARKETING_VERSION = 1.0.0; - PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.mopexample; + PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.mopExample; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; }; name = Profile; @@ -468,6 +398,8 @@ IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -478,23 +410,16 @@ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = H48LA2V876; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - MARKETING_VERSION = 1.0.0; - PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.mopexample; + PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.mopExample; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; @@ -504,23 +429,15 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = H48LA2V876; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); INFOPLIST_FILE = Runner/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/Flutter", - ); - MARKETING_VERSION = 1.0.0; - PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.mopexample; + PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.mopExample; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 1d526a1..919434a 100644 --- a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcworkspace/contents.xcworkspacedata index 21a3cc1..1d526a1 100644 --- a/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -4,7 +4,4 @@ - - diff --git a/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/example/ios/Runner/AppDelegate.h b/example/ios/Runner/AppDelegate.h deleted file mode 100644 index 36e21bb..0000000 --- a/example/ios/Runner/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import - -@interface AppDelegate : FlutterAppDelegate - -@end diff --git a/example/ios/Runner/AppDelegate.m b/example/ios/Runner/AppDelegate.m deleted file mode 100644 index 59a72e9..0000000 --- a/example/ios/Runner/AppDelegate.m +++ /dev/null @@ -1,13 +0,0 @@ -#include "AppDelegate.h" -#include "GeneratedPluginRegistrant.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application - didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [GeneratedPluginRegistrant registerWithRegistry:self]; - // Override point for customization after application launch. - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -@end diff --git a/example/ios/Runner/AppDelegate.swift b/example/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..70693e4 --- /dev/null +++ b/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist index cb8c961..1293dcb 100644 --- a/example/ios/Runner/Info.plist +++ b/example/ios/Runner/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - $(MARKETING_VERSION) + $(FLUTTER_BUILD_NAME) CFBundleSignature ???? CFBundleVersion - $(CURRENT_PROJECT_VERSION) + $(FLUTTER_BUILD_NUMBER) LSRequiresIPhoneOS UILaunchStoryboardName diff --git a/example/ios/Runner/Runner-Bridging-Header.h b/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/example/ios/Runner/main.m b/example/ios/Runner/main.m deleted file mode 100644 index dff6597..0000000 --- a/example/ios/Runner/main.m +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import -#import "AppDelegate.h" - -int main(int argc, char* argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/example/lib/main.dart b/example/lib/main.dart index b488f98..f29f77f 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,3 +1,5 @@ +// ignore_for_file: prefer_const_constructors + import 'package:flutter/material.dart'; import 'dart:async'; import 'dart:io'; @@ -20,13 +22,11 @@ class _MyAppState extends State { // Platform messages are asynchronous, so we initialize in an async method. Future init() async { if (Platform.isIOS) { - final res = await Mop.instance.initialize( - '22LyZEib0gLTQdU3MUauAZ0pZVbKTWGmNN6Lx8hXhIkA', '74bde5fad53a817c', + final res = await Mop.instance.initialize('22LyZEib0gLTQdU3MUauAZ0pZVbKTWGmNN6Lx8hXhIkA', '74bde5fad53a817c', apiServer: 'https://api.finclip.com', apiPrefix: '/api/v1/mop'); print(res); } else if (Platform.isAndroid) { - final res = await Mop.instance.initialize( - '22LyZEib0gLTQdU3MUauAZ0pZVbKTWGmNN6Lx8hXhIkA', '74bde5fad53a817c', + final res = await Mop.instance.initialize('22LyZEib0gLTQdU3MUauAZ0pZVbKTWGmNN6Lx8hXhIkA', '74bde5fad53a817c', apiServer: 'https://api.finclip.com', apiPrefix: '/api/v1/mop'); print(res); } @@ -59,10 +59,9 @@ class _MyAppState extends State { end: Alignment.bottomCenter, ), ), - child: FlatButton( + child: TextButton( onPressed: () { - Mop.instance.openApplet('5ea03fa563cb900001d73863', - path: 'pages/index/index', query: ''); + Mop.instance.openApplet('5ea03fa563cb900001d73863', path: 'pages/index/index', query: ''); }, child: Text( '打开画图小程序', @@ -82,7 +81,7 @@ class _MyAppState extends State { end: Alignment.bottomCenter, ), ), - child: FlatButton( + child: TextButton( onPressed: () { Mop.instance.openApplet('5ea0401463cb900001d73865'); }, @@ -104,7 +103,7 @@ class _MyAppState extends State { end: Alignment.bottomCenter, ), ), - child: FlatButton( + child: TextButton( onPressed: () { Mop.instance.openApplet('5ea0412663cb900001d73867'); }, diff --git a/example/pubspec.lock b/example/pubspec.lock index e9626a4..85b279e 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,56 +5,56 @@ packages: dependency: transitive description: name: async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.8.1" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" characters: dependency: transitive description: name: characters - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: name: clock - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" collection: dependency: transitive description: name: collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.15.0" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "1.0.3" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" flutter: @@ -62,37 +62,58 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + lints: + dependency: transitive + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" matcher: dependency: transitive description: name: matcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.10" meta: dependency: transitive description: name: meta - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" mop: - dependency: "direct dev" + dependency: "direct main" description: path: ".." relative: true source: path - version: "2.33.15" + version: "2.34.1" path: dependency: transitive description: name: path - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0" sky_engine: @@ -104,58 +125,58 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" test_api: dependency: transitive description: name: test_api - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.2" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" sdks: dart: ">=2.12.0 <3.0.0" - flutter: ">=1.10.0" + flutter: ">=2.0.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index bd40a2d..aac22c3 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,41 +1,68 @@ name: mop_example description: Demonstrates how to use the mop plugin. -publish_to: 'none' + +# 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 environment: - sdk: '>=2.1.0 <3.0.0' + sdk: ">=2.12.0 <3.0.0" +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. dependencies: flutter: sdk: flutter + mop: + # When depending on this package from a real application you should use: + # mop: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^0.1.2 + cupertino_icons: ^1.0.2 dev_dependencies: flutter_test: sdk: flutter - mop: - path: ../ + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^1.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec # The following section is specific to Flutter. flutter: + # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class. uses-material-design: true + # To add assets to your application, add an assets section, like this: # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware. + # For details regarding adding assets from package dependencies, see # https://flutter.dev/assets-and-images/#from-packages + # To add custom fonts to your application, add a fonts section here, # in this "flutter" section. Each entry in this list should have a # "family" key with the font family name, and a "fonts" key with a diff --git a/example/test/widget_test.dart b/example/test/widget_test.dart index 9808a6f..d754fd8 100644 --- a/example/test/widget_test.dart +++ b/example/test/widget_test.dart @@ -18,8 +18,7 @@ void main() { // Verify that platform version is retrieved. expect( find.byWidgetPredicate( - (Widget widget) => widget is Text && - widget.data.startsWith('Running on:'), + (Widget widget) => widget is Text && widget.data!.startsWith('Running on:'), ), findsOneWidget, ); diff --git a/lib/api.dart b/lib/api.dart index f5e5f6f..ac62795 100644 --- a/lib/api.dart +++ b/lib/api.dart @@ -1,5 +1,3 @@ -import 'dart:typed_data'; - class CustomMenu { String menuId; String image; @@ -8,8 +6,7 @@ class CustomMenu { CustomMenu(this.menuId, this.image, this.title, this.type); - Map toJson() => - {'menuId': menuId, 'image': image, 'title': title, 'type': type}; + Map toJson() => {'menuId': menuId, 'image': image, 'title': title, 'type': type}; } abstract class AppletHandler { @@ -34,6 +31,5 @@ abstract class AppletHandler { Future> getCustomMenus(String appId); ///自定义菜单点击处理 - Future onCustomMenuClick( - String appId, String path, String menuId, String appInfo); + Future onCustomMenuClick(String appId, String path, String menuId, String appInfo); } diff --git a/lib/mop.dart b/lib/mop.dart index e155152..02a5feb 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -1,5 +1,6 @@ import 'dart:async'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/services.dart'; import 'package:mop/api.dart'; @@ -9,26 +10,29 @@ typedef MopEventErrorCallback = void Function(dynamic event); typedef ExtensionApiHandler = Future Function(dynamic params); class Mop { - static final Mop _instance = new Mop._internal(); - MethodChannel _channel; - EventChannel _mopEventChannel; - int eventId = 0; - List> _mopEventQueye = >[]; + static final Mop _instance = Mop._internal(); - Map _extensionApis = {}; + late MethodChannel _channel; + late EventChannel _mopEventChannel; + + int eventId = 0; + + final List> _mopEventQueye = >[]; + + final Map _extensionApis = {}; factory Mop() { return _instance; } Mop._internal() { - print('mop: _internal'); + debugPrint('mop: _internal'); // init - _channel = new MethodChannel('mop'); + _channel = const MethodChannel('mop'); _channel.setMethodCallHandler(_handlePlatformMethodCall); - _mopEventChannel = new EventChannel('plugins.mop.finogeeks.com/mop_event'); + _mopEventChannel = const EventChannel('plugins.mop.finogeeks.com/mop_event'); _mopEventChannel.receiveBroadcastStream().listen((dynamic value) { - print('matrix: receiveBroadcastStream $value'); + debugPrint('matrix: receiveBroadcastStream $value'); for (Map m in _mopEventQueye) { if (m['event'] == value['event']) { m['MopEventCallback'](value['body']); @@ -47,7 +51,7 @@ class Mop { } Future _handlePlatformMethodCall(MethodCall call) async { - print("_handlePlatformMethodCall: method:${call.method}"); + debugPrint("_handlePlatformMethodCall: method:${call.method}"); if (call.method.startsWith("extensionApi:")) { final name = call.method.substring("extensionApi:".length); final handler = _extensionApis[name]; @@ -69,11 +73,11 @@ class Mop { /// [disablePermission] is optional. /// Future initialize(String appkey, String secret, - {String apiServer, - String apiPrefix, - String cryptType, - bool disablePermission, - String userId, + {String? apiServer, + String? apiPrefix, + String? cryptType, + bool? disablePermission, + String? userId, bool encryptServerData = false, bool debug = false, bool bindAppletWithMainProcess = false}) async { @@ -104,20 +108,20 @@ class Mop { /// [cryptType] is optional. cryptType, should be MD5/SM Future openApplet( final String appId, { - final String path, - final String query, - final int sequence, - final String apiServer, - final String apiPrefix, - final String fingerprint, - final String cryptType, - final String scene, + final String? path, + final String? query, + final int? sequence, + final String? apiServer, + final String? apiPrefix, + final String? fingerprint, + final String? cryptType, + final String? scene, }) async { Map params = {'appId': appId}; Map param = {}; if (path != null) param["path"] = path; if (query != null) param["query"] = query; - if (param.length > 0) params["params"] = param; + if (param.isNotEmpty) params["params"] = param; if (sequence != null) params["sequence"] = sequence; if (apiServer != null) params["apiServer"] = apiServer; if (apiPrefix != null) params["apiPrefix"] = apiPrefix; @@ -136,7 +140,7 @@ class Mop { /// Future> currentApplet() async { final ret = await _channel.invokeMapMethod("currentApplet"); - return Map.from(ret); + return Map.from(ret!); } /// @@ -165,9 +169,7 @@ class Mop { /// 获取运行时版本号 /// Future sdkVersion() async { - return await _channel - .invokeMapMethod("sdkVersion") - .then((value) => value["data"]); + return await _channel.invokeMapMethod("sdkVersion").then((value) => value!["data"]); } /// @@ -181,11 +183,9 @@ class Mop { /// /// 根据微信QrCode信息解析小程序信息 /// - Future> parseAppletInfoFromWXQrCode( - String qrCode, String apiServer) async { - final ret = await _channel.invokeMapMethod("parseAppletInfoFromWXQrCode", - {"qrCode": qrCode, "apiServer": apiServer}); - return Map.from(ret); + Future> parseAppletInfoFromWXQrCode(String qrCode, String apiServer) async { + final ret = await _channel.invokeMapMethod("parseAppletInfoFromWXQrCode", {"qrCode": qrCode, "apiServer": apiServer}); + return Map.from(ret!); } /// @@ -202,20 +202,19 @@ class Mop { _extensionApis["getCustomMenus"] = (params) async { final res = await handler.getCustomMenus(params["appId"]); List> list = []; - res?.forEach((element) { + for (var element in res) { Map map = Map(); map["menuId"] = element.menuId; map["image"] = element.image; map["title"] = element.title; map["type"] = element.type; list.add(map); - }); - print("registerAppletHandler getCustomMenus list $list"); + } + debugPrint("registerAppletHandler getCustomMenus list $list"); return list; }; _extensionApis["onCustomMenuClick"] = (params) async { - return handler.onCustomMenuClick( - params["appId"], params["path"], params["menuId"], params["appInfo"]); + return handler.onCustomMenuClick(params["appId"], params["path"], params["menuId"], params["appInfo"]); }; _channel.invokeMethod("registerAppletHandler"); } @@ -231,10 +230,9 @@ class Mop { /// 获取国密加密 Future getSMSign(String plainText) async { - var result = - await _channel.invokeMapMethod("smsign", {'plainText': plainText}); - var data = result['data']['data']; - print(data); + var result = await _channel.invokeMapMethod("smsign", {'plainText': plainText}); + var data = result!['data']['data']; + debugPrint(data); return data; } } diff --git a/pubspec.lock b/pubspec.lock index 65b1ee6..98f775e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,49 +5,49 @@ packages: dependency: transitive description: name: async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.8.1" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" characters: dependency: transitive description: name: characters - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: name: clock - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" collection: dependency: transitive description: name: collection - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.15.0" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" flutter: @@ -55,30 +55,51 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + flutter_plugin_android_lifecycle: + dependency: "direct main" + description: + name: flutter_plugin_android_lifecycle + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + lints: + dependency: transitive + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" matcher: dependency: transitive description: name: matcher - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "0.12.10" meta: dependency: transitive description: name: meta - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" path: dependency: transitive description: name: path - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.0" sky_engine: @@ -90,58 +111,58 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.8.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.2.0" test_api: dependency: transitive description: name: test_api - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.2" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "1.3.0" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.flutter-io.cn" + url: "https://pub.dartlang.org" source: hosted version: "2.1.0" sdks: dart: ">=2.12.0 <3.0.0" - flutter: ">=1.10.0" + flutter: ">=2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 5c486cb..4ae1e27 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,19 +1,21 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.34.1' +version: "2.34.1" homepage: https://github.com/finogeeks/mop-flutter-sdk environment: - sdk: '>=2.1.0 <3.0.0' - flutter: '^1.10.0' + sdk: ">=2.12.0 <3.0.0" + flutter: ">=1.20.0" dependencies: flutter: sdk: flutter + flutter_plugin_android_lifecycle: ^2.0.3 dev_dependencies: flutter_test: sdk: flutter + flutter_lints: ^1.0.0 flutter: plugin: diff --git a/test/mop_test.dart b/test/mop_test.dart index 772816b..2f12533 100644 --- a/test/mop_test.dart +++ b/test/mop_test.dart @@ -5,6 +5,8 @@ import 'package:mop/mop.dart'; void main() { const MethodChannel channel = MethodChannel('mop'); + TestWidgetsFlutterBinding.ensureInitialized(); + setUp(() { channel.setMockMethodCallHandler((MethodCall methodCall) async { return '42'; From 74304c0abfa19ba92a8a27508b946e7686ca2f61 Mon Sep 17 00:00:00 2001 From: Wannz Date: Fri, 29 Oct 2021 15:27:49 +0800 Subject: [PATCH 007/107] Update README.md --- README.md | 97 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 66 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 33fb9e9..6270e58 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,40 @@ -# 凡泰极客小程序 Flutter 插件 +

+ + + +

-本插件提供在 Flutter 运行环境中运行小程序能力。 +

+ FinClip Flutter SDK
+

+

+ 本项目提供在 Flutter 环境中运行小程序的能力 +

-## 集成 +

+ 👉 https://www.finclip.com/ 👈 +

-在项目pubspec.yaml文件中添加依赖 +----- +## 🤔 FinClip 是什么? -``` +有没有**想过**,开发好的微信小程序能放在自己的 APP 里直接运行,只需要开发一次小程序,就能在不同的应用中打开它,是不是很不可思议? + +有没有**试过**,在自己的 APP 中引入一个 SDK ,应用中不仅可以打开小程序,还能自定义小程序接口,修改小程序样式,是不是觉得更不可思议? + +这就是 FinClip ,就是有这么多不可思议! + +## ⚙️ Flutter 集成 + +在项目 `pubspec.yaml` 文件中添加依赖 + +```yaml mop: latest.version ``` -## 示例 +## 🖥 示例 -``` +```flutter import 'package:flutter/material.dart'; import 'dart:async'; import 'dart:io'; @@ -34,7 +56,7 @@ class _MyAppState extends State { // Platform messages are asynchronous, so we initialize in an async method. Future init() async { - if (Platform.isIOS) { + if (Platform.isiOS) { //com.finogeeks.mopExample final res = await Mop.instance.initialize( '22LyZEib0gLTQdU3MUauARlLry7JL/2fRpscC9kpGZQA', '1c11d7252c53e0b6', @@ -115,15 +137,13 @@ class _MyAppState extends State { } ``` -## 接口文档 +## 📋 接口文档 -1. 初始化小程序 - -在使用sdk提供的api之前必须要初始化sdk,初始化sdk的接口为 +### 1. 初始化小程序 + + 在使用 SDK 提供的 API 之前必须要初始化 SDK ,初始化 SDK 的接口如下 ``` - - /// /// /// initialize mop miniprogram engine. /// 初始化小程序 @@ -137,18 +157,16 @@ class _MyAppState extends State { {String apiServer, String apiPrefix}) ``` -使用示例: - +使用示例: ``` final res = await Mop.instance.initialize( '22LyZEib0gLTQdU3MUauARlLry7JL/2fRpscC9kpGZQA', '1c11d7252c53e0b6', apiServer: 'https://api.finclip.com', apiPrefix: '/api/v1/mop'); ``` -2. 打开小程序 +### 2. 打开小程序 ``` - /// /// /// open the miniprogram [appId] from the mop server. /// 打开小程序 @@ -161,9 +179,9 @@ final res = await Mop.instance.initialize( {final String path, final String query, final int sequence}) ``` -3. 获取当前正在使用的小程序信息 +### 3. 获取当前正在使用的小程序信息 -当前小程序信息包括的字段有appId,name,icon,description,version,thumbnail +当前小程序信息包括的字段有 `appId`, `name`, `icon`, `description`, `version`, `thumbnail` ``` /// @@ -175,7 +193,7 @@ final res = await Mop.instance.initialize( Future> currentApplet() ``` -4. 关闭当前打开的所有小程序 +### 4. 关闭当前打开的所有小程序 ``` /// @@ -185,10 +203,9 @@ final res = await Mop.instance.initialize( Future closeAllApplets() ``` -5. 清除缓存的小程序 +### 5. 清除缓存的小程序 清除缓存的小程序,当再次打开时,会重新下载小程序 - ``` /// /// clear applets cache @@ -197,7 +214,7 @@ final res = await Mop.instance.initialize( Future clearApplets() ``` -6. 注册小程序事件处理 +### 6. 注册小程序事件处理 当小程序内触发指定事件时,会通知到使用者,比如小程序被转发,小程序需要获取用户信息,注册处理器来做出对应的响应 @@ -210,7 +227,6 @@ final res = await Mop.instance.initialize( ``` 处理器的结构 - ``` abstract class AppletHandler { /// @@ -238,19 +254,19 @@ abstract class AppletHandler { } ``` -7. 注册拓展api +### 7. 注册拓展 API -如果,我们的小程序SDK API不满足您的需求,您可以注册自定义的小程序API,然后就可以在小程序内调用自已定义的API了。 +如果,我们的小程序 SDK API 不满足您的需求,您可以注册自定义的小程序API,然后就可以在小程序内调用自已定义的 API 了。 -··· +``` /// /// register extension api /// 注册拓展api /// void registerExtensionApi(String name, ExtensionApiHandler handler) -··· +``` -ios需要在小程序根目录创建FinChatConf.js文件,配置实例如下 +iOS 需要在小程序根目录创建 `FinChatConf.js` 文件,配置实例如下 ``` module.exports = { @@ -263,4 +279,23 @@ module.exports = { } ] } -``` \ No newline at end of file +``` + +## 🔗 常用链接 +以下内容是您在 FinClip 进行开发与体验时,常见的问题与指引信息 + +- [FinClip 官网](https://www.finclip.com/#/home) +- [示例小程序](https://www.finclip.com/#/market) +- [文档中心](https://www.finclip.com/mop/document/) +- [SDK 部署指南](https://www.finclip.com/mop/document/introduce/quickStart/intergration-guide.html) +- [小程序代码结构](https://www.finclip.com/mop/document/develop/guide/structure.html) +- [iOS 集成指引](https://www.finclip.com/mop/document/runtime-sdk/ios/ios-integrate.html) +- [Android 集成指引](https://www.finclip.com/mop/document/runtime-sdk/android/android-integrate.html) +- [Flutter 集成指引](https://www.finclip.com/mop/document/runtime-sdk/flutter/flutter-integrate.html) + +## ☎️ 联系我们 +微信扫描下面二维码,关注官方公众号 **「凡泰极客」**,获取更多精彩内容。
+ + +微信扫描下面二维码,邀请进官方微信交流群(加好友备注:finclip 咨询),获取更多精彩内容。
+ From efb8eadf27b9e9f536c2e9989ccc0cb444378757 Mon Sep 17 00:00:00 2001 From: Wannz Date: Mon, 8 Nov 2021 14:44:01 +0800 Subject: [PATCH 008/107] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 6270e58..d0b5110 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,10 @@ 这就是 FinClip ,就是有这么多不可思议! +## ⚠️ Flutter 环境使用请注意 + +由于 FinClip 小程序技术主要通过 SDK 向 APP 提供运行小程序的能力,您看到的本仓库中长期未更新的文件并非“年久失修”,我们始终保持在 Flutter 环境中相关的 SDK 的资源更新。如果您在集成使用过程中遇到任何问题,欢迎与我们联系。 + ## ⚙️ Flutter 集成 在项目 `pubspec.yaml` 文件中添加依赖 From 5afe55f6cd759a1f39cb61dfb4e3ff27a6a25045 Mon Sep 17 00:00:00 2001 From: Wannz Date: Mon, 8 Nov 2021 14:44:15 +0800 Subject: [PATCH 009/107] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d0b5110..c569afb 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ 这就是 FinClip ,就是有这么多不可思议! -## ⚠️ Flutter 环境使用请注意 +## ⚠️ Flutter 使用注意 由于 FinClip 小程序技术主要通过 SDK 向 APP 提供运行小程序的能力,您看到的本仓库中长期未更新的文件并非“年久失修”,我们始终保持在 Flutter 环境中相关的 SDK 的资源更新。如果您在集成使用过程中遇到任何问题,欢迎与我们联系。 From 660b03accfd9ad55737961ba94748c6de413b0c5 Mon Sep 17 00:00:00 2001 From: Wannz Date: Mon, 8 Nov 2021 14:45:14 +0800 Subject: [PATCH 010/107] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c569afb..2aa1ff7 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ ## ⚠️ Flutter 使用注意 -由于 FinClip 小程序技术主要通过 SDK 向 APP 提供运行小程序的能力,您看到的本仓库中长期未更新的文件并非“年久失修”,我们始终保持在 Flutter 环境中相关的 SDK 的资源更新。如果您在集成使用过程中遇到任何问题,欢迎与我们联系。 +由于 FinClip 小程序技术主要通过 SDK 向 APP 提供运行小程序的能力,您看到的本仓库中长期未更新的文件并非“年久失修”,我们始终保持在 Flutter 环境中 SDK 资源的定期更新。如果您在集成使用过程中遇到任何问题,欢迎与我们联系。 ## ⚙️ Flutter 集成 From 928d7750f1209dc597d41c98a9674d5fdea8ca1c Mon Sep 17 00:00:00 2001 From: Wannz Date: Sun, 14 Nov 2021 23:12:48 +0800 Subject: [PATCH 011/107] Update README.md --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 2aa1ff7..eafe8bd 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,20 @@ 👉 https://www.finclip.com/ 👈

+
+ + + + + + + + + + + +
+ ----- ## 🤔 FinClip 是什么? From 8058b6327bce27cea781aca97c2b72723f09ab64 Mon Sep 17 00:00:00 2001 From: Wannz Date: Sun, 14 Nov 2021 23:16:34 +0800 Subject: [PATCH 012/107] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index eafe8bd..754c9d5 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,14 @@ + + +

+ +

+ +[官方网站](https://www.finclip.com/) | [示例小程序](https://www.finclip.com/#/market) | [开发文档](https://www.finclip.com/mop/document/) | [部署指南](https://www.finclip.com/mop/document/introduce/quickStart/cloud-server-deployment-guide.html) | [SDK 集成指南](https://www.finclip.com/mop/document/introduce/quickStart/intergration-guide.html) | [API 列表](https://www.finclip.com/mop/document/develop/api/overview.html) | [组件列表](https://www.finclip.com/mop/document/develop/component/overview.html) | [隐私承诺](https://www.finclip.com/mop/document/operate/safety.html) +
----- From 37ea8e298cd011d0dc9e06634ea5b42f2130a69f Mon Sep 17 00:00:00 2001 From: Elric Date: Fri, 10 Dec 2021 18:54:38 +0800 Subject: [PATCH 013/107] Create pull_request.yml --- .github/workflows/pull_request.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/workflows/pull_request.yml diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000..b5872ff --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,11 @@ +name: Notify +on: + pull_request: + branches: [ master ] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Notify + run: curl --location --request POST 'https://api.finogeeks.club/api/v1/finstore/webhooks/61b331d79b3dad0001f72fa2/postreceive?nonce=jhd2QyrArsc' --header "Content-Type:application/json" --data-raw '{"msg":"仓库 ${{github.repository}} 有新的 PR ${{ github.event.pull_request._links.html.href }}"}' From f0b9add4ea28e6447e172ecb505909001f445ff7 Mon Sep 17 00:00:00 2001 From: Elric Date: Fri, 10 Dec 2021 18:55:49 +0800 Subject: [PATCH 014/107] Create issue.yml --- .github/workflows/issue.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/issue.yml diff --git a/.github/workflows/issue.yml b/.github/workflows/issue.yml new file mode 100644 index 0000000..cdb807e --- /dev/null +++ b/.github/workflows/issue.yml @@ -0,0 +1,17 @@ +name: Notify +on: + issues: + types: [opened] + issue_comment: + types: [created] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" + - name: Notify + run: curl --location --request POST 'https://api.finogeeks.club/api/v1/finstore/webhooks/61b331d79b3dad0001f72fa2/postreceive?nonce=jhd2QyrArsc' --header "Content-Type:application/json" --data-raw '{"msg":"仓库 ${{github.repository}} 有新的 issue"}' From 6781a202d97956433f3afd0b8536b0fa7b294b15 Mon Sep 17 00:00:00 2001 From: Elric Date: Fri, 10 Dec 2021 18:56:07 +0800 Subject: [PATCH 015/107] Update issue.yml --- .github/workflows/issue.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/issue.yml b/.github/workflows/issue.yml index cdb807e..8a4587e 100644 --- a/.github/workflows/issue.yml +++ b/.github/workflows/issue.yml @@ -9,9 +9,5 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: echo "$GITHUB_CONTEXT" - name: Notify run: curl --location --request POST 'https://api.finogeeks.club/api/v1/finstore/webhooks/61b331d79b3dad0001f72fa2/postreceive?nonce=jhd2QyrArsc' --header "Content-Type:application/json" --data-raw '{"msg":"仓库 ${{github.repository}} 有新的 issue"}' From de46923616f0fb013f51cebca1ed8663e04914ea Mon Sep 17 00:00:00 2001 From: kangxuyao Date: Tue, 14 Dec 2021 16:12:51 +0800 Subject: [PATCH 016/107] Merge branch 'embedding-v2' of https://github.com/hydrz/mop-flutter-sdk into hydrz-embedding-v2 # Conflicts: # android/build.gradle # example/pubspec.lock # example/pubspec.yaml # example/test/widget_test.dart # lib/api.dart # lib/mop.dart # pubspec.lock # pubspec.yaml --- pubspec.tpl.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pubspec.tpl.yaml b/pubspec.tpl.yaml index b950490..1fda902 100644 --- a/pubspec.tpl.yaml +++ b/pubspec.tpl.yaml @@ -4,16 +4,18 @@ version: '__mop_flutter_sdk_version__' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: - sdk: '>=2.1.0 <3.0.0' - flutter: '^1.10.0' + sdk: '>=2.12.0 <3.0.0' + flutter: '^2.2.3' dependencies: flutter: sdk: flutter + flutter_plugin_android_lifecycle: ^2.0.3 dev_dependencies: flutter_test: sdk: flutter + flutter_lints: ^1.0.0 flutter: plugin: From c89aaa91cd16d266ba128855b88a233d69cdce82 Mon Sep 17 00:00:00 2001 From: wangtao Date: Tue, 21 Dec 2021 17:23:42 +0800 Subject: [PATCH 017/107] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9EApi=E7=9A=84?= =?UTF-8?q?=E9=83=A8=E5=88=86=E5=AE=9A=E4=B9=89=E5=92=8C=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/.flutter-plugins-dependencies | 2 +- example/pubspec.lock | 2 +- ios/Classes/Api/MOB_addWebExtentionApi.h | 16 ++++ ios/Classes/Api/MOB_addWebExtentionApi.m | 53 +++++++++++++ ios/Classes/Api/MOP_callJS.h | 18 +++++ ios/Classes/Api/MOP_callJS.m | 28 +++++++ ios/Classes/Api/MOP_closeApplet.h | 17 ++++ ios/Classes/Api/MOP_closeApplet.m | 25 ++++++ ios/Classes/Api/MOP_finishRunningApplet.h | 17 ++++ ios/Classes/Api/MOP_finishRunningApplet.m | 25 ++++++ ios/Classes/Api/MOP_registerExtensionApi.h | 2 +- ios/Classes/Api/MOP_removeApplet.h | 16 ++++ ios/Classes/Api/MOP_removeApplet.m | 32 ++++++++ ios/Classes/Api/MOP_sendCustomEvent.h | 16 ++++ ios/Classes/Api/MOP_sendCustomEvent.m | 28 +++++++ ios/Classes/Api/MOP_setFinStoreConfigs.h | 16 ++++ ios/Classes/Api/MOP_setFinStoreConfigs.m | 12 +++ ios/Classes/MopPlugin.m | 4 +- lib/mop.dart | 92 +++++++++++++++++++++- 19 files changed, 416 insertions(+), 5 deletions(-) create mode 100644 ios/Classes/Api/MOB_addWebExtentionApi.h create mode 100644 ios/Classes/Api/MOB_addWebExtentionApi.m create mode 100644 ios/Classes/Api/MOP_callJS.h create mode 100644 ios/Classes/Api/MOP_callJS.m create mode 100644 ios/Classes/Api/MOP_closeApplet.h create mode 100644 ios/Classes/Api/MOP_closeApplet.m create mode 100644 ios/Classes/Api/MOP_finishRunningApplet.h create mode 100644 ios/Classes/Api/MOP_finishRunningApplet.m create mode 100644 ios/Classes/Api/MOP_removeApplet.h create mode 100644 ios/Classes/Api/MOP_removeApplet.m create mode 100644 ios/Classes/Api/MOP_sendCustomEvent.h create mode 100644 ios/Classes/Api/MOP_sendCustomEvent.m create mode 100644 ios/Classes/Api/MOP_setFinStoreConfigs.h create mode 100644 ios/Classes/Api/MOP_setFinStoreConfigs.m diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index 438deb6..e0a2572 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-11-15 23:44:20.482386","version":"2.2.2"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/wangtao/Documents/fantai/code/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/wangtao/Documents/fantai/code/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-12-20 16:48:35.113009","version":"2.2.1"} \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index 310124c..e80a0ff 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -87,7 +87,7 @@ packages: path: ".." relative: true source: path - version: "2.34.5" + version: "2.34.9" path: dependency: transitive description: diff --git a/ios/Classes/Api/MOB_addWebExtentionApi.h b/ios/Classes/Api/MOB_addWebExtentionApi.h new file mode 100644 index 0000000..d33d50d --- /dev/null +++ b/ios/Classes/Api/MOB_addWebExtentionApi.h @@ -0,0 +1,16 @@ +// +// MOB_addWebExtentionApi.h +// mop +// +// Created by 王滔 on 2021/12/21. +// + +#import "MOPBaseApi.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MOB_addWebExtentionApi : MOPBaseApi +@property(nonatomic, copy) NSString* name; +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Api/MOB_addWebExtentionApi.m b/ios/Classes/Api/MOB_addWebExtentionApi.m new file mode 100644 index 0000000..ba81192 --- /dev/null +++ b/ios/Classes/Api/MOB_addWebExtentionApi.m @@ -0,0 +1,53 @@ +// +// MOB_addWebExtentionApi.m +// mop +// +// Created by 王滔 on 2021/12/21. +// + +#import "MOB_addWebExtentionApi.h" +#import "MopPlugin.h" +#import + +@implementation MOB_addWebExtentionApi + +- (void)setupApiWithSuccess:(void (^)(NSDictionary * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel +{ + NSLog(@"MOB_addWebExtentionApi"); + FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; + [[FATClient sharedClient] fat_registerWebApi:self.name handle:^(id param, FATExtensionApiCallback callback) { + NSLog(@"invoke webExtentionApi:"); + NSLog(@"%@",self.name); + NSLog(@"%@",param); + NSString* api = [@"webExtentionApi:" stringByAppendingString:self.name]; + [channel invokeMethod:api arguments:param result:^(id _Nullable result) { + NSLog(@"webExtentionApi reslut:%@",result); + // 先判断是否flutter发生错误 + BOOL isFlutterError = [result isKindOfClass:[FlutterError class]] || result == FlutterMethodNotImplemented; + if (isFlutterError) { + NSLog(@"webExtentionApi reslut:fail"); + callback(FATExtensionCodeFailure,nil); + return; + } + // 再判断回调是否为失败 + BOOL hasError = [[result allKeys] containsObject:@"errMsg"]; + if (hasError) { + NSString *errMsg = result[@"errMsg"]; + NSString *errPrefix = [NSString stringWithFormat:@"%@:fail", self.name]; + BOOL isFail = [errMsg hasPrefix:errPrefix]; + if (isFail) { + NSLog(@"webExtentionApi reslut:fail"); + callback(FATExtensionCodeFailure,nil); + return; + } + } + // 其他的按成功处理 + NSLog(@"webExtentionApi callback:%@",result); + callback(FATExtensionCodeSuccess,result); + }]; + + }]; + success(@{}); + +} +@end diff --git a/ios/Classes/Api/MOP_callJS.h b/ios/Classes/Api/MOP_callJS.h new file mode 100644 index 0000000..aa0c9ad --- /dev/null +++ b/ios/Classes/Api/MOP_callJS.h @@ -0,0 +1,18 @@ +// +// MOP_callJS.h +// mop +// +// Created by 王滔 on 2021/12/21. +// + +#import "MOPBaseApi.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MOP_callJS : MOPBaseApi +@property (nonatomic, copy) NSString *eventName; +@property (nonatomic, copy) NSString *nativeViewId; +@property (nonatomic, copy) NSDictionary *eventData; +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Api/MOP_callJS.m b/ios/Classes/Api/MOP_callJS.m new file mode 100644 index 0000000..07be0e4 --- /dev/null +++ b/ios/Classes/Api/MOP_callJS.m @@ -0,0 +1,28 @@ +// +// MOP_callJS.m +// mop +// +// Created by 王滔 on 2021/12/21. +// + +#import "MOP_callJS.h" + +@implementation MOP_callJS + +- (void)setupApiWithSuccess:(void (^)(NSDictionary * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel +{ + if (!self.eventData || !self.eventName || !self.nativeViewId) { + failure(@{@"errMsg": @"callJS:fail"}); + return; + } + + NSNumber *numberId = @(_nativeViewId.integerValue); + [[FATClient sharedClient].nativeViewManager sendEvent:_eventName nativeViewId:numberId detail:_eventData completion:^(id result, NSError *error) { + if (error) { + failure(@{@"errMsg": @"sendCustomEvent:fail"}); + } else { + success(result); + } + }]; +} +@end diff --git a/ios/Classes/Api/MOP_closeApplet.h b/ios/Classes/Api/MOP_closeApplet.h new file mode 100644 index 0000000..b87fb22 --- /dev/null +++ b/ios/Classes/Api/MOP_closeApplet.h @@ -0,0 +1,17 @@ +// +// MOP_closeApplet.h +// mop +// +// Created by 王滔 on 2021/12/21. +// + +#import "MOPBaseApi.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MOP_closeApplet : MOPBaseApi +@property (nonatomic, copy) NSString *appletId; +@property (nonatomic, assign) BOOL animated; +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Api/MOP_closeApplet.m b/ios/Classes/Api/MOP_closeApplet.m new file mode 100644 index 0000000..292f21a --- /dev/null +++ b/ios/Classes/Api/MOP_closeApplet.m @@ -0,0 +1,25 @@ +// +// MOP_closeApplet.m +// mop +// +// Created by 王滔 on 2021/12/21. +// + +#import "MOP_closeApplet.h" +#import + +@implementation MOP_closeApplet + +- (void)setupApiWithSuccess:(void (^)(NSDictionary * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel +{ + if (!self.appletId || self.appletId.length < 1) { + failure(@{@"errMsg": @"closeApplet:fail"}); + return; + } + [[FATClient sharedClient] closeApplet:self.appletId animated:_animated completion:^{ + success(@{}); + }]; + +} + +@end diff --git a/ios/Classes/Api/MOP_finishRunningApplet.h b/ios/Classes/Api/MOP_finishRunningApplet.h new file mode 100644 index 0000000..da8c676 --- /dev/null +++ b/ios/Classes/Api/MOP_finishRunningApplet.h @@ -0,0 +1,17 @@ +// +// MOP_finishRunningApplet.h +// mop +// +// Created by 王滔 on 2021/12/21. +// + +#import "MOPBaseApi.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MOP_finishRunningApplet : MOPBaseApi +@property (nonatomic, copy) NSString appletId; +@property (nonatomic, assign) BOOL animated; +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Api/MOP_finishRunningApplet.m b/ios/Classes/Api/MOP_finishRunningApplet.m new file mode 100644 index 0000000..3d1f6f5 --- /dev/null +++ b/ios/Classes/Api/MOP_finishRunningApplet.m @@ -0,0 +1,25 @@ +// +// MOP_finishRunningApplet.m +// mop +// +// Created by 王滔 on 2021/12/21. +// + +#import "MOP_finishRunningApplet.h" + +@implementation MOP_finishRunningApplet + +- (void)setupApiWithSuccess:(void (^)(NSDictionary * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel +{ + if (!self.appletId || self.appletId.length < 1) { + failure(@{@"errMsg": @"finishRunningApplet:fail"}); + return; + } + [[FATClient sharedClient] closeApplet:self.appletId animated:_animated completion:^{ + [[FATClient sharedClient] clearMemeryApplet:self.appletId]; + success(@{}); + }]; + +} + +@end diff --git a/ios/Classes/Api/MOP_registerExtensionApi.h b/ios/Classes/Api/MOP_registerExtensionApi.h index 0cd9fe5..e489f94 100644 --- a/ios/Classes/Api/MOP_registerExtensionApi.h +++ b/ios/Classes/Api/MOP_registerExtensionApi.h @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MOP_registerExtensionApi : MOPBaseApi -@property NSString* name; +@property(nonatomic, copy) NSString* name; @end diff --git a/ios/Classes/Api/MOP_removeApplet.h b/ios/Classes/Api/MOP_removeApplet.h new file mode 100644 index 0000000..eae034b --- /dev/null +++ b/ios/Classes/Api/MOP_removeApplet.h @@ -0,0 +1,16 @@ +// +// MOP_removeApplet.h +// mop +// +// Created by 王滔 on 2021/12/21. +// + +#import "MOPBaseApi.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MOP_removeApplet : MOPBaseApi +@property (nonatomic, copy) NSString *appletId; +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Api/MOP_removeApplet.m b/ios/Classes/Api/MOP_removeApplet.m new file mode 100644 index 0000000..5b11dcf --- /dev/null +++ b/ios/Classes/Api/MOP_removeApplet.m @@ -0,0 +1,32 @@ +// +// MOP_removeApplet.m +// mop +// +// Created by 王滔 on 2021/12/21. +// + +#import "MOP_removeApplet.h" + +@implementation MOP_removeApplet + +- (void)setupApiWithSuccess:(void (^)(NSDictionary * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel +{ + if (!self.appletId || self.appletId.length < 1) { + failure(@{@"errMsg": @"removeApplet:fail"}); + return; + } + FATAppletInfo *appletInfo = [[FATClient sharedClient] currentApplet]; + if (appletInfo && [appletInfo.appId isEqual:self.appletId]) { + [[FATClient sharedClient] closeApplet:self.appletId animated:NO completion:^{ + [[FATClient sharedClient] removeAppletFromLocalCache:self.appletId]; + success(@{}); + }]; + } else { + [[FATClient sharedClient] removeAppletFromLocalCache:self.appletId]; + success(@{}); + } + + + +} +@end diff --git a/ios/Classes/Api/MOP_sendCustomEvent.h b/ios/Classes/Api/MOP_sendCustomEvent.h new file mode 100644 index 0000000..2218594 --- /dev/null +++ b/ios/Classes/Api/MOP_sendCustomEvent.h @@ -0,0 +1,16 @@ +// +// MOP_sendCustomEvent.h +// mop +// +// Created by 王滔 on 2021/12/21. +// + +#import "MOPBaseApi.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MOP_sendCustomEvent : MOPBaseApi +@property (nonatomic, strong) NSDictonary *eventData; +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Api/MOP_sendCustomEvent.m b/ios/Classes/Api/MOP_sendCustomEvent.m new file mode 100644 index 0000000..4642b06 --- /dev/null +++ b/ios/Classes/Api/MOP_sendCustomEvent.m @@ -0,0 +1,28 @@ +// +// MOP_sendCustomEvent.m +// mop +// +// Created by 王滔 on 2021/12/21. +// + +#import "MOP_sendCustomEvent.h" + +@implementation MOP_sendCustomEvent + +- (void)setupApiWithSuccess:(void (^)(NSDictionary * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel +{ + if (!self.eventData ) { + failure(@{@"errMsg": @"sendCustomEvent:fail"}); + return; + } + + [[FATClient sharedClient].nativeViewManager sendCustomEventWithDetail:self.eventData completion:^(id result, NSError *error) { + if (error) { + failure(@{@"errMsg": @"sendCustomEvent:fail"}); + } else { + success(result); + } + }]; + +} +@end diff --git a/ios/Classes/Api/MOP_setFinStoreConfigs.h b/ios/Classes/Api/MOP_setFinStoreConfigs.h new file mode 100644 index 0000000..d2b55ad --- /dev/null +++ b/ios/Classes/Api/MOP_setFinStoreConfigs.h @@ -0,0 +1,16 @@ +// +// MOP_setFinStoreConfigs.h +// mop +// +// Created by 王滔 on 2021/12/20. +// + +#import "MOPBaseApi.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MOP_setFinStoreConfigs : MOPBaseApi +@property(nonatomic, strong) NSArray *storeConfigs; +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Api/MOP_setFinStoreConfigs.m b/ios/Classes/Api/MOP_setFinStoreConfigs.m new file mode 100644 index 0000000..ffc562e --- /dev/null +++ b/ios/Classes/Api/MOP_setFinStoreConfigs.m @@ -0,0 +1,12 @@ +// +// MOP_setFinStoreConfigs.m +// mop +// +// Created by 王滔 on 2021/12/20. +// + +#import "MOP_setFinStoreConfigs.h" + +@implementation MOP_setFinStoreConfigs + +@end diff --git a/ios/Classes/MopPlugin.m b/ios/Classes/MopPlugin.m index 3f51f4e..669337a 100644 --- a/ios/Classes/MopPlugin.m +++ b/ios/Classes/MopPlugin.m @@ -91,7 +91,9 @@ static MopPlugin *_instance; return [[FATClient sharedClient] handleOpenURL:url]; } --(BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray> * _Nullable))restorationHandler +- (BOOL)application:(UIApplication*)application + continueUserActivity:(NSUserActivity*)userActivity + restorationHandler:(void (^)(NSArray*))restorationHandler { if ([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) { NSURL *url = userActivity.webpageURL; diff --git a/lib/mop.dart b/lib/mop.dart index 8c08066..2a7fa70 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:ffi'; import 'package:flutter/services.dart'; import 'package:mop/api.dart'; @@ -8,6 +9,24 @@ typedef MopEventErrorCallback = void Function(dynamic event); typedef ExtensionApiHandler = Future Function(dynamic params); +class FinStoreConfig { + String sdkKey; //创建应用时生成的SDK Key + String sdkSecret; //创建应用时生成的SDK secret + String apiServer; //服务器地址,客户部署的后台地址 + + String apmServer; //apm统计服务器的地址,如果不填,则默认与apiServer一致 + int cryptType; //网络接口加密类型,默认为MD5 0:MD5 1:国密MD5 + String fingerprint; //SDK指纹 证联环境(https://open.fdep.cn/) 时必填,其他环境的不用填 + String + encryptServerData; //是否需要接口加密验证(初始化多服务器时使用)默认为不开启,当设置为YES时开启,接口返回加密数据并处理 + +} + +class FinAppletUIConfig { + Map navigationTitleTextAttributes; //导航栏的标题样式,目前支持了font + +} + class Mop { static final Mop _instance = new Mop._internal(); MethodChannel _channel; @@ -17,6 +36,8 @@ class Mop { Map _extensionApis = {}; + Map _webExtensionApis = {}; + factory Mop() { return _instance; } @@ -54,7 +75,13 @@ class Mop { if (handler != null) { return await handler(call.arguments); } - } else if (call.method.startsWith("extensionApi:")) {} + } else if (call.method.startsWith("webExtentionApi:")) { + final name = call.method.substring("webExtentionApi:".length); + final handler = _webExtensionApis[name]; + if (handler != null) { + return await handler(call.arguments); + } + } } /// @@ -246,4 +273,67 @@ class Mop { await _channel.invokeMapMethod("webViewBounces", {'bounces': bounces}); return; } + + //20211220新增Api + + //配置多个服务器 + Future setFinStoreConfigs(List configs) async {} + + //定制ui样式 + Future setUiConfig() async {} + + //自定义ua setUiConfig包含设置ua + Future setCustomWebViewUserAgent(String ua) async {} + + //支持指定服务器,启动参数,支持扫码打开小程序参数 之前已实现 启动参数 扫码打开小程序 + Future startApplet() async {} + + //定时批量更新小程序的数量 + Future setAppletIntervalUpdateLimit(int count) async {} + + //关闭小程序 + Future closeApplet(String appletId, bool animated) async { + await _channel.invokeMethod( + "closeApplet", {"appletId": appletId, "animated": animated}); + return; + } + + //结束小程序 关闭小程序 + Future finishRunningApplet(String appletId, bool animated) async { + await _channel.invokeMethod( + "finishRunningApplet", {"appletId": appletId, "animated": animated}); + return; + } + + //删除小程序 removeUsedApplet? 删掉缓存小程序包 + Future removeApplet(String appletId) async { + await _channel.invokeMethod("removeApplet", {"appletId": appletId}); + return; + } + + //设置小程序切换动画 安卓 + Future setActivityTransitionAnim() async {} + + //发送事件给小程序 + Future sendCustomEvent(Map eventData) async { + await _channel.invokeMethod("sendCustomEvent", {"eventData": eventData}); + return; + } + + //原生调用js + Future callJS(String eventName, String nativeViewId, + Map eventData) async { + await _channel.invokeMethod("callJS", { + "eventName": eventName, + "nativeViewId": nativeViewId, + "eventData": eventData + }); + return; + } + + //注册h5的拓展接口 + void addWebExtentionApi(String name, ExtensionApiHandler handler) { + _webExtensionApis[name] = handler; + _channel.invokeMethod("addWebExtentionApi", {"name": name}); + } } From 48c8f1c7080d854136a6cf125da85b4d68cc43d8 Mon Sep 17 00:00:00 2001 From: kangxuyao Date: Wed, 22 Dec 2021 14:35:51 +0800 Subject: [PATCH 018/107] =?UTF-8?q?api=E5=A3=B0=E6=98=8E=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/.flutter-plugins-dependencies | 2 +- example/pubspec.lock | 45 ++-- lib/mop.dart | 292 ++++++++++++++++++++------ 3 files changed, 267 insertions(+), 72 deletions(-) diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index e0a2572..c260a61 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/wangtao/Documents/fantai/code/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/wangtao/Documents/fantai/code/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-12-20 16:48:35.113009","version":"2.2.1"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/kangxuyao/StudioProjects/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"/Users/kangxuyao/.pub-cache/hosted/pub.flutter-io.cn/flutter_plugin_android_lifecycle-2.0.5/","dependencies":[]},{"name":"mop","path":"/Users/kangxuyao/StudioProjects/finclip-flutter-sdk/","dependencies":["flutter_plugin_android_lifecycle"]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"mop","dependencies":["flutter_plugin_android_lifecycle"]}],"date_created":"2021-12-22 09:19:50.961703","version":"2.6.0-12.0.pre.553"} \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index e80a0ff..bacf03e 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.flutter-io.cn" source: hosted - version: "2.6.1" + version: "2.8.2" boolean_selector: dependency: transitive description: @@ -21,14 +21,14 @@ packages: name: characters url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.0" + version: "1.2.0" charcode: dependency: transitive description: name: charcode url: "https://pub.flutter-io.cn" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -49,7 +49,7 @@ packages: name: cupertino_icons url: "https://pub.flutter-io.cn" source: hosted - version: "0.1.3" + version: "1.0.4" fake_async: dependency: transitive description: @@ -62,32 +62,53 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.4" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.5" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + lints: + dependency: transitive + description: + name: lints + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.1" matcher: dependency: transitive description: name: matcher url: "https://pub.flutter-io.cn" source: hosted - version: "0.12.10" + version: "0.12.11" meta: dependency: transitive description: name: meta url: "https://pub.flutter-io.cn" source: hosted - version: "1.3.0" + version: "1.7.0" mop: - dependency: "direct dev" + dependency: "direct main" description: path: ".." relative: true source: path - version: "2.34.9" + version: "2.34.12" path: dependency: transitive description: @@ -141,7 +162,7 @@ packages: name: test_api url: "https://pub.flutter-io.cn" source: hosted - version: "0.3.0" + version: "0.4.3" typed_data: dependency: transitive description: @@ -155,7 +176,7 @@ packages: name: vector_math url: "https://pub.flutter-io.cn" source: hosted - version: "2.1.0" + version: "2.1.1" sdks: - dart: ">=2.12.0 <3.0.0" - flutter: ">=1.10.0" + dart: ">=2.14.0 <3.0.0" + flutter: ">=2.2.3" diff --git a/lib/mop.dart b/lib/mop.dart index 6395d12..dc59128 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -16,16 +16,189 @@ class FinStoreConfig { String apiServer; //服务器地址,客户部署的后台地址 String apmServer; //apm统计服务器的地址,如果不填,则默认与apiServer一致 - int cryptType; //网络接口加密类型,默认为MD5 0:MD5 1:国密MD5 - String fingerprint; //SDK指纹 证联环境(https://open.fdep.cn/) 时必填,其他环境的不用填 - String - encryptServerData; //是否需要接口加密验证(初始化多服务器时使用)默认为不开启,当设置为YES时开启,接口返回加密数据并处理 + String cryptType; //网络接口加密类型,默认为MD5 国密SM + String? fingerprint; //SDK指纹 证联环境(https://open.fdep.cn/) 时必填,其他环境的不用填 + bool encryptServerData; //是否需要接口加密验证(初始化多服务器时使用)默认为不开启,当设置为YES时开启,接口返回加密数据并处理 + FinStoreConfig(this.sdkKey, this.sdkSecret, this.apiServer, this.apmServer, + {this.cryptType = "MD5", + this.fingerprint, + this.encryptServerData = false}); + + Map toMap() { + return { + "sdkkey": sdkKey, + "sdkSecret": sdkSecret, + "apiServer": apiServer, + "apmServer": apmServer, + "cryptType": cryptType, + "fingerprint": fingerprint, + "encryptServerData": encryptServerData + }; + } } -class FinAppletUIConfig { - Map navigationTitleTextAttributes; //导航栏的标题样式,目前支持了font +class UIConfig { + Map? navigationTitleTextAttributes; //导航栏的标题样式,目前支持了font + ///当导航栏为默认导航栏时,是否始终显示返回按钮 + bool isAlwaysShowBackInDefaultNavigationBar = false; + + ///是否清除导航栏导航按钮的背景 + bool isClearNavigationBarNavButtonBackground = false; + + ///是否隐藏"更多"菜单中的"反馈与投诉"菜单入口 + bool isHideFeedbackAndComplaints = false; + + ///是否隐藏"更多"菜单中的"返回首页"菜单入口 + bool isHideBackHome = false; + + ///是否隐藏"更多"菜单中的"转发"按钮 + bool isHideForwardMenu = false; + + /// 加载小程序过程中(小程序Service层还未加载成功,基础库还没有向SDK传递小程序配置信息),是否隐藏导航栏的关闭按钮 + bool hideTransitionCloseButton = false; + + /// 禁用侧滑关闭小程序手势 + bool disableSlideCloseAppletGesture = false; + + /// 胶囊按钮配置 + CapsuleConfig? capsuleConfig; + + FloatWindowConfig? floatWindowConfig; + + Map toMap() { + return { + "navigationTitleTextAttributes": navigationTitleTextAttributes, + "isAlwaysShowBackInDefaultNavigationBar": + isAlwaysShowBackInDefaultNavigationBar, + "isClearNavigationBarNavButtonBackground": + isClearNavigationBarNavButtonBackground, + "isHideFeedbackAndComplaints": isHideFeedbackAndComplaints, + "isHideBackHome": isHideBackHome, + "isHideForwardMenu": isHideForwardMenu, + "hideTransitionCloseButton": hideTransitionCloseButton, + "disableSlideCloseAppletGesture": disableSlideCloseAppletGesture, + "capsuleConfig": capsuleConfig?.toMap(), + "floatWindowConfig": floatWindowConfig?.toMap(), + }; + } +} + +/// 胶囊按钮配置 +class CapsuleConfig { + /// 上角胶囊视图的宽度,默认值为88 + double capsuleWidth = 88; + + ///上角胶囊视图的高度,默认值为32 + double capsuleHeight = 32; + + ///右上角胶囊视图的右边距 + double capsuleRightMargin = 7; + + ///右上角胶囊视图的圆角半径,默认值为5 + double capsuleCornerRadius = 5; + + ///右上角胶囊视图的边框宽度,默认值为0.8 + double capsuleBorderWidth = 1; + + ///胶囊背景颜色浅色 + int capsuleBgLightColor = 0x33000000; + + ///胶囊背景颜色深色 + int capsuleBgDarkColor = 0x80ffffff; + + /// 右上角胶囊视图的边框浅色颜色 + + int capsuleBorderLightColor = 0x80ffffff; + + ///右上角胶囊视图的边框深色颜色 + + int capsuleBorderDarkColor = 0x26000000; + + ///胶囊分割线浅色颜色 + int capsuleDividerLightColor = 0x80ffffff; + + ///胶囊分割线深色颜色 + int capsuleDividerDarkColor = 0x26000000; + + ///胶囊里的浅色更多按钮的图片对象,如果不传,会使用默认图标 + int? moreLightImage; + + ///胶囊里的深色更多按钮的图片对象,如果不传,会使用默认图标 + int? moreDarkImage; + + ///胶囊里的更多按钮的宽度,高度与宽度相等 + double moreBtnWidth = 32; + + ///胶囊里的更多按钮的左边距 + double moreBtnLeftMargin = 6; + + ///胶囊里的浅色更多按钮的图片对象,如果不传,会使用默认图标 + + int? closeLightImage; + + ///胶囊里的深色更多按钮的图片对象,如果不传,会使用默认图标 + int? closeDarkImage; + + ///胶囊里的关闭按钮的宽度,高度与宽度相等 + double closeBtnWidth = 32; + + ///胶囊里的关闭按钮的左边距 + double closeBtnLeftMargin = 6; + + Map toMap() { + return { + "capsuleWidth": capsuleWidth, + "capsuleHeight": capsuleHeight, + "capsuleRightMargin": capsuleRightMargin, + "capsuleCornerRadius": capsuleCornerRadius, + "capsuleBorderWidth": capsuleBorderWidth, + "capsuleBgLightColor": capsuleBgLightColor, + "capsuleBgDarkColor": capsuleBgDarkColor, + "capsuleBorderLightColor": capsuleBorderLightColor, + "capsuleBorderDarkColor": capsuleBorderDarkColor, + "capsuleDividerLightColor": capsuleDividerLightColor, + "capsuleDividerDarkColor": capsuleDividerDarkColor, + "moreLightImage": moreLightImage, + "moreDarkImage": moreDarkImage, + "moreBtnWidth": moreBtnWidth, + "moreBtnLeftMargin": moreBtnLeftMargin, + "closeLightImage": closeLightImage, + "closeDarkImage": closeDarkImage, + "closeBtnWidth": closeBtnWidth, + "closeBtnLeftMargin": closeBtnLeftMargin, + }; + } +} + +class FloatWindowConfig { + bool floatMode = false; + int x; + int y; + int width; + int height; + + FloatWindowConfig(this.floatMode, this.x, this.y, this.width, this.height); + + Map toMap() { + return { + "floatMode": floatMode, + "x": x, + "y": y, + "width": width, + "height": height + }; + } +} + +enum Anim { + SlideFromLeftToRightAnim, + SlideFromRightToLeftAnim, + SlideFromTopToBottomAnim, + SlideFromBottomToTopAnim, + FadeInAnim, + NoneAnim } class Mop { @@ -48,7 +221,8 @@ class Mop { // init _channel = const MethodChannel('mop'); _channel.setMethodCallHandler(_handlePlatformMethodCall); - _mopEventChannel = const EventChannel('plugins.mop.finogeeks.com/mop_event'); + _mopEventChannel = + const EventChannel('plugins.mop.finogeeks.com/mop_event'); _mopEventChannel.receiveBroadcastStream().listen((dynamic value) { debugPrint('matrix: receiveBroadcastStream $value'); for (Map m in _mopEventQueye) { @@ -89,33 +263,54 @@ class Mop { /// /// initialize mop miniprogram engine. /// 初始化小程序 - /// [appkey] is required. it can be getted from api.finclip.com + /// [sdkkey] is required. it can be getted from api.finclip.com /// [secret] is required. it can be getted from api.finclip.com /// [apiServer] is optional. the mop server address. default is https://mp.finogeek.com /// [apiPrefix] is optional. the mop server prefix. default is /api/v1/mop /// [cryptType] is optional. cryptType, should be MD5/SM /// [disablePermission] is optional. + /// [encryptServerData] 是否对服务器数据进行加密,需要服务器支持 + /// [userId] 用户id + /// [finStoreConfigs] 多服务配置 + /// [uiConfig] UI配置 + /// [debug] 设置debug模式,影响调试和日志 + /// [customWebViewUserAgent] 设置自定义webview ua + /// [appletIntervalUpdateLimit] 设置小程序批量更新周期 + /// [maxRunningApplet] 设置最大同时运行小程序个数 /// - Future initialize(String appkey, String secret, - { String? apiServer, - String? apiPrefix, - String? cryptType, - bool? disablePermission, - String? userId, - bool encryptServerData = false, - bool debug = false, - bool bindAppletWithMainProcess = false}) async { + Future initialize( + String sdkkey, + String secret, { + String? apiServer, + String? apiPrefix, + String? cryptType, + bool encryptServerData = false, + bool disablePermission = false, + String? userId, + bool debug = false, + bool bindAppletWithMainProcess = false, + List? finStoreConfigs, + UIConfig? uiConfig, + String? customWebViewUserAgent, + int appletIntervalUpdateLimit = 0, + int maxRunningApplet = 5, + }) async { final Map ret = await _channel.invokeMethod('initialize', { - 'appkey': appkey, + 'appkey': sdkkey, 'secret': secret, 'apiServer': apiServer, 'apiPrefix': apiPrefix, 'cryptType': cryptType, + "encryptServerData": encryptServerData, 'disablePermission': disablePermission, 'userId': userId, - "encryptServerData": encryptServerData, "debug": debug, - "bindAppletWithMainProcess": bindAppletWithMainProcess + "bindAppletWithMainProcess": bindAppletWithMainProcess, + "finStoreConfigs": finStoreConfigs?.map((e) => e.toMap()), + "uiConfig": uiConfig?.toMap(), + "customWebViewUserAgent": customWebViewUserAgent, + "appletIntervalUpdateLimit": appletIntervalUpdateLimit, + "maxRunningApplet": maxRunningApplet }); return ret; } @@ -132,14 +327,11 @@ class Mop { /// [cryptType] is optional. cryptType, should be MD5/SM Future openApplet( final String appId, { - final String? path, - final String? query, - final int? sequence, - final String? apiServer, - final String? apiPrefix, - final String? fingerprint, - final String? cryptType, - final String? scene, + final String? path, + final String? query, + final int? sequence, + final String? apiServer, + final String? scene, }) async { Map params = {'appId': appId}; Map param = {}; @@ -148,9 +340,6 @@ class Mop { if (param.length > 0) params["params"] = param; if (sequence != null) params["sequence"] = sequence; if (apiServer != null) params["apiServer"] = apiServer; - if (apiPrefix != null) params["apiPrefix"] = apiPrefix; - if (fingerprint != null) params["fingerprint"] = fingerprint; - if (cryptType != null) params["cryptType"] = cryptType; if (scene != null) param["scene"] = scene; final Map ret = await _channel.invokeMethod('openApplet', params); return ret; @@ -228,7 +417,7 @@ class Mop { return handler.getUserInfo(); }; _extensionApis["getCustomMenus"] = (params) async { - final res = await handler.getCustomMenus(params["appId"]); + final res = await handler.getCustomMenus(params["appId"]); List> list = []; res.forEach((element) { Map map = Map(); @@ -242,7 +431,8 @@ class Mop { return list; }; _extensionApis["onCustomMenuClick"] = (params) async { - return handler.onCustomMenuClick(params["appId"], params["path"], params["menuId"], params["appInfo"]); + return handler.onCustomMenuClick( + params["appId"], params["path"], params["menuId"], params["appInfo"]); }; _extensionApis["appletDidOpen"] = (params) async { return handler.appletDidOpen(params["appId"]); @@ -274,23 +464,6 @@ class Mop { return; } - //20211220新增Api - - //配置多个服务器 - Future setFinStoreConfigs(List configs) async {} - - //定制ui样式 - Future setUiConfig() async {} - - //自定义ua setUiConfig包含设置ua - Future setCustomWebViewUserAgent(String ua) async {} - - //支持指定服务器,启动参数,支持扫码打开小程序参数 之前已实现 启动参数 扫码打开小程序 - Future startApplet() async {} - - //定时批量更新小程序的数量 - Future setAppletIntervalUpdateLimit(int count) async {} - //关闭小程序 Future closeApplet(String appletId, bool animated) async { await _channel.invokeMethod( @@ -305,25 +478,26 @@ class Mop { return; } - //删除小程序 removeUsedApplet? 删掉缓存小程序包 - Future removeApplet(String appletId) async { - await _channel.invokeMethod("removeApplet", {"appletId": appletId}); + //设置小程序切换动画 安卓 + Future setActivityTransitionAnim(Anim anim) async { + await _channel + .invokeMethod("setActivityTransitionAnim", {"anim": anim.name}); return; } - //设置小程序切换动画 安卓 - Future setActivityTransitionAnim() async {} - //发送事件给小程序 - Future sendCustomEvent(Map eventData) async { - await _channel.invokeMethod("sendCustomEvent", {"eventData": eventData}); + Future sendCustomEvent( + String appId, Map eventData) async { + await _channel.invokeMethod( + "sendCustomEvent", {"appId": appId, "eventData": eventData}); return; } //原生调用js - Future callJS(String eventName, String nativeViewId, + Future callJS(String appId, String eventName, String nativeViewId, Map eventData) async { await _channel.invokeMethod("callJS", { + "appId": appId, "eventName": eventName, "nativeViewId": nativeViewId, "eventData": eventData From 43d73dfdc7fa71b8563059662b0639a6102ea174 Mon Sep 17 00:00:00 2001 From: kangxuyao Date: Wed, 22 Dec 2021 14:38:24 +0800 Subject: [PATCH 019/107] =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/mop.dart | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/lib/mop.dart b/lib/mop.dart index dc59128..8420bff 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -11,14 +11,26 @@ typedef MopEventErrorCallback = void Function(dynamic event); typedef ExtensionApiHandler = Future Function(dynamic params); class FinStoreConfig { - String sdkKey; //创建应用时生成的SDK Key - String sdkSecret; //创建应用时生成的SDK secret - String apiServer; //服务器地址,客户部署的后台地址 + ///创建应用时生成的SDK Key + String sdkKey; - String apmServer; //apm统计服务器的地址,如果不填,则默认与apiServer一致 - String cryptType; //网络接口加密类型,默认为MD5 国密SM - String? fingerprint; //SDK指纹 证联环境(https://open.fdep.cn/) 时必填,其他环境的不用填 - bool encryptServerData; //是否需要接口加密验证(初始化多服务器时使用)默认为不开启,当设置为YES时开启,接口返回加密数据并处理 + ///创建应用时生成的SDK secret + String sdkSecret; + + ///服务器地址,客户部署的后台地址 + String apiServer; + + ///apm统计服务器的地址,如果不填,则默认与apiServer一致 + String apmServer; + + ///网络接口加密类型,默认为MD5 国密SM + String cryptType; + + ///SDK指纹 证联环境(https://open.fdep.cn/) 时必填,其他环境的不用填 + String? fingerprint; + + ///是否需要接口加密验证(初始化多服务器时使用)默认为不开启,当设置为YES时开启,接口返回加密数据并处理 + bool encryptServerData; FinStoreConfig(this.sdkKey, this.sdkSecret, this.apiServer, this.apmServer, {this.cryptType = "MD5", From 31b1c35a36f6c005eb5775c7b3c190b48e459d17 Mon Sep 17 00:00:00 2001 From: wangtao Date: Wed, 22 Dec 2021 17:32:18 +0800 Subject: [PATCH 020/107] =?UTF-8?q?feat:=20iOS=E7=AB=AF=E6=96=B0=E5=A2=9EA?= =?UTF-8?q?pi=E7=9A=84=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOP_finishRunningApplet.h | 2 +- ios/Classes/Api/MOP_initialize.h | 12 ++- ios/Classes/Api/MOP_initialize.m | 110 ++++++++++++++++++---- ios/Classes/Api/MOP_sendCustomEvent.h | 2 +- ios/Classes/Utils/MOPTools.h | 3 + ios/Classes/Utils/MOPTools.m | 85 +++++++++++++++++ ios/mop.podspec | 4 +- lib/mop.dart | 11 +++ 8 files changed, 205 insertions(+), 24 deletions(-) diff --git a/ios/Classes/Api/MOP_finishRunningApplet.h b/ios/Classes/Api/MOP_finishRunningApplet.h index da8c676..33a1cc2 100644 --- a/ios/Classes/Api/MOP_finishRunningApplet.h +++ b/ios/Classes/Api/MOP_finishRunningApplet.h @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MOP_finishRunningApplet : MOPBaseApi -@property (nonatomic, copy) NSString appletId; +@property (nonatomic, copy) NSString *appletId; @property (nonatomic, assign) BOOL animated; @end diff --git a/ios/Classes/Api/MOP_initialize.h b/ios/Classes/Api/MOP_initialize.h index 349c5a3..f3a7ded 100644 --- a/ios/Classes/Api/MOP_initialize.h +++ b/ios/Classes/Api/MOP_initialize.h @@ -11,15 +11,21 @@ NS_ASSUME_NONNULL_BEGIN @interface MOP_initialize : MOPBaseApi -@property (nonatomic, copy) NSString *appkey; +@property (nonatomic, copy) NSString *sdkkey; @property (nonatomic, copy) NSString *secret; @property (nonatomic, copy) NSString *apiServer; @property (nonatomic, copy) NSString *apiPrefix; @property (nonatomic, copy) NSString *cryptType; -@property (nonatomic, copy) NSString *userId; -@property (nonatomic, assign) BOOL disablePermission; @property (nonatomic, assign) BOOL encryptServerData; +@property (nonatomic, copy) NSString *userId; +@property (nonatomic, strong) NSArray *finStoreConfigs; +@property (nonatomic, strong) NSDictionary *uiConfig; +@property (nonatomic, copy) NSString *customWebViewUserAgent; +@property (nonatomic, assign) BOOL disablePermission; +@property (nonatomic, assign) NSInteger appletIntervalUpdateLimit; +@property (nonatomic, assign) NSInteger maxRunningApplet; + @end NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Api/MOP_initialize.m b/ios/Classes/Api/MOP_initialize.m index e774594..067a581 100644 --- a/ios/Classes/Api/MOP_initialize.m +++ b/ios/Classes/Api/MOP_initialize.m @@ -8,14 +8,15 @@ #import "MOP_initialize.h" #import #import +#import "MOPTools.h" // #import @implementation MOP_initialize - (void)setupApiWithSuccess:(void (^)(NSDictionary * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel { - if (!self.appkey || !self.secret) { - failure(@"appkey 或 secret不能为空"); + if (!self.sdkkey || !self.secret) { + failure(@"sdkkey 或 secret不能为空"); return; } if (!self.apiServer || [self.apiServer isEqualToString:@""]) { @@ -24,27 +25,102 @@ if (!self.apiPrefix|| [self.apiPrefix isEqualToString:@""]) { self.apiPrefix = @"/api/v1/mop"; } - FATConfig *config = [FATConfig configWithAppSecret:self.secret appKey:self.appkey]; - config.apiServer = [self.apiServer copy]; - config.apiPrefix = [self.apiPrefix copy]; - if([self.cryptType isEqualToString: @"SM"]) - { - config.cryptType = FATApiCryptTypeSM; + FATConfig *config; + if (_finStoreConfigs && _finStoreConfigs.count > 0) { + NSMutableArray *storeArrayM = [NSMutableArray array]; + for (NSDictionary *dict in _finStoreConfigs) { + FATStoreConfig *storeConfig = [[FATStoreConfig alloc] init]; + storeConfig.sdkKey = dict[@"sdkKey"]; + // storeConfig.sdkKey = @"22LyZEib0gLTQdU3MUauAb4V4W8Uxd/gMgmH8Hg1bGQ="; + storeConfig.sdkSecret = @"703b9026be3d6bc5"; + storeConfig.apiServer = dict[@"apiServer"]; + storeConfig.apmServer = dict[@"apmServer"]; + storeConfig.fingerprint = dict[@"fingerprint"]; + if ([@"SM" isEqualToString:dict[@"cryptType"]]) { + storeConfig.cryptType = FATApiCryptTypeSM; + } else { + storeConfig.cryptType = FATApiCryptTypeMD5; + } + storeConfig.encryptServerData = [dict[@"encryptServerData"] boolValue]; + [storeArrayM addObject:storeConfig]; + } + config = [FATConfig configWithStoreConfigs:storeArrayM]; + } else { + config = [FATConfig configWithAppSecret:self.secret appKey:self.sdkkey]; + config.apiServer = [self.apiServer copy]; + config.apiPrefix = [self.apiPrefix copy]; + if([self.cryptType isEqualToString: @"SM"]) + { + config.cryptType = FATApiCryptTypeSM; + } + else + { + config.cryptType = FATApiCryptTypeMD5; + } + + // encryptServerData + NSLog(@"encryptServerData:%d",self.encryptServerData); + config.encryptServerData = self.encryptServerData; } - else - { - config.cryptType = FATApiCryptTypeMD5; - } - config.currentUserId = [self.userId copy]; - // encryptServerData - NSLog(@"encryptServerData:%d",self.encryptServerData); - config.encryptServerData = self.encryptServerData; - + NSLog(@"disablePermission:%d",self.disablePermission); config.disableAuthorize = self.disablePermission; + config.currentUserId = [self.userId copy]; + config.appletIntervalUpdateLimit = self.appletIntervalUpdateLimit; + +// bool debug = false, +// bool bindAppletWithMainProcess = false, +// List? finStoreConfigs, +// UIConfig? uiConfig, +// String? customWebViewUserAgent, +// int appletIntervalUpdateLimit = 0, +// int maxRunningApplet = 5, + NSError* error = nil; FATUIConfig *uiconfig = [[FATUIConfig alloc]init]; uiconfig.autoAdaptDarkMode = YES; + if (_uiConfig) { + if (_uiConfig[@"navigationTitleTextAttributes"]) { + uiconfig.navigationTitleTextAttributes = _uiConfig[@"navigationTitleTextAttributes"]; + } + if (_uiConfig[@"progressBarColor"]) { + uiconfig.progressBarColor = [MOPTools colorWithRGBHex:[_uiConfig[@"progressBarColor"] intValue]]; + } + uiconfig.hideBackToHome = [_uiConfig[@"isHideBackHome"] boolValue]; + uiconfig.hideFeedbackMenu = [_uiConfig[@"isHideFeedbackAndComplaints"] boolValue]; + uiconfig.hideForwardMenu = [_uiConfig[@"isHideForwardMenu"] boolValue]; + uiconfig.autoAdaptDarkMode = [_uiConfig[@"autoAdaptDarkMode"] boolValue]; + + uiconfig.appletText = _uiConfig[@"appletText"]; + uiconfig.hideTransitionCloseButton = [_uiConfig[@"hideTransitionCloseButton"] boolValue]; + uiconfig.disableSlideCloseAppletGesture = _uiConfig[@"disableSlideCloseAppletGesture"]; + if (_uiConfig[@"capsuleConfig"]) { + NSDictionary *capsuleConfigDic = _uiConfig[@"capsuleConfig"]; + FATCapsuleConfig *capsuleConfig = [[FATCapsuleConfig alloc]init]; + capsuleConfig.capsuleWidth = [capsuleConfigDic[@"capsuleWidth"] floatValue]; + capsuleConfig.capsuleHeight = [capsuleConfigDic[@"capsuleHeight"] floatValue]; + capsuleConfig.capsuleRightMargin = [capsuleConfigDic[@"capsuleRightMargin"] floatValue]; + capsuleConfig.capsuleCornerRadius = [capsuleConfigDic[@"capsuleCornerRadius"] floatValue]; + capsuleConfig.capsuleBorderWidth = [capsuleConfigDic[@"capsuleBorderWidth"] floatValue]; + capsuleConfig.moreBtnWidth = [capsuleConfigDic[@"moreBtnWidth"] floatValue]; + capsuleConfig.moreBtnLeftMargin = [capsuleConfigDic[@"moreBtnLeftMargin"] floatValue]; + capsuleConfig.closeBtnWidth = [capsuleConfigDic[@"closeBtnWidth"] floatValue]; + capsuleConfig.closeBtnLeftMargin = [capsuleConfigDic[@"closeBtnLeftMargin"] floatValue]; + + + capsuleConfig.capsuleBorderLightColor = [MOPTools colorWithRGBHex:[capsuleConfigDic[@"capsuleBorderLightColor"] intValue]]; + capsuleConfig.capsuleBorderDarkColor = [MOPTools colorWithRGBHex:[capsuleConfigDic[@"capsuleBorderDarkColor"] intValue]]; + capsuleConfig.capsuleBgLightColor = [MOPTools colorWithRGBHex:[capsuleConfigDic[@"capsuleBgLightColor"] intValue]]; + capsuleConfig.capsuleBgDarkColor = [MOPTools colorWithRGBHex:[capsuleConfigDic[@"capsuleBgDarkColor"] intValue]]; + capsuleConfig.capsuleDividerLightColor = [MOPTools colorWithRGBHex:[capsuleConfigDic[@"capsuleDividerLightColor"] intValue]]; + capsuleConfig.capsuleDividerDarkColor = [MOPTools colorWithRGBHex:[capsuleConfigDic[@"capsuleDividerDarkColor"] intValue]]; + uiconfig.capsuleConfig = capsuleConfig; + + } + + } + uiconfig.appendingCustomUserAgent = self.customWebViewUserAgent; + // uiconfig.moreMenuStyle = FATMoreViewStyleNormal; [[FATClient sharedClient] initWithConfig:config uiConfig:uiconfig error:&error]; if (error) { diff --git a/ios/Classes/Api/MOP_sendCustomEvent.h b/ios/Classes/Api/MOP_sendCustomEvent.h index 2218594..39436be 100644 --- a/ios/Classes/Api/MOP_sendCustomEvent.h +++ b/ios/Classes/Api/MOP_sendCustomEvent.h @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MOP_sendCustomEvent : MOPBaseApi -@property (nonatomic, strong) NSDictonary *eventData; +@property (nonatomic, strong) NSDictionary *eventData; @end NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Utils/MOPTools.h b/ios/Classes/Utils/MOPTools.h index b136dbe..af53889 100644 --- a/ios/Classes/Utils/MOPTools.h +++ b/ios/Classes/Utils/MOPTools.h @@ -13,6 +13,9 @@ NS_ASSUME_NONNULL_BEGIN + (UIViewController *)topViewController; + (UIViewController *)topViewController:(UIViewController *)rootViewController; ++ (UIColor *)colorWithRGBHex:(UInt32)hex; + ++ (UIColor *)fat_colorWithHexString:(NSString *)hexColor; @end NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Utils/MOPTools.m b/ios/Classes/Utils/MOPTools.m index e4cd688..236b2be 100644 --- a/ios/Classes/Utils/MOPTools.m +++ b/ios/Classes/Utils/MOPTools.m @@ -28,4 +28,89 @@ return [self topViewController:presentedViewController]; } ++ (UIColor *)colorWithRGBHex:(UInt32)hex +{ + int a = (hex >> 24) & 0xFF; + int r = (hex >> 16) & 0xFF; + int g = (hex >> 8) & 0xFF; + int b = (hex) & 0xFF; + + return [UIColor colorWithRed:r / 255.0f + green:g / 255.0f + blue:b / 255.0f + alpha:a / 255.0f]; +} + ++ (UIColor *)fat_colorWithHexString:(NSString *)hexColor { + if (!hexColor) return nil; + // 兼容black和white + if ([hexColor compare:@"black" options:NSCaseInsensitiveSearch] == NSOrderedSame) { + return UIColor.blackColor; + } else if ([hexColor compare:@"white" options:NSCaseInsensitiveSearch] == NSOrderedSame) { + return UIColor.whiteColor; + } + + NSString *cString = [[hexColor stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] uppercaseString]; + + if (cString.length == 0) return nil; + if ([cString hasPrefix:@"#"]) cString = [cString substringFromIndex:1]; + if ([cString containsString:@"0X"]) cString = [cString stringByReplacingOccurrencesOfString:@"0X" withString:@""]; + + if (cString.length == 3) { // 3位转成6位 + cString = [NSString stringWithFormat:@"%c%c%c%c%c%c", + [cString characterAtIndex:0], + [cString characterAtIndex:0], + [cString characterAtIndex:1], + [cString characterAtIndex:1], + [cString characterAtIndex:2], + [cString characterAtIndex:2]]; + } + if (cString.length == 4) { // 4位转为8位 + cString = [NSString stringWithFormat:@"%c%c%c%c%c%c%c%c", + [cString characterAtIndex:0], + [cString characterAtIndex:0], + [cString characterAtIndex:1], + [cString characterAtIndex:1], + [cString characterAtIndex:2], + [cString characterAtIndex:2], + [cString characterAtIndex:3], + [cString characterAtIndex:3]]; + } + + NSScanner *scanner = [NSScanner scannerWithString:cString]; + unsigned hexNum; + if (![scanner scanHexInt:&hexNum]) return [UIColor blackColor]; + + if (cString.length == 6) { + return [self fat_colorWithRGBHex:hexNum]; + } else if (cString.length == 8) { + return [self fat_colorWithARGBHex:hexNum]; + } + return nil; +} + ++ (UIColor *)fat_colorWithRGBHex:(UInt32)hex { + int red = (hex >> 16) & 0xFF; + int green = (hex >> 8) & 0xFF; + int blue = (hex)&0xFF; + return [UIColor colorWithRed:red / 255.0f green:green / 255.0f blue:blue / 255.0f alpha:1.0f]; +} + ++ (UIColor *)fat_colorWithRGBAlphaHex:(UInt32)hex { + int red = (hex >> 24) & 0xFF; + int green = (hex >> 16) & 0xFF; + int blue = (hex >> 8) & 0xFF; + int alpha = hex & 0xFF; + return [UIColor colorWithRed:red / 255.0f green:green / 255.0f blue:blue / 255.0f alpha:alpha / 255.0f]; +} + ++ (UIColor *)fat_colorWithARGBHex:(UInt32)hex { + int alpha = (hex >> 24) & 0xFF; + int red = (hex >> 16) & 0xFF; + int green = (hex >> 8) & 0xFF; + int blue = hex & 0xFF; + return [UIColor colorWithRed:red / 255.0f green:green / 255.0f blue:blue / 255.0f alpha:alpha / 255.0f]; +} + + @end diff --git a/ios/mop.podspec b/ios/mop.podspec index 4c79944..637578a 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.34.12' - s.dependency 'FinAppletExt' , '2.34.12' + s.dependency 'FinApplet' , '2.34.11' + s.dependency 'FinAppletExt' , '2.34.11' end diff --git a/lib/mop.dart b/lib/mop.dart index dc59128..a4ab508 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -67,6 +67,14 @@ class UIConfig { FloatWindowConfig? floatWindowConfig; + //iOS中独有的设置属性 + //小程序里加载H5页面时进度条的颜色 格式 0xFFFFAA00 + int? progressBarColor; + //是否自适应暗黑模式。如果设置为true,则更多页面、关于等原生页面会随着手机切换暗黑,也自动调整为暗黑模式 + bool autoAdaptDarkMode = true; + //注入小程序统称appletText字符串,默认为“小程序”。 + String? appletText; + Map toMap() { return { "navigationTitleTextAttributes": navigationTitleTextAttributes, @@ -81,6 +89,9 @@ class UIConfig { "disableSlideCloseAppletGesture": disableSlideCloseAppletGesture, "capsuleConfig": capsuleConfig?.toMap(), "floatWindowConfig": floatWindowConfig?.toMap(), + "progressBarColor": progressBarColor, + "autoAdaptDarkMode": autoAdaptDarkMode, + "appletText": appletText }; } } From c17910963f58032d7c1cdf739b9e42db5072d05f Mon Sep 17 00:00:00 2001 From: wangtao Date: Tue, 28 Dec 2021 20:26:23 +0800 Subject: [PATCH 021/107] =?UTF-8?q?fix=EF=BC=9Aios=E7=9A=84=E6=96=B0?= =?UTF-8?q?=E5=A2=9EApi=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/.flutter-plugins-dependencies | 2 +- example/ios/Flutter/Debug.xcconfig | 1 + example/ios/Flutter/Release.xcconfig | 1 + example/ios/Podfile | 49 +++++ example/ios/Podfile.lock | 34 ++++ example/ios/Runner.xcodeproj/project.pbxproj | 92 ++++++++- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- .../contents.xcworkspacedata | 3 + example/lib/main.dart | 191 +++++++++++------- ios/Classes/Api/MOP_initialize.h | 2 +- ios/Classes/Api/MOP_initialize.m | 6 +- ios/Classes/Utils/MOPApiConverter.m | 5 +- lib/mop.dart | 11 +- 13 files changed, 301 insertions(+), 98 deletions(-) create mode 100644 example/ios/Podfile create mode 100644 example/ios/Podfile.lock diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index c260a61..8acb99d 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/kangxuyao/StudioProjects/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"/Users/kangxuyao/.pub-cache/hosted/pub.flutter-io.cn/flutter_plugin_android_lifecycle-2.0.5/","dependencies":[]},{"name":"mop","path":"/Users/kangxuyao/StudioProjects/finclip-flutter-sdk/","dependencies":["flutter_plugin_android_lifecycle"]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"mop","dependencies":["flutter_plugin_android_lifecycle"]}],"date_created":"2021-12-22 09:19:50.961703","version":"2.6.0-12.0.pre.553"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/wangtao/Documents/fantai/code/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"/Users/wangtao/development/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_plugin_android_lifecycle-2.0.5/","dependencies":[]},{"name":"mop","path":"/Users/wangtao/Documents/fantai/code/finclip-flutter-sdk/","dependencies":["flutter_plugin_android_lifecycle"]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"mop","dependencies":["flutter_plugin_android_lifecycle"]}],"date_created":"2021-12-28 10:57:42.321282","version":"2.8.1"} \ No newline at end of file diff --git a/example/ios/Flutter/Debug.xcconfig b/example/ios/Flutter/Debug.xcconfig index 592ceee..ec97fc6 100644 --- a/example/ios/Flutter/Debug.xcconfig +++ b/example/ios/Flutter/Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/example/ios/Flutter/Release.xcconfig b/example/ios/Flutter/Release.xcconfig index 592ceee..c4855bf 100644 --- a/example/ios/Flutter/Release.xcconfig +++ b/example/ios/Flutter/Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/example/ios/Podfile b/example/ios/Podfile new file mode 100644 index 0000000..8933ab5 --- /dev/null +++ b/example/ios/Podfile @@ -0,0 +1,49 @@ +# Uncomment this line to define a global platform for your project +platform :ios, '9.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + target.build_configurations.each do |config| + config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64' + if config.name == "Debug" + config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES' + else + config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO' + end + end + end +end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock new file mode 100644 index 0000000..c5e7489 --- /dev/null +++ b/example/ios/Podfile.lock @@ -0,0 +1,34 @@ +PODS: + - FinApplet (2.34.11) + - FinAppletExt (2.34.11): + - FinApplet (= 2.34.11) + - Flutter (1.0.0) + - mop (0.1.1): + - FinApplet (= 2.34.11) + - FinAppletExt (= 2.34.11) + - Flutter + +DEPENDENCIES: + - Flutter (from `Flutter`) + - mop (from `.symlinks/plugins/mop/ios`) + +SPEC REPOS: + trunk: + - FinApplet + - FinAppletExt + +EXTERNAL SOURCES: + Flutter: + :path: Flutter + mop: + :path: ".symlinks/plugins/mop/ios" + +SPEC CHECKSUMS: + FinApplet: 975a76c8de4c9ddf64d6b4bfcd946ad6830f54f6 + FinAppletExt: 9489276a84f908b60a75a71d09b0b4397e070bee + Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a + mop: 9a49a0b917e4016aa897c76656fddb69ad69b118 + +PODFILE CHECKSUM: 2317ba7584871ae8cd67fd0244fbd5e96fd06167 + +COCOAPODS: 1.11.2 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 035b54e..2d273a5 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,12 +3,13 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 51; objects = { /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 6DB2EFFFC5FD4690C06ACB3A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B691CF78BE1464D3451E07AF /* Pods_Runner.framework */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; @@ -31,10 +32,13 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 207F05A0BE4F11BA62008DCF /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 6793BBA3F03EE46BEAD75979 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 865E64E9FAB2F680272FCE6F /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -42,6 +46,7 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B691CF78BE1464D3451E07AF /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -49,12 +54,31 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 6DB2EFFFC5FD4690C06ACB3A /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 1B5EB5EC57E12758D2A6310E /* Pods */ = { + isa = PBXGroup; + children = ( + 6793BBA3F03EE46BEAD75979 /* Pods-Runner.debug.xcconfig */, + 207F05A0BE4F11BA62008DCF /* Pods-Runner.release.xcconfig */, + 865E64E9FAB2F680272FCE6F /* Pods-Runner.profile.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 8C9832689000ED580600B3AE /* Frameworks */ = { + isa = PBXGroup; + children = ( + B691CF78BE1464D3451E07AF /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -72,6 +96,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, + 1B5EB5EC57E12758D2A6310E /* Pods */, + 8C9832689000ED580600B3AE /* Frameworks */, ); sourceTree = ""; }; @@ -105,12 +131,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + 2DEACE28B1DB5888C31A623A /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 46BA5F59FC1A40CE8339661F /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -127,7 +155,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1300; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -169,6 +197,28 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 2DEACE28B1DB5888C31A623A /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -183,6 +233,23 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; + 46BA5F59FC1A40CE8339661F /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -290,8 +357,11 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.mopExample; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.finclip.demo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -414,8 +484,11 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.mopExample; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.finclip.demo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -433,8 +506,11 @@ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.mopExample; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.finogeeks.finclip.demo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index a28140c..3db53b6 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ + + diff --git a/example/lib/main.dart b/example/lib/main.dart index f29f77f..e212afc 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,5 +1,7 @@ // ignore_for_file: prefer_const_constructors +import 'dart:ffi'; + import 'package:flutter/material.dart'; import 'dart:async'; import 'dart:io'; @@ -21,18 +23,120 @@ class _MyAppState extends State { // Platform messages are asynchronous, so we initialize in an async method. Future init() async { + UIConfig uiconfig = UIConfig(); + //多服务器配置 + + FinStoreConfig storeConfigA = FinStoreConfig( + "2LyZEib0gLTQdU3MUauATBwgfnTCJjdr7FCnywmAEM=", + "bdfd76cae24d4313", + "https://api.finclip.com", + "https://api.finclip.com", + ); + + FinStoreConfig storeConfigB = FinStoreConfig( + "2LyZEib0gLTQdU3MUauATBwgfnTCJjdr7FCnywmAEM=", + "bdfd76cae24d4313", + "https://finchat-mop-b.finogeeks.club", + "https://finchat-mop-b.finogeeks.club", + ); + List storeConfigs = [storeConfigA]; + uiconfig.isAlwaysShowBackInDefaultNavigationBar = false; + uiconfig.isClearNavigationBarNavButtonBackground = false; + uiconfig.isHideFeedbackAndComplaints = true; + uiconfig.isHideBackHome = true; + uiconfig.isHideForwardMenu = true; + uiconfig.hideTransitionCloseButton = true; + uiconfig.disableSlideCloseAppletGesture = true; + CapsuleConfig capsuleConfig = CapsuleConfig(); + capsuleConfig.capsuleBgLightColor = 0x33ff00ee; + capsuleConfig.capsuleRightMargin = 25; + uiconfig.capsuleConfig = capsuleConfig; + uiconfig.appletText = "applet"; + if (Platform.isIOS) { - final res = await Mop.instance.initialize('22LyZEib0gLTQdU3MUauAZ0pZVbKTWGmNN6Lx8hXhIkA', '74bde5fad53a817c', - apiServer: 'https://api.finclip.com', apiPrefix: '/api/v1/mop'); + final res = await Mop.instance.initialize( + '22LyZEib0gLTQdU3MUauATBwgfnTCJjdr7FCnywmAEM=', 'bdfd76cae24d4313', + apiServer: 'https://api.finclip.com', + apiPrefix: '/api/v1/mop', + uiConfig: uiconfig, + finStoreConfigs: storeConfigs); print(res); } else if (Platform.isAndroid) { - final res = await Mop.instance.initialize('22LyZEib0gLTQdU3MUauAZ0pZVbKTWGmNN6Lx8hXhIkA', '74bde5fad53a817c', + final res = await Mop.instance.initialize( + '22LyZEib0gLTQdU3MUauATBwgfnTCJjdr7FCnywmAEM=', 'bdfd76cae24d4313', apiServer: 'https://api.finclip.com', apiPrefix: '/api/v1/mop'); print(res); } if (!mounted) return; } + Widget _buildAppletItem( + String appletId, String itemName, VoidCallback tapAction) { + return GestureDetector( + onTap: tapAction, + child: Container( + padding: EdgeInsets.only(left: 7, right: 7), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(5)), + gradient: LinearGradient( + colors: const [Color(0xFF12767e), Color(0xFF0dabb8)], + stops: const [0.0, 1.0], + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + ), + ), + child: Center( + child: Text( + itemName, + style: TextStyle(color: Colors.white), + ), + ), + ), + ); + } + + Widget _buildAppletWidget(String appletId, String appletName) { + return Container( + margin: EdgeInsets.only(left: 20, top: 30, right: 20), + child: Column( + children: [ + Text( + appletName, + style: TextStyle( + fontSize: 18, fontWeight: FontWeight.w500, color: Colors.red), + ), + SizedBox( + height: 10, + ), + Container( + height: 100, + child: GridView.count( + crossAxisCount: 3, + childAspectRatio: 2, + crossAxisSpacing: 30, + // physics: NeverScrollableScrollPhysics(), + children: [ + _buildAppletItem(appletId, "打开小程序", () { + Mop.instance.openApplet(appletId, + path: 'pages/index/index', query: ''); + }), + _buildAppletItem(appletId, "finishRunningApplet", () { + Mop.instance.finishRunningApplet(appletId, true); + }), + _buildAppletItem(appletId, "removeUsedApplet", () { + Mop.instance.removeUsedApplet(appletId); + }), + // _buildAppletItem(appletId, "removeUsedApplet", () { + // Mop.instance.removeUsedApplet(appletId); + // }), + ], + ), + ) + ], + ), + ); + } + // 5e637a18cbfae4000170fa7a @override Widget build(BuildContext context) { @@ -41,81 +145,12 @@ class _MyAppState extends State { appBar: AppBar( title: const Text('凡泰极客小程序 Flutter 插件'), ), - body: Center( - child: Container( - padding: EdgeInsets.only( - top: 20, - ), - child: Column( - children: [ - Container( - width: 140, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(5)), - gradient: LinearGradient( - colors: const [Color(0xFF12767e), Color(0xFF0dabb8)], - stops: const [0.0, 1.0], - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - ), - ), - child: TextButton( - onPressed: () { - Mop.instance.openApplet('5ea03fa563cb900001d73863', path: 'pages/index/index', query: ''); - }, - child: Text( - '打开画图小程序', - style: TextStyle(color: Colors.white), - ), - ), - ), - SizedBox(height: 30), - Container( - width: 140, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(5)), - gradient: LinearGradient( - colors: const [Color(0xFF12767e), Color(0xFF0dabb8)], - stops: const [0.0, 1.0], - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - ), - ), - child: TextButton( - onPressed: () { - Mop.instance.openApplet('5ea0401463cb900001d73865'); - }, - child: Text( - '打开官方小程序', - style: TextStyle(color: Colors.white), - ), - ), - ), - SizedBox(height: 30), - Container( - width: 140, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(5)), - gradient: LinearGradient( - colors: const [Color(0xFF12767e), Color(0xFF0dabb8)], - stops: const [0.0, 1.0], - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - ), - ), - child: TextButton( - onPressed: () { - Mop.instance.openApplet('5ea0412663cb900001d73867'); - }, - child: Text( - '我的对账单', - style: TextStyle(color: Colors.white), - ), - ), - ), - ], - ), - ), + body: Column( + children: [ + _buildAppletWidget("5facb3a52dcbff00017469bd", "画图小程序"), + _buildAppletWidget("5fa214a29a6a7900019b5cc1", "官方小程序"), + _buildAppletWidget("5fa215459a6a7900019b5cc3", "我的对账单"), + ], ), ), ); diff --git a/ios/Classes/Api/MOP_initialize.h b/ios/Classes/Api/MOP_initialize.h index f3a7ded..fadee96 100644 --- a/ios/Classes/Api/MOP_initialize.h +++ b/ios/Classes/Api/MOP_initialize.h @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MOP_initialize : MOPBaseApi -@property (nonatomic, copy) NSString *sdkkey; +@property (nonatomic, copy) NSString *appkey; @property (nonatomic, copy) NSString *secret; @property (nonatomic, copy) NSString *apiServer; @property (nonatomic, copy) NSString *apiPrefix; diff --git a/ios/Classes/Api/MOP_initialize.m b/ios/Classes/Api/MOP_initialize.m index 067a581..6c6bacf 100644 --- a/ios/Classes/Api/MOP_initialize.m +++ b/ios/Classes/Api/MOP_initialize.m @@ -15,7 +15,7 @@ - (void)setupApiWithSuccess:(void (^)(NSDictionary * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel { - if (!self.sdkkey || !self.secret) { + if (!self.appkey || !self.secret) { failure(@"sdkkey 或 secret不能为空"); return; } @@ -32,7 +32,7 @@ FATStoreConfig *storeConfig = [[FATStoreConfig alloc] init]; storeConfig.sdkKey = dict[@"sdkKey"]; // storeConfig.sdkKey = @"22LyZEib0gLTQdU3MUauAb4V4W8Uxd/gMgmH8Hg1bGQ="; - storeConfig.sdkSecret = @"703b9026be3d6bc5"; + storeConfig.sdkSecret = dict[@"sdkSecret"]; storeConfig.apiServer = dict[@"apiServer"]; storeConfig.apmServer = dict[@"apmServer"]; storeConfig.fingerprint = dict[@"fingerprint"]; @@ -46,7 +46,7 @@ } config = [FATConfig configWithStoreConfigs:storeArrayM]; } else { - config = [FATConfig configWithAppSecret:self.secret appKey:self.sdkkey]; + config = [FATConfig configWithAppSecret:self.secret appKey:self.appkey]; config.apiServer = [self.apiServer copy]; config.apiPrefix = [self.apiPrefix copy]; if([self.cryptType isEqualToString: @"SM"]) diff --git a/ios/Classes/Utils/MOPApiConverter.m b/ios/Classes/Utils/MOPApiConverter.m index 1480042..b5796aa 100644 --- a/ios/Classes/Utils/MOPApiConverter.m +++ b/ios/Classes/Utils/MOPApiConverter.m @@ -88,9 +88,10 @@ id value = container[key]; id safetyValue = [self parseFromKeyValue:value]; - if (!safetyValue) + if (!safetyValue) //如果safetyValue是字典或者数组类型,为nil值时设置成空字符串会产生崩溃 { - safetyValue = @""; +// safetyValue = @""; + continue; } [result setObject:safetyValue forKey:key]; } diff --git a/lib/mop.dart b/lib/mop.dart index 7961d60..0be396e 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -39,7 +39,7 @@ class FinStoreConfig { Map toMap() { return { - "sdkkey": sdkKey, + "sdkKey": sdkKey, "sdkSecret": sdkSecret, "apiServer": apiServer, "apmServer": apmServer, @@ -318,6 +318,9 @@ class Mop { int appletIntervalUpdateLimit = 0, int maxRunningApplet = 5, }) async { + List>? storeConfigs = + finStoreConfigs?.map((e) => e.toMap()).toList(); + final Map ret = await _channel.invokeMethod('initialize', { 'appkey': sdkkey, 'secret': secret, @@ -329,7 +332,7 @@ class Mop { 'userId': userId, "debug": debug, "bindAppletWithMainProcess": bindAppletWithMainProcess, - "finStoreConfigs": finStoreConfigs?.map((e) => e.toMap()), + "finStoreConfigs": storeConfigs, "uiConfig": uiConfig?.toMap(), "customWebViewUserAgent": customWebViewUserAgent, "appletIntervalUpdateLimit": appletIntervalUpdateLimit, @@ -487,14 +490,14 @@ class Mop { return; } - //关闭小程序 + //关闭小程序 小程序会在内存中存在 Future closeApplet(String appletId, bool animated) async { await _channel.invokeMethod( "closeApplet", {"appletId": appletId, "animated": animated}); return; } - //结束小程序 关闭小程序 + //结束小程序 小程序会从内存中清除 Future finishRunningApplet(String appletId, bool animated) async { await _channel.invokeMethod( "finishRunningApplet", {"appletId": appletId, "animated": animated}); From 8ee9c0ffe8dab7ff67cc2d3f7ec49f5e8cb0e98d Mon Sep 17 00:00:00 2001 From: developer Date: Fri, 31 Dec 2021 21:58:47 +0800 Subject: [PATCH 022/107] release: version:2.35.0 --- ios/mop.podspec | 7 ++----- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index db40fbd..129d3b9 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,10 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.35.0-alpha20211231v04' - s.dependency 'FinAppletExt' , '2.35.0-alpha20211231v04' - s.dependency 'FinAppletGDMap' , '2.35.0-alpha20211231v04' - s.dependency 'FinAppletWebRTC' , '2.35.0-alpha20211231v04' - + s.dependency 'FinApplet' , '2.35.0' + s.dependency 'FinAppletExt' , '2.35.0' end diff --git a/pubspec.yaml b/pubspec.yaml index 5b1e732..6338e2d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.34.12' +version: '2.35.0' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From f06ef3f1ce1256fe65935e6f370337f3b5c38657 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Mon, 3 Jan 2022 18:50:10 +0800 Subject: [PATCH 023/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 8fd14ed..1577080 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.35.0-alpha20211231v09' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20220103v02' implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211231v09' } \ No newline at end of file From fcf251d207f23c0caed016c8358d62a2a42bc744 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Tue, 4 Jan 2022 08:57:50 +0800 Subject: [PATCH 024/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 1577080..163fd1b 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.35.0-alpha20220103v02' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20220104v01' implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211231v09' } \ No newline at end of file From ac59adad782d85e32becd37e7f1bfb3d6ecea118 Mon Sep 17 00:00:00 2001 From: wangtao Date: Tue, 4 Jan 2022 15:11:24 +0800 Subject: [PATCH 025/107] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9iOS?= =?UTF-8?q?=E5=9C=A89.0=E7=B3=BB=E7=BB=9F=E4=B8=8ABOOL=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=B4=A9=E6=BA=83=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOP_initialize.h | 4 ++-- ios/Classes/Api/MOP_webViewBounces.h | 2 +- ios/mop.podspec | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ios/Classes/Api/MOP_initialize.h b/ios/Classes/Api/MOP_initialize.h index 349c5a3..22f3ac9 100644 --- a/ios/Classes/Api/MOP_initialize.h +++ b/ios/Classes/Api/MOP_initialize.h @@ -17,8 +17,8 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString *apiPrefix; @property (nonatomic, copy) NSString *cryptType; @property (nonatomic, copy) NSString *userId; -@property (nonatomic, assign) BOOL disablePermission; -@property (nonatomic, assign) BOOL encryptServerData; +@property (nonatomic, assign) bool disablePermission; +@property (nonatomic, assign) bool encryptServerData; @end diff --git a/ios/Classes/Api/MOP_webViewBounces.h b/ios/Classes/Api/MOP_webViewBounces.h index 0d15f9b..3f4afde 100644 --- a/ios/Classes/Api/MOP_webViewBounces.h +++ b/ios/Classes/Api/MOP_webViewBounces.h @@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MOP_webViewBounces : MOPBaseApi -@property (nonatomic, assign) BOOL bounces; +@property (nonatomic, assign) bool bounces; @end diff --git a/ios/mop.podspec b/ios/mop.podspec index 129d3b9..5fa25e8 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,9 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.35.0' - s.dependency 'FinAppletExt' , '2.35.0' + s.dependency 'FinApplet' , '2.35.0-alpha20211231v07' + s.dependency 'FinAppletExt' , '2.35.0-alpha20211231v07' + s.dependency 'FinAppletGDMap' , '2.35.0-alpha20211231v07' + s.dependency 'FinAppletWebRTC' , '2.35.0-alpha20211231v07' end From 9b32901021342f1a7657f5f46146d931002bae2b Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Tue, 4 Jan 2022 17:45:01 +0800 Subject: [PATCH 026/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 163fd1b..f169d78 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.35.0-alpha20220104v01' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20220104v11' implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211231v09' } \ No newline at end of file From 5615306d23347695837f1a561085f826080f755d Mon Sep 17 00:00:00 2001 From: developer Date: Wed, 5 Jan 2022 09:58:19 +0800 Subject: [PATCH 027/107] release: version:2.35.0 --- ios/mop.podspec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index 5fa25e8..129d3b9 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,9 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.35.0-alpha20211231v07' - s.dependency 'FinAppletExt' , '2.35.0-alpha20211231v07' - s.dependency 'FinAppletGDMap' , '2.35.0-alpha20211231v07' - s.dependency 'FinAppletWebRTC' , '2.35.0-alpha20211231v07' + s.dependency 'FinApplet' , '2.35.0' + s.dependency 'FinAppletExt' , '2.35.0' end From 425120e95c205a5a35143732367f581f92873409 Mon Sep 17 00:00:00 2001 From: kangxuyao Date: Wed, 5 Jan 2022 15:24:31 +0800 Subject: [PATCH 028/107] =?UTF-8?q?=E5=AE=9E=E7=8E=B0flutter=E5=8E=9F?= =?UTF-8?q?=E7=94=9F=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mop/api/mop/AppletManageModule.java | 78 ++++++++- .../finogeeks/mop/api/mop/AppletModule.java | 16 +- .../com/finogeeks/mop/api/mop/BaseModule.java | 34 +++- .../mop/api/mop/ExtensionApiModule.java | 156 ++++++++++++------ example/.flutter-plugins-dependencies | 2 +- lib/mop.dart | 4 +- 6 files changed, 228 insertions(+), 62 deletions(-) diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/AppletManageModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/AppletManageModule.java index 216c4ae..4593530 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/AppletManageModule.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/AppletManageModule.java @@ -1,11 +1,20 @@ package com.finogeeks.mop.api.mop; import android.content.Context; +import android.util.Log; +import com.finogeeks.lib.applet.anim.FadeInAnim; +import com.finogeeks.lib.applet.anim.NoneAnim; +import com.finogeeks.lib.applet.anim.SlideFromBottomToTopAnim; +import com.finogeeks.lib.applet.anim.SlideFromLeftToRightAnim; +import com.finogeeks.lib.applet.anim.SlideFromRightToLeftAnim; +import com.finogeeks.lib.applet.anim.SlideFromTopToBottomAnim; import com.finogeeks.lib.applet.client.FinAppClient; import com.finogeeks.lib.applet.db.entity.FinApplet; +import com.finogeeks.lib.applet.interfaces.FinCallback; import com.finogeeks.mop.api.BaseApi; import com.finogeeks.mop.interfaces.ICallback; +import com.google.gson.Gson; import java.util.HashMap; import java.util.Map; @@ -13,13 +22,16 @@ import java.util.Map; public class AppletManageModule extends BaseApi { + private static final String TAG = "AppletManageModule"; + public AppletManageModule(Context context) { super(context); } @Override public String[] apis() { - return new String[]{"currentApplet", "closeAllApplets", "clearApplets", "removeUsedApplet"}; + return new String[]{"currentApplet", "closeAllApplets", "clearApplets", "removeUsedApplet", + "setActivityTransitionAnim", "sendCustomEvent", "callJS"}; } @Override @@ -57,6 +69,70 @@ public class AppletManageModule extends BaseApi { } else { callback.onFail(null); } + } else if (event.equals("setActivityTransitionAnim")) { + String anim = (String) param.get("anim"); + Log.d(TAG, "setActivityTransitionAnim:" + anim); + if ("SlideFromLeftToRightAnim".equals(anim)) { + FinAppClient.INSTANCE.getAppletApiManager().setActivityTransitionAnim(SlideFromLeftToRightAnim.INSTANCE); + } else if ("SlideFromRightToLeftAnim".equals(anim)) { + FinAppClient.INSTANCE.getAppletApiManager().setActivityTransitionAnim(SlideFromRightToLeftAnim.INSTANCE); + } else if ("SlideFromTopToBottomAnim".equals(anim)) { + FinAppClient.INSTANCE.getAppletApiManager().setActivityTransitionAnim(SlideFromTopToBottomAnim.INSTANCE); + } else if ("SlideFromBottomToTopAnim".equals(anim)) { + FinAppClient.INSTANCE.getAppletApiManager().setActivityTransitionAnim(SlideFromBottomToTopAnim.INSTANCE); + } else if ("FadeInAnim".equals(anim)) { + FinAppClient.INSTANCE.getAppletApiManager().setActivityTransitionAnim(FadeInAnim.INSTANCE); + } else if ("NoneAnim".equals(anim)) { + FinAppClient.INSTANCE.getAppletApiManager().setActivityTransitionAnim(NoneAnim.INSTANCE); + } + callback.onSuccess(null); + } else if (event.equals("sendCustomEvent")) { + String appId = (String) param.get("appId"); + Map eventData = (Map) param.get("eventData"); + Log.d(TAG, "sendCustomEvent:" + appId); + if (appId != null) { + FinAppClient.INSTANCE.getAppletApiManager().sendCustomEvent(appId, eventData == null ? "" : new Gson().toJson(eventData)); + callback.onSuccess(null); + } else { + callback.onFail(null); + } + } else if (event.equals("callJS")) { + String appId = (String) param.get("appId"); + String eventName = (String) param.get("eventName"); + String nativeViewId = (String) param.get("nativeViewId"); + int viewId = 0; + if (nativeViewId != null && !nativeViewId.equals("")) { + try { + viewId = Integer.parseInt(nativeViewId); + } catch (Exception e) { + e.printStackTrace(); + } + } + Map eventData = (Map) param.get("eventData"); + Log.d(TAG, "callJS:" + appId); + if (appId != null && eventName != null) { + FinAppClient.INSTANCE.getAppletApiManager().callJS(appId, eventName, eventData == null ? "" : new Gson().toJson(eventData), + viewId, new FinCallback() { + @Override + public void onSuccess(String s) { + Map res = new HashMap<>(); + res.put("data", s); + callback.onSuccess(res); + } + + @Override + public void onError(int i, String s) { + callback.onFail(null); + } + + @Override + public void onProgress(int i, String s) { + + } + }); + } else { + callback.onFail(null); + } } } } diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java index 15a7494..d9cc4a0 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java @@ -5,6 +5,7 @@ import android.text.TextUtils; import android.util.Log; import com.finogeeks.lib.applet.client.FinAppClient; +import com.finogeeks.lib.applet.client.FinAppInfo; import com.finogeeks.lib.applet.sdk.model.StartAppletDecryptRequest; import com.finogeeks.mop.api.BaseApi; import com.finogeeks.mop.interfaces.ICallback; @@ -53,19 +54,20 @@ public class AppletModule extends BaseApi { String appId = String.valueOf(param.get("appId")); Integer sequence = (Integer) param.get("sequence"); Map params = (Map) param.get("params"); + String apiServer = (String) param.get("apiServer"); // mContext是FlutterActivity, // 在Android 6.0、7.0系统的部分设备中热启动小程序时,如果context参数用mContext,会出现无法启动小程序的问题 // 所以这里使用Application Context Context context = mContext.getApplicationContext(); - if (params == null) { - if (sequence == null) { - FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, appId); - } else { - FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, appId, sequence, null); - } + FinAppInfo.StartParams startParams = params == null ? null : new FinAppInfo.StartParams(params.get("path"), params.get("query"), params.get("scene")); + Log.d(TAG, "openApplet:" + appId + "," + param + "," + sequence + "," + apiServer); + + if (apiServer != null) { + FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, apiServer, appId, sequence, startParams); } else { - FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, appId, params); + FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, appId, sequence, startParams); } + // String apiServer = (String) param.get("apiServer"); // String apiPrefix = (String) param.get("apiPrefix"); // if (apiServer == null || apiServer.isEmpty() || apiPrefix == null || apiPrefix.isEmpty()) { diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java index f892b22..1db0bb0 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/BaseModule.java @@ -2,6 +2,7 @@ package com.finogeeks.mop.api.mop; import android.app.Application; import android.content.Context; +import android.util.Log; import com.finogeeks.lib.applet.BuildConfig; import com.finogeeks.lib.applet.client.FinAppClient; @@ -11,6 +12,8 @@ import com.finogeeks.lib.applet.interfaces.FinCallback; import com.finogeeks.mop.api.BaseApi; import com.finogeeks.mop.interfaces.ICallback; import com.finogeeks.mop.service.MopPluginService; +import com.google.gson.Gson; +import com.google.gson.reflect.TypeToken; import java.util.ArrayList; import java.util.List; @@ -74,7 +77,22 @@ public class BaseModule extends BaseApi { Boolean bindAppletWithMainProcess = (Boolean) param.get("bindAppletWithMainProcess"); if (bindAppletWithMainProcess == null) bindAppletWithMainProcess = false; - FinAppConfig config = new FinAppConfig.Builder() + String customWebViewUserAgent = (String) param.get("customWebViewUserAgent"); + Integer appletIntervalUpdateLimit = (Integer) param.get("appletIntervalUpdateLimit"); + Integer maxRunningApplet = (Integer) param.get("maxRunningApplet"); + Gson gson = new Gson(); + List finStoreConfigs = null; + if (param.get("finStoreConfigs") != null) { + finStoreConfigs = gson.fromJson(gson.toJson(param.get("finStoreConfigs")), new TypeToken>() { + }.getType()); + } + FinAppConfig.UIConfig uiConfig = null; + if (param.get("uiConfig") != null) { + uiConfig = gson.fromJson(gson.toJson(param.get("uiConfig")), FinAppConfig.UIConfig.class); + } + + + FinAppConfig.Builder builder = new FinAppConfig.Builder() .setSdkKey(appkey) .setSdkSecret(secret) .setApiUrl(apiServer) @@ -84,8 +102,18 @@ public class BaseModule extends BaseApi { .setUserId(userId) .setDebugMode(debug) .setDisableRequestPermissions(disablePermission) - .setBindAppletWithMainProcess(bindAppletWithMainProcess) - .build(); + .setBindAppletWithMainProcess(bindAppletWithMainProcess); + + if (customWebViewUserAgent != null) + builder.setCustomWebViewUserAgent(customWebViewUserAgent); + if (appletIntervalUpdateLimit != null) + builder.setAppletIntervalUpdateLimit(appletIntervalUpdateLimit); + if (maxRunningApplet != null) builder.setMaxRunningApplet(maxRunningApplet); + if (finStoreConfigs != null) builder.setFinStoreConfigs(finStoreConfigs); + if (uiConfig != null) builder.setUiConfig(uiConfig); + + FinAppConfig config = builder.build(); + Log.d(TAG, "config:" + gson.toJson(config)); final Application application = MopPluginService.getInstance().getActivity().getApplication(); // SDK初始化结果回调,用于接收SDK初始化状态 diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/ExtensionApiModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/ExtensionApiModule.java index b6cc51f..3e07c59 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/ExtensionApiModule.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/ExtensionApiModule.java @@ -33,66 +33,126 @@ public class ExtensionApiModule extends BaseApi { @Override public String[] apis() { - return new String[]{"registerExtensionApi"}; + return new String[]{"registerExtensionApi","addWebExtentionApi"}; } @Override public void invoke(String s, Map param, ICallback iCallback) { - MethodChannel channel = MopPluginService.getInstance().getMethodChannel(); - String name = (String) param.get("name"); - FinAppClient.INSTANCE.getExtensionApiManager().registerApi(new com.finogeeks.lib.applet.api.BaseApi(getContext()) { - @Override - public String[] apis() { - return new String[]{name}; - } + if(s.equals("registerExtensionApi")) { + MethodChannel channel = MopPluginService.getInstance().getMethodChannel(); + String name = (String) param.get("name"); + Log.d(TAG, "registerExtensionApi:" + name); + FinAppClient.INSTANCE.getExtensionApiManager().registerApi(new com.finogeeks.lib.applet.api.BaseApi(getContext()) { + @Override + public String[] apis() { + return new String[]{name}; + } - @Override - public void invoke(String s, JSONObject jsonObject, com.finogeeks.lib.applet.interfaces.ICallback iCallback) { - Log.d("MopPlugin", "invoke extensionApi:" + s + ",params:" + jsonObject); - Map params = GsonUtil.gson.fromJson(jsonObject.toString(), HashMap.class); - handler.post(() -> { - channel.invokeMethod("extensionApi:" + name, params, new MethodChannel.Result() { - @Override - public void success(Object result) { - String json = GsonUtil.gson.toJson(result); - FinAppTrace.d(ExtensionApiModule.TAG, "channel invokeMethod:" + name - + " success, result=" + result + ", json=" + json); - JSONObject ret = null; - if (json != null && !json.equals("null")) { - try { - ret = new JSONObject(json); - if (ret.has("errMsg")) { - String errMsg = ret.getString("errMsg"); - if (errMsg.startsWith(name + ":fail")) { - iCallback.onFail(ret); - return; + @Override + public void invoke(String s, JSONObject jsonObject, com.finogeeks.lib.applet.interfaces.ICallback iCallback) { + Log.d("MopPlugin", "invoke extensionApi:" + s + ",params:" + jsonObject); + Map params = GsonUtil.gson.fromJson(jsonObject.toString(), HashMap.class); + handler.post(() -> { + channel.invokeMethod("extensionApi:" + name, params, new MethodChannel.Result() { + @Override + public void success(Object result) { + String json = GsonUtil.gson.toJson(result); + FinAppTrace.d(ExtensionApiModule.TAG, "channel invokeMethod:" + name + + " success, result=" + result + ", json=" + json); + JSONObject ret = null; + if (json != null && !json.equals("null")) { + try { + ret = new JSONObject(json); + if (ret.has("errMsg")) { + String errMsg = ret.getString("errMsg"); + if (errMsg.startsWith(name + ":fail")) { + iCallback.onFail(ret); + return; + } } + } catch (JSONException e) { + e.printStackTrace(); } - } catch (JSONException e) { - e.printStackTrace(); } + + iCallback.onSuccess(ret); } - iCallback.onSuccess(ret); - } + @Override + public void error(String errorCode, String errorMessage, Object errorDetails) { + FinAppTrace.e(ExtensionApiModule.TAG, "channel invokeMethod:" + name + + " error, errorCode=" + errorCode + + ", errorMessage=" + errorMessage + + ", errorDetails=" + errorDetails); + iCallback.onFail(); + } - @Override - public void error(String errorCode, String errorMessage, Object errorDetails) { - FinAppTrace.e(ExtensionApiModule.TAG, "channel invokeMethod:" + name - + " error, errorCode=" + errorCode - + ", errorMessage=" + errorMessage - + ", errorDetails=" + errorDetails); - iCallback.onFail(); - } - - @Override - public void notImplemented() { - iCallback.onFail(); - } + @Override + public void notImplemented() { + iCallback.onFail(); + } + }); }); - }); - } - }); + } + }); + }else if(s.equals("addWebExtentionApi")){ + MethodChannel channel = MopPluginService.getInstance().getMethodChannel(); + String name = (String) param.get("name"); + Log.d(TAG, "addWebExtentionApi:" + name); + FinAppClient.INSTANCE.getExtensionWebApiManager().registerApi(new com.finogeeks.lib.applet.api.BaseApi(getContext()) { + @Override + public String[] apis() { + return new String[]{name}; + } + + @Override + public void invoke(String s, JSONObject jsonObject, com.finogeeks.lib.applet.interfaces.ICallback iCallback) { + Log.d("MopPlugin", "invoke webextensionApi:" + s + ",params:" + jsonObject); + Map params = GsonUtil.gson.fromJson(jsonObject.toString(), HashMap.class); + handler.post(() -> { + channel.invokeMethod("webExtentionApi:" + name, params, new MethodChannel.Result() { + @Override + public void success(Object result) { + String json = GsonUtil.gson.toJson(result); + FinAppTrace.d(ExtensionApiModule.TAG, "channel invokeMethod:" + name + + " success, result=" + result + ", json=" + json); + JSONObject ret = null; + if (json != null && !json.equals("null")) { + try { + ret = new JSONObject(json); + if (ret.has("errMsg")) { + String errMsg = ret.getString("errMsg"); + if (errMsg.startsWith(name + ":fail")) { + iCallback.onFail(ret); + return; + } + } + } catch (JSONException e) { + e.printStackTrace(); + } + } + + iCallback.onSuccess(ret); + } + + @Override + public void error(String errorCode, String errorMessage, Object errorDetails) { + FinAppTrace.e(ExtensionApiModule.TAG, "channel invokeMethod:" + name + + " error, errorCode=" + errorCode + + ", errorMessage=" + errorMessage + + ", errorDetails=" + errorDetails); + iCallback.onFail(); + } + + @Override + public void notImplemented() { + iCallback.onFail(); + } + }); + }); + } + }); + } } } diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index 8acb99d..fe53f56 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/wangtao/Documents/fantai/code/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"/Users/wangtao/development/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_plugin_android_lifecycle-2.0.5/","dependencies":[]},{"name":"mop","path":"/Users/wangtao/Documents/fantai/code/finclip-flutter-sdk/","dependencies":["flutter_plugin_android_lifecycle"]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"mop","dependencies":["flutter_plugin_android_lifecycle"]}],"date_created":"2021-12-28 10:57:42.321282","version":"2.8.1"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/kangxuyao/StudioProjects/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"/Users/kangxuyao/.pub-cache/hosted/pub.flutter-io.cn/flutter_plugin_android_lifecycle-2.0.5/","dependencies":[]},{"name":"mop","path":"/Users/kangxuyao/StudioProjects/finclip-flutter-sdk/","dependencies":["flutter_plugin_android_lifecycle"]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"mop","dependencies":["flutter_plugin_android_lifecycle"]}],"date_created":"2022-01-04 13:47:58.706248","version":"2.6.0-12.0.pre.553"} \ No newline at end of file diff --git a/lib/mop.dart b/lib/mop.dart index 0be396e..b4d191b 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -315,8 +315,8 @@ class Mop { List? finStoreConfigs, UIConfig? uiConfig, String? customWebViewUserAgent, - int appletIntervalUpdateLimit = 0, - int maxRunningApplet = 5, + int? appletIntervalUpdateLimit, + int? maxRunningApplet, }) async { List>? storeConfigs = finStoreConfigs?.map((e) => e.toMap()).toList(); From b663f1bf897ac09eb842879e48a8212c3ce9106a Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Sat, 23 Oct 2021 10:42:39 +0800 Subject: [PATCH 029/107] =?UTF-8?q?Android=20Major=E8=BF=AD=E4=BB=A3?= =?UTF-8?q?=E6=AD=A3=E5=BC=8F=E5=8F=91=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 42edc6a..32b0654 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.34.3' - implementation 'com.finogeeks.mop:plugins:2.34.3' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211023v01' + implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211023v01' } \ No newline at end of file From d09e093939a8f8fc9e83b23a303055834769da11 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Tue, 26 Oct 2021 10:21:55 +0800 Subject: [PATCH 030/107] Update SDK version --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 32b0654..93af635 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.35.0-alpha20211023v01' - implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211023v01' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211026v01' + implementation 'com.finogeeks.mop:plugins:2.34.3' } \ No newline at end of file From 6da98f77985692091ed31c4b128f48733aa2c76b Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Tue, 26 Oct 2021 19:52:02 +0800 Subject: [PATCH 031/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 93af635..e033b03 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.35.0-alpha20211026v01' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211026v02' implementation 'com.finogeeks.mop:plugins:2.34.3' } \ No newline at end of file From 1e27f673d38de37c53401571ca6d08885284da8d Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Thu, 28 Oct 2021 11:11:11 +0800 Subject: [PATCH 032/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index e033b03..776c2b5 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.35.0-alpha20211026v02' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211028v01' implementation 'com.finogeeks.mop:plugins:2.34.3' } \ No newline at end of file From 4886c7e38e79d4c4cf1264254ed77b209a089306 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Thu, 28 Oct 2021 15:10:52 +0800 Subject: [PATCH 033/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 776c2b5..5edff8e 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.35.0-alpha20211028v01' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211028v04' implementation 'com.finogeeks.mop:plugins:2.34.3' } \ No newline at end of file From 319512bea6e9e36e3ee621f8d84a799f9d48a744 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Mon, 1 Nov 2021 09:24:02 +0800 Subject: [PATCH 034/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 5edff8e..338bcdc 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.35.0-alpha20211028v04' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211101v01' implementation 'com.finogeeks.mop:plugins:2.34.3' } \ No newline at end of file From a6ab3349314378f4af5fab8c65efe24bfd01637f Mon Sep 17 00:00:00 2001 From: kangxuyao Date: Tue, 2 Nov 2021 18:11:02 +0800 Subject: [PATCH 035/107] upgrade --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 338bcdc..eb68132 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.35.0-alpha20211101v01' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211102v01' implementation 'com.finogeeks.mop:plugins:2.34.3' } \ No newline at end of file From 3ef3142c8b9574b11c7fae98828d7a868ae10191 Mon Sep 17 00:00:00 2001 From: kangxuyao Date: Wed, 3 Nov 2021 18:23:44 +0800 Subject: [PATCH 036/107] upgrade --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index eb68132..467f8b1 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.35.0-alpha20211102v01' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211103v01' implementation 'com.finogeeks.mop:plugins:2.34.3' } \ No newline at end of file From 4ea3fbb5f4657b13c98301f348c3f83eec1a0846 Mon Sep 17 00:00:00 2001 From: zhongweiguang Date: Thu, 4 Nov 2021 14:28:58 +0800 Subject: [PATCH 037/107] Update SDK version --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 467f8b1..3dd9b1e 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.35.0-alpha20211103v01' - implementation 'com.finogeeks.mop:plugins:2.34.3' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211104v01' + implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211104v01' } \ No newline at end of file From 74bd3e30bbf009a64b5726ade70f7fda2f92f60a Mon Sep 17 00:00:00 2001 From: jenkins Date: Thu, 4 Nov 2021 16:37:50 +0800 Subject: [PATCH 038/107] version++ --- android/build.gradle | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 3dd9b1e..55bb54c 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.35.0-alpha20211104v01' - implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211104v01' + implementation 'com.finogeeks.lib:finapplet:2.33.17' + implementation 'com.finogeeks.mop:plugins:2.33.17' } \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index d95f43c..34c876a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.34.3' +version: '2.33.17' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From 6f8f4e42068097790f311d7c0de205dcc63b4f90 Mon Sep 17 00:00:00 2001 From: zhongweiguang Date: Fri, 5 Nov 2021 14:12:17 +0800 Subject: [PATCH 039/107] Update SDK version --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 55bb54c..ee8b689 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.33.17' - implementation 'com.finogeeks.mop:plugins:2.33.17' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211105v01' + implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211105v01' } \ No newline at end of file From 8da2fc786be134a50fd74beb33a9a741b62bd8ab Mon Sep 17 00:00:00 2001 From: zhongweiguang Date: Fri, 5 Nov 2021 16:33:03 +0800 Subject: [PATCH 040/107] Update SDK version --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index ee8b689..7e52a27 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.35.0-alpha20211105v01' - implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211105v01' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211105v03' + implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211105v02' } \ No newline at end of file From 393eb47aeff888ee6ece6bdf2fff7a0a61bea57c Mon Sep 17 00:00:00 2001 From: zhongweiguang Date: Fri, 5 Nov 2021 16:55:37 +0800 Subject: [PATCH 041/107] Update SDK version --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 7e52a27..e21fb12 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.35.0-alpha20211105v03' - implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211105v02' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211105v04' + implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211104v01' } \ No newline at end of file From df6218171ae28c1e7fb1aafc955c0b3d4c588986 Mon Sep 17 00:00:00 2001 From: jenkins Date: Fri, 5 Nov 2021 19:56:38 +0800 Subject: [PATCH 042/107] version++ --- android/build.gradle | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index e21fb12..d8796fa 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.35.0-alpha20211105v04' - implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211104v01' + implementation 'com.finogeeks.lib:finapplet:2.34.5' + implementation 'com.finogeeks.mop:plugins:2.34.5' } \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 34c876a..bf62ceb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.33.17' +version: '2.34.5' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From d8f07ae7708a1edd377ffda23a220589c9e1af45 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Tue, 9 Nov 2021 10:21:15 +0800 Subject: [PATCH 043/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index d8796fa..091d80a 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.34.5' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211109v01' implementation 'com.finogeeks.mop:plugins:2.34.5' } \ No newline at end of file From e703ed71b641b98bf6a460a5626f0a405abf013f Mon Sep 17 00:00:00 2001 From: kangxuyao Date: Thu, 11 Nov 2021 09:38:01 +0800 Subject: [PATCH 044/107] upgrade --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 091d80a..190b777 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.35.0-alpha20211109v01' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211111v02' implementation 'com.finogeeks.mop:plugins:2.34.5' } \ No newline at end of file From b93a8c9586c524c6092f85fc2d6aa86fe75cf758 Mon Sep 17 00:00:00 2001 From: yangbingqiao Date: Fri, 12 Nov 2021 14:27:55 +0800 Subject: [PATCH 045/107] =?UTF-8?q?gradle=20plugin=E6=8F=90=E5=8D=87?= =?UTF-8?q?=E8=87=B33.5.4;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/android/build.gradle b/example/android/build.gradle index 9957ae3..1edbb3f 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.5.3' + classpath 'com.android.tools.build:gradle:3.5.4' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61" } } From 593ed82eb1d7c54bf74916e288d5e3f002c58543 Mon Sep 17 00:00:00 2001 From: developer Date: Mon, 15 Nov 2021 12:48:19 +0800 Subject: [PATCH 046/107] release: version:2.34.5 --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index 0191af4..8964a66 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.34.3' - s.dependency 'FinAppletExt' , '2.34.3' + s.dependency 'FinApplet' , '2.34.5' + s.dependency 'FinAppletExt' , '2.34.5' end From f24afa7ea439ef300cbae1fb84d4314e6bed04cc Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Mon, 15 Nov 2021 17:16:00 +0800 Subject: [PATCH 047/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 190b777..5b9f4f4 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.35.0-alpha20211111v02' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211115v03' implementation 'com.finogeeks.mop:plugins:2.34.5' } \ No newline at end of file From 311c9436e296b249351b83b826daec0a1a29ae4c Mon Sep 17 00:00:00 2001 From: jizelin Date: Tue, 16 Nov 2021 21:47:25 +0800 Subject: [PATCH 048/107] =?UTF-8?q?fix=EF=BC=9A=E6=96=B0=E5=A2=9EwebViewBo?= =?UTF-8?q?unces=E6=8E=A5=E5=8F=A3=EF=BC=8C=E7=A6=81=E7=94=A8webview?= =?UTF-8?q?=E5=BC=B9=E6=80=A7=E8=A7=A3=E5=86=B3=E5=88=86=E9=A1=B5=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/.flutter-plugins-dependencies | 2 +- example/pubspec.lock | 2 +- ios/Classes/Api/MOP_webViewBounces.h | 19 ++++++++++++++++ ios/Classes/Api/MOP_webViewBounces.m | 32 +++++++++++++++++++++++++++ ios/mop.podspec | 4 ++-- lib/mop.dart | 10 ++++++--- 6 files changed, 62 insertions(+), 7 deletions(-) create mode 100644 ios/Classes/Api/MOP_webViewBounces.h create mode 100644 ios/Classes/Api/MOP_webViewBounces.m diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index 7d3d40b..438deb6 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-09-10 20:41:42.050199","version":"2.2.2"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-11-15 23:44:20.482386","version":"2.2.2"} \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index e9626a4..310124c 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -87,7 +87,7 @@ packages: path: ".." relative: true source: path - version: "2.33.15" + version: "2.34.5" path: dependency: transitive description: diff --git a/ios/Classes/Api/MOP_webViewBounces.h b/ios/Classes/Api/MOP_webViewBounces.h new file mode 100644 index 0000000..0d15f9b --- /dev/null +++ b/ios/Classes/Api/MOP_webViewBounces.h @@ -0,0 +1,19 @@ +// +// MOP_webViewBounces.h +// mop +// +// Created by beetle_92 on 2021/11/16. +// + +#import +#import "MOPBaseApi.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MOP_webViewBounces : MOPBaseApi + +@property (nonatomic, assign) BOOL bounces; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Api/MOP_webViewBounces.m b/ios/Classes/Api/MOP_webViewBounces.m new file mode 100644 index 0000000..b3a084f --- /dev/null +++ b/ios/Classes/Api/MOP_webViewBounces.m @@ -0,0 +1,32 @@ +// +// MOP_webViewBounces.m +// mop +// +// Created by beetle_92 on 2021/11/16. +// + +#import "MOP_webViewBounces.h" +#import "MOPTools.h" + +@implementation MOP_webViewBounces + +- (void)setupApiWithSuccess:(void (^)(NSDictionary * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel { + UIViewController *currentVC = [MOPTools topViewController]; + WKWebView *webView = [self searchWKWebView:currentVC.view]; + webView.scrollView.bounces = self.bounces; +} + +- (WKWebView *)searchWKWebView:(UIView *)view { + for (UIView *subview in view.subviews) { + if ([subview isKindOfClass:[WKWebView class]]) { + return (WKWebView *)subview; + } + WKWebView *webView = [self searchWKWebView:subview]; + if (webView) { + return webView; + } + } + return nil; +} + +@end diff --git a/ios/mop.podspec b/ios/mop.podspec index 8964a66..36ded5b 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.34.5' - s.dependency 'FinAppletExt' , '2.34.5' + s.dependency 'FinApplet' , '2.35.0-alpha20211116v012' + s.dependency 'FinAppletExt' , '2.35.0-alpha20211116v12' end diff --git a/lib/mop.dart b/lib/mop.dart index 855078e..8c08066 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -54,9 +54,7 @@ class Mop { if (handler != null) { return await handler(call.arguments); } - } else if (call.method.startsWith("extensionApi:")) { - - } + } else if (call.method.startsWith("extensionApi:")) {} } /// @@ -242,4 +240,10 @@ class Mop { print(data); return data; } + + /// WKWebView的弹性设置 + void webViewBounces(bool bounces) async { + await _channel.invokeMapMethod("webViewBounces", {'bounces': bounces}); + return; + } } From 7326838e49a0ceba754f78d8aceb55be93054196 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Tue, 16 Nov 2021 08:28:36 +0800 Subject: [PATCH 049/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 5b9f4f4..d523b70 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.35.0-alpha20211115v03' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211116v01' implementation 'com.finogeeks.mop:plugins:2.34.5' } \ No newline at end of file From 9207aa8c833dc85285a7a01d6ff18710f30ba0b1 Mon Sep 17 00:00:00 2001 From: wzy Date: Tue, 16 Nov 2021 10:51:55 +0800 Subject: [PATCH 050/107] =?UTF-8?q?1.=E6=96=B0=E5=A2=9E=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E9=AB=98=E5=BE=B7=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOP_initialize.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ios/Classes/Api/MOP_initialize.m b/ios/Classes/Api/MOP_initialize.m index 00be1a1..9b9297b 100644 --- a/ios/Classes/Api/MOP_initialize.m +++ b/ios/Classes/Api/MOP_initialize.m @@ -51,6 +51,8 @@ return; } [[FATExtClient sharedClient] fat_prepareExtensionApis]; + [[FATExtClient sharedClient] fat_UsingMapType:@"FATExtMapStyleGD" MapKey:@"6f0f28c4138cbaa51aa5890e26996ea2"]; + [[FATClient sharedClient] setEnableLog:YES]; success(@{}); From c3a51ce4f05cadb3bbd9e46e760bf48e0016d53f Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Tue, 16 Nov 2021 23:39:22 +0800 Subject: [PATCH 051/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index d523b70..1555707 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.35.0-alpha20211116v01' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211116v06' implementation 'com.finogeeks.mop:plugins:2.34.5' } \ No newline at end of file From e6c95fe8262c244c121efca7bb3378be1356cfe2 Mon Sep 17 00:00:00 2001 From: wzy Date: Thu, 18 Nov 2021 09:32:17 +0800 Subject: [PATCH 052/107] =?UTF-8?q?1.=E6=B3=A8=E9=87=8Astable=E5=88=86?= =?UTF-8?q?=E6=94=AF=E4=BC=9A=E6=8A=A5=E9=94=99=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOP_initialize.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Classes/Api/MOP_initialize.m b/ios/Classes/Api/MOP_initialize.m index 9b9297b..377af9f 100644 --- a/ios/Classes/Api/MOP_initialize.m +++ b/ios/Classes/Api/MOP_initialize.m @@ -51,7 +51,7 @@ return; } [[FATExtClient sharedClient] fat_prepareExtensionApis]; - [[FATExtClient sharedClient] fat_UsingMapType:@"FATExtMapStyleGD" MapKey:@"6f0f28c4138cbaa51aa5890e26996ea2"]; +// [[FATExtClient sharedClient] fat_UsingMapType:@"FATExtMapStyleGD" MapKey:@"6f0f28c4138cbaa51aa5890e26996ea2"]; [[FATClient sharedClient] setEnableLog:YES]; success(@{}); From 24f4341528a3abad13e3fb563cf070cb02540d9a Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Thu, 18 Nov 2021 17:34:32 +0800 Subject: [PATCH 053/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 1555707..17e1ea5 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.35.0-alpha20211116v06' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211118v07' implementation 'com.finogeeks.mop:plugins:2.34.5' } \ No newline at end of file From c85db5142be894e0fae6ffd43ecbfda656c7ad37 Mon Sep 17 00:00:00 2001 From: hujianhui Date: Thu, 18 Nov 2021 18:18:14 +0800 Subject: [PATCH 054/107] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E6=8B=93=E5=B1=95api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOP_initialize.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Classes/Api/MOP_initialize.m b/ios/Classes/Api/MOP_initialize.m index 377af9f..60fd032 100644 --- a/ios/Classes/Api/MOP_initialize.m +++ b/ios/Classes/Api/MOP_initialize.m @@ -50,7 +50,7 @@ failure(@"初始化失败"); return; } - [[FATExtClient sharedClient] fat_prepareExtensionApis]; +// [[FATExtClient sharedClient] fat_prepareExtensionApis]; // [[FATExtClient sharedClient] fat_UsingMapType:@"FATExtMapStyleGD" MapKey:@"6f0f28c4138cbaa51aa5890e26996ea2"]; [[FATClient sharedClient] setEnableLog:YES]; From de09863c12d146693ec0abf78f892f546d78f29b Mon Sep 17 00:00:00 2001 From: jenkins Date: Fri, 19 Nov 2021 22:22:31 +0800 Subject: [PATCH 055/107] version++ --- android/build.gradle | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 17e1ea5..36b6f2d 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.35.0-alpha20211118v07' - implementation 'com.finogeeks.mop:plugins:2.34.5' + implementation 'com.finogeeks.lib:finapplet:2.34.7' + implementation 'com.finogeeks.mop:plugins:2.34.7' } \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index bf62ceb..70afe9a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.34.5' +version: '2.34.7' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From 7d045231b36faf8dcdbabf8db9e8c6a3f903ee71 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Mon, 22 Nov 2021 16:42:29 +0800 Subject: [PATCH 056/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 36b6f2d..8f8c948 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.34.7' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211122v01' implementation 'com.finogeeks.mop:plugins:2.34.7' } \ No newline at end of file From f7e17566beccd8e556080c9754c94936ebbd8809 Mon Sep 17 00:00:00 2001 From: kangxuyao Date: Wed, 1 Dec 2021 10:03:16 +0800 Subject: [PATCH 057/107] upgrade --- android/build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 8f8c948..32ab6b2 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -92,5 +92,7 @@ kapt { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211122v01' - implementation 'com.finogeeks.mop:plugins:2.34.7' + implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211201v01' + implementation 'com.finogeeks.mop:webrtc:2.35.0-alpha20211201v01' + implementation 'com.finogeeks.mop:map:2.35.0-alpha20211201v01' } \ No newline at end of file From 26dd288915016c54ede37345f9635efad2ee5ff1 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Fri, 3 Dec 2021 09:14:09 +0800 Subject: [PATCH 058/107] =?UTF-8?q?fix:Android=207.0=E5=8F=8A=E4=BB=A5?= =?UTF-8?q?=E4=B8=8B=E7=B3=BB=E7=BB=9F=E7=89=88=E6=9C=AC=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=EF=BC=8C=E9=80=9A=E8=BF=87=E7=AE=A1=E7=90=86=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E7=AC=AC=E4=BA=8C=E6=AC=A1=E5=90=AF=E5=8A=A8=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E6=97=A0=E6=B3=95=E5=90=AF=E5=8A=A8=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/finogeeks/mop/api/mop/AppletModule.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java index 18ccd4e..15a7494 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java @@ -53,14 +53,18 @@ public class AppletModule extends BaseApi { String appId = String.valueOf(param.get("appId")); Integer sequence = (Integer) param.get("sequence"); Map params = (Map) param.get("params"); + // mContext是FlutterActivity, + // 在Android 6.0、7.0系统的部分设备中热启动小程序时,如果context参数用mContext,会出现无法启动小程序的问题 + // 所以这里使用Application Context + Context context = mContext.getApplicationContext(); if (params == null) { if (sequence == null) { - FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, appId); + FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, appId); } else { - FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, appId, sequence, null); + FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, appId, sequence, null); } } else { - FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, appId, params); + FinAppClient.INSTANCE.getAppletApiManager().startApplet(context, appId, params); } // String apiServer = (String) param.get("apiServer"); // String apiPrefix = (String) param.get("apiPrefix"); From db02af9f70d2e46a545ac8f40fb65556ebb21149 Mon Sep 17 00:00:00 2001 From: wangtao Date: Fri, 3 Dec 2021 14:20:45 +0800 Subject: [PATCH 059/107] =?UTF-8?q?feat:=20podspec=E5=A2=9E=E5=8A=A0webrtc?= =?UTF-8?q?=E7=9A=84=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOP_initialize.m | 2 ++ ios/mop.podspec | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ios/Classes/Api/MOP_initialize.m b/ios/Classes/Api/MOP_initialize.m index 60fd032..296c898 100644 --- a/ios/Classes/Api/MOP_initialize.m +++ b/ios/Classes/Api/MOP_initialize.m @@ -8,6 +8,7 @@ #import "MOP_initialize.h" #import #import +#import @implementation MOP_initialize @@ -54,6 +55,7 @@ // [[FATExtClient sharedClient] fat_UsingMapType:@"FATExtMapStyleGD" MapKey:@"6f0f28c4138cbaa51aa5890e26996ea2"]; [[FATClient sharedClient] setEnableLog:YES]; + [FATWebRTCComponent registerComponent]; success(@{}); diff --git a/ios/mop.podspec b/ios/mop.podspec index 36ded5b..375c150 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,8 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.35.0-alpha20211116v012' - s.dependency 'FinAppletExt' , '2.35.0-alpha20211116v12' + s.dependency 'FinApplet' , '2.35.0-alpha20211203v06' + s.dependency 'FinAppletExt' , '2.35.0-alpha20211203v06' + s.dependency 'FinAppletWebRTC' , '2.35.0-alpha20211203v06' end From a3bfa872c904b16259b7ba55d47f72d7d5f76999 Mon Sep 17 00:00:00 2001 From: jenkins Date: Fri, 3 Dec 2021 22:10:51 +0800 Subject: [PATCH 060/107] version++ --- android/build.gradle | 6 ++---- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 32ab6b2..aa883af 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -91,8 +91,6 @@ kapt { } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211122v01' - implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211201v01' - implementation 'com.finogeeks.mop:webrtc:2.35.0-alpha20211201v01' - implementation 'com.finogeeks.mop:map:2.35.0-alpha20211201v01' + implementation 'com.finogeeks.lib:finapplet:2.34.9' + implementation 'com.finogeeks.mop:plugins:2.34.9' } \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 70afe9a..b4614b0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.34.7' +version: '2.34.9' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From 3371497333ff1d523ecd8a1ef2eb32edf076426e Mon Sep 17 00:00:00 2001 From: developer Date: Fri, 3 Dec 2021 22:13:13 +0800 Subject: [PATCH 061/107] release: version:2.34.9 --- ios/mop.podspec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index 375c150..cd980c6 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,8 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.35.0-alpha20211203v06' - s.dependency 'FinAppletExt' , '2.35.0-alpha20211203v06' - s.dependency 'FinAppletWebRTC' , '2.35.0-alpha20211203v06' + s.dependency 'FinApplet' , '2.34.9' + s.dependency 'FinAppletExt' , '2.34.9' end From d9f2521921bf144d15a6846f74dbbe9194bfdeed Mon Sep 17 00:00:00 2001 From: wangtao Date: Fri, 17 Dec 2021 15:55:25 +0800 Subject: [PATCH 062/107] =?UTF-8?q?fix:=20mop=E7=9A=84podspec=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=AB=98=E5=BE=B7=E5=9C=B0=E5=9B=BE=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOP_initialize.m | 4 +++- ios/mop.podspec | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ios/Classes/Api/MOP_initialize.m b/ios/Classes/Api/MOP_initialize.m index 296c898..428b045 100644 --- a/ios/Classes/Api/MOP_initialize.m +++ b/ios/Classes/Api/MOP_initialize.m @@ -9,6 +9,7 @@ #import #import #import +#import @implementation MOP_initialize @@ -53,7 +54,8 @@ } // [[FATExtClient sharedClient] fat_prepareExtensionApis]; // [[FATExtClient sharedClient] fat_UsingMapType:@"FATExtMapStyleGD" MapKey:@"6f0f28c4138cbaa51aa5890e26996ea2"]; - + + [FATGDMapComponent setGDMapAppKey:@"6f0f28c4138cbaa51aa5890e26996ea2"]; [[FATClient sharedClient] setEnableLog:YES]; [FATWebRTCComponent registerComponent]; success(@{}); diff --git a/ios/mop.podspec b/ios/mop.podspec index cd980c6..a4216fe 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,10 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.34.9' - s.dependency 'FinAppletExt' , '2.34.9' + s.dependency 'FinApplet' , '2.35.0-alpha20211217v01' + s.dependency 'FinAppletExt' , '2.35.0-alpha20211217v01' + s.dependency 'FinAppletGDMap' , '2.35.0-alpha20211217v01' + s.dependency 'FinAppletWebRTC' , '2.35.0-alpha20211217v01' + end From 3dc249044cdb24d123e4a712c7992684576332c5 Mon Sep 17 00:00:00 2001 From: wangtao Date: Thu, 23 Dec 2021 17:19:23 +0800 Subject: [PATCH 063/107] =?UTF-8?q?fix=EF=BC=9A=E6=9B=B4=E6=96=B0iOS?= =?UTF-8?q?=E7=9A=84=E4=BE=9D=E8=B5=96=E5=BA=93=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/mop.podspec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index a4216fe..9f7c284 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,10 +17,10 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.35.0-alpha20211217v01' - s.dependency 'FinAppletExt' , '2.35.0-alpha20211217v01' - s.dependency 'FinAppletGDMap' , '2.35.0-alpha20211217v01' - s.dependency 'FinAppletWebRTC' , '2.35.0-alpha20211217v01' + s.dependency 'FinApplet' , '2.35.0-alpha20211223v02' + s.dependency 'FinAppletExt' , '2.35.0-alpha20211223v02' + s.dependency 'FinAppletGDMap' , '2.35.0-alpha20211223v02' + s.dependency 'FinAppletWebRTC' , '2.35.0-alpha20211223v02' end From b964553fa7994a1aa48177c74874d93b67aca0e5 Mon Sep 17 00:00:00 2001 From: jizelin Date: Thu, 9 Dec 2021 15:18:35 +0800 Subject: [PATCH 064/107] =?UTF-8?q?fix:=20=E5=8E=BB=E6=8E=89master?= =?UTF-8?q?=E5=88=86=E6=94=AF=E4=B8=8Awebrtc=E7=9A=84=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOP_initialize.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ios/Classes/Api/MOP_initialize.m b/ios/Classes/Api/MOP_initialize.m index 428b045..c90dff7 100644 --- a/ios/Classes/Api/MOP_initialize.m +++ b/ios/Classes/Api/MOP_initialize.m @@ -8,8 +8,7 @@ #import "MOP_initialize.h" #import #import -#import -#import +// #import @implementation MOP_initialize @@ -57,7 +56,7 @@ [FATGDMapComponent setGDMapAppKey:@"6f0f28c4138cbaa51aa5890e26996ea2"]; [[FATClient sharedClient] setEnableLog:YES]; - [FATWebRTCComponent registerComponent]; + // [FATWebRTCComponent registerComponent]; success(@{}); From f9ed67b4d8f255bcb95efe5e16ca29e6b843437d Mon Sep 17 00:00:00 2001 From: developer Date: Thu, 9 Dec 2021 15:26:31 +0800 Subject: [PATCH 065/107] release: version:2.34.9.1 --- ios/mop.podspec | 7 ++----- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index 9f7c284..cc69ae8 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,10 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.35.0-alpha20211223v02' - s.dependency 'FinAppletExt' , '2.35.0-alpha20211223v02' - s.dependency 'FinAppletGDMap' , '2.35.0-alpha20211223v02' - s.dependency 'FinAppletWebRTC' , '2.35.0-alpha20211223v02' - + s.dependency 'FinApplet' , '2.34.9.1' + s.dependency 'FinAppletExt' , '2.34.9.1' end diff --git a/pubspec.yaml b/pubspec.yaml index b4614b0..2bcf0f9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.34.9' +version: '2.34.9.1' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From e29a0f23264f8769fa0940f898fde67d99b05e54 Mon Sep 17 00:00:00 2001 From: developer Date: Thu, 9 Dec 2021 15:29:55 +0800 Subject: [PATCH 066/107] release: version:2.34.10 --- ios/mop.podspec | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index cc69ae8..39e03ca 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.34.9.1' - s.dependency 'FinAppletExt' , '2.34.9.1' + s.dependency 'FinApplet' , '2.34.10' + s.dependency 'FinAppletExt' , '2.34.10' end diff --git a/pubspec.yaml b/pubspec.yaml index 2bcf0f9..810d175 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.34.9.1' +version: '2.34.10' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From c4879bb36674c41e5d2626f02c7bf4e86814b449 Mon Sep 17 00:00:00 2001 From: jizelin Date: Thu, 9 Dec 2021 16:02:33 +0800 Subject: [PATCH 067/107] =?UTF-8?q?feat=EF=BC=9A=E4=BF=AE=E6=94=B9sdk?= =?UTF-8?q?=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index 39e03ca..cd980c6 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.34.10' - s.dependency 'FinAppletExt' , '2.34.10' + s.dependency 'FinApplet' , '2.34.9' + s.dependency 'FinAppletExt' , '2.34.9' end From 83964cb70d87a8710c31e10880ec37341082e73f Mon Sep 17 00:00:00 2001 From: developer Date: Thu, 9 Dec 2021 17:26:50 +0800 Subject: [PATCH 068/107] release: version:2.34.10 --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index cd980c6..39e03ca 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.34.9' - s.dependency 'FinAppletExt' , '2.34.9' + s.dependency 'FinApplet' , '2.34.10' + s.dependency 'FinAppletExt' , '2.34.10' end From 2dc1a98c3ca23d0f8c656faf1d0728784391e72c Mon Sep 17 00:00:00 2001 From: developer Date: Thu, 9 Dec 2021 17:48:40 +0800 Subject: [PATCH 069/107] release: version:2.34.10 --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index 39e03ca..cd980c6 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.34.10' - s.dependency 'FinAppletExt' , '2.34.10' + s.dependency 'FinApplet' , '2.34.9' + s.dependency 'FinAppletExt' , '2.34.9' end From ee5aeb523e3441ae358d2b4af8fadbb96b48de67 Mon Sep 17 00:00:00 2001 From: developer Date: Thu, 9 Dec 2021 18:55:37 +0800 Subject: [PATCH 070/107] release: version:2.34.10.1 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 810d175..0deb4a1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.34.10' +version: '2.34.10.1' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From 2e726acf76adfd5a189cb6be6b22d654f14d13df Mon Sep 17 00:00:00 2001 From: developer Date: Thu, 9 Dec 2021 19:06:13 +0800 Subject: [PATCH 071/107] release: version:2.34.8 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 0deb4a1..82db333 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.34.10.1' +version: '2.34.8' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From 82c5716af47a1c19be15f5c839e5c173492441f9 Mon Sep 17 00:00:00 2001 From: kangxuyao Date: Mon, 13 Dec 2021 09:19:02 +0800 Subject: [PATCH 072/107] upgrade --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index aa883af..40d5a09 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.34.9' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211213v01' implementation 'com.finogeeks.mop:plugins:2.34.9' } \ No newline at end of file From 43b85e5f1545d25c2c6ad45c2f1bda421ec82a2e Mon Sep 17 00:00:00 2001 From: kangxuyao Date: Thu, 16 Dec 2021 14:36:00 +0800 Subject: [PATCH 073/107] upgrade --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 40d5a09..b64cbce 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.35.0-alpha20211213v01' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211216v02' implementation 'com.finogeeks.mop:plugins:2.34.9' } \ No newline at end of file From 5451c717c13360ad89edb90b36970743f6cea9f2 Mon Sep 17 00:00:00 2001 From: jenkins Date: Fri, 17 Dec 2021 23:15:36 +0800 Subject: [PATCH 074/107] version++ --- android/build.gradle | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index b64cbce..582262a 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.35.0-alpha20211216v02' - implementation 'com.finogeeks.mop:plugins:2.34.9' + implementation 'com.finogeeks.lib:finapplet:2.34.11' + implementation 'com.finogeeks.mop:plugins:2.34.11' } \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 82db333..06b92ea 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.34.8' +version: '2.34.11' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From 10e01f27ee01c781eec33652a0a223cb5986ce9e Mon Sep 17 00:00:00 2001 From: developer Date: Fri, 17 Dec 2021 23:17:34 +0800 Subject: [PATCH 075/107] release: version:2.34.11 --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index cd980c6..637578a 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.34.9' - s.dependency 'FinAppletExt' , '2.34.9' + s.dependency 'FinApplet' , '2.34.11' + s.dependency 'FinAppletExt' , '2.34.11' end From c1f23080eb95682888954d9bd3cea9943d52ddc4 Mon Sep 17 00:00:00 2001 From: jenkins Date: Sat, 18 Dec 2021 14:53:33 +0800 Subject: [PATCH 076/107] version++ --- android/build.gradle | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 582262a..e6a7106 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.34.11' - implementation 'com.finogeeks.mop:plugins:2.34.11' + implementation 'com.finogeeks.lib:finapplet:2.34.12' + implementation 'com.finogeeks.mop:plugins:2.34.12' } \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 06b92ea..5b1e732 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.34.11' +version: '2.34.12' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From 06f05af4633b38758032f38bcc8b81dede0ca131 Mon Sep 17 00:00:00 2001 From: developer Date: Sat, 18 Dec 2021 14:55:32 +0800 Subject: [PATCH 077/107] release: version:2.34.12 --- ios/mop.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index 637578a..4c79944 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.34.11' - s.dependency 'FinAppletExt' , '2.34.11' + s.dependency 'FinApplet' , '2.34.12' + s.dependency 'FinAppletExt' , '2.34.12' end From 67f1a79b66023f13c2945a8c9e36406d7a3acc23 Mon Sep 17 00:00:00 2001 From: wanghualei Date: Wed, 29 Dec 2021 10:11:50 +0800 Subject: [PATCH 078/107] =?UTF-8?q?add=20=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E6=89=93=E5=BC=80=E5=B0=8F=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/.flutter-plugins-dependencies | 2 +- .../contents.xcworkspacedata | 2 +- ios/Classes/Api/MOP_qrcodeOpenApplet.h | 18 +++++++++ ios/Classes/Api/MOP_qrcodeOpenApplet.m | 37 +++++++++++++++++++ ios/mop.podspec | 4 +- lib/mop.dart | 5 +++ 6 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 ios/Classes/Api/MOP_qrcodeOpenApplet.h create mode 100644 ios/Classes/Api/MOP_qrcodeOpenApplet.m diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index 438deb6..ec9321b 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-11-15 23:44:20.482386","version":"2.2.2"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/haley/Documents/Finogeeks/Gitlab/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/haley/Documents/Finogeeks/Gitlab/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-12-29 10:07:33.662750","version":"2.3.0-1.0.pre.169"} \ No newline at end of file diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 1d526a1..919434a 100644 --- a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/ios/Classes/Api/MOP_qrcodeOpenApplet.h b/ios/Classes/Api/MOP_qrcodeOpenApplet.h new file mode 100644 index 0000000..f9fdbf0 --- /dev/null +++ b/ios/Classes/Api/MOP_qrcodeOpenApplet.h @@ -0,0 +1,18 @@ +// +// MOP_scanOpenApplet.h +// mop +// +// Created by beetle_92 on 2021/6/7. +// + +#import "MOPBaseApi.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface MOP_qrcodeOpenApplet : MOPBaseApi + +@property (nonatomic,copy) NSString *qrcode; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/Api/MOP_qrcodeOpenApplet.m b/ios/Classes/Api/MOP_qrcodeOpenApplet.m new file mode 100644 index 0000000..527e5ea --- /dev/null +++ b/ios/Classes/Api/MOP_qrcodeOpenApplet.m @@ -0,0 +1,37 @@ +// +// MOP_scanOpenApplet.m +// mop +// +// Created by beetle_92 on 2021/6/7. +// + +#import "MOP_qrcodeOpenApplet.h" +#import "MOPTools.h" +#import + +@implementation MOP_qrcodeOpenApplet + +- (void)setupApiWithSuccess:(void (^)(NSDictionary * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel { + NSLog(@"MOP_qrcodeOpenApplet:%@", self.qrcode); + FATAppletQrCodeRequest *qrcodeRequest = [[FATAppletQrCodeRequest alloc] init]; + qrcodeRequest.qrCode = self.qrcode; + + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + UIViewController *currentVC = [MOPTools topViewController]; + [[FATClient sharedClient] startAppletWithQrCodeRequest:qrcodeRequest inParentViewController:currentVC requestBlock:^(BOOL result, FATError *error) { + NSLog(@"请求完成:%@", error); + } completion:^(BOOL result, FATError *error) { + NSLog(@"打开完成:%@", error); + if (result){ + success(@{}); + } else { + failure(error.description); + } + } closeCompletion:^{ + NSLog(@"关闭"); + }]; + }); + +} + +@end diff --git a/ios/mop.podspec b/ios/mop.podspec index 4c79944..59e3ab1 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.34.12' - s.dependency 'FinAppletExt' , '2.34.12' + s.dependency 'FinApplet' , '2.35.0-alpha20211229v02' + s.dependency 'FinAppletExt' , '2.35.0-alpha20211229v02' end diff --git a/lib/mop.dart b/lib/mop.dart index 8c08066..2dd8e92 100644 --- a/lib/mop.dart +++ b/lib/mop.dart @@ -178,6 +178,11 @@ class Mop { return await _channel.invokeMapMethod("scanOpenApplet", params); } + Future qrcodeOpenApplet(String qrcode) async { + Map params = {'qrcode': qrcode}; + return await _channel.invokeMapMethod("qrcodeOpenApplet", params); + } + /// /// 根据微信QrCode信息解析小程序信息 /// From f0cb4d289615c7c7a2c0c6bab3aaccd08d98a008 Mon Sep 17 00:00:00 2001 From: hujianhui Date: Wed, 22 Dec 2021 21:03:38 +0800 Subject: [PATCH 079/107] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=B0=E6=A1=8C?= =?UTF-8?q?=E9=9D=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOPAppletDelegate.m | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/ios/Classes/Api/MOPAppletDelegate.m b/ios/Classes/Api/MOPAppletDelegate.m index d01d99a..0b0390a 100644 --- a/ios/Classes/Api/MOPAppletDelegate.m +++ b/ios/Classes/Api/MOPAppletDelegate.m @@ -9,6 +9,12 @@ #import "MopPlugin.h" #import "MopCustomMenuModel.h" +@interface NSString (FATEncode) +- (NSString *)fat_encodeString; + +@end + + @implementation MOPAppletDelegate + (instancetype)instance @@ -87,6 +93,11 @@ [channel invokeMethod:@"extensionApi:onCustomMenuClick" arguments:arguments result:^(id _Nullable result) { }]; + + if ([@"Desktop" isEqualToString:customMenu.menuId]) { + [self addToDesktopItemClick:appletInfo path:path]; + } + } - (void)clickCustomItemMenuWithInfo:(NSDictionary *)contentInfo completion:(void (^)(FATExtensionCode code, NSDictionary *result))completion { @@ -102,6 +113,12 @@ }]; } +- (void)clickCustomItemMenuWithInfo:(NSDictionary *)contentInfo inApplet:(FATAppletInfo *)appletInfo completion:(void (^)(FATExtensionCode code, NSDictionary *result))completion { + if ([@"Desktop" isEqualToString:contentInfo[@"menuId"]]) { + [self addToDesktopItemClick:appletInfo path:contentInfo[@"path"]]; + } +} + - (void)applet:(NSString *)appletId didOpenCompletion:(NSError *)error { if (!appletId) { return; @@ -113,4 +130,34 @@ }]; } +static NSString *scheme = @"fatae55433be2f62915";//App对应的scheme + +- (void)addToDesktopItemClick:(FATAppletInfo *)appInfo path:(NSString *)path { + NSMutableString *herf = [NSString stringWithFormat:@"%@://applet/appid/%@?", scheme, appInfo.appId].mutableCopy; + NSString *query = [NSString stringWithFormat:@"apiServer=%@&path=%@",appInfo.apiServer, path]; + + if ([appInfo.startParams[@"query"] length]) { + query = [NSString stringWithFormat:@"%@&query=%@",query, appInfo.startParams[@"query"]]; + } + [herf appendString:query.fat_encodeString]; + + NSMutableString *url = [NSMutableString stringWithFormat:@"%@/mop/scattered-page/#/desktopicon", appInfo.apiServer]; + [url appendFormat:@"?iconpath=%@", appInfo.appAvatar]; + [url appendFormat:@"&apptitle=%@", appInfo.appTitle.fat_encodeString]; + [url appendFormat:@"&linkhref=%@", herf]; + + NSLog(@"跳转到中间页面:%@", url); + + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]]; +} + + +@end + +@implementation NSString (FATEncode) + +- (NSString *)fat_encodeString { + return (__bridge NSString *)CFURLCreateStringByAddingPercentEscapes( NULL, (__bridge CFStringRef)self, NULL, (CFStringRef)@"!*'();:@&=+$,/?%#[]", kCFStringEncodingUTF8); +} + @end From 98d2ecb95751ddfbf120b2c45ebba2cbaafbb4d8 Mon Sep 17 00:00:00 2001 From: hujianhui Date: Fri, 24 Dec 2021 15:02:17 +0800 Subject: [PATCH 080/107] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=86=B7=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E6=97=B6=E4=B8=8D=E8=83=BD=E8=B7=B3=E8=BD=AC=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/MopPlugin.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ios/Classes/MopPlugin.m b/ios/Classes/MopPlugin.m index 3f51f4e..efa087b 100644 --- a/ios/Classes/MopPlugin.m +++ b/ios/Classes/MopPlugin.m @@ -88,6 +88,11 @@ static MopPlugin *_instance; - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options { + if (![FATClient sharedClient].inited) { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [[FATClient sharedClient] handleOpenURL:url]; + }); + } return [[FATClient sharedClient] handleOpenURL:url]; } From 04665b39346d319d8b0bcc25eeff57a136a3a1dc Mon Sep 17 00:00:00 2001 From: hujianhui Date: Mon, 27 Dec 2021 18:22:04 +0800 Subject: [PATCH 081/107] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=B0=E6=A1=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOPAppletDelegate.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ios/Classes/Api/MOPAppletDelegate.m b/ios/Classes/Api/MOPAppletDelegate.m index 0b0390a..4a210d9 100644 --- a/ios/Classes/Api/MOPAppletDelegate.m +++ b/ios/Classes/Api/MOPAppletDelegate.m @@ -76,6 +76,9 @@ FATAppletMenuStyle style = [typeString isEqualToString:@"onMiniProgram"] ? FATAppletMenuStyleOnMiniProgram : FATAppletMenuStyleCommon; model.menuType = style; } + if ([@"Desktop" isEqualToString:model.menuId] && FATAppletVersionTypeRelease != appletInfo.appletVersionType) { + continue; + } [models addObject:model]; } From 1dce1597e0ea435100875e2c0401561ba2bfb92b Mon Sep 17 00:00:00 2001 From: kangxuyao Date: Wed, 29 Dec 2021 11:15:34 +0800 Subject: [PATCH 082/107] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=AB=E7=A0=81?= =?UTF-8?q?=E6=89=93=E5=BC=80=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/build.gradle | 2 +- .../finogeeks/mop/api/mop/AppletModule.java | 29 ++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index e6a7106..9870b14 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.34.12' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211229v01' implementation 'com.finogeeks.mop:plugins:2.34.12' } \ No newline at end of file diff --git a/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java b/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java index 15a7494..8345e46 100644 --- a/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java +++ b/android/src/main/java/com/finogeeks/mop/api/mop/AppletModule.java @@ -5,6 +5,7 @@ import android.text.TextUtils; import android.util.Log; import com.finogeeks.lib.applet.client.FinAppClient; +import com.finogeeks.lib.applet.interfaces.FinCallback; import com.finogeeks.lib.applet.sdk.model.StartAppletDecryptRequest; import com.finogeeks.mop.api.BaseApi; import com.finogeeks.mop.interfaces.ICallback; @@ -28,7 +29,7 @@ public class AppletModule extends BaseApi { @Override public String[] apis() { - return new String[]{"openApplet", "scanOpenApplet"}; + return new String[]{"openApplet", "scanOpenApplet","qrcodeOpenApplet"}; } @Override @@ -37,6 +38,8 @@ public class AppletModule extends BaseApi { openApplet(param, callback); } else if ("scanOpenApplet".equals(event)) { scanOpenApplet(param, callback); + } else if ("qrcodeOpenApplet".equals(event)){ + qrcodeOpenApplet(param,callback); } } @@ -109,4 +112,28 @@ public class AppletModule extends BaseApi { FinAppClient.INSTANCE.getAppletApiManager().startApplet(mContext, new StartAppletDecryptRequest(info)); callback.onSuccess(new HashMap()); } + + private void qrcodeOpenApplet(Map param, ICallback callback){ + String qrcode = String.valueOf(param.get("qrcode")); + FinAppClient.INSTANCE.getAppletApiManager().startAppletByQrcode(mContext, qrcode, new FinCallback() { + @Override + public void onSuccess(String s) { + callback.onSuccess(new HashMap()); + } + + @Override + public void onError(int i, String s) { + callback.onFail(new HashMap(){ + { + put("info",s); + } + }); + } + + @Override + public void onProgress(int i, String s) { + + } + }); + } } From c51007c1c2c37585ef2a35ed5d317fa348de42b8 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Wed, 29 Dec 2021 17:09:52 +0800 Subject: [PATCH 083/107] Update SDK version --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 9870b14..321b774 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.35.0-alpha20211229v01' - implementation 'com.finogeeks.mop:plugins:2.34.12' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211229v09' + implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211229v01' } \ No newline at end of file From 76d6e111c8bf94b6001369a61c0d282c499ca9e8 Mon Sep 17 00:00:00 2001 From: wangtao Date: Wed, 29 Dec 2021 19:10:27 +0800 Subject: [PATCH 084/107] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0iOS=E7=9A=84?= =?UTF-8?q?=E4=BE=9D=E8=B5=96sdk=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/mop.podspec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index 59e3ab1..c01b846 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,10 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.35.0-alpha20211229v02' - s.dependency 'FinAppletExt' , '2.35.0-alpha20211229v02' + s.dependency 'FinApplet' , '2.35.0-alpha20211229v14' + s.dependency 'FinAppletExt' , '2.35.0-alpha20211229v14' + s.dependency 'FinAppletGDMap' , '2.35.0-alpha20211229v14' + s.dependency 'FinAppletWebRTC' , '2.35.0-alpha20211229v14' + end From c797fd0c90a5959509b3578970b9612750915923 Mon Sep 17 00:00:00 2001 From: jizelin Date: Thu, 30 Dec 2021 16:16:02 +0800 Subject: [PATCH 085/107] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=8A=A9?= =?UTF-8?q?=E6=89=8B=E8=8F=9C=E5=8D=95getCustomMenus=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8B=E4=B8=8D=E4=B8=BANSArray?= =?UTF-8?q?=E6=97=B6=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/.flutter-plugins-dependencies | 2 +- example/pubspec.lock | 2 +- ios/Classes/Api/MOPAppletDelegate.m | 4 +++- ios/mop.podspec | 8 ++++---- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index ec9321b..64b440d 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/haley/Documents/Finogeeks/Gitlab/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/haley/Documents/Finogeeks/Gitlab/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-12-29 10:07:33.662750","version":"2.3.0-1.0.pre.169"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-12-30 16:09:08.189707","version":"2.2.2"} \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index 310124c..4d1da1d 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -87,7 +87,7 @@ packages: path: ".." relative: true source: path - version: "2.34.5" + version: "2.34.12" path: dependency: transitive description: diff --git a/ios/Classes/Api/MOPAppletDelegate.m b/ios/Classes/Api/MOPAppletDelegate.m index 4a210d9..7ef475c 100644 --- a/ios/Classes/Api/MOPAppletDelegate.m +++ b/ios/Classes/Api/MOPAppletDelegate.m @@ -61,7 +61,9 @@ FlutterMethodChannel *channel = [[MopPlugin instance] methodChannel]; [channel invokeMethod:@"extensionApi:getCustomMenus" arguments:@{@"appId": appletInfo.appId} result:^(id _Nullable result) { CFRunLoopStop(CFRunLoopGetMain()); - list = result; + if ([result isKindOfClass:[NSArray class]]) { + list = result; + } }]; CFRunLoopRun(); diff --git a/ios/mop.podspec b/ios/mop.podspec index c01b846..4c50e34 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,10 +17,10 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.35.0-alpha20211229v14' - s.dependency 'FinAppletExt' , '2.35.0-alpha20211229v14' - s.dependency 'FinAppletGDMap' , '2.35.0-alpha20211229v14' - s.dependency 'FinAppletWebRTC' , '2.35.0-alpha20211229v14' + s.dependency 'FinApplet' , '2.35.0-alpha20211230v01' + s.dependency 'FinAppletExt' , '2.35.0-alpha20211230v01' + s.dependency 'FinAppletGDMap' , '2.35.0-alpha20211230v01' + s.dependency 'FinAppletWebRTC' , '2.35.0-alpha20211230v01' end From 1c9ea01b85712cd44bf6761ddb1428b7fc715077 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Thu, 30 Dec 2021 08:39:50 +0800 Subject: [PATCH 086/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 321b774..8ff4d90 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.35.0-alpha20211229v09' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211230v01' implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211229v01' } \ No newline at end of file From b62a30c10186b73486fe28babd0e704792c726e6 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Thu, 30 Dec 2021 14:47:53 +0800 Subject: [PATCH 087/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 8ff4d90..ffdd292 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.35.0-alpha20211230v01' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211230v02' implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211229v01' } \ No newline at end of file From d76d40dd662e511c38f1bbccd184c23cf99f9c70 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Thu, 30 Dec 2021 15:36:46 +0800 Subject: [PATCH 088/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index ffdd292..cb3759e 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.35.0-alpha20211230v02' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211230v03' implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211229v01' } \ No newline at end of file From a54be12d3930f6d0cf8b2c5bccdb0192afb452ea Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Thu, 30 Dec 2021 16:34:49 +0800 Subject: [PATCH 089/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index cb3759e..74c5c6d 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.35.0-alpha20211230v03' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211230v04' implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211229v01' } \ No newline at end of file From ab789bedadd9cb54b381954f76304f6b5deb9626 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Fri, 31 Dec 2021 09:23:52 +0800 Subject: [PATCH 090/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 74c5c6d..8add44e 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.35.0-alpha20211230v04' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211231v01' implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211229v01' } \ No newline at end of file From 2572e6650f966a219d0a0f00e4780562facafe5b Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Fri, 31 Dec 2021 14:35:00 +0800 Subject: [PATCH 091/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 8add44e..8e6c25c 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.35.0-alpha20211231v01' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211231v05' implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211229v01' } \ No newline at end of file From 4cefc7eeec42192c43f53e0e9d5abc1fe1e390b2 Mon Sep 17 00:00:00 2001 From: hujianhui Date: Fri, 31 Dec 2021 18:28:14 +0800 Subject: [PATCH 092/107] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=88=B0=E6=A1=8C=E9=9D=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOPAppletDelegate.m | 3 -- ios/Classes/MopPlugin.h | 1 + ios/Classes/MopPlugin.m | 48 ++++++++++++++++++++++++++++- 3 files changed, 48 insertions(+), 4 deletions(-) diff --git a/ios/Classes/Api/MOPAppletDelegate.m b/ios/Classes/Api/MOPAppletDelegate.m index 7ef475c..dab0502 100644 --- a/ios/Classes/Api/MOPAppletDelegate.m +++ b/ios/Classes/Api/MOPAppletDelegate.m @@ -78,9 +78,6 @@ FATAppletMenuStyle style = [typeString isEqualToString:@"onMiniProgram"] ? FATAppletMenuStyleOnMiniProgram : FATAppletMenuStyleCommon; model.menuType = style; } - if ([@"Desktop" isEqualToString:model.menuId] && FATAppletVersionTypeRelease != appletInfo.appletVersionType) { - continue; - } [models addObject:model]; } diff --git a/ios/Classes/MopPlugin.h b/ios/Classes/MopPlugin.h index 70db2b6..cd478db 100644 --- a/ios/Classes/MopPlugin.h +++ b/ios/Classes/MopPlugin.h @@ -8,6 +8,7 @@ @property MopEventStream *mopEventStreamHandler; @property FlutterMethodChannel *methodChannel; @property FlutterMethodChannel *shareMethodChannel; +@property FlutterMethodChannel *appletMethodChannel; + (instancetype) instance; @end diff --git a/ios/Classes/MopPlugin.m b/ios/Classes/MopPlugin.m index efa087b..26d2a08 100644 --- a/ios/Classes/MopPlugin.m +++ b/ios/Classes/MopPlugin.m @@ -48,6 +48,13 @@ static MopPlugin *_instance; binaryMessenger:[registrar messenger]]; [registrar addMethodCallDelegate:_instance channel:shareChannel]; _instance.shareMethodChannel = shareChannel; + + FlutterMethodChannel* appletChannel = [FlutterMethodChannel + methodChannelWithName:@"plugins.finosprite.finogeeks.com/applet" + binaryMessenger:[registrar messenger]]; + [registrar addMethodCallDelegate:_instance channel:appletChannel]; + _instance.appletMethodChannel = appletChannel; + } + (instancetype)instance{ @@ -58,7 +65,11 @@ static MopPlugin *_instance; - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result { if ([@"getPlatformVersion" isEqualToString:call.method]) { result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]); - } else { + } + else if ([@"getAppletInfo" isEqualToString:call.method]) { + result([self appInfoDictWithAppId:call.arguments[@"appId"]]); + } + else { MOPApiRequest* request = [[MOPApiRequest alloc] init]; request.command = call.method; request.param = (NSDictionary*)call.arguments; @@ -106,4 +117,39 @@ static MopPlugin *_instance; return YES; } + +- (NSDictionary *)appInfoDictWithAppId:(NSString *)appId { + FATAppletInfo *info = [[FATClient sharedClient] currentApplet]; + if ([appId isEqualToString:info.appId]) { + NSMutableDictionary *dict = [NSMutableDictionary dictionary]; + dict[@"appId"] = info.appId; + switch (info.appletVersionType) { + case FATAppletVersionTypeRelease: { + dict[@"appType"] = @"release"; + break; + } + case FATAppletVersionTypeTrial: { + dict[@"appType"] = @"trial"; + break; + } + case FATAppletVersionTypeTemporary: { + dict[@"appType"] = @"temporary"; + break; + } + case FATAppletVersionTypeReview: { + dict[@"appType"] = @"review"; + break; + } + case FATAppletVersionTypeDevelopment: { + dict[@"appType"] = @"development"; + break; + } + + default: + break; + } + return dict; + } + return nil;; +} @end From c6fa7e7ca9377c331f4638ecd14a02fe07835f45 Mon Sep 17 00:00:00 2001 From: wanghualei Date: Fri, 31 Dec 2021 17:40:26 +0800 Subject: [PATCH 093/107] =?UTF-8?q?update=20=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/mop.podspec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index 4c50e34..db40fbd 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,10 +17,10 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.35.0-alpha20211230v01' - s.dependency 'FinAppletExt' , '2.35.0-alpha20211230v01' - s.dependency 'FinAppletGDMap' , '2.35.0-alpha20211230v01' - s.dependency 'FinAppletWebRTC' , '2.35.0-alpha20211230v01' + s.dependency 'FinApplet' , '2.35.0-alpha20211231v04' + s.dependency 'FinAppletExt' , '2.35.0-alpha20211231v04' + s.dependency 'FinAppletGDMap' , '2.35.0-alpha20211231v04' + s.dependency 'FinAppletWebRTC' , '2.35.0-alpha20211231v04' end From ab48f06aea855a34143d01af3838474bc2175110 Mon Sep 17 00:00:00 2001 From: kangxuyao Date: Fri, 31 Dec 2021 17:26:14 +0800 Subject: [PATCH 094/107] upgrade --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 8e6c25c..8fd14ed 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.35.0-alpha20211231v05' - implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211229v01' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20211231v09' + implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211231v09' } \ No newline at end of file From 81d4cf04da46c2050e8621f181ba2e1e38fb5546 Mon Sep 17 00:00:00 2001 From: developer Date: Fri, 31 Dec 2021 21:58:47 +0800 Subject: [PATCH 095/107] release: version:2.35.0 --- ios/mop.podspec | 7 ++----- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index db40fbd..129d3b9 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,10 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.35.0-alpha20211231v04' - s.dependency 'FinAppletExt' , '2.35.0-alpha20211231v04' - s.dependency 'FinAppletGDMap' , '2.35.0-alpha20211231v04' - s.dependency 'FinAppletWebRTC' , '2.35.0-alpha20211231v04' - + s.dependency 'FinApplet' , '2.35.0' + s.dependency 'FinAppletExt' , '2.35.0' end diff --git a/pubspec.yaml b/pubspec.yaml index 5b1e732..6338e2d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.34.12' +version: '2.35.0' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From 92623d87669cd4990d7b73aab7f932b4b2a915df Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Mon, 3 Jan 2022 18:50:10 +0800 Subject: [PATCH 096/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 8fd14ed..1577080 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.35.0-alpha20211231v09' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20220103v02' implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211231v09' } \ No newline at end of file From 81d1e48a1a17cb2c9dd592fae3f2e0352fe5dd5d Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Tue, 4 Jan 2022 08:57:50 +0800 Subject: [PATCH 097/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 1577080..163fd1b 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.35.0-alpha20220103v02' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20220104v01' implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211231v09' } \ No newline at end of file From e3f184c2f0b3dde1d8c4e99d1b866ce971c00193 Mon Sep 17 00:00:00 2001 From: wangtao Date: Tue, 4 Jan 2022 15:11:24 +0800 Subject: [PATCH 098/107] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9iOS?= =?UTF-8?q?=E5=9C=A89.0=E7=B3=BB=E7=BB=9F=E4=B8=8ABOOL=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=B4=A9=E6=BA=83=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOP_initialize.h | 4 ++-- ios/Classes/Api/MOP_webViewBounces.h | 2 +- ios/mop.podspec | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ios/Classes/Api/MOP_initialize.h b/ios/Classes/Api/MOP_initialize.h index 349c5a3..22f3ac9 100644 --- a/ios/Classes/Api/MOP_initialize.h +++ b/ios/Classes/Api/MOP_initialize.h @@ -17,8 +17,8 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString *apiPrefix; @property (nonatomic, copy) NSString *cryptType; @property (nonatomic, copy) NSString *userId; -@property (nonatomic, assign) BOOL disablePermission; -@property (nonatomic, assign) BOOL encryptServerData; +@property (nonatomic, assign) bool disablePermission; +@property (nonatomic, assign) bool encryptServerData; @end diff --git a/ios/Classes/Api/MOP_webViewBounces.h b/ios/Classes/Api/MOP_webViewBounces.h index 0d15f9b..3f4afde 100644 --- a/ios/Classes/Api/MOP_webViewBounces.h +++ b/ios/Classes/Api/MOP_webViewBounces.h @@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN @interface MOP_webViewBounces : MOPBaseApi -@property (nonatomic, assign) BOOL bounces; +@property (nonatomic, assign) bool bounces; @end diff --git a/ios/mop.podspec b/ios/mop.podspec index 129d3b9..5fa25e8 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,9 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.35.0' - s.dependency 'FinAppletExt' , '2.35.0' + s.dependency 'FinApplet' , '2.35.0-alpha20211231v07' + s.dependency 'FinAppletExt' , '2.35.0-alpha20211231v07' + s.dependency 'FinAppletGDMap' , '2.35.0-alpha20211231v07' + s.dependency 'FinAppletWebRTC' , '2.35.0-alpha20211231v07' end From e0f05d12f6c3256164eefa557dc45532878d00d5 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Tue, 4 Jan 2022 17:45:01 +0800 Subject: [PATCH 099/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 163fd1b..f169d78 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.35.0-alpha20220104v01' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20220104v11' implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211231v09' } \ No newline at end of file From 9bc3ff42c1aae705dacde2ccd2622c30452ab840 Mon Sep 17 00:00:00 2001 From: developer Date: Wed, 5 Jan 2022 09:58:19 +0800 Subject: [PATCH 100/107] release: version:2.35.0 --- ios/mop.podspec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index 5fa25e8..129d3b9 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,9 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.35.0-alpha20211231v07' - s.dependency 'FinAppletExt' , '2.35.0-alpha20211231v07' - s.dependency 'FinAppletGDMap' , '2.35.0-alpha20211231v07' - s.dependency 'FinAppletWebRTC' , '2.35.0-alpha20211231v07' + s.dependency 'FinApplet' , '2.35.0' + s.dependency 'FinAppletExt' , '2.35.0' end From 91e068664385234d80bd76c954ccf4a3c34d9c40 Mon Sep 17 00:00:00 2001 From: developer Date: Thu, 6 Jan 2022 16:16:39 +0800 Subject: [PATCH 101/107] release: version:2.35.1 --- ios/mop.podspec | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/mop.podspec b/ios/mop.podspec index 129d3b9..b4819ee 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A finclip miniprogram flutter sdk. s.dependency 'Flutter' s.ios.deployment_target = '9.0' - s.dependency 'FinApplet' , '2.35.0' - s.dependency 'FinAppletExt' , '2.35.0' + s.dependency 'FinApplet' , '2.35.1' + s.dependency 'FinAppletExt' , '2.35.1' end diff --git a/pubspec.yaml b/pubspec.yaml index 6338e2d..8d8df22 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mop description: A Finogeeks MiniProgram Flutter SDK. -version: '2.35.0' +version: '2.35.1' homepage: https://github.com/finogeeks/mop-flutter-sdk environment: From 7471a8483c6c278f1f36a2d57aff72f11fe42462 Mon Sep 17 00:00:00 2001 From: wanghualei Date: Thu, 6 Jan 2022 18:14:39 +0800 Subject: [PATCH 102/107] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=8E=89=E9=AB=98?= =?UTF-8?q?=E5=BE=B7SDK=E7=9A=84=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Classes/Api/MOP_initialize.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Classes/Api/MOP_initialize.m b/ios/Classes/Api/MOP_initialize.m index c90dff7..43c888e 100644 --- a/ios/Classes/Api/MOP_initialize.m +++ b/ios/Classes/Api/MOP_initialize.m @@ -54,7 +54,7 @@ // [[FATExtClient sharedClient] fat_prepareExtensionApis]; // [[FATExtClient sharedClient] fat_UsingMapType:@"FATExtMapStyleGD" MapKey:@"6f0f28c4138cbaa51aa5890e26996ea2"]; - [FATGDMapComponent setGDMapAppKey:@"6f0f28c4138cbaa51aa5890e26996ea2"]; + // [FATGDMapComponent setGDMapAppKey:@"6f0f28c4138cbaa51aa5890e26996ea2"]; [[FATClient sharedClient] setEnableLog:YES]; // [FATWebRTCComponent registerComponent]; success(@{}); From 8537b2750f5d4f709797a78181d466bd6f1225a3 Mon Sep 17 00:00:00 2001 From: wanghualei Date: Thu, 6 Jan 2022 18:35:23 +0800 Subject: [PATCH 103/107] update --- example/.flutter-plugins-dependencies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index 64b440d..eea946a 100644 --- a/example/.flutter-plugins-dependencies +++ b/example/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/beetle/Desktop/finogeeks/gitlab/finosprite/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2021-12-30 16:09:08.189707","version":"2.2.2"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"mop","path":"/Users/haley/Documents/Finogeeks/Gitlab/finclip-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/haley/Documents/Finogeeks/Gitlab/finclip-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2022-01-06 18:17:11.770441","version":"2.3.0-1.0.pre.169"} \ No newline at end of file From 6d3339ad06ab3bec62d91e0c69f5d3225cee3dac Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Thu, 6 Jan 2022 22:50:12 +0800 Subject: [PATCH 104/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index f169d78..b04a64f 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.35.0-alpha20220104v11' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20220106v06' implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211231v09' } \ No newline at end of file From 3aef2246593244d8d204624ec40a0f9a92507fe0 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Fri, 7 Jan 2022 16:54:09 +0800 Subject: [PATCH 105/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index b04a64f..91be7f8 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.35.0-alpha20220106v06' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20220107v03' implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211231v09' } \ No newline at end of file From b53fb2ff41f4e60857d889754a17667c0bc04a8b Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Fri, 7 Jan 2022 18:16:39 +0800 Subject: [PATCH 106/107] Update SDK version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 91be7f8..a061ad1 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.35.0-alpha20220107v03' + implementation 'com.finogeeks.lib:finapplet:2.35.0-alpha20220107v04' implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211231v09' } \ No newline at end of file From b6a16f43ba30f5c7356039f7c7dcb5a7b354336c Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Fri, 7 Jan 2022 19:54:43 +0800 Subject: [PATCH 107/107] Update SDK version --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index a061ad1..fd4ef15 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.35.0-alpha20220107v04' - implementation 'com.finogeeks.mop:plugins:2.35.0-alpha20211231v09' + implementation 'com.finogeeks.lib:finapplet:2.35.1' + implementation 'com.finogeeks.mop:plugins:2.35.1' } \ No newline at end of file