diff --git a/en/bam-tech-react-native-image-resizer.md b/en/bam-tech-react-native-image-resizer.md index 2cab0a1e8432e4e360ac3b61aedd15e08b070fb2..6f53fd7da6ccfbf40c73d62d8e1b91852c87a979 100644 --- a/en/bam-tech-react-native-image-resizer.md +++ b/en/bam-tech-react-native-image-resizer.md @@ -15,14 +15,17 @@ > [!TIP] [Github address](https://github.com/react-native-oh-library/react-native-image-resizer) -Please go to the Releases page of the third-party library to check the compatible version information: +## Installation and Usage -| Version | Package Name | Repository | Release | RN Version | -| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ---------- | -| 3.0.9 | @react-native-oh-tpl/react-native-image-resizer | [Github](https://github.com/react-native-oh-library/react-native-image-resizer) | [Github Releases](https://github.com/react-native-oh-library/react-native-image-resizer/releases) | 0.72 | -| 3.1.0 | @react-native-ohos/react-native-image-resizer | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-image-resizer) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-image-resizer/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 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 3.0.9@deprecated | [@react-native-oh-tpl/react-native-image-resizer Releases(deprecated)](https://github.com/react-native-oh-library/react-native-image-resizer/releases) | 0.72 | +| 3.0.10 | [@react-native-ohos/react-native-image-resizer Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-image-resizer/releases) | 0.72 | +| 3.1.0 | [@react-native-ohos/react-native-image-resizer Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-image-resizer/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and enter the following command: @@ -31,20 +34,12 @@ Go to the project directory and enter the following command: #### **npm** ```bash -# 0.72 -npm install @react-native-oh-tpl/react-native-image-resizer - -# 0.77 npm install @react-native-ohos/react-native-image-resizer ``` #### **yarn** ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-image-resizer - -# 0.77 yarn add @react-native-ohos/react-native-image-resizer ``` @@ -283,13 +278,16 @@ export default ImageResizerDemo; ## Use Codegen -> [!TIP] 0.77 does not require Codegen +Version >= @react-native-ohos/react-native-image-resizer@3.0.10, compatible with codegen-lib for generating bridge code. This library has been adapted for `Codegen`. Before using it, you need to proactively generate the bridge code for the third-party library. For details, please refer to the [Codegen Usage Documentation](/en/codegen.md). ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-image-resizer@3.0.10 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. First, use DevEco Studio to open the HarmonyOS project `harmony` in the project directory. @@ -317,17 +315,6 @@ Method 1 (recommended): Import via har package Open `entry/oh-package.json5` and add the following dependencies: -0.72 - -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-image-resizer": "file:../../node_modules/@react-native-oh-tpl/react-native-image-resizer/harmony/image_resizer.har" - } -``` - -0.77 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -354,9 +341,6 @@ Open `entry/src/main/ets/RNPackagesFactory.ts` and add: ```diff ... - //0.72 -+ import {ImageResizerPackage} from '@react-native-oh-tpl/react-native-image-resizer/ts'; - //0.77 + import {ImageResizerPackage} from '@react-native-ohos/react-native-image-resizer/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -369,7 +353,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ### 4. Configuring CMakeLists and Introducing ImageResizerPackage -> 0.77 requires configuring CMakeLists and introducing ImageResizerPackage. +> V3.0.10 requires configuring CMakeLists and importing ImageResizerPackage Open `entry/src/main/cpp/CMakeLists.txt` and add: @@ -435,17 +419,21 @@ ohpm install Then compile and run. -> [!TIP] This library also depends on [[@react-native-oh-tpl/react-native-image-picker](https://github.com/react-native-oh-library/usage-docs/blob/master/en/react-native-image-picker.md)]. If this library has already been introduced in the HarmonyOS project, you can skip the steps in this chapter and use it directly. +> [!TIP] This library also depends on [[@react-native-ohos/react-native-image-picker](https://github.com/react-native-oh-library/usage-docs/blob/master/en/react-native-image-picker.md)]. If this library has already been introduced in the HarmonyOS project, you can skip the steps in this chapter and use it directly. -If not introduced, please refer to the Link section of [[@react-native-oh-tpl/react-native-image-picker](https://github.com/react-native-oh-library/usage-docs/blob/master/en/react-native-image-picker.md)](https://github.com/react-native-oh-library/usage-docs/blob/master/en/react-native-image-picker.md#link) for introduction. +If not introduced, please refer to the Link section of [[@react-native-ohos/react-native-image-picker](https://github.com/react-native-oh-library/usage-docs/blob/master/en/react-native-image-picker.md)](https://github.com/react-native-oh-library/usage-docs/blob/master/en/react-native-image-picker.md#link) for introduction. ## Constraints ### Compatibility -This document is verified based on the following versions: -1. RNOH: 0.72.38; SDK: HarmonyOS-5.0.0(API12); ROM: 5.0.0.107; -2. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.868; ROM: 6.0.0.112; | +To use this library, you need to use the correct React-Native and RNOH versions. Additionally, you need to use the matching DevEco Studio and phone ROM. + +Verified successfully in the following versions: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; | ## API diff --git a/en/baronha-ting.md b/en/baronha-ting.md index 4d632cd21b67cc5a3888a202ec9c79d0b1ccb254..35a77b1baf1112bd4649a54745fcfc17283db946 100644 --- a/en/baronha-ting.md +++ b/en/baronha-ting.md @@ -14,38 +14,31 @@ > [!TIP] [Github Address](https://github.com/react-native-oh-library/ting) -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/ting`. The specific version relationships are as follows: +## Installation and Usage -| Version | Package Name | Repository | Release |Supported RN Version | -| ------------------------------ | ---------------- | ------------------- | ------------------- | -------------------- | -| 1.2.2 | @react-native-oh-tpl/ting | [Github](https://github.com/react-native-oh-library/ting) | [Github Releases](https://github.com/react-native-oh-library/async-storage/releases) | 0.72 | -| 1.3.0 | @react-native-ohos/ting | [GitCode](https://gitcode.com/openharmony-sig/rntpc_ting) | [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.2.2@deprecated | [@react-native-oh-tpl/ting Releases(deprecated)](https://github.com/react-native-oh-library/ting/releases) | 0.72 | +| 1.2.3 | [@react-native-ohos/ting Releases](https://gitcode.com/openharmony-sig/rntpc_ting/releases) | 0.72 | +| 1.3.0 | [@react-native-ohos/ting Releases](https://gitcode.com/openharmony-sig/rntpc_ting/releases) | 0.77 | -For older versions not published to npm, please refer to the [Installation Guide](/en/tgz-usage.md) to install the tgz package. +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. -Navigate to your project directory and enter the following commands: +Go to the project directory and execute the following instruction: #### **npm** ```bash -# V1.2.2 -npm install @react-native-oh-tpl/ting - -# V1.3.0 npm install @react-native-ohos/ting ``` #### **yarn** ```bash -# V1.2.2 -yarn add @react-native-oh-tpl/ting - -# V1.3.0 yarn add @react-native-ohos/ting ``` @@ -88,11 +81,16 @@ export default App; ## Using Codegen +Version >= @react-native-ohos/ting@1.2.3, compatible with codegen-lib for generating bridge code. + This library has been adapted for `Codegen`. Before use, you need to actively generate the third-party library bridging code. Please refer to the [Codegen Usage Documentation](/en/codegen.md) for details. ## Link -Currently, HarmonyOS does not support AutoLink, so the Link step requires manual configuration. +Version >= @react-native-ohos/ting@1.2.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 + +This step provides guidance for manually configuring native dependencies. First, use DevEco Studio to open the HarmonyOS project `harmony` within your project. @@ -120,17 +118,6 @@ Method 1: Import via har package (Recommended) Open `entry/oh-package.json5` and add the following dependencies: -- V1.2.2 - -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/ting": "file:../../node_modules/@react-native-oh-tpl/ting/harmony/ting.har" -} -``` - -- V1.3.0 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -153,7 +140,9 @@ Method 2: Link Source Code Directly ### 3. Configure CMakeLists and Import RNTingPackage -> V1.3.0 requires configuring CMakeLists and importing RNTingPackage. +> V1.2.3 requires configuring CMakeLists and importing RNTingPackage. + +Open `entry/src/main/cpp/CMakeLists.txt` and add: ```diff ... @@ -204,10 +193,6 @@ Open `entry/src/main/ets/RNPackagesFactory.ets` and add: ```diff ... -// V1.2.2 -+ import {RNTingPackage} from '@react-native-oh-tpl/ting'; - -// V1.3.0 + import {RNTingPackage} from '@react-native-ohos/ting'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -238,8 +223,10 @@ Then compile and run. To use this library, you need to use the correct React-Native and RNOH versions. Additionally, you need to use the matching DevEco Studio and phone ROM. Verified successfully in 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; + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## Properties diff --git a/en/jpush-react-native.md b/en/jpush-react-native.md index f2c2b8ed5ab56065b23ecd34368d318f5936c84e..1cb45e0d780cd3496afe6dbc36e654ec6b28e1ea 100644 --- a/en/jpush-react-native.md +++ b/en/jpush-react-native.md @@ -12,17 +12,20 @@

-This project is based on [jpush-react-native](https://github.com/react-native-oh-library/jpush-react-native). - -Please go to the corresponding Release release address of the third-party library to view the version information of the Release package: -| Version | Package Name | Repository | Release | RN Version | -| ------------------------------ | ---------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |------------| -| 3.1.1@deprecated | @react-native-oh-library/jpush-react-native Releases | [Github(deprecated)](https://github.com/react-native-oh-library/jpush-react-native/releases) | [Github deprecated](https://github.com/react-native-oh-library/jpush-react-native/releases) | 0.72 | -| 3.1.2 | @react-native-ohos/jpush-react-native Releases | [GitCode](https://gitcode.com/openharmony-sig/rntpc_jpush-react-native) | [GitCode Releases](https://gitcode.com/openharmony-sig/jpush-react-native/releases) | 0.72 | -| 3.2.0 | @react-native-ohos/jpush-react-native Releases | [GitCode](https://gitcode.com/openharmony-sig/rntpc_jpush-react-native) | [GitCode Releases](https://gitcode.com/openharmony-sig/jpush-react-native/releases) | 0.77 | +> [!TIP] [GitHub address](https://github.com/react-native-oh-library/jpush-react-native) ## 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 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 3.1.1@deprecated | [@react-native-oh-tpl/jpush-react-native Releases(deprecated)](https://github.com/react-native-oh-library/jpush-react-native/releases) | 0.72 | +| 3.1.2 | [@react-native-ohos/jpush-react-native Releases](https://gitcode.com/openharmony-sig/rntpc_jpush-react-native/releases) | 0.72 | +| 3.2.0 | [@react-native-ohos/jpush-react-native Releases](https://gitcode.com/openharmony-sig/rntpc_jpush-react-native/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. + Go to the project directory and execute the following instruction: @@ -84,11 +87,16 @@ export default App; ``` ## Use Codegen +Version >= @react-native-ohos/jpush-react-native@3.1.2, 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/jpush-react-native@3.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. @@ -136,7 +144,9 @@ Method 2: Directly link to the source code. ### 3. Configure CMakeLists and import RNJPushPackage -> V3.2.0 requires configuring CMakeLists and importing RNJPushPackage. +> V3.1.2 requires configuring CMakeLists and importing RNJPushPackage. + +Open `entry/src/main/cpp/CMakeLists.txt`,and add: ```diff ... @@ -216,10 +226,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: -1. RNOH: 0.72.33; SDK: HarmonyOS NEXT Beta1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +The following combinations have been verified: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; 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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; +3. RNOH: 0.77.18; SDK: HarmonyOS 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## Static Methods diff --git a/en/react-native-SmartRefreshLayout.md b/en/react-native-SmartRefreshLayout.md index 27179f80254e9a6f7320cc88a1b74bee23f12c48..a366b6aa7c9b67221edec3d61f485d59a52c6477 100644 --- a/en/react-native-SmartRefreshLayout.md +++ b/en/react-native-SmartRefreshLayout.md @@ -14,15 +14,17 @@ > [!Tip] [Github address](https://github.com/react-native-oh-library/react-native-smartrefreshlayout) -The repository of this third-party library Github and supports direct download from npm. The new package name is: @react-native-ohos/react-native-smartrefreshlayout. The specific version ownership relationship is as follows: +## Installation and Usage +Please refer to the Releases page of the third-party library for the corresponding version information -| Version | Package Name | Repository | Release | Support RN version | -| ---------- | ------------------------------------------------------------ | ---------- | ---------- | ---------- | -| 0.6.7| @react-native-oh-tpl/react-native-smartrefreshlayout | [Github](https://github.com/react-native-oh-library/react-native-SmartRefreshLayout)|[Github Releases](https://github.com/react-native-oh-library/react-native-SmartRefreshLayout/releases)|0.72 | -| 0.7.0| @react-native-ohos/react-native-smartrefreshlayout | [Github](https://github.com/react-native-oh-library/react-native-SmartRefreshLayout/tree/br_rnoh0.77) |[Github Releases]() | 0.77 | +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| 0.6.7@deprecated | [@react-native-oh-tpl/react-native-smartrefreshlayout Releases(deprecated)](https://github.com/react-native-oh-library/react-native-smartrefreshlayout/releases) | 0.72 | +| 0.6.8 | [@react-native-ohos/react-native-smartrefreshlayout Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-SmartRefreshLayout/releases) | 0.72 | +| 0.7.0 | [@react-native-ohos/react-native-smartrefreshlayout Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-SmartRefreshLayout/releases) | 0.77 | -## Installation and Usage +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -33,19 +35,12 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -# 0.72 -npm install @react-native-oh-tpl/react-native-smartrefreshlayout - -# 0.77 npm install @react-native-ohos/react-native-smartrefreshlayout ``` #### **yarn** ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-smartrefreshlayout -# 0.77 yarn add @react-native-ohos/react-native-smartrefreshlayout ``` @@ -191,7 +186,10 @@ export default App; ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-smartrefreshlayout@0.6.8 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. @@ -220,10 +218,6 @@ Open `entry/oh-package.json5` file and add the following dependencies: "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - //0.72 - "@react-native-oh-tpl/react-native-smartrefreshlayout": "file:../../node_modules/@react-native-oh-tpl/react-native-smartrefreshlayout/harmony/smart_refresh_layout.har" - - //0.77 "@react-native-ohos/react-native-smartrefreshlayout": "file:../../node_modules/@react-native-ohos/react-native-smartrefreshlayout/harmony/smart_refresh_layout.har" } ``` @@ -243,6 +237,8 @@ For details, see [Directly Linking Source Code](/en/link-source-code.md). ### 3. Configuring CMakeLists and Introducing SmartRefreshLayoutPackage +> V0.6.8 requires configuring CMakeLists and importing SmartRefreshLayoutPackage. + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -263,10 +259,6 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_END: 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-smartrefreshlayout/src/main/cpp" ./smart-refresh-layout) - -# 0.77 + add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-smartrefreshlayout/src/main/cpp" ./smart-refresh-layout) # RNOH_END: manual_package_linking_1 @@ -306,10 +298,6 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following ```diff ... -+ // 0.72 -+ import { SmartRefreshPackage } from '@react-native-oh-tpl/react-native-smartrefreshlayout/ts'; - -+ // 0.77 + import { SmartRefreshPackage } from '@react-native-ohos/react-native-smartrefreshlayout/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -338,8 +326,11 @@ Then build and run the code. The content of this document has been verified based on the following version: -1、RNOH: 0.72.38; SDK: HarmonyOS-5.0.0(API12); IDE: DevEco Studio 5.1.1.830; ROM: 6.0.0.112 SP12; -2、RNOH: 0.77.18; SDK: HarmonyOS-5.1.1.208(API19); IDE: DevEco Studio 5.1.1.830; ROM: 6.0.0.112 SP12; +Verified successfully in the following versions: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## Properties diff --git a/en/react-native-amap-geolocation.md b/en/react-native-amap-geolocation.md index 72a0f1fa213ad85f83064e9f0f2d90775136353b..a4f8fd52874a50f182160e021881352cee218b77 100644 --- a/en/react-native-amap-geolocation.md +++ b/en/react-native-amap-geolocation.md @@ -15,16 +15,17 @@ > [!TIP] [Github address](https://github.com/react-native-oh-library/react-native-amap-geolocation) -please check the release version information in the release address of the third-party library: +## Installation and Usage + +Please refer to the Releases page of the third-party library for the corresponding version information -| Library Version | Release Information | Supported RN Versions | +| Third-party Library Version | Release Information | Supported RN Version | | ---------- | ------------------------------------------------------------ | ---------- | -| 1.2.3 | [@react-native-oh-tpl/react-native-amap-geolocation Releases](https://github.com/react-native-oh-library/react-native-amap-geolocation/releases) | 0.72 | -| 1.3.0 | [@react-native-ohos/react-native-amap-geolocation Releases]() | 0.77 | +| 1.2.3@deprecated | [@react-native-oh-tpl/react-native-amap-geolocation Releases(deprecated)](https://github.com/react-native-oh-library/react-native-amap-geolocation/releases) | 0.72 | +| 1.2.4 | [@react-native-ohos/react-native-amap-geolocation Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-amap-geolocation/releases) | 0.72 | +| 1.3.0 | [@react-native-ohos/react-native-amap-geolocation Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-amap-geolocation/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 +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -33,18 +34,12 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -# 0.72 -npm install @react-native-oh-tpl/react-native-amap-geolocation -# 0.77 npm install @react-native-ohos/react-native-amap-geolocation ``` #### **yarn** ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-amap-geolocation -# 0.77 yarn add @react-native-ohos/react-native-amap-geolocation ``` @@ -301,12 +296,16 @@ There are several important points to note when using this library: ## Use Codegen -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-amap-geolocation@1.2.4, compatible with codegen-lib for generating bridge code. +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-amap-geolocation@1.2.4 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. @@ -332,17 +331,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-amap-geolocation": "file:../../node_modules/@react-native-oh-tpl/react-native-amap-geolocation/harmony/amap_geolocation.har" - } -``` - -- 0.77 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -363,15 +351,47 @@ Method 2: Directly link to the source code. > [!TIP] For details, see [Directly Linking Source Code](/en/link-source-code.md). -### 3. Introducing AmapGeolocationPackage to ArkTS +### 3. Configuring CMakeLists and Introducing AmapGeolocationPackage + +> V1.2.4 requires configuring CMakeLists and importing AmapGeolocationPackage + +Open `entry/src/main/cpp/CMakeLists.txt` and add: + +```diff ++ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules") + +# RNOH_BEGIN: manual_package_linking_1 ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-amap-geolocation/src/main/cpp" ./amap_geolocation) +# RNOH_END: manual_package_linking_1 + +# RNOH_BEGIN: manual_package_linking_2 ++ target_link_libraries(rnoh_app PUBLIC rnoh_amap_geolocation) +# RNOH_END: manual_package_linking_2 +``` + +Open `entry/src/main/cpp/PackageProvider.cpp` and add: + +```diff +#include "RNOH/PackageProvider.h" +#include "generated/RNOHGeneratedPackage.h" ++ #include "AmapGeolocationPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { + std::make_shared(ctx), ++ std::make_shared(ctx), + }; +} +``` + +### 4. Introducing AmapGeolocationPackage to ArkTS Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff ... -# 0.72 -+ import {AMapGeolocationPackage} from '@react-native-oh-tpl/react-native-amap-geolocation/ts'; -# 0.77 + import {AMapGeolocationPackage} from '@react-native-ohos/react-native-amap-geolocation/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -382,7 +402,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4. Running +### 5. Running Click the `sync` button in the upper right corner. @@ -399,8 +419,13 @@ Then build and run the code. ### Compatibility -1. RNOH:0.72.33; SDK:OpenHarmony 5.0.0.71(API Version 12 Release); IDE:DevEco Studio 5.0.3.900; ROM:NEXT.0.0.71; -2. RNOH:0.77.18; SDK:HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.868; ROM:6.0.0.112; +To use this library, you need to use the correct React-Native and RNOH versions. Additionally, you need to use the matching DevEco Studio and phone ROM. + +Verified successfully in the following versions: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ### Permission Requirements diff --git a/en/react-native-audio-toolkit.md b/en/react-native-audio-toolkit.md index 8022068c69193368c67890eb62bdad374b8a28cc..01d68c51e9493d80b50d91ba2e1137c9396cd352 100644 --- a/en/react-native-audio-toolkit.md +++ b/en/react-native-audio-toolkit.md @@ -16,7 +16,15 @@ ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/audio-toolkit Releases](https://github.com/react-native-oh-library/react-native-audio-toolkit/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 + +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| 2.0.3@deprecated | [@react-native-oh-tpl/audio-toolkit Releases(deprecated)](https://github.com/react-native-oh-library/react-native-audio-toolkit/releases) | 0.72 | +| 2.0.4 | [@react-native-ohos/audio-toolkit Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-audio-toolkit/releases) | 0.72 | +| 2.1.0 | [@react-native-ohos/audio-toolkit Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-audio-toolkit/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -27,13 +35,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/audio-toolkit +npm install @react-native-ohos/audio-toolkit ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/audio-toolkit +yarn add @react-native-ohos/audio-toolkit ``` @@ -428,11 +436,16 @@ const styles = StyleSheet.create({ ## Use Codegen +Version >= @react-native-ohos/audio-toolkit@2.0.4, 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/audio-toolkit@2.0.4 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. @@ -460,7 +473,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/audio-toolkit": "file:../../node_modules/@react-native-oh-tpl/audio-toolkit/harmony/audio_toolkit.har" + "@react-native-ohos/audio-toolkit": "file:../../node_modules/@react-native-ohos/audio-toolkit/harmony/audio_toolkit.har" } ``` @@ -471,7 +484,7 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... -+ import { AudioModulesPackage } from "@react-native-oh-tpl/audio-toolkit/ts"; ++ import { AudioModulesPackage } from "@react-native-ohos/audio-toolkit/ts"; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -494,7 +507,69 @@ Method 2: Directly link to the source code. > [!TIP] For details, see [Directly Linking Source Code](/en/link-source-code.md). -### 4. Running +### 4. Configuring CMakeLists and Introducing AudioToolkitPackage + +> V2.0.4 requires configuring CMakeLists and importing AudioToolkitPackage + +Open `entry/src/main/cpp/CMakeLists.txt` and add: + +```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/audio-toolkit/src/main/cpp" ./audio-toolkit) + +# 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_audio_toolkit) +# RNOH_END: manual_package_linking_2 +``` + +Open `entry/src/main/cpp/PackageProvider.cpp` and add: + +```diff +#include "RNOH/PackageProvider.h" +#include "generated/RNOHGeneratedPackage.h" +#include "SamplePackage.h" ++ #include "AudioToolkitPackage.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. @@ -513,7 +588,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/audio-toolkit Releases](https://github.com/react-native-oh-library/react-native-audio-toolkit/releases/) +Verified successfully in the following versions: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ### Permission Requirements diff --git a/en/react-native-background-timer.md b/en/react-native-background-timer.md index 15dddd6ce1a15b4e40c95053679ee6b8ed60ccce..a7078d6acc16a7cca5b355bfdab07ff6465a86d6 100644 --- a/en/react-native-background-timer.md +++ b/en/react-native-background-timer.md @@ -4,20 +4,19 @@

react-native-background-timer

-This project is based on [react-native-background-timer@2.4.1](https://github.com/ocetnik/react-native-background-timer)。 +> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-background-timer) -Please visit the Release release address of the third-party library to view the corresponding version information: +## 1. Installation and Usage + +Please refer to the Releases page of the third-party library for the corresponding version information -| Version | Releases info | Support RN version | +| Third-party Library Version | Release Information | Supported RN Version | | ---------- | ------------------------------------------------------------ | ---------- | -| <= 2.4.1-0.0.2@deprecated | [@react-native-oh-tpl/react-native-background-timer Releases(deprecated)](https://github.com/react-native-oh-library/react-native-background-timer/releases) | 0.72 | +| 2.4.1@deprecated | [@react-native-oh-tpl/react-native-background-timer Releases(deprecated)](https://github.com/react-native-oh-library/react-native-background-timer/releases) | 0.72 | | 2.4.2 | [@react-native-ohos/react-native-background-timer Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-background-timer/releases) | 0.72 | | 2.5.0 | [@react-native-ohos/react-native-background-timer Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-background-timer/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. - -## 1. Installation and Usage +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -203,6 +202,8 @@ const styles = StyleSheet.create({ ## 2. Manual Link +Version >= @react-native-ohos/react-native-background-timer@2.4.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. @@ -257,7 +258,7 @@ Method 2: Directly link to the source code. ### 2.3 Configuring CMakeLists and Introducing BackgroundTimerPackage -> [!TIP] Version v2.4.2 and above requires. +> V2.4.2 requires configuring CMakeLists and importing BackgroundTimerPackage. Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: @@ -364,9 +365,14 @@ Then build and run the code. ## 3. Constraints ### 3.1 Compatibility -The content in this document has been verified under the following environment: -1. RNOH: 0.72.38; SDK: HarmonyOS-5.0.0(API12); ROM: 5.0.0.107; -2. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.868; ROM: 6.0.0.112; + +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. + +The following combinations have been verified: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## 4. APIs diff --git a/en/react-native-baidu-map.md b/en/react-native-baidu-map.md index ecd865b251729bca0807e707c5163f67c929d251..0b363621b52b0a04e9d13d91c91ca1acf97dea78 100644 --- a/en/react-native-baidu-map.md +++ b/en/react-native-baidu-map.md @@ -16,7 +16,15 @@ ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-baidu-map Releases](https://github.com/react-native-oh-library/react-native-baidu-map/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 + +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| 1.0.37@deprecated | [@react-native-oh-tpl/react-native-baidu-map Releases(deprecated)](https://github.com/react-native-oh-library/react-native-baidu-map/releases) | 0.72 | +| 1.0.38 | [@react-native-ohos/react-native-baidu-map Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-baidu-map/releases) | 0.72 | +| 1.1.0 | [@react-native-ohos/react-native-baidu-map Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-baidu-map/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -27,13 +35,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-baidu-map +npm install @react-native-ohos/react-native-baidu-map ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-baidu-map +yarn add @react-native-ohos/react-native-baidu-map ``` @@ -157,7 +165,10 @@ export default App; ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-baidu-map@1.0.38 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. @@ -186,7 +197,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-baidu-map": "file:../../node_modules/@react-native-oh-tpl/react-native-baidu-map/harmony/baidu_map.har" +"@react-native-ohos/react-native-baidu-map": "file:../../node_modules/@react-native-ohos/react-native-baidu-map/harmony/baidu_map.har" } ``` @@ -205,6 +216,8 @@ Method 2: Directly link to the source code. ### 3. Configuring CMakeLists and Introducing BaiduMapPackage +> V1.0.38 requires configuring CMakeLists and importing BaiduMapPackage. + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -225,7 +238,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-baidu-map/src/main/cpp" ./baidu-map) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-baidu-map/src/main/cpp" ./baidu-map) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -268,7 +281,7 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... -+ import {BaiduMapPackage} from '@react-native-oh-tpl/react-native-baidu-map/ts'; ++ import {BaiduMapPackage} from '@react-native-ohos/react-native-baidu-map/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -298,7 +311,7 @@ or `entry/src/main/ets/rn/LoadBundle.ets`, and add the following code: + BaiduMapOverlayText, + BaiduMapOverlayMarker, + BaiduMapView -+} from '@react-native-oh-tpl/react-native-baidu-map'; ++} from '@react-native-ohos/react-native-baidu-map'; @Builder export function buildCustomRNComponent(ctx: ComponentBuilderContext) { @@ -381,7 +394,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-baidu-map Releases](https://github.com/react-native-oh-library/react-native-baidu-map/releases) +Verified successfully in the following versions: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ### Permission Requirements diff --git a/en/react-native-bindingx.md b/en/react-native-bindingx.md index 96b66d12370b490981a050ec2bedcb7b421e88fc..3cfc962a6a0123a7593528e925a2647ecb459149 100644 --- a/en/react-native-bindingx.md +++ b/en/react-native-bindingx.md @@ -14,34 +14,30 @@ > [!TIP] [Github address](https://github.com/react-native-oh-library/react-native-bindingx) -The repository of this third-party library has been migrated to Gitcode and supports direct download from npm. The new package name is: @react-native-ohos/react-native-bindingx. The specific version ownership relationship is as follows: -| Version | Package Name | Repository | Release | Support RN version | -| ---------- | ------------------------------------------------------------ | ---------- | ---------- | ---------- | -| 1.0.3 | @react-native-oh-tpl/react-native-bindingx | [Github](https://github.com/react-native-oh-library/react-native-bindingx/tree/sig)|[Github Releases](https://github.com/react-native-oh-library/react-native-bindingx/releases)|0.72 | -| 1.1.0 | @react-native-ohos/react-native-bindingx | [Gitcode](https://gitcode.com/openharmony-sig/rntpc_react-native-bindingx/tree/br_rnoh0.77) |[Gitcode Releases]() | 0.77 | - ## 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 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 1.0.3@deprecated | [@react-native-oh-tpl/react-native-bindingx Releases(deprecated)](https://github.com/react-native-oh-library/react-native-bindingx/releases) | 0.72 | +| 1.0.4 | [@react-native-ohos/react-native-bindingx Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-bindingx/releases) | 0.72 | +| 1.1.0 | [@react-native-ohos/react-native-bindingx Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-bindingx/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. + Go to the project directory and execute the following instruction: ```bash -# 0.72 -npm install @react-native-oh-tpl/react-native-bindingx - -# 0.77 npm install @react-native-ohos/react-native-bindingx ``` #### **yarn** ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-bindingx - -# 0.77 yarn add @react-native-ohos/react-native-bindingx ``` @@ -165,7 +161,10 @@ const styles = StyleSheet.create({ ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-bindingx@1.0.4 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. @@ -194,10 +193,6 @@ Open `entry/oh-package.json5` file and add the following dependencies: ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - // 0.72版本引入 - "@react-native-oh-tpl/react-native-bindingx": "file:../../node_modules/@react-native-oh-tpl/react-native-bindingx/harmony/bindingx.har" - - // 0.77版本引入 "@react-native-ohos/react-native-bindingx": "file:../../node_modules/@react-native-ohos/react-native-bindingx/harmony/bindingx.har" } ``` @@ -217,6 +212,8 @@ For details, see [Directly Linking Source Code](/en/link-source-code.md). ### 3. Configuring CMakeLists and Introducing ReactBindingXPackge +> V1.0.4 requires configuring CMakeLists and importing RNTingReactBindingXPackgeackage. + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -237,10 +234,6 @@ 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-bindingx/src/main/cpp" ./bindingx) - -# 0.77 + add_subdirectory("${OH_MODULES}/@react-native-oh-ohos/react-native-bindingx/src/main/cpp" ./bindingx) # RNOH_END: manual_package_linking_1 @@ -286,10 +279,6 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... -+ // 0.72 -+ import {ReactBindingXPackage} from '@react-native-oh-tpl/react-native-bindingx/ts'; - -+ // 0.77 + import {ReactBindingXPackage} from '@react-native-ohos/react-native-bindingx/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -317,10 +306,13 @@ Then build and run the code. ### Compatibility -The content of this document has been verified based on the following versions: +To use this library, you need to use the correct React-Native and RNOH versions. Additionally, you need to use the matching DevEco Studio and phone ROM. + +Verified successfully in the following versions: -1、RNOH: 0.72.28; SDK: HarmonyOS-5.0.0(API12); IDE: DevEco Studio 5.1.1.830; ROM: 6.0.0.112 SP12; -2、RNOH: 0.77.18; SDK: HarmonyOS-5.1.1.208(API19); IDE: DevEco Studio 5.1.1.830; ROM: 6.0.0.112 SP12 +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## API diff --git a/en/react-native-calendar-events.md b/en/react-native-calendar-events.md index 9a1fb632e6e39cf6776714f87125d1d6a4bf5a01..9bb0d74843c439de43d5a8ea295ce369282c347d 100644 --- a/en/react-native-calendar-events.md +++ b/en/react-native-calendar-events.md @@ -16,7 +16,15 @@ ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-calendar-events Releases](https://github.com/react-native-oh-library/react-native-calendar-events/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 + +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| 2.2.0@deprecated | [@react-native-oh-tpl/react-native-calendar-events Releases(deprecated)](https://github.com/react-native-oh-library/react-native-calendar-events/releases) | 0.72 | +| 2.2.1 | [@react-native-ohos/react-native-calendar-events Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-calendar-events/releases) | 0.72 | +| 2.3.0 | [@react-native-ohos/react-native-calendar-events Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-calendar-events/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -27,13 +35,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-calendar-events +npm install @react-native-ohos/react-native-calendar-events ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-calendar-events +yarn add @react-native-ohos/react-native-calendar-events ``` @@ -235,11 +243,16 @@ export default CalendarDemo; ## Use Codegen +Version >= @react-native-ohos/react-native-calendar-events@2.2.1, compatible with codegen-lib for generating bridge code. + 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-calendar-events@2.2.1,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. @@ -267,7 +280,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-calendar-events": "file:../../node_modules/@react-native-oh-tpl/react-native-calendar-events/harmony/calendar_events.har" + "@react-native-ohos/react-native-calendar-events": "file:../../node_modules/@react-native-ohos/react-native-calendar-events/harmony/calendar_events.har" } ``` @@ -284,13 +297,62 @@ Method 2: Directly link to the source code. > [!TIP] For details, see [Directly Linking Source Code](/en/link-source-code.md). -### 3. Introducing CalendarEventPackage to ArkTS +### 3.Configure CMakeLists and Import CalendarEventPackage + +> V2.2.1 requires configuring CMakeLists and importing CalendarEventPackage + +Open `entry/src/main/cpp/CMakeLists.txt` and add: + +```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-calendar-events/src/main/cpp" ./calendar_events) +# 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_calendar_events) +# RNOH_BEGIN: manual_package_linking_2 +``` + +Open `entry/src/main/cpp/PackageProvider.cpp` and add: + +```diff +#include "RNOH/PackageProvider.h" ++ #include "CalendarEventPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { ++ std::make_shared(ctx) +} +``` + +### 4. Introducing CalendarEventPackage to ArkTS Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff ... -+ import { CalendarEventPackage } from "@react-native-oh-tpl/react-native-calendar-events/ts" ++ import { CalendarEventPackage } from "@react-native-ohos/react-native-calendar-events/ts" export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -300,7 +362,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4. Running +### 5. Running Click the `sync` button in the upper right corner. @@ -317,9 +379,13 @@ ohpm install ### 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. +To use this library, you need to use the correct React-Native and RNOH versions. Additionally, you need to use the matching DevEco Studio and phone ROM. + +Verified successfully in the following versions: -Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-calendar-events Releases](https://github.com/react-native-oh-library/react-native-calendar-events/releases) +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ### Permission Requirements diff --git a/en/react-native-color-matrix-image-filters.md b/en/react-native-color-matrix-image-filters.md index 28eff9891355b1cb8c85dad04345b1f6d866e43b..be19ebffd28f3cd2f8a0d8649f5b0a5c8e995e17 100644 --- a/en/react-native-color-matrix-image-filters.md +++ b/en/react-native-color-matrix-image-filters.md @@ -16,7 +16,15 @@ ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-color-matrix-image-filters Releases](https://github.com/react-native-oh-library/react-native-color-matrix-image-filters/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 + +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| 6.0.5@deprecated | [@react-native-oh-tpl/react-native-color-matrix-image-filters Releases(deprecated)](https://github.com/react-native-oh-library/react-native-color-matrix-image-filters/releases) | 0.72 | +| 6.0.6 | [@react-native-ohos/react-native-color-matrix-image-filters Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-color-matrix-image-filters/releases) | 0.72 | +| 7.0.3 | [@react-native-ohos/react-native-color-matrix-image-filters Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-color-matrix-image-filters/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -27,13 +35,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-color-matrix-image-filters +npm install @react-native-ohos/react-native-color-matrix-image-filters ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-color-matrix-image-filters +yarn add @react-native-ohos/react-native-color-matrix-image-filters ``` @@ -78,7 +86,10 @@ const styles = StyleSheet.create({ ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-color-matrix-image-filters@6.0.6 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. @@ -107,7 +118,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-color-matrix-image-filters": "file:../../node_modules/@react-native-oh-tpl/react-native-color-matrix-image-filters/harmony/color_matrix_image_filters.har" + "@react-native-ohos/react-native-color-matrix-image-filters": "file:../../node_modules/@react-native-ohos/react-native-color-matrix-image-filters/harmony/color_matrix_image_filters.har" } ``` @@ -126,6 +137,8 @@ Method 2: Directly link to the source code. ### 3. Configuring CMakeLists and Introducing ColorMatrixImageFiltersPackage +> V6.0.6 requires configuring CMakeLists and importing ColorMatrixImageFiltersPackage. + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -146,7 +159,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-color-matrix-image-filters/src/main/cpp" ./color_matrix_image_filters) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-color-matrix-image-filters/src/main/cpp" ./color_matrix_image_filters) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -183,8 +196,23 @@ std::vector> PackageProvider::getPackages(Package::Cont } ``` +### 4.Import ColorMatrixImageFiltersPackage on the ArkTs Side + +Open `entry/src/main/ets/RNPackagesFactory.ets` and add: + +```diff + ... ++ import {ColorMatrixImageFiltersPackage} from '@react-native-ohos/react-native-color-matrix-image-filters'; + +export function createRNPackages(ctx: RNPackageContext): RNPackage[] { + return [ + new SamplePackage(ctx), ++ new ColorMatrixImageFiltersPackage(ctx) + ]; +} +``` -### 4. Running +### 5. Running Click the `sync` button in the upper right corner. @@ -203,8 +231,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-color-matrix-image-filters Releases](https://github.com/react-native-oh-library/react-native-color-matrix-image-filters/releases) +Verified successfully in the following versions: +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## Properties diff --git a/en/react-native-community-progress-view.md b/en/react-native-community-progress-view.md index 5f4f648f43d38f157f9bf3eda4d0ebbeefeb9f47..0890d9c89eafa3d779a9bc31d4f169475c90c377 100644 --- a/en/react-native-community-progress-view.md +++ b/en/react-native-community-progress-view.md @@ -4,19 +4,20 @@

@react-native-community/progress-view

-This project is based on [react-native-community/progress-view@1.4.2](https://github.com/react-native-progress-view/progress-view). +> [!TIP] [Github address](https://github.com/react-native-oh-library/progress-view) -Please visit the Release release address of the third-party library to view the corresponding version information: -| Version | Package Name | Repository | Release | RN Version | -| ------------------------------ | ---------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ----------- -| <= 1.4.2@deprecated | @react-native-oh-tpl/progress-view | [Github(deprecated)](https://github.com/react-native-oh-library/progress-view) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/progress-view/releases) | 0.72 | -| 1.4.3 | @react-native-ohos/progress-view | [Gitcode](https://gitcode.com/openharmony-sig/rntpc_progress-view) | [Gitcode Releases](https://gitcode.com/openharmony-sig/rntpc_progress-view/releases) | 0.72 | -| 1.5.0 | @react-native-ohos/progress-view | [Gitcode](https://gitcode.com/openharmony-sig/rntpc_progress-view) | [Gitcode Releases](https://gitcode.com/openharmony-sig/rntpc_progress-view/releases) | 0.77 | +## 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 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 1.4.2@deprecated | [@react-native-oh-tpl/progress-view Releases(deprecated)](https://github.com/react-native-oh-library/progress-view/releases) | 0.72 | +| 1.4.3 | [@react-native-ohos/progress-view Releases](https://gitcode.com/openharmony-sig/rntpc_progress-view/releases) | 0.72 | +| 1.5.0 | [@react-native-ohos/progress-view Releases](https://gitcode.com/openharmony-sig/rntpc_progress-view/releases) | 0.77 | -## Installation and Usage +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -58,6 +59,9 @@ export default function ProgressViewExample() { ## 2. Manual Link +Version >= @react-native-ohos/progress-view@1.4.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 + This step provides guidance for manually configuring native dependencies. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -110,6 +114,8 @@ Method 2: Directly link to the source code. ### 2.3 Configuring CMakeLists and Introducing ProgressViewPackage Package +> V1.4.3 requires configuring CMakeLists and importing ProgressViewPackage. + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -224,10 +230,13 @@ Then build and run the code. ### 3.1 Compatibility -This document is verified based on the following versions: -1. RNOH:0.72.38; SDK:HarmonyOS-5.0.0(API12); IDE: DevEco Studio 5.1.1.830; ROM:5.0.0.110; -2. RNOH:0.77.18; SDK:HarmonyOS 6.0.0 Release; IDE: DevEco Studio 6.0.0.858; ROM:6.0.0.112; +To use this library, you need to use the correct React-Native and RNOH versions. Additionally, you need to use the matching DevEco Studio and phone ROM. + +Verified successfully in the following versions: +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## 4. Properties diff --git a/en/react-native-compass-heading.md b/en/react-native-compass-heading.md index ad4521a6f8d5f58bcb253229c0b1bd102e8a11dd..3b2156534b980050d631af129c23cae03f52bdf6 100644 --- a/en/react-native-compass-heading.md +++ b/en/react-native-compass-heading.md @@ -16,7 +16,15 @@ ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-compass-heading Releases](https://github.com/react-native-oh-library/react-native-compass-heading/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 + +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| 1.5.0@deprecated | [@react-native-oh-tpl/react-native-compass-heading Releases(deprecated)](https://github.com/react-native-oh-library/react-native-compass-heading/releases) | 0.72 | +| 1.5.1 | [@react-native-ohos/react-native-compass-heading Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-compass-heading/releases) | 0.72 | +| 2.0.3 | [@react-native-ohos/react-native-compass-heading Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-compass-heading/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -27,13 +35,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-compass-heading +npm install @react-native-ohos/react-native-compass-heading ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-compass-heading +yarn add @react-native-ohos/react-native-compass-heading ``` @@ -99,11 +107,16 @@ const styles = StyleSheet.create({ ## Use Codegen +Version >= @react-native-ohos/react-native-compass-heading@1.5.1, 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-compass-heading@1.5.1 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. @@ -131,7 +144,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-compass-heading": "file:../../node_modules/@react-native-oh-tpl/react-native-compass-heading/harmony/compass_heading.har" + "@react-native-ohos/react-native-compass-heading": "file:../../node_modules/@react-native-ohos/react-native-compass-heading/harmony/compass_heading.har" } ``` @@ -148,13 +161,66 @@ Method 2: Directly link to the source code. > [!TIP] or details, see [Directly Linking Source Code](/en/link-source-code.md). -### 3. Introducing RNCompassHeadingPackage to ArkTS +### 3. Configure CMakeLists and Import RNCompassHeadingPackage + +> V1.5.1 requires configuring CMakeLists and importing RNCompassHeadingPackage. + +Open `entry/src/main/cpp/CMakeLists.txt` and add: + +```diff +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) +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}/../../../../../../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_MODULE_DIR}/@react-native-ohos/react-native-compass-heading/src/main/cpp" ./compass_heading) +# 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_compass_heading) +# RNOH_BEGIN: manual_package_linking_2 +``` + +> [!Tip] Note: The above definition of NODE_MODULES is the installation path of the source library. Users can define NODE_MODULES based on the installation path of the source library + +Open `entry/src/main/cpp/PackageProvider.cpp` and add: + +```diff +#include "RNOH/PackageProvider.h" +#include "SamplePackage.h" ++ #include "RNCompassHeadingPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { + std::make_shared(ctx), ++ std::make_shared(ctx) + }; +} +``` + +### 4. Introducing RNCompassHeadingPackage to ArkTS Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff ... -+ import {RNCompassHeadingPackage} from '@react-native-oh-tpl/react-native-compass-heading/ts'; ++ import {RNCompassHeadingPackage} from '@react-native-ohos/react-native-compass-heading/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -164,7 +230,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4. Running +### 5. Running Click the `sync` button in the upper right corner. @@ -183,7 +249,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-compass-heading Releases](https://github.com/react-native-oh-library/react-native-compass-heading/releases) +Verified successfully in the following versions: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## Static Methods diff --git a/en/react-native-cookies-cookies.md b/en/react-native-cookies-cookies.md index 84b2fcbca8053284bb0a706d1e7949f43f6ea0b2..6b02484331bdf0515fc75287e02fea548bdf5472 100644 --- a/en/react-native-cookies-cookies.md +++ b/en/react-native-cookies-cookies.md @@ -18,12 +18,13 @@ 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 | +| Third-party Library Version | Release Information | Supported RN Version | | ---------- | ------------------------------------------------------------ | ---------- | -| 6.2.1 | [@react-native-oh-tpl/cookies Releases](https://github.com/react-native-oh-library/react-native-cookies) | 0.72 | -| 6.3.0 | [@react-native-ohos/cookies Releases](https://gitcode.com/openharmony-sig/rntpc_cookies/releases) | 0.77 | +| 6.2.1@deprecated | [@react-native-oh-tpl/cookies Releases(deprecated)](https://github.com/react-native-oh-library/react-native-cookies/releases) | 0.72 | +| 6.2.2 | [@react-native-ohos/cookies Releases](https://gitcode.com/openharmony-sig/rntpc_cookies/releases) | 0.72 | +| 6.3.0 | [@react-native-ohos/cookies Releases](https://gitcode.com/openharmony-sig/rntpc_cookies/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. +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -34,20 +35,12 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -# V6.2.1 -npm install @react-native-oh-tpl/cookies - -# V6.3.0 npm install @react-native-ohos/cookies ``` #### **yarn** -```bash -# V6.2.1 -yarn add @react-native-oh-tpl/cookies - -# V6.3.0 +``` yarn add @react-native-ohos/cookies ``` @@ -203,7 +196,8 @@ const styles = StyleSheet.create({ ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/cookies@6.2.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 Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -229,23 +223,10 @@ 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/op-sqlite": "file:../../node_modules/@react-native-oh-tpl/cookies/harmony/rn_cookies.har" - } -``` - -- 0.77 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - - "@react-native-ohos/op-sqlite": "file:../../node_modules/@react-native-ohos/cookies/harmony/rn_cookies.har" + "@react-native-ohos/cookies": "file:../../node_modules/@react-native-ohos/cookies/harmony/rn_cookies.har", } ``` @@ -264,6 +245,8 @@ Method 2: Directly link to the source code. ### 3. Configuring CMakeLists and Introducing CookiesPackage +> V6.2.2 requires configuring CMakeLists and importing CookiesPackage + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -280,7 +263,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/cookies/src/main/cpp" ./rn_cookies) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/cookies/src/main/cpp" ./rn_cookies) # RNOH_BEGIN: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -319,20 +302,6 @@ std::vector> PackageProvider::getPackages(Package::Cont Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: -- 0.72 -```diff -... -+ import {CookiesPackage} from '@react-native-oh-tpl/cookies/ts'; - -export function createRNPackages(ctx: RNPackageContext): RNPackage[] { - return [ - ... -+ new CookiesPackage(ctx), - ]; -} -``` - -- 0.77 ```diff ... + import {CookiesPackage} from '@react-native-ohos/cookies/ts'; @@ -362,12 +331,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. +To use this library, you need to use the correct React-Native and RNOH versions. Additionally, you need to use the matching DevEco Studio and phone ROM. -This document is verified based on the following versions: +Verified successfully in the following versions: -1. RNOH:0.72.33; SDK:OpenHarmony 5.0.0.71(API Version 12 Release); IDE:DevEco Studio 5.0.3.900; ROM:NEXT.0.0.71; -2. RNOH:0.77.18; SDK:HarmonyOS 5.1.1 Release; IDE: DevEco Studio 5.1.1.830; ROM:NEXT 5.1.0.150; +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## Static Methods diff --git a/en/react-native-exit-app.md b/en/react-native-exit-app.md index 53f303f650ebb1e6a3edf6854cbbbe4922796d33..a9b718c55a2f7fbe6e1a57723185d59bf16b0bfa 100644 --- a/en/react-native-exit-app.md +++ b/en/react-native-exit-app.md @@ -16,32 +16,27 @@ ## Installation and Usage -Please refer to the Releases page of the third-party library for matching version information: +Please refer to the Releases page of the third-party library for the corresponding version information -| Library Version | Release Info | Supported RN Version | -| :--- | :--- | :--- | -| 2.0.0 | [@react-native-oh-tpl/react-native-exit-app Releases](https://github.com/react-native-oh-library/react-native-exit-app/releases) | 0.72 | -| 2.1.0 | @react-native-ohos/react-native-exit-app Releases Releases | 0.77 | +| Third-party Library Version | Release Information | Supported RN Version | +|-----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------| ---------- | +| 2.0.0@deprecated | [@react-native-oh-tpl/react-native-exit-app Releases(deprecated)](https://github.com/react-native-oh-library/react-native-exit-app/releases) | 0.72 | +| 2.0.1 | [@react-native-ohos/react-native-exit-app Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-exit-app/releases) | 0.72 | +| 2.1.0 | [@react-native-ohos/react-native-exit-app Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-exit-app/releases) | 0.77 | -For older versions not published to npm, please refer to the [Installation Guide](/en/tgz-usage-en.md) to install the tgz package. +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.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-exit-app -# 0.77 npm install @react-native-ohos/react-native-exit-app ``` #### **yarn** ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-exit-app -# 0.77 yarn add @react-native-ohos/react-native-exit-app ``` @@ -86,11 +81,15 @@ export default App; ## Use Codegen +Version >= @react-native-ohos/react-native-exit-app@2.0.1, 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-exit-app@2.0.1 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. @@ -115,23 +114,13 @@ 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-exit-app": "file:../../node_modules/@react-native-oh-tpl/react-native-exit-app/harmony/exit_app.har" - } -``` - -* 0.77 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", "@react-native-ohos/react-native-exit-app": "file:../../node_modules/@react-native-ohos/react-native-exit-app/harmony/exit_app.har" } ``` + Click the `sync` button in the upper right corner. Alternatively, run the following instruction on the terminal: @@ -145,10 +134,11 @@ Method 2: Directly Link Source Code > [!TIP] If you need to directly link the source code, please refer to the [Direct Source Code Linking Guide](/en/link-source-code.md). -### 3. Configure CMakeLists and Include RNMlkitOcrPackage +### 3. Configure CMakeLists and import ExitAppPackage -Open `entry/src/main/cpp/CMakeLists.txt` and add: +> V2.0.1 requires configuring CMakeLists and importing ExitAppPackage. +Open the `entry/src/main/cpp/CMakeLists.txt` file and add the following code: ```diff project(rnapp) @@ -186,15 +176,31 @@ target_link_libraries(rnoh_app PUBLIC rnoh_sample_package) # RNOH_END: manual_package_linking_2 ``` -### 4.在 ArkTs 侧引入 ExitAppPackage +Open the `entry/src/main/cpp/PackageProvider.cpp` file and add the following code: + +``` +#include "RNOH/PackageProvider.h" +#include "generated/RNOHGeneratedPackage.h" +#include "SamplePackage.h" ++ #include "ExitAppPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { + std::make_shared(ctx), + std::make_shared(ctx), ++ std::make_shared(ctx), + }; +} +``` + +### 4. Introducing ExitAppPackage to ArkTS Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff ... - # 0.72 -+ import { ExitAppPackage } from '@react-native-oh-tpl/react-native-exit-app/ts'; - # 0.77 + import { ExitAppPackage } from '@react-native-ohos/react-native-exit-app/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -205,7 +211,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4. Running +### 5. Running Click the `sync` button in the upper right corner. @@ -222,9 +228,13 @@ Then build and run the code. ### Compatibility -This document is verified based on the following versions: -1. RNOH:0.72.86; SDK:HarmonyOS 6.0.0.47 (API Version 20); IDE:DevEco Studio 6.0.0.858; ROM:6.0.0.107; -2. RNOH:0.77.18; SDK:HarmonyOS 6.0.0.47 (API Version 20); IDE:DevEco Studio 6.0.0.858; ROM:6.0.0.107; +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. + +The following combinations have been verified: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## Static Methods diff --git a/en/react-native-image-marker.md b/en/react-native-image-marker.md index efc0ce614225e143287ff87f9165ac9315729060..ab916a9e8fc938c488b0e9e6b1b5a939b0faedcd 100644 --- a/en/react-native-image-marker.md +++ b/en/react-native-image-marker.md @@ -14,17 +14,18 @@ > [!TIP] [ GitHub address](https://github.com/react-native-oh-library/react-native-image-marker) -Please check the corresponding version information at the third-party library's Releases page: +## Installation and Usage + +Find the matching version information in the release address of a third-party library: -| Library Version | Release Information | Supported RN Version | +| Third-party Library Version | Release Information | Supported RN Version | | ---------- | ------------------------------------------------------------ | ---------- | -| 1.2.6 | [@react-native-oh-tpl/react-native-image-marker Releases](https://github.com/react-native-oh-library/react-native-image-marker/releases) | 0.72 | -| 1.3.0 | [@react-native-ohos/react-native-image-marker Releases]() | 0.77 | +| 1.2.6@deprecated | [@react-native-oh-tpl/react-native-image-marker Releases(deprecated)](https://github.com/react-native-oh-library/react-native-image-marker/releases) | 0.72 | +| 1.2.7 | [@react-native-ohos/react-native-image-marker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-image-marker/releases) | 0.72 | +| 1.3.0 | [@react-native-ohos/react-native-image-marker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-image-marker/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: @@ -34,20 +35,12 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -# 0.72 -npm install @react-native-oh-tpl/react-native-image-marker - -# 0.77 npm install @react-native-ohos/react-native-image-marker ``` #### **yarn** ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-image-marker - -# 0.77 yarn add @react-native-ohos/react-native-image-marker ``` @@ -213,11 +206,16 @@ const styles = StyleSheet.create({ ## Use Codegen +Version >= @react-native-ohos/react-native-image-marker@1.2.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-image-marker@1.2.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. @@ -242,17 +240,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-image-marker": "file:../../node_modules/@react-native-oh-tpl/react-native-image-marker/harmony/image_marker.har" - } -``` - -- 0.77 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -273,16 +260,61 @@ Method 2: Directly link to the source code. > [!TIP] or details, see [Directly Linking Source Code](/en/link-source-code.md). -### 3. Introducing RNImageMarkerPackage to ArkTS +### 3.Configure CMakeLists and import RNImageMarkerPackage + +> V1.2.7 requires configuring CMakeLists and importing RNImageMarkerPackage. + +Open `entry/src/main/cpp/CMakeLists.txt`,and add: + +```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-image-marker/src/main/cpp" ./image_marker) +# 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_image_marker) +# RNOH_BEGIN: manual_package_linking_2 +``` + +打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: + +```diff +#include "RNOH/PackageProvider.h" ++ #include "RNImageMarkerPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { ++ std::make_shared(ctx) +} +``` + +### 4. Introducing RNImageMarkerPackage to ArkTS Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff ... -// 0.72 -+ import {RNImageMarkerPackage} from '@react-native-oh-tpl/react-native-image-marker/ts'; - -// 0.77 + import {RNImageMarkerPackage} from '@react-native-ohos/react-native-image-marker/ts'; @@ -294,7 +326,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4. Running +### 5. Running Click the `sync` button in the upper right corner. @@ -311,11 +343,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. -1. RNOH:0.72.33; SDK:OpenHarmony 5.0.0.71(API Version 12 Release); IDE:DevEco Studio 5.0.3.900; ROM:NEXT.0.0.71; +The following combinations have been verified: -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 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ### Permission Requirements diff --git a/en/react-native-image-picker.md b/en/react-native-image-picker.md index b30afde7d86182241c11467c03231096a17050cd..e392b89197c571b3d959d3d8253655e24f4aed1b 100644 --- a/en/react-native-image-picker.md +++ b/en/react-native-image-picker.md @@ -16,7 +16,15 @@ ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-image-picker Releases](https://github.com/react-native-oh-library/react-native-image-picker/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 + +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| 7.0.3@deprecated | [@react-native-oh-tpl/react-native-image-picker Releases(deprecated)](https://github.com/react-native-oh-library/react-native-image-picker/releases) | 0.72 | +| 7.0.4 | [@react-native-ohos/react-native-image-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-image-picker/releases) | 0.72 | +| 8.2.2 | [@react-native-ohos/react-native-image-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-image-picker/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -27,13 +35,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-image-picker +npm install @react-native-ohos/react-native-image-picker ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-image-picker +yarn add @react-native-ohos/react-native-image-picker ``` @@ -77,7 +85,10 @@ export default App; ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-image-picker@7.0.4 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. @@ -107,7 +118,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-image-picker": "file:../../node_modules/@react-native-oh-tpl/react-native-image-picker/harmony/image_picker.har" + "@react-native-ohos/react-native-image-picker": "file:../../node_modules/@react-native-ohos/react-native-image-picker/harmony/image_picker.har" } ``` @@ -126,6 +137,8 @@ Method 2: Directly link to the source code. ### 3. Configuring CMakeLists and Introducing ImagePickerViewPackage +> V7.0.4 requires configuring CMakeLists and importing ImagePickerViewPackage + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -146,7 +159,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-image-picker/src/main/cpp" ./image_picker) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-image-picker/src/main/cpp" ./image_picker) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -189,7 +202,7 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... -+ import { ImagePickerViewPackage } from '@react-native-oh-tpl/react-native-image-picker/ts'; ++ import { ImagePickerViewPackage } from '@react-native-ohos/react-native-image-picker/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -218,7 +231,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-image-picker Releases](https://github.com/react-native-oh-library/react-native-image-picker/releases) +The following combinations have been verified: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## Properties diff --git a/en/react-native-keys.md b/en/react-native-keys.md index 2653c5ab5f8482ba213dc2d09149747ac40695da..27053d6513944e20c663e59e55c7d1ef6e50880e 100644 --- a/en/react-native-keys.md +++ b/en/react-native-keys.md @@ -16,7 +16,15 @@ ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-library/react-native-keys Releases](https://github.com/react-native-oh-library/react-native-keys/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 + +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| 0.7.11@deprecated | [@react-native-oh-tpl/react-native-keys Releases(deprecated)](https://github.com/react-native-oh-library/react-native-keys/releases) | 0.72 | +| 0.7.12 | [@react-native-ohos/react-native-keys Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-keys/releases) | 0.72 | +| 0.8.0 | [@react-native-ohos/react-native-keys Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-keys/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -27,13 +35,13 @@ Go to the project directory and execute the following instruction: #### npm ```bash -npm install @react-native-oh-tpl/react-native-keys +npm install @react-native-ohos/react-native-keys ``` #### yarn ```bash -yarn add @react-native-oh-tpl/react-native-keys +yarn add @react-native-ohos/react-native-keys ``` @@ -74,7 +82,10 @@ Keys.secureFor("SECRET_KEY"); ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-keys@0.7.12 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. @@ -102,7 +113,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-keys": "file:../../node_modules/@react-native-oh-tpl/react-native-keys/harmony/rnoh_keys.har" + "@react-native-ohos/react-native-keys": "file:../../node_modules/@react-native-ohos/react-native-keys/harmony/rnoh_keys.har" } ``` @@ -121,6 +132,8 @@ Method 2: Directly link to the source code. ### 3. Configuring CMakeLists and Introducing RNOHKeysPackage +> V0.7.12 requires configuring CMakeLists and importing RNOHKeysPackage + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -141,7 +154,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-keys/src/main/cpp" ./rnohkeys) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-keys/src/main/cpp" ./rnohkeys) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -184,7 +197,7 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... -+ import { RNKeysPackage } from '@react-native-oh-tpl/react-native-keys'; ++ import { RNKeysPackage } from '@react-native-ohos/react-native-keys'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -221,9 +234,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. +To use this library, you need to use the correct React-Native and RNOH versions. Additionally, you need to use the matching DevEco Studio and phone ROM. + +Verified successfully in the following versions: -Check the release version information in the release address of the third-party library: [@react-native-oh-library/react-native-keys Releases](https://github.com/react-native-oh-library/react-native-keys/releases) +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## API diff --git a/en/react-native-maps.md b/en/react-native-maps.md index 6e39fc60df27f901d98c7ae107d5e67e839b1824..0ac3f4b192fc9a155ebe8233fe722d2d92fe72bb 100644 --- a/en/react-native-maps.md +++ b/en/react-native-maps.md @@ -16,14 +16,15 @@ ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-maps Releases](https://github.com/react-native-oh-library/react-native-maps/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 -请到三方库的 Releases 发布地址查看配套的版本信息: - -| Third-party Library Version | Release Information | Supported RN Version| +| Third-party Library Version | Release Information | Supported RN Version | | ---------- | ------------------------------------------------------------ | ---------- | -| 1.10.3 | [@react-native-oh-tpl/react-native-maps Releases](https://github.com/react-native-oh-library/react-native-maps/releases) | 0.72 | -| 1.24.4 | [@react-native-ohos/react-native-maps Releases]() | 0.77 | +| 1.10.3@deprecated | [@react-native-oh-tpl/react-native-maps Releases(deprecated)](https://github.com/react-native-oh-library/react-native-maps/releases) | 0.72 | +| 1.10.4 | [@react-native-ohos/react-native-maps Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-maps/releases) | 0.72 | +| 1.24.4 | [@react-native-ohos/react-native-maps Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-maps/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -34,13 +35,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-maps +npm install @react-native-ohos/react-native-maps ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-maps +yarn add @react-native-ohos/react-native-maps ``` @@ -203,7 +204,10 @@ const styles = StyleSheet.create({ ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-maps@1.10.4 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. @@ -231,7 +235,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-maps": "file:../../node_modules/@react-native-oh-tpl/react-native-maps/harmony/maps.har" + "@react-native-ohos/react-native-maps": "file:../../node_modules/@react-native-ohos/react-native-maps/harmony/maps.har" } ``` @@ -250,6 +254,8 @@ Method 2: Directly link to the source code. ### 3. Configuring CMakeLists and Introducing MapsPackge +> V1.10.4 requires configuring CMakeLists and importing MapsPackge + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -270,7 +276,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-maps/src/main/cpp" ./maps) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-maps/src/main/cpp" ./maps) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -328,7 +334,7 @@ Find `function buildCustomRNComponent()`, which is usually located in `entry/src + AIRMapOverlay, + AIR_MAP_CLUSTER_TYPE, + AIRMapCluster, -+ } from "@react-native-oh-tpl/react-native-maps" ++ } from "@react-native-ohos/react-native-maps" @Builder export function buildCustomRNComponent(ctx: ComponentBuilderContext) { @@ -432,7 +438,7 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... -+ import {MapsPackage} from '@react-native-oh-tpl/react-native-maps/ts'; ++ import {MapsPackage} from '@react-native-ohos/react-native-maps/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -459,15 +465,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. - -Check the release version information in the release address of the third-party library: [react-natvie-maps Releases](https://github.com/react-native-oh-library/react-native-maps/releases) +To use this library, you need to use the correct React-Native and RNOH versions. Additionally, you need to use the matching DevEco Studio and phone ROM. -This document is verified based on the following versions: +Verified successfully in the following versions: -1. RNOH: 0.72.27; SDK: HarmonyOS-Next-DB1 5.0.0.29(SP1); IDE: DevEco Studio 5.0.3.403; ROM: 3.0.0.25; -2. RNOH:0.72.33; SDK:OpenHarmony 5.0.0.71(API Version 12 Release); IDE:DevEco Studio 5.0.3.900; ROM:NEXT.0.0.71; -3. RNOH:0.77.18; SDK:HarmonyOS 5.1.1 Release; IDE: DevEco Studio 5.1.1.830; ROM:NEXT 5.1.0.150; +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ### Permission Requirements diff --git a/en/react-native-mlkit-ocr.md b/en/react-native-mlkit-ocr.md index 963a8d967b51bb926c36f8abc398adfe2e82f296..04b32918b8ce6e479d94792836c0ba532ee2ca67 100644 --- a/en/react-native-mlkit-ocr.md +++ b/en/react-native-mlkit-ocr.md @@ -16,7 +16,15 @@ ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-mlkit-ocr Releases](https://github.com/react-native-oh-library/react-native-mlkit-ocr/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 + +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| 0.3.0@deprecated | [@react-native-oh-tpl/react-native-mlkit-ocr Releases(deprecated)](https://github.com/react-native-oh-library/react-native-mlkit-ocr/releases) | 0.72 | +| 0.3.1 | [@react-native-ohos/react-native-mlkit-ocr Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-mlkit-ocr/releases) | 0.72 | +| 0.4.0 | [@react-native-ohos/react-native-mlkit-ocr Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-mlkit-ocr/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -27,13 +35,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-mlkit-ocr +npm install @react-native-ohos/react-native-mlkit-ocr ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-mlkit-ocr +yarn add @react-native-ohos/react-native-mlkit-ocr ``` @@ -140,7 +148,10 @@ export const OcrTest = () => { ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-mlkit-ocr@0.3.1 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. @@ -169,7 +180,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-mlkit-ocr": "file:../../node_modules/@react-native-oh-tpl/react-native-mlkit-ocr/harmony/rn_mlkit_ocr.har" + "@react-native-ohos/react-native-mlkit-ocr": "file:../../node_modules/@react-native-ohos/react-native-mlkit-ocr/harmony/rn_mlkit_ocr.har" } ``` @@ -188,6 +199,8 @@ Method 2: Directly link to the source code. ### 3. Configuring CMakeLists and Introducing RNMlkitOcrPackage +> V0.3.1 requires configuring CMakeLists and importing RNMlkitOcrPackage. + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -208,7 +221,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_MODULE_DIR}/@react-native-oh-tpl/react-native-mlkit-ocr/src/main/cpp" ./rn_mlkit_ocr) ++ add_subdirectory("${OH_MODULE_DIR}/@react-native-ohos/react-native-mlkit-ocr/src/main/cpp" ./rn_mlkit_ocr) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -248,7 +261,7 @@ std::vector> PackageProvider::getPackages(Package::Cont Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff -+ import { RNMlkitOcrPackage } from '@react-native-oh-tpl/react-native-mlkit-ocr/ts'; ++ import { RNMlkitOcrPackage } from '@react-native-ohos/react-native-mlkit-ocr/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -300,7 +313,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-mlkit-ocr Releases](https://github.com/react-native-oh-library/react-native-mlkit-ocr/releases) +Verified successfully in the following versions: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## API diff --git a/en/react-native-oh-tpl-react-native-screens.md b/en/react-native-oh-tpl-react-native-screens.md index 14e3876cd6acff7a122cc4ce112d9953910f1442..8c4108c5798c244a755649ffb53e415ab1fe1f68 100644 --- a/en/react-native-oh-tpl-react-native-screens.md +++ b/en/react-native-oh-tpl-react-native-screens.md @@ -24,27 +24,29 @@ Note: If the `@react-native-oh-tpl/native-stack` library has been introduced, pl If it is not included, follow the guide provided in [@react-navigation/native](/en/react-navigation-native.md) and [@react-native-oh-tpl/react-native-safe-area-context](/en/react-native-safe-area-context.md) and [@react-native-oh-tpl/react-native-gesture-handler](/en/react-native-gesture-handler.md) to add it to your project. -### 4.8.1 +### 3.34.1 The implementation of this library depends on the native code from @react-navigation/native and @react-navigation/native-stack and @react-native-ohos/react-native-safe-area-context and @react-native-ohos/react-native-gesture-handler and @react-native-ohos/react-native-reanimated. If this library is included into your application, there is no need to include it again; you can skip the steps in this section and use it directly. Note: If the `@react-native-oh-tpl/native-stack,@react-native-ohos/native-stack` library has been introduced, please uninstall it. Otherwise, this library will fail to be referenced and cannot be used. If it is not included, follow the guide provided in [@react-navigation/native](/en/react-navigation-native.md) and [@react-native-ohos/react-native-safe-area-context](/en/react-native-safe-area-context.md) and [@react-native-ohos/react-native-gesture-handler](/en/react-native-gesture-handler.md) and [@react-native-ohos/react-native-reanimated](/en/react-native-reanimated.md) to add it to your project. -Please visit the Releases page of the third-party library to check the corresponding version information: -| Version | Releases info | Support RN version | -| ----------- | ------------------------------------------------------------ | ---------- | -|3.34.0|[@react-native-oh-tpl/react-native-screens Releases](https://github.com/react-native-oh-library/react-native-harmony-screens/releases) |0.72| -|4.8.1|[@react-native-ohos/react-native-screens Releases]() |0.77| +Please refer to the Releases page of the third-party library for the corresponding version information -For older versions that have not been published to npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| 3.34.0@deprecated | [@react-native-oh-tpl/react-native-screens Releases(deprecated)](https://github.com/react-native-oh-library/react-native-harmony-screens/releases) | 0.72 | +| 3.34.1 | [@react-native-ohos/react-native-screens Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-screens/releases) | 0.72 | +| 4.8.1 | [@react-native-ohos/react-native-screens Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-screens/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.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-screens@3.34.0-X.X.X +npm install @react-native-ohos/react-native-screens@3.34.1-X.X.X npm install @react-navigation/native-stack@6.9.13 # 0.77 @@ -56,7 +58,7 @@ npm install @react-navigation/native-stack@7.2.0 ```bash # 0.72 -yarn install @react-native-oh-tpl/react-native-screens@3.34.0-X.X.X +yarn install @react-native-ohos/react-native-screens@3.34.1-X.X.X yarn install @react-navigation/native-stack@6.9.13 # 0.77 @@ -151,13 +153,17 @@ export default function App() { ## Use Codegen ->[! TIP] V4.8.1 does not require execution of Codegen. +Version >= @react-native-ohos/react-native-screens@3.34.1, 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](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/codegen.md). ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-screens@3.34.1 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 @@ -181,14 +187,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:../../node_modules/@rnoh/react-native-harmony/harmony/react_native_openharmony.har", - "@react-native-oh-tpl/react-native-screens": "file:../../node_modules/@react-native-oh-tpl/react-native-screens/harmony/screens.har" - } -``` -- 0.77 ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../../node_modules/@rnoh/react-native-harmony/harmony/react_native_openharmony.har", @@ -211,6 +209,8 @@ Method 2: Directly link to the source code. ### 3. Configuring CMakeLists and Introducing Package +> V3.34.1 requires configuring CMakeLists and importing RnohReactNativeHarmonyScreensPackage. + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -232,10 +232,6 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) -# 72 -+ add_subdirectory("${OH_MODULES_DIR}/@react-native-oh-tpl/react-native-screens/src/main/cpp" ./rnoh_screens) - -# 77 + add_subdirectory("${OH_MODULES_DIR}/@react-native-ohos/react-native-screens/src/main/cpp" ./rnoh_screens) # RNOH_END: manual_package_linking_1 @@ -278,10 +274,6 @@ Find `function buildCustomRNComponent()`, which is usually located in `entry/src ```diff ... -// 72 -+ import { componentBuilder } from "@react-native-oh-tpl/react-native-screens" - -// 77 + import { componentBuilder } from "@react-native-ohos/react-native-screens" @Builder @@ -320,10 +312,6 @@ Open `src/main/ets/RNOHPackagesFactory.ets`, add: ```diff import type { RNPackageContext, RNPackage } from '@rnoh/react-native-openharmony'; -// 72 -+ import RnohReactNativeHarmonyScreensPackage from '@react-native-oh-tpl/react-native-screens'; - -// 77 + import RnohReactNativeHarmonyScreensPackage from '@react-native-ohos/react-native-screens'; export function createRNOHPackages(ctx: RNPackageContext): RNPackage[] { @@ -352,13 +340,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. +To use this library, you need to use the correct React-Native and RNOH versions. Additionally, you need to use the matching DevEco Studio and phone ROM. + +Verified successfully in the following versions: -Check the release version information in the release address of the third-party library: -| Version | Releases info | Support RN version | -| ----------- | ------------------------------------------------------------ | ---------- | -|3.34.0|[@react-native-oh-tpl/react-native-screens Releases](https://github.com/react-native-oh-library/react-native-harmony-screens/releases) |0.72| -|4.8.1|[@react-native-ohos/react-native-screens Releases]() |0.77| +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## Properties diff --git a/en/react-native-ohos-community-auto-fill.md b/en/react-native-ohos-community-auto-fill.md index fb1cda8c66fd9532bf2a9b327831d3659cc714c0..8578c4df80d0aee8a057951df6f317482b6215eb 100644 --- a/en/react-native-ohos-community-auto-fill.md +++ b/en/react-native-ohos-community-auto-fill.md @@ -1,5 +1,5 @@

-

@react-native-ohos-community/auto-fill

+

@react-native-ohos/auto-fill

Supported platforms @@ -22,7 +22,15 @@ Based on the HarmonyOS [autoFillManager](https://developer.huawei.com/consumer/e ## How to Install -Find the matching version information in the release address of the third-party library: [@react-native-ohos-community/auto-fill Releases](https://github.com/react-native-oh-library/auto-fill/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 + +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| 1.0.1@deprecated | [@react-native-ohos-community/auto-fill Releases(deprecated)](https://github.com/react-native-oh-library/auto-fill/releases) | 0.72 | +| 1.0.2 | [@react-native-ohos/auto-fill Releases](https://gitcode.com/openharmony-sig/rntpc_auto-fill/releases) | 0.72 | +| 1.1.0 | [@react-native-ohos/auto-fill Releases](https://gitcode.com/openharmony-sig/rntpc_auto-fill/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instructions: @@ -30,17 +38,11 @@ Go to the project directory and execute the following instructions: - **npm** ```bash - #V1.0.1 - npm install @react-native-ohos-community/auto-fill - #V1.0.2 npm install @react-native-ohos/auto-fill ``` - **yarn** ```bash - #V1.0.1 - yarn add @react-native-ohos-community/auto-fill - #V1.0.2 yarn add @react-native-ohos/auto-fill ``` @@ -51,7 +53,7 @@ Go to the project directory and execute the following instructions: ```tsx import React, { useState } from 'react'; import { View, TextInput, Button, StyleSheet } from 'react-native'; -import AutoFill from '@react-native-ohos-community/auto-fill'; +import AutoFill from '@react-native-ohos/auto-fill'; const MyFormComponent = () => { const [fullName, setFullName] = useState(''); @@ -105,7 +107,7 @@ When **AutoFill.autoSave** is called for the first time, the saving sheet that a - Contact information filling: applicable to forms related to contact data such as ticket purchase information and delivery information. - Account and password filling: applicable to forms related to the login page. - Automatic form filling during page redirection. -- For details about the sample code, see [ContactsComponent.tsx](https://github.com/react-native-oh-library/auto-fill/blob/sig/tester/App.tsx). +- For details about the sample code, see [ContactsComponent.tsx](https://gitcode.com/openharmony-sig/rntpc_auto-fill/blob/br_rnoh0.72/tester/App.tsx). > For details about the password saving and filling rules, see [Password Autofill Service](https://developer.huawei.com/consumer/en/doc/harmonyos-guides-V5/passwordvault-V5). @@ -137,7 +139,10 @@ The following lists the mapping between [textContentType](https://reactnative.cn ### Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure AutoLink. +Version >= @react-native-ohos/auto-fill@1.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. @@ -151,7 +156,7 @@ Open the **harmony** directory of the HarmonyOS project in DevEco Studio. } ``` -#### 2. 2. Introducing Native Code +#### 2. Introducing Native Code Currently, two methods are available: @@ -168,7 +173,7 @@ Open **entry/oh-package.json5** and add the following dependencies: ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-ohos-community/auto-fill": "file:../../node_modules/@react-native-ohos-community/auto-fill/harmony/auto_fill.har" + "@react-native-ohos/auto-fill": "file:../../node_modules/@react-native-ohos/auto-fill/harmony/auto_fill.har" } ``` @@ -187,6 +192,8 @@ For details, see [Direct Linking of Source Code](https://gitee.com/react-native- #### 3. Configuring CMakeLists and Introducing AutoFillPackage +> V1.0.2 requires configuring CMakeLists and importing AutoFillPackage. + Open **entry/src/main/cpp/CMakeLists.txt** and add the following code: ```diff @@ -199,7 +206,7 @@ set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-har set(LOG_VERBOSITY_LEVEL 1) # RNOH_BEGIN: manual_package_linking_1 -+ add_subdirectory("${OH_MODULES}/@react-native-ohos-community/auto-fill/src/main/cpp" ./auto-fill) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/auto-fill/src/main/cpp" ./auto-fill) # RNOH_END: manual_package_linking_1 add_library(rnoh_app SHARED @@ -235,7 +242,7 @@ Open **entry/src/main/ets/RNPackagesFactory.ts** and add the following code: ```diff ... -+ import { AutoFillPackage } from '@react-native-ohos-community/auto-fill/ts' ++ import { AutoFillPackage } from '@react-native-ohos/auto-fill/ts' export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -250,7 +257,11 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { To use this library, you need to use the correct React Native and RNOH versions. In addition, use the matching DevEco Studio and the ROM on your phone. -Find the matching version information in the release address of the third-party library: [@react-native-ohos-community/auto-fill Releases](https://github.com/react-native-oh-library/auto-fill/releases) +Verified successfully in the following versions: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## API Description diff --git a/en/react-native-quick-base64.md b/en/react-native-quick-base64.md index 75969f681045a0f83574368aa0442a66e219f47b..c90f56315d37ef0ef5aa23117d5c1f1e15dda739 100644 --- a/en/react-native-quick-base64.md +++ b/en/react-native-quick-base64.md @@ -14,16 +14,17 @@ > [!TIP] [ GitHub address](https://github.com/react-native-oh-library/react-native-quick-base64) -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-quick-base64`. The specific version relationships are as follows: +## Installation and Usage -| Version | Package Name | Repository | Release |Supported RN Version | -| ------------------------------ | ---------------- | ------------------- | ------------------- | -------------------- | -| 2.1.2 | @react-native-oh-tpl/react-native-quick-base64 | [Github](https://github.com/react-native-oh-library/react-native-quick-base64) | [Github Releases](https://github.com/react-native-oh-library/react-native-quick-base64/releases) | 0.72 | -| 2.2.0 | @react-native-ohos/react-native-quick-base64 | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-quick-base64) | [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 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 2.1.2@deprecated | [@react-native-oh-tpl/react-native-quick-base64 Releases(deprecated)](https://github.com/react-native-oh-library/react-native-quick-base64/releases) | 0.72 | +| 2.1.3 | [@react-native-ohos/react-native-quick-base64 Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-quick-base64/releases) | 0.72 | +| 2.2.0 | [@react-native-ohos/react-native-quick-base64 Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-quick-base64/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. +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -32,20 +33,12 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -# 2.1.2 -npm install @react-native-oh-tpl/react-native-quick-base64 - -# 2.2.0 npm install @react-native-ohos/react-native-quick-base64 ``` #### **yarn** ```bash -# 2.1.2 -yarn add @react-native-oh-tpl/react-native-quick-base64 - -# 2.2.0 yarn add @react-native-ohos/react-native-quick-base64 ``` @@ -59,10 +52,6 @@ The following code shows the basic use scenario of the repository: import React, { useState } from 'react'; import { Text, View, TextInput, ScrollView, StyleSheet, Button } from 'react-native'; -// 2.1.2 -import { byteLength, btoa, atob, toByteArray, fromByteArray, getNative, trimBase64Padding, shim } from '@react-native-oh-tpl/react-native-quick-base64'; - -// 2.2.0 import { byteLength, btoa, atob, toByteArray, fromByteArray, getNative, trimBase64Padding, shim } from '@react-native-ohos/react-native-quick-base64'; type FuncBase64ToArrayBuffer = ( @@ -398,7 +387,10 @@ const styles = StyleSheet.create({ ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-quick-base64@2.1.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 + +This step provides guidance for manually configuring native dependencies. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -422,16 +414,7 @@ Method 1 (recommended): Use the HAR file. > [!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library. Open `entry/oh-package.json5` file and add the following dependencies: -- 2.1.2 -```json - "dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-quick-base64": "file:../../node_modules/@react-native-oh-tpl/react-native-quick-base64/harmony/rn_quick_base64.har" - } -``` - -- 2.2.0 ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -455,6 +438,8 @@ Method 2: Directly link to the source code. ### 3. Configuring CMakeLists and Introducing RNQuickBase64Package +> V2.1.3 requires configuring CMakeLists and importing RNQuickBase64Package. + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -475,11 +460,6 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) - -# 2.1.2 -+ add_subdirectory("${OH_MODULE_DIR}/@react-native-oh-tpl/react-native-quick-base64/src/main/cpp" ./rn_quick_base64) - -# 2.2.0 + add_subdirectory("${OH_MODULE_DIR}/@react-native-ohos/react-native-quick-base64/src/main/cpp" ./rn_quick_base64) # RNOH_END: manual_package_linking_1 @@ -520,10 +500,6 @@ std::vector> PackageProvider::getPackages(Package::Cont Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff - // 2.1.2 -+ import { RNQuickBase64Package } from '@react-native-oh-tpl/react-native-quick-base64/ts'; - - // 2.2.0 + import { RNQuickBase64Package } from '@react-native-ohos/react-native-quick-base64/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -551,11 +527,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. +To use this library, you need to use the correct React-Native and RNOH versions. Additionally, you need to use the matching DevEco Studio and phone ROM. + +Verified successfully in the following versions: -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; +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; > [!TIP] [Official Documenttation](https://github.com/craftzdog/react-native-quick-base64) diff --git a/en/react-native-search-bar.md b/en/react-native-search-bar.md index ca7427dba4ed28f0c43d287787ea3945e318dd2d..00654ae05db778904df8b3f35316c42bc76f99f5 100644 --- a/en/react-native-search-bar.md +++ b/en/react-native-search-bar.md @@ -16,7 +16,15 @@ ## Installation and Usage -Find the matching version information in the release address of a third-party library and download an applicable .tgz package: [@react-native-oh-tpl/react-native-search-bar Releases](https://github.com/react-native-oh-library/react-native-search-bar/releases). +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 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 3.5.1@deprecated | [@react-native-oh-tpl/react-native-search-bar Releases(deprecated)](https://github.com/react-native-oh-library/react-native-search-bar/releases) | 0.72 | +| 3.5.2 | [@react-native-ohos/react-native-search-bar Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-search-bar/releases) | 0.72 | +| 3.6.0 | [@react-native-ohos/react-native-search-bar Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-search-bar/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -27,13 +35,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-search-bar +npm install @react-native-ohos/react-native-search-bar ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-search-bar +yarn add @react-native-ohos/react-native-search-bar ``` @@ -103,7 +111,10 @@ export default SearchBarDemo; ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-search-bar@3.5.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. @@ -133,7 +144,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-search-bar": "file:../../node_modules/@react-native-oh-tpl/react-native-search-bar/harmony/search_bar.har", + "@react-native-ohos/react-native-search-bar": "file:../../node_modules/@react-native-ohos/react-native-search-bar/harmony/search_bar.har", } ``` @@ -152,6 +163,8 @@ Method 2: Directly link to the source code. ### 3. Configuring CMakeLists and Introducing SearchBarPackage +> V3.5.2 requires configuring CMakeLists and importing SearchBarPackage. + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -165,7 +178,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-search-bar/src/main/cpp" ./search-bar) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-search-bar/src/main/cpp" ./search-bar) # RNOH_END: manual_package_linking_1 add_library(rnoh_app SHARED @@ -205,7 +218,7 @@ Find `function buildCustomRNComponent()`, which is usually located in `entry/src ```diff ... -+ import { RNCSearchBar } from "@react-native-oh-tpl/react-native-search-bar" ++ import { RNCSearchBar } from "@react-native-ohos/react-native-search-bar" @Builder export function buildCustomRNComponent(ctx: ComponentBuilderContext) { @@ -253,7 +266,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-search-bar Releases](https://github.com/react-native-oh-library/react-native-search-bar/releases) +Verified successfully in the following versions: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## Properties diff --git a/en/react-native-send-intent.md b/en/react-native-send-intent.md index 699657b933981e183ce4c5f5c89a9d6799dc61e5..386eb2ee2a6fa7cab3c20bb3c93fcf25ba76a20f 100644 --- a/en/react-native-send-intent.md +++ b/en/react-native-send-intent.md @@ -14,14 +14,17 @@ > [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-send-intent) -This third-party library has been migrated to Gitcode and is now available for direct download from npm, the new package name is: `@react-native-ohos/react-native-send-intent`, After introducing the new version of the third-party library, The version correspondence details are as follows: +## Installation and Usage -| Third-party Library Version | Release Information | Supported RN Version | -| --------------------------- | ------------------------------------------------------------ | -------------------- | -| 1.3.0 | [@react-native-oh-tpl/react-native-send-intent Releases](https://github.com/react-native-oh-library/react-native-send-intent/releases) | 0.72 | -| 1.4.0 | [@react-native-ohos/react-native-send-intent 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.3.0@deprecated | [@react-native-oh-tpl/react-native-send-intent Releases(deprecated)](https://github.com/react-native-oh-library/react-native-send-intent/releases) | 0.72 | +| 1.3.1 | [@react-native-ohos/react-native-send-intent Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-send-intent/releases) | 0.72 | +| 1.4.0 | [@react-native-ohos/react-native-send-intent Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-send-intent/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -30,20 +33,12 @@ Go to the project directory and execute the following instruction: #### npm ```bash -# 0.72 -npm install @react-native-oh-tpl/react-native-send-intent - -# 0.77 npm install @react-native-ohos/react-native-send-intent ``` #### yarn ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-send-intent - -# 0.77 yarn add @react-native-ohos/react-native-send-intent ``` @@ -153,11 +148,16 @@ export default SendIntent; ## Use Codegen +Version >= @react-native-ohos/react-native-send-intent@1.3.1, 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-send-intent@1.3.1 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. @@ -182,17 +182,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-send-intent": "file:../../node_modules/@react-native-oh-tpl/react-native-send-intent/harmony/send_intent.har" - } -``` - -- 0.77 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -215,7 +204,7 @@ Method 2: Directly link to the source code. ### 3.Configure CMakeLists and introduce SendIntentPackage -> [!TIP] If using version 0.72, please skip this chapter. +> V1.3.1 requires configuring CMakeLists and importing SendIntentPackage. Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: @@ -280,10 +269,6 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... -// 0.72 -+ import {RNSendIntentPackage} from '@react-native-oh-tpl/react-native-send-intent/ts'; - -// 0.77 + import {RNSendIntentPackage} from '@react-native-ohos/react-native-send-intent/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -311,11 +296,13 @@ Then build and run the code. ### Compatibility -Verified in the following version: +To use this library, you need to use the correct React-Native and RNOH versions. Additionally, you need to use the matching DevEco Studio and phone ROM. -RNOH: 0.72.20; SDK: HarmonyOS NEXT Developer Beta1; IDE: DevEco Studio 5.0.3.200;ROM: 3.0.0.18; +Verified successfully in the following versions: -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 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## API diff --git a/en/react-native-share.md b/en/react-native-share.md index 6075f83c96bf36d809113a15286739a118f0751e..d278685da35ec1f7353e62c9f25dc7d509717aef 100644 --- a/en/react-native-share.md +++ b/en/react-native-share.md @@ -16,7 +16,15 @@ ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-share Releases](https://github.com/react-native-oh-library/react-native-share/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 + +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| 10.2.1@deprecated | [@react-native-oh-tpl/react-native-share Releases(deprecated)](https://github.com/react-native-oh-library/react-native-share/releases) | 0.72 | +| 10.2.2 | [@react-native-ohos/react-native-share Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-share/releases) | 0.72 | +| 12.1.1 | [@react-native-ohos/react-native-share Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-share/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -27,13 +35,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-share +npm install @react-native-ohos/react-native-share ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-share +yarn add @react-native-ohos/react-native-share ``` @@ -81,11 +89,16 @@ export default App; ## Use Codegen +Version >= @react-native-ohos/react-native-share@10.2.2, 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](/zh-cn/codegen.md). ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-share@10.2.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. @@ -114,7 +127,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-share": "file:../../node_modules/@react-native-oh-tpl/react-native-share/harmony/react_native_share.har" + "@react-native-ohos/react-native-share": "file:../../node_modules/@react-native-ohos/react-native-share/harmony/react_native_share.har" } ``` @@ -137,7 +150,7 @@ Method 2: Directly link to the source code. Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff -+ import {RNSharePackage} from '@react-native-oh-tpl/react-native-share/ts'; ++ import {RNSharePackage} from '@react-native-ohos/react-native-share/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -147,7 +160,56 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4. Running +### 4. Configure CMakeLists and Import RNSharePackage + +> V10.2.2 requires configuring CMakeLists and importing RNSharePackage + +Open `entry/src/main/cpp/CMakeLists.txt` and add: + +```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-share/src/main/cpp" ./react_native_share) +# 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_share) +# RNOH_BEGIN: manual_package_linking_2 +``` + +Open `entry/src/main/cpp/PackageProvider.cpp` and add: + +```diff +#include "RNOH/PackageProvider.h" ++ #include "RNSharePackage.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. @@ -164,9 +226,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. +To use this library, you need to use the correct React-Native and RNOH versions. Additionally, you need to use the matching DevEco Studio and phone ROM. + +Verified successfully in the following versions: -Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-share Releases](https://github.com/react-native-oh-library/react-native-share/releases) +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## Properties diff --git a/en/react-native-snackbar.md b/en/react-native-snackbar.md index edb21e4afab095e9a1f16c00ef841b217af022dd..84d0bb5c8e8d77f1695468cad69433b1b1f773a7 100644 --- a/en/react-native-snackbar.md +++ b/en/react-native-snackbar.md @@ -16,7 +16,15 @@ ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-snackbar Releases](https://github.com/react-native-oh-library/react-native-snackbar/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 + +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| 2.7.1@deprecated | [@react-native-oh-tpl/react-native-snackbar Releases(deprecated)](https://github.com/react-native-oh-library/react-native-snackbar/releases) | 0.72 | +| 2.7.2 | [@react-native-ohos/react-native-snackbar Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-snackbar/releases) | 0.72 | +| 2.9.0 | [@react-native-ohos/react-native-snackbar Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-snackbar/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -27,13 +35,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-snackbar +npm install @react-native-ohos/react-native-snackbar ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-snackbar +yarn add @react-native-ohos/react-native-snackbar ``` @@ -87,11 +95,16 @@ const styles = StyleSheet.create({ ## Use Codegen +Version >= @react-native-ohos/react-native-snackbar@2.7.2, 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-snackbar@2.7.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. @@ -119,7 +132,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-snackbar": "file:../../node_modules/@react-native-oh-tpl/react-native-snackbar/harmony/snackbar.har" + "@react-native-ohos/react-native-snackbar": "file:../../node_modules/@react-native-ohos/react-native-snackbar/harmony/snackbar.har" } ``` @@ -142,7 +155,7 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... -+ import {RNSnackbarPackage} from '@react-native-oh-tpl/react-native-snackbar/ts'; ++ import {RNSnackbarPackage} from '@react-native-ohos/react-native-snackbar/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -152,7 +165,58 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4. Running +### 4. Configure CMakeLists and Import SnackbarPackage + +> V2.7.2 requires configuring CMakeLists and importing SnackbarPackage. + +Open `entry/src/main/cpp/CMakeLists.txt` and add: + +```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_BEGIN: add_package_subdirectories +add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) + ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-snackbar/src/main/cpp" ./react-native-snackbar) +# RNOH_END: add_package_subdirectories + +add_library(rnoh_app SHARED + "./PackageProvider.cpp" + "${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp" +) + +target_link_libraries(rnoh_app PUBLIC rnoh) + +# RNOH_BEGIN: link_packages +target_link_libraries(rnoh_app PUBLIC rnoh_sample_package) ++ target_link_libraries(rnoh_app PUBLIC rnoh_snackbar) +# RNOH_END: link_packages +``` + +Open `entry/src/main/cpp/PackageProvider.cpp` and add: + +```diff +#include "RNOH/PackageProvider.h" +#include "SamplePackage.h" ++ #include "SnackbarPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { + std::make_shared(ctx), ++ std::make_shared(ctx) + }; +} +``` + +### 5. Running Click the `sync` button in the upper right corner. @@ -171,7 +235,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-snackbar Releases](https://github.com/react-native-oh-library/react-native-snackbar/releases) +Verified successfully in the following versions: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## Properties diff --git a/en/react-native-syan-image-picker.md b/en/react-native-syan-image-picker.md index 654a9a7e3b307b3381eae23dfce438104c95e13c..a05f04f18fbb225d7f06a23d8108715096a9676d 100644 --- a/en/react-native-syan-image-picker.md +++ b/en/react-native-syan-image-picker.md @@ -17,7 +17,15 @@ ## Installation and Usage -Find the matching version information in the release address of a third-party library:[@react-native-oh-tpl/react-native-syan-image-picker Releases](https://github.com/react-native-oh-library/react-native-syan-image-picker/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 + +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| 0.5.3@deprecated | [@react-native-oh-tpl/react-native-syan-image-picker Releases(deprecated)](https://github.com/react-native-oh-library/react-native-syan-image-picker/releases) | 0.72 | +| 0.5.4 | [@react-native-ohos/react-native-syan-image-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-syan-image-picker/releases) | 0.72 | +| 0.6.0 | [@react-native-ohos/react-native-syan-image-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-syan-image-picker/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -28,13 +36,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-syan-image-picker +npm install @react-native-ohos/react-native-syan-image-picker ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-syan-image-picker +yarn add @react-native-ohos/react-native-syan-image-picker ``` @@ -311,11 +319,16 @@ const styles = StyleSheet.create({ ## Use Codegen +Version >= @react-native-ohos/react-native-syan-image-picker@0.5.4, compatible with codegen-lib for generating bridge code. + 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-syan-image-picker@0.5.4 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. @@ -402,7 +415,7 @@ export default class ImageCropAbility extends UIAbility { **(3)Create ImageEdit.ets under entry/src/main/ets/pages.** ``` -import { ImageCrop } from '@react-native-oh-tpl/react-native-syan-image-picker'; +import { ImageCrop } from '@react-native-ohos/react-native-syan-image-picker'; @Entry @Component @@ -445,7 +458,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-syan-image-picker": "file:../../node_modules/@react-native-oh-tpl/react-native-syan-image-picker/harmony/syan_image_picker.har" + "@react-native-ohos/react-native-syan-image-picker": "file:../../node_modules/@react-native-ohos/react-native-syan-image-picker/harmony/syan_image_picker.har" } ``` @@ -468,7 +481,7 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... -+ import {SyanImagePickerPackage} from '@react-native-oh-tpl/react-native-syan-image-picker/ts'; ++ import {SyanImagePickerPackage} from '@react-native-ohos/react-native-syan-image-picker/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -497,11 +510,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-syan-image-picker Releases](https://github.com/react-native-oh-library/react-native-syan-image-picker/releases) - -This document is verified based on the following versions: +Verified successfully in the following versions: -1. RNOH:0.72.26; SDK:HarmonyOS NEXT Developer Beta1 B.0.22、IDE:DevEco Studio 5.0.3.300SP2; ROM:3.0.0.24; +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; diff --git a/en/rn-bugly.md b/en/rn-bugly.md index 30a81e76f3e7d0d62e44f4ddfdaaec367099f614..e67a034e47ac0c98ea1612079d0dc4ac21ef1c7c 100644 --- a/en/rn-bugly.md +++ b/en/rn-bugly.md @@ -17,7 +17,15 @@ ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/rn-bugly Releases](https://github.com/react-native-oh-library/rn-bugly/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 + +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| 1.3.0@deprecated | [@react-native-oh-tpl/rn-bugly Releases(deprecated)](https://github.com/react-native-oh-library/rn-bugly/releases) | 0.72 | +| 1.3.1 | [@react-native-ohos/rn-bugly Releases](https://gitcode.com/openharmony-sig/rntpc_rn-bugly/releases) | 0.72 | +| 1.4.0 | [@react-native-ohos/rn-bugly Releases](https://gitcode.com/openharmony-sig/rntpc_rn-bugly/releases) | 0.77 | + +For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -26,13 +34,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/rn-bugly +npm install @react-native-ohos/rn-bugly ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/rn-bugly +yarn add @react-native-ohos/rn-bugly ``` The following code shows the basic use scenario of the repository: @@ -97,7 +105,8 @@ export default class BuglyExample extends React.Component { ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/rn-bugly@1.3.1 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. @@ -126,7 +135,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/rn-bugly": "file:../../node_modules/@react-native-oh-tpl/rn-bugly/harmony/bugly.har" + "@react-native-ohos/rn-bugly": "file:../../node_modules/@react-native-ohos/rn-bugly/harmony/bugly.har" } ``` @@ -145,6 +154,8 @@ Method 2: Directly link to the source code. ### 3. Configuring CMakeLists and Introducing RNBuglyPackage Package +> V1.3.1 requires configuring CMakeLists and importing RNBuglyPackage. + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -165,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/rn-bugly/src/main/cpp" ./bugly) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/rn-bugly/src/main/cpp" ./bugly) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -208,7 +219,7 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... -+ import {RNBuglyPackage} from '@react-native-oh-tpl/rn-bugly/ts'; ++ import {RNBuglyPackage} from '@react-native-ohos/rn-bugly/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -237,7 +248,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/rn-bugly Releases](https://github.com/react-native-oh-library/rn-bugly/releases) +Verified successfully in the following versions: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; diff --git a/zh-cn/bam-tech-react-native-image-resizer.md b/zh-cn/bam-tech-react-native-image-resizer.md index da03f552b819e56d72d20da1471746393837ae16..c0f5ef3acbf369d0698ad1e7fdf12dc3c489b428 100644 --- a/zh-cn/bam-tech-react-native-image-resizer.md +++ b/zh-cn/bam-tech-react-native-image-resizer.md @@ -15,14 +15,17 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-image-resizer) +## 安装与使用 + 请到三方库的 Releases 发布地址查看配套的版本信息: -| Version | Package Name | Repository | Release | RN Version | -| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ---------- | -| 3.0.9 | @react-native-oh-tpl/react-native-image-resizer | [Github](https://github.com/react-native-oh-library/react-native-image-resizer) | [Github Releases](https://github.com/react-native-oh-library/react-native-image-resizer/releases) | 0.72 | -| 3.1.0 | @react-native-ohos/react-native-image-resizer | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-image-resizer) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-image-resizer/releases) | 0.77 | +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 3.0.9@deprecated | [@react-native-oh-tpl/react-native-image-resizer Releases(deprecated)](https://github.com/react-native-oh-library/react-native-image-resizer/releases) | 0.72 | +| 3.0.10 | [@react-native-ohos/react-native-image-resizer Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-image-resizer/releases) | 0.72 | +| 3.1.0 | [@react-native-ohos/react-native-image-resizer Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-image-resizer/releases) | 0.77 | -## 安装与使用 +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -31,20 +34,12 @@ #### **npm** ```bash -# 0.72 -npm install @react-native-oh-tpl/react-native-image-resizer - -# 0.77 npm install @react-native-ohos/react-native-image-resizer ``` #### **yarn** ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-image-resizer - -# 0.77 yarn add @react-native-ohos/react-native-image-resizer ``` @@ -283,13 +278,15 @@ export default ImageResizerDemo; ## 使用 Codegen -> [!TIP] 0.77 不需要执行Codegen +Version >= @react-native-ohos/react-native-image-resizer@3.0.10,已适配codegen-lib生成桥接代码。 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-image-resizer@3.0.10,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -317,17 +314,6 @@ export default ImageResizerDemo; 打开 `entry/oh-package.json5`,添加以下依赖 -0.72 - -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-image-resizer": "file:../../node_modules/@react-native-oh-tpl/react-native-image-resizer/harmony/image_resizer.har" - } -``` - -0.77 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -354,9 +340,6 @@ ohpm install ```diff ... - //0.72 -+ import {ImageResizerPackage} from '@react-native-oh-tpl/react-native-image-resizer/ts'; - //0.77 + import {ImageResizerPackage} from '@react-native-ohos/react-native-image-resizer/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -369,7 +352,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ### 4.配置 CMakeLists 和引入 ImageResizerPackage -> 0.77 需要配置 CMakeLists 和引入 ImageResizerPackage。 +> V3.0.10 需要配置 CMakeLists 和引入 ImageResizerPackage。 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: @@ -435,18 +418,21 @@ ohpm install 然后编译、运行即可。 -[!TIP] 本库还依赖了[[@react-native-oh-tpl/react-native-image-picker](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-image-picker.md),如已在 HarmonyOS 工程中引入过该库,则无需再次引入,可跳过本章节步骤,直接使用。 +[!TIP] 本库还依赖了[[@react-native-ohos/react-native-image-picker](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-image-picker.md),如已在 HarmonyOS 工程中引入过该库,则无需再次引入,可跳过本章节步骤,直接使用。 -如未引入请参照[@react-native-oh-tpl/react-native-image-picker](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-image-picker.md) 文档的 Link 章节](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-image-picker.md#link)进行引入 +如未引入请参照[@react-native-ohos/react-native-image-picker](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-image-picker.md) 文档的 Link 章节](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-image-picker.md#link)进行引入 ## 约束与限制 ### 兼容性 +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + 在以下版本验证通过: -1. RNOH:0.72.28; SDK:HarmonyOS NEXT DB2; IDE:DevEco Studio 5.0.3.500; ROM:3.0.0.28; -2. RNOH: 0.77.1;SDK:HarmonyOS 5.1.1.208 (API Version 19 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 6.0.0.112 SP12; +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## 属性 diff --git a/zh-cn/baronha-ting.md b/zh-cn/baronha-ting.md index e64255ad69e0ba3f8d9480385b3c2c9b6ef9e064..47514c90b196b9d1cc33691fecc82bd02c81c383 100644 --- a/zh-cn/baronha-ting.md +++ b/zh-cn/baronha-ting.md @@ -14,14 +14,15 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/ting) -该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:@react-native-ohos/ting,具体版本所属关系如下: +## 安装与使用 -| Version | Package Name | Repository | Release |Supported RN Version | -| ------------------------------ | ---------------- | ------------------- | ------------------- | -------------------- | -| 1.2.2 | @react-native-oh-tpl/ting | [Github](https://github.com/react-native-oh-library/ting) | [Github Releases](https://github.com/react-native-oh-library/async-storage/releases) | 0.72 | -| 1.3.0 | @react-native-ohos/ting | [GitCode](https://gitcode.com/openharmony-sig/rntpc_ting) | [GitCode Releases]() | 0.77 | +请到三方库的 Releases 发布地址查看配套的版本信息: -## 安装与使用 +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 1.2.2@deprecated | [@react-native-oh-tpl/ting Releases(deprecated)](https://github.com/react-native-oh-library/ting/releases) | 0.72 | +| 1.2.3 | [@react-native-ohos/ting Releases](https://gitcode.com/openharmony-sig/rntpc_ting/releases) | 0.72 | +| 1.3.0 | [@react-native-ohos/ting Releases](https://gitcode.com/openharmony-sig/rntpc_ting/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -32,20 +33,12 @@ #### **npm** ```bash -# V1.2.2 -npm install @react-native-oh-tpl/ting - -# V1.3.0 npm install @react-native-ohos/ting ``` #### **yarn** ```bash -# V1.2.2 -yarn add @react-native-oh-tpl/ting - -# V1.3.0 yarn add @react-native-ohos/ting ``` @@ -89,11 +82,15 @@ export default App; ## 使用 Codegen +Version >= @react-native-ohos/ting@1.2.3,已适配codegen-lib生成桥接代码。 + 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/ting@1.2.3,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -121,17 +118,6 @@ export default App; 打开 `entry/oh-package.json5`,添加以下依赖 -- V1.2.2 - -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/ting": "file:../../node_modules/@react-native-oh-tpl/ting/harmony/ting.har" -} -``` - -- V1.3.0 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -154,7 +140,9 @@ ohpm install ### 3. 配置 CMakeLists 和引入 RNTingPackage -> V1.3.0 需要配置 CMakeLists 和引入 RNTingPackage。 +> V1.2.3 需要配置 CMakeLists 和引入 RNTingPackage。 + +打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff ... @@ -205,10 +193,6 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... -// V1.2.2 -+ import {RNTingPackage} from '@react-native-oh-tpl/ting'; - -// V1.3.0 + import {RNTingPackage} from '@react-native-ohos/ting'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -240,8 +224,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 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## 属性 diff --git a/zh-cn/jpush-react-native.md b/zh-cn/jpush-react-native.md index 34742b74d746423de8f957f4cacb72c8e7382827..4ecaf1217e04333ad3d9d684a2f79d27148145fc 100644 --- a/zh-cn/jpush-react-native.md +++ b/zh-cn/jpush-react-native.md @@ -12,17 +12,20 @@

-本项目基于 [jpush-react-native](https://github.com/react-native-oh-library/jpush-react-native) 开发。 +> [!TIP] [Github 地址](https://github.com/react-native-oh-library/jpush-react-native) + + +## 安装与使用 请到三方库的 Releases 发布地址查看配套的版本信息: -| Version | Package Name | Repository | Release | RN Version | -| ------------------------------ | ---------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |------------| -| 3.1.1@deprecated | @react-native-oh-library/jpush-react-native Releases | [Github(deprecated)](https://github.com/react-native-oh-library/jpush-react-native/releases) | [Github deprecated](https://github.com/react-native-oh-library/jpush-react-native/releases) | 0.72 | -| 3.1.2 | @react-native-ohos/jpush-react-native Releases | [GitCode](https://gitcode.com/openharmony-sig/rntpc_jpush-react-native) | [GitCode Releases](https://gitcode.com/openharmony-sig/jpush-react-native/releases) | 0.72 | -| 3.2.0 | @react-native-ohos/jpush-react-native Releases | [GitCode](https://gitcode.com/openharmony-sig/rntpc_jpush-react-native) | [GitCode Releases](https://gitcode.com/openharmony-sig/jpush-react-native/releases) | 0.77 | +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 3.1.1@deprecated | [@react-native-oh-tpl/jpush-react-native Releases(deprecated)](https://github.com/react-native-oh-library/jpush-react-native/releases) | 0.72 | +| 3.1.2 | [@react-native-ohos/jpush-react-native Releases](https://gitcode.com/openharmony-sig/rntpc_jpush-react-native/releases) | 0.72 | +| 3.2.0 | [@react-native-ohos/jpush-react-native Releases](https://gitcode.com/openharmony-sig/rntpc_jpush-react-native/releases) | 0.77 | -## 安装与使用 +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -84,11 +87,15 @@ export default App; ``` ## 使用 Codegen -本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/codegen.md)。 +Version >= @react-native-ohos/jpush-react-native@3.1.2,已适配codegen-lib生成桥接代码。 + +本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/jpush-react-native@3.1.2,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -139,7 +146,9 @@ ohpm install ### 3. 配置 CMakeLists 和引入 RNJPushPackage -> V3.2.0 需要配置 CMakeLists 和引入 RNJPushPackage。 +> V3.1.2 需要配置 CMakeLists 和引入 RNJPushPackage。 + +打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff ... @@ -219,9 +228,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -1. RNOH: 0.72.33; SDK:HarmonyOS NEXT Beta1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +在以下版本验证通过: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; 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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; +3. RNOH: 0.77.18; SDK: HarmonyOS 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## 静态方法 diff --git a/zh-cn/react-native-SmartRefreshLayout.md b/zh-cn/react-native-SmartRefreshLayout.md index 6b097f40868ab5d760754d0d04cbfcaba3a5a9dc..5ecfc1efc2cef2eefb1b0d25cc76c22d80503eb6 100644 --- a/zh-cn/react-native-SmartRefreshLayout.md +++ b/zh-cn/react-native-SmartRefreshLayout.md @@ -14,14 +14,17 @@ > [!Tip] [Github 地址](https://github.com/react-native-oh-library/react-native-smartrefreshlayout) -该第三方库的仓库Github上,且支持直接从 npm 下载,新的包名为:@react-native-ohos/react-native-smartrefreshlayout,具体版本所属关系如下: +## 安装与使用 -| 三方库版本 | 包名 | 仓库地址 | 发布(Release) | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | ---------- | ---------- | -| 0.6.7| @react-native-oh-tpl/react-native-smartrefreshlayout | [Github](https://github.com/react-native-oh-library/react-native-SmartRefreshLayout)|[Github Releases](https://github.com/react-native-oh-library/react-native-SmartRefreshLayout/releases)|0.72 | -| 0.7.0| @react-native-ohos/react-native-smartrefreshlayout | [Github](https://github.com/react-native-oh-library/react-native-SmartRefreshLayout/tree/br_rnoh0.77) |[Github Releases]() | 0.77 | +请到三方库的 Releases 发布地址查看配套的版本信息: -## 安装与使用 +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 0.6.7@deprecated | [@react-native-oh-tpl/react-native-smartrefreshlayout Releases(deprecated)](https://github.com/react-native-oh-library/react-native-smartrefreshlayout/releases) | 0.72 | +| 0.6.8 | [@react-native-ohos/react-native-smartrefreshlayout Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-SmartRefreshLayout/releases) | 0.72 | +| 0.7.0 | [@react-native-ohos/react-native-smartrefreshlayout Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-SmartRefreshLayout/releases) | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -30,20 +33,12 @@ #### **npm** ```bash -# 0.72 -npm install @react-native-oh-tpl/react-native-smartrefreshlayout - -# 0.77 npm install @react-native-ohos/react-native-smartrefreshlayout ``` #### **yarn** ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-smartrefreshlayout - -# 0.77 yarn add @react-native-ohos/react-native-smartrefreshlayout ``` @@ -189,7 +184,9 @@ export default App; ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-smartrefreshlayout@0.6.8,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -220,10 +217,6 @@ export default App; "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - //0.72 - "@react-native-oh-tpl/react-native-smartrefreshlayout": "file:../../node_modules/@react-native-oh-tpl/react-native-smartrefreshlayout/harmony/smart_refresh_layout.har" - - //0.77 "@react-native-ohos/react-native-smartrefreshlayout": "file:../../node_modules/@react-native-ohos/react-native-smartrefreshlayout/harmony/smart_refresh_layout.har" } ``` @@ -243,6 +236,8 @@ ohpm install ### 3.配置 CMakeLists 和引入 SmartRefreshLayoutPackage +> V0.6.8 需要配置 CMakeLists 和引入 SmartRefreshLayoutPackage + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -263,10 +258,6 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_END: 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-smartrefreshlayout/src/main/cpp" ./smart-refresh-layout) - -# 0.77 + add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-smartrefreshlayout/src/main/cpp" ./smart-refresh-layout) # RNOH_END: manual_package_linking_1 @@ -306,10 +297,6 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... -+ // 0.72 -+ import { SmartRefreshPackage } from '@react-native-oh-tpl/react-native-smartrefreshlayout/ts'; - -+ // 0.77 + import { SmartRefreshPackage } from '@react-native-ohos/react-native-smartrefreshlayout/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -340,8 +327,11 @@ ohpm install 本文档内容基于以下版本验证通过: -1、RNOH: 0.72.38; SDK: HarmonyOS-5.0.0(API12); IDE: DevEco Studio 5.1.1.830; ROM: 6.0.0.112 SP12; -2、RNOH: 0.77.18; SDK: HarmonyOS-5.1.1.208(API19); IDE: DevEco Studio 5.1.1.830; ROM: 6.0.0.112 SP12; +在以下版本验证通过: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## 属性 diff --git a/zh-cn/react-native-amap-geolocation.md b/zh-cn/react-native-amap-geolocation.md index 40557a11c27925249f5212294d4f6a024178a5b2..1d779f40f8afde8bc44ad56c15d89758378a8fa3 100644 --- a/zh-cn/react-native-amap-geolocation.md +++ b/zh-cn/react-native-amap-geolocation.md @@ -15,18 +15,18 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-amap-geolocation) +## 安装与使用 + 请到三方库的 Releases 发布地址查看配套的版本信息: -| 三方库版本 | 发布信息 | 支持RN版本 | +| 三方库版本 | 发布信息 | 支持RN版本 | | ---------- | ------------------------------------------------------------ | ---------- | -| 1.2.3 | [@react-native-oh-tpl/react-native-amap-geolocation Releases](https://github.com/react-native-oh-library/react-native-amap-geolocation/releases) | 0.72 | -| 1.3.0 | [@react-native-ohos/react-native-amap-geolocation Releases]() | 0.77 | +| 1.2.3@deprecated | [@react-native-oh-tpl/react-native-amap-geolocation Releases(deprecated)](https://github.com/react-native-oh-library/react-native-amap-geolocation/releases) | 0.72 | +| 1.2.4 | [@react-native-ohos/react-native-amap-geolocation Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-amap-geolocation/releases) | 0.72 | +| 1.3.0 | [@react-native-ohos/react-native-amap-geolocation Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-amap-geolocation/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 -## 安装与使用 - - 进入到工程目录并输入以下命令: @@ -34,18 +34,12 @@ #### **npm** ```bash -# 0.72 -npm install @react-native-oh-tpl/react-native-amap-geolocation -# 0.77 npm install @react-native-ohos/react-native-amap-geolocation ``` #### **yarn** ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-amap-geolocation -# 0.77 yarn add @react-native-ohos/react-native-amap-geolocation ``` @@ -302,12 +296,15 @@ export default AmapGeoLocationDemo; ## 使用 Codegen -本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 +Version >= @react-native-ohos/react-native-amap-geolocation@1.2.4,已适配codegen-lib生成桥接代码。 +本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -目前HarmonyOS暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-amap-geolocation@1.2.4,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的HarmonyOS工程 `harmony` @@ -335,17 +332,6 @@ export default AmapGeoLocationDemo; 打开 `entry/oh-package.json5`,添加以下依赖 -- 0.72 - -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-amap-geolocation": "file:../../node_modules/@react-native-oh-tpl/react-native-amap-geolocation/harmony/amap_geolocation.har" - } -``` - -- 0.77 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -366,15 +352,47 @@ ohpm install > [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) -### 3.在 ArkTs 侧引入 AmapGeolocationPackage +### 3.配置 CMakeLists 和引入 AmapGeolocationPackage + +> V1.2.4 需要配置 CMakeLists 和引入 AmapGeolocationPackage + +打开 `entry/src/main/cpp/CMakeLists.txt`,添加: + +```diff ++ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules") + +# RNOH_BEGIN: manual_package_linking_1 ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-amap-geolocation/src/main/cpp" ./amap_geolocation) +# RNOH_END: manual_package_linking_1 + +# RNOH_BEGIN: manual_package_linking_2 ++ target_link_libraries(rnoh_app PUBLIC rnoh_amap_geolocation) +# RNOH_END: manual_package_linking_2 +``` + +打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: + +```diff +#include "RNOH/PackageProvider.h" +#include "generated/RNOHGeneratedPackage.h" ++ #include "AmapGeolocationPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { + std::make_shared(ctx), ++ std::make_shared(ctx), + }; +} +``` + +### 4.在 ArkTs 侧引入 AmapGeolocationPackage 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: ```diff ... -# 0.72 -+ import {AMapGeolocationPackage} from '@react-native-oh-tpl/react-native-amap-geolocation/ts'; -# 0.77 + import {AMapGeolocationPackage} from '@react-native-ohos/react-native-amap-geolocation/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -385,7 +403,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.运行 +### 5.运行 点击右上角的 `sync` 按钮 @@ -402,10 +420,13 @@ ohpm install ### 兼容性 -本文档内容基于以下版本验证通过: +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +在以下版本验证通过: -1. RNOH:0.72.33; SDK:OpenHarmony 5.0.0.71(API Version 12 Release); IDE:DevEco Studio 5.0.3.900; ROM:NEXT.0.0.71; -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 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ### 权限要求 diff --git a/zh-cn/react-native-audio-toolkit.md b/zh-cn/react-native-audio-toolkit.md index e838e52bdc13b5f8bccb0645fa0ac4cb2fb0210d..86ce7828b1cc07370b6c2cb8bec8b304a3bc0047 100644 --- a/zh-cn/react-native-audio-toolkit.md +++ b/zh-cn/react-native-audio-toolkit.md @@ -17,11 +17,13 @@ ## 安装与使用 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 2.0.3 | [@react-native-oh-tpl/audio-toolkit Releases](https://github.com/react-native-oh-library/react-native-audio-toolkit/releases) | 0.72 | -| 2.0.4 | [@react-native-ohos/audio-toolkit Releases]() | 0.77 | +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 2.0.3@deprecated | [@react-native-oh-tpl/audio-toolkit Releases(deprecated)](https://github.com/react-native-oh-library/react-native-audio-toolkit/releases) | 0.72 | +| 2.0.4 | [@react-native-ohos/audio-toolkit Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-audio-toolkit/releases) | 0.72 | +| 2.1.0 | [@react-native-ohos/audio-toolkit Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-audio-toolkit/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -32,18 +34,12 @@ #### **npm** ```bash -# 2.0.3 -npm install @react-native-oh-tpl/audio-toolkit -# 2.0.4 npm install @react-native-ohos/audio-toolkit ``` #### **yarn** ```bash -# 2.0.3 -yarn add @react-native-oh-tpl/audio-toolkit -# 2.0.4 yarn add @react-native-ohos/audio-toolkit ``` @@ -402,13 +398,15 @@ const styles = StyleSheet.create({ ## 使用 Codegen -> [!TIP] V2.0.4 for RN0.77 不需要执行 Codegen。 +Version >= @react-native-ohos/audio-toolkit@2.0.4,已适配codegen-lib生成桥接代码。 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/audio-toolkit@2.0.4,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -435,14 +433,6 @@ const styles = StyleSheet.create({ > [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。 打开 `entry/oh-package.json5`,添加以下依赖 -- V2.0.3 -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/audio-toolkit": "file:../../node_modules/@react-native-oh-tpl/audio-toolkit/harmony/audio_toolkit.har" - } -``` -- V2.0.4 ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -456,9 +446,6 @@ const styles = StyleSheet.create({ ```diff ... -// V2.0.3 -+ import { AudioModulesPackage } from "@react-native-oh-tpl/audio-toolkit/ts"; -// V2.0.4 + import { AudioModulesPackage } from "@react-native-ohos/audio-toolkit/ts"; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -484,7 +471,7 @@ ohpm install ### 4.配置 CMakeLists 和引入 AudioToolkitPackage -> [!TIP] V2.0.4 需要执行 +> V2.0.4 需要配置 CMakeLists 和引入 AudioToolkitPackage 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: @@ -563,13 +550,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 2.0.3 | [@react-native-oh-tpl/audio-toolkit Releases](https://github.com/react-native-oh-library/react-native-audio-toolkit/releases) | 0.72 | -| 2.0.4 | [@react-native-ohos/audio-toolkit Releases]() | 0.77 | +在以下版本验证通过: -对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ### 权限要求 diff --git a/zh-cn/react-native-background-timer.md b/zh-cn/react-native-background-timer.md index 59e99b791402f6d7debc2a1bcf9753f681a4425c..5961ab620ac827164e40ee94f25339ea3f35be2b 100644 --- a/zh-cn/react-native-background-timer.md +++ b/zh-cn/react-native-background-timer.md @@ -4,21 +4,20 @@

react-native-background-timer

-本项目基于 [react-native-background-timer@2.4.1](https://github.com/ocetnik/react-native-background-timer) 开发。 +> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-background-timer) + +## 1. 安装与使用 请到三方库的 Releases 发布地址查看配套的版本信息: | 三方库版本 | 发布信息 | 支持RN版本 | | ---------- | ------------------------------------------------------------ | ---------- | -| <= 2.4.1-0.0.2@deprecated | [@react-native-oh-tpl/react-native-background-timer Releases(deprecated)](https://github.com/react-native-oh-library/react-native-background-timer/releases) | 0.72 | +| 2.4.1@deprecated | [@react-native-oh-tpl/react-native-background-timer Releases(deprecated)](https://github.com/react-native-oh-library/react-native-background-timer/releases) | 0.72 | | 2.4.2 | [@react-native-ohos/react-native-background-timer Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-background-timer/releases) | 0.72 | | 2.5.0 | [@react-native-ohos/react-native-background-timer Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-background-timer/releases) | 0.77 | - 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 -## 1. 安装与使用 - 进入到工程目录并输入以下命令: @@ -206,6 +205,8 @@ const styles = StyleSheet.create({ ## 2. Manual Link +Version >= @react-native-ohos/react-native-background-timer@2.4.2,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + 此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 @@ -260,7 +261,7 @@ ohpm install ### 2.3 配置 CMakeLists 和引入 BackgroundTimerPackage -> [!TIP] 版本 v2.4.2 及以上需要. +> V2.4.2 需要配置 CMakeLists 和引入 BackgroundTimerPackage 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: @@ -367,11 +368,13 @@ ohpm install ### 3.1 兼容性 +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -本文档内容基于以下环境验证通过: +在以下版本验证通过: -1. RNOH: 0.72.38; SDK: HarmonyOS-5.0.0(API12); ROM: 5.0.0.107; -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 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## 4. API diff --git a/zh-cn/react-native-baidu-map.md b/zh-cn/react-native-baidu-map.md index 251357fcf2c3bef12178791ce5324617e1d581e9..1be9b264efcfae121798dcc030c14a286336ab5a 100644 --- a/zh-cn/react-native-baidu-map.md +++ b/zh-cn/react-native-baidu-map.md @@ -16,7 +16,15 @@ ## 安装与使用 -请到三方库的 Releases发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-baidu-map Releases](https://github.com/react-native-oh-library/react-native-baidu-map/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 1.0.37@deprecated | [@react-native-oh-tpl/react-native-baidu-map Releases(deprecated)](https://github.com/react-native-oh-library/react-native-baidu-map/releases) | 0.72 | +| 1.0.38 | [@react-native-ohos/react-native-baidu-map Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-baidu-map/releases) | 0.72 | +| 1.1.0 | [@react-native-ohos/react-native-baidu-map Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-baidu-map/releases) | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -25,13 +33,13 @@ #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-baidu-map +npm install @react-native-ohos/react-native-baidu-map ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-baidu-map +yarn add @react-native-ohos/react-native-baidu-map ``` @@ -155,7 +163,9 @@ export default App; ## Link -目前harmonyOS暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-baidu-map@1.0.38,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的harmonyOS工程 `harmony` @@ -186,7 +196,7 @@ export default App; ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", -"@react-native-oh-tpl/react-native-baidu-map": "file:../../node_modules/@react-native-oh-tpl/react-native-baidu-map/harmony/baidu_map.har" +"@react-native-ohos/react-native-baidu-map": "file:../../node_modules/@react-native-ohos/react-native-baidu-map/harmony/baidu_map.har" } ``` @@ -205,6 +215,8 @@ ohpm install ### 3.配置 CMakeLists 和引入 BaiduMapPackage +> V1.0.38 需要配置 CMakeLists 和引入 BaiduMapPackage + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -225,7 +237,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-baidu-map/src/main/cpp" ./baidu-map) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-baidu-map/src/main/cpp" ./baidu-map) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -268,7 +280,7 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... -+ import {BaiduMapPackage} from '@react-native-oh-tpl/react-native-baidu-map/ts'; ++ import {BaiduMapPackage} from '@react-native-ohos/react-native-baidu-map/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -298,7 +310,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { + BaiduMapOverlayText, + BaiduMapOverlayMarker, + BaiduMapView -+} from '@react-native-oh-tpl/react-native-baidu-map'; ++} from '@react-native-ohos/react-native-baidu-map'; @Builder export function buildCustomRNComponent(ctx: ComponentBuilderContext) { @@ -382,7 +394,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release配套的版本信息:[@react-native-oh-tpl/react-native-baidu-map Releases](https://github.com/react-native-oh-library/react-native-baidu-map/releases) +在以下版本验证通过: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ### 权限要求 diff --git a/zh-cn/react-native-bindingx.md b/zh-cn/react-native-bindingx.md index 0e45a49c2b68323eaa7e02836f9c86ee4788e46e..4c19ce3e0b228f027d033535ee7841f2be5da45c 100644 --- a/zh-cn/react-native-bindingx.md +++ b/zh-cn/react-native-bindingx.md @@ -14,15 +14,17 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-bindingx) -该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:@react-native-ohos/react-native-bindingx,具体版本所属关系如下: +## 安装与使用 +请到三方库的 Releases 发布地址查看配套的版本信息: -| 三方库版本 | 包名 | 仓库地址 | 发布(Release) | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | ---------- | ---------- | -| 1.0.3 | @react-native-oh-tpl/react-native-bindingx | [Github](https://github.com/react-native-oh-library/react-native-bindingx/tree/sig)|[Github Releases](https://github.com/react-native-oh-library/react-native-bindingx/releases)|0.72 | -| 1.1.0 | @react-native-ohos/react-native-bindingx | [Gitcode](https://gitcode.com/openharmony-sig/rntpc_react-native-bindingx/tree/br_rnoh0.77) |[Gitcode Releases]() | 0.77 | +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 1.0.3@deprecated | [@react-native-oh-tpl/react-native-bindingx Releases(deprecated)](https://github.com/react-native-oh-library/react-native-bindingx/releases) | 0.72 | +| 1.0.4 | [@react-native-ohos/react-native-bindingx Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-bindingx/releases) | 0.72 | +| 1.1.0 | [@react-native-ohos/react-native-bindingx Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-bindingx/releases) | 0.77 | -## 安装与使用 +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -31,20 +33,12 @@ #### **npm** ```bash -# 0.72 -npm install @react-native-oh-tpl/react-native-bindingx - -# 0.77 npm install @react-native-ohos/react-native-bindingx ``` #### **yarn** ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-bindingx - -# 0.77 yarn add @react-native-ohos/react-native-bindingx ``` @@ -168,7 +162,9 @@ const styles = StyleSheet.create({ ## Link -目前HarmonyOS暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-bindingx@1.0.4,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的HarmonyOS工程 `harmony` @@ -199,10 +195,6 @@ const styles = StyleSheet.create({ ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - // 0.72版本引入 - "@react-native-oh-tpl/react-native-bindingx": "file:../../node_modules/@react-native-oh-tpl/react-native-bindingx/harmony/bindingx.har" - - // 0.77版本引入 "@react-native-ohos/react-native-bindingx": "file:../../node_modules/@react-native-ohos/react-native-bindingx/harmony/bindingx.har" } ``` @@ -222,6 +214,8 @@ ohpm install ### 3.配置 CMakeLists 和引入 ReactBindingXPackge +> V1.0.4 需要配置 CMakeLists 和引入 ReactBindingXPackge + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -242,10 +236,6 @@ 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-bindingx/src/main/cpp" ./bindingx) - -# 0.77 + add_subdirectory("${OH_MODULES}/@react-native-oh-ohos/react-native-bindingx/src/main/cpp" ./bindingx) # RNOH_END: manual_package_linking_1 @@ -290,11 +280,7 @@ std::vector> PackageProvider::getPackages(Package::Cont 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: ```diff - ... -+ // 0.72 -+ import {ReactBindingXPackage} from '@react-native-oh-tpl/react-native-bindingx/ts'; - -+ // 0.77 + ... + import {ReactBindingXPackage} from '@react-native-ohos/react-native-bindingx/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -322,10 +308,13 @@ ohpm install ### 兼容性 -本文档内容基于以下版本验证通过: +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +在以下版本验证通过: -1、RNOH: 0.72.28; SDK: HarmonyOS-5.0.0(API12); IDE: DevEco Studio 5.1.1.830; ROM: 6.0.0.112 SP12; -2、RNOH: 0.77.18; SDK: HarmonyOS-5.1.1.208(API19); IDE: DevEco Studio 5.1.1.830; ROM: 6.0.0.112 SP12 +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## API diff --git a/zh-cn/react-native-calendar-events.md b/zh-cn/react-native-calendar-events.md index 069692d03af5e6598e02f9e3220cf33462d83754..7a806e8227b5d33b2035550c769d9163f6377753 100644 --- a/zh-cn/react-native-calendar-events.md +++ b/zh-cn/react-native-calendar-events.md @@ -16,7 +16,15 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-calendar-events Releases](https://github.com/react-native-oh-library/react-native-calendar-events/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 2.2.0@deprecated | [@react-native-oh-tpl/react-native-calendar-events Releases(deprecated)](https://github.com/react-native-oh-library/react-native-calendar-events/releases) | 0.72 | +| 2.2.1 | [@react-native-ohos/react-native-calendar-events Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-calendar-events/releases) | 0.72 | +| 2.3.0 | [@react-native-ohos/react-native-calendar-events Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-calendar-events/releases) | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -25,13 +33,13 @@ #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-calendar-events +npm install @react-native-ohos/react-native-calendar-events ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-calendar-events +yarn add @react-native-ohos/react-native-calendar-events ``` @@ -233,11 +241,15 @@ export default CalendarDemo; ## 使用 Codegen +Version >= @react-native-ohos/react-native-calendar-events@2.2.1,已适配codegen-lib生成桥接代码。 + 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/codegen.md)。 ## Link -目前HarmonyOS暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-calendar-events@2.2.1,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的HarmonyOS工程 `harmony` @@ -268,7 +280,7 @@ export default CalendarDemo; ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-calendar-events": "file:../../node_modules/@react-native-oh-tpl/react-native-calendar-events/harmony/calendar_events.har" + "@react-native-ohos/react-native-calendar-events": "file:../../node_modules/@react-native-ohos/react-native-calendar-events/harmony/calendar_events.har" } ``` @@ -285,13 +297,62 @@ ohpm install > [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) -### 3.在 ArkTs 侧引入 CalendarEventPackage +### 3.配置 CMakeLists 和引入 CalendarEventPackage + +> V2.2.1 需要配置 CMakeLists 和引入 CalendarEventPackage + +打开 `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-calendar-events/src/main/cpp" ./calendar_events) +# 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_calendar_events) +# RNOH_BEGIN: manual_package_linking_2 +``` + +打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: + +```diff +#include "RNOH/PackageProvider.h" ++ #include "CalendarEventPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { ++ std::make_shared(ctx) +} +``` + +### 4.在 ArkTs 侧引入 CalendarEventPackage 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: ```diff ... -+ import { CalendarEventPackage } from "@react-native-oh-tpl/react-native-calendar-events/ts" ++ import { CalendarEventPackage } from "@react-native-ohos/react-native-calendar-events/ts" export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -301,7 +362,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.运行 +### 5.运行 点击右上角的 `sync` 按钮 @@ -317,9 +378,14 @@ ohpm install ## 约束与限制 ### 兼容性 -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-calendar-events Releases](https://github.com/react-native-oh-library/react-native-calendar-events/releases) +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +在以下版本验证通过: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ### 权限要求 diff --git a/zh-cn/react-native-color-matrix-image-filters.md b/zh-cn/react-native-color-matrix-image-filters.md index d3d8e5ceead9e73e27fc1c735f292cae2eb6c6d2..25726a43815bd66baaeeade9b3d9455a592f351e 100644 --- a/zh-cn/react-native-color-matrix-image-filters.md +++ b/zh-cn/react-native-color-matrix-image-filters.md @@ -16,7 +16,15 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-color-matrix-image-filters Releases](https://github.com/react-native-oh-library/react-native-color-matrix-image-filters/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 6.0.5@deprecated | [@react-native-oh-tpl/react-native-color-matrix-image-filters Releases(deprecated)](https://github.com/react-native-oh-library/react-native-color-matrix-image-filters/releases) | 0.72 | +| 6.0.6 | [@react-native-ohos/react-native-color-matrix-image-filters Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-color-matrix-image-filters/releases) | 0.72 | +| 7.0.3 | [@react-native-ohos/react-native-color-matrix-image-filters Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-color-matrix-image-filters/releases) | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -25,13 +33,13 @@ #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-color-matrix-image-filters +npm install @react-native-ohos/react-native-color-matrix-image-filters ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-color-matrix-image-filters +yarn add @react-native-ohos/react-native-color-matrix-image-filters ``` @@ -76,7 +84,9 @@ const styles = StyleSheet.create({ ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-color-matrix-image-filters@6.0.6,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -107,7 +117,7 @@ const styles = StyleSheet.create({ ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-color-matrix-image-filters": "file:../../node_modules/@react-native-oh-tpl/react-native-color-matrix-image-filters/harmony/color_matrix_image_filters.har" + "@react-native-ohos/react-native-color-matrix-image-filters": "file:../../node_modules/@react-native-ohos/react-native-color-matrix-image-filters/harmony/color_matrix_image_filters.har" } ``` @@ -129,7 +139,7 @@ ohpm install ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", -"@react-native-oh-tpl/react-native-color-matrix-image-filters": "file:../../node_modules/@react-native-oh-tpl/react-native-color-matrix-image-filters/harmony/color_matrix_image_filters" +"@react-native-ohos/react-native-color-matrix-image-filters": "file:../../node_modules/@react-native-ohos/react-native-color-matrix-image-filters/harmony/color_matrix_image_filters" } ``` @@ -142,6 +152,8 @@ ohpm install --no-link ### 3.配置 CMakeLists 和引入 ColorMatrixImageFiltersPackage +> V6.0.6 需要配置 CMakeLists 和引入 ColorMatrixImageFiltersPackage + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -162,7 +174,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-color-matrix-image-filters/src/main/cpp" ./color_matrix_image_filters) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-color-matrix-image-filters/src/main/cpp" ./color_matrix_image_filters) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -199,8 +211,23 @@ std::vector> PackageProvider::getPackages(Package::Cont } ``` +### 4.在 ArkTs 侧引入 ColorMatrixImageFiltersPackage + +打开 `entry/src/main/ets/RNPackagesFactory.ets`,添加: + +```diff + ... ++ import {ColorMatrixImageFiltersPackage} from '@react-native-ohos/react-native-color-matrix-image-filters'; + +export function createRNPackages(ctx: RNPackageContext): RNPackage[] { + return [ + new SamplePackage(ctx), ++ new ColorMatrixImageFiltersPackage(ctx) + ]; +} +``` -### 4.运行 +### 5.运行 点击右上角的 `sync` 按钮 @@ -219,8 +246,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-color-matrix-image-filters Releases](https://github.com/react-native-oh-library/react-native-color-matrix-image-filters/releases) +在以下版本验证通过: +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## 属性 diff --git a/zh-cn/react-native-community-progress-view.md b/zh-cn/react-native-community-progress-view.md index cacc9cfad1e42ec1a0597746cce2f1a1b43dbb7a..5a68262f57ce940c82382871b7c842fe3c5cc8d9 100644 --- a/zh-cn/react-native-community-progress-view.md +++ b/zh-cn/react-native-community-progress-view.md @@ -5,17 +5,19 @@

-本项目基于 [react-native-community/progress-view@1.4.2](https://github.com/react-native-progress-view/progress-view) 开发。 +> [!TIP] [Github 地址](https://github.com/react-native-oh-library/progress-view) + +## 安装与使用 请到三方库的 Releases 发布地址查看配套的版本信息: -| Version | Package Name | Repository | Release | RN Version | -| ------------------------------ | ---------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ----------- -| <= 1.4.2@deprecated | @react-native-oh-tpl/progress-view | [Github(deprecated)](https://github.com/react-native-oh-library/progress-view) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/progress-view/releases) | 0.72 | -| 1.4.3 | @react-native-ohos/progress-view | [Gitcode](https://gitcode.com/openharmony-sig/rntpc_progress-view) | [Gitcode Releases](https://gitcode.com/openharmony-sig/rntpc_progress-view/releases) | 0.72 | -| 1.5.0 | @react-native-ohos/progress-view | [Gitcode](https://gitcode.com/openharmony-sig/rntpc_progress-view) | [Gitcode Releases](https://gitcode.com/openharmony-sig/rntpc_progress-view/releases) | 0.77 | +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 1.4.2@deprecated | [@react-native-oh-tpl/progress-view Releases(deprecated)](https://github.com/react-native-oh-library/progress-view/releases) | 0.72 | +| 1.4.3 | [@react-native-ohos/progress-view Releases](https://gitcode.com/openharmony-sig/rntpc_progress-view/releases) | 0.72 | +| 1.5.0 | [@react-native-ohos/progress-view Releases](https://gitcode.com/openharmony-sig/rntpc_progress-view/releases) | 0.77 | -## 安装与使用 +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -55,6 +57,8 @@ export default function ProgressViewExample() { ## 2. Manual Link +Version >= @react-native-ohos/progress-view@1.4.3,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + 此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 @@ -110,6 +114,8 @@ ohpm install ### 2.3 配置 CMakeLists 和引入 ProgressViewPackage +> V1.4.3 需要配置 CMakeLists 和引入 ProgressViewPackage + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -224,9 +230,13 @@ ohpm install ### 3.1 兼容性 -本文档内容基于以下版本验证通过: -1. RNOH:0.72.38; SDK:HarmonyOS-5.0.0(API12); IDE: DevEco Studio 5.1.1.830; ROM:5.0.0.110; -2. RNOH:0.77.18; SDK:HarmonyOS 6.0.0 Release; IDE: DevEco Studio 6.0.0.858; ROM:6.0.0.112; +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +在以下版本验证通过: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## 4. 属性 diff --git a/zh-cn/react-native-compass-heading.md b/zh-cn/react-native-compass-heading.md index a5b5b3abf18309ca992df837f49de4722d007a81..216f7227bfe107f9501687ae2ac8034ffb774500 100644 --- a/zh-cn/react-native-compass-heading.md +++ b/zh-cn/react-native-compass-heading.md @@ -20,8 +20,9 @@ | 三方库版本 | 发布信息 | 支持RN版本 | | ---------- | ------------------------------------------------------------ | ---------- | -| 1.5.0 | [@react-native-oh-tpl/react-native-compass-heading Releases](https://gitee.com/link?target=https%3A%2F%2Fgithub.com%2Freact-native-oh-library%2Freact-native-compass-heading%2Freleases) | 0.72 | -| 2.0.2 | [@react-native-ohos/react-native-compass-heading Releases]() | 0.77 | +| 1.5.0@deprecated | [@react-native-oh-tpl/react-native-compass-heading Releases(deprecated)](https://github.com/react-native-oh-library/react-native-compass-heading/releases) | 0.72 | +| 1.5.1 | [@react-native-ohos/react-native-compass-heading Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-compass-heading/releases) | 0.72 | +| 2.0.3 | [@react-native-ohos/react-native-compass-heading Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-compass-heading/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -32,20 +33,12 @@ #### **npm** ```bash -# V1.5.0 -npm install @react-native-oh-tpl/react-native-compass-heading - -# V2.0.2 npm install @react-native-ohos/react-native-compass-heading ``` #### **yarn** ```bash -# V1.5.0 -yarn add @react-native-oh-tpl/react-native-compass-heading - -# V2.0.2 yarn add @react-native-ohos/react-native-compass-heading ``` @@ -112,13 +105,15 @@ const styles = StyleSheet.create({ ## 使用 Codegen -> [!TIP] V2.0.2 不需要执行 Codegen。 +Version >= @react-native-ohos/react-native-compass-heading@1.5.1,已适配codegen-lib生成桥接代码。 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-compass-heading@1.5.1,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -146,17 +141,6 @@ const styles = StyleSheet.create({ 打开 `entry/oh-package.json5`,添加以下依赖 -- V1.5.0 - -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-compass-heading": "file:../../node_modules/@react-native-oh-tpl/react-native-compass-heading/harmony/compass_heading.har" - } -``` - -- V2.0.2 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -179,7 +163,7 @@ ohpm install ### 3.配置 CMakeLists 和引入 RNCompassHeadingPackage -> V2.0.2 需要配置 CMakeLists 和引入 RNCompassHeadingPackage。 +> V1.5.1 需要配置 CMakeLists 和引入 RNCompassHeadingPackage。 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: @@ -236,10 +220,6 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... -// V1.5.0 -+ import {RNCompassHeadingPackage} from '@react-native-oh-tpl/react-native-compass-heading/ts'; - -// V2.0.2 + import {RNCompassHeadingPackage} from '@react-native-ohos/react-native-compass-heading/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -269,12 +249,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +在以下版本验证通过: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 1.5.0 | [@react-native-oh-tpl/react-native-compass-heading Releases](https://gitee.com/link?target=https%3A%2F%2Fgithub.com%2Freact-native-oh-library%2Freact-native-compass-heading%2Freleases) | 0.72 | -| 2.0.2 | [@react-native-ohos/react-native-compass-heading Releases]() | 0.77 | +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## 静态方法 diff --git a/zh-cn/react-native-cookies-cookies.md b/zh-cn/react-native-cookies-cookies.md index 4997ce30a3ed8b50a63141c0d9d6b1faa19b649f..ce990378ae6b067e909f65129f78ab7f7dd4c990 100644 --- a/zh-cn/react-native-cookies-cookies.md +++ b/zh-cn/react-native-cookies-cookies.md @@ -18,10 +18,11 @@ 请到三方库的 Releases 发布地址查看配套的版本信息: -| 三方库版本 | 发布信息 | 支持RN版本 | +| 三方库版本 | 发布信息 | 支持RN版本 | | ---------- | ------------------------------------------------------------ | ---------- | -| 6.2.1 | [@react-native-oh-tpl/cookies Releases](https://github.com/react-native-oh-library/react-native-cookies) | 0.72 | -| 6.3.0 | [@react-native-ohos/cookies Releases](https://gitcode.com/openharmony-sig/rntpc_cookies/releases) | 0.77 | +| 6.2.1@deprecated | [@react-native-oh-tpl/cookies Releases(deprecated)](https://github.com/react-native-oh-library/react-native-cookies/releases) | 0.72 | +| 6.2.2 | [@react-native-ohos/cookies Releases](https://gitcode.com/openharmony-sig/rntpc_cookies/releases) | 0.72 | +| 6.3.0 | [@react-native-ohos/cookies Releases](https://gitcode.com/openharmony-sig/rntpc_cookies/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -32,20 +33,12 @@ #### **npm** ```bash -# V6.2.1 -npm install @react-native-oh-tpl/cookies - -# V6.3.0 npm install @react-native-ohos/cookies ``` #### **yarn** -```bash -# V6.2.1 -yarn add @react-native-oh-tpl/cookies - -# V6.3.0 +``` yarn add @react-native-ohos/cookies ``` @@ -201,7 +194,7 @@ const styles = StyleSheet.create({ ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/cookies@6.2.2,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` ### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 @@ -228,23 +221,10 @@ const styles = StyleSheet.create({ 打开 `entry/oh-package.json5`,添加以下依赖 -- 0.72 - -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - - "@react-native-oh-tpl/op-sqlite": "file:../../node_modules/@react-native-oh-tpl/cookies/harmony/rn_cookies.har" - } -``` - -- 0.77 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - - "@react-native-ohos/op-sqlite": "file:../../node_modules/@react-native-ohos/cookies/harmony/rn_cookies.har" + "@react-native-ohos/cookies": "file:../../node_modules/@react-native-ohos/cookies/harmony/rn_cookies.har", } ``` @@ -263,6 +243,8 @@ ohpm install ### 3.配置 CMakeLists 和引入 CookiesPackage +> V6.2.2 需要配置 CMakeLists 和引入 CookiesPackage + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -279,7 +261,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/cookies/src/main/cpp" ./rn_cookies) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/cookies/src/main/cpp" ./rn_cookies) # RNOH_BEGIN: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -318,20 +300,6 @@ std::vector> PackageProvider::getPackages(Package::Cont 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: -- 0.72 -```diff -... -+ import {CookiesPackage} from '@react-native-oh-tpl/cookies/ts'; - -export function createRNPackages(ctx: RNPackageContext): RNPackage[] { - return [ - ... -+ new CookiesPackage(ctx), - ]; -} -``` - -- 0.77 ```diff ... + import {CookiesPackage} from '@react-native-ohos/cookies/ts'; @@ -363,11 +331,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -本文档内容基于以下版本验证通过: - -1. RNOH:0.72.33; SDK:OpenHarmony 5.0.0.71(API Version 12 Release); IDE:DevEco Studio 5.0.3.900; ROM:NEXT.0.0.71; -2. RNOH:0.77.18; SDK:HarmonyOS 5.1.1 Release; IDE: DevEco Studio 5.1.1.830; ROM:NEXT 5.1.0.150; +在以下版本验证通过: +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## 静态方法 > [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 diff --git a/zh-cn/react-native-exit-app.md b/zh-cn/react-native-exit-app.md index 07d30ea6dea3315ca84c5ef571277c39486cf627..0f6d1611c5aa7bc1275275b65b424514233c35b1 100644 --- a/zh-cn/react-native-exit-app.md +++ b/zh-cn/react-native-exit-app.md @@ -21,8 +21,9 @@ | 三方库版本 | 发布信息 | 支持RN版本 | | ---------- | ------------------------------------------------------------ | ---------- | -| 2.0.0 | [@react-native-oh-tpl/react-native-exit-app Releases](https://github.com/react-native-oh-library/react-native-exit-app/releases) | 0.72 | -| 2.1.0 | @react-native-ohos/react-native-exit-app Releases Releases | 0.77 | +| 2.0.0@deprecated | [@react-native-oh-tpl/react-native-exit-app Releases(deprecated)](https://github.com/react-native-oh-library/react-native-exit-app/releases) | 0.72 | +| 2.0.1 | [@react-native-ohos/react-native-exit-app Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-exit-app/releases) | 0.72 | +| 2.1.0 | [@react-native-ohos/react-native-exit-app Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-exit-app/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -32,18 +33,12 @@ #### **npm** ```bash -# 0.72 -npm install @react-native-oh-tpl/react-native-exit-app -# 0.77 npm install @react-native-ohos/react-native-exit-app ``` #### **yarn** ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-exit-app -# 0.77 yarn add @react-native-ohos/react-native-exit-app ``` @@ -91,11 +86,15 @@ export default App; ## 使用 Codegen +Version >= @react-native-ohos/react-native-exit-app@2.0.1,已适配codegen-lib生成桥接代码。 + 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-exit-app@2.0.1,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -123,17 +122,6 @@ export default App; 打开 `entry/oh-package.json5`,添加以下依赖 -* 0.72 - -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-exit-app": "file:../../node_modules/@react-native-oh-tpl/react-native-exit-app/harmony/exit_app.har" - } -``` - -* 0.77 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -154,8 +142,9 @@ ohpm install > [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) -### 3.配置 CMakeLists 和引入 RNMlkitOcrPackage +### 3.配置 CMakeLists 和引入 ExitAppPackage +> V2.0.1 需要配置 CMakeLists 和引入 ExitAppPackage 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: @@ -195,15 +184,31 @@ target_link_libraries(rnoh_app PUBLIC rnoh_sample_package) # RNOH_END: manual_package_linking_2 ``` +打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: + +``` +#include "RNOH/PackageProvider.h" +#include "generated/RNOHGeneratedPackage.h" +#include "SamplePackage.h" ++ #include "ExitAppPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { + std::make_shared(ctx), + std::make_shared(ctx), ++ std::make_shared(ctx), + }; +} +``` + ### 4.在 ArkTs 侧引入 ExitAppPackage 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: ```diff - ... - # 0.72 -+ import { ExitAppPackage } from '@react-native-oh-tpl/react-native-exit-app/ts'; - # 0.77 + ... + import { ExitAppPackage } from '@react-native-ohos/react-native-exit-app/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -231,9 +236,13 @@ ohpm install ### 兼容性 -本文档内容基于以下版本验证通过: -1. RNOH:0.72.86; SDK:HarmonyOS 6.0.0.47 (API Version 20); IDE:DevEco Studio 6.0.0.858; ROM:6.0.0.107; -2. RNOH:0.77.18; SDK:HarmonyOS 6.0.0.47 (API Version 20); IDE:DevEco Studio 6.0.0.858; ROM:6.0.0.107; +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +在以下版本验证通过: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## 静态方法 diff --git a/zh-cn/react-native-image-marker.md b/zh-cn/react-native-image-marker.md index badcd536a07ba667d83e7125debc5861f73871f1..bc9ae036f4eb34ac63e64d7e20b7838917b2188e 100644 --- a/zh-cn/react-native-image-marker.md +++ b/zh-cn/react-native-image-marker.md @@ -15,17 +15,18 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-image-marker) +## 安装与使用 + 请到三方库的 Releases 发布地址查看配套的版本信息: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 1.2.6 | [@react-native-oh-tpl/react-native-image-marker Releases](https://github.com/react-native-oh-library/react-native-image-marker/releases) | 0.72 | -| 1.3.0 | [@react-native-ohos/react-native-image-marker Releases]() | 0.77 | +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 1.2.6@deprecated | [@react-native-oh-tpl/react-native-image-marker Releases(deprecated)](https://github.com/react-native-oh-library/react-native-image-marker/releases) | 0.72 | +| 1.2.7 | [@react-native-ohos/react-native-image-marker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-image-marker/releases) | 0.72 | +| 1.3.0 | [@react-native-ohos/react-native-image-marker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-image-marker/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 -## 安装与使用 - 进入到工程目录并输入以下命令: @@ -35,20 +36,12 @@ #### **npm** ```bash -# V0.72 -npm install @react-native-oh-tpl/react-native-image-marker - -# 0.77 npm install @react-native-ohos/react-native-image-marker ``` #### **yarn** ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-image-marker - -# 0.77 yarn add @react-native-ohos/react-native-image-marker ``` @@ -203,11 +196,15 @@ export const ImageMarkerText = () => { ## 使用 Codegen +Version >= @react-native-ohos/react-native-image-marker@1.2.7,已适配codegen-lib生成桥接代码。 + 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-image-marker@1.2.7,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -235,17 +232,6 @@ export const ImageMarkerText = () => { 打开 `entry/oh-package.json5`,添加以下依赖 -- 0.72 - -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-image-marker": "file:../../node_modules/@react-native-oh-tpl/react-native-image-marker/harmony/image_marker.har" - } -``` - -- 0.77 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -266,16 +252,61 @@ ohpm install > [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) -### 3.在 ArkTs 侧引入 RNImageMarkerPackage +### 3.配置 CMakeLists 和引入 RNImageMarkerPackage + +> V1.2.7 需要配置 CMakeLists 和引入 RNImageMarkerPackage + +打开 `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-image-marker/src/main/cpp" ./image_marker) +# 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_image_marker) +# RNOH_BEGIN: manual_package_linking_2 +``` + +Open `entry/src/main/cpp/PackageProvider.cpp`,and add: + +```diff +#include "RNOH/PackageProvider.h" ++ #include "RNImageMarkerPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { ++ std::make_shared(ctx) +} +``` + +### 4.在 ArkTs 侧引入 RNImageMarkerPackage 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: ```diff ... -// 0.72 -+ import {RNImageMarkerPackage} from '@react-native-oh-tpl/react-native-image-marker/ts'; - -// 0.77 + import {RNImageMarkerPackage} from '@react-native-ohos/react-native-image-marker/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -286,7 +317,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.运行 +### 5.运行 点击右上角的 `sync` 按钮 @@ -303,10 +334,13 @@ ohpm install ### 兼容性 +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + 本文档内容基于以下版本验证通过: -1. RNOH:0.72.33; SDK:OpenHarmony 5.0.0.71(API Version 12 Release); IDE:DevEco Studio 5.0.3.900; ROM:NEXT.0.0.71; -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 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ### 权限要求 diff --git a/zh-cn/react-native-image-picker.md b/zh-cn/react-native-image-picker.md index cb295b9ca8355ddee93a62a543bfa7e2acb6635e..0357ebf5b72a40693d3709cb95620d30443331c6 100644 --- a/zh-cn/react-native-image-picker.md +++ b/zh-cn/react-native-image-picker.md @@ -16,7 +16,15 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-image-picker Releases](https://github.com/react-native-oh-library/react-native-image-picker/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 7.0.3@deprecated | [@react-native-oh-tpl/react-native-image-picker Releases(deprecated)](https://github.com/react-native-oh-library/react-native-image-picker/releases) | 0.72 | +| 7.0.4 | [@react-native-ohos/react-native-image-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-image-picker/releases) | 0.72 | +| 8.2.2 | [@react-native-ohos/react-native-image-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-image-picker/releases) | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -25,13 +33,13 @@ #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-image-picker +npm install @react-native-ohos/react-native-image-picker ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-image-picker +yarn add @react-native-ohos/react-native-image-picker ``` @@ -75,7 +83,9 @@ export default App; ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-image-picker@7.0.4,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -107,7 +117,7 @@ export default App; "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-image-picker": "file:../../node_modules/@react-native-oh-tpl/react-native-image-picker/harmony/image_picker.har" + "@react-native-ohos/react-native-image-picker": "file:../../node_modules/@react-native-ohos/react-native-image-picker/harmony/image_picker.har" } ``` @@ -126,6 +136,8 @@ ohpm install ### 3.配置 CMakeLists 和引入 ImagePickerViewPackage +> V7.0.4 需要配置 CMakeLists 和引入 ImagePickerViewPackage + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -146,7 +158,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-image-picker/src/main/cpp" ./image_picker) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-image-picker/src/main/cpp" ./image_picker) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -189,7 +201,7 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... -+ import { ImagePickerViewPackage } from '@react-native-oh-tpl/react-native-image-picker/ts'; ++ import { ImagePickerViewPackage } from '@react-native-ohos/react-native-image-picker/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -218,7 +230,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-image-picker Releases](https://github.com/react-native-oh-library/react-native-image-picker/releases) +在以下版本验证通过: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## 属性 diff --git a/zh-cn/react-native-incall-manager.md b/zh-cn/react-native-incall-manager.md index b7c11ead8d67eed196b276016d19ae7e3ad0284c..e50bde4b49139789e7046b214315da307b08aa17 100644 --- a/zh-cn/react-native-incall-manager.md +++ b/zh-cn/react-native-incall-manager.md @@ -497,7 +497,7 @@ export default function InCallManagerExample() { ``` ## Link -Version > @react-native-ohos/react-native-incall-manager@3.1.0,已支持 Autolink,无需手动配置,目前只支持72框架。 +Version > @react-native-ohos/react-native-incall-manager@4.2.1,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md 此步骤为手动配置原生依赖项的指导。 diff --git a/zh-cn/react-native-keys.md b/zh-cn/react-native-keys.md index 5acf29e0e6366f295958c8cb55409ed1f3b5dc57..8f115712b4d04c70259c568efff674317ddfae05 100644 --- a/zh-cn/react-native-keys.md +++ b/zh-cn/react-native-keys.md @@ -18,10 +18,17 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-library/react-native-keys Releases](https://github.com/react-native-oh-library/react-native-keys/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: -进入到工程目录并输入以下命令: +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 0.7.11@deprecated | [@react-native-oh-tpl/react-native-keys Releases(deprecated)](https://github.com/react-native-oh-library/react-native-keys/releases) | 0.72 | +| 0.7.12 | [@react-native-ohos/react-native-keys Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-keys/releases) | 0.72 | +| 0.8.0 | [@react-native-ohos/react-native-keys Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-keys/releases) | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +进入到工程目录并输入以下命令: @@ -29,13 +36,13 @@ #### npm ```bash -npm install @react-native-oh-tpl/react-native-keys +npm install @react-native-ohos/react-native-keys ``` #### yarn ```bash -yarn add @react-native-oh-tpl/react-native-keys +yarn add @react-native-ohos/react-native-keys ``` @@ -44,7 +51,7 @@ yarn add @react-native-oh-tpl/react-native-keys >[!WARNING] 使用时 import 的库名不变。 -1. Create a new file keys.development.json in the root of your React Native app and add Envs in secure object for protected envs variables and add Envs in public for public usage this: +1. 在React Native应用的根目录下创建一个新文件keys.development.json,并在secure object中添加受保护的变量Envs,并在public中添加Envs以供公共使用: ```json { @@ -62,7 +69,7 @@ yarn add @react-native-oh-tpl/react-native-keys ``` -2. Use Public Keys & Secure Keys +2. 使用公钥 & 安全钥匙 ``` js import Keys from 'react-native-keys'; @@ -78,7 +85,9 @@ Keys.secureFor('SECRET_KEY'); ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-keys@0.7.12,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -109,7 +118,7 @@ Keys.secureFor('SECRET_KEY'); ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-keys": "file:../../node_modules/@react-native-oh-tpl/react-native-keys/harmony/rnoh_keys.har" + "@react-native-ohos/react-native-keys": "file:../../node_modules/@react-native-ohos/react-native-keys/harmony/rnoh_keys.har" } ``` @@ -128,6 +137,8 @@ ohpm install ### 3.配置 CMakeLists 和引入 RNOHKeysPackage +> V0.7.12 需要配置 CMakeLists 和引入 RNOHKeysPackage + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -148,7 +159,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-keys/src/main/cpp" ./rnohkeys) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-keys/src/main/cpp" ./rnohkeys) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -191,7 +202,7 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... -+ import { RNKeysPackage } from '@react-native-oh-tpl/react-native-keys'; ++ import { RNKeysPackage } from '@react-native-ohos/react-native-keys'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -230,8 +241,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-library/react-native-keys Releases](https://github.com/react-native-oh-library/react-native-keys/releases) +在以下版本验证通过: +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## API diff --git a/zh-cn/react-native-maps.md b/zh-cn/react-native-maps.md index de4ca7518006ea2f8cd975f29e07ab34d7fb2b86..722a8680a7cffd53ec1d153f2cdbd5c01a98c898 100644 --- a/zh-cn/react-native-maps.md +++ b/zh-cn/react-native-maps.md @@ -18,10 +18,13 @@ 请到三方库的 Releases 发布地址查看配套的版本信息: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 1.10.3 | [@react-native-oh-tpl/react-native-maps Releases](https://github.com/react-native-oh-library/react-native-maps/releases) | 0.72 | -| 1.24.4 | [@react-native-ohos/react-native-maps Releases]() | 0.77 | +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 1.10.3@deprecated | [@react-native-oh-tpl/react-native-maps Releases(deprecated)](https://github.com/react-native-oh-library/react-native-maps/releases) | 0.72 | +| 1.10.4 | [@react-native-ohos/react-native-maps Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-maps/releases) | 0.72 | +| 1.24.4 | [@react-native-ohos/react-native-maps Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-maps/releases) | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -30,13 +33,13 @@ #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-maps +npm install @react-native-ohos/react-native-maps ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-maps +yarn add @react-native-ohos/react-native-maps ``` @@ -199,7 +202,9 @@ const styles = StyleSheet.create({ ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-maps@1.10.4,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -230,7 +235,7 @@ const styles = StyleSheet.create({ ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-maps": "file:../../node_modules/@react-native-oh-tpl/react-native-maps/harmony/maps.har" + "@react-native-ohos/react-native-maps": "file:../../node_modules/@react-native-ohos/react-native-maps/harmony/maps.har" } ``` @@ -249,6 +254,8 @@ ohpm install ### 3.配置 CMakeLists 和引入 MapsPackge +> V1.10.4 需要配置 CMakeLists 和引入 MapsPackge + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -269,7 +276,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-maps/src/main/cpp" ./maps) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-maps/src/main/cpp" ./maps) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -327,7 +334,7 @@ std::vector> PackageProvider::getPackages(Package::Cont + AIRMapOverlay, + AIR_MAP_CLUSTER_TYPE, + AIRMapCluster, -+ } from "@react-native-oh-tpl/react-native-maps" ++ } from "@react-native-ohos/react-native-maps" @Builder export function buildCustomRNComponent(ctx: ComponentBuilderContext) { @@ -430,7 +437,7 @@ const arkTsComponentNames: Array = [ ```diff ... -+ import {MapsPackage} from '@react-native-oh-tpl/react-native-maps/ts'; ++ import {MapsPackage} from '@react-native-ohos/react-native-maps/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -459,13 +466,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[react-natvie-maps Releases](https://github.com/react-native-oh-library/react-native-maps/releases) - -本文档内容基于以下版本验证通过: +在以下版本验证通过: -1. RNOH: 0.72.27; SDK: HarmonyOS-Next-DB1 5.0.0.29(SP1); IDE: DevEco Studio 5.0.3.403; ROM: 3.0.0.25; -2. RNOH:0.72.33; SDK:OpenHarmony 5.0.0.71(API Version 12 Release); IDE:DevEco Studio 5.0.3.900; ROM:NEXT.0.0.71; -3. RNOH:0.77.18; SDK:HarmonyOS 5.1.1 Release; IDE: DevEco Studio 5.1.1.830; ROM:NEXT 5.1.0.150; +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ### 权限要求 diff --git a/zh-cn/react-native-mlkit-ocr.md b/zh-cn/react-native-mlkit-ocr.md index 5bdecace76efa2278e8e0dfdec7c7dbbf26c4c0b..50db4b5fca86761a545967822e0af227b54759ad 100644 --- a/zh-cn/react-native-mlkit-ocr.md +++ b/zh-cn/react-native-mlkit-ocr.md @@ -16,7 +16,15 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-mlkit-ocr Releases](https://github.com/react-native-oh-library/react-native-mlkit-ocr/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 0.3.0@deprecated | [@react-native-oh-tpl/react-native-mlkit-ocr Releases(deprecated)](https://github.com/react-native-oh-library/react-native-mlkit-ocr/releases) | 0.72 | +| 0.3.1 | [@react-native-ohos/react-native-mlkit-ocr Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-mlkit-ocr/releases) | 0.72 | +| 0.4.0 | [@react-native-ohos/react-native-mlkit-ocr Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-mlkit-ocr/releases) | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -25,13 +33,13 @@ #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-mlkit-ocr +npm install @react-native-ohos/react-native-mlkit-ocr ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-mlkit-ocr +yarn add @react-native-ohos/react-native-mlkit-ocr ``` @@ -138,7 +146,9 @@ export const OcrTest = () => { ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-mlkit-ocr@0.3.1,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -170,7 +180,7 @@ export const OcrTest = () => { "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-mlkit-ocr": "file:../../node_modules/@react-native-oh-tpl/react-native-mlkit-ocr/harmony/rn_mlkit_ocr.har" + "@react-native-ohos/react-native-mlkit-ocr": "file:../../node_modules/@react-native-ohos/react-native-mlkit-ocr/harmony/rn_mlkit_ocr.har" } ``` @@ -189,6 +199,8 @@ ohpm install ### 3.配置 CMakeLists 和引入 RNMlkitOcrPackage +> V0.3.1 需要配置 CMakeLists 和引入 RNMlkitOcrPackage + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -209,7 +221,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_MODULE_DIR}/@react-native-oh-tpl/react-native-mlkit-ocr/src/main/cpp" ./rn_mlkit_ocr) ++ add_subdirectory("${OH_MODULE_DIR}/@react-native-ohos/react-native-mlkit-ocr/src/main/cpp" ./rn_mlkit_ocr) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -249,7 +261,7 @@ std::vector> PackageProvider::getPackages(Package::Cont 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: ```diff -+ import { RNMlkitOcrPackage } from '@react-native-oh-tpl/react-native-mlkit-ocr/ts'; ++ import { RNMlkitOcrPackage } from '@react-native-ohos/react-native-mlkit-ocr/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -303,9 +315,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-mlkit-ocr Releases](https://github.com/react-native-oh-library/react-native-mlkit-ocr/releases) - +在以下版本验证通过: +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## API 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 08bb3dd47453b1648ae67bfb8465b78af806e804..0b36239aa4da28b4fbe7a44ae551a42f57c7b3a8 100644 --- a/zh-cn/react-native-oh-tpl-react-native-screens.md +++ b/zh-cn/react-native-oh-tpl-react-native-screens.md @@ -23,7 +23,7 @@ 如未引入请参照 [@react-navigation/native 文档的 Link 章节](/zh-cn/react-navigation-native.md) ,[@react-native-oh-tpl/react-native-gesture-handler 文档的 Link 章节](/zh-cn/react-native-gesture-handler.md) ,[@react-native-oh-tpl/react-native-safe-area-context 文档的 Link 章节](/zh-cn/react-native-safe-area-context.md)进行引入。 -### 4.8.1 +### 3.34.1 本库实现依赖 @react-navigation/native 、 @react-navigation/native-stack 、 @react-native-ohos/react-native-safe-area-context 、 @react-native-ohos/react-native-gesture-handler、@react-native-ohos/react-native-reanimated 的原生端代码,如已在工程中引入过该库,则无需再次引入,可跳过本章节步骤,直接使用。 注:若已引入 `@react-native-oh-tpl/native-stack,@react-native-ohos/native-stack` 库,请务必卸载,否则本库将无法正确指向,导致无法使用。 @@ -31,10 +31,12 @@ 如未引入请参照 [@react-navigation/native 文档的 Link 章节](/zh-cn/react-navigation-native.md) ,[@react-native-ohos/react-native-gesture-handler 文档的 Link 章节](/zh-cn/react-native-gesture-handler.md) ,[@react-native-ohos/react-native-safe-area-context 文档的 Link 章节](/zh-cn/react-native-safe-area-context.md),[@react-native-ohos/react-native-reanimated 文档的 Link 章节](/zh-cn/react-native-reanimated.md)进行引入。 请到三方库的 Releases 发布地址查看配套的版本信息: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ----------- | ------------------------------------------------------------ | ---------- | -|3.34.0|[@react-native-oh-tpl/react-native-screens Releases](https://github.com/react-native-oh-library/react-native-harmony-screens/releases) |0.72| -|4.8.1|[@react-native-ohos/react-native-screens Releases]() |0.77| + +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 3.34.0@deprecated | [@react-native-oh-tpl/react-native-screens Releases(deprecated)](https://github.com/react-native-oh-library/react-native-harmony-screens/releases) | 0.72 | +| 3.34.1 | [@react-native-ohos/react-native-screens Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-screens/releases) | 0.72 | +| 4.8.1 | [@react-native-ohos/react-native-screens Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-screens/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -44,7 +46,7 @@ ```bash # 0.72 -npm install @react-native-oh-tpl/react-native-screens@3.34.0-X.X.X +npm install @react-native-ohos/react-native-screens@3.34.1-X.X.X npm install @react-navigation/native-stack@6.9.13 # 0.77 @@ -56,7 +58,7 @@ npm install @react-navigation/native-stack@7.2.0 ```bash # 0.72 -yarn install @react-native-oh-tpl/react-native-screens@3.34.0-X.X.X +yarn install @react-native-ohos/react-native-screens@3.34.1-X.X.X yarn install @react-navigation/native-stack@6.9.13 # 0.77 @@ -150,14 +152,16 @@ export default function App() { ## 使用 Codegen -> [!TIP] V4.8.1 不需要执行 Codegen。 +Version >= @react-native-ohos/react-native-screens@3.34.1,已适配codegen-lib生成桥接代码。 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/codegen.md)。 ## Link +Version >= @react-native-ohos/react-native-screens@3.34.1,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 -目前HarmonyOS暂不支持 AutoLink,所以 Link 步骤需要手动配置。 首先需要使用 DevEco Studio 打开项目里的HarmonyOS工程 `harmony` ### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 @@ -184,14 +188,6 @@ export default function App() { 打开 `entry/oh-package.json5`,添加以下依赖 -- 0.72 -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../../node_modules/@rnoh/react-native-harmony/harmony/react_native_openharmony.har", - "@react-native-oh-tpl/react-native-screens": "file:../../node_modules/@react-native-oh-tpl/react-native-screens/harmony/screens.har" - } -``` -- 0.77 ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../../node_modules/@rnoh/react-native-harmony/harmony/react_native_openharmony.har", @@ -214,6 +210,8 @@ ohpm install ### 3.配置 CMakeLists 和引入 Package +> V3.34.1 需要配置 CMakeLists 和引入 RnohReactNativeHarmonyScreensPackage + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -235,10 +233,6 @@ 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_DIR}/@react-native-oh-tpl/react-native-screens/src/main/cpp" ./rnoh_screens) - -# 0.77 + add_subdirectory("${OH_MODULES_DIR}/@react-native-ohos/react-native-screens/src/main/cpp" ./rnoh_screens) # RNOH_END: manual_package_linking_1 @@ -281,10 +275,6 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... -// 0.72 -+ import { componentBuilder } from "@react-native-oh-tpl/react-native-screens" - -// 0.77 + import { componentBuilder } from "@react-native-ohos/react-native-screens" @Builder @@ -323,10 +313,6 @@ const arkTsComponentNames: Array = [ ```diff ... import type { RNPackageContext, RNPackage } from '@rnoh/react-native-openharmony'; -// 0.72 -+ import RnohReactNativeHarmonyScreensPackage from '@react-native-oh-tpl/react-native-screens'; - -// 0.77 + import RnohReactNativeHarmonyScreensPackage from '@react-native-ohos/react-native-screens'; export function createRNOHPackages(ctx: RNPackageContext): RNPackage[] { @@ -356,11 +342,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ----------- | ------------------------------------------------------------ | ---------- | -|3.34.0|[@react-native-oh-tpl/react-native-screens Releases](https://github.com/react-native-oh-library/react-native-harmony-screens/releases) |0.72| -|4.8.1|[@react-native-ohos/react-native-screens Releases]() |0.77| +在以下版本验证通过: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## 属性 diff --git a/zh-cn/react-native-ohos-community-auto-fill.md b/zh-cn/react-native-ohos-community-auto-fill.md index 75e8abc95fbd3d6e96cade37703cc759e615d376..21c274b7ef518beffb314fa9e1eadfd35a1fc0b8 100644 --- a/zh-cn/react-native-ohos-community-auto-fill.md +++ b/zh-cn/react-native-ohos-community-auto-fill.md @@ -25,10 +25,11 @@ auto-fill 基于 HarmonyOS [autoFillManager](https://developer.huawei.com/consum 请到三方库的 Releases 发布地址查看配套的版本信息: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 1.0.1 | [@react-native-ohos-community/auto-fill Releases](https://github.com/react-native-oh-library/auto-fill/releases) | 0.72 | -| 1.0.2 | [@react-native-ohos/auto-fill Releases]() | 0.77 | +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 1.0.1@deprecated | [@react-native-ohos-community/auto-fill Releases(deprecated)](https://github.com/react-native-oh-library/auto-fill/releases) | 0.72 | +| 1.0.2 | [@react-native-ohos/auto-fill Releases](https://gitcode.com/openharmony-sig/rntpc_auto-fill/releases) | 0.72 | +| 1.1.0 | [@react-native-ohos/auto-fill Releases](https://gitcode.com/openharmony-sig/rntpc_auto-fill/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -37,17 +38,11 @@ auto-fill 基于 HarmonyOS [autoFillManager](https://developer.huawei.com/consum - **npm** ```bash - #V1.0.1 - npm install @react-native-ohos-community/auto-fill - #V1.0.2 npm install @react-native-ohos/auto-fill ``` - **yarn** ```bash - #V1.0.1 - yarn add @react-native-ohos-community/auto-fill - #V1.0.2 yarn add @react-native-ohos/auto-fill ``` @@ -58,7 +53,7 @@ auto-fill 基于 HarmonyOS [autoFillManager](https://developer.huawei.com/consum ```tsx import React, { useState } from 'react'; import { View, TextInput, Button, StyleSheet } from 'react-native'; -import AutoFill from '@react-native-ohos-community/auto-fill'; +import AutoFill from '@react-native-ohos/auto-fill'; const MyFormComponent = () => { const [fullName, setFullName] = useState(''); @@ -112,7 +107,7 @@ export default MyFormComponent; - 联系人信息填充: 适用于如购票信息、收货信息等联系人数据相关表单 - 账号密码填充:适用于如登录界面相关表单 - 页面跳转时表单自动填充 -- 示例代码可查看 [ContactsComponent.tsx](https://github.com/react-native-oh-library/auto-fill/blob/sig/tester/App.tsx) +- 示例代码可查看 [ContactsComponent.tsx](https://gitcode.com/openharmony-sig/rntpc_auto-fill/blob/br_rnoh0.72/tester/App.tsx) > 具体密码保存与填充规则请参考:[密码自动填充服务](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/passwordvault-V5) @@ -144,7 +139,9 @@ React-Native 侧 TextInput 组件接收的 [textContentType](https://reactnative ### Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/auto-fill@1.0.2,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -171,18 +168,6 @@ React-Native 侧 TextInput 组件接收的 [textContentType](https://reactnative > [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。 打开 `entry/oh-package.json5`,添加以下依赖 - -- V1.0.1 - -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-ohos-community/auto-fill": "file:../../node_modules/@react-native-ohos-community/auto-fill/harmony/auto_fill.har" - } -``` - -- V1.0.2 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -205,6 +190,8 @@ ohpm install #### 3. 配置 CMakeLists 和引入 AutoFillPackage +> V1.0.2 需要配置 CMakeLists 和引入 AutoFillPackage + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -217,10 +204,6 @@ set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-har set(LOG_VERBOSITY_LEVEL 1) # RNOH_BEGIN: manual_package_linking_1 -#V1.0.1 -+ add_subdirectory("${OH_MODULES}/@react-native-ohos-community/auto-fill/src/main/cpp" ./auto-fill) - -#V1.0.2 + add_subdirectory("${OH_MODULES}/@react-native-ohos/auto-fill/src/main/cpp" ./auto-fill) # RNOH_END: manual_package_linking_1 @@ -257,9 +240,6 @@ std::vector> PackageProvider::getPackages( ```diff ... - //V1.0.1 -+ import { AutoFillPackage } from '@react-native-ohos-community/auto-fill/ts' - //V1.0.2 + import { AutoFillPackage } from '@react-native-ohos/auto-fill/ts' export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -274,12 +254,11 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +在以下版本验证通过: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 1.0.1 | [@react-native-ohos-community/auto-fill Releases](https://github.com/react-native-oh-library/auto-fill/releases) | 0.72 | -| 1.0.2 | [@react-native-ohos/auto-fill Releases]() | 0.77 | +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## API 接口说明 diff --git a/zh-cn/react-native-quick-base64.md b/zh-cn/react-native-quick-base64.md index eceeb4106557f99d0a0625d64fd2f904a266c2fb..c9026e56edba03b1e1a5a65305351385f3e90c13 100644 --- a/zh-cn/react-native-quick-base64.md +++ b/zh-cn/react-native-quick-base64.md @@ -14,14 +14,15 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-quick-base64) -该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/react-native-quick-base64`,具体版本所属关系如下: +## 安装与使用 -| Version | Package Name | Repository | Release |Supported RN Version | -| ------------------------------ | ---------------- | ------------------- | ------------------- | -------------------- | -| 2.1.2 | @react-native-oh-tpl/react-native-quick-base64 | [Github](https://github.com/react-native-oh-library/react-native-quick-base64) | [Github Releases](https://github.com/react-native-oh-library/react-native-quick-base64/releases) | 0.72 | -| 2.2.0 | @react-native-ohos/react-native-quick-base64 | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-quick-base64) | [GitCode Releases]() | 0.77 | +请到三方库的 Releases 发布地址查看配套的版本信息: -## 安装与使用 +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 2.1.2@deprecated | [@react-native-oh-tpl/react-native-quick-base64 Releases(deprecated)](https://github.com/react-native-oh-library/react-native-quick-base64/releases) | 0.72 | +| 2.1.3 | [@react-native-ohos/react-native-quick-base64 Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-quick-base64/releases) | 0.72 | +| 2.2.0 | [@react-native-ohos/react-native-quick-base64 Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-quick-base64/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -32,20 +33,12 @@ #### **npm** ```bash -# 2.1.2 -npm install @react-native-oh-tpl/react-native-quick-base64 - -# 2.2.0 npm install @react-native-ohos/react-native-quick-base64 ``` #### **yarn** ```bash -# 2.1.2 -yarn add @react-native-oh-tpl/react-native-quick-base64 - -# 2.2.0 yarn add @react-native-ohos/react-native-quick-base64 ``` @@ -59,10 +52,6 @@ yarn add @react-native-ohos/react-native-quick-base64 import React, { useState } from 'react'; import { Text, View, TextInput, ScrollView, StyleSheet, Button } from 'react-native'; -// 2.1.2 -import { byteLength, btoa, atob, toByteArray, fromByteArray, getNative, trimBase64Padding, shim } from '@react-native-oh-tpl/react-native-quick-base64'; - -// 2.2.0 import { byteLength, btoa, atob, toByteArray, fromByteArray, getNative, trimBase64Padding, shim } from '@react-native-ohos/react-native-quick-base64'; type FuncBase64ToArrayBuffer = ( data: string, @@ -429,7 +418,9 @@ const styles = StyleSheet.create({ ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-quick-base64@2.1.3,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -457,16 +448,6 @@ const styles = StyleSheet.create({ 打开 `entry/oh-package.json5`,添加以下依赖 -- 2.1.2 -```json - "dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - - "@react-native-oh-tpl/react-native-quick-base64": "file:../../node_modules/@react-native-oh-tpl/react-native-quick-base64/harmony/rn_quick_base64.har" - } -``` - -- 2.2.0 ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -490,6 +471,8 @@ ohpm install ### 3.配置 CMakeLists 和引入 RNQuickBase64Package +> V2.1.3 需要配置 CMakeLists 和引入 RNQuickBase64Package + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -510,7 +493,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_MODULE_DIR}/@react-native-oh-tpl/react-native-quick-base64/src/main/cpp" ./rn_quick_base64) ++ add_subdirectory("${OH_MODULE_DIR}/@react-native-ohos/react-native-quick-base64/src/main/cpp" ./rn_quick_base64) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -550,10 +533,6 @@ std::vector> PackageProvider::getPackages(Package::Cont 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: ```diff - // 2.1.2 -+ import { RNQuickBase64Package } from '@react-native-oh-tpl/react-native-quick-base64/ts'; - - // 2.2.0 + import { RNQuickBase64Package } from '@react-native-ohos/react-native-quick-base64/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -585,8 +564,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 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; > [!TIP] [官方文档](https://github.com/craftzdog/react-native-quick-base64) diff --git a/zh-cn/react-native-search-bar.md b/zh-cn/react-native-search-bar.md index ab41088e1f3b783ff60822229374b0ae6fbfc56e..9f57845aeef9855f4e8416f57eb81f167474f569 100644 --- a/zh-cn/react-native-search-bar.md +++ b/zh-cn/react-native-search-bar.md @@ -21,8 +21,9 @@ | 三方库版本 | 发布信息 | 支持RN版本 | | ---------- | ------------------------------------------------------------ | ---------- | -| 3.5.1 | [@react-native-oh-tpl/react-native-search-bar Releases](https://github.com/react-native-oh-library/react-native-search-bar/releases) | 0.72 | -| 3.5.2 | [@react-native-ohos/react-native-search-bar Releases]() | 0.77 | +| 3.5.1@deprecated | [@react-native-oh-tpl/react-native-search-bar Releases(deprecated)](https://github.com/react-native-oh-library/react-native-search-bar/releases) | 0.72 | +| 3.5.2 | [@react-native-ohos/react-native-search-bar Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-search-bar/releases) | 0.72 | +| 3.6.0 | [@react-native-ohos/react-native-search-bar Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-search-bar/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -33,20 +34,12 @@ #### **npm** ```bash -# V3.5.1 for RN0.72 -npm install @react-native-oh-tpl/react-native-search-bar - -# V3.5.2 for RN0.77 npm install @react-native-ohos/react-native-search-bar ``` #### **yarn** ```bash -# V3.5.1 for RN0.72 -yarn add @react-native-oh-tpl/react-native-search-bar - -# V3.5.2 for RN0.77 yarn add @react-native-ohos/react-native-search-bar ``` @@ -117,7 +110,9 @@ export default SearchBarDemo; ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-search-bar@3.5.2,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -145,18 +140,6 @@ export default SearchBarDemo; 打开 `entry/oh-package.json5`,添加以下依赖 -- V3.5.1 for RN0.72 - -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - - "@react-native-oh-tpl/react-native-search-bar": "file:../../node_modules/@react-native-oh-tpl/react-native-search-bar/harmony/search_bar.har", - } -``` - -- V3.5.2 for RN0.77 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -180,6 +163,8 @@ ohpm install ### 3.配置 CMakeLists 和引入 SearchBarPackage +> V3.5.2 需要配置 CMakeLists 和引入 SearchBarPackage + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -193,13 +178,7 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) - -# V3.5.1 for RN0.72 -+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-search-bar/src/main/cpp" ./search-bar) - -# V3.5.2 for RN0.77 + add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-search-bar/src/main/cpp" ./search-bar) - # RNOH_END: manual_package_linking_1 add_library(rnoh_app SHARED @@ -239,10 +218,6 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... -// V3.5.1 for RN0.72 -+ import { RNCSearchBar } from "@react-native-oh-tpl/react-native-search-bar" - -// V3.5.2 for RN0.77 + import { RNCSearchBar } from "@react-native-ohos/react-native-search-bar" @Builder @@ -291,12 +266,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +在以下版本验证通过: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 3.5.1 | [@react-native-oh-tpl/react-native-search-bar Releases](https://github.com/react-native-oh-library/react-native-search-bar/releases) | 0.72 | -| 3.5.2 | [@react-native-ohos/react-native-search-bar Releases]() | 0.77 | +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## 属性 diff --git a/zh-cn/react-native-send-intent.md b/zh-cn/react-native-send-intent.md index e8542fd37d9171e5a0cbcf03e5959e5c481ac775..406f50292747576c8c194f6e18369862136fdd34 100644 --- a/zh-cn/react-native-send-intent.md +++ b/zh-cn/react-native-send-intent.md @@ -14,14 +14,17 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-send-intent) -该第三方库的仓库已迁移至 Gitee,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/react-native-send-intent`,具体版本所属关系如下: +## 安装与使用 -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 1.3.0 | [@react-native-oh-tpl/react-native-send-intent Releases](https://github.com/react-native-oh-library/react-native-send-intent/releases) | 0.72 | -| 1.4.0 | [@react-native-ohos/react-native-send-intent Releases]() | 0.77 | +请到三方库的 Releases 发布地址查看配套的版本信息: -## 安装与使用 +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 1.3.0@deprecated | [@react-native-oh-tpl/react-native-send-intent Releases(deprecated)](https://github.com/react-native-oh-library/react-native-send-intent/releases) | 0.72 | +| 1.3.1 | [@react-native-ohos/react-native-send-intent Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-send-intent/releases) | 0.72 | +| 1.4.0 | [@react-native-ohos/react-native-send-intent Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-send-intent/releases) | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -30,20 +33,12 @@ #### npm ```bash -# 0.72 -npm install @react-native-oh-tpl/react-native-send-intent - -# 0.77 npm install @react-native-ohos/react-native-send-intent ``` #### yarn ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-send-intent - -# 0.77 yarn add @react-native-ohos/react-native-send-intent ``` @@ -151,13 +146,15 @@ export default SendIntent; ## 使用 Codegen -> [!TIP] 0.72 不需要执行 Codegen。 +Version >= @react-native-ohos/react-native-send-intent@1.3.1,已适配codegen-lib生成桥接代码。 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-send-intent@1.3.1,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -185,17 +182,6 @@ export default SendIntent; 打开 `entry/oh-package.json5`,添加以下依赖 -- 0.72 - -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-send-intent": "file:../../node_modules/@react-native-oh-tpl/react-native-send-intent/harmony/send_intent.har" - } -``` - -- 0.77 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -218,7 +204,7 @@ ohpm install ### 3.配置 CMakeLists 和引入 SendIntentPackage -> [!TIP] 若使用的是 0.72 版本,请跳过本章。 +> V1.3.1 需要配置 CMakeLists 和引入 SendIntentPackage 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: @@ -283,10 +269,6 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... -// 0.72 -+ import {RNSendIntentPackage} from '@react-native-oh-tpl/react-native-send-intent/ts'; - -// 0.77 + import {RNSendIntentPackage} from '@react-native-ohos/react-native-send-intent/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -314,11 +296,13 @@ ohpm install ### 兼容性 -在下述版本验证通过: +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Beta1; IDE:DevEco Studio 5.0.3.200; ROM:3.0.0.18; +在以下版本验证通过: -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 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## API diff --git a/zh-cn/react-native-sensors.md b/zh-cn/react-native-sensors.md index bd8825d251686604c3b513698709b49003842767..5ff29740ebb1011918d0e1d21307aad7a1f60398 100644 --- a/zh-cn/react-native-sensors.md +++ b/zh-cn/react-native-sensors.md @@ -176,7 +176,7 @@ Version >= @react-native-ohos/react-native-sensors@7.2.3,已支持 Autolink, ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-ohos/react-native-sensors": "file:../../node_modules/react-native-ohos/react-native-sensors/harmony/sensors.har" + "@react-native-ohos/react-native-sensors": "file:../../node_modules/@react-native-ohos/react-native-sensors/harmony/sensors.har" } ``` diff --git a/zh-cn/react-native-share.md b/zh-cn/react-native-share.md index e16d5c01731bfc47429e935d3fd8be2af30fb1fb..ca7b8f5e79727cb6552b0b3c944b31f58176f19c 100644 --- a/zh-cn/react-native-share.md +++ b/zh-cn/react-native-share.md @@ -17,7 +17,15 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-share Releases](https://github.com/react-native-oh-library/react-native-share/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 10.2.1@deprecated | [@react-native-oh-tpl/react-native-share Releases(deprecated)](https://github.com/react-native-oh-library/react-native-share/releases) | 0.72 | +| 10.2.2 | [@react-native-ohos/react-native-share Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-share/releases) | 0.72 | +| 12.1.1 | [@react-native-ohos/react-native-share Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-share/releases) | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -26,13 +34,13 @@ #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-share +npm install @react-native-ohos/react-native-share ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-share +yarn add @react-native-ohos/react-native-share ``` @@ -79,11 +87,15 @@ yarn add @react-native-oh-tpl/react-native-share ## 使用 Codegen +Version >= @react-native-ohos/react-native-share@10.2.2,已适配codegen-lib生成桥接代码。 + 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-share@10.2.2,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -116,7 +128,7 @@ yarn add @react-native-oh-tpl/react-native-share "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-share": "file:../../node_modules/@react-native-oh-tpl/react-native-share/harmony/react_native_share.har" + "@react-native-ohos/react-native-share": "file:../../node_modules/@react-native-ohos/react-native-share/harmony/react_native_share.har" } ``` @@ -139,7 +151,7 @@ ohpm install 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: ```diff -+ import {RNSharePackage} from '@react-native-oh-tpl/react-native-share/ts'; ++ import {RNSharePackage} from '@react-native-ohos/react-native-share/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -149,7 +161,56 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.运行 +### 4. 配置 CMakeLists 和引入 RNSharePackage + +> V10.2.2 需要配置 CMakeLists 和引入 RNSharePackage + +打开 `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-share/src/main/cpp" ./react_native_share) +# 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_share) +# RNOH_BEGIN: manual_package_linking_2 +``` + +打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: + +```diff +#include "RNOH/PackageProvider.h" ++ #include "RNSharePackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { ++ std::make_shared(ctx) +} +``` + +### 5.运行 点击右上角的 `sync` 按钮 @@ -169,7 +230,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-share Releases](https://github.com/react-native-oh-library/react-native-share/releases) +在以下版本验证通过: + +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## 属性 diff --git a/zh-cn/react-native-snackbar.md b/zh-cn/react-native-snackbar.md index 3f6e1dc7989ad35fd03328a875bc92fd50e631ae..729cf60e23092b50d935762e8d90e168d0b13db5 100644 --- a/zh-cn/react-native-snackbar.md +++ b/zh-cn/react-native-snackbar.md @@ -18,10 +18,11 @@ 请到三方库的 Releases 发布地址查看配套的版本信息: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 2.7.1 | [@react-native-oh-tpl/react-native-snackbar Releases](https://github.com/react-native-oh-library/react-native-snackbar/releases) | 0.72 | -| 2.9.0 | [@react-native-ohos/react-native-snackbar Releases]() | 0.77 | +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 2.7.1@deprecated | [@react-native-oh-tpl/react-native-snackbar Releases(deprecated)](https://github.com/react-native-oh-library/react-native-snackbar/releases) | 0.72 | +| 2.7.2 | [@react-native-ohos/react-native-snackbar Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-snackbar/releases) | 0.72 | +| 2.9.0 | [@react-native-ohos/react-native-snackbar Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-snackbar/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -32,20 +33,12 @@ #### **npm** ```bash -# V2.7.1 -npm install @react-native-oh-tpl/react-native-snackbar - -# V2.9.0 npm install @react-native-ohos/react-native-snackbar ``` #### **yarn** ```bash -# V2.7.1 -yarn add @react-native-oh-tpl/react-native-snackbar - -# V2.9.0 yarn add @react-native-ohos/react-native-snackbar ``` @@ -108,13 +101,15 @@ const styles = StyleSheet.create({ ## 使用 Codegen -> [!TIP] V2.9.0 不需要执行 Codegen。 +Version >= @react-native-ohos/react-native-snackbar@2.7.2,已适配codegen-lib生成桥接代码。 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-snackbar@2.7.2,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -142,17 +137,6 @@ const styles = StyleSheet.create({ 打开 `entry/oh-package.json5`,添加以下依赖 -- V2.7.1 - -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-snackbar": "file:../../node_modules/@react-native-oh-tpl/react-native-snackbar/harmony/snackbar.har" - } -``` - -- V2.9.0 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -179,10 +163,6 @@ ohpm install ```diff ... -// V2.7.1 -+ import {RNSnackbarPackage} from '@react-native-oh-tpl/react-native-snackbar/ts'; - -// V2.9.0 + import {RNSnackbarPackage} from '@react-native-ohos/react-native-snackbar/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -193,9 +173,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.配置 CMakeLists 和引入 SnackbarPackge +### 4.配置 CMakeLists 和引入 SnackbarPackage -> [!TIP] V2.9.0 需要配置 CMakeLists 和引入 SnackbarPackge。 +> [!TIP] V2.7.2 需要配置 CMakeLists 和引入 SnackbarPackage ```diff project(rnapp) @@ -261,12 +241,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +在以下版本验证通过: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 2.7.1 | [@react-native-oh-tpl/react-native-snackbar Releases](https://github.com/react-native-oh-library/react-native-snackbar/releases) | 0.72 | -| 2.9.0 | [@react-native-ohos/react-native-snackbar Releases]() | 0.77 | +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## 属性 diff --git a/zh-cn/react-native-syan-image-picker.md b/zh-cn/react-native-syan-image-picker.md index 5a89695dbe41c4147982f4a7e59781fb022d0f80..77c47416a2f552f96267ead3c6cb60691bf64fb2 100644 --- a/zh-cn/react-native-syan-image-picker.md +++ b/zh-cn/react-native-syan-image-picker.md @@ -17,7 +17,15 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-syan-image-picker Releases](https://github.com/react-native-oh-library/react-native-syan-image-picker/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 0.5.3@deprecated | [@react-native-oh-tpl/react-native-syan-image-picker Releases(deprecated)](https://github.com/react-native-oh-library/react-native-syan-image-picker/releases) | 0.72 | +| 0.5.4 | [@react-native-ohos/react-native-syan-image-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-syan-image-picker/releases) | 0.72 | +| 0.6.0 | [@react-native-ohos/react-native-syan-image-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-syan-image-picker/releases) | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -26,13 +34,13 @@ #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-syan-image-picker +npm install @react-native-ohos/react-native-syan-image-picker ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-syan-image-picker +yarn add @react-native-ohos/react-native-syan-image-picker ``` @@ -309,11 +317,15 @@ const styles = StyleSheet.create({ ## 使用 Codegen +Version >= @react-native-ohos/react-native-syan-image-picker@0.5.4,已适配codegen-lib生成桥接代码。 + 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-syan-image-picker@0.5.4,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -400,7 +412,7 @@ export default class ImageCropAbility extends UIAbility { **(3)在 entry/src/main/ets/pages 下创建 ImageEdit.ets** ``` -import { ImageCrop } from '@react-native-oh-tpl/react-native-syan-image-picker'; +import { ImageCrop } from '@react-native-ohos/react-native-syan-image-picker'; @Entry @Component @@ -445,7 +457,7 @@ struct ImageEdit { ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-syan-image-picker": "file:../../node_modules/@react-native-oh-tpl/react-native-syan-image-picker/harmony/syan_image_picker.har" + "@react-native-ohos/react-native-syan-image-picker": "file:../../node_modules/@react-native-ohos/react-native-syan-image-picker/harmony/syan_image_picker.har" } ``` @@ -468,7 +480,7 @@ ohpm install ```diff ... -+ import {SyanImagePickerPackage} from '@react-native-oh-tpl/react-native-syan-image-picker/ts'; ++ import {SyanImagePickerPackage} from '@react-native-ohos/react-native-syan-image-picker/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -497,11 +509,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-syan-image-picker Releases](https://github.com/react-native-oh-library/react-native-syan-image-picker/releases) - -本文档内容基于以下版本验证通过: +在以下版本验证通过: -1. RNOH:0.72.26; SDK:HarmonyOS NEXT Developer Beta1 B.0.22、IDE:DevEco Studio 5.0.3.300SP2; ROM:3.0.0.24; +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; diff --git a/zh-cn/rn-bugly.md b/zh-cn/rn-bugly.md index 38d826bd2d2fc83eeebae009596a2d2cc0fed411..96c583c6073b5d76633949a8bea2bda8d495863e 100644 --- a/zh-cn/rn-bugly.md +++ b/zh-cn/rn-bugly.md @@ -19,10 +19,11 @@ 请到三方库的 Releases 发布地址查看配套的版本信息: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ------------ | ------------------------------------------------------------ | ---------- | -| 1.3.0-beta.3 | [@react-native-oh-tpl/rn-bugly Releases](https://github.com/react-native-oh-library/rn-bugly/releases) | 0.72 | -| 1.3.1 | [@react-native-ohos/rn-bugly Releases]() | 0.77 | +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| 1.3.0@deprecated | [@react-native-oh-tpl/rn-bugly Releases(deprecated)](https://github.com/react-native-oh-library/rn-bugly/releases) | 0.72 | +| 1.3.1 | [@react-native-ohos/rn-bugly Releases](https://gitcode.com/openharmony-sig/rntpc_rn-bugly/releases) | 0.72 | +| 1.4.0 | [@react-native-ohos/rn-bugly Releases](https://gitcode.com/openharmony-sig/rntpc_rn-bugly/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -33,20 +34,12 @@ #### **npm** ```bash -#1.3.0-beta.3 -npm install @react-native-oh-tpl/rn-bugly - -#1.3.1 npm install @react-native-ohos/rn-bugly ``` #### **yarn** ```bash -#1.3.0-beta.3 -yarn add @react-native-oh-tpl/rn-bugly - -#1.3.1 yarn add @react-native-ohos/rn-bugly ``` @@ -113,7 +106,9 @@ export default class BuglyExample extends React.Component { ``` ## Link -目前HarmonyOS暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/rn-bugly@1.3.1,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的HarmonyOS工程 `harmony` @@ -141,17 +136,6 @@ export default class BuglyExample extends React.Component { 打开 `entry/oh-package.json5`,添加以下依赖 -- V1.3.0-beta.3 - -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/rn-bugly": "file:../../node_modules/@react-native-oh-tpl/rn-bugly/harmony/bugly.har" - } -``` - -- V1.3.1 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -174,6 +158,8 @@ ohpm install ### 3.配置 CMakeLists 和引入 RNBuglyPackage +> V1.3.1 需要配置 CMakeLists 和引入 RNBuglyPackage + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -194,10 +180,6 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) -# 1.3.0-beta.3 -+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/rn-bugly/src/main/cpp" ./bugly) - -# 1.3.1 + add_subdirectory("${OH_MODULES}/@react-native-ohos/rn-bugly/src/main/cpp" ./bugly) # RNOH_END: manual_package_linking_1 @@ -241,10 +223,6 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... - //1.3.0-beta.3 -+ import {RNBuglyPackage} from '@react-native-oh-tpl/rn-bugly/ts'; - - //1.3.1 + import {RNBuglyPackage} from '@react-native-ohos/rn-bugly/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -274,12 +252,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +在以下版本验证通过: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ------------ | ------------------------------------------------------------ | ---------- | -| 1.3.0-beta.3 | [@react-native-oh-tpl/rn-bugly Releases](https://github.com/react-native-oh-library/rn-bugly/releases) | 0.72 | -| 1.3.1 | [@react-native-ohos/rn-bugly Releases]() | 0.77 | +1. RNOH: 0.72.96; SDK: HarmonyOS 5.1.0.150 (API Version 12); IDE: DevEco Studio 5.1.1.830; ROM: 5.1.0.150; +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 5.0.0.71(API Version 12 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 5.1.0.150; ## API