From cb67d092ac5de43fc843172497d2a44d8ce73a22 Mon Sep 17 00:00:00 2001 From: wanghualei Date: Thu, 10 Dec 2020 17:17:13 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=A9=E5=B1=95SDK?= =?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 --- example/.flutter-plugins-dependencies | 2 +- example/pubspec.lock | 38 +++++++++++++-------------- ios/Classes/Api/MOP_initialize.m | 2 ++ ios/mop.podspec | 4 +-- 4 files changed, 24 insertions(+), 22 deletions(-) diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies index 5b7d6f6..c2d658b 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/Flutter/mop-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/haley/Documents/Finogeeks/Flutter/mop-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2020-09-15 18:25:43.579761","version":"1.22.0-2.0.pre.105"} \ 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/Flutter/mop-flutter-sdk/","dependencies":[]}],"android":[{"name":"mop","path":"/Users/haley/Documents/Finogeeks/Flutter/mop-flutter-sdk/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"mop","dependencies":[]}],"date_created":"2020-12-01 10:11:53.132361","version":"1.24.0-8.0.pre.140"} \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index eb9da1e..9545068 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,42 +7,42 @@ packages: name: async url: "https://pub.flutter-io.cn" source: hosted - version: "2.4.1" + version: "2.5.0-nullsafety.3" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.0" + version: "2.1.0-nullsafety.3" characters: dependency: transitive description: name: characters url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.0" + version: "1.1.0-nullsafety.5" charcode: dependency: transitive description: name: charcode url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.3" + version: "1.2.0-nullsafety.3" clock: dependency: transitive description: name: clock url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.1" + version: "1.1.0-nullsafety.3" collection: dependency: transitive description: name: collection url: "https://pub.flutter-io.cn" source: hosted - version: "1.14.12" + version: "1.15.0-nullsafety.5" cupertino_icons: dependency: "direct main" description: @@ -56,7 +56,7 @@ packages: name: fake_async url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.0" + version: "1.2.0-nullsafety.3" flutter: dependency: "direct main" description: flutter @@ -73,14 +73,14 @@ packages: name: matcher url: "https://pub.flutter-io.cn" source: hosted - version: "0.12.6" + version: "0.12.10-nullsafety.3" meta: dependency: transitive description: name: meta url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.8" + version: "1.3.0-nullsafety.6" mop: dependency: "direct dev" description: @@ -94,7 +94,7 @@ packages: name: path url: "https://pub.flutter-io.cn" source: hosted - version: "1.7.0" + version: "1.8.0-nullsafety.3" sky_engine: dependency: transitive description: flutter @@ -106,55 +106,55 @@ packages: name: source_span url: "https://pub.flutter-io.cn" source: hosted - version: "1.7.0" + version: "1.8.0-nullsafety.4" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.flutter-io.cn" source: hosted - version: "1.9.3" + version: "1.10.0-nullsafety.6" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.0" + version: "2.1.0-nullsafety.3" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.5" + version: "1.1.0-nullsafety.3" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.0" + version: "1.2.0-nullsafety.3" test_api: dependency: transitive description: name: test_api url: "https://pub.flutter-io.cn" source: hosted - version: "0.2.16" + version: "0.2.19-nullsafety.6" typed_data: dependency: transitive description: name: typed_data url: "https://pub.flutter-io.cn" source: hosted - version: "1.1.6" + version: "1.3.0-nullsafety.5" vector_math: dependency: transitive description: name: vector_math url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.8" + version: "2.1.0-nullsafety.5" sdks: - dart: ">=2.9.0-14.0.dev <3.0.0" + dart: ">=2.12.0-0.0 <3.0.0" diff --git a/ios/Classes/Api/MOP_initialize.m b/ios/Classes/Api/MOP_initialize.m index cfd6121..0bdbf59 100644 --- a/ios/Classes/Api/MOP_initialize.m +++ b/ios/Classes/Api/MOP_initialize.m @@ -7,6 +7,7 @@ #import "MOP_initialize.h" #import +#import @implementation MOP_initialize @@ -44,6 +45,7 @@ failure(@"初始化失败"); return; } + [[FATExtClient sharedClient] fat_prepareExtensionApis]; success(@{}); diff --git a/ios/mop.podspec b/ios/mop.podspec index 2dc2aad..0efb346 100644 --- a/ios/mop.podspec +++ b/ios/mop.podspec @@ -17,7 +17,7 @@ A new flutter plugin project. s.dependency 'Flutter' s.ios.deployment_target = '8.0' - s.dependency 'FinApplet' , '2.12.55' - s.dependency 'FinAppletExt' , '2.12.55' + s.dependency 'FinApplet' , '2.13.16' + s.dependency 'FinAppletExt' , '2.13.16' end From f7a0c77028d26651e3bd92af67d3534d582e7a83 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Thu, 10 Dec 2020 18:05:30 +0800 Subject: [PATCH 2/7] update finapplet and plugins version --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 8870e78..bac9556 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.13.13' - implementation 'com.finogeeks.mop:plugins:0.0.23' + implementation 'com.finogeeks.lib:finapplet:2.13.15' + implementation 'com.finogeeks.mop:plugins:0.0.25' } \ No newline at end of file From a58a5d9b542be63e4e3547654a9bb9462f26fda6 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Fri, 11 Dec 2020 13:55:17 +0800 Subject: [PATCH 3/7] update finapplet version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index bac9556..e3415fd 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.13.15' + implementation 'com.finogeeks.lib:finapplet:2.13.16' implementation 'com.finogeeks.mop:plugins:0.0.25' } \ No newline at end of file From d1c485eb5643e0d33bc72aaf96f5e553aef13229 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Mon, 14 Dec 2020 08:27:19 +0800 Subject: [PATCH 4/7] update finapplet version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index e3415fd..3d5f6e3 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.13.16' + implementation 'com.finogeeks.lib:finapplet:2.13.18' implementation 'com.finogeeks.mop:plugins:0.0.25' } \ No newline at end of file From 2e30db7f364fdc7e60427e7cce85e032fe778ea1 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Mon, 14 Dec 2020 10:39:21 +0800 Subject: [PATCH 5/7] update finapplet version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 3d5f6e3..8cd54ae 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.13.18' + implementation 'com.finogeeks.lib:finapplet:2.13.20' implementation 'com.finogeeks.mop:plugins:0.0.25' } \ No newline at end of file From 265d9bd19e7d7f8626b565189d0285239753c386 Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Tue, 15 Dec 2020 17:21:44 +0800 Subject: [PATCH 6/7] update finapplet version --- android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 8cd54ae..5aa8629 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.13.20' + implementation 'com.finogeeks.lib:finapplet:2.13.25' implementation 'com.finogeeks.mop:plugins:0.0.25' } \ No newline at end of file From 97db208c08d520c966f9d4f7b8c8818e7f8d248f Mon Sep 17 00:00:00 2001 From: xiaoyu Date: Wed, 16 Dec 2020 14:30:47 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=89=A9=E5=B1=95SDK?= =?UTF-8?q?=E4=B8=ADAPI=E7=9A=84=E6=B3=A8=E5=86=8C=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=EF=BC=8C=E9=83=BD=E6=B3=A8=E5=86=8C=E5=88=B0=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E8=BF=9B=E7=A8=8B=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/build.gradle | 4 +-- .../finogeeks/mop/api/mop/AppletModule.java | 2 -- .../com/finogeeks/mop/api/mop/BaseModule.java | 26 +++++++++++++++---- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 5aa8629..7b5b834 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.13.25' - implementation 'com.finogeeks.mop:plugins:0.0.25' + implementation 'com.finogeeks.lib:finapplet:2.13.29' + implementation 'com.finogeeks.mop:plugins:0.0.26' } \ 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 6dff660..b35821e 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 @@ -4,8 +4,6 @@ import android.content.Context; import android.util.Log; import com.finogeeks.lib.applet.client.FinAppClient; -import com.finogeeks.lib.applet.client.FinAppConfig; -import com.finogeeks.lib.applet.client.FinAppInfo; import com.finogeeks.mop.api.BaseApi; import com.finogeeks.mop.interfaces.ICallback; 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 afb73b9..9d6384c 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 @@ -1,20 +1,24 @@ package com.finogeeks.mop.api.mop; +import android.app.Activity; import android.app.Application; import android.content.Context; -import android.util.Log; -import android.widget.Toast; import com.finogeeks.lib.applet.BuildConfig; import com.finogeeks.lib.applet.client.FinAppClient; import com.finogeeks.lib.applet.client.FinAppConfig; +import com.finogeeks.lib.applet.client.FinAppProcessClient; import com.finogeeks.lib.applet.interfaces.FinCallback; +import com.finogeeks.lib.applet.interfaces.IApi; import com.finogeeks.mop.api.BaseApi; import com.finogeeks.mop.interfaces.ICallback; import com.finogeeks.mop.plugins.client.FinPluginClient; import com.finogeeks.mop.service.MopPluginService; -import java.util.HashMap; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; import java.util.Map; public class BaseModule extends BaseApi { @@ -39,7 +43,20 @@ public class BaseModule extends BaseApi { public void invoke(String event, Map param, final ICallback callback) { if (FinAppClient.INSTANCE.isFinAppProcess(super.getContext())) { - // 小程序进程不执行任何初始化操作 + // 扩展SDK的API都注册到小程序进程 + FinAppProcessClient.INSTANCE.setCallback(new FinAppProcessClient.Callback() { + @Nullable + @Override + public List getRegisterExtensionApis(@NotNull Activity activity) { + return FinPluginClient.INSTANCE.getPluginManager().getPlugins(activity); + } + + @Nullable + @Override + public List getRegisterExtensionWebApis(@NotNull Activity activity) { + return null; + } + }); return; } String appkey = String.valueOf(param.get("appkey")); @@ -79,7 +96,6 @@ public class BaseModule extends BaseApi { @Override public void onSuccess(Object result) { // SDK初始化成功 - FinPluginClient.INSTANCE.getPluginManager().registerPlugins(application); callback.onSuccess(null); }