@@ -24,30 +24,30 @@ System:
2424 Memory: 93.87 MB / 16.00 GB
2525 Shell: 3.2.57 - /bin/bash
2626 Binaries:
27- Node: 10.20.1 - ~ /.nvm/versions/node/v10.20.1/bin/node
27+ Node: 16.4.0 - ~ /.nvm/versions/node/v10.20.1/bin/node
2828 Yarn: 1.22.4 - ~ /.nvm/versions/node/v10.20.1/bin/yarn
29- npm: 6.14.4 - ~ /.nvm/versions/node/v10.20.1/bin/npm
29+ npm: 7.18.1 - ~ /.nvm/versions/node/v10.20.1/bin/npm
3030 Watchman: Not Found
3131 Managers:
32- CocoaPods: 1.9 .1 - /usr/local/bin/pod
32+ CocoaPods: 1.10 .1 - /usr/local/bin/pod
3333 SDKs:
3434 iOS SDK:
35- Platforms: iOS 13 .4, DriverKit 19.0 , macOS 10.15 , tvOS 13.4 , watchOS 6 .2
35+ Platforms: iOS 14 .4, DriverKit 20.2 , macOS 11.1 , tvOS 14.3 , watchOS 7 .2
3636 Android SDK:
37- API Levels: 26, 28, 29
38- Build Tools: 28 .0.3, 29 .0.2, 29 .0.3, 30 .0.0
39- System Images: android-26 | Google Play Intel x86 Atom
40- Android NDK: Not Found
37+ API Levels: 22, 23, 24, 25, 26, 27, 28, 29, 30
38+ Build Tools: 23 .0.2, 23.0. 3, 25 .0.0, 26.0. 2, 27 .0.0, 27.0. 3, 28 .0.3, 29.0.2, 30.0.2
39+ System Images: android-28 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom
40+ Android NDK: 21.3.6528147
4141 IDEs:
42- Android Studio: 3.6 AI-192.7142.36.36.6241897
43- Xcode: 11 .4/11E146 - /usr/bin/xcodebuild
42+ Android Studio: 4.0 AI-193.6911.18.40.6626763
43+ Xcode: 12 .4/12D4e - /usr/bin/xcodebuild
4444 Languages:
4545 Java: 10.0.1 - /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/bin/javac
4646 Python: 2.7.16 - /usr/bin/python
4747 npmPackages:
4848 @react-native-community/cli: Not Found
49- react: 16.11.0 => 16.11.0
50- react-native: 0.62.2 => 0.62.2
49+ react: 17.0.2 => 17.0.2
50+ react-native: 0.65.1 => 0.65.1
5151 npmGlobalPackages:
5252 * react-native* : Not Found
5353
@@ -79,22 +79,44 @@ react-native init mopdemo
79791 . 引入小程序引擎插件。在 package.json 文件中引入小程序 ReactNative 插件
8080
8181``` javascript
82- " react-native-mopsdk" : " ^1.0.1 "
82+ " react-native-mopsdk" : " ^1.0.2 "
8383```
8484
85- 2 . 在 main.dart 文件中增加以下小程序引擎初始化方法。 Mop.instance.initialize 这里需要用到 sdkkey 和 secret。可以直接在[ https://mp.finogeeks.com ] ( https://mp.finogeeks.com ) 免费注册获取。注册使用方法可以参考 [ 接入指引] ( https://mp.finogeeks.com/mop/document/introduce/access/mechanism.html )
85+ android 在 build.gradle 添加 maven 配置
86+
87+ ``` bash
88+ maven {
89+ url " https://gradle.finogeeks.club/repository/applet/"
90+ credentials {
91+ username " applet"
92+ password " 123321"
93+ }
94+ }
95+ ```
96+
97+ iOS 需要重新 pod install
98+
99+ 2 . 在 App.js 文件中增加以下小程序引擎初始化方法。 Mop.instance.initialize 这里需要用到 sdkkey 和 secret。可以直接在[ https://mp.finogeeks.com ] ( https://mp.finogeeks.com ) 免费注册获取。注册使用方法可以参考 [ 接入指引] ( https://mp.finogeeks.com/mop/document/introduce/access/mechanism.html )
86100
87101``` javascript
88102import MopSDK from ' react-native-mopsdk' ;
89103// 1. mop初始化
90- MopSDK .initialize ({
91- appkey: ' 22LyZEib0gLTQdU3MUauASlb4KFRNRajt4RmY6UDSucA' ,
92- secret: ' 4a915e447bcbd439' ,
93- apiServer: ' https://mp.finogeeks.com' ,
94- apiPrefix: ' /api/v1/mop'
95- }, (data ) => {
96- console .log (' message;' , data);
97- });
104+ MopSDK .initialize (
105+ {
106+ appkey: ' 22LyZEib0gLTQdU3MUauASlb4KFRNRajt4RmY6UDSucA' ,
107+ secret: ' c5cc7a8c14a2b04a' ,
108+ apiServer: ' https://api.finclip.com' ,
109+ apiPrefix: ' /api/v1/mop' ,
110+ },
111+ data => {
112+ console .log (' message;' , data);
113+ const s = JSON .stringify (data);
114+ this .setState ({
115+ status: ' native callback received' ,
116+ message: s,
117+ });
118+ },
119+ );
98120```
99121
1001223 . 打开小程序
0 commit comments