From 04a3864f5501759eb6d552687b78d630c3e72b52 Mon Sep 17 00:00:00 2001 From: wangqiuyun1126 <727176064@qq.com> Date: Wed, 10 Dec 2025 16:37:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?docs:=20[Issues:=20#ID7VS4]=20=E4=B8=89?= =?UTF-8?q?=E6=96=B9=E5=BA=93=E9=80=82=E9=85=8Dcli=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E9=9C=80=E6=B1=824=E4=B8=AA=E4=B8=89=E6=96=B9=E5=BA=93?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangqiuyun1126 <727176064@qq.com> --- en/op-engineering-op-sqlite.md | 42 ++++--- en/react-native-file-selector.md | 115 +++++++++++++----- ...eact-native-oh-tpl-react-native-screens.md | 8 +- en/react-native-video.md | 84 +++---------- zh-cn/op-engineering-op-sqlite.md | 67 +++------- zh-cn/react-native-file-selector.md | 45 +++---- ...eact-native-oh-tpl-react-native-screens.md | 8 +- zh-cn/react-native-video.md | 85 +++---------- 8 files changed, 189 insertions(+), 265 deletions(-) diff --git a/en/op-engineering-op-sqlite.md b/en/op-engineering-op-sqlite.md index 9d66c9e1..dcb9faee 100644 --- a/en/op-engineering-op-sqlite.md +++ b/en/op-engineering-op-sqlite.md @@ -21,8 +21,15 @@ Template version: v0.2.2 ## Installation and Usage +Please refer to the Releases page of the third-party library for the corresponding version information -Find the matching version information in the release address of a third-party library and download an applicable .tgz package:[@react-native-oh-tpl/op-sqlite Releases](https://github.com/react-native-oh-library/op-sqlite/releases) +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| <= 8.0.2-0.0.3@deprecated | [@react-native-oh-tpl/op-sqlite Releases(deprecated)](https://github.com/react-native-oh-library/op-sqlite/releases) | 0.72 | +| 8.0.3 | [@react-native-ohos/op-sqlite Releases](https://gitcode.com/openharmony-sig/rntpc_op-sqlite/releases) | 0.72 | +| 14.0.1 | [@react-native-ohos/op-sqlite Releases](https://gitcode.com/openharmony-sig/rntpc_op-sqlite/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/en/tgz-usage-en.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -33,13 +40,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/op-sqlite +npm install @react-native-ohos/op-sqlite ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/op-sqlite +yarn add @react-native-ohos/op-sqlite ``` @@ -63,7 +70,7 @@ import { open, type DB } from '@op-engineering/op-sqlite'; -import { HARMONY_DATABASE_PATH } from '@react-native-oh-tpl/op-sqlite'; +import { HARMONY_DATABASE_PATH } from '@react-native-ohos/op-sqlite'; export default function OpSqliteExample() { @@ -98,7 +105,10 @@ For details, see [Source Repository Document Address](https://ospfranco.notion.s ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/op-sqlite@8.0.3 now supports Autolink without requiring manual configuration(The content that still needs to be manually configured has been marked in the corresponding title), currently only supports 72 frameworks. +Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +This step provides guidance for manually configuring native dependencies. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -125,7 +135,7 @@ Open `entry/oh-package.json5` file and add the following dependencies: "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/op-sqlite": "file:../../node_modules/@react-native-oh-tpl/op-sqlite/harmony/rn_op_sqlite.har" + "@react-native-ohos/op-sqlite": "file:../../node_modules/@react-native-ohos/op-sqlite/harmony/rn_op_sqlite.har" } ``` @@ -144,6 +154,8 @@ Method 2: Directly link to the source code. ### 3. Configuring CMakeLists and Introducing RNOpSqlitePackage +> If you are using version <= 8.0.2-0.0.3, please skip this chapter. + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -164,7 +176,7 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) -+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/op-sqlite/src/main/cpp" ./rn_op_sqlite) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/op-sqlite/src/main/cpp" ./rn_op_sqlite) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -204,7 +216,7 @@ std::vector> PackageProvider::getPackages(Package::Cont Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff -+ import { RNOpSqlitePackage } from '@react-native-oh-tpl/op-sqlite/ts'; ++ import { RNOpSqlitePackage } from '@react-native-ohos/op-sqlite/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -213,7 +225,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` -### 5. Create a `package.json` file in the root directory of your IDE project and configure the parameters. +### 5. Create a `package.json` file in the root directory of your IDE project and configure the parameters.(This module always requires manual configuration) ```json { @@ -226,14 +238,14 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 5. Introducing opSqlitePlugin to ArkTS +### 6. Introducing opSqlitePlugin to ArkTS(This module always requires manual configuration) Open the `entry/hvigorfile.ts` file and add the following code: ```diff + import { hapTasks, OhosHapContext, OhosPluginId, Target } from '@ohos/hvigor-ohos-plugin'; + import { HvigorPlugin, HvigorNode, getNode } from '@ohos/hvigor'; -+ import { opSqlitePlugin } from './oh_modules/@react-native-oh-tpl/op-sqlite/hvigorfile.ts'; ++ import { opSqlitePlugin } from './oh_modules/@react-native-ohos/op-sqlite/hvigorfile.ts'; +const path = require('path'); +const rootRNPackagePath = path.join(__dirname, '../package.json'); //The configuration is based on the actual package path @@ -244,7 +256,7 @@ export default { } ``` -### 6. Running +### 7. Running Click the `sync` button in the upper right corner. @@ -262,11 +274,13 @@ Then build and run the code. ### Compatibility - To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. +Verified in the following versions. -Check the release version information in the release address of the third-party library:[@react-native-oh-tpl/op-sqlite Releases](https://github.com/react-native-oh-library/op-sqlite/releases) +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ### Permission Requirements diff --git a/en/react-native-file-selector.md b/en/react-native-file-selector.md index ce0806f4..a51418a3 100644 --- a/en/react-native-file-selector.md +++ b/en/react-native-file-selector.md @@ -14,14 +14,15 @@ > [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-file-selector) -The repository for this third-party library has been migrated to Gitcode, and it now supports direct download from npm. The new package name is: `@react-native-ohos/react-native-file-selector`. The specific version relationships are as follows: +## Installation and Usage -| Version | Package Name | Repository | Release |Supported RN Version | -| ------------------------------ | ---------------- | ------------------- | ------------------- | -------------------- | -| 1.0.2 | @react-native-oh-tpl/react-native-file-selector | [Github](https://github.com/react-native-oh-library/react-native-file-selector) | [Github Releases](https://github.com/react-native-oh-library/react-native-file-selector/releases) | 0.72 | -|1.1.0 | @react-native-ohos/react-native-file-selector | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-file-selector) | [GitCode Releases]() | 0.77 | +Please refer to the Releases page of the third-party library for the corresponding version information -## Installation and Usage +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +|<= 1.0.2-0.0.3@deprecated | [@react-native-oh-tpl/react-native-file-selector Releases(deprecated)](https://github.com/react-native-oh-library/react-native-file-selector/releases) | 0.72 | +| 1.0.3 | [@react-native-ohos/react-native-file-selector Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-file-selector/releases) | 0.72 | +| 1.1.0 | [@react-native-ohos/react-native-file-selector Releases](hhttps://gitcode.com/openharmony-sig/rntpc_react-native-file-selector/releases) | 0.77 | For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. @@ -30,18 +31,12 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -# 1.0.2 -npm install @react-native-oh-tpl/react-native-file-selector -# 1.1.0 npm install @react-native-ohos/react-native-file-selector ``` #### **yarn** ```bash -# 1.0.2 -yarn add @react-native-oh-tpl/react-native-file-selector -# 1.1.0 yarn add @react-native-ohos/react-native-file-selector ``` @@ -66,13 +61,18 @@ export default App; ## Use Codegen -If this repository has been adapted to Codegen, generate the bridge code of the third-party library by using the Codegen. For details, see[ Codegen Usage Guide](/en/codegen.md). +Version >= @react-native-ohos/react-native-file-selector@1.0.3, compatible with codegen-lib for generating bridge code. + +If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/en/codegen.md). ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-file-selector@1.0.3 now supports Autolink without requiring manual configuration, currently only supports 72 frameworks. +Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -Open the harmony directory of the HarmonyOS project in DevEco Studio. +This step provides guidance for manually configuring native dependencies. + +Open the `harmony` directory of the HarmonyOS project in DevEco Studio. ### 1.Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project @@ -98,15 +98,6 @@ Method 1 (recommended): Use the HAR file. Open entry/oh-package.json5 file and add the following dependencies: -- V1.0.2 -```json -"dependencies": { - "@rnoh/react-native-openharmony" : "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-file-selector": "file:../../node_modules/@react-native-oh-tpl/react-native-file-selector/harmony/file_selector.har" - } -``` - -- V1.1.0 ```json "dependencies": { "@rnoh/react-native-openharmony" : "file:../react_native_openharmony", @@ -134,9 +125,6 @@ Open the entry/src/main/ets/RNPackagesFactory.ts file and add the following code ```diff ... import type {RNPackageContext, RNPackage} from '@rnoh/react-native-openharmony/ts'; -// V1.0.2 -+import {RNFileSelectorPackage} from '@react-native-oh-tpl/react-native-file-selector/ts'; -// V1.1.0 +import {RNFileSelectorPackage} from '@react-native-ohos/react-native-file-selector/ts'; @@ -147,7 +135,70 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.Running +### 4.Configuring CMakeLists and Introducing FileSelectorPackage + +> If you are using version <= 1.0.2-0.0.3, please skip this chapter. + +Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: + +```diff +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") ++ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") +set(LOG_VERBOSITY_LEVEL 1) +set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") +set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") +set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use +add_compile_definitions(WITH_HITRACE_SYSTRACE) + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) + +# RNOH_BEGIN: manual_package_linking_1 +add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-file-selector/src/main/cpp" ./file-selector) + + +# RNOH_END: manual_package_linking_1 + +file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") + +add_library(rnoh_app SHARED + ${GENERATED_CPP_FILES} + "./PackageProvider.cpp" + "${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp" +) +target_link_libraries(rnoh_app PUBLIC rnoh) + +# RNOH_BEGIN: manual_package_linking_2 +target_link_libraries(rnoh_app PUBLIC rnoh_sample_package) ++ target_link_libraries(rnoh_app PUBLIC rnoh_file_selector) +# RNOH_END: manual_package_linking_2 +``` + +Open `entry/src/main/cpp/PackageProvider.cpp` and add the following code: + +```diff +#include "RNOH/PackageProvider.h" +#include "generated/RNOHGeneratedPackage.h" +#include "SamplePackage.h" ++ #include "FileSelectorPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { + std::make_shared(ctx), + std::make_shared(ctx), ++ std::make_shared(ctx), + }; +} +``` + +### 5.Running Click the sync button in the upper right corner. @@ -166,9 +217,11 @@ Then build and run the code. To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -This document is verified based on the following versions: -1. RNOH:0.72.96; SDK:HarmonyOS 5.1.1 Release SDK; IDE:DevEco Studio 5.1.1.840; ROM:6.0.0; -2. RNOH:0.77.18; SDK:HarmonyOS 5.1.1 Release SDK; IDE:DevEco Studio 5.1.1.840; ROM:6.0.0; +Verified in the following versions. + +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## Properties diff --git a/en/react-native-oh-tpl-react-native-screens.md b/en/react-native-oh-tpl-react-native-screens.md index c4c85219..e15d322b 100644 --- a/en/react-native-oh-tpl-react-native-screens.md +++ b/en/react-native-oh-tpl-react-native-screens.md @@ -58,12 +58,12 @@ npm install @react-navigation/native-stack@7.2.0 ```bash # 0.72 -yarn install @react-native-ohos/react-native-screens@3.34.1-X.X.X -yarn install @react-navigation/native-stack@6.9.13 +yarn add @react-native-ohos/react-native-screens@3.34.1-X.X.X +yarn add @react-navigation/native-stack@6.9.13 # 0.77 -yarn install @react-native-ohos/react-native-screens@4.8.1-X.X.X -yarn install @react-navigation/native-stack@7.2.0 +yarn add @react-native-ohos/react-native-screens@4.8.1-X.X.X +yarn add @react-navigation/native-stack@7.2.0 ``` The following code shows the basic use scenario of the repository: diff --git a/en/react-native-video.md b/en/react-native-video.md index 514c2286..58370c16 100644 --- a/en/react-native-video.md +++ b/en/react-native-video.md @@ -14,37 +14,31 @@ > [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-video) -Find the matching version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-video Releases](https://github.com/react-native-oh-library/react-native-video/releases). For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. +## Installation and Usage -| version | Package name |Releases info | Support RN version | -| ------- | ------- | ------------------------------------------------------------ | ------------------ | -| 5.2.1 | @react-native-oh-tpl/react-native-video | [@react-native-oh-tpl/react-native-video Releases](https://github.com/react-native-oh-library/react-native-video/releases) |0.72| -| 6.13.1 | @react-native-oh-tpl/react-native-video | [@react-native-oh-tpl/react-native-video Releases](https://github.com/react-native-oh-library/react-native-video/releases) |0.72| -| 6.14.0 | @react-native-ohos/react-native-video | [@react-native-ohos/react-native-video Releases]() |0.77| +Please refer to the Releases page of the third-party library for the corresponding version information -Go to the project directory and execute the following instruction: +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| <= 6.13.1@deprecated | [@react-native-oh-tpl/react-native-video Releases(deprecated)](https://github.com/react-native-oh-library/react-native-video/releases) | 0.72 | +| 6.13.2 | [@react-native-ohos/react-native-video Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-video/releases) | 0.72 | +| 6.14.0 | [@react-native-ohos/react-native-video Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-video/releases) | 0.77 | -## Installation and Usage +For older versions not published on npm, please refer to the [Installation Guide](/en/tgz-usage-en.md) to install the tgz package. + +Go to the project directory and execute the following instruction: #### **npm** ```bash -# 0.72 -npm install @react-native-oh-tpl/react-native-video - -# 0.77 npm install @react-native-ohos/react-native-video ``` #### **yarn** ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-video - -# 0.77 yarn add @react-native-ohos/react-native-video ``` @@ -59,7 +53,6 @@ import React, { useState, useRef } from "react"; import { Button, View, ScrollView, StyleSheet, Switch, Text, TextInput } from "react-native"; import RNCVideo from "react-native-video"; -// V6.13.1 import { type OnPlaybackStateChangedData, OnSeekData, @@ -85,10 +78,7 @@ function RNCVideoDemo() { const [onVideoProgress, setOnVideoProgress] = useState("onVideoProgress"); const [onVideoEnd, setOnVideoEnd] = useState("onVideoEnd"); const [onVideoBuffer, setOnVideoBuffer] = useState("onVideoBuffer"); - // V5.2.1 - const [onPlaybackStalled, setOnPlaybackStalled] = useState("onPlaybackStalled"); - // V6.13.1 const [onPlaybackStateChanged, setPlaybackStateChanged] = useState("onPlaybackStateChanged"); const [onPlaybackResume, setOnPlaybackResume] = useState("onPlaybackResume"); @@ -144,10 +134,6 @@ function RNCVideoDemo() { {onVideoEnd} {onVideoBuffer} - // V5.2.1 - {onPlaybackStalled} - - // V6.13.1 {onPlaybackStateChanged} {onPlaybackResume} @@ -379,7 +365,6 @@ function RNCVideoDemo() { ); }} - // V6.13.1 onSeek = {(data: OnSeekData) => { console.log('onSeek'); }} @@ -393,20 +378,7 @@ function RNCVideoDemo() { onBuffer={(e) => { setOnVideoBuffer("onVideoBuffer :" + e.isBuffering); }} - - // V5.2.1 - onPlaybackStalled={() => { - setOnPlaybackStalled("onPlaybackStalled : true"); - setOnPlaybackResume("onPlaybackResume :false"); - }} - - // V5.2.1 - onPlaybackResume={() => { - setOnPlaybackStalled("onPlaybackStalled :false"); - setOnPlaybackResume("onPlaybackResume :true"); - }} - // V6.13.1 onPlaybackStateChanged={(data: OnPlaybackStateChangedData) => { console.log('onPlaybackStateChanged ' + JSON.stringify(data)); setPlaybackStateChanged("onPlaybackStateChanged : " + JSON.stringify(data)); @@ -486,7 +458,10 @@ export default RNCVideoDemo; ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-video@6.13.2 now supports Autolink without requiring manual configuration, currently only supports 72 frameworks. +Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +This step provides guidance for manually configuring native dependencies. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -511,18 +486,6 @@ Method 1 (recommended): Use the HAR file. Open `entry/oh-package.json5` file and add the following dependencies: -- V0.72 - -```json -"dependencies": { - ... - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-video": "file:../../node_modules/@react-native-oh-tpl/react-native-video/harmony/rn_video.har" - } -``` - -- V0.77 - ```json "dependencies": { ... @@ -546,6 +509,8 @@ Method 2: Directly link to the source code. ### 3. Configuring CMakeLists and Introducing RNCVideoPackage +> If you are using version <= 6.13.1, please skip this chapter. + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -566,10 +531,6 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) -# V0.72 -+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-video/src/main/cpp" ./video) - -# V0.77 + add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-video/src/main/cpp" ./video) # RNOH_BEGIN: manual_package_linking_1 @@ -613,10 +574,6 @@ Find `function buildCustomRNComponent()`, which is usually located in `entry/src ```diff ... -// V0.72 -+ import { RNCVideo, RNC_VIDEO_TYPE } from "@react-native-oh-tpl/react-native-video" - -// V0.77 + import { RNCVideo, RNC_VIDEO_TYPE } from "@react-native-ohos/react-native-video" @Builder @@ -650,10 +607,6 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... -// V0.72 -+ import { RNCVideoPackage } from '@react-native-oh-tpl/react-native-video/ts'; - -// V0.77 + import { RNCVideoPackage } from '@react-native-ohos/react-native-video/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -685,8 +638,9 @@ To use this repository, you need to use the correct React-Native and RNOH versio Verified in the following versions. -1. RNOH: 0.72.27; SDK: HarmonyOS 5.1.1 Release SDK; IDE: DevEco Studio 5.1.1 Release; ROM: 5.0.1.120; -2. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## Properties diff --git a/zh-cn/op-engineering-op-sqlite.md b/zh-cn/op-engineering-op-sqlite.md index 47a33a3b..b3fe549f 100644 --- a/zh-cn/op-engineering-op-sqlite.md +++ b/zh-cn/op-engineering-op-sqlite.md @@ -23,10 +23,11 @@ 请到三方库的 Releases 发布地址查看配套的版本信息: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 8.0.2 | [@react-native-oh-tpl/op-sqlite Releases](https://gitee.com/link?target=https%3A%2F%2Fgithub.com%2Freact-native-oh-library%2Fop-sqlite%2Freleases) | 0.72 | -| 14.0.1 | [@react-native-ohos/op-sqlite Releases]() | 0.77 | +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| <= 8.0.2-0.0.3@deprecated | [@react-native-oh-tpl/op-sqlite Releases(deprecated)](https://github.com/react-native-oh-library/op-sqlite/releases) | 0.72 | +| 8.0.3 | [@react-native-ohos/op-sqlite Releases](https://gitcode.com/openharmony-sig/rntpc_op-sqlite/releases) | 0.72 | +| 14.0.1 | [@react-native-ohos/op-sqlite Releases](https://gitcode.com/openharmony-sig/rntpc_op-sqlite/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -37,20 +38,12 @@ #### **npm** ```bash -# V8.0.2 -npm install @react-native-oh-tpl/op-sqlite - -# V14.0.1 npm install @react-native-ohos/op-sqlite ``` #### **yarn** ```bash -# V8.0.2 -yarn add @react-native-oh-tpl/op-sqlite - -# V14.0.1 yarn add @react-native-ohos/op-sqlite ``` @@ -89,10 +82,6 @@ export default function OpSqliteExample() { const res = await db.execute('SELECT sqlite_version();'); - // V8.0.2 - const version = res.rows?._array[0]['sqlite_version()']; - - // V14.0.1 const version = res.rows[0]['sqlite_version()']; setSqliteVersion(version); @@ -125,7 +114,9 @@ export default function OpSqliteExample() { ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/op-sqlite@8.0.3,已支持 Autolink,无需手动配置(仍需手动配置的内容已在对应标题处标记),目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -153,18 +144,6 @@ export default function OpSqliteExample() { 打开 `entry/oh-package.json5`,添加以下依赖 -- V8.0.2 - -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - - "@react-native-oh-tpl/op-sqlite": "file:../../node_modules/@react-native-oh-tpl/op-sqlite/harmony/rn_op_sqlite.har" - } -``` - -- V14.0.1 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -188,6 +167,8 @@ ohpm install ### 3. 配置 CMakeLists 和引入 RNOpSqlitePackage +> 若使用的是 <= 8.0.2-0.0.3 版本,请跳过本章。 + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -208,11 +189,6 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) - -# V8.0.2 -+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/op-sqlite/src/main/cpp" ./rn_op_sqlite) - -# V14.0.1 + add_subdirectory("${OH_MODULES}/@react-native-ohos/op-sqlite/src/main/cpp" ./rn_op_sqlite) # RNOH_END: manual_package_linking_1 @@ -257,10 +233,6 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... -// V8.0.2 -+ import { RNOpSqlitePackage } from '@react-native-oh-tpl/op-sqlite/ts'; - -// V14.0.1 + import { RNOpSqlitePackage } from '@react-native-ohos/op-sqlite/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -270,7 +242,8 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` -### 5.在ide的工程根目录创建package.json文件,并配置参数 + +### 5.在ide的工程根目录创建package.json文件,并配置参数(该模块始终需要手动配置) ```diff { @@ -285,7 +258,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 6. 在 ArkTs 侧引入 opSqlitePlugin +### 6. 在 ArkTs 侧引入 opSqlitePlugin(该模块始终需要手动配置) 打开 `entry/hvigorfile.ts`,添加: @@ -293,10 +266,6 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { + import { hapTasks, OhosHapContext, OhosPluginId, Target } from '@ohos/hvigor-ohos-plugin'; + import { HvigorPlugin, HvigorNode, getNode } from '@ohos/hvigor'; -// V8.0.2 -+ import { opSqlitePlugin } from './oh_modules/@react-native-oh-tpl/op-sqlite/hvigorfile.ts'; - -// V14.0.1 + import { opSqlitePlugin } from './oh_modules/@react-native-ohos/op-sqlite/hvigorfile.ts'; +const path = require('path'); @@ -325,15 +294,13 @@ ohpm install ## 约束与限制 ### 兼容性 - 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +在以下版本验证通过: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 8.0.2 | [@react-native-oh-tpl/op-sqlite Releases](https://gitee.com/link?target=https%3A%2F%2Fgithub.com%2Freact-native-oh-library%2Fop-sqlite%2Freleases) | 0.72 | -| 14.0.1 | [@react-native-ohos/op-sqlite Releases]() | 0.77 | +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ### 应用权限申请 diff --git a/zh-cn/react-native-file-selector.md b/zh-cn/react-native-file-selector.md index a3923e84..332dde8b 100644 --- a/zh-cn/react-native-file-selector.md +++ b/zh-cn/react-native-file-selector.md @@ -15,14 +15,15 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-file-selector) -该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/react-native-file-selector`,具体版本所属关系如下: +## 安装与使用 -| Version | Package Name | Repository | Release |Supported RN Version | -| ------------------------------ | ---------------- | ------------------- | ------------------- | -------------------- | -| 1.0.2 | @react-native-oh-tpl/react-native-file-selector | [Github](https://github.com/react-native-oh-library/react-native-file-selector) | [Github Releases](https://github.com/react-native-oh-library/react-native-file-selector/releases) | 0.72 | -|1.1.0 | @react-native-ohos/react-native-file-selector | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-file-selector) | [GitCode Releases]() | 0.77 | +请到三方库的 Releases 发布地址查看配套的版本信息: -## 安装与使用 +| 三方库版本 | 发布信息 | 支持RN版本 | +|-------| ------------------------------------------------------------ | ---------- | +|<= 1.0.2-0.0.3@deprecated | [@react-native-oh-tpl/react-native-file-selector Releases(deprecated)](https://github.com/react-native-oh-library/react-native-file-selector/releases) | 0.72 | +| 1.0.3 | [@react-native-ohos/react-native-file-selector Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-file-selector/releases) | 0.72 | +| 1.1.0 | [@react-native-ohos/react-native-file-selector Releases](hhttps://gitcode.com/openharmony-sig/rntpc_react-native-file-selector/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -32,18 +33,12 @@ #### **npm** ```bash -# 1.0.2 -npm install @react-native-oh-tpl/react-native-file-selector -# 1.1.0 npm install @react-native-ohos/react-native-file-selector ``` #### **yarn** ```bash -# 1.0.2 -yarn add @react-native-oh-tpl/react-native-file-selector -# 1.1.0 yarn add @react-native-ohos/react-native-file-selector ``` @@ -68,13 +63,15 @@ export default App; ## 使用 Codegen -> [!TIP] V1.1.0 不需要执行 Codegen。 +Version >= @react-native-ohos/react-native-file-selector@1.0.3,已适配codegen-lib生成桥接代码。 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-file-selector@1.0.3,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -101,15 +98,7 @@ export default App; > [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。 打开 `entry/oh-package.json5`,添加以下依赖 -- V1.0.2 -```json -"dependencies": { - "@rnoh/react-native-openharmony" : "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-file-selector": "file:../../node_modules/@react-native-oh-tpl/react-native-file-selector/harmony/file_selector.har" - } -``` -- V1.1.0 ```json "dependencies": { "@rnoh/react-native-openharmony" : "file:../react_native_openharmony", @@ -138,9 +127,6 @@ ohpm install ```diff ... import type {RNPackageContext, RNPackage} from '@rnoh/react-native-openharmony/ts'; -// V1.0.2 -+import {RNFileSelectorPackage} from '@react-native-oh-tpl/react-native-file-selector/ts'; -// V1.1.0 +import {RNFileSelectorPackage} from '@react-native-ohos/react-native-file-selector/ts'; @@ -151,9 +137,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.配置 CMakeLists 和引入 SqliteStoragePackage +### 4.配置 CMakeLists 和引入 FileSelectorPackage -> [!TIP] V1.1.0 需要执行 +> 若使用的是 <= 1.0.2-0.0.3 版本,请跳过本章。 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: @@ -235,8 +221,9 @@ ohpm install 在以下版本验证通过: -1. RNOH:0.72.96; SDK:HarmonyOS 5.1.1 Release SDK; IDE:DevEco Studio 5.1.1.840; ROM:6.0.0; -2. RNOH:0.77.18; SDK:HarmonyOS 5.1.1 Release SDK; IDE:DevEco Studio 5.1.1.840; ROM:6.0.0; +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## 属性 diff --git a/zh-cn/react-native-oh-tpl-react-native-screens.md b/zh-cn/react-native-oh-tpl-react-native-screens.md index 5d4ae83e..1df14f3a 100644 --- a/zh-cn/react-native-oh-tpl-react-native-screens.md +++ b/zh-cn/react-native-oh-tpl-react-native-screens.md @@ -58,12 +58,12 @@ npm install @react-navigation/native-stack@7.2.0 ```bash # 0.72 -yarn install @react-native-ohos/react-native-screens@3.34.1-X.X.X -yarn install @react-navigation/native-stack@6.9.13 +yarn add @react-native-ohos/react-native-screens@3.34.1-X.X.X +yarn add @react-navigation/native-stack@6.9.13 # 0.77 -yarn install @react-native-ohos/react-native-screens@4.8.1-X.X.X -yarn install @react-navigation/native-stack@7.2.0 +yarn add @react-native-ohos/react-native-screens@4.8.1-X.X.X +yarn add @react-navigation/native-stack@7.2.0 ``` 下面的代码展示了这个库的基本使用场景: diff --git a/zh-cn/react-native-video.md b/zh-cn/react-native-video.md index 51ea395d..cd8972b7 100644 --- a/zh-cn/react-native-video.md +++ b/zh-cn/react-native-video.md @@ -15,18 +15,18 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-video) +## 安装与使用 + 请到三方库的 Releases 发布地址查看配套的版本信息: -| version | Package name | Releases info | Support RN version | -| ------- | --------------------------------------- | ------------------------------------------------------------ | ------------------ | -| 5.2.1 | @react-native-oh-tpl/react-native-video | [@react-native-oh-tpl/react-native-video Releases](https://github.com/react-native-oh-library/react-native-video/releases) | 0.72 | -| 6.13.1 | @react-native-oh-tpl/react-native-video | [@react-native-oh-tpl/react-native-video Releases](https://github.com/react-native-oh-library/react-native-video/releases) | 0.72 | -| 6.14.0 | @react-native-ohos/react-native-video | [@react-native-ohos/react-native-video Releases]() | 0.77 | +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| <= 6.13.1@deprecated | [@react-native-oh-tpl/react-native-video Releases(deprecated)](https://github.com/react-native-oh-library/react-native-video/releases) | 0.72 | +| 6.13.2 | [@react-native-ohos/react-native-video Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-video/releases) | 0.72 | +| 6.14.0 | [@react-native-ohos/react-native-video Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-video/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 -## 安装与使用 - 进入到工程目录并输入以下命令 @@ -34,20 +34,12 @@ #### **npm** ```bash -# 0.72 -npm install @react-native-oh-tpl/react-native-video - -# 0.77 npm install @react-native-ohos/react-native-video ``` #### **yarn** ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-video - -# 0.77 yarn add @react-native-ohos/react-native-video ``` @@ -62,7 +54,6 @@ import React, { useState, useRef } from "react"; import { Button, View, ScrollView, StyleSheet, Switch, Text, TextInput } from "react-native"; import RNCVideo from "react-native-video"; -// V6.13.1 import { type OnPlaybackStateChangedData, OnSeekData, @@ -88,10 +79,7 @@ function RNCVideoDemo() { const [onVideoProgress, setOnVideoProgress] = useState("onVideoProgress"); const [onVideoEnd, setOnVideoEnd] = useState("onVideoEnd"); const [onVideoBuffer, setOnVideoBuffer] = useState("onVideoBuffer"); - // V5.2.1 - const [onPlaybackStalled, setOnPlaybackStalled] = useState("onPlaybackStalled"); - // V6.13.1 const [onPlaybackStateChanged, setPlaybackStateChanged] = useState("onPlaybackStateChanged"); const [onPlaybackResume, setOnPlaybackResume] = useState("onPlaybackResume"); @@ -147,10 +135,6 @@ function RNCVideoDemo() { {onVideoEnd} {onVideoBuffer} - // V5.2.1 - {onPlaybackStalled} - - // V6.13.0 {onPlaybackStateChanged} {onPlaybackResume} @@ -382,7 +366,6 @@ function RNCVideoDemo() { ); }} - // V6.13.1 onSeek = {(data: OnSeekData) => { console.log('onSeek'); }} @@ -396,20 +379,7 @@ function RNCVideoDemo() { onBuffer={(e) => { setOnVideoBuffer("onVideoBuffer :" + e.isBuffering); }} - - // V5.2.1 - onPlaybackStalled={() => { - setOnPlaybackStalled("onPlaybackStalled : true"); - setOnPlaybackResume("onPlaybackResume :false"); - }} - - // V5.2.1 - onPlaybackResume={() => { - setOnPlaybackStalled("onPlaybackStalled :false"); - setOnPlaybackResume("onPlaybackResume :true"); - }} - // V6.13.1 onPlaybackStateChanged={(data: OnPlaybackStateChangedData) => { console.log('onPlaybackStateChanged ' + JSON.stringify(data)); setPlaybackStateChanged("onPlaybackStateChanged : " + JSON.stringify(data)); @@ -489,7 +459,9 @@ export default RNCVideoDemo; ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-video@6.13.2,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -517,19 +489,6 @@ export default RNCVideoDemo; 打开 `entry/oh-package.json5`,添加以下依赖 - -- V0.72 - -```json -"dependencies": { - ... - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-video": "file:../../node_modules/@react-native-oh-tpl/react-native-video/harmony/rn_video.har" - } -``` - -- V0.77 - ```json "dependencies": { ... @@ -553,6 +512,8 @@ ohpm install ### 3.配置 CMakeLists 和引入 RNCVideoPackage +> 若使用的是 <= 6.13.1 版本,请跳过本章。 + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -573,11 +534,6 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) - -# V0.72 -+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-video/src/main/cpp" ./video) - -# V0.77 + add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-video/src/main/cpp" ./video) # RNOH_BEGIN: manual_package_linking_1 @@ -622,10 +578,6 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... -// V0.72 -+ import { RNCVideo, RNC_VIDEO_TYPE } from "@react-native-oh-tpl/react-native-video" - -// V0.77 + import { RNCVideo, RNC_VIDEO_TYPE } from "@react-native-ohos/react-native-video" @@ -660,10 +612,6 @@ const arkTsComponentNames: Array = [ ```diff ... -// V0.72 -+ import { RNCVideoPackage } from '@react-native-oh-tpl/react-native-video/ts'; - -// V0.77 + import { RNCVideoPackage } from '@react-native-ohos/react-native-video/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -689,14 +637,15 @@ ohpm install ## 约束与限制 -兼容性 +### 兼容性 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -在以下版本验证通过。 +在以下版本验证通过: -1. RNOH: 0.72.27; SDK: HarmonyOS 5.1.1 Release SDK; IDE: DevEco Studio 5.1.1 Release; ROM: 5.0.1.120; -2. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## 属性 -- Gitee From ac8371faa9f0a63b2b67e51c60623b89a9966181 Mon Sep 17 00:00:00 2001 From: wangqiuyun1126 <727176064@qq.com> Date: Wed, 10 Dec 2025 16:37:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20[Issues:=20#ID7VS4]=20=E4=B8=89?= =?UTF-8?q?=E6=96=B9=E5=BA=93=E9=80=82=E9=85=8Dcli=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E9=9C=80=E6=B1=824=E4=B8=AA=E4=B8=89=E6=96=B9=E5=BA=93?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangqiuyun1126 <727176064@qq.com> --- en/op-engineering-op-sqlite.md | 42 ++++--- en/react-native-clipboard-clipboard.md | 2 +- en/react-native-file-selector.md | 115 +++++++++++++----- ...eact-native-oh-tpl-react-native-screens.md | 8 +- en/react-native-video.md | 84 +++---------- zh-cn/op-engineering-op-sqlite.md | 67 +++------- zh-cn/react-native-clipboard-clipboard.md | 2 +- zh-cn/react-native-file-selector.md | 45 +++---- ...eact-native-oh-tpl-react-native-screens.md | 8 +- zh-cn/react-native-video.md | 85 +++---------- 10 files changed, 191 insertions(+), 267 deletions(-) diff --git a/en/op-engineering-op-sqlite.md b/en/op-engineering-op-sqlite.md index 9d66c9e1..dcb9faee 100644 --- a/en/op-engineering-op-sqlite.md +++ b/en/op-engineering-op-sqlite.md @@ -21,8 +21,15 @@ Template version: v0.2.2 ## Installation and Usage +Please refer to the Releases page of the third-party library for the corresponding version information -Find the matching version information in the release address of a third-party library and download an applicable .tgz package:[@react-native-oh-tpl/op-sqlite Releases](https://github.com/react-native-oh-library/op-sqlite/releases) +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| <= 8.0.2-0.0.3@deprecated | [@react-native-oh-tpl/op-sqlite Releases(deprecated)](https://github.com/react-native-oh-library/op-sqlite/releases) | 0.72 | +| 8.0.3 | [@react-native-ohos/op-sqlite Releases](https://gitcode.com/openharmony-sig/rntpc_op-sqlite/releases) | 0.72 | +| 14.0.1 | [@react-native-ohos/op-sqlite Releases](https://gitcode.com/openharmony-sig/rntpc_op-sqlite/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/en/tgz-usage-en.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -33,13 +40,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/op-sqlite +npm install @react-native-ohos/op-sqlite ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/op-sqlite +yarn add @react-native-ohos/op-sqlite ``` @@ -63,7 +70,7 @@ import { open, type DB } from '@op-engineering/op-sqlite'; -import { HARMONY_DATABASE_PATH } from '@react-native-oh-tpl/op-sqlite'; +import { HARMONY_DATABASE_PATH } from '@react-native-ohos/op-sqlite'; export default function OpSqliteExample() { @@ -98,7 +105,10 @@ For details, see [Source Repository Document Address](https://ospfranco.notion.s ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/op-sqlite@8.0.3 now supports Autolink without requiring manual configuration(The content that still needs to be manually configured has been marked in the corresponding title), currently only supports 72 frameworks. +Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +This step provides guidance for manually configuring native dependencies. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -125,7 +135,7 @@ Open `entry/oh-package.json5` file and add the following dependencies: "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/op-sqlite": "file:../../node_modules/@react-native-oh-tpl/op-sqlite/harmony/rn_op_sqlite.har" + "@react-native-ohos/op-sqlite": "file:../../node_modules/@react-native-ohos/op-sqlite/harmony/rn_op_sqlite.har" } ``` @@ -144,6 +154,8 @@ Method 2: Directly link to the source code. ### 3. Configuring CMakeLists and Introducing RNOpSqlitePackage +> If you are using version <= 8.0.2-0.0.3, please skip this chapter. + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -164,7 +176,7 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) -+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/op-sqlite/src/main/cpp" ./rn_op_sqlite) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/op-sqlite/src/main/cpp" ./rn_op_sqlite) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -204,7 +216,7 @@ std::vector> PackageProvider::getPackages(Package::Cont Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff -+ import { RNOpSqlitePackage } from '@react-native-oh-tpl/op-sqlite/ts'; ++ import { RNOpSqlitePackage } from '@react-native-ohos/op-sqlite/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -213,7 +225,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` -### 5. Create a `package.json` file in the root directory of your IDE project and configure the parameters. +### 5. Create a `package.json` file in the root directory of your IDE project and configure the parameters.(This module always requires manual configuration) ```json { @@ -226,14 +238,14 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 5. Introducing opSqlitePlugin to ArkTS +### 6. Introducing opSqlitePlugin to ArkTS(This module always requires manual configuration) Open the `entry/hvigorfile.ts` file and add the following code: ```diff + import { hapTasks, OhosHapContext, OhosPluginId, Target } from '@ohos/hvigor-ohos-plugin'; + import { HvigorPlugin, HvigorNode, getNode } from '@ohos/hvigor'; -+ import { opSqlitePlugin } from './oh_modules/@react-native-oh-tpl/op-sqlite/hvigorfile.ts'; ++ import { opSqlitePlugin } from './oh_modules/@react-native-ohos/op-sqlite/hvigorfile.ts'; +const path = require('path'); +const rootRNPackagePath = path.join(__dirname, '../package.json'); //The configuration is based on the actual package path @@ -244,7 +256,7 @@ export default { } ``` -### 6. Running +### 7. Running Click the `sync` button in the upper right corner. @@ -262,11 +274,13 @@ Then build and run the code. ### Compatibility - To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. +Verified in the following versions. -Check the release version information in the release address of the third-party library:[@react-native-oh-tpl/op-sqlite Releases](https://github.com/react-native-oh-library/op-sqlite/releases) +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ### Permission Requirements diff --git a/en/react-native-clipboard-clipboard.md b/en/react-native-clipboard-clipboard.md index 6b21fe25..6cff8700 100644 --- a/en/react-native-clipboard-clipboard.md +++ b/en/react-native-clipboard-clipboard.md @@ -289,7 +289,7 @@ Verified in the following versions. ### Permission Requirements -> [!TIP] The "ohos.permission.READ_PASTEBOARD" permission level is system_basic, and the authorization method is user_grant. [Configuration Guide for Using ACL Signature](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/signing-0000001587684945-V3#section157591551175916) +> [!TIP] The "ohos.permission.READ_PASTEBOARD" permission level is **system_basic**, and the authorization method is **user_grant**. [Configuration Guide for Using ACL Signature](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/signing-0000001587684945-V3#section157591551175916) #### Add permissions in the module.json5 file under the entry directory diff --git a/en/react-native-file-selector.md b/en/react-native-file-selector.md index ce0806f4..a51418a3 100644 --- a/en/react-native-file-selector.md +++ b/en/react-native-file-selector.md @@ -14,14 +14,15 @@ > [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-file-selector) -The repository for this third-party library has been migrated to Gitcode, and it now supports direct download from npm. The new package name is: `@react-native-ohos/react-native-file-selector`. The specific version relationships are as follows: +## Installation and Usage -| Version | Package Name | Repository | Release |Supported RN Version | -| ------------------------------ | ---------------- | ------------------- | ------------------- | -------------------- | -| 1.0.2 | @react-native-oh-tpl/react-native-file-selector | [Github](https://github.com/react-native-oh-library/react-native-file-selector) | [Github Releases](https://github.com/react-native-oh-library/react-native-file-selector/releases) | 0.72 | -|1.1.0 | @react-native-ohos/react-native-file-selector | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-file-selector) | [GitCode Releases]() | 0.77 | +Please refer to the Releases page of the third-party library for the corresponding version information -## Installation and Usage +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +|<= 1.0.2-0.0.3@deprecated | [@react-native-oh-tpl/react-native-file-selector Releases(deprecated)](https://github.com/react-native-oh-library/react-native-file-selector/releases) | 0.72 | +| 1.0.3 | [@react-native-ohos/react-native-file-selector Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-file-selector/releases) | 0.72 | +| 1.1.0 | [@react-native-ohos/react-native-file-selector Releases](hhttps://gitcode.com/openharmony-sig/rntpc_react-native-file-selector/releases) | 0.77 | For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. @@ -30,18 +31,12 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -# 1.0.2 -npm install @react-native-oh-tpl/react-native-file-selector -# 1.1.0 npm install @react-native-ohos/react-native-file-selector ``` #### **yarn** ```bash -# 1.0.2 -yarn add @react-native-oh-tpl/react-native-file-selector -# 1.1.0 yarn add @react-native-ohos/react-native-file-selector ``` @@ -66,13 +61,18 @@ export default App; ## Use Codegen -If this repository has been adapted to Codegen, generate the bridge code of the third-party library by using the Codegen. For details, see[ Codegen Usage Guide](/en/codegen.md). +Version >= @react-native-ohos/react-native-file-selector@1.0.3, compatible with codegen-lib for generating bridge code. + +If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/en/codegen.md). ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-file-selector@1.0.3 now supports Autolink without requiring manual configuration, currently only supports 72 frameworks. +Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -Open the harmony directory of the HarmonyOS project in DevEco Studio. +This step provides guidance for manually configuring native dependencies. + +Open the `harmony` directory of the HarmonyOS project in DevEco Studio. ### 1.Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project @@ -98,15 +98,6 @@ Method 1 (recommended): Use the HAR file. Open entry/oh-package.json5 file and add the following dependencies: -- V1.0.2 -```json -"dependencies": { - "@rnoh/react-native-openharmony" : "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-file-selector": "file:../../node_modules/@react-native-oh-tpl/react-native-file-selector/harmony/file_selector.har" - } -``` - -- V1.1.0 ```json "dependencies": { "@rnoh/react-native-openharmony" : "file:../react_native_openharmony", @@ -134,9 +125,6 @@ Open the entry/src/main/ets/RNPackagesFactory.ts file and add the following code ```diff ... import type {RNPackageContext, RNPackage} from '@rnoh/react-native-openharmony/ts'; -// V1.0.2 -+import {RNFileSelectorPackage} from '@react-native-oh-tpl/react-native-file-selector/ts'; -// V1.1.0 +import {RNFileSelectorPackage} from '@react-native-ohos/react-native-file-selector/ts'; @@ -147,7 +135,70 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.Running +### 4.Configuring CMakeLists and Introducing FileSelectorPackage + +> If you are using version <= 1.0.2-0.0.3, please skip this chapter. + +Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: + +```diff +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") ++ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") +set(LOG_VERBOSITY_LEVEL 1) +set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") +set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") +set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use +add_compile_definitions(WITH_HITRACE_SYSTRACE) + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) + +# RNOH_BEGIN: manual_package_linking_1 +add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-file-selector/src/main/cpp" ./file-selector) + + +# RNOH_END: manual_package_linking_1 + +file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") + +add_library(rnoh_app SHARED + ${GENERATED_CPP_FILES} + "./PackageProvider.cpp" + "${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp" +) +target_link_libraries(rnoh_app PUBLIC rnoh) + +# RNOH_BEGIN: manual_package_linking_2 +target_link_libraries(rnoh_app PUBLIC rnoh_sample_package) ++ target_link_libraries(rnoh_app PUBLIC rnoh_file_selector) +# RNOH_END: manual_package_linking_2 +``` + +Open `entry/src/main/cpp/PackageProvider.cpp` and add the following code: + +```diff +#include "RNOH/PackageProvider.h" +#include "generated/RNOHGeneratedPackage.h" +#include "SamplePackage.h" ++ #include "FileSelectorPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { + std::make_shared(ctx), + std::make_shared(ctx), ++ std::make_shared(ctx), + }; +} +``` + +### 5.Running Click the sync button in the upper right corner. @@ -166,9 +217,11 @@ Then build and run the code. To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -This document is verified based on the following versions: -1. RNOH:0.72.96; SDK:HarmonyOS 5.1.1 Release SDK; IDE:DevEco Studio 5.1.1.840; ROM:6.0.0; -2. RNOH:0.77.18; SDK:HarmonyOS 5.1.1 Release SDK; IDE:DevEco Studio 5.1.1.840; ROM:6.0.0; +Verified in the following versions. + +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## Properties diff --git a/en/react-native-oh-tpl-react-native-screens.md b/en/react-native-oh-tpl-react-native-screens.md index c4c85219..e15d322b 100644 --- a/en/react-native-oh-tpl-react-native-screens.md +++ b/en/react-native-oh-tpl-react-native-screens.md @@ -58,12 +58,12 @@ npm install @react-navigation/native-stack@7.2.0 ```bash # 0.72 -yarn install @react-native-ohos/react-native-screens@3.34.1-X.X.X -yarn install @react-navigation/native-stack@6.9.13 +yarn add @react-native-ohos/react-native-screens@3.34.1-X.X.X +yarn add @react-navigation/native-stack@6.9.13 # 0.77 -yarn install @react-native-ohos/react-native-screens@4.8.1-X.X.X -yarn install @react-navigation/native-stack@7.2.0 +yarn add @react-native-ohos/react-native-screens@4.8.1-X.X.X +yarn add @react-navigation/native-stack@7.2.0 ``` The following code shows the basic use scenario of the repository: diff --git a/en/react-native-video.md b/en/react-native-video.md index 514c2286..58370c16 100644 --- a/en/react-native-video.md +++ b/en/react-native-video.md @@ -14,37 +14,31 @@ > [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-video) -Find the matching version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-video Releases](https://github.com/react-native-oh-library/react-native-video/releases). For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. +## Installation and Usage -| version | Package name |Releases info | Support RN version | -| ------- | ------- | ------------------------------------------------------------ | ------------------ | -| 5.2.1 | @react-native-oh-tpl/react-native-video | [@react-native-oh-tpl/react-native-video Releases](https://github.com/react-native-oh-library/react-native-video/releases) |0.72| -| 6.13.1 | @react-native-oh-tpl/react-native-video | [@react-native-oh-tpl/react-native-video Releases](https://github.com/react-native-oh-library/react-native-video/releases) |0.72| -| 6.14.0 | @react-native-ohos/react-native-video | [@react-native-ohos/react-native-video Releases]() |0.77| +Please refer to the Releases page of the third-party library for the corresponding version information -Go to the project directory and execute the following instruction: +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| <= 6.13.1@deprecated | [@react-native-oh-tpl/react-native-video Releases(deprecated)](https://github.com/react-native-oh-library/react-native-video/releases) | 0.72 | +| 6.13.2 | [@react-native-ohos/react-native-video Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-video/releases) | 0.72 | +| 6.14.0 | [@react-native-ohos/react-native-video Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-video/releases) | 0.77 | -## Installation and Usage +For older versions not published on npm, please refer to the [Installation Guide](/en/tgz-usage-en.md) to install the tgz package. + +Go to the project directory and execute the following instruction: #### **npm** ```bash -# 0.72 -npm install @react-native-oh-tpl/react-native-video - -# 0.77 npm install @react-native-ohos/react-native-video ``` #### **yarn** ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-video - -# 0.77 yarn add @react-native-ohos/react-native-video ``` @@ -59,7 +53,6 @@ import React, { useState, useRef } from "react"; import { Button, View, ScrollView, StyleSheet, Switch, Text, TextInput } from "react-native"; import RNCVideo from "react-native-video"; -// V6.13.1 import { type OnPlaybackStateChangedData, OnSeekData, @@ -85,10 +78,7 @@ function RNCVideoDemo() { const [onVideoProgress, setOnVideoProgress] = useState("onVideoProgress"); const [onVideoEnd, setOnVideoEnd] = useState("onVideoEnd"); const [onVideoBuffer, setOnVideoBuffer] = useState("onVideoBuffer"); - // V5.2.1 - const [onPlaybackStalled, setOnPlaybackStalled] = useState("onPlaybackStalled"); - // V6.13.1 const [onPlaybackStateChanged, setPlaybackStateChanged] = useState("onPlaybackStateChanged"); const [onPlaybackResume, setOnPlaybackResume] = useState("onPlaybackResume"); @@ -144,10 +134,6 @@ function RNCVideoDemo() { {onVideoEnd} {onVideoBuffer} - // V5.2.1 - {onPlaybackStalled} - - // V6.13.1 {onPlaybackStateChanged} {onPlaybackResume} @@ -379,7 +365,6 @@ function RNCVideoDemo() { ); }} - // V6.13.1 onSeek = {(data: OnSeekData) => { console.log('onSeek'); }} @@ -393,20 +378,7 @@ function RNCVideoDemo() { onBuffer={(e) => { setOnVideoBuffer("onVideoBuffer :" + e.isBuffering); }} - - // V5.2.1 - onPlaybackStalled={() => { - setOnPlaybackStalled("onPlaybackStalled : true"); - setOnPlaybackResume("onPlaybackResume :false"); - }} - - // V5.2.1 - onPlaybackResume={() => { - setOnPlaybackStalled("onPlaybackStalled :false"); - setOnPlaybackResume("onPlaybackResume :true"); - }} - // V6.13.1 onPlaybackStateChanged={(data: OnPlaybackStateChangedData) => { console.log('onPlaybackStateChanged ' + JSON.stringify(data)); setPlaybackStateChanged("onPlaybackStateChanged : " + JSON.stringify(data)); @@ -486,7 +458,10 @@ export default RNCVideoDemo; ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-video@6.13.2 now supports Autolink without requiring manual configuration, currently only supports 72 frameworks. +Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +This step provides guidance for manually configuring native dependencies. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -511,18 +486,6 @@ Method 1 (recommended): Use the HAR file. Open `entry/oh-package.json5` file and add the following dependencies: -- V0.72 - -```json -"dependencies": { - ... - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-video": "file:../../node_modules/@react-native-oh-tpl/react-native-video/harmony/rn_video.har" - } -``` - -- V0.77 - ```json "dependencies": { ... @@ -546,6 +509,8 @@ Method 2: Directly link to the source code. ### 3. Configuring CMakeLists and Introducing RNCVideoPackage +> If you are using version <= 6.13.1, please skip this chapter. + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -566,10 +531,6 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) -# V0.72 -+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-video/src/main/cpp" ./video) - -# V0.77 + add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-video/src/main/cpp" ./video) # RNOH_BEGIN: manual_package_linking_1 @@ -613,10 +574,6 @@ Find `function buildCustomRNComponent()`, which is usually located in `entry/src ```diff ... -// V0.72 -+ import { RNCVideo, RNC_VIDEO_TYPE } from "@react-native-oh-tpl/react-native-video" - -// V0.77 + import { RNCVideo, RNC_VIDEO_TYPE } from "@react-native-ohos/react-native-video" @Builder @@ -650,10 +607,6 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... -// V0.72 -+ import { RNCVideoPackage } from '@react-native-oh-tpl/react-native-video/ts'; - -// V0.77 + import { RNCVideoPackage } from '@react-native-ohos/react-native-video/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -685,8 +638,9 @@ To use this repository, you need to use the correct React-Native and RNOH versio Verified in the following versions. -1. RNOH: 0.72.27; SDK: HarmonyOS 5.1.1 Release SDK; IDE: DevEco Studio 5.1.1 Release; ROM: 5.0.1.120; -2. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## Properties diff --git a/zh-cn/op-engineering-op-sqlite.md b/zh-cn/op-engineering-op-sqlite.md index 47a33a3b..b3fe549f 100644 --- a/zh-cn/op-engineering-op-sqlite.md +++ b/zh-cn/op-engineering-op-sqlite.md @@ -23,10 +23,11 @@ 请到三方库的 Releases 发布地址查看配套的版本信息: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 8.0.2 | [@react-native-oh-tpl/op-sqlite Releases](https://gitee.com/link?target=https%3A%2F%2Fgithub.com%2Freact-native-oh-library%2Fop-sqlite%2Freleases) | 0.72 | -| 14.0.1 | [@react-native-ohos/op-sqlite Releases]() | 0.77 | +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| <= 8.0.2-0.0.3@deprecated | [@react-native-oh-tpl/op-sqlite Releases(deprecated)](https://github.com/react-native-oh-library/op-sqlite/releases) | 0.72 | +| 8.0.3 | [@react-native-ohos/op-sqlite Releases](https://gitcode.com/openharmony-sig/rntpc_op-sqlite/releases) | 0.72 | +| 14.0.1 | [@react-native-ohos/op-sqlite Releases](https://gitcode.com/openharmony-sig/rntpc_op-sqlite/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -37,20 +38,12 @@ #### **npm** ```bash -# V8.0.2 -npm install @react-native-oh-tpl/op-sqlite - -# V14.0.1 npm install @react-native-ohos/op-sqlite ``` #### **yarn** ```bash -# V8.0.2 -yarn add @react-native-oh-tpl/op-sqlite - -# V14.0.1 yarn add @react-native-ohos/op-sqlite ``` @@ -89,10 +82,6 @@ export default function OpSqliteExample() { const res = await db.execute('SELECT sqlite_version();'); - // V8.0.2 - const version = res.rows?._array[0]['sqlite_version()']; - - // V14.0.1 const version = res.rows[0]['sqlite_version()']; setSqliteVersion(version); @@ -125,7 +114,9 @@ export default function OpSqliteExample() { ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/op-sqlite@8.0.3,已支持 Autolink,无需手动配置(仍需手动配置的内容已在对应标题处标记),目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -153,18 +144,6 @@ export default function OpSqliteExample() { 打开 `entry/oh-package.json5`,添加以下依赖 -- V8.0.2 - -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - - "@react-native-oh-tpl/op-sqlite": "file:../../node_modules/@react-native-oh-tpl/op-sqlite/harmony/rn_op_sqlite.har" - } -``` - -- V14.0.1 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -188,6 +167,8 @@ ohpm install ### 3. 配置 CMakeLists 和引入 RNOpSqlitePackage +> 若使用的是 <= 8.0.2-0.0.3 版本,请跳过本章。 + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -208,11 +189,6 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) - -# V8.0.2 -+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/op-sqlite/src/main/cpp" ./rn_op_sqlite) - -# V14.0.1 + add_subdirectory("${OH_MODULES}/@react-native-ohos/op-sqlite/src/main/cpp" ./rn_op_sqlite) # RNOH_END: manual_package_linking_1 @@ -257,10 +233,6 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... -// V8.0.2 -+ import { RNOpSqlitePackage } from '@react-native-oh-tpl/op-sqlite/ts'; - -// V14.0.1 + import { RNOpSqlitePackage } from '@react-native-ohos/op-sqlite/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -270,7 +242,8 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` -### 5.在ide的工程根目录创建package.json文件,并配置参数 + +### 5.在ide的工程根目录创建package.json文件,并配置参数(该模块始终需要手动配置) ```diff { @@ -285,7 +258,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 6. 在 ArkTs 侧引入 opSqlitePlugin +### 6. 在 ArkTs 侧引入 opSqlitePlugin(该模块始终需要手动配置) 打开 `entry/hvigorfile.ts`,添加: @@ -293,10 +266,6 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { + import { hapTasks, OhosHapContext, OhosPluginId, Target } from '@ohos/hvigor-ohos-plugin'; + import { HvigorPlugin, HvigorNode, getNode } from '@ohos/hvigor'; -// V8.0.2 -+ import { opSqlitePlugin } from './oh_modules/@react-native-oh-tpl/op-sqlite/hvigorfile.ts'; - -// V14.0.1 + import { opSqlitePlugin } from './oh_modules/@react-native-ohos/op-sqlite/hvigorfile.ts'; +const path = require('path'); @@ -325,15 +294,13 @@ ohpm install ## 约束与限制 ### 兼容性 - 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +在以下版本验证通过: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 8.0.2 | [@react-native-oh-tpl/op-sqlite Releases](https://gitee.com/link?target=https%3A%2F%2Fgithub.com%2Freact-native-oh-library%2Fop-sqlite%2Freleases) | 0.72 | -| 14.0.1 | [@react-native-ohos/op-sqlite Releases]() | 0.77 | +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ### 应用权限申请 diff --git a/zh-cn/react-native-clipboard-clipboard.md b/zh-cn/react-native-clipboard-clipboard.md index 54e43d6f..be13328a 100644 --- a/zh-cn/react-native-clipboard-clipboard.md +++ b/zh-cn/react-native-clipboard-clipboard.md @@ -286,7 +286,7 @@ ohpm install ### 权限要求 -> [!TIP] "ohos.permission.READ_PASTEBOARD"权限等级为system_basic,授权方式为user_grant,[使用 ACL 签名的配置指导](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/signing-0000001587684945-V3#section157591551175916) +> [!TIP] "ohos.permission.READ_PASTEBOARD"权限等级为**system_basic**,授权方式为**user_grant**,[使用 ACL 签名的配置指导](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/signing-0000001587684945-V3#section157591551175916) #### 在 entry 目录下的module.json5中添加权限 diff --git a/zh-cn/react-native-file-selector.md b/zh-cn/react-native-file-selector.md index a3923e84..332dde8b 100644 --- a/zh-cn/react-native-file-selector.md +++ b/zh-cn/react-native-file-selector.md @@ -15,14 +15,15 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-file-selector) -该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/react-native-file-selector`,具体版本所属关系如下: +## 安装与使用 -| Version | Package Name | Repository | Release |Supported RN Version | -| ------------------------------ | ---------------- | ------------------- | ------------------- | -------------------- | -| 1.0.2 | @react-native-oh-tpl/react-native-file-selector | [Github](https://github.com/react-native-oh-library/react-native-file-selector) | [Github Releases](https://github.com/react-native-oh-library/react-native-file-selector/releases) | 0.72 | -|1.1.0 | @react-native-ohos/react-native-file-selector | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-file-selector) | [GitCode Releases]() | 0.77 | +请到三方库的 Releases 发布地址查看配套的版本信息: -## 安装与使用 +| 三方库版本 | 发布信息 | 支持RN版本 | +|-------| ------------------------------------------------------------ | ---------- | +|<= 1.0.2-0.0.3@deprecated | [@react-native-oh-tpl/react-native-file-selector Releases(deprecated)](https://github.com/react-native-oh-library/react-native-file-selector/releases) | 0.72 | +| 1.0.3 | [@react-native-ohos/react-native-file-selector Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-file-selector/releases) | 0.72 | +| 1.1.0 | [@react-native-ohos/react-native-file-selector Releases](hhttps://gitcode.com/openharmony-sig/rntpc_react-native-file-selector/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -32,18 +33,12 @@ #### **npm** ```bash -# 1.0.2 -npm install @react-native-oh-tpl/react-native-file-selector -# 1.1.0 npm install @react-native-ohos/react-native-file-selector ``` #### **yarn** ```bash -# 1.0.2 -yarn add @react-native-oh-tpl/react-native-file-selector -# 1.1.0 yarn add @react-native-ohos/react-native-file-selector ``` @@ -68,13 +63,15 @@ export default App; ## 使用 Codegen -> [!TIP] V1.1.0 不需要执行 Codegen。 +Version >= @react-native-ohos/react-native-file-selector@1.0.3,已适配codegen-lib生成桥接代码。 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-file-selector@1.0.3,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -101,15 +98,7 @@ export default App; > [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。 打开 `entry/oh-package.json5`,添加以下依赖 -- V1.0.2 -```json -"dependencies": { - "@rnoh/react-native-openharmony" : "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-file-selector": "file:../../node_modules/@react-native-oh-tpl/react-native-file-selector/harmony/file_selector.har" - } -``` -- V1.1.0 ```json "dependencies": { "@rnoh/react-native-openharmony" : "file:../react_native_openharmony", @@ -138,9 +127,6 @@ ohpm install ```diff ... import type {RNPackageContext, RNPackage} from '@rnoh/react-native-openharmony/ts'; -// V1.0.2 -+import {RNFileSelectorPackage} from '@react-native-oh-tpl/react-native-file-selector/ts'; -// V1.1.0 +import {RNFileSelectorPackage} from '@react-native-ohos/react-native-file-selector/ts'; @@ -151,9 +137,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.配置 CMakeLists 和引入 SqliteStoragePackage +### 4.配置 CMakeLists 和引入 FileSelectorPackage -> [!TIP] V1.1.0 需要执行 +> 若使用的是 <= 1.0.2-0.0.3 版本,请跳过本章。 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: @@ -235,8 +221,9 @@ ohpm install 在以下版本验证通过: -1. RNOH:0.72.96; SDK:HarmonyOS 5.1.1 Release SDK; IDE:DevEco Studio 5.1.1.840; ROM:6.0.0; -2. RNOH:0.77.18; SDK:HarmonyOS 5.1.1 Release SDK; IDE:DevEco Studio 5.1.1.840; ROM:6.0.0; +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## 属性 diff --git a/zh-cn/react-native-oh-tpl-react-native-screens.md b/zh-cn/react-native-oh-tpl-react-native-screens.md index 5d4ae83e..1df14f3a 100644 --- a/zh-cn/react-native-oh-tpl-react-native-screens.md +++ b/zh-cn/react-native-oh-tpl-react-native-screens.md @@ -58,12 +58,12 @@ npm install @react-navigation/native-stack@7.2.0 ```bash # 0.72 -yarn install @react-native-ohos/react-native-screens@3.34.1-X.X.X -yarn install @react-navigation/native-stack@6.9.13 +yarn add @react-native-ohos/react-native-screens@3.34.1-X.X.X +yarn add @react-navigation/native-stack@6.9.13 # 0.77 -yarn install @react-native-ohos/react-native-screens@4.8.1-X.X.X -yarn install @react-navigation/native-stack@7.2.0 +yarn add @react-native-ohos/react-native-screens@4.8.1-X.X.X +yarn add @react-navigation/native-stack@7.2.0 ``` 下面的代码展示了这个库的基本使用场景: diff --git a/zh-cn/react-native-video.md b/zh-cn/react-native-video.md index 51ea395d..cd8972b7 100644 --- a/zh-cn/react-native-video.md +++ b/zh-cn/react-native-video.md @@ -15,18 +15,18 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-video) +## 安装与使用 + 请到三方库的 Releases 发布地址查看配套的版本信息: -| version | Package name | Releases info | Support RN version | -| ------- | --------------------------------------- | ------------------------------------------------------------ | ------------------ | -| 5.2.1 | @react-native-oh-tpl/react-native-video | [@react-native-oh-tpl/react-native-video Releases](https://github.com/react-native-oh-library/react-native-video/releases) | 0.72 | -| 6.13.1 | @react-native-oh-tpl/react-native-video | [@react-native-oh-tpl/react-native-video Releases](https://github.com/react-native-oh-library/react-native-video/releases) | 0.72 | -| 6.14.0 | @react-native-ohos/react-native-video | [@react-native-ohos/react-native-video Releases]() | 0.77 | +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| <= 6.13.1@deprecated | [@react-native-oh-tpl/react-native-video Releases(deprecated)](https://github.com/react-native-oh-library/react-native-video/releases) | 0.72 | +| 6.13.2 | [@react-native-ohos/react-native-video Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-video/releases) | 0.72 | +| 6.14.0 | [@react-native-ohos/react-native-video Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-video/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 -## 安装与使用 - 进入到工程目录并输入以下命令 @@ -34,20 +34,12 @@ #### **npm** ```bash -# 0.72 -npm install @react-native-oh-tpl/react-native-video - -# 0.77 npm install @react-native-ohos/react-native-video ``` #### **yarn** ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-video - -# 0.77 yarn add @react-native-ohos/react-native-video ``` @@ -62,7 +54,6 @@ import React, { useState, useRef } from "react"; import { Button, View, ScrollView, StyleSheet, Switch, Text, TextInput } from "react-native"; import RNCVideo from "react-native-video"; -// V6.13.1 import { type OnPlaybackStateChangedData, OnSeekData, @@ -88,10 +79,7 @@ function RNCVideoDemo() { const [onVideoProgress, setOnVideoProgress] = useState("onVideoProgress"); const [onVideoEnd, setOnVideoEnd] = useState("onVideoEnd"); const [onVideoBuffer, setOnVideoBuffer] = useState("onVideoBuffer"); - // V5.2.1 - const [onPlaybackStalled, setOnPlaybackStalled] = useState("onPlaybackStalled"); - // V6.13.1 const [onPlaybackStateChanged, setPlaybackStateChanged] = useState("onPlaybackStateChanged"); const [onPlaybackResume, setOnPlaybackResume] = useState("onPlaybackResume"); @@ -147,10 +135,6 @@ function RNCVideoDemo() { {onVideoEnd} {onVideoBuffer} - // V5.2.1 - {onPlaybackStalled} - - // V6.13.0 {onPlaybackStateChanged} {onPlaybackResume} @@ -382,7 +366,6 @@ function RNCVideoDemo() { ); }} - // V6.13.1 onSeek = {(data: OnSeekData) => { console.log('onSeek'); }} @@ -396,20 +379,7 @@ function RNCVideoDemo() { onBuffer={(e) => { setOnVideoBuffer("onVideoBuffer :" + e.isBuffering); }} - - // V5.2.1 - onPlaybackStalled={() => { - setOnPlaybackStalled("onPlaybackStalled : true"); - setOnPlaybackResume("onPlaybackResume :false"); - }} - - // V5.2.1 - onPlaybackResume={() => { - setOnPlaybackStalled("onPlaybackStalled :false"); - setOnPlaybackResume("onPlaybackResume :true"); - }} - // V6.13.1 onPlaybackStateChanged={(data: OnPlaybackStateChangedData) => { console.log('onPlaybackStateChanged ' + JSON.stringify(data)); setPlaybackStateChanged("onPlaybackStateChanged : " + JSON.stringify(data)); @@ -489,7 +459,9 @@ export default RNCVideoDemo; ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-video@6.13.2,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -517,19 +489,6 @@ export default RNCVideoDemo; 打开 `entry/oh-package.json5`,添加以下依赖 - -- V0.72 - -```json -"dependencies": { - ... - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-video": "file:../../node_modules/@react-native-oh-tpl/react-native-video/harmony/rn_video.har" - } -``` - -- V0.77 - ```json "dependencies": { ... @@ -553,6 +512,8 @@ ohpm install ### 3.配置 CMakeLists 和引入 RNCVideoPackage +> 若使用的是 <= 6.13.1 版本,请跳过本章。 + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -573,11 +534,6 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) - -# V0.72 -+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-video/src/main/cpp" ./video) - -# V0.77 + add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-video/src/main/cpp" ./video) # RNOH_BEGIN: manual_package_linking_1 @@ -622,10 +578,6 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... -// V0.72 -+ import { RNCVideo, RNC_VIDEO_TYPE } from "@react-native-oh-tpl/react-native-video" - -// V0.77 + import { RNCVideo, RNC_VIDEO_TYPE } from "@react-native-ohos/react-native-video" @@ -660,10 +612,6 @@ const arkTsComponentNames: Array = [ ```diff ... -// V0.72 -+ import { RNCVideoPackage } from '@react-native-oh-tpl/react-native-video/ts'; - -// V0.77 + import { RNCVideoPackage } from '@react-native-ohos/react-native-video/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -689,14 +637,15 @@ ohpm install ## 约束与限制 -兼容性 +### 兼容性 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -在以下版本验证通过。 +在以下版本验证通过: -1. RNOH: 0.72.27; SDK: HarmonyOS 5.1.1 Release SDK; IDE: DevEco Studio 5.1.1 Release; ROM: 5.0.1.120; -2. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## 属性 -- Gitee