diff --git a/en/react-native-haptic-feedback.md b/en/react-native-haptic-feedback.md
index 8bf5ff1390e0101cab8cd9358668e59dce926134..8a6c5fe714768cfa5848048d3151ac1c16a93ced 100644
--- a/en/react-native-haptic-feedback.md
+++ b/en/react-native-haptic-feedback.md
@@ -181,7 +181,7 @@ Method 2: Directly link to the source code.
### 3. Configure CMakeLists and import RNHapticFeedbackPackage
-> If using version 2.2.1, please skip this chapter
+> If you are using version <= 2.2.1, please skip this chapter.
open `entry/src/main/cpp/CMakeLists.txt`,add:
diff --git a/en/react-native-skia.md b/en/react-native-skia.md
index 7e66f36943270f6c35994a85f082fa4d12ae6e41..8bcf7230774ec498c27a5aa1c4b9695e7310d6f3 100644
--- a/en/react-native-skia.md
+++ b/en/react-native-skia.md
@@ -15,17 +15,19 @@ Template version: v0.2.2
> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-skia)
-| Version | Package Name | Repository | Release | Version for RN |
-| ------------------------------ | ---------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ---------- |
-| 1.3.8 | @react-native-oh-tpl/react-native-skia | [Github](https://github.com/react-native-oh-library/react-native-skia) | [Github Releases](https://github.com/react-native-oh-library/react-native-skia/releases) | 0.72 |
-| 1.4.0 | @react-native-ohos/react-native-skia | [Github](https://github.com/react-native-oh-library/react-native-skia) | [Github Releases](https://github.com/react-native-oh-library/react-native-skia/releases) | 0.77 |
+## Installation and Usage
-For older versions that have not been released to npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package
+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.3.8@deprecated | [@react-native-oh-tpl/react-native-skia Releases(deprecated)](https://github.com/react-native-oh-library/react-native-skia/releases) | 0.72 |
+| 1.3.9 | [@react-native-ohos/react-native-skia Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-skia/releases) | 0.72 |
+| 1.4.0 | [@react-native-ohos/react-native-skia Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-skia/releases) | 0.77 |
-Go to the project directory and execute the following instruction:
+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.
+Go to the project directory and execute the following instruction:
@@ -33,20 +35,14 @@ Go to the project directory and execute the following instruction:
#### **npm**
```bash
-# RN0.72
-npm install @react-native-oh-tpl/react-native-skia
-# RN0.77
npm install @react-native-ohos/react-native-skia
```
#### **yarn**
```bash
-# RN0.72
-yarn add @react-native-oh-tpl/react-native-skia
-# RN0.77
yarn add @react-native-ohos/react-native-skia
```
@@ -80,7 +76,9 @@ export default App;
## Link
-Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking.
+Version >= @react-native-ohos/react-native-skia@1.3.9, 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.
@@ -105,17 +103,6 @@ Method 1 (recommended): Use the HAR file.
Open `entry/oh-package.json5` file and add the following dependencies:
-- RN0.72
-
-```json
-"dependencies": {
- "@rnoh/react-native-openharmony": "file:../react_native_openharmony",
- "@react-native-oh-tpl/react-native-skia": "file:../../node_modules/@react-native-oh-tpl/react-native-skia/harmony/skia.har"
- }
-```
-
-- RN0.77
-
```json
"dependencies": {
"@rnoh/react-native-openharmony": "file:../react_native_openharmony",
@@ -138,6 +125,8 @@ Method 2: Directly link to the source code.
### 3. Configuring CMakeLists and Introducing SkiaPackage
+> If you are using version <= 1.3.8, please skip this chapter.
+
Open `entry/src/main/cpp/CMakeLists.txt` and add the following code:
```diff
@@ -159,10 +148,7 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn)
# RNOH_BEGIN: manual_package_linking_1
add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package)
-# RN0.72
-+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-skia/src/main/cpp" ./skia)
-# RN0.77
+ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-skia/src/main/cpp" ./skia)
# RNOH_END: manual_package_linking_1
@@ -207,10 +193,7 @@ Find `function buildCustomRNComponent()`, which is usually located in `entry/src
```diff
...
-// RN0.72
-+ import { RNCSkiaDomView, SKIA_DOM_VIEW_TYPE } from '@react-native-oh-tpl/react-native-skia';
-// RN0.77
+ import { RNCSkiaDomView, SKIA_DOM_VIEW_TYPE } from '@react-native-ohos/react-native-skia';
@Builder
@@ -246,10 +229,7 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co
```diff
...
-// RN0.72
-+ import {RNSkiaPackage} from '@react-native-oh-tpl/react-native-skia/ts';
-// RN0.77
+ import {RNSkiaPackage} from '@react-native-ohos/react-native-skia/ts';
export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
@@ -279,14 +259,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.
-Verified in the following version:
-
-1. RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Beta1; IDE:DevEco Studio 5.0.3.200; ROM:3.0.0.18;
-2. RNOH:0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.868; ROM: 6.0.0.112;
-
-[!TIP] [skia Official ducoments](https://shopify.github.io/react-native-skia/docs/getting-started/installation)
+Verified in the following versions.
-[!TIP] To use this library, you need to configure [@react-native-oh-tpl/react-native-reanimated](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-reanimated.md)
+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;
## Components
diff --git a/en/react-native-svg.md b/en/react-native-svg.md
index daeff489fefe00405c288268817ac2788541b0d0..c700368396bf5a798d0469f61bea9e5c3a4af416 100644
--- a/en/react-native-svg.md
+++ b/en/react-native-svg.md
@@ -12,38 +12,40 @@
-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-svg)
+> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-harmony-svg)
-## 安装与使用
+## Installation and Usage
-> [!TIP] 本项目为 react-native-svg 的ArkTs版本,现已停止维护。
+Please refer to the Releases page of the third-party library for the corresponding version information:
-> [!TIP] 如需继续使用请移步至[react-native-svg-capi](/zh-cn/react-native-svg-capi.md) 使用CAPI版本的 react-native-svg。
+| Third-party Library Version | Release Information | Supported RN Version |
+| ---------- | ------------------------------------------------------------ | ---------- |
+| <= 15.0.1@deprecated | [@react-native-oh-tpl/react-native-svg Releases(deprecated)](https://github.com/react-native-oh-library/react-native-harmony-svg/releases) | 0.72 |
+| 15.0.2 | [@react-native-ohos/react-native-svg Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-svg/releases) | 0.72 |
+| 15.12.1 | [@react-native-ohos/react-native-svg Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-svg/releases) | 0.77 |
-Find the matching version information in the release address of a third-party library:[@react-native-oh-tpl/react-native-svg Releases](https://github.com/react-native-oh-library/react-native-svg/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.
+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.
-进入到工程目录并输入以下命令:
+Go to the project directory and execute the following instruction:
-
#### **npm**
```bash
-npm install @react-native-oh-tpl/react-native-svg
+npm install @react-native-ohos/react-native-svg
```
#### **yarn**
```bash
-yarn add @react-native-oh-tpl/react-native-svg
+yarn add @react-native-ohos/react-native-svg
```
-
-下面的代码展示了这个库的基本使用场景:
+The following code shows the basic use scenario of the repository:
-> [!WARNING] 使用时 import 的库名不变。
+> [!WARNING] The name of the imported repository remains unchanged.
```js
import Svg, { Path } from "react-native-svg";
@@ -55,11 +57,14 @@ import Svg, { Path } from "react-native-svg";
## Link
-目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。
+Version >= @react-native-ohos/react-native-svg@15.0.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.
-首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`
+### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project
-### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段
```json
{
@@ -70,43 +75,42 @@ import Svg, { Path } from "react-native-svg";
}
```
-### 2.引入原生端代码
+### 2. Introducing Native Code
-目前有两种方法:
+Currently, two methods are available:
-1. 通过 har 包引入(在 IDE 完善相关功能后该方法会被遗弃,目前首选此方法);
-2. 直接链接源码。
+Method 1 (recommended): Use the HAR file.
-方法一:通过 har 包引入
+> [!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library.
-> [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。
-
-打开 `entry/oh-package.json5`,添加以下依赖
+Open `entry/oh-package.json5` file and add the following dependencies:
```json
"dependencies": {
"@rnoh/react-native-openharmony": "file:../react_native_openharmony",
- "@react-native-oh-tpl/svg": "file:../../node_modules/@react-native-oh-tpl/react-native-svg/harmony/svg.har"
+ "@react-native-ohos/svg": "file:../../node_modules/@react-native-ohos/react-native-svg/harmony/svg.har"
}
```
-点击右上角的 `sync` 按钮
+Click the `sync` button in the upper right corner.
-或者在终端执行:
+Alternatively, run the following instruction on the terminal:
```bash
cd entry
ohpm install
```
-方法二:直接链接源码
+Method 2: Directly link to the source code.
+
+> [!TIP] or details, see [Directly Linking Source Code](/en/link-source-code.md).
-> [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md)
+### 3.Configuring CMakeLists and Introducing SVGPackage
-### 3.配置 CMakeLists 和引入 SVGPackage
+> If you are using version <= 15.0.1, please skip this chapter.
-打开 `entry/src/main/cpp/CMakeLists.txt`,添加:
+Open `entry/src/main/cpp/CMakeLists.txt` and add the following code:
```diff
project(rnapp)
@@ -126,7 +130,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/react-native-svg/src/main/cpp" ./svg)
++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-svg/src/main/cpp" ./svg)
# RNOH_END: manual_package_linking_1
file(GLOB GENERATED_CPP_FILES "./generated/*.cpp")
@@ -144,7 +148,7 @@ target_link_libraries(rnoh_app PUBLIC rnoh_sample_package)
# RNOH_END: link_packages
```
-打开 `entry/src/main/cpp/PackageProvider.cpp`,添加:
+Open `entry/src/main/cpp/PackageProvider.cpp` and add the following code:
```diff
#include "RNOH/PackageProvider.h"
@@ -163,14 +167,14 @@ std::vector> PackageProvider::getPackages(Package::Cont
}
```
-### 4.在 ArkTs 侧引入 SVG 组件
+### 4. Introduce SVG component to ArkTs
-找到 **function buildCustomComponent()**,一般位于 `entry/src/main/ets/pages/index.ets` 或 `entry/src/main/ets/rn/LoadBundle.ets`,添加:
+Find `function buildCustomRNComponent()`, Generally located in `entry/src/main/ets/pages/index.ets ` or `entry/src/main/ets/rn/LoadBundle.ets`, add:
```diff
...
import { createRNPackages } from '../RNPackagesFactory'
-+ import { SVG_VIEW_TYPE_NAME, SVGView } from "@react-native-oh-tpl/svg"
++ import { SVG_VIEW_TYPE_NAME, SVGView } from "@react-native-ohos/svg"
@Builder
function buildCustomComponent(ctx: ComponentBuilderContext) {
@@ -192,9 +196,9 @@ function buildCustomComponent(ctx: ComponentBuilderContext) {
...
```
-> [!TIP] 本库使用了混合方案,需要添加组件名。
+> [!TIP] If the repository uses a mixed solution, the component name needs to be added.
-在`entry/src/main/ets/pages/index.ets` 或 `entry/src/main/ets/rn/LoadBundle.ets` 找到常量 `arkTsComponentNames` 在其数组里添加组件名
+Find the constant `arkTsComponentNames` in `entry/src/main/ets/pages/index.ets` or `entry/src/main/ets/rn/LoadBundle.ets` and add the component name to the array.
```diff
const arkTsComponentNames: Array = [
@@ -203,26 +207,30 @@ const arkTsComponentNames: Array = [
];
```
-### 5.运行
+### 5. Running
-点击右上角的 `sync` 按钮
+Click the `sync` button in the upper right corner.
-或者在终端执行:
+Alternatively, run the following instruction on the terminal:
```bash
cd entry
ohpm install
```
-然后编译、运行即可。
+Then build and run the code.
+
+## Constraints
-## 约束与限制
+### 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.
-要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
+Verified in the following versions.
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-svg Releases](https://github.com/react-native-oh-library/react-native-svg/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;
## 属性
diff --git a/en/react-native-system-setting.md b/en/react-native-system-setting.md
index 73daaa46915a1ca53a678123b96be243823fcf70..9055c3bde52251f3fd09c16f576b3c2feb0140c2 100644
--- a/en/react-native-system-setting.md
+++ b/en/react-native-system-setting.md
@@ -17,10 +17,17 @@
## Installation and Usage
-Find the matching version information in the release address of a third-party library: [@react-native-oh-library/react-native-system-setting Releases](https://github.com/react-native-oh-library/react-native-system-setting/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.
+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 |
+| ---------- | ------------------------------------------------------------ | ---------- |
+| <= 1.7.6-0.0.1@deprecated | [@react-native-oh-tpl/react-native-system-setting Releases(deprecated)](https://github.com/react-native-oh-library/react-native-system-setting/releases) | 0.72 |
+| 1.7.7 | [@react-native-ohos/react-native-system-setting Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-system-setting/releases) | 0.72 |
+| 1.8.0 | [@react-native-ohos/react-native-system-setting Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-system-setting/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.
+Go to the project directory and execute the following instruction:
@@ -28,13 +35,13 @@ Go to the project directory and execute the following instruction:
#### npm
```bash
-npm install @react-native-oh-tpl/react-native-system-setting
+npm install @react-native-ohos/react-native-system-setting
```
#### yarn
```bash
-yarn add @react-native-oh-tpl/react-native-system-setting
+yarn add @react-native-ohos/react-native-system-setting
```
@@ -162,14 +169,20 @@ export default SystemSettingDemo;
## Use Codegen
+Version >= @react-native-ohos/react-native-system-setting@1.7.7, 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-system-setting@1.7.7 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.
+
### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project
```json
@@ -194,7 +207,7 @@ Open `entry/oh-package.json5` file and add the following dependencies:
```json
"dependencies": {
"@rnoh/react-native-openharmony": "file:../react_native_openharmony",
- "@react-native-oh-tpl/react-native-system-setting": "../../node_modules/@react-native-oh-tpl/react-native-system-setting/harmony/react_native_system_setting.har"
+ "@react-native-ohos/react-native-system-setting": "../../node_modules/@react-native-ohos/react-native-system-setting/harmony/react_native_system_setting.har"
}
```
@@ -217,7 +230,7 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co
```diff
...
-+ import { RNSystemSettingPackage } from '@react-native-oh-tpl/react-native-system-setting/ts';
++ import { RNSystemSettingPackage } from '@react-native-ohos/react-native-system-setting/ts';
export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
return [
@@ -227,7 +240,63 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
}
```
-### 4. Running
+### 4. Configuring CMakeLists and Introducing RNSystemSettingPackage
+> If you are using version <= 1.7.6-0.0.1, please skip this chapter.
+
+```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_MODULE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules")
+set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules/@rnoh/react-native-openharmony/src/main/cpp")
+set(RNOH_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/generated")
+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(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules")
+
+set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use
+add_compile_definitions(WITH_HITRACE_SYSTRACE)
+
+# (VM) Define a variable and assign it to the current module's cpp directory
+set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
+
+# Add the Header File directory, including cpp, cpp/include, and tell cmake to find the Header Files introduced by the code here
+include_directories(${NATIVERENDER_ROOT_PATH}
+ ${NATIVERENDER_ROOT_PATH}/include)
+
+add_subdirectory("${RNOH_CPP_DIR}" ./rn)
++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-system-setting/src/main/cpp" ./system-setting)
+
+file(GLOB GENERATED_CPP_FILES "${CMAKE_CURRENT_SOURCE_DIR}/generated/*.cpp") # this line is needed by codegen v1
+
+add_library(rnoh_app SHARED
+ ${GENERATED_CPP_FILES}
+ "./PackageProvider.cpp"
+ "${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp"
+)
+target_link_libraries(rnoh_app PUBLIC rnoh)
++ target_link_libraries(rnoh_app PUBLIC rnoh_system_setting)
+```
+
+Open `entry/src/main/cpp/PackageProvider.cpp` and add the following code:
+
+```diff
+#include "RNOH/PackageProvider.h"
++ #include "RNSystemSettingPackage.h"
+using namespace rnoh;
+
+std::vector> PackageProvider::getPackages(Package::Context ctx)
+{
+ return {
++ std::make_shared(ctx)
+ };
+}
+```
+
+### 5. Running
Click the `sync` button in the upper right corner.
@@ -246,7 +315,12 @@ 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.
-Check the release version information in the release address of the third-party library: [@react-native-oh-library/react-native-system-setting Releases](https://github.com/react-native-oh-library/react-native-system-setting/releases)。
+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;
+
### Permission Requirements
diff --git a/en/react-native-version-number.md b/en/react-native-version-number.md
index 2cd619e7ae3855b32f2c90deb04396ec50f08026..8746000657342396fee4f9b74463bb40afa7cd2c 100644
--- a/en/react-native-version-number.md
+++ b/en/react-native-version-number.md
@@ -18,10 +18,17 @@
## Installation and Usage
-Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-version-number Releases](https://github.com/react-native-oh-library/react-native-version-number/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.
+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 |
+| ---------- | ------------------------------------------------------------ | ---------- |
+| <= 0.3.6-0.0.1@deprecated | [@react-native-oh-tpl/react-native-version-number Releases(deprecated)](https://github.com/react-native-oh-library/react-native-version-number/releases) | 0.72 |
+| 0.3.7 | [@react-native-ohos/react-native-version-number Releases](https://github.com/react-native-oh-library/react-native-version-number/releases) | 0.72 |
+| 0.4.0 | [@react-native-ohos/react-native-version-number Releases](https://github.com/react-native-oh-library/react-native-version-number/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.
+Go to the project directory and execute the following instruction:
@@ -29,13 +36,13 @@ Go to the project directory and execute the following instruction:
#### **npm**
```bash
-npm install @react-native-oh-tpl/react-native-version-number
+npm install @react-native-ohos/react-native-version-number
```
#### **yarn**
```bash
-yarn add @react-native-oh-tpl/react-native-version-number
+yarn add @react-native-ohos/react-native-version-number
```
@@ -61,11 +68,14 @@ export default function () {
## 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-version-number@0.3.7, 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-version-number@0.3.7, 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.
@@ -94,7 +104,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/react-native-version-number": "file:../../node_modules/@react-native-oh-tpl/react-native-version-number/harmony/rnoh_version_number.har"
+ "@react-native-ohos/react-native-version-number": "file:../../node_modules/@react-native-ohos/react-native-version-number/harmony/rnoh_version_number.har"
}
```
@@ -117,7 +127,7 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co
```diff
...
-+ import {RNVersionNumberPackage} from '@react-native-oh-tpl/react-native-version-number/ts';
++ import {RNVersionNumberPackage} from '@react-native-ohos/react-native-version-number/ts';
export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
return [
@@ -127,7 +137,55 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
}
```
-### 4. Running
+### 4. Configuring CMakeLists and Introducing RTNCameraKitPackage
+
+> If you are using version <= 0.3.6-0.0.1, 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(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
++ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules")
+set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp")
+
+add_subdirectory("${RNOH_CPP_DIR}" ./rn)
+
+# RNOH_END: manual_package_linking_1
+add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package)
++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-version-number/src/main/cpp" ./rnoh_version_number)
+# RNOH_END: manual_package_linking_1
+
+add_library(rnoh_app SHARED
+ "./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_version_number)
+# RNOH_BEGIN: manual_package_linking_2
+```
+Open `entry/src/main/cpp/PackageProvider.cpp` and add the following code:
+
+```diff
+#include "RNOH/PackageProvider.h"
++ #include "RNVersionNumberPackage.h"
+
+using namespace rnoh;
+
+std::vector> PackageProvider::getPackages(Package::Context ctx) {
+ return {
++ std::make_shared(ctx)
+}
+```
+
+### 5. Running
Click the `sync` button in the upper right corner.
@@ -146,7 +204,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.
-Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-version-number Releases](https://github.com/react-native-oh-library/react-native-version-number/releases)
+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;
## API
diff --git a/en/react-native-zip-archive.md b/en/react-native-zip-archive.md
index 7159185fa76364c847b548b03eead1da3512363f..58ba46c1e844edb98b46ecaf0dd5bf8144b9a612 100644
--- a/en/react-native-zip-archive.md
+++ b/en/react-native-zip-archive.md
@@ -15,16 +15,18 @@
> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-zip-archive)
+## Installation and Usage
+
Please refer to the Releases page of the third-party library for the corresponding version information:
| Third-party Library Version | Release Information | Supported RN Version |
| ---------- | ------------------------------------------------------------ | ---------- |
-| 7.0.0 | [@react-native-oh-tpl/react-native-zip-archive Releases](https://github.com/react-native-oh-library/react-native-zip-archive/releases) | 0.72 |
-| 7.1.0 | [@react-native-ohos/react-native-zip-archive Releases]() | 0.77 |
+| <= 6.1.1-0.1.0@deprecated | [@react-native-oh-tpl/react-native-zip-archive Releases(deprecated)](https://github.com/react-native-oh-library/react-native-zip-archive/releases) | 0.72 |
+| 6.1.2 | [@react-native-ohos/react-native-zip-archive Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-zip-archive/releases) | 0.72 |
+| 7.1.0 | [@react-native-ohos/react-native-zip-archive Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-zip-archive/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.
-## Installation and Usage
Go to the project directory and execute the following instruction:
@@ -33,20 +35,14 @@ Go to the project directory and execute the following instruction:
#### **npm**
```bash
-# 0.72
-npm install @react-native-oh-tpl/react-native-zip-archive
-# 0.77
npm install @react-native-ohos/react-native-zip-archive
```
#### **yarn**
```bash
-# 0.72
-yarn add @react-native-oh-tpl/react-native-zip-archive
-# 0.77
yarn add @react-native-ohos/react-native-zip-archive
```
@@ -409,13 +405,15 @@ const styles = StyleSheet.create({
## Use Codegen
-> [!TIP] V7.0.0 does not require executing Codegen.
+Version >= @react-native-ohos/react-native-zip-archive@6.1.2, compatible with codegen-lib for generating bridge code.
-This library has adapted Codegen, and before using it, you need to actively execute the generation of third-party library bridge code. For details, please refer to[Codegen Usage Document](/zh-cn/codegen.md)。
+This library has adapted Codegen, and before using it, you need to actively execute the generation of third-party library bridge code. For details, please refer to[Codegen Usage Document](/en/codegen.md).
## Link
-Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking.
+Version >= @react-native-ohos/react-native-zip-archive@6.1.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.
@@ -440,16 +438,6 @@ Method 1 (recommended): Use the HAR file.
Open `entry/oh-package.json5` file and add the following dependencies:
-- 0.72
-
-```json
-"dependencies": {
- "@rnoh/react-native-openharmony": "file:../react_native_openharmony",
-+ "@react-native-oh-tpl/react-native-zip-archive": "file:../../node_modules/@react-native-oh-tpl/react-native-zip-archive/harmony/zipArchive_package.har"
- }
-```
-
-- 0.77
```json
"dependencies": {
@@ -473,6 +461,8 @@ Method 2: Directly link to the source code.
### 3. CMakeLists and Introducing zipArchive Package
+> If you are using version <= 6.1.1-0.1.0, please skip this chapter.
+
Open `entry/src/main/cpp/CMakeLists.txt` and add the following code:
```diff
@@ -484,7 +474,7 @@ 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")
-# 0.77
+
+ set(ZIP_ARCHIVE_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules/@react-native-ohos/react-native-zip-archive/src/main/cpp")
set(LOG_VERBOSITY_LEVEL 1)
@@ -498,18 +488,12 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn)
# RNOH_BEGIN: manual_package_linking_1
add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package)
-# 0.72
-+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-zip-archive/src/main/cpp" ./zipArchive-package)
-# 0.77
+ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-zip-archive/src/main/cpp" ./zipArchive-package)
# RNOH_END: manual_package_linking_1
-# 0.72
-file(GLOB GENERATED_CPP_FILES "./generated/*.cpp")
-# 0.77
+ file(GLOB ZIP_ARCHIVE_GENERATED_CPP_FILES "${ZIP_ARCHIVE_CPP_DIR}/generated/*.cpp")
add_library(rnoh_app SHARED
@@ -519,7 +503,7 @@ add_library(rnoh_app SHARED
"${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp"
)
-# 0.77
+
+ target_include_directories(rnoh_app PUBLIC ${ZIP_ARCHIVE_CPP_DIR})
target_link_libraries(rnoh_app PUBLIC rnoh)
@@ -551,10 +535,7 @@ std::vector> PackageProvider::getPackages(Package::Cont
Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code:
```diff
-// 0.72
-+ import {ZipArchivePackage} from '@react-native-oh-tpl/react-native-zip-archive/ts';
-// 0.77
+ import {ZipArchivePackage} from '@react-native-ohos/react-native-zip-archive/ts';
export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
@@ -582,10 +563,13 @@ Then build and run the code.
### Compatibility
-This document is verified based on the following versions:
+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.
-1. RNOH: 0.72.20; SDK: HarmonyOS NEXT Developer Beta1; IDE: DevEco Studio 5.0.3.200; ROM: 3.0.0.18;
-2. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.868; 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;
## API
diff --git a/zh-cn/react-native-haptic-feedback.md b/zh-cn/react-native-haptic-feedback.md
index de7b885d37fcf76f52bad7266ccf8b3d0a3d98ac..7da2c9876ff477c778dd7ad01823fbf0f3faae22 100644
--- a/zh-cn/react-native-haptic-feedback.md
+++ b/zh-cn/react-native-haptic-feedback.md
@@ -184,7 +184,7 @@ ohpm install
### 3.配置 CMakeLists 和引入 RNHapticFeedbackPackage
-> 若使用的是 2.2.1 版本,请跳过本章。
+> 若使用的是 <= 2.2.1 版本,请跳过本章。
打开 `entry/src/main/cpp/CMakeLists.txt`,添加:
diff --git a/zh-cn/react-native-skia.md b/zh-cn/react-native-skia.md
index 8ec93207263941efcd4d9025a96941b0e965078d..979992600448c00f97fd827b95270abed8585a9d 100644
--- a/zh-cn/react-native-skia.md
+++ b/zh-cn/react-native-skia.md
@@ -15,37 +15,35 @@
> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-skia)
-| Version | Package Name | Repository | Release | Version for RN |
-| ------------------------------ | ---------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ---------- |
-| 1.3.8 | @react-native-oh-tpl/react-native-skia | [Github](https://github.com/react-native-oh-library/react-native-skia) | [Github Releases](https://github.com/react-native-oh-library/react-native-skia/releases) | 0.72 |
-| 1.4.0 | @react-native-ohos/react-native-skia | [Github](https://github.com/react-native-oh-library/react-native-skia) | [Github Releases](https://github.com/react-native-oh-library/react-native-skia/releases) | 0.77 |
-对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
+## 安装与使用
+请到三方库的 Releases 发布地址查看配套的版本信息:
-## 安装与使用
+| 三方库版本 | 发布信息 | 支持RN版本 |
+| ---------- | ------------------------------------------------------------ | ---------- |
+| <= 1.3.8@deprecated | [@react-native-oh-tpl/react-native-skia Releases(deprecated)](https://github.com/react-native-oh-library/react-native-skia/releases) | 0.72 |
+| 1.3.9 | [@react-native-ohos/react-native-skia Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-skia/releases) | 0.72 |
+| 1.4.0 | [@react-native-ohos/react-native-skia Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-skia/releases) | 0.77 |
+
+对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
进入到工程目录并输入以下命令:
+
#### **npm**
```bash
-# RN0.72
-npm install @react-native-oh-tpl/react-native-skia
-# RN0.77
npm install @react-native-ohos/react-native-skia
```
#### **yarn**
```bash
-# RN0.72
-yarn add @react-native-oh-tpl/react-native-skia
-# RN0.77
yarn add @react-native-ohos/react-native-skia
```
@@ -79,7 +77,9 @@ export default App;
## Link
-目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。
+Version >= @react-native-ohos/react-native-skia@1.3.9,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md
+
+此步骤为手动配置原生依赖项的指导。
首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`
@@ -107,16 +107,6 @@ export default App;
打开 `entry/oh-package.json5`,添加以下依赖
-- RN0.72
-
-```json
-"dependencies": {
- "@rnoh/react-native-openharmony": "file:../react_native_openharmony",
- "@react-native-oh-tpl/react-native-skia": "file:../../node_modules/@react-native-oh-tpl/react-native-skia/harmony/skia.har"
- }
-```
-
-- RN0.77
```json
"dependencies": {
@@ -140,6 +130,8 @@ ohpm install
### 3.配置 CMakeLists 和引入 SkiaPackage
+> 若使用的是 <= 1.3.8 版本,请跳过本章。
+
打开 `entry/src/main/cpp/CMakeLists.txt`,添加:
```diff
@@ -161,10 +153,6 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn)
# RNOH_BEGIN: manual_package_linking_1
add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package)
-# RN0.72
-+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-skia/src/main/cpp" ./skia)
-
-# RN0.77
+ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-skia/src/main/cpp" ./skia)
# RNOH_END: manual_package_linking_1
@@ -209,10 +197,7 @@ std::vector> PackageProvider::getPackages(Package::Cont
```diff
...
-// RN0.72
-+ import { RNCSkiaDomView, SKIA_DOM_VIEW_TYPE } from '@react-native-oh-tpl/react-native-skia';
-// RN0.77
+ import { RNCSkiaDomView, SKIA_DOM_VIEW_TYPE } from '@react-native-ohos/react-native-skia';
@Builder
@@ -248,10 +233,7 @@ const arkTsComponentNames: Array = [
```diff
...
-// RN0.72
-+ import {RNSkiaPackage} from '@react-native-oh-tpl/react-native-skia/ts';
-// RN0.77
+ import {RNSkiaPackage} from '@react-native-ohos/react-native-skia/ts';
export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
@@ -279,16 +261,14 @@ ohpm install
### 兼容性
-要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
-
-在下述版本验证通过:
-1. RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Beta1; IDE:DevEco Studio 5.0.3.200; ROM:3.0.0.18;
-2. RNOH:0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.868; ROM: 6.0.0.112;
+要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
-> [!TIP] [skia 官方文档](https://shopify.github.io/react-native-skia/docs/getting-started/installation)
+在以下版本验证通过:
-> [!TIP] 使用此库需要配置 [@react-native-oh-tpl/react-native-reanimated](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-reanimated.md)
+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-svg.md b/zh-cn/react-native-svg.md
index 459e3d1cda09275a06979b548a40767816ccb589..be689d56c1b71c8d62b67ab4ddfb1d82b7d76e60 100644
--- a/zh-cn/react-native-svg.md
+++ b/zh-cn/react-native-svg.md
@@ -12,15 +12,19 @@
-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-svg)
+> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-harmony-svg)
## 安装与使用
-> [!TIP] 本项目为 react-native-svg 的ArkTs版本,现已停止维护。
+请到三方库的 Releases 发布地址查看配套的版本信息:
-> [!TIP] 如需继续使用请移步至[react-native-svg-capi](/zh-cn/react-native-svg-capi.md) 使用CAPI版本的 react-native-svg。
+| 三方库版本 | 发布信息 | 支持RN版本 |
+| ---------- | ------------------------------------------------------------ | ---------- |
+| <= 15.0.1@deprecated | [@react-native-oh-tpl/react-native-svg Releases(deprecated)](https://github.com/react-native-oh-library/react-native-harmony-svg/releases) | 0.72 |
+| 15.0.2 | [@react-native-ohos/react-native-svg Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-svg/releases) | 0.72 |
+| 15.12.1 | [@react-native-ohos/react-native-svg Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-svg/releases) | 0.77 |
-请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-svg Releases](https://github.com/react-native-oh-library/react-native-svg/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
+对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
进入到工程目录并输入以下命令:
@@ -29,13 +33,13 @@
#### **npm**
```bash
-npm install @react-native-oh-tpl/react-native-svg
+npm install @react-native-ohos/react-native-svg
```
#### **yarn**
```bash
-yarn add @react-native-oh-tpl/react-native-svg
+yarn add @react-native-ohos/react-native-svg
```
@@ -54,7 +58,10 @@ import Svg, { Path } from "react-native-svg";
## Link
-目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。
+
+Version >= @react-native-ohos/react-native-svg@15.0.2,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md
+
+此步骤为手动配置原生依赖项的指导。
首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`
@@ -86,7 +93,7 @@ import Svg, { Path } from "react-native-svg";
"dependencies": {
"@rnoh/react-native-openharmony": "file:../react_native_openharmony",
- "@react-native-oh-tpl/svg": "file:../../node_modules/@react-native-oh-tpl/react-native-svg/harmony/svg.har"
+ "@react-native-ohos/svg": "file:../../node_modules/@react-native-ohos/react-native-svg/harmony/svg.har"
}
```
@@ -105,6 +112,8 @@ ohpm install
### 3.配置 CMakeLists 和引入 SVGPackage
+> 若使用的是 <= 15.0.1 版本,请跳过本章。
+
打开 `entry/src/main/cpp/CMakeLists.txt`,添加:
```diff
@@ -125,7 +134,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/react-native-svg/src/main/cpp" ./svg)
++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-svg/src/main/cpp" ./svg)
# RNOH_END: manual_package_linking_1
file(GLOB GENERATED_CPP_FILES "./generated/*.cpp")
@@ -169,7 +178,7 @@ std::vector> PackageProvider::getPackages(Package::Cont
```diff
...
import { createRNPackages } from '../RNPackagesFactory'
-+ import { SVG_VIEW_TYPE_NAME, SVGView } from "@react-native-oh-tpl/svg"
++ import { SVG_VIEW_TYPE_NAME, SVGView } from "@react-native-ohos/svg"
@Builder
function buildCustomComponent(ctx: ComponentBuilderContext) {
@@ -221,7 +230,11 @@ ohpm install
要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-svg Releases](https://github.com/react-native-oh-library/react-native-svg/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;
## 属性
diff --git a/zh-cn/react-native-system-setting.md b/zh-cn/react-native-system-setting.md
index ca09561dae920c9c0678108831686048e96ea2a9..61882de971ee281756ded1aad2960926b068de71 100644
--- a/zh-cn/react-native-system-setting.md
+++ b/zh-cn/react-native-system-setting.md
@@ -24,8 +24,9 @@
| 三方库版本 | 发布信息 | 支持RN版本 |
| ---------- | ------------------------------------------------------------ | ---------- |
-| 1.7.6 | [@react-native-oh-library/react-native-system-setting Releases](https://github.com/react-native-oh-library/react-native-system-setting/releases) | 0.72 |
-| 1.7.6 | [@react-native-oh-library/react-native-system-setting Releases]() | 0.77 |
+| <= 1.7.6-0.0.1@deprecated | [@react-native-oh-tpl/react-native-system-setting Releases(deprecated)](https://github.com/react-native-oh-library/react-native-system-setting/releases) | 0.72 |
+| 1.7.7 | [@react-native-ohos/react-native-system-setting Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-system-setting/releases) | 0.72 |
+| 1.8.0 | [@react-native-ohos/react-native-system-setting Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-system-setting/releases) | 0.77 |
对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
@@ -37,20 +38,14 @@
#### npm
```bash
-# V1.7.6 for RN0.72
-npm install @react-native-oh-tpl/react-native-system-setting
-# V1.7.6 for RN0.77
npm install @react-native-ohos/react-native-system-setting
```
#### yarn
```bash
-# V1.7.6 for RN0.72
-yarn add @react-native-oh-tpl/react-native-system-setting
-# V1.7.6 for RN0.77
yarn add @react-native-ohos/react-native-system-setting
```
@@ -174,13 +169,15 @@ export default SystemSettingDemo
## 使用 Codegen
-> [!TIP] V1.7.6 for RN0.77 不需要执行 Codegen。
+Version >= @react-native-ohos/react-native-system-setting@1.7.7,已适配codegen-lib生成桥接代码。
本库已经适配了 Codegen ,在使用前需要主动执行生成三方库桥接代码,详细请参考 [Codegen 文档](/zh-cn/codegen.md)。
## Link
-目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。
+Version >= @react-native-ohos/react-native-system-setting@1.7.7,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md
+
+此步骤为手动配置原生依赖项的指导。
首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`
@@ -208,16 +205,6 @@ export default SystemSettingDemo
打开 `entry/oh-package.json5`,添加以下依赖
-- V1.7.6 for RN0.72
-
-```json
-"dependencies": {
- "@rnoh/react-native-openharmony": "file:../react_native_openharmony",
- "@react-native-oh-tpl/react-native-system-setting": "../../node_modules/@react-native-oh-tpl/react-native-system-setting/harmony/react_native_system_setting.har"
- }
-```
-
-- V1.7.6 for RN0.77
```json
"dependencies": {
@@ -241,7 +228,7 @@ ohpm install
### 3.配置CMakeLists和引入RNSystemSettingPackage
->注:仅V1.7.6 for RN0.77需要配置CMakeLists和引入RNSystemSettingPackage
+> 若使用的是 <= 1.7.6-0.0.1 版本,请跳过本章。
```diff
project(rnapp)
@@ -301,11 +288,7 @@ std::vector> PackageProvider::getPackages(Package::Cont
打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加:
```diff
- ...
-// V1.7.6 for RN0.72
-+ import { RNSystemSettingPackage } from '@react-native-oh-tpl/react-native-system-setting/ts';
-// V1.7.6 for RN0.77
+ import { RNSystemSettingPackage } from '@react-native-ohos/react-native-system-setting/ts';
export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
@@ -335,13 +318,11 @@ ohpm install
要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:
-
-| 三方库版本 | 发布信息 | 支持RN版本 |
-| ---------- | ------------------------------------------------------------ | ---------- |
-| 1.7.6 | [@react-native-oh-library/react-native-system-setting Releases](https://github.com/react-native-oh-library/react-native-system-setting/releases) | 0.72 |
-| 1.7.6 | [@react-native-oh-library/react-native-system-setting 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;
### 权限要求
由于此库涉及蓝牙、亮度等系统控制功能,使用对应接口时则需要配置对应的权限,权限需配置在entry/src/main目录下module.json5文件中。其中部分权限需弹窗向用户申请授权。具体权限配置见文档:[程序访问控制](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/security/AccessToken/Readme-CN.md#/openharmony/docs/blob/master/zh-cn/application-dev/security/AccessToken/app-permission-mgmt-overview.md)。
diff --git a/zh-cn/react-native-version-number.md b/zh-cn/react-native-version-number.md
index 48f8a62026500c8eba79c38e5a84a232d70327eb..26bc5608bd00075f29769172908f77759ef75fad 100644
--- a/zh-cn/react-native-version-number.md
+++ b/zh-cn/react-native-version-number.md
@@ -18,22 +18,33 @@
## 安装与使用
-请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-version-number Releases](https://github.com/react-native-oh-library/react-native-version-number/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
+
+请到三方库的 Releases 发布地址查看配套的版本信息:
+
+| 三方库版本 | 发布信息 | 支持RN版本 |
+| ---------- | ------------------------------------------------------------ | ---------- |
+| <= 0.3.6-0.0.1@deprecated | [@react-native-oh-tpl/react-native-version-number Releases(deprecated)](https://github.com/react-native-oh-library/react-native-version-number/releases) | 0.72 |
+| 0.3.7 | [@react-native-ohos/react-native-version-number Releases](https://github.com/react-native-oh-library/react-native-version-number/releases) | 0.72 |
+| 0.4.0 | [@react-native-ohos/react-native-version-number Releases](https://github.com/react-native-oh-library/react-native-version-number/releases) | 0.77 |
+
+对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
进入到工程目录并输入以下命令:
+
+
#### **npm**
```bash
-npm install @react-native-oh-tpl/react-native-version-number
+npm install @react-native-ohos/react-native-version-number
```
#### **yarn**
```bash
-yarn add @react-native-oh-tpl/react-native-version-number
+yarn add @react-native-ohos/react-native-version-number
```
@@ -59,11 +70,15 @@ export default function () {
## 使用 Codegen
+Version >= @react-native-ohos/react-native-version-number@0.3.7,已适配codegen-lib生成桥接代码。
+
本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。
## Link
-目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。
+Version >= @react-native-ohos/react-native-version-number@0.3.7,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md
+
+此步骤为手动配置原生依赖项的指导。
首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`
@@ -95,7 +110,7 @@ export default function () {
"dependencies": {
"@rnoh/react-native-openharmony": "file:../react_native_openharmony",
- "@react-native-oh-tpl/react-native-version-number": "file:../../node_modules/@react-native-oh-tpl/react-native-version-number/harmony/rnoh_version_number.har"
+ "@react-native-ohos/react-native-version-number": "file:../../node_modules/@react-native-ohos/react-native-version-number/harmony/rnoh_version_number.har"
}
```
@@ -118,7 +133,7 @@ ohpm install
```diff
...
-+ import {RNVersionNumberPackage} from '@react-native-oh-tpl/react-native-version-number/ts';
++ import {RNVersionNumberPackage} from '@react-native-ohos/react-native-version-number/ts';
export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
return [
@@ -128,7 +143,59 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
}
```
-### 4.运行
+
+### 4.配置 CMakeLists 和引入 RNVersionNumberPackage
+
+> 若使用的是 <= 0.3.6-0.0.1 版本,请跳过本章。
+
+打开 `entry/src/main/cpp/CMakeLists.txt`,添加:
+
+```diff
+...
+
+project(rnapp)
+cmake_minimum_required(VERSION 3.4.1)
+set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
++ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules")
+set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp")
+
+add_subdirectory("${RNOH_CPP_DIR}" ./rn)
+
+# RNOH_END: manual_package_linking_1
+add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package)
++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-version-number/src/main/cpp" ./rnoh_version_number)
+# RNOH_END: manual_package_linking_1
+
+add_library(rnoh_app SHARED
+ "./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_version_number)
+# RNOH_BEGIN: manual_package_linking_2
+```
+
+打开 `entry/src/main/cpp/PackageProvider.cpp`,添加:
+
+```diff
+#include "RNOH/PackageProvider.h"
++ #include "RNVersionNumberPackage.h"
+
+using namespace rnoh;
+
+std::vector> PackageProvider::getPackages(Package::Context ctx) {
+ return {
++ std::make_shared(ctx)
+}
+```
+
+
+
+### 5.运行
点击右上角的 `sync` 按钮
@@ -147,7 +214,11 @@ ohpm install
要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-version-number Releases](https://github.com/react-native-oh-library/react-native-version-number/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;
## API
diff --git a/zh-cn/react-native-zip-archive.md b/zh-cn/react-native-zip-archive.md
index ef30591714a4e733f95d385da205218d2f55d6a6..e1851e717181abadbc75b5bf1befbc1fb38faf77 100644
--- a/zh-cn/react-native-zip-archive.md
+++ b/zh-cn/react-native-zip-archive.md
@@ -15,16 +15,19 @@
> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-zip-archive)
+## 安装与使用
+
请到三方库的 Releases 发布地址查看配套的版本信息:
-| 三方库版本 | 发布信息 | 支持RN版本 |
-| ---------- | ------------------------------------------------------------ | ---------- |
-| 7.0.0 | [@react-native-oh-tpl/react-native-zip-archive Releases](https://github.com/react-native-oh-library/react-native-zip-archive/releases) | 0.72 |
-| 7.1.0 | [@react-native-ohos/react-native-zip-archive Releases]() | 0.77 |
+| 三方库版本 | 发布信息 | 支持RN版本 |
+|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| ---------- |
+| <= 6.1.1-0.1.0@deprecated | [@react-native-oh-tpl/react-native-zip-archive Releases(deprecated)](https://github.com/react-native-oh-library/react-native-zip-archive/releases) | 0.72 |
+| 6.1.2 | [@react-native-ohos/react-native-zip-archive Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-zip-archive/releases) | 0.72 |
+| 7.1.0 | [@react-native-ohos/react-native-zip-archive Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-zip-archive/releases) | 0.77 |
对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
-## 安装与使用
+
进入到工程目录并输入以下命令:
@@ -32,23 +35,15 @@
#### **npm**
-#### **npm**
-
```bash
-# 0.72
-npm install @react-native-oh-tpl/react-native-zip-archive
-# 0.77
npm install @react-native-ohos/react-native-zip-archive
```
#### **yarn**
```bash
-# 0.72
-yarn add @react-native-oh-tpl/react-native-zip-archive
-# 0.77
yarn add @react-native-ohos/react-native-zip-archive
```
@@ -419,13 +414,15 @@ const styles = StyleSheet.create({
## 使用 Codegen
-> [!TIP] V7.0.0不需要执行Codegen。
+Version >= @react-native-ohos/react-native-zip-archive@6.1.2,已适配codegen-lib生成桥接代码。
本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。
## Link
-目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。
+Version >= @react-native-ohos/react-native-zip-archive@6.1.2,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md
+
+此步骤为手动配置原生依赖项的指导。
首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`
@@ -453,16 +450,7 @@ const styles = StyleSheet.create({
打开 `entry/oh-package.json5`,添加以下依赖
-- 0.72
-```json
-"dependencies": {
- "@rnoh/react-native-openharmony": "file:../react_native_openharmony",
-+ "@react-native-oh-tpl/react-native-zip-archive": "file:../../node_modules/@react-native-oh-tpl/react-native-zip-archive/harmony/zipArchive_package.har"
- }
-```
-
-- 0.77
```json
"dependencies": {
@@ -486,6 +474,8 @@ ohpm install
### 3.配置 CMakeLists 和引入zipArchive
+> 若使用的是 <= 6.1.1-0.1.0 版本,请跳过本章。
+
打开 `entry/src/main/cpp/CMakeLists.txt`,添加:
```diff
@@ -497,7 +487,7 @@ 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")
-# 0.77
+
+ set(ZIP_ARCHIVE_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules/@react-native-ohos/react-native-zip-archive/src/main/cpp")
set(LOG_VERBOSITY_LEVEL 1)
@@ -511,18 +501,10 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn)
# RNOH_BEGIN: manual_package_linking_1
add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package)
-# 0.72
-+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-zip-archive/src/main/cpp" ./zipArchive-package)
-
-# 0.77
+ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-zip-archive/src/main/cpp" ./zipArchive-package)
# RNOH_END: manual_package_linking_1
-# 0.72
-file(GLOB GENERATED_CPP_FILES "./generated/*.cpp")
-
-# 0.77
+ file(GLOB ZIP_ARCHIVE_GENERATED_CPP_FILES "${ZIP_ARCHIVE_CPP_DIR}/generated/*.cpp")
add_library(rnoh_app SHARED
@@ -532,7 +514,7 @@ add_library(rnoh_app SHARED
"${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp"
)
-# 0.77
+
+ target_include_directories(rnoh_app PUBLIC ${ZIP_ARCHIVE_CPP_DIR})
target_link_libraries(rnoh_app PUBLIC rnoh)
@@ -564,10 +546,6 @@ std::vector> PackageProvider::getPackages(Package::Cont
打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加:
```diff
-// 0.72
-+ import {ZipArchivePackage} from '@react-native-oh-tpl/react-native-zip-archive/ts';
-
-// 0.77
+ import {ZipArchivePackage} from '@react-native-ohos/react-native-zip-archive/ts';
export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
@@ -595,10 +573,14 @@ ohpm install
### 兼容性
-本文档内容基于以下版本验证通过:
+要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
+
+在以下版本验证通过:
+
+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;
-1. RNOH: 0.72.20; SDK: HarmonyOS NEXT Developer Beta1; IDE: DevEco Studio 5.0.3.200; ROM: 3.0.0.18;
-2. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.868; ROM: 6.0.0.112;
## API