@xrnjs/app-template 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/$package.json +3 -3
  2. package/.env +1 -1
  3. package/.env.prod +1 -1
  4. package/android/app/build.gradle +5 -5
  5. package/android/app/src/main/AndroidManifest.xml +0 -8
  6. package/android/app/src/main/assets/xrn-manifest.json +1 -1
  7. package/android/app/src/main/java/com/xrn/template/MainActivity.kt +5 -18
  8. package/android/app/src/main/java/com/xrn/template/MainApplication.kt +1 -1
  9. package/android/app/src/main/res/drawable-xxhdpi/ic_logo_bg.png +0 -0
  10. package/android/app/src/main/res/layout/activity_splash.xml +6 -8
  11. package/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  12. package/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  13. package/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  14. package/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  15. package/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  16. package/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  17. package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  18. package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  19. package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  20. package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  21. package/android/settings.gradle +4 -4
  22. package/harmony/build-profile.json5 +11 -7
  23. package/harmony/entry/oh-package-lock.json5 +28 -28
  24. package/harmony/entry/oh-package.json5 +8 -12
  25. package/harmony/entry/src/main/cpp/generated/RNDeviceInfo.cpp +27 -0
  26. package/harmony/entry/src/main/ets/navDestination/Splash.ets +9 -50
  27. package/harmony/entry/src/main/resources/base/media/foreground.png +0 -0
  28. package/harmony/entry/src/main/resources/base/media/ic_logo_bg.png +0 -0
  29. package/harmony/entry/src/main/resources/base/media/startIcon.png +0 -0
  30. package/harmony/oh-package.json5 +3 -3
  31. package/ios/BundleEventCenter/XTBundleProvider.m +1 -2
  32. package/ios/Podfile +4 -4
  33. package/ios/Podfile.lock +22 -22
  34. package/ios/XRNTemplate/Info.plist +2 -2
  35. package/ios/XRNTemplate.xcodeproj/project.pbxproj +3 -3
  36. package/main-bundle/App.tsx +1 -1
  37. package/main-bundle/app.json +1 -1
  38. package/main-bundle/babel.config.js +0 -1
  39. package/main-bundle/index.ts +1 -1
  40. package/main-bundle/package.json +3 -7
  41. package/main-bundle/router.ts +1 -1
  42. package/main-bundle/xrn.config.ts +1 -1
  43. package/main-bundle/yarn.lock +9651 -13622
  44. package/package.json +5 -4
  45. package/react-native.config.js +13 -2
  46. package/sub-bundle/App.tsx +1 -1
  47. package/sub-bundle/babel.config.js +0 -1
  48. package/sub-bundle/index.ts +1 -1
  49. package/sub-bundle/package.json +3 -8
  50. package/sub-bundle/router.ts +1 -1
  51. package/sub-bundle/xrn.config.ts +1 -1
  52. package/sub-bundle/yarn.lock +9651 -13652
  53. package/xrn.config.json +12 -10
  54. package/android/app/src/main/assets/index.main-bundle.bundle +0 -178940
  55. package/android/app/src/main/assets/index.sub-bundle.bundle +0 -178928
  56. package/android/app/src/main/res/raw/launch_screen.json +0 -1
  57. package/harmony/entry/src/main/ets/lottie/launch_screen.json +0 -1
package/$package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "codegen": "react-native codegen-harmony --cpp-output-path ./harmony/entry/src/main/cpp/generated --rnoh-module-path ./harmony/entry/oh_modules/@rnoh/react-native-openharmony",
8
8
  "build:harmony": "xrn build XRNTemplate harmony --type debug --appFormat hap",
9
9
  "build:ios": "xrn build XRNTemplate ios --type debug --appFormat ipa",
10
- "build:ios-sim": "xrn build XRNTemplate ios --type release --appFormat app",
10
+ "build:ios-sim": "xrn build XRNTemplate ios --type debug --appFormat app",
11
11
  "build:android": "xrn build XRNTemplate android --type debug --appFormat apk",
12
12
  "publish:ios": "xrn app-publish XRNTemplate ios --type release --appFormat ipa --changeLog iOS发布",
13
13
  "postinstall": "xrn-native-postinstall"
@@ -16,7 +16,7 @@
16
16
  "@react-native-async-storage/async-storage": "1.21.0",
17
17
  "@react-native-clipboard/clipboard": "1.13.2",
18
18
  "@react-native-community/netinfo": "11.3.2",
19
- "@xrn/core": "0.0.2-beta.65",
19
+ "@xrnjs/core": "0.0.3",
20
20
  "react": "18.2.0",
21
21
  "react-native": "0.72.5",
22
22
  "react-native-config": "1.5.3",
@@ -38,7 +38,7 @@
38
38
  "@types/lodash": "^4.17.12",
39
39
  "@types/react": "18.0.25",
40
40
  "@types/react-native": "0.72.8",
41
- "@xrn/cli": "0.0.2-beta.31",
41
+ "@xrnjs/cli": "0.0.3",
42
42
  "eslint": "^7.32.0",
43
43
  "metro-react-native-babel-preset": "0.72.4",
44
44
  "patch-package": "^8.0.0"
package/.env CHANGED
@@ -3,4 +3,4 @@ ENV_NAME=dev
3
3
  CDN_URL_PREFIX=https://example.oss-cn-hangzhou.aliyuncs.com
4
4
 
