> 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 14e3876c..d2df2fed 100644
--- a/en/react-native-oh-tpl-react-native-screens.md
+++ b/en/react-native-oh-tpl-react-native-screens.md
@@ -24,43 +24,35 @@ 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-navigation/native-stack@6.9.13
-
-# 0.77
-npm install @react-native-ohos/react-native-screens@4.8.1-X.X.X
+npm install @react-native-ohos/react-native-screens
npm install @react-navigation/native-stack@7.2.0
```
#### **yarn**
```bash
-# 0.72
-yarn install @react-native-oh-tpl/react-native-screens@3.34.0-X.X.X
-yarn install @react-navigation/native-stack@6.9.13
-
-# 0.77
-yarn install @react-native-ohos/react-native-screens@4.8.1-X.X.X
+yarn install @react-native-ohos/react-native-screens
yarn install @react-navigation/native-stack@7.2.0
```
@@ -151,13 +143,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 +177,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 +199,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 +222,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 +264,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 +302,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 +330,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 fb1cda8c..a2bebd6d 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
@@ -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/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 75969f68..c90f5631 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 ca7427db..00654ae0 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 699657b9..386eb2ee 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-snackbar.md b/en/react-native-snackbar.md
index edb21e4a..84d0bb5c 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-sqlite-storage.md b/en/react-native-sqlite-storage.md
index 73859e53..a4ae9a54 100644
--- a/en/react-native-sqlite-storage.md
+++ b/en/react-native-sqlite-storage.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-sqlite-storage Releases](https://github.com/react-native-oh-library/react-native-sqlite-storage/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.1@deprecated | [@react-native-oh-tpl/react-native-sqlite-storage Releases(deprecated)](https://github.com/react-native-oh-library/react-native-sqlite-storage/releases) | 0.72 |
+| 6.0.2 | [@react-native-ohos/react-native-sqlite-storage Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-sqlite-storage/releases) | 0.72 |
+| 6.1.0 | [@react-native-ohos/react-native-sqlite-storage Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-sqlite-storage/releases) | 0.77 |
+
+For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package.
Go to the project directory and execute the following instruction:
@@ -28,13 +36,13 @@ Go to the project directory and execute the following instruction:
#### **npm**
```bash
-npm install @react-native-oh-tpl/react-native-sqlite-storage
+npm install @react-native-ohos/react-native-sqlite-storage
```
#### **yarn**
```bash
-yarn add @react-native-oh-tpl/react-native-sqlite-storage
+yarn add @react-native-ohos/react-native-sqlite-storage
```
The following code shows the basic use scenario of the repository:
@@ -530,11 +538,15 @@ export default SQLiteDemo;
## Use Codegen
+Version >= @react-native-ohos/react-native-sqlite-storage@6.0.2, 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-sqlite-storage@6.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.
@@ -563,7 +575,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-sqlite-storage": "file:../../node_modules/@react-native-oh-tpl/react-native-sqlite-storage/platforms/harmony/sqlite_storage.har"
+ "@react-native-ohos/react-native-sqlite-storage": "file:../../node_modules/@react-native-ohos/react-native-sqlite-storage/harmony/sqlite_storage.har"
}
```
@@ -580,14 +592,74 @@ Method 2: Directly link to the source code.
> [!TIP] For details, see [Directly Linking Source Code](/en/link-source-code.md).
+### 3. Configure CMakeLists and import SQLitePluginPackage
+
+> V6.0.2 requires configuring CMakeLists and importing SQLitePluginPackage.
+
+Open the `entry/src/main/cpp/CMakeLists.txt` file and add the following code:
+
+```
+project(rnapp)
+cmake_minimum_required(VERSION 3.4.1)
+set(CMAKE_SKIP_BUILD_RPATH TRUE)
+set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
+set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules")
++ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules")
+set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp")
+set(LOG_VERBOSITY_LEVEL 1)
+set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments")
+set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie")
+set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use
+add_compile_definitions(WITH_HITRACE_SYSTRACE)
+
+add_subdirectory("${RNOH_CPP_DIR}" ./rn)
+
+# RNOH_BEGIN: manual_package_linking_1
+add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package)
++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-sqlite-storage/src/main/cpp" ./rnoh_sqlite_storage)
+# 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_sqlite_storage)
+# RNOH_END: manual_package_linking_2
+```
+
+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 "SQLitePluginPackage.h"
+
+using namespace rnoh;
+
+std::vector> PackageProvider::getPackages(Package::Context ctx) {
+ return {
+ std::make_shared(ctx),
+ std::make_shared(ctx),
++ std::make_shared(ctx),
+ };
+}
+```
-### 3. Introducing SQLitePluginPackage to ArkTS
+### 4. Introducing SQLitePluginPackage to ArkTS
Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code:
```diff
...
-+ import {SQLitePluginPackage} from '@react-native-oh-tpl/react-native-sqlite-storage/ts';
++ import {SQLitePluginPackage} from '@react-native-ohos/react-native-sqlite-storage/ts';
export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
return [
@@ -597,7 +669,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
}
```
-### 4. Running
+### 5. Running
Click the `sync` button in the upper right corner.
@@ -614,7 +686,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-sqlite-storage Releases](https://github.com/react-native-oh-library/react-native-sqlite-storage/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;
## Static Methods
diff --git a/en/react-native-syan-image-picker.md b/en/react-native-syan-image-picker.md
index 654a9a7e..a05f04f1 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 30a81e76..e67a034e 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 da03f552..c0f5ef3a 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 e64255ad..47514c90 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 34742b74..27daea18 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/react-native-print Releases](https://gitcode.com/openharmony-sig/rntpc_jpush-react-native/releases) | 0.72 |
+| 3.2.0 | [@react-native-ohos/react-native-print 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 6b097f40..5ecfc1ef 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 40557a11..1d779f40 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 e838e52b..9ed6b4ff 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
```
@@ -53,16 +49,16 @@ yarn add @react-native-ohos/audio-toolkit
> [!WARNING] 使用时 import 的库名不变。
-> [!TIP] # demo使用了三方库[@react-native-oh-tpl/react-native-slider](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-slider.md)
+> [!TIP] # demo使用了三方库[@react-native-ohos/react-native-slider](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-slider.md)
-> [!TIP] # demo使用了权限三方库[@react-native-oh-tpl/react-native-permissions](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-permissions.md)
+> [!TIP] # demo使用了权限三方库[@react-native-ohos/react-native-permissions](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-permissions.md)
```tsx
import React, { Component } from 'react';
import { Button, PermissionsAndroid, Platform, StyleSheet, Switch, Text, View, ScrollView } from 'react-native';
-import Slider from '@react-native-oh-tpl/react-native-slider';
+import Slider from '@react-native-ohos/react-native-slider';
import { Player, Recorder, MediaStates } from '@react-native-community/audio-toolkit';
-import RTNPermissions, {RESULTS} from "@react-native-oh-tpl/react-native-permissions";
+import RTNPermissions, {RESULTS} from "@react-native-ohos/react-native-permissions";
const filename = 'test.mp4';
@@ -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 59e99b79..6ef2c944 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/ocetnik/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 251357fc..1be9b264 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 0e45a49c..4c19ce3e 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 069692d0..7a806e82 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 d3d8e5ce..25726a43 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 d674bfee..0b4ae1ee 100644
--- a/zh-cn/react-native-community-progress-view.md
+++ b/zh-cn/react-native-community-progress-view.md
@@ -5,16 +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-progress-view/progress-view)
-该第三方库的仓库已迁移至 Gitee,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/react-native-progress-view`,具体版本所属关系如下:
+## 安装与使用
-| Version | Package Name | Repository | Release |
-| ------------------------------ | ---------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
-| <= 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) |
-| > 1.4.2 | @react-native-ohos/progress-view | [Gitee](https://gitee.com/openharmony-sig/rntpc_progress-view) | [Gitee Releases](https://gitee.com/openharmony-sig/rntpc_progress-view/releases) |
+请到三方库的 Releases 发布地址查看配套的版本信息:
-## 安装与使用
+| 三方库版本 | 发布信息 | 支持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包。
进入到工程目录并输入以下命令:
@@ -54,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`。
@@ -109,6 +114,8 @@ ohpm install
### 2.3 配置 CMakeLists 和引入 ProgressViewPackage
+> V1.4.3 需要配置 CMakeLists 和引入 ProgressViewPackage
+
打开 `entry/src/main/cpp/CMakeLists.txt`,添加:
```diff
@@ -225,7 +232,11 @@ ohpm install
要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-ohos/react-native-progress-view Releases](https://gitee.com/openharmony-sig/rntpc_progress-view/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;
## 4. 属性
diff --git a/zh-cn/react-native-compass-heading.md b/zh-cn/react-native-compass-heading.md
index a5b5b3ab..216f7227 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 4997ce30..ce990378 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 07d30ea6..f8a88ef4 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`,添加:
@@ -177,7 +166,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-ohos/react-native-exit-app/src/main/cpp" ./exit_app)
++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-exit-app/src/main/cpp" ./rnoh_exit_app)
# RNOH_END: manual_package_linking_1
file(GLOB GENERATED_CPP_FILES "./generated/*.cpp")
@@ -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 badcd536..2b005f54 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" ./rnoh_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 cb295b9c..0357ebf5 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-keys.md b/zh-cn/react-native-keys.md
index 5acf29e0..8f115712 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-mlkit-ocr.md b/zh-cn/react-native-mlkit-ocr.md
index 5bdecace..50db4b5f 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 08bb3dd4..73c0375a 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包。
@@ -43,24 +45,14 @@
#### **npm**
```bash
-# 0.72
-npm install @react-native-oh-tpl/react-native-screens@3.34.0-X.X.X
-npm install @react-navigation/native-stack@6.9.13
-
-# 0.77
-npm install @react-native-ohos/react-native-screens@4.8.1-X.X.X
+npm install @react-native-ohos/react-native-screens
npm install @react-navigation/native-stack@7.2.0
```
#### **yarn**
```bash
-# 0.72
-yarn install @react-native-oh-tpl/react-native-screens@3.34.0-X.X.X
-yarn install @react-navigation/native-stack@6.9.13
-
-# 0.77
-yarn install @react-native-ohos/react-native-screens@4.8.1-X.X.X
+yarn install @react-native-ohos/react-native-screens
yarn install @react-navigation/native-stack@7.2.0
```
@@ -150,14 +142,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 +178,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 +200,8 @@ ohpm install
### 3.配置 CMakeLists 和引入 Package
+> V3.34.1 需要配置 CMakeLists 和引入 RnohReactNativeHarmonyScreensPackage
+
打开 `entry/src/main/cpp/CMakeLists.txt`,添加:
```diff
@@ -235,10 +223,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 +265,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 +303,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 +332,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 75e8abc9..dec42ad9 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/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 eceeb410..c9026e56 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 ab41088e..9f57845a 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 e8542fd3..406f5029 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 bd8825d2..5ff29740 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-snackbar.md b/zh-cn/react-native-snackbar.md
index 3f6e1dc7..729cf60e 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-sqlite-storage.md b/zh-cn/react-native-sqlite-storage.md
index 305b2232..ace4cb44 100644
--- a/zh-cn/react-native-sqlite-storage.md
+++ b/zh-cn/react-native-sqlite-storage.md
@@ -17,7 +17,15 @@
## 安装与使用
-请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-sqlite-storage Releases](https://github.com/react-native-oh-library/react-native-sqlite-storage/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
+请到三方库的 Releases 发布地址查看配套的版本信息:
+
+| 三方库版本 | 发布信息 | 支持RN版本 |
+| ---------- | ------------------------------------------------------------ | ---------- |
+| 6.0.1@deprecated | [@react-native-oh-tpl/react-native-sqlite-storage Releases(deprecated)](https://github.com/react-native-oh-library/react-native-sqlite-storage/releases) | 0.72 |
+| 6.0.2 | [@react-native-ohos/react-native-sqlite-storage Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-sqlite-storage/releases) | 0.72 |
+| 6.1.0 | [@react-native-ohos/react-native-sqlite-storage Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-sqlite-storage/releases) | 0.77 |
+
+对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
进入到工程目录并输入以下命令:
@@ -26,13 +34,13 @@
#### **npm**
```bash
-npm install @react-native-oh-tpl/react-native-sqlite-storage
+npm install @react-native-ohos/react-native-sqlite-storage
```
#### **yarn**
```bash
-yarn add @react-native-oh-tpl/react-native-sqlite-storage
+yarn add @react-native-ohos/react-native-sqlite-storage
```
下面的代码展示了这个库的基本使用场景:
@@ -528,11 +536,16 @@ export default SQLiteDemo;
## 使用 Codegen
+Version >= @react-native-ohos/react-native-sqlite-storage@6.0.2,已适配codegen-lib生成桥接代码。
+
本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。
## Link
-目前HarmonyOS暂不支持 AutoLink,所以 Link 步骤需要手动配置。
+Version >= @react-native-ohos/react-native-sqlite-storage@6.0.2,已支持 Autolink,无需手动配置,目前只支持72框架。
+Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md
+
+此步骤为手动配置原生依赖项的指导。
首先需要使用 DevEco Studio 打开项目里的HarmonyOS工程 `harmony`
@@ -563,7 +576,7 @@ export default SQLiteDemo;
```json
"dependencies": {
"@rnoh/react-native-openharmony": "file:../react_native_openharmony",
- "@react-native-oh-tpl/react-native-sqlite-storage": "file:../../node_modules/@react-native-oh-tpl/react-native-sqlite-storage/platforms/harmony/sqlite_storage.har"
+ "@react-native-ohos/react-native-sqlite-storage": "file:../../node_modules/@react-native-ohos/react-native-sqlite-storage/harmony/sqlite_storage.har"
}
```
@@ -581,13 +594,74 @@ ohpm install
> [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md)
-### 3.在 ArkTs 侧引入 SQLitePluginPackage
+### 3. 配置 CMakeLists 和引入 SQLitePluginPackage
+
+> V6.0.2 需要配置 CMakeLists 和引入 SQLitePluginPackage.
+
+打开 `entry/src/main/cpp/CMakeLists.txt`,添加:
+
+```
+project(rnapp)
+cmake_minimum_required(VERSION 3.4.1)
+set(CMAKE_SKIP_BUILD_RPATH TRUE)
+set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
+set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules")
++ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules")
+set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp")
+set(LOG_VERBOSITY_LEVEL 1)
+set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments")
+set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie")
+set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use
+add_compile_definitions(WITH_HITRACE_SYSTRACE)
+
+add_subdirectory("${RNOH_CPP_DIR}" ./rn)
+
+# RNOH_BEGIN: manual_package_linking_1
+add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package)
++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-sqlite-storage/src/main/cpp" ./rnoh_sqlite_storage)
+# 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_sqlite_storage)
+# RNOH_END: manual_package_linking_2
+```
+
+打开 `entry/src/main/cpp/PackageProvider.cpp`,添加:
+
+```
+#include "RNOH/PackageProvider.h"
+#include "generated/RNOHGeneratedPackage.h"
+#include "SamplePackage.h"
++ #include "SQLitePluginPackage.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 侧引入 SQLitePluginPackage
打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加:
```diff
...
-+ import {SQLitePluginPackage} from '@react-native-oh-tpl/react-native-sqlite-storage/ts';
++ import {SQLitePluginPackage} from '@react-native-ohos/react-native-sqlite-storage/ts';
export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
return [
@@ -597,7 +671,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
}
```
-### 4.运行
+### 5. 运行
点击右上角的 `sync` 按钮
@@ -614,7 +688,11 @@ ohpm install
要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-sqlite-storage Releases](https://github.com/react-native-oh-library/react-native-sqlite-storage/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-syan-image-picker.md b/zh-cn/react-native-syan-image-picker.md
index 5a89695d..77c47416 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 38d826bd..96c583c6 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
--
Gitee
From dbebd51ca9584487cae7adca447fbcb09d82d474 Mon Sep 17 00:00:00 2001
From: wangqiuyun <727176064@qq.com>
Date: Tue, 2 Dec 2025 05:51:38 +0000
Subject: [PATCH 2/8] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20en/r?=
=?UTF-8?q?eact-native-sqlite-storage.md?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
en/react-native-sqlite-storage.md | 714 ------------------------------
1 file changed, 714 deletions(-)
delete mode 100644 en/react-native-sqlite-storage.md
diff --git a/en/react-native-sqlite-storage.md b/en/react-native-sqlite-storage.md
deleted file mode 100644
index a4ae9a54..00000000
--- a/en/react-native-sqlite-storage.md
+++ /dev/null
@@ -1,714 +0,0 @@
-> Template version: v0.2.2
-
-
-
react-native-sqlite-storage
-
-
-
-
-
-
-
-
-
-
-> [!TIP] [Github address](https://github.com/react-native-oh-library/react-native-sqlite-storage)
-
-
-## 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 |
-|-----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------| ---------- |
-| 6.0.1@deprecated | [@react-native-oh-tpl/react-native-sqlite-storage Releases(deprecated)](https://github.com/react-native-oh-library/react-native-sqlite-storage/releases) | 0.72 |
-| 6.0.2 | [@react-native-ohos/react-native-sqlite-storage Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-sqlite-storage/releases) | 0.72 |
-| 6.1.0 | [@react-native-ohos/react-native-sqlite-storage Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-sqlite-storage/releases) | 0.77 |
-
-For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package.
-
-Go to the project directory and execute the following instruction:
-
-
-
-
-
-#### **npm**
-
-```bash
-npm install @react-native-ohos/react-native-sqlite-storage
-```
-
-#### **yarn**
-
-```bash
-yarn add @react-native-ohos/react-native-sqlite-storage
-```
-
-The following code shows the basic use scenario of the repository:
-
-> [!WARNING] The name of the imported repository remains unchanged.
-
-```js
-/**
- * @format
- */
-import React, {Component} from 'react';
-import { StyleSheet, Text, View, FlatList} from 'react-native';
-import SQLite from 'react-native-sqlite-storage';
-SQLite.DEBUG(true);
-SQLite.enablePromise(false);
-
-const database_name = 'Test.db';
-const database_version = '1.0';
-const database_displayname = 'SQLite Test Database';
-const database_size = 200000;
-let db: any;
-const Item = (props: any) => {
- const { title } = props;
- return(
-
- {title}
-
- )
-};
-
-interface SQLiteDemo {
- progress: string[]
-}
-
-interface State {
- progress: string[]
-}
-
-interface rowsType {
- item: any,
- length: number
-}
-
-interface ResultType {
- rows: rowsType
-}
-
-class SQLiteDemo extends Component<{}, State> {
- constructor(props: any) {
- super(props);
- this.progress = [];
- this.state = {
- progress: [],
- };
- }
-
- updateProgress = (text: string, resetState?: boolean) => {
- let progress: string[] = [];
- if (!resetState) {
- progress = [...this.progress];
- }
- progress.push(text);
- this.progress = progress;
- this.setState({
- progress,
- });
- };
-
- componentWillUnmount = () => {
- this.closeDatabase();
- };
-
- errorCB = (err: any) => {
- console.log('error: ', err);
- this.updateProgress('Error: ' + (err.message || err));
- return false;
- };
-
- successCB = () => {
- console.log('SQL executed ...');
- };
-
- openCB = () => {
- this.updateProgress('Database OPEN');
- };
-
- closeCB = () => {
- this.updateProgress('Database CLOSED');
- };
-
- deleteCB = () => {
- console.log('Database DELETED');
- this.updateProgress('Database DELETED');
- };
-
- // eslint-disable-next-line no-shadow
- populateDatabase = (db: any) => {
- this.updateProgress('Database integrity check');
- db.executeSql(
- 'SELECT 1 FROM Version LIMIT 1',
- [],
- () => {
- this.updateProgress('Database is ready ... executing query ...');
- db.transaction(this.queryEmployees, this.errorCB, () => {
- this.updateProgress('Processing completed');
- });
- },
- (error: any) => {
- console.log('received version error:', error);
- this.updateProgress('Database not yet ready ... populating data');
- db.transaction(this.populateDB, this.errorCB, () => {
- this.updateProgress('Database populated ... executing query ...');
- db.transaction(this.queryEmployees, this.errorCB, () => {
- console.log('Transaction is now finished');
- this.updateProgress('Processing completed');
- // this.closeDatabase();
- });
- });
- },
- );
- };
-
- populateDB = (tx: any) => {
- this.updateProgress('Executing DROP stmts');
-
- tx.executeSql('DROP TABLE IF EXISTS Employees;');
- tx.executeSql('DROP TABLE IF EXISTS Offices;');
- tx.executeSql('DROP TABLE IF EXISTS Departments;');
-
- this.updateProgress('Executing CREATE stmts');
-
- tx.executeSql(
- 'CREATE TABLE IF NOT EXISTS Version( ' +
- 'version_id INTEGER PRIMARY KEY NOT NULL); ',
- [],
- this.successCB,
- this.errorCB,
- );
-
- tx.executeSql(
- 'CREATE TABLE IF NOT EXISTS Departments( ' +
- 'department_id INTEGER PRIMARY KEY NOT NULL, ' +
- 'name VARCHAR(30) ); ',
- [],
- this.successCB,
- this.errorCB,
- );
-
- tx.executeSql(
- 'CREATE TABLE IF NOT EXISTS Offices( ' +
- 'office_id INTEGER PRIMARY KEY NOT NULL, ' +
- 'name VARCHAR(20), ' +
- 'longtitude FLOAT, ' +
- 'latitude FLOAT ) ; ',
- [],
- this.successCB,
- this.errorCB,
- );
-
- tx.executeSql(
- 'CREATE TABLE IF NOT EXISTS Employees( ' +
- 'employe_id INTEGER PRIMARY KEY NOT NULL, ' +
- 'name VARCHAR(55), ' +
- 'office INTEGER, ' +
- 'department INTEGER, ' +
- 'custom_info TEXT DEFAULT "",' +
- 'FOREIGN KEY ( office ) REFERENCES Offices ( office_id ) ' +
- 'FOREIGN KEY ( department ) REFERENCES Departments ( department_id ));',
- [],
- );
-
- this.updateProgress('Executing INSERT stmts');
-
- tx.executeSql(
- 'INSERT INTO Departments (name) VALUES ("Client Services");',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Departments (name) VALUES ("Investor Services");',
- [],
- );
- tx.executeSql('INSERT INTO Departments (name) VALUES ("Shipping");', []);
- tx.executeSql(
- 'INSERT INTO Departments (name) VALUES ("Direct Sales");',
- [],
- );
-
- tx.executeSql(
- 'INSERT INTO Offices (name, longtitude, latitude) VALUES ("Denver", 59.8, 34.);',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Offices (name, longtitude, latitude) VALUES ("Warsaw", 15.7, 54.);',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Offices (name, longtitude, latitude) VALUES ("Berlin", 35.3, 12.);',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Offices (name, longtitude, latitude) VALUES ("Paris", 10.7, 14.);',
- [],
- );
-
- tx.executeSql(
- 'INSERT INTO Employees (name, office, department, custom_info) VALUES ("Sylvester Stallone", 2, 4, \'{"known": true}\')',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Employees (name, office, department, custom_info) VALUES ("Elvis Presley", 2, 4, \'{"known": true}\')',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Employees (name, office, department, custom_info) VALUES ("Leslie Nelson", 3, 4, \'{"known": true}\')',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Employees (name, office, department, custom_info) VALUES ("Fidel Castro", 3, 3, \'{"known": true}\')',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Employees (name, office, department, custom_info) VALUES ("Bill Clinton", 1, 3, \'{"known": false}\')',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Employees (name, office, department, custom_info) VALUES ("Margaret Thatcher", 1, 3, \'{"known": true}\')',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Employees (name, office, department, custom_info) VALUES ("Donald Trump", 2, 4, \'{"known": true, "impeached": true}\')',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Employees (name, office, department, custom_info) VALUES ("Dr DRE", 2, 2, \'{"known": true}\')',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Employees (name, office, department, custom_info) VALUES ("Samantha Fox", 2, 1, \'{"known": true}\')',
- [],
- );
-
- console.log('all config SQL done');
- };
-
- queryEmployees = async (tx: any) => {
- console.log('Executing JSON1 queries...');
-
- // 1. JSON_OBJECT
- await tx.executeSql(
- "SELECT JSON_OBJECT('name', e.name, 'office_id', e.office, 'department_id', e.department) AS data FROM Employees e",
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 2. JSON_ARRAY
- // Expected: [1,2,"3",4]
- await tx.executeSql(
- "SELECT JSON_ARRAY(1, 2, '3', 4) AS data ",
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 3. JSON_ARRAY_LENGTH
- // Expected: 4
- await tx.executeSql(
- "SELECT JSON_ARRAY_LENGTH('[1, 2, 3, 4]') AS data",
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 4. JSON_EXTRACT
- await tx.executeSql(
- "SELECT JSON_EXTRACT(e.custom_info, '$.known') AS data FROM Employees e",
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 5. JSON_INSERT
- // Expected: {"a":1,"b":2,"c":3}
- await tx.executeSql(
- 'SELECT JSON_INSERT(\'{"a": 1, "b": 2}\', \'$.c\', 3) AS data',
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 6. JSON_REPLACE
- // Expected: {"a":1,"b":3}
- await tx.executeSql(
- 'SELECT JSON_REPLACE(\'{"a": 1, "b": 2}\', \'$.b\', 3) AS data',
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 7. JSON_SET
- // Expected: {"a":1,"b":123}
- await tx.executeSql(
- 'SELECT JSON_SET(\'{"a": 1, "b": 2}\', \'$.b\', 123) AS data',
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 8. JSON_REMOVE
- // Expected: {"a":1"}
- await tx.executeSql(
- 'SELECT JSON_REMOVE(\'{"a": 1, "b": 2}\', \'$.b\') AS data',
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 9. JSON_TYPE
- // Expected: integer
- await tx.executeSql(
- 'SELECT JSON_TYPE(\'{"a": 1, "b": 2}\', \'$.a\') AS data',
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 10. JSON_VALID
- // Expected: 0
- await tx.executeSql(
- 'SELECT JSON_VALID(\'{"a": 1, "b": 2\') AS data',
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 11. JSON_QUOTE
- // Expected: "value"
- await tx.executeSql(
- "SELECT JSON_QUOTE('value') AS data",
- [],
- this.querySuccess,
- this.errorCB,
- );
- };
-
- querySuccess = (tx: any, results: ResultType) => {
- this.updateProgress('Query completed');
- var len = results.rows.length;
- for (let i = 0; i < len; i++) {
- let row = results.rows.item(i);
- this.updateProgress(`${row.data}`);
- }
- };
-
- loadAndQueryDB = () => {
- this.updateProgress('Opening database ...', true);
- this.updateProgress('Database OPEN');
- db = SQLite.openDatabase(
- database_name,
- database_version,
- database_displayname,
- database_size,
- this.openCB,
- this.errorCB,
- );
- this.populateDatabase(db);
- };
-
- deleteDatabase = () => {
- this.updateProgress('Deleting database');
- SQLite.deleteDatabase(database_name, this.deleteCB, this.errorCB);
- };
-
- closeDatabase = () => {
- if (db) {
- console.log('Closing database ...');
- this.updateProgress('Closing database');
- db.close(this.closeCB, this.errorCB);
- } else {
- this.updateProgress('Database CLOSE callback function error');
- // this.updateProgress('Database was not OPENED');
- }
- };
-
- runDemo = () => {
- this.updateProgress('Starting SQLite Callback Demo', true);
- this.loadAndQueryDB();
- };
-
- attachDatabase = () =>{
- if (db!=null) {
- this.updateProgress('Attach database ...');
- let dbMaster = SQLite.openDatabase('test2.db',database_version,database_displayname,database_size,
- () => {
- dbMaster.attach( database_name, database_displayname, () => console.log("Database attached successfully"), () => console.log("ERROR"))
- this.updateProgress('Attach database successfully');
- },
- this.errorCB,
- );
- } else {
- this.updateProgress('Database not open');
- }
-
- }
-
- render = () => {
- return (
-
-
-
- Run Demo
-
-
- Attach DB
-
-
- Close DB
-
-
- Delete DB
-
-
- }
- keyExtractor={(item: any )=> item.i}
- />
-
- );
- };
-}
-
-var listStyles = StyleSheet.create({
- li: {
- borderBottomColor: '#c8c7cc',
- borderBottomWidth: 0.5,
- paddingTop: 15,
- paddingRight: 15,
- paddingBottom: 15,
- },
- liContainer: {
- backgroundColor: '#fff',
- flex: 1,
- paddingLeft: 15,
- },
- liIndent: {
- flex: 1,
- },
- liText: {
- color: '#333',
- fontSize: 17,
- fontWeight: '400',
- marginBottom: -3.5,
- marginTop: -3.5,
- },
-});
-
-var styles = StyleSheet.create({
- container: {
- flex: 1,
- justifyContent: 'center',
- alignItems: 'center',
- backgroundColor: '#F5FCFF',
- },
- welcome: {
- fontSize: 20,
- textAlign: 'center',
- margin: 10,
- },
- instructions: {
- textAlign: 'center',
- color: '#333333',
- marginBottom: 5,
- },
- toolbar: {
- backgroundColor: '#51c04d',
- paddingTop: 30,
- paddingBottom: 10,
- flexDirection: 'row',
- },
- toolbarButton: {
- color: 'blue',
- textAlign: 'center',
- flex: 1,
- },
- mainContainer: {
- flex: 1,
- },
-});
-export default SQLiteDemo;
-
-```
-
-## Use Codegen
-
-Version >= @react-native-ohos/react-native-sqlite-storage@6.0.2, 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
-
-Version >= @react-native-ohos/react-native-sqlite-storage@6.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.
-
-### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project
-
-```json
-{
- ...
- "overrides": {
- "@rnoh/react-native-openharmony" : "./react_native_openharmony"
- }
-}
-```
-
-### 2. Introducing Native Code
-
-Currently, two methods are available:
-
-
-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:
-
-```json
-"dependencies": {
- "@rnoh/react-native-openharmony": "file:../react_native_openharmony",
- "@react-native-ohos/react-native-sqlite-storage": "file:../../node_modules/@react-native-ohos/react-native-sqlite-storage/harmony/sqlite_storage.har"
- }
-```
-
-Click the `sync` button in the upper right corner.
-
-Alternatively, run the following instruction on the terminal:
-
-```bash
-cd entry
-ohpm install
-```
-
-Method 2: Directly link to the source code.
-
-> [!TIP] For details, see [Directly Linking Source Code](/en/link-source-code.md).
-
-### 3. Configure CMakeLists and import SQLitePluginPackage
-
-> V6.0.2 requires configuring CMakeLists and importing SQLitePluginPackage.
-
-Open the `entry/src/main/cpp/CMakeLists.txt` file and add the following code:
-
-```
-project(rnapp)
-cmake_minimum_required(VERSION 3.4.1)
-set(CMAKE_SKIP_BUILD_RPATH TRUE)
-set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
-set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules")
-+ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules")
-set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp")
-set(LOG_VERBOSITY_LEVEL 1)
-set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments")
-set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie")
-set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use
-add_compile_definitions(WITH_HITRACE_SYSTRACE)
-
-add_subdirectory("${RNOH_CPP_DIR}" ./rn)
-
-# RNOH_BEGIN: manual_package_linking_1
-add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package)
-+ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-sqlite-storage/src/main/cpp" ./rnoh_sqlite_storage)
-# 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_sqlite_storage)
-# RNOH_END: manual_package_linking_2
-```
-
-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 "SQLitePluginPackage.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 SQLitePluginPackage to ArkTS
-
-Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code:
-
-```diff
- ...
-+ import {SQLitePluginPackage} from '@react-native-ohos/react-native-sqlite-storage/ts';
-
-export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
- return [
- new SamplePackage(ctx),
-+ new SQLitePluginPackage(ctx)
- ];
-}
-```
-
-### 5. Running
-
-Click the `sync` button in the upper right corner.
-
-Alternatively, run the following instruction on the terminal:
-
-```bash
-cd entry
-ohpm install
-```
-
-Then build and run the code.
-
-## 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.
-
-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
-
-> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android.
-
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| ---- | ----------- | ---- | -------- | -------- | ------------------ |
-| openDatabase | Opens or initializes | void | yes |All | yes |
-| transaction | SQL transaction distribution | void | yes |All | yes |
-| close |Closes or releases a previously opened resource | void | yes |All | yes |
-| deleteDatabase |Deletes a resource |void | yes | All | yes |
-| attach | Connects or associates with an external resource or database | void | yes | All | yes|
-| executeSql |Executes a batch of SQL statements in the background without blocking the current thread or process | void | yes |All | yes |
-
-## Known Issues
-
-## Others
-
-## License
-
-This project is licensed under [The MIT License (MIT)](https://github.com/andpor/react-native-sqlite-storage/blob/master/LICENSE).
\ No newline at end of file
--
Gitee
From 2d819dd9533f7d33ef8352a8d9b8c4b48f77fe5d Mon Sep 17 00:00:00 2001
From: wangqiuyun <727176064@qq.com>
Date: Tue, 2 Dec 2025 05:52:23 +0000
Subject: [PATCH 3/8] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20zh-c?=
=?UTF-8?q?n/react-native-sqlite-storage.md?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
zh-cn/react-native-sqlite-storage.md | 716 ---------------------------
1 file changed, 716 deletions(-)
delete mode 100644 zh-cn/react-native-sqlite-storage.md
diff --git a/zh-cn/react-native-sqlite-storage.md b/zh-cn/react-native-sqlite-storage.md
deleted file mode 100644
index ace4cb44..00000000
--- a/zh-cn/react-native-sqlite-storage.md
+++ /dev/null
@@ -1,716 +0,0 @@
-> 模板版本:v0.2.2
-
-
-
react-native-sqlite-storage
-
-
-
-
-
-
-
-
-
-
-> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-sqlite-storage)
-
-
-## 安装与使用
-
-请到三方库的 Releases 发布地址查看配套的版本信息:
-
-| 三方库版本 | 发布信息 | 支持RN版本 |
-| ---------- | ------------------------------------------------------------ | ---------- |
-| 6.0.1@deprecated | [@react-native-oh-tpl/react-native-sqlite-storage Releases(deprecated)](https://github.com/react-native-oh-library/react-native-sqlite-storage/releases) | 0.72 |
-| 6.0.2 | [@react-native-ohos/react-native-sqlite-storage Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-sqlite-storage/releases) | 0.72 |
-| 6.1.0 | [@react-native-ohos/react-native-sqlite-storage Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-sqlite-storage/releases) | 0.77 |
-
-对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
-
-进入到工程目录并输入以下命令:
-
-
-
-#### **npm**
-
-```bash
-npm install @react-native-ohos/react-native-sqlite-storage
-```
-
-#### **yarn**
-
-```bash
-yarn add @react-native-ohos/react-native-sqlite-storage
-```
-
-下面的代码展示了这个库的基本使用场景:
-
-> [!WARNING] 使用时 import 的库名不变。
-
-```js
-/**
- * @format
- */
-import React, {Component} from 'react';
-import { StyleSheet, Text, View, FlatList} from 'react-native';
-import SQLite from 'react-native-sqlite-storage';
-SQLite.DEBUG(true);
-SQLite.enablePromise(false);
-
-const database_name = 'Test.db';
-const database_version = '1.0';
-const database_displayname = 'SQLite Test Database';
-const database_size = 200000;
-let db: any;
-const Item = (props: any) => {
- const { title } = props;
- return(
-
- {title}
-
- )
-};
-
-interface SQLiteDemo {
- progress: string[]
-}
-
-interface State {
- progress: string[]
-}
-
-interface rowsType {
- item: any,
- length: number
-}
-
-interface ResultType {
- rows: rowsType
-}
-
-class SQLiteDemo extends Component<{}, State> {
- constructor(props: any) {
- super(props);
- this.progress = [];
- this.state = {
- progress: [],
- };
- }
-
- updateProgress = (text: string, resetState?: boolean) => {
- let progress: string[] = [];
- if (!resetState) {
- progress = [...this.progress];
- }
- progress.push(text);
- this.progress = progress;
- this.setState({
- progress,
- });
- };
-
- componentWillUnmount = () => {
- this.closeDatabase();
- };
-
- errorCB = (err: any) => {
- console.log('error: ', err);
- this.updateProgress('Error: ' + (err.message || err));
- return false;
- };
-
- successCB = () => {
- console.log('SQL executed ...');
- };
-
- openCB = () => {
- this.updateProgress('Database OPEN');
- };
-
- closeCB = () => {
- this.updateProgress('Database CLOSED');
- };
-
- deleteCB = () => {
- console.log('Database DELETED');
- this.updateProgress('Database DELETED');
- };
-
- // eslint-disable-next-line no-shadow
- populateDatabase = (db: any) => {
- this.updateProgress('Database integrity check');
- db.executeSql(
- 'SELECT 1 FROM Version LIMIT 1',
- [],
- () => {
- this.updateProgress('Database is ready ... executing query ...');
- db.transaction(this.queryEmployees, this.errorCB, () => {
- this.updateProgress('Processing completed');
- });
- },
- (error: any) => {
- console.log('received version error:', error);
- this.updateProgress('Database not yet ready ... populating data');
- db.transaction(this.populateDB, this.errorCB, () => {
- this.updateProgress('Database populated ... executing query ...');
- db.transaction(this.queryEmployees, this.errorCB, () => {
- console.log('Transaction is now finished');
- this.updateProgress('Processing completed');
- // this.closeDatabase();
- });
- });
- },
- );
- };
-
- populateDB = (tx: any) => {
- this.updateProgress('Executing DROP stmts');
-
- tx.executeSql('DROP TABLE IF EXISTS Employees;');
- tx.executeSql('DROP TABLE IF EXISTS Offices;');
- tx.executeSql('DROP TABLE IF EXISTS Departments;');
-
- this.updateProgress('Executing CREATE stmts');
-
- tx.executeSql(
- 'CREATE TABLE IF NOT EXISTS Version( ' +
- 'version_id INTEGER PRIMARY KEY NOT NULL); ',
- [],
- this.successCB,
- this.errorCB,
- );
-
- tx.executeSql(
- 'CREATE TABLE IF NOT EXISTS Departments( ' +
- 'department_id INTEGER PRIMARY KEY NOT NULL, ' +
- 'name VARCHAR(30) ); ',
- [],
- this.successCB,
- this.errorCB,
- );
-
- tx.executeSql(
- 'CREATE TABLE IF NOT EXISTS Offices( ' +
- 'office_id INTEGER PRIMARY KEY NOT NULL, ' +
- 'name VARCHAR(20), ' +
- 'longtitude FLOAT, ' +
- 'latitude FLOAT ) ; ',
- [],
- this.successCB,
- this.errorCB,
- );
-
- tx.executeSql(
- 'CREATE TABLE IF NOT EXISTS Employees( ' +
- 'employe_id INTEGER PRIMARY KEY NOT NULL, ' +
- 'name VARCHAR(55), ' +
- 'office INTEGER, ' +
- 'department INTEGER, ' +
- 'custom_info TEXT DEFAULT "",' +
- 'FOREIGN KEY ( office ) REFERENCES Offices ( office_id ) ' +
- 'FOREIGN KEY ( department ) REFERENCES Departments ( department_id ));',
- [],
- );
-
- this.updateProgress('Executing INSERT stmts');
-
- tx.executeSql(
- 'INSERT INTO Departments (name) VALUES ("Client Services");',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Departments (name) VALUES ("Investor Services");',
- [],
- );
- tx.executeSql('INSERT INTO Departments (name) VALUES ("Shipping");', []);
- tx.executeSql(
- 'INSERT INTO Departments (name) VALUES ("Direct Sales");',
- [],
- );
-
- tx.executeSql(
- 'INSERT INTO Offices (name, longtitude, latitude) VALUES ("Denver", 59.8, 34.);',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Offices (name, longtitude, latitude) VALUES ("Warsaw", 15.7, 54.);',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Offices (name, longtitude, latitude) VALUES ("Berlin", 35.3, 12.);',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Offices (name, longtitude, latitude) VALUES ("Paris", 10.7, 14.);',
- [],
- );
-
- tx.executeSql(
- 'INSERT INTO Employees (name, office, department, custom_info) VALUES ("Sylvester Stallone", 2, 4, \'{"known": true}\')',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Employees (name, office, department, custom_info) VALUES ("Elvis Presley", 2, 4, \'{"known": true}\')',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Employees (name, office, department, custom_info) VALUES ("Leslie Nelson", 3, 4, \'{"known": true}\')',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Employees (name, office, department, custom_info) VALUES ("Fidel Castro", 3, 3, \'{"known": true}\')',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Employees (name, office, department, custom_info) VALUES ("Bill Clinton", 1, 3, \'{"known": false}\')',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Employees (name, office, department, custom_info) VALUES ("Margaret Thatcher", 1, 3, \'{"known": true}\')',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Employees (name, office, department, custom_info) VALUES ("Donald Trump", 2, 4, \'{"known": true, "impeached": true}\')',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Employees (name, office, department, custom_info) VALUES ("Dr DRE", 2, 2, \'{"known": true}\')',
- [],
- );
- tx.executeSql(
- 'INSERT INTO Employees (name, office, department, custom_info) VALUES ("Samantha Fox", 2, 1, \'{"known": true}\')',
- [],
- );
-
- console.log('all config SQL done');
- };
-
- queryEmployees = async (tx: any) => {
- console.log('Executing JSON1 queries...');
-
- // 1. JSON_OBJECT
- await tx.executeSql(
- "SELECT JSON_OBJECT('name', e.name, 'office_id', e.office, 'department_id', e.department) AS data FROM Employees e",
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 2. JSON_ARRAY
- // Expected: [1,2,"3",4]
- await tx.executeSql(
- "SELECT JSON_ARRAY(1, 2, '3', 4) AS data ",
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 3. JSON_ARRAY_LENGTH
- // Expected: 4
- await tx.executeSql(
- "SELECT JSON_ARRAY_LENGTH('[1, 2, 3, 4]') AS data",
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 4. JSON_EXTRACT
- await tx.executeSql(
- "SELECT JSON_EXTRACT(e.custom_info, '$.known') AS data FROM Employees e",
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 5. JSON_INSERT
- // Expected: {"a":1,"b":2,"c":3}
- await tx.executeSql(
- 'SELECT JSON_INSERT(\'{"a": 1, "b": 2}\', \'$.c\', 3) AS data',
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 6. JSON_REPLACE
- // Expected: {"a":1,"b":3}
- await tx.executeSql(
- 'SELECT JSON_REPLACE(\'{"a": 1, "b": 2}\', \'$.b\', 3) AS data',
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 7. JSON_SET
- // Expected: {"a":1,"b":123}
- await tx.executeSql(
- 'SELECT JSON_SET(\'{"a": 1, "b": 2}\', \'$.b\', 123) AS data',
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 8. JSON_REMOVE
- // Expected: {"a":1"}
- await tx.executeSql(
- 'SELECT JSON_REMOVE(\'{"a": 1, "b": 2}\', \'$.b\') AS data',
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 9. JSON_TYPE
- // Expected: integer
- await tx.executeSql(
- 'SELECT JSON_TYPE(\'{"a": 1, "b": 2}\', \'$.a\') AS data',
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 10. JSON_VALID
- // Expected: 0
- await tx.executeSql(
- 'SELECT JSON_VALID(\'{"a": 1, "b": 2\') AS data',
- [],
- this.querySuccess,
- this.errorCB,
- );
-
- // 11. JSON_QUOTE
- // Expected: "value"
- await tx.executeSql(
- "SELECT JSON_QUOTE('value') AS data",
- [],
- this.querySuccess,
- this.errorCB,
- );
- };
-
- querySuccess = (tx: any, results: ResultType) => {
- this.updateProgress('Query completed');
- var len = results.rows.length;
- for (let i = 0; i < len; i++) {
- let row = results.rows.item(i);
- this.updateProgress(`${row.data}`);
- }
- };
-
- loadAndQueryDB = () => {
- this.updateProgress('Opening database ...', true);
- this.updateProgress('Database OPEN');
- db = SQLite.openDatabase(
- database_name,
- database_version,
- database_displayname,
- database_size,
- this.openCB,
- this.errorCB,
- );
- this.populateDatabase(db);
- };
-
- deleteDatabase = () => {
- this.updateProgress('Deleting database');
- SQLite.deleteDatabase(database_name, this.deleteCB, this.errorCB);
- };
-
- closeDatabase = () => {
- if (db) {
- console.log('Closing database ...');
- this.updateProgress('Closing database');
- db.close(this.closeCB, this.errorCB);
- } else {
- this.updateProgress('Database CLOSE callback function error');
- // this.updateProgress('Database was not OPENED');
- }
- };
-
- runDemo = () => {
- this.updateProgress('Starting SQLite Callback Demo', true);
- this.loadAndQueryDB();
- };
-
- attachDatabase = () =>{
- if (db!=null) {
- this.updateProgress('Attach database ...');
- let dbMaster = SQLite.openDatabase('test2.db',database_version,database_displayname,database_size,
- () => {
- dbMaster.attach( database_name, database_displayname, () => console.log("Database attached successfully"), () => console.log("ERROR"))
- this.updateProgress('Attach database successfully');
- },
- this.errorCB,
- );
- } else {
- this.updateProgress('Database not open');
- }
-
- }
-
- render = () => {
- return (
-
-
-
- Run Demo
-
-
- Attach DB
-
-
- Close DB
-
-
- Delete DB
-
-
- }
- keyExtractor={(item: any )=> item.i}
- />
-
- );
- };
-}
-
-var listStyles = StyleSheet.create({
- li: {
- borderBottomColor: '#c8c7cc',
- borderBottomWidth: 0.5,
- paddingTop: 15,
- paddingRight: 15,
- paddingBottom: 15,
- },
- liContainer: {
- backgroundColor: '#fff',
- flex: 1,
- paddingLeft: 15,
- },
- liIndent: {
- flex: 1,
- },
- liText: {
- color: '#333',
- fontSize: 17,
- fontWeight: '400',
- marginBottom: -3.5,
- marginTop: -3.5,
- },
-});
-
-var styles = StyleSheet.create({
- container: {
- flex: 1,
- justifyContent: 'center',
- alignItems: 'center',
- backgroundColor: '#F5FCFF',
- },
- welcome: {
- fontSize: 20,
- textAlign: 'center',
- margin: 10,
- },
- instructions: {
- textAlign: 'center',
- color: '#333333',
- marginBottom: 5,
- },
- toolbar: {
- backgroundColor: '#51c04d',
- paddingTop: 30,
- paddingBottom: 10,
- flexDirection: 'row',
- },
- toolbarButton: {
- color: 'blue',
- textAlign: 'center',
- flex: 1,
- },
- mainContainer: {
- flex: 1,
- },
-});
-export default SQLiteDemo;
-
-```
-
-## 使用 Codegen
-
-Version >= @react-native-ohos/react-native-sqlite-storage@6.0.2,已适配codegen-lib生成桥接代码。
-
-本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。
-
-## Link
-
-Version >= @react-native-ohos/react-native-sqlite-storage@6.0.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字段
-
-```json
-{
- ...
- "overrides": {
- "@rnoh/react-native-openharmony" : "./react_native_openharmony"
- }
-}
-```
-
-### 2.引入原生端代码
-
-目前有两种方法:
-
-1. 通过 har 包引入(在 IDE 完善相关功能后该方法会被遗弃,目前首选此方法);
-2. 直接链接源码。
-
-方法一:通过 har 包引入(推荐)
-
-> [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。
-
-打开 `entry/oh-package.json5`,添加以下依赖
-
-```json
-"dependencies": {
- "@rnoh/react-native-openharmony": "file:../react_native_openharmony",
- "@react-native-ohos/react-native-sqlite-storage": "file:../../node_modules/@react-native-ohos/react-native-sqlite-storage/harmony/sqlite_storage.har"
- }
-```
-
-点击右上角的 `sync` 按钮
-
-或者在终端执行:
-
-```bash
-cd entry
-ohpm install
-```
-
-方法二:直接链接源码
-
-> [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md)
-
-
-### 3. 配置 CMakeLists 和引入 SQLitePluginPackage
-
-> V6.0.2 需要配置 CMakeLists 和引入 SQLitePluginPackage.
-
-打开 `entry/src/main/cpp/CMakeLists.txt`,添加:
-
-```
-project(rnapp)
-cmake_minimum_required(VERSION 3.4.1)
-set(CMAKE_SKIP_BUILD_RPATH TRUE)
-set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
-set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules")
-+ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules")
-set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp")
-set(LOG_VERBOSITY_LEVEL 1)
-set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments")
-set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie")
-set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use
-add_compile_definitions(WITH_HITRACE_SYSTRACE)
-
-add_subdirectory("${RNOH_CPP_DIR}" ./rn)
-
-# RNOH_BEGIN: manual_package_linking_1
-add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package)
-+ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-sqlite-storage/src/main/cpp" ./rnoh_sqlite_storage)
-# 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_sqlite_storage)
-# RNOH_END: manual_package_linking_2
-```
-
-打开 `entry/src/main/cpp/PackageProvider.cpp`,添加:
-
-```
-#include "RNOH/PackageProvider.h"
-#include "generated/RNOHGeneratedPackage.h"
-#include "SamplePackage.h"
-+ #include "SQLitePluginPackage.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 侧引入 SQLitePluginPackage
-
-打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加:
-
-```diff
- ...
-+ import {SQLitePluginPackage} from '@react-native-ohos/react-native-sqlite-storage/ts';
-
-export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
- return [
- new SamplePackage(ctx),
-+ new SQLitePluginPackage(ctx)
- ];
-}
-```
-
-### 5. 运行
-
-点击右上角的 `sync` 按钮
-
-或者在终端执行:
-
-```bash
-cd entry
-ohpm install
-```
-
-然后编译、运行即可。
-
-## 兼容性
-
-要使用此库,需要使用正确的 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;
-
-## 静态方法
-
-> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。
-
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| ---- | ----------- | ---- | -------- | -------- | ------------------ |
-| openDatabase | Opens or initializes | void | yes |All | yes |
-| transaction | SQL transaction distribution | void | yes |All | yes |
-| close |Closes or releases a previously opened resource | void | yes |All | yes |
-| deleteDatabase |Deletes a resource |void | yes | All | yes |
-| attach | Connects or associates with an external resource or database | void | yes | All | yes|
-| executeSql |Executes a batch of SQL statements in the background without blocking the current thread or process | void | yes |All | yes |
-
-## 遗留问题
-
-## 其他
-
-## 开源协议
-
-本项目基于 [The MIT License (MIT)](https://github.com/andpor/react-native-sqlite-storage/blob/master/LICENSE) ,请自由地享受和参与开源。
\ No newline at end of file
--
Gitee
From 7932c1f5dec28b475bb52a38fe053d9b64ed6250 Mon Sep 17 00:00:00 2001
From: wangqiuyun <727176064@qq.com>
Date: Tue, 2 Dec 2025 13:55:40 +0800
Subject: [PATCH 4/8] =?UTF-8?q?docs:=20[Issues:=20#ID7VS4]=20=E4=B8=89?=
=?UTF-8?q?=E6=96=B9=E5=BA=93=E9=80=82=E9=85=8Dcli=E5=B7=A5=E5=85=B7?=
=?UTF-8?q?=E9=9C=80=E6=B1=8227=E4=B8=AA=E4=B8=89=E6=96=B9=E5=BA=93?=
=?UTF-8?q?=E6=96=87=E6=A1=A3=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: wangqiuyun <727176064@qq.com>
---
en/react-native-sqlite-storage.md | 94 +++------------------------
zh-cn/react-native-sqlite-storage.md | 96 +++-------------------------
2 files changed, 18 insertions(+), 172 deletions(-)
diff --git a/en/react-native-sqlite-storage.md b/en/react-native-sqlite-storage.md
index a4ae9a54..73859e53 100644
--- a/en/react-native-sqlite-storage.md
+++ b/en/react-native-sqlite-storage.md
@@ -17,15 +17,7 @@
## 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 |
-|-----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------| ---------- |
-| 6.0.1@deprecated | [@react-native-oh-tpl/react-native-sqlite-storage Releases(deprecated)](https://github.com/react-native-oh-library/react-native-sqlite-storage/releases) | 0.72 |
-| 6.0.2 | [@react-native-ohos/react-native-sqlite-storage Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-sqlite-storage/releases) | 0.72 |
-| 6.1.0 | [@react-native-ohos/react-native-sqlite-storage Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-sqlite-storage/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.
+Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-sqlite-storage Releases](https://github.com/react-native-oh-library/react-native-sqlite-storage/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.
Go to the project directory and execute the following instruction:
@@ -36,13 +28,13 @@ Go to the project directory and execute the following instruction:
#### **npm**
```bash
-npm install @react-native-ohos/react-native-sqlite-storage
+npm install @react-native-oh-tpl/react-native-sqlite-storage
```
#### **yarn**
```bash
-yarn add @react-native-ohos/react-native-sqlite-storage
+yarn add @react-native-oh-tpl/react-native-sqlite-storage
```
The following code shows the basic use scenario of the repository:
@@ -538,15 +530,11 @@ export default SQLiteDemo;
## Use Codegen
-Version >= @react-native-ohos/react-native-sqlite-storage@6.0.2, 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
-Version >= @react-native-ohos/react-native-sqlite-storage@6.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.
+Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking.
Open the `harmony` directory of the HarmonyOS project in DevEco Studio.
@@ -575,7 +563,7 @@ Open `entry/oh-package.json5` file and add the following dependencies:
```json
"dependencies": {
"@rnoh/react-native-openharmony": "file:../react_native_openharmony",
- "@react-native-ohos/react-native-sqlite-storage": "file:../../node_modules/@react-native-ohos/react-native-sqlite-storage/harmony/sqlite_storage.har"
+ "@react-native-oh-tpl/react-native-sqlite-storage": "file:../../node_modules/@react-native-oh-tpl/react-native-sqlite-storage/platforms/harmony/sqlite_storage.har"
}
```
@@ -592,74 +580,14 @@ Method 2: Directly link to the source code.
> [!TIP] For details, see [Directly Linking Source Code](/en/link-source-code.md).
-### 3. Configure CMakeLists and import SQLitePluginPackage
-
-> V6.0.2 requires configuring CMakeLists and importing SQLitePluginPackage.
-
-Open the `entry/src/main/cpp/CMakeLists.txt` file and add the following code:
-
-```
-project(rnapp)
-cmake_minimum_required(VERSION 3.4.1)
-set(CMAKE_SKIP_BUILD_RPATH TRUE)
-set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
-set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules")
-+ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules")
-set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp")
-set(LOG_VERBOSITY_LEVEL 1)
-set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments")
-set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie")
-set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use
-add_compile_definitions(WITH_HITRACE_SYSTRACE)
-
-add_subdirectory("${RNOH_CPP_DIR}" ./rn)
-
-# RNOH_BEGIN: manual_package_linking_1
-add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package)
-+ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-sqlite-storage/src/main/cpp" ./rnoh_sqlite_storage)
-# 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_sqlite_storage)
-# RNOH_END: manual_package_linking_2
-```
-
-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 "SQLitePluginPackage.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 SQLitePluginPackage to ArkTS
+### 3. Introducing SQLitePluginPackage to ArkTS
Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code:
```diff
...
-+ import {SQLitePluginPackage} from '@react-native-ohos/react-native-sqlite-storage/ts';
++ import {SQLitePluginPackage} from '@react-native-oh-tpl/react-native-sqlite-storage/ts';
export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
return [
@@ -669,7 +597,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
}
```
-### 5. Running
+### 4. Running
Click the `sync` button in the upper right corner.
@@ -686,11 +614,7 @@ 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.
-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;
+Check the release version information in the release address of the third-party library:[@react-native-oh-tpl/react-native-sqlite-storage Releases](https://github.com/react-native-oh-library/react-native-sqlite-storage/releases)
## Static Methods
diff --git a/zh-cn/react-native-sqlite-storage.md b/zh-cn/react-native-sqlite-storage.md
index ace4cb44..305b2232 100644
--- a/zh-cn/react-native-sqlite-storage.md
+++ b/zh-cn/react-native-sqlite-storage.md
@@ -17,15 +17,7 @@
## 安装与使用
-请到三方库的 Releases 发布地址查看配套的版本信息:
-
-| 三方库版本 | 发布信息 | 支持RN版本 |
-| ---------- | ------------------------------------------------------------ | ---------- |
-| 6.0.1@deprecated | [@react-native-oh-tpl/react-native-sqlite-storage Releases(deprecated)](https://github.com/react-native-oh-library/react-native-sqlite-storage/releases) | 0.72 |
-| 6.0.2 | [@react-native-ohos/react-native-sqlite-storage Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-sqlite-storage/releases) | 0.72 |
-| 6.1.0 | [@react-native-ohos/react-native-sqlite-storage Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-sqlite-storage/releases) | 0.77 |
-
-对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
+请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-sqlite-storage Releases](https://github.com/react-native-oh-library/react-native-sqlite-storage/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
进入到工程目录并输入以下命令:
@@ -34,13 +26,13 @@
#### **npm**
```bash
-npm install @react-native-ohos/react-native-sqlite-storage
+npm install @react-native-oh-tpl/react-native-sqlite-storage
```
#### **yarn**
```bash
-yarn add @react-native-ohos/react-native-sqlite-storage
+yarn add @react-native-oh-tpl/react-native-sqlite-storage
```
下面的代码展示了这个库的基本使用场景:
@@ -536,16 +528,11 @@ export default SQLiteDemo;
## 使用 Codegen
-Version >= @react-native-ohos/react-native-sqlite-storage@6.0.2,已适配codegen-lib生成桥接代码。
-
本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。
## Link
-Version >= @react-native-ohos/react-native-sqlite-storage@6.0.2,已支持 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`
@@ -576,7 +563,7 @@ Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_nati
```json
"dependencies": {
"@rnoh/react-native-openharmony": "file:../react_native_openharmony",
- "@react-native-ohos/react-native-sqlite-storage": "file:../../node_modules/@react-native-ohos/react-native-sqlite-storage/harmony/sqlite_storage.har"
+ "@react-native-oh-tpl/react-native-sqlite-storage": "file:../../node_modules/@react-native-oh-tpl/react-native-sqlite-storage/platforms/harmony/sqlite_storage.har"
}
```
@@ -594,74 +581,13 @@ ohpm install
> [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md)
-### 3. 配置 CMakeLists 和引入 SQLitePluginPackage
-
-> V6.0.2 需要配置 CMakeLists 和引入 SQLitePluginPackage.
-
-打开 `entry/src/main/cpp/CMakeLists.txt`,添加:
-
-```
-project(rnapp)
-cmake_minimum_required(VERSION 3.4.1)
-set(CMAKE_SKIP_BUILD_RPATH TRUE)
-set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
-set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules")
-+ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules")
-set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp")
-set(LOG_VERBOSITY_LEVEL 1)
-set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments")
-set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie")
-set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use
-add_compile_definitions(WITH_HITRACE_SYSTRACE)
-
-add_subdirectory("${RNOH_CPP_DIR}" ./rn)
-
-# RNOH_BEGIN: manual_package_linking_1
-add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package)
-+ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-sqlite-storage/src/main/cpp" ./rnoh_sqlite_storage)
-# 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_sqlite_storage)
-# RNOH_END: manual_package_linking_2
-```
-
-打开 `entry/src/main/cpp/PackageProvider.cpp`,添加:
-
-```
-#include "RNOH/PackageProvider.h"
-#include "generated/RNOHGeneratedPackage.h"
-#include "SamplePackage.h"
-+ #include "SQLitePluginPackage.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 侧引入 SQLitePluginPackage
+### 3.在 ArkTs 侧引入 SQLitePluginPackage
打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加:
```diff
...
-+ import {SQLitePluginPackage} from '@react-native-ohos/react-native-sqlite-storage/ts';
++ import {SQLitePluginPackage} from '@react-native-oh-tpl/react-native-sqlite-storage/ts';
export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
return [
@@ -671,7 +597,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
}
```
-### 5. 运行
+### 4.运行
点击右上角的 `sync` 按钮
@@ -688,11 +614,7 @@ ohpm install
要使用此库,需要使用正确的 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;
+请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-sqlite-storage Releases](https://github.com/react-native-oh-library/react-native-sqlite-storage/releases)
## 静态方法
--
Gitee
From 3861caf28def712c4a857b5be0ab72d33fa9d30e Mon Sep 17 00:00:00 2001
From: wangqiuyun <727176064@qq.com>
Date: Tue, 2 Dec 2025 15:08:57 +0800
Subject: [PATCH 5/8] =?UTF-8?q?docs:=20[Issues:=20#ID7VS4]=20=E4=B8=89?=
=?UTF-8?q?=E6=96=B9=E5=BA=93=E9=80=82=E9=85=8Dcli=E5=B7=A5=E5=85=B7?=
=?UTF-8?q?=E9=9C=80=E6=B1=8227=E4=B8=AA=E4=B8=89=E6=96=B9=E5=BA=93?=
=?UTF-8?q?=E6=96=87=E6=A1=A3=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: wangqiuyun <727176064@qq.com>
---
en/react-native-maps.md | 44 ++++++++++---------
en/react-native-share.md | 84 +++++++++++++++++++++++++++++++++----
zh-cn/react-native-maps.md | 39 +++++++++--------
zh-cn/react-native-share.md | 81 +++++++++++++++++++++++++++++++----
4 files changed, 194 insertions(+), 54 deletions(-)
diff --git a/en/react-native-maps.md b/en/react-native-maps.md
index 6e39fc60..0ac3f4b1 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-share.md b/en/react-native-share.md
index 6075f83c..d278685d 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/zh-cn/react-native-maps.md b/zh-cn/react-native-maps.md
index de4ca751..671190f5 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-oh-os/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-share.md b/zh-cn/react-native-share.md
index e16d5c01..ca7b8f5e 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;
## 属性
--
Gitee
From 8e7e213582d8e5b92c8fc625f02620aed4fb42ea Mon Sep 17 00:00:00 2001
From: wangqiuyun <727176064@qq.com>
Date: Tue, 2 Dec 2025 15:08:57 +0800
Subject: [PATCH 6/8] =?UTF-8?q?docs:=20[Issues:=20#ID7VS4]=20=E4=B8=89?=
=?UTF-8?q?=E6=96=B9=E5=BA=93=E9=80=82=E9=85=8Dcli=E5=B7=A5=E5=85=B7?=
=?UTF-8?q?=E9=9C=80=E6=B1=8227=E4=B8=AA=E4=B8=89=E6=96=B9=E5=BA=93?=
=?UTF-8?q?=E6=96=87=E6=A1=A3=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: wangqiuyun <727176064@qq.com>
---
en/jpush-react-native.md | 4 +-
en/react-native-background-timer.md | 2 +-
en/react-native-community-progress-view.md | 2 +-
en/react-native-image-marker.md | 6 +-
en/react-native-maps.md | 44 +++++-----
en/react-native-share.md | 84 +++++++++++++++++--
zh-cn/jpush-react-native.md | 4 +-
zh-cn/react-native-background-timer.md | 2 +-
zh-cn/react-native-community-progress-view.md | 2 +-
zh-cn/react-native-maps.md | 39 +++++----
zh-cn/react-native-share.md | 81 ++++++++++++++++--
11 files changed, 205 insertions(+), 65 deletions(-)
diff --git a/en/jpush-react-native.md b/en/jpush-react-native.md
index dbd23100..1cb45e0d 100644
--- a/en/jpush-react-native.md
+++ b/en/jpush-react-native.md
@@ -21,8 +21,8 @@ Please refer to the Releases page of the third-party library for the correspondi
| 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/react-native-print Releases](https://gitcode.com/openharmony-sig/rntpc_jpush-react-native/releases) | 0.72 |
-| 3.2.0 | [@react-native-ohos/react-native-print Releases](https://gitcode.com/openharmony-sig/rntpc_jpush-react-native/releases) | 0.77 |
+| 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.
diff --git a/en/react-native-background-timer.md b/en/react-native-background-timer.md
index 2e3b6a05..a7078d6a 100644
--- a/en/react-native-background-timer.md
+++ b/en/react-native-background-timer.md
@@ -4,7 +4,7 @@
react-native-background-timer
-> [!TIP] [GitHub address](https://github.com/ocetnik/react-native-background-timer)
+> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-background-timer)
## 1. Installation and Usage
diff --git a/en/react-native-community-progress-view.md b/en/react-native-community-progress-view.md
index 84e7fbfc..0890d9c8 100644
--- a/en/react-native-community-progress-view.md
+++ b/en/react-native-community-progress-view.md
@@ -4,7 +4,7 @@
@react-native-community/progress-view
-> [!TIP] [Github address](https://github.com/react-native-progress-view/progress-view)
+> [!TIP] [Github address](https://github.com/react-native-oh-library/progress-view)
## Installation and Usage
diff --git a/en/react-native-image-marker.md b/en/react-native-image-marker.md
index ef2ba94d..1874f18c 100644
--- a/en/react-native-image-marker.md
+++ b/en/react-native-image-marker.md
@@ -20,9 +20,9 @@ Find the matching version information in the release address of a third-party li
| Third-party Library Version | Release Information | Supported RN Version |
| ---------- | ------------------------------------------------------------ | ---------- |
-| 3.2.0@deprecated | [@react-native-oh-tpl/react-native-ble-plx Releases(deprecated)](https://github.com/react-native-oh-library/react-native-ble-plx/releases) | 0.72 |
-| 3.2.1 | [@react-native-ohos/react-native-ble-plx Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-ble-plx/releases) | 0.72 |
-| 3.5.1 | [@react-native-ohos/react-native-ble-plx Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-ble-plx/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.
diff --git a/en/react-native-maps.md b/en/react-native-maps.md
index 6e39fc60..0ac3f4b1 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-share.md b/en/react-native-share.md
index 6075f83c..d278685d 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/zh-cn/jpush-react-native.md b/zh-cn/jpush-react-native.md
index 27daea18..4ecaf121 100644
--- a/zh-cn/jpush-react-native.md
+++ b/zh-cn/jpush-react-native.md
@@ -22,8 +22,8 @@
| 三方库版本 | 发布信息 | 支持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/react-native-print Releases](https://gitcode.com/openharmony-sig/rntpc_jpush-react-native/releases) | 0.72 |
-| 3.2.0 | [@react-native-ohos/react-native-print Releases](https://gitcode.com/openharmony-sig/rntpc_jpush-react-native/releases) | 0.77 |
+| 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包。
diff --git a/zh-cn/react-native-background-timer.md b/zh-cn/react-native-background-timer.md
index 6ef2c944..5961ab62 100644
--- a/zh-cn/react-native-background-timer.md
+++ b/zh-cn/react-native-background-timer.md
@@ -4,7 +4,7 @@
react-native-background-timer
-> [!TIP] [Github 地址](https://github.com/ocetnik/react-native-background-timer)
+> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-background-timer)
## 1. 安装与使用
diff --git a/zh-cn/react-native-community-progress-view.md b/zh-cn/react-native-community-progress-view.md
index 58ef7e83..5a68262f 100644
--- a/zh-cn/react-native-community-progress-view.md
+++ b/zh-cn/react-native-community-progress-view.md
@@ -5,7 +5,7 @@
-> [!TIP] [Github 地址](https://github.com/react-native-progress-view/progress-view)
+> [!TIP] [Github 地址](https://github.com/react-native-oh-library/progress-view)
## 安装与使用
diff --git a/zh-cn/react-native-maps.md b/zh-cn/react-native-maps.md
index de4ca751..722a8680 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-share.md b/zh-cn/react-native-share.md
index e16d5c01..ca7b8f5e 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;
## 属性
--
Gitee
From 62d31a86afea0b80b6f7fdeda8e4b919f9172399 Mon Sep 17 00:00:00 2001
From: wangqiuyun <727176064@qq.com>
Date: Wed, 3 Dec 2025 15:10:59 +0800
Subject: [PATCH 7/8] =?UTF-8?q?docs:=20[Issues:=20#ID7VS4]=20=E4=B8=89?=
=?UTF-8?q?=E6=96=B9=E5=BA=93=E9=80=82=E9=85=8Dcli=E5=B7=A5=E5=85=B7?=
=?UTF-8?q?=E9=9C=80=E6=B1=8227=E4=B8=AA=E4=B8=89=E6=96=B9=E5=BA=93?=
=?UTF-8?q?=E6=96=87=E6=A1=A3=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: wangqiuyun <727176064@qq.com>
---
en/react-native-oh-tpl-react-native-screens.md | 4 ++--
zh-cn/react-native-oh-tpl-react-native-screens.md | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/en/react-native-oh-tpl-react-native-screens.md b/en/react-native-oh-tpl-react-native-screens.md
index e469165c..8c4108c5 100644
--- a/en/react-native-oh-tpl-react-native-screens.md
+++ b/en/react-native-oh-tpl-react-native-screens.md
@@ -46,7 +46,7 @@ Go to the project directory and execute the following instruction:
```bash
# 0.72
-npm install @react-native-oh-tpl/react-native-screens@3.34.1-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
@@ -58,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.1-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
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 8967cf41..0b36239a 100644
--- a/zh-cn/react-native-oh-tpl-react-native-screens.md
+++ b/zh-cn/react-native-oh-tpl-react-native-screens.md
@@ -46,7 +46,7 @@
```bash
# 0.72
-npm install @react-native-oh-tpl/react-native-screens@3.34.1-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
@@ -58,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.1-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
--
Gitee
From 2304de1e87d75acc516160f952d99f585fd7f422 Mon Sep 17 00:00:00 2001
From: wangqiuyun <727176064@qq.com>
Date: Wed, 3 Dec 2025 15:10:59 +0800
Subject: [PATCH 8/8] =?UTF-8?q?docs:=20[Issues:=20#ID7VS4]=20=E4=B8=89?=
=?UTF-8?q?=E6=96=B9=E5=BA=93=E9=80=82=E9=85=8Dcli=E5=B7=A5=E5=85=B7?=
=?UTF-8?q?=E9=9C=80=E6=B1=8227=E4=B8=AA=E4=B8=89=E6=96=B9=E5=BA=93?=
=?UTF-8?q?=E6=96=87=E6=A1=A3=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: wangqiuyun <727176064@qq.com>
---
en/react-native-audio-toolkit.md | 2 +-
en/react-native-oh-tpl-react-native-screens.md | 4 ++--
zh-cn/react-native-oh-tpl-react-native-screens.md | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/en/react-native-audio-toolkit.md b/en/react-native-audio-toolkit.md
index 0161a1d9..55a14245 100644
--- a/en/react-native-audio-toolkit.md
+++ b/en/react-native-audio-toolkit.md
@@ -507,7 +507,7 @@ Method 2: Directly link to the source code.
> [!TIP] For details, see [Directly Linking Source Code](/en/link-source-code.md).
-### 4.配置 CMakeLists 和引入 AudioToolkitPackage
+### 4. Configuring CMakeLists and Introducing AudioToolkitPackage
> V2.0.4 requires configuring CMakeLists and importing AudioToolkitPackage
diff --git a/en/react-native-oh-tpl-react-native-screens.md b/en/react-native-oh-tpl-react-native-screens.md
index e469165c..8c4108c5 100644
--- a/en/react-native-oh-tpl-react-native-screens.md
+++ b/en/react-native-oh-tpl-react-native-screens.md
@@ -46,7 +46,7 @@ Go to the project directory and execute the following instruction:
```bash
# 0.72
-npm install @react-native-oh-tpl/react-native-screens@3.34.1-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
@@ -58,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.1-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
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 8967cf41..0b36239a 100644
--- a/zh-cn/react-native-oh-tpl-react-native-screens.md
+++ b/zh-cn/react-native-oh-tpl-react-native-screens.md
@@ -46,7 +46,7 @@
```bash
# 0.72
-npm install @react-native-oh-tpl/react-native-screens@3.34.1-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
@@ -58,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.1-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
--
Gitee