5
5
  # CodePush
6
- CODEPUSH_URL=http://cp.example.cn/
6
+ CODEPUSH_URL=""
package/.env.prod CHANGED
@@ -3,4 +3,4 @@ ENV_NAME=prod
3
3
  CDN_URL_PREFIX=https://cdn-cn2.example.cn
4
4
 
5
5
  # CodePush
6
- CODEPUSH_URL=http://cp.example.cn/
6
+ CODEPUSH_URL=""
@@ -4,7 +4,7 @@ apply plugin: 'org.jetbrains.kotlin.android'
4
4
  apply plugin: 'kotlin-android'
5
5
  apply plugin: 'kotlinx-serialization'
6
6
 
7
- apply from: "../../node_modules/@xrn/react-native-code-push/android/codepush.gradle"
7
+ apply from: "../../node_modules/@xrnjs/react-native-code-push/android/codepush.gradle"
8
8
  apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
9
9
 
10
10
  /**
@@ -135,10 +135,10 @@ dependencies {
135
135
  // The version of react-native is set by the React Native Gradle Plugin
136
136
  implementation("com.facebook.react:react-android")
137
137
 
138
- implementation project(':xrn_multi-bundle')
139
- implementation project(':xrn_bundle')
140
- implementation project(':xrn_debug-tools')
141
- implementation project(':xrn_react-native-code-push')
138
+ implementation project(':xrnjs_multi-bundle')
139
+ implementation project(':xrnjs_bundle')
140
+ implementation project(':xrnjs_debug-tools')
141
+ implementation project(':xrnjs_react-native-code-push')
142
142
 
143
143
  implementation "androidx.multidex:multidex:2.0.1"
144
144
 
@@ -3,8 +3,6 @@
3
3
 
4
4
  <uses-permission android:name="android.permission.INTERNET" />
5
5
 
6
- <queries><provider android:authorities="com.facebook.katana.provider.PlatformProvider" /></queries>
7
-
8
6
  <application
9
7
  android:name="com.xrn.template.MainApplication"
10
8
  android:label="@string/app_name"
@@ -13,12 +11,6 @@
13
11
  android:allowBackup="false"
14
12
  android:theme="@style/AppTheme">
15
13
 
16
- <!-- <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>-->
17
- <!-- <meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token"/>-->
18
- <!-- <provider android:authorities="com.facebook.app.FacebookContentProvider1023244862344164"-->
19
- <!-- android:name="com.facebook.FacebookContentProvider"-->
20
- <!-- android:exported="true"/>-->
21
-
22
14
  <activity
23
15
  android:name="com.xrn.template.MainActivity"
24
16
  android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
@@ -1 +1 @@
1
- {"dependencies":{"@bam.tech/react-native-image-resizer":"3.0.9","@react-native-async-storage/async-storage":"1.21.0","@react-native-camera-roll/camera-roll":"7.8.3","@react-native-clipboard/clipboard":"1.13.2","@react-native-community/netinfo":"11.3.2","@react-native-community/push-notification-ios":"1.11.0","@react-native-cookies/cookies":"6.2.1","@react-native-oh/react-native-harmony":"0.72.38","@react-native-picker/picker":"2.6.1","@sdcx/pull-to-refresh":"0.21.0","@sentry/react-native":"4.15.2","@xrn/core":"0.0.2-beta.33","@yidun/quickpass-plugin-rn":"1.3.4","lottie-react-native":"6.4.1","react":"18.2.0","react-native":"0.72.5","react-native-adjust":"4.38.0","react-native-blob-util":"0.19.11","react-native-config":"1.5.3","react-native-device-info":"11.1.0","react-native-document-picker":"9.2.0","react-native-fast-image":"8.6.3","react-native-fs":"2.20.0","react-native-gesture-handler":"2.14.1","react-native-get-random-values":"1.11.0","react-native-image-picker":"7.0.3","react-native-keyboard-manager":"6.5.16-0","react-native-keychain":"8.1.2","react-native-linear-gradient":"3.0.0-alpha.1","react-native-localize":"3.1.0","react-native-modpow":"1.1.1-0","react-native-orientation-locker":"1.7.0","react-native-pdf":"6.7.4","react-native-permissions":"4.1.2","react-native-place-module":"0.1.1","react-native-reanimated":"3.6.0","react-native-safe-area-context":"4.7.4","react-native-screens":"3.33.0","react-native-svg":"15.0.0","react-native-touch-id":"4.4.1","react-native-update-in-app-xt":"1.0.5","react-native-video":"6.0.0-alpha.9","react-native-vision-camera":"4.0.1","react-native-webview":"13.10.2"},"commonBaseLine":{"modules":{},"id":0,"hash":"","useOldApp":true}}
1
+ {"dependencies":{"@bam.tech/react-native-image-resizer":"3.0.9","@react-native-async-storage/async-storage":"1.21.0","@react-native-camera-roll/camera-roll":"7.8.3","@react-native-clipboard/clipboard":"1.13.2","@react-native-community/netinfo":"11.3.2","@react-native-community/push-notification-ios":"1.11.0","@react-native-cookies/cookies":"6.2.1","@react-native-oh/react-native-harmony":"0.72.38","@react-native-picker/picker":"2.6.1","@sdcx/pull-to-refresh":"0.21.0","@sentry/react-native":"4.15.2","@xrnjs/core":"0.0.2-beta.33","@yidun/quickpass-plugin-rn":"1.3.4","lottie-react-native":"6.4.1","react":"18.2.0","react-native":"0.72.5","react-native-adjust":"4.38.0","react-native-blob-util":"0.19.11","react-native-config":"1.5.3","react-native-device-info":"11.1.0","react-native-document-picker":"9.2.0","react-native-fast-image":"8.6.3","react-native-fs":"2.20.0","react-native-gesture-handler":"2.14.1","react-native-get-random-values":"1.11.0","react-native-image-picker":"7.0.3","react-native-keyboard-manager":"6.5.16-0","react-native-keychain":"8.1.2","react-native-linear-gradient":"3.0.0-alpha.1","react-native-localize":"3.1.0","react-native-modpow":"1.1.1-0","react-native-orientation-locker":"1.7.0","react-native-pdf":"6.7.4","react-native-permissions":"4.1.2","react-native-place-module":"0.1.1","react-native-reanimated":"3.6.0","react-native-safe-area-context":"4.7.4","react-native-screens":"3.33.0","react-native-svg":"15.0.0","react-native-touch-id":"4.4.1","react-native-update-in-app-xt":"1.0.5","react-native-video":"6.0.0-alpha.9","react-native-vision-camera":"4.0.1","react-native-webview":"13.10.2"},"commonBaseLine":{"modules":{},"id":0,"hash":"","useOldApp":true}}
@@ -2,6 +2,8 @@ package com.xrn.template
2
2
 
3
3
  import android.animation.Animator
4
4
  import android.os.Bundle
5
+ import android.os.Handler
6
+ import android.os.Looper
5
7
  import android.view.LayoutInflater
6
8
  import androidx.appcompat.app.AppCompatActivity
7
9
  import com.blankj.utilcode.util.LogUtils
@@ -18,24 +20,9 @@ class MainActivity : AppCompatActivity() {
18
20
  )
19
21
  )
20
22
  setContentView(binding.root)
21
- initViews(binding)
22
- }
23
-
24
- private fun initViews(binding: ActivitySplashBinding) {
25
- binding.lavSplashLottie.addAnimatorListener(object : Animator.AnimatorListener {
26
- override fun onAnimationStart(animation: Animator) {
27
- }
28
-
29
- override fun onAnimationEnd(animation: Animator) {
30
- startXMainActivity()
31
- }
32
-
33
- override fun onAnimationCancel(animation: Animator) {
34
- }
35
-
36
- override fun onAnimationRepeat(animation: Animator) {
37
- }
38
- })
23
+ Handler(Looper.getMainLooper()).postDelayed({
24
+ startXMainActivity()
25
+ }, 500)
39
26
  }
40
27
 
41
28
  private fun startXMainActivity() {
@@ -53,7 +53,7 @@ class MainApplication : MultiDexApplication(), ReactApplication {
53
53
  e.printStackTrace()
54
54
  Unit
55
55
  }
56
- init(this, params, !BuildConfig.DEBUG, BuildConfig.DEBUG)
56
+ init(this, params)
57
57
  }
58
58
 
59
59
  private fun initNavigation() {
@@ -4,13 +4,11 @@
4
4
  android:layout_height="match_parent"
5
5
  xmlns:app="http://schemas.android.com/apk/res-auto">
6
6
 
7
- <com.airbnb.lottie.LottieAnimationView
8
- android:id="@+id/lav_splash_lottie"
9
- android:layout_width="match_parent"
10
- android:layout_height="match_parent"
11
- app:lottie_autoPlay="true"
12
- app:lottie_loop="false"
13
- android:scaleType="centerCrop"
14
- app:lottie_rawRes="@raw/launch_screen" />
7
+ <ImageView
8
+ android:id="@+id/iv_logo"
9
+ android:layout_width="wrap_content"
10
+ android:layout_height="wrap_content"
11
+ android:layout_centerInParent="true"
12
+ android:src="@drawable/ic_logo_bg"/>
15
13
 
16
14
  </RelativeLayout>
@@ -4,11 +4,11 @@ apply from: file("../node_modules/@react-native-community/cli-platform-android/n
4
4
  include ':app'
5
5
  includeBuild('../node_modules/@react-native/gradle-plugin')
6
6
 
7
- include ':xrn_react-native-code-push'
8
- project(':xrn_react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/@xrn/react-native-code-push/android/app')
7
+ include ':xrnjs_react-native-code-push'
8
+ project(':xrnjs_react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/@xrnjs/react-native-code-push/android/app')
9
9
 
10
- include(':xrn_multi-bundle')
11
- project(':xrn_multi-bundle').projectDir = new File(rootProject.projectDir, '../node_modules/@xrn/multi-bundle/android')
10
+ include(':xrnjs_multi-bundle')
11
+ project(':xrnjs_multi-bundle').projectDir = new File(rootProject.projectDir, '../node_modules/@xrnjs/multi-bundle/android')
12
12
 
13
13
  if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") {
14
14
  include(":ReactAndroid")
@@ -61,31 +61,35 @@
61
61
  },
62
62
  {
63
63
  name: 'xrn_loading',
64
- srcPath: '../node_modules/@xrn/loading/harmony/xrn_loading',
64
+ srcPath: '../node_modules/@xrnjs/loading/harmony/xrn_loading',
65
65
  },
66
66
  {
67
67
  name: 'xrn_native_storage',
68
- srcPath: '../node_modules/@xrn/native-storage/harmony/xrn_native_storage',
68
+ srcPath: '../node_modules/@xrnjs/native-storage/harmony/xrn_native_storage',
69
69
  },
70
70
  {
71
71
  name: 'xrn_multi_bundle',
72
- srcPath: '../node_modules/@xrn/multi-bundle/harmony/xrn_multi_bundle',
72
+ srcPath: '../node_modules/@xrnjs/multi-bundle/harmony/xrn_multi_bundle',
73
73
  },
74
74
  {
75
75
  name: 'xrn_bundle',
76
- srcPath: '../node_modules/@xrn/bundle/harmony/xrn_bundle',
76
+ srcPath: '../node_modules/@xrnjs/bundle/harmony/xrn_bundle',
77
77
  },
78
78
  {
79
79
  name: 'xrn_app_utils',
80
- srcPath: '../node_modules/@xrn/app-utils/harmony/xrn_app_utils',
80
+ srcPath: '../node_modules/@xrnjs/app-utils/harmony/xrn_app_utils',
81
81
  },
82
82
  {
83
83
  name: 'xrn_navigation',
84
- srcPath: '../node_modules/@xrn/navigation/harmony/xrn_navigation',
84
+ srcPath: '../node_modules/@xrnjs/navigation/harmony/xrn_navigation',
85
85
  },
86
86
  {
87
87
  name: 'xrn_debug_tools',
88
- srcPath: '../node_modules/@xrn/debug-tools/harmony/xrn_debug_tools',
88
+ srcPath: '../node_modules/@xrnjs/debug-tools/harmony/xrn_debug_tools',
89
+ },
90
+ {
91
+ name: 'codePush',
92
+ srcPath: '../node_modules/@xrnjs/react-native-code-push/harmony/codePush',
89
93
  }
90
94
  ],
91
95
  }
@@ -47,14 +47,14 @@
47
47
  "@wolfx/json5@^2.2.3-rc.1": "@wolfx/json5@2.2.3-rc.1",
48
48
  "libcommon.so@../oh_modules/.ohpm/@umeng+common@1.1.3/oh_modules/@umeng/common/src/main/cpp/types/libcommon": "libcommon.so@../oh_modules/.ohpm/@umeng+common@1.1.3/oh_modules/@umeng/common/src/main/cpp/types/libcommon",
49
49
  "mime@^3.0.0": "mime@3.0.0",
50
- "xrn-app-utils@../../node_modules/@xrn/app-utils/harmony/xrn_app_utils": "xrn-app-utils@../../node_modules/@xrn/app-utils/harmony/xrn_app_utils",
51
- "xrn-bundle@../../node_modules/@xrn/bundle/harmony/xrn_bundle": "xrn-bundle@../../node_modules/@xrn/bundle/harmony/xrn_bundle",
52
- "xrn-code-push@../../node_modules/@xrn/react-native-code-push/harmony/codePush": "xrn-code-push@../../node_modules/@xrn/react-native-code-push/harmony/codePush",
53
- "xrn-debug-tools@../../node_modules/@xrn/debug-tools/harmony/xrn_debug_tools": "xrn-debug-tools@../../node_modules/@xrn/debug-tools/harmony/xrn_debug_tools",
54
- "xrn-loading@../../node_modules/@xrn/loading/harmony/xrn_loading": "xrn-loading@../../node_modules/@xrn/loading/harmony/xrn_loading",
55
- "xrn-multi-bundle@../../node_modules/@xrn/multi-bundle/harmony/xrn_multi_bundle": "xrn-multi-bundle@../../node_modules/@xrn/multi-bundle/harmony/xrn_multi_bundle",
56
- "xrn-native-storage@../../node_modules/@xrn/native-storage/harmony/xrn_native_storage": "xrn-native-storage@../../node_modules/@xrn/native-storage/harmony/xrn_native_storage",
57
- "xrn-navigation@../../node_modules/@xrn/navigation/harmony/xrn_navigation": "xrn-navigation@../../node_modules/@xrn/navigation/harmony/xrn_navigation"
50
+ "xrn-app-utils@../../node_modules/@xrnjs/app-utils/harmony/xrn_app_utils": "xrn-app-utils@../../node_modules/@xrnjs/app-utils/harmony/xrn_app_utils",
51
+ "xrn-bundle@../../node_modules/@xrnjs/bundle/harmony/xrn_bundle": "xrn-bundle@../../node_modules/@xrnjs/bundle/harmony/xrn_bundle",
52
+ "xrn-code-push@../../node_modules/@xrnjs/react-native-code-push/harmony/codePush": "xrn-code-push@../../node_modules/@xrnjs/react-native-code-push/harmony/codePush",
53
+ "xrn-debug-tools@../../node_modules/@xrnjs/debug-tools/harmony/xrn_debug_tools": "xrn-debug-tools@../../node_modules/@xrnjs/debug-tools/harmony/xrn_debug_tools",
54
+ "xrn-loading@../../node_modules/@xrnjs/loading/harmony/xrn_loading": "xrn-loading@../../node_modules/@xrnjs/loading/harmony/xrn_loading",
55
+ "xrn-multi-bundle@../../node_modules/@xrnjs/multi-bundle/harmony/xrn_multi_bundle": "xrn-multi-bundle@../../node_modules/@xrnjs/multi-bundle/harmony/xrn_multi_bundle",
56
+ "xrn-native-storage@../../node_modules/@xrnjs/native-storage/harmony/xrn_native_storage": "xrn-native-storage@../../node_modules/@xrnjs/native-storage/harmony/xrn_native_storage",
57
+ "xrn-navigation@../../node_modules/@xrnjs/navigation/harmony/xrn_navigation": "xrn-navigation@../../node_modules/@xrnjs/navigation/harmony/xrn_navigation"
58
58
  },
59
59
  "packages": {
60
60
  "@jxt/xt_hud@3.3.0": {
@@ -398,52 +398,52 @@
398
398
  "shasum": "b374550dca3a0c18443b0c950a6a58f1931cf7a7",
399
399
  "registryType": "ohpm"
400
400
  },
401
- "xrn-app-utils@../../node_modules/@xrn/app-utils/harmony/xrn_app_utils": {
401
+ "xrn-app-utils@../../node_modules/@xrnjs/app-utils/harmony/xrn_app_utils": {
402
402
  "name": "xrn-app-utils",
403
403
  "version": "1.0.0",
404
- "resolved": "../../node_modules/@xrn/app-utils/harmony/xrn_app_utils",
404
+ "resolved": "../../node_modules/@xrnjs/app-utils/harmony/xrn_app_utils",
405
405
  "registryType": "local",
406
406
  "dependencies": {
407
407
  "@rnoh/react-native-openharmony": "../../node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har",
408
408
  "@pura/harmony-utils": "1.2.6"
409
409
  }
410
410
  },
411
- "xrn-bundle@../../node_modules/@xrn/bundle/harmony/xrn_bundle": {
411
+ "xrn-bundle@../../node_modules/@xrnjs/bundle/harmony/xrn_bundle": {
412
412
  "name": "xrn-bundle",
413
413
  "version": "1.0.0",
414
- "resolved": "../../node_modules/@xrn/bundle/harmony/xrn_bundle",
414
+ "resolved": "../../node_modules/@xrnjs/bundle/harmony/xrn_bundle",
415
415
  "registryType": "local",
416
416
  "dependencies": {
417
417
  "@rnoh/react-native-openharmony": "../../node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har",
418
- "xrn-multi-bundle": "../../../../packages/@xrn/multi-bundle/harmony/xrn_multi_bundle",
419
- "xrn-code-push": "../../../../node_modules/@xrn/react-native-code-push/harmony/codePush"
418
+ "xrn-multi-bundle": "../../../../packages/@xrnjs/multi-bundle/harmony/xrn_multi_bundle",
419
+ "xrn-code-push": "../../../../node_modules/@xrnjs/react-native-code-push/harmony/codePush"
420
420
  }
421
421
  },
422
- "xrn-code-push@../../node_modules/@xrn/react-native-code-push/harmony/codePush": {
422
+ "xrn-code-push@../../node_modules/@xrnjs/react-native-code-push/harmony/codePush": {
423
423
  "name": "xrn-code-push",
424
424
  "version": "8.2.2-0.0.10",
425
- "resolved": "../../node_modules/@xrn/react-native-code-push/harmony/codePush",
425
+ "resolved": "../../node_modules/@xrnjs/react-native-code-push/harmony/codePush",
426
426
  "registryType": "local",
427
427
  "dependencies": {
428
428
  "@rnoh/react-native-openharmony": "file:../react_native_openharmony",
429
429
  "xrn-multi-bundle": "file:../xrn_multi_bundle"
430
430
  }
431
431
  },
432
- "xrn-debug-tools@../../node_modules/@xrn/debug-tools/harmony/xrn_debug_tools": {
432
+ "xrn-debug-tools@../../node_modules/@xrnjs/debug-tools/harmony/xrn_debug_tools": {
433
433
  "name": "xrn-debug-tools",
434
434
  "version": "1.0.0",
435
- "resolved": "../../node_modules/@xrn/debug-tools/harmony/xrn_debug_tools",
435
+ "resolved": "../../node_modules/@xrnjs/debug-tools/harmony/xrn_debug_tools",
436
436
  "registryType": "local",
437
437
  "dependencies": {
438
438
  "@rnoh/react-native-openharmony": "../../node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har",
439
- "xrn-multi-bundle": "../../node_modules/@xrn/multi-bundle/harmony/xrn_multi_bundle",
440
- "xrn-navigation": "../../node_modules/@xrn/navigation/harmony/xrn_navigation"
439
+ "xrn-multi-bundle": "../../node_modules/@xrnjs/multi-bundle/harmony/xrn_multi_bundle",
440
+ "xrn-navigation": "../../node_modules/@xrnjs/navigation/harmony/xrn_navigation"
441
441
  }
442
442
  },
443
- "xrn-loading@../../node_modules/@xrn/loading/harmony/xrn_loading": {
443
+ "xrn-loading@../../node_modules/@xrnjs/loading/harmony/xrn_loading": {
444
444
  "name": "xrn-loading",
445
445
  "version": "1.0.0",
446
- "resolved": "../../node_modules/@xrn/loading/harmony/xrn_loading",
446
+ "resolved": "../../node_modules/@xrnjs/loading/harmony/xrn_loading",
447
447
  "registryType": "local",
448
448
  "dependencies": {
449
449
  "@rnoh/react-native-openharmony": "../../node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har",
@@ -451,10 +451,10 @@
451
451
  "@jxt/xt_hud": "3.3.0"
452
452
  }
453
453
  },
454
- "xrn-multi-bundle@../../node_modules/@xrn/multi-bundle/harmony/xrn_multi_bundle": {
454
+ "xrn-multi-bundle@../../node_modules/@xrnjs/multi-bundle/harmony/xrn_multi_bundle": {
455
455
  "name": "xrn-multi-bundle",
456
456
  "version": "1.0.0",
457
- "resolved": "../../node_modules/@xrn/multi-bundle/harmony/xrn_multi_bundle",
457
+ "resolved": "../../node_modules/@xrnjs/multi-bundle/harmony/xrn_multi_bundle",
458
458
  "registryType": "local",
459
459
  "dependencies": {
460
460
  "@rnoh/react-native-openharmony": "../../node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har",
@@ -462,19 +462,19 @@
462
462
  "@pura/harmony-utils": "1.2.6"
463
463
  }
464
464
  },
465
- "xrn-native-storage@../../node_modules/@xrn/native-storage/harmony/xrn_native_storage": {
465
+ "xrn-native-storage@../../node_modules/@xrnjs/native-storage/harmony/xrn_native_storage": {
466
466
  "name": "xrn-native-storage",
467
467
  "version": "1.0.0",
468
- "resolved": "../../node_modules/@xrn/native-storage/harmony/xrn_native_storage",
468
+ "resolved": "../../node_modules/@xrnjs/native-storage/harmony/xrn_native_storage",
469
469
  "registryType": "local",
470
470
  "dependencies": {
471
471
  "@rnoh/react-native-openharmony": "../../node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har"
472
472
  }
473
473
  },
474
- "xrn-navigation@../../node_modules/@xrn/navigation/harmony/xrn_navigation": {
474
+ "xrn-navigation@../../node_modules/@xrnjs/navigation/harmony/xrn_navigation": {
475
475
  "name": "xrn-navigation",
476
476
  "version": "1.0.0",
477
- "resolved": "../../node_modules/@xrn/navigation/harmony/xrn_navigation",
477
+ "resolved": "../../node_modules/@xrnjs/navigation/harmony/xrn_navigation",
478
478
  "registryType": "local",
479
479
  "dependencies": {
480
480
  "@rnoh/react-native-openharmony": "../../node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har",
@@ -16,7 +16,6 @@
16
16
  '@react-native-oh-tpl/clipboard': '../../node_modules/@react-native-oh-tpl/clipboard/harmony/clipboard.har',
17
17
  '@react-native-oh-tpl/netinfo': '../../node_modules/@react-native-oh-tpl/netinfo/harmony/netinfo.har',
18
18
  '@react-native-oh-tpl/cookies': '../../node_modules/@react-native-oh-tpl/cookies/harmony/rn_cookies.har',
19
- // '@react-native-oh-tpl/picker': '../../node_modules/@react-native-oh-tpl/picker/harmony/picker.har',
20
19
  '@react-native-oh-tpl/lottie-react-native': '../../node_modules/@react-native-oh-tpl/lottie-react-native/harmony/lottie.har',
21
20
  '@react-native-oh-tpl/react-native-config': '../../node_modules/@react-native-oh-tpl/react-native-config/harmony/config',
22
21
  '@react-native-oh-tpl/react-native-device-info': 'file:../../node_modules/@react-native-oh-tpl/react-native-device-info/harmony/device_info',
@@ -36,20 +35,17 @@
36
35
  '@react-native-oh-tpl/camera-roll': '../../node_modules/@react-native-oh-tpl/camera-roll/harmony/camera_roll.har',
37
36
  '@react-native-oh-tpl/react-native-pdf': '../../node_modules/@react-native-oh-tpl/react-native-pdf/harmony/pdfview.har',
38
37
  '@react-native-oh-tpl/react-native-webview': '../../node_modules/@react-native-oh-tpl/react-native-webview/harmony/rn_webview.har',
39
- // '@react-native-oh-tpl/react-native-background-timer': '../../node_modules/@react-native-oh-tpl/react-native-background-timer/harmony/background_timer.har',
40
38
  '@react-native-oh-tpl/react-native-document-picker': '../../node_modules/@react-native-oh-tpl/react-native-document-picker/harmony/document_picker.har',
41
39
  '@react-native-oh-tpl/react-native-image-resizer': '../../node_modules/@react-native-oh-tpl/react-native-image-resizer/harmony/image_resizer.har',
42
40
  '@ohos/lottie': '^2.0.15',
43
- //以下是源码依赖Demo
44
- // 'xrn-loading': '../../../../packages/@xrn/loading/harmony/xrn_loading',
45
- 'xrn-loading': '../../node_modules/@xrn/loading/harmony/xrn_loading',
46
- 'xrn-native-storage': '../../node_modules/@xrn/native-storage/harmony/xrn_native_storage',
47
- 'xrn-navigation': '../../node_modules/@xrn/navigation/harmony/xrn_navigation',
48
- 'xrn-code-push': '../../node_modules/@xrn/react-native-code-push/harmony/codePush',
49
- 'xrn-multi-bundle': '../../node_modules/@xrn/multi-bundle/harmony/xrn_multi_bundle',
50
- 'xrn-bundle': '../../node_modules/@xrn/bundle/harmony/xrn_bundle',
51
- 'xrn-app-utils': '../../node_modules/@xrn/app-utils/harmony/xrn_app_utils',
52
- 'xrn-debug-tools': '../../node_modules/@xrn/debug-tools/harmony/xrn_debug_tools',
41
+ 'xrn-loading': '../../node_modules/@xrnjs/loading/harmony/xrn_loading',
42
+ 'xrn-native-storage': '../../node_modules/@xrnjs/native-storage/harmony/xrn_native_storage',
43
+ 'xrn-navigation': '../../node_modules/@xrnjs/navigation/harmony/xrn_navigation',
44
+ 'xrn-code-push': '../../node_modules/@xrnjs/react-native-code-push/harmony/codePush',
45
+ 'xrn-multi-bundle': '../../node_modules/@xrnjs/multi-bundle/harmony/xrn_multi_bundle',
46
+ 'xrn-bundle': '../../node_modules/@xrnjs/bundle/harmony/xrn_bundle',
47
+ 'xrn-app-utils': '../../node_modules/@xrnjs/app-utils/harmony/xrn_app_utils',
48
+ 'xrn-debug-tools': '../../node_modules/@xrnjs/debug-tools/harmony/xrn_debug_tools',
53
49
  '@umeng/common': '^1.1.3',
54
50
  '@umeng/analytics': '^1.2.4',
55
51
  '@umeng/apm': '^1.1.1',
@@ -131,6 +131,33 @@ RNDeviceInfo::RNDeviceInfo(const ArkTSTurboModule::Context ctx, const std::strin
131
131
  ARK_METHOD_METADATA(supportedAbisSync, 0),
132
132
  ARK_ASYNC_METHOD_METADATA(getSupportedMediaTypeList, 0),
133
133
  ARK_METHOD_METADATA(getSupportedMediaTypeListSync, 0),
134
+ ARK_METHOD_METADATA(isPinOrFingerprintSetSync, 0),
135
+ ARK_METHOD_METADATA(getMacAddressSync, 0),
136
+ ARK_METHOD_METADATA(getUsedMemorySync, 0),
137
+ ARK_ASYNC_METHOD_METADATA(isEmulator, 0),
138
+ ARK_METHOD_METADATA(isEmulatorSync, 0),
139
+ ARK_ASYNC_METHOD_METADATA(hasSystemFeature, 1),
140
+ ARK_METHOD_METADATA(hasSystemFeatureSync, 1),
141
+ ARK_ASYNC_METHOD_METADATA(getSystemAvailableFeatures, 0),
142
+ ARK_METHOD_METADATA(getSystemAvailableFeaturesSync, 0),
143
+ ARK_ASYNC_METHOD_METADATA(getInstallReferrer, 0),
144
+ ARK_METHOD_METADATA(getInstallReferrerSync, 0),
145
+ ARK_ASYNC_METHOD_METADATA(getTags, 0),
146
+ ARK_METHOD_METADATA(getTagsSync, 0),
147
+ ARK_ASYNC_METHOD_METADATA(getSystemManufacturer, 0),
148
+ ARK_METHOD_METADATA(getSystemManufacturerSync, 0),
149
+ ARK_ASYNC_METHOD_METADATA(getAndroidId, 0),
150
+ ARK_METHOD_METADATA(getAndroidIdSync, 0),
151
+ ARK_ASYNC_METHOD_METADATA(getMaxMemory, 0),
152
+ ARK_METHOD_METADATA(getMaxMemorySync, 0),
153
+ ARK_ASYNC_METHOD_METADATA(getPreviewSdkInt, 0),
154
+ ARK_METHOD_METADATA(getPreviewSdkIntSync, 0),
155
+ ARK_ASYNC_METHOD_METADATA(getSupportedAbis, 0),
156
+ ARK_METHOD_METADATA(getSupportedAbisSync, 0),
157
+ ARK_ASYNC_METHOD_METADATA(getSupported32BitAbis, 0),
158
+ ARK_METHOD_METADATA(getSupported32BitAbisSync, 0),
159
+ ARK_ASYNC_METHOD_METADATA(getSupported64BitAbis, 0),
160
+ ARK_METHOD_METADATA(getSupported64BitAbisSync, 0),
134
161
  };
135
162
  }
136
163
 
@@ -1,15 +1,8 @@
1
- import lottie, { AnimationItem } from "@ohos/lottie"
2
1
  import { NavPath, replaceToMain } from "xrn-navigation"
3
2
 
4
3
  @Component
5
4
  export struct Splash {
6
5
  @Consume('navigation') navigation: NavPathStack
7
- private renderingSettings: RenderingContextSettings = new RenderingContextSettings(true)
8
- private canvasRenderingContext: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.renderingSettings)
9
- private animateItem: AnimationItem | null = null;
10
- private animateName: string = "animation"; // name
11
- @State
12
- private showLottie: boolean = false
13
6
 
14
7
  aboutToAppear(): void {
15
8
  // 特殊场景处理
@@ -17,57 +10,23 @@ export struct Splash {
17
10
  this.navigation.popToName(NavPath.Main)
18
11
  return
19
12
  }
20
- this.showLottie = true
21
- }
22
-
23
- loadAnimation() {
24
- this.animateItem = lottie.loadAnimation({
25
- container: this.canvasRenderingContext,
26
- renderer: 'canvas', // canvas renderer
27
- loop: false,
28
- autoplay: false,
29
- name: this.animateName,
30
- contentMode: 'Contain',
31
- path: "lottie/launch_screen.json",
32
- })
33
- this.animateItem?.addEventListener('DOMLoaded', (args: Object): void => {
34
- this.animateItem?.play()
35
- });
36
- this.animateItem?.addEventListener('complete', (args: object): void => {
37
- replaceToMain()
38
- })
39
13
  }
40
14
 
41
15
  aboutToDisappear(): void {
42
16
  console.debug(`Splash.aboutToDisappear`)
43
- this.animateItem?.removeEventListener("DOMLoaded");
44
- this.animateItem?.removeEventListener("complete")
45
- lottie.destroy(this.animateName);
46
- this.animateItem = null;
47
17
  }
48
18
 
49
19
  build() {
50
20
  NavDestination() {
51
- Column() {
52
- if (this.showLottie) {
53
- // Configure a canvas.
54
- Canvas(this.canvasRenderingContext)
55
- .width('100%')
56
- .height('100%')
57
- .backgroundColor(Color.Gray)
58
- .onReady(() => {
59
- // Load the animation.
60
- if (this.animateItem != null) {
61
- // Load animations during canvas onReady, ensure that the animation size is correct.
62
- this.animateItem?.resize();
63
- } else {
64
- // Anti-aliasing settings.
65
- this.canvasRenderingContext.imageSmoothingEnabled = true;
66
- this.canvasRenderingContext.imageSmoothingQuality = 'medium'
67
- this.loadAnimation();
68
- }
69
- })
70
- }
21
+ RelativeContainer() {
22
+ Image($r('app.media.ic_logo_bg')).onAppear(() => {
23
+ setTimeout(() => {
24
+ replaceToMain()
25
+ }, 500)
26
+ })
27
+ .width(194)
28
+ .height(122)
29
+ .alignRules({middle: {anchor: '__container__', align: HorizontalAlign.Center}, center: {anchor: '__container__', align: VerticalAlign.Center}})
71
30
  }
72
31
  .width('100%')
73
32
  .height('100%')
@@ -10,8 +10,8 @@
10
10
  "overrides": {
11
11
  // "@rnoh/react-native-openharmony": "0.72.38",
12
12
  "@rnoh/react-native-openharmony": "../node_modules/@react-native-oh/react-native-harmony/react_native_openharmony.har",
13
- "xrn-multi-bundle": "../node_modules/@xrn/multi-bundle/harmony/xrn_multi_bundle",
14
- "xrn-navigation": "../node_modules/@xrn/navigation/harmony/xrn_navigation",
15
- "xrn-code-push": "../node_modules/@xrn/react-native-code-push/harmony/codePush"
13
+ "xrn-multi-bundle": "../node_modules/@xrnjs/multi-bundle/harmony/xrn_multi_bundle",
14
+ "xrn-navigation": "../node_modules/@xrnjs/navigation/harmony/xrn_navigation",
15
+ "xrn-code-push": "../node_modules/@xrnjs/react-native-code-push/harmony/codePush"
16
16
  }
17
17
  }
@@ -88,14 +88,13 @@
88
88
  if (localBundleDebug) {
89
89
  self.isDebug = [localBundleDebug boolValue];
90
90
  }
91
- self.isDebug = YES;
91
+
92
92
  if (self.isDebug) {
93
93
  BOOL supportCommon = [bridge.delegate supportCommonBundle];
94
94
  NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
95
95
  NSString *appVersion = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
96
96
  NSString *appVersionParam = supportCommon ? [NSString stringWithFormat:@"&appVersion=%@", appVersion] : @"";
97
97
  NSString *host = [[XTPluginManage shareInstance] getLocalHost];
98
- host = @"192.168.68.131";
99
98
  NSURL *bundleUrl = [NSURL URLWithString:[NSString stringWithFormat:@"http://%@:%@/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=XRNTemplate%@", host, bundleData.portNum, appVersionParam]];
100
99
  bizBundleURL = bundleUrl;
101
100
  self.bizBundleURL = bizBundleURL;
package/ios/Podfile CHANGED
@@ -101,10 +101,10 @@ target 'XRNTemplate' do
101
101
  pod 'swiftScan', '1.2.1', :configurations => ['Debug']
102
102
 
103
103
  # 二方包
104
- pod 'CodePush', :path => '../node_modules/@xrn/react-native-code-push'
105
- pod 'react-native-xrn-app-utils', :path => '../node_modules/@xrn/app-utils'
106
- pod 'react-native-xrn-multi-bundle', :path => '../node_modules/@xrn/multi-bundle', :modular_headers => true
107
- pod 'react-native-xrn-navigation', :path => '../node_modules/@xrn/navigation', :modular_headers => true
104
+ pod 'CodePush', :path => '../node_modules/@xrnjs/react-native-code-push'
105
+ pod 'react-native-xrn-app-utils', :path => '../node_modules/@xrnjs/app-utils'
106
+ pod 'react-native-xrn-multi-bundle', :path => '../node_modules/@xrnjs/multi-bundle', :modular_headers => true
107
+ pod 'react-native-xrn-navigation', :path => '../node_modules/@xrnjs/navigation', :modular_headers => true
108
108
 
109
109
  setup_permissions([
110
110
  'AppTrackingTransparency',