From f0419537280269684d90cd9928911f2685ea78e9 Mon Sep 17 00:00:00 2001 From: wangdonghai Date: Fri, 12 Dec 2025 19:16:53 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20[Issues:=20#IDCPU3]=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=82=E6=96=87=E6=A1=A3=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangdonghai --- en/react-native-SmartRefreshLayout.md | 20 +- en/react-native-send-intent.md | 22 ++- en/react-native-sensitive-info.md | 22 ++- en/react-native-sensors.md | 32 ++-- en/react-native-share.md | 41 +++-- en/react-native-signature-capture.md | 22 ++- en/react-native-skia.md | 17 +- en/react-native-snackbar.md | 23 ++- en/react-native-splash-screen.md | 35 ++-- en/react-native-spring-scrollview.md | 17 +- en/react-native-ssl-pinning.md | 22 ++- en/react-native-svg-capi.md | 17 +- en/react-native-syan-image-picker.md | 219 +++++++++++----------- en/react-native-system-setting.md | 57 +++--- en/react-native-tcp-socket.md | 22 ++- en/react-native-text-gradient.md | 17 +- en/react-native-text-input-mask.md | 17 +- zh-cn/react-native-SmartRefreshLayout.md | 19 +- zh-cn/react-native-send-intent.md | 17 +- zh-cn/react-native-sensitive-info.md | 19 +- zh-cn/react-native-sensors.md | 29 ++- zh-cn/react-native-share.md | 38 ++-- zh-cn/react-native-signature-capture.md | 19 +- zh-cn/react-native-skia.md | 17 +- zh-cn/react-native-snackbar.md | 19 +- zh-cn/react-native-splash-screen.md | 31 ++-- zh-cn/react-native-spring-scrollview.md | 17 +- zh-cn/react-native-ssl-pinning.md | 20 +- zh-cn/react-native-svg-capi.md | 17 +- zh-cn/react-native-syan-image-picker.md | 221 ++++++++++++----------- zh-cn/react-native-system-setting.md | 19 +- zh-cn/react-native-tcp-socket.md | 20 +- zh-cn/react-native-text-gradient.md | 17 +- zh-cn/react-native-text-input-mask.md | 16 +- 34 files changed, 721 insertions(+), 456 deletions(-) diff --git a/en/react-native-SmartRefreshLayout.md b/en/react-native-SmartRefreshLayout.md index 46cfd9518..52c48446c 100644 --- a/en/react-native-SmartRefreshLayout.md +++ b/en/react-native-SmartRefreshLayout.md @@ -186,12 +186,19 @@ export default App; ## Link -Version >= @react-native-ohos/react-native-smartrefreshlayout@0.6.8 now supports Autolink without requiring manual configuration, currently only supports 72 frameworks. -Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | Is supported autolink | Supported RN Version | +|--------------------------------------|-----------------------|----------------------| +| ~0.7.0 | No | 0.77 | +| ~0.6.8 | Yes | 0.72 | +| <= 0.6.7-0.2.18@deprecated | No | 0.72 | -This step provides guidance for manually configuring native dependencies. +Using AutoLink need to be configured according to this document, 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. +If the version you use supports Autolink and the project has been connected to Autolink, skip the ManualLink configuration. +
+ ManualLink: this step is a guide to manually configure native dependencies. + +First, use DevEco Studio to open the HarmonyOS project `harmony` in the project directory. ### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project @@ -292,7 +299,7 @@ std::vector> PackageProvider::getPackages(Package::Cont } ``` -### 4. Introducing SmartRefreshPackage to ArkTS(Version>=0.6.7-0.2.9) +### 4. Introducing SmartRefreshPackage to ArkTS Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: @@ -306,8 +313,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5. Running +## Running Click the `sync` button in the upper right corner. diff --git a/en/react-native-send-intent.md b/en/react-native-send-intent.md index d366e1221..94fd57225 100644 --- a/en/react-native-send-intent.md +++ b/en/react-native-send-intent.md @@ -148,18 +148,23 @@ 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). +This library has been adapted for `Codegen`. Before using it, you need to proactively generate the bridge code for the third-party library. For details, please refer to the [Codegen Usage Documentation](/en/codegen.md). ## Link -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 +| | Is supported autolink | Supported RN Version | +|--------------------------------------|-----------------------|----------------------| +| ~1.4.0 | No | 0.77 | +| ~1.3.1 | Yes | 0.72 | +| <= 1.3.0-0.0.5@deprecated | No | 0.72 | + +Using AutoLink need to be configured according to this document, 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. +If the version you use supports Autolink and the project has been connected to Autolink, skip the ManualLink configuration. +
+ ManualLink: this step is a guide to manually configure native dependencies. -Open the `harmony` directory of the HarmonyOS project in DevEco Studio. +First, use DevEco Studio to open the HarmonyOS project `harmony` in the project directory. ### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project @@ -278,8 +283,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5. Running +## Running Click the `sync` button in the upper right corner. diff --git a/en/react-native-sensitive-info.md b/en/react-native-sensitive-info.md index ef1286c89..b172e54db 100644 --- a/en/react-native-sensitive-info.md +++ b/en/react-native-sensitive-info.md @@ -130,18 +130,23 @@ export default SensitiveInfoDemo; ## Use Codegen -Version >= @react-native-ohos/react-native-sensitive-info@6.0.1, compatible with codegen-lib for generating bridge code. - -If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/en/codegen.md). +This library has been adapted for `Codegen`. Before using it, you need to proactively generate the bridge code for the third-party library. For details, please refer to the [Codegen Usage Documentation](/en/codegen.md). ## Link -Version >= @react-native-ohos/react-native-sensitive-info@6.0.1 now supports Autolink without requiring manual configuration, currently only supports 72 frameworks. -Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | Is supported autolink | Supported RN Version | +|--------------------------------------|-----------------------|----------------------| +| ~6.1.0 | No | 0.77 | +| ~6.0.1 | Yes | 0.72 | +| <= 6.0.0-alpha.9-0.0.3@deprecated | No | 0.72 | + +Using AutoLink need to be configured according to this document, 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. +If the version you use supports Autolink and the project has been connected to Autolink, skip the ManualLink configuration. +
+ ManualLink: this step is a guide to manually configure native dependencies. -Open the `harmony` directory of the HarmonyOS project in DevEco Studio. +First, use DevEco Studio to open the HarmonyOS project `harmony` in the project directory. ### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project @@ -262,8 +267,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5. Running +## Running Click the `sync` button in the upper right corner. diff --git a/en/react-native-sensors.md b/en/react-native-sensors.md index 70fcbb2b0..fed3467b6 100644 --- a/en/react-native-sensors.md +++ b/en/react-native-sensors.md @@ -138,14 +138,21 @@ export const App = () => { export default App; ``` -## 2. Manual Link +## 2. Link -Version >= @react-native-ohos/react-native-sensors@7.2.3 now supports Autolink without requiring manual configuration, currently only supports 72 frameworks. -Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | Is supported autolink | Supported RN Version | +|--------------------------------------|-----------------------|----------------------| +| ~7.3.7 | No | 0.77 | +| ~7.2.3 | Yes | 0.72 | +| <= 7.2.1@deprecated | No | 0.72 | -This step provides guidance for manually configuring native dependencies. +Using AutoLink need to be configured according to this document, 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. +If the version you use supports Autolink and the project has been connected to Autolink, skip the ManualLink configuration. +
+ ManualLink: this step is a guide to manually configure native dependencies. + +First, use DevEco Studio to open the HarmonyOS project `harmony` in the project directory. ### 2.1 Overrides RN SDK @@ -246,8 +253,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 2.5 Running +## 3. Running Click the `sync` button in the upper right corner. @@ -260,9 +268,9 @@ ohpm install Then build and run the code. -## 3. Constraints +## 4. Constraints -### 3.1 Compatibility +### 4.1 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. @@ -272,7 +280,7 @@ Verified in the following versions. 2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; 3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; -### 3.2 Permission Requirements (If Any) +### 4.2 Permission Requirements (If Any) Configure the required permissions in module. json 5 @@ -280,7 +288,7 @@ accelerometer Required permissions: ohos.permission.ACCELEROMETER gyroscope Required permissions: ohos.permission.GYROSCOPE -## 4. API +## 5. API > [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. @@ -297,9 +305,9 @@ gyroscope Required permissions: ohos.permission.GYROSCOPE | setUpdateIntervalForType | setUpdateIntervalForType | function | no | ios/Android | yes | | setLogLevelForType | setLogLevelForType | function | no | ios/Android | yes | -## 5. Known Issues +## 6. Known Issues -## 6. License +## 7. License This project is licensed under [The MIT License (MIT)](https://github.com/react-native-sensors/react-native-sensors/blob/master/LICENSE), Please enjoy and participate freely in open source. \ No newline at end of file diff --git a/en/react-native-share.md b/en/react-native-share.md index 588435208..bdb1811cc 100644 --- a/en/react-native-share.md +++ b/en/react-native-share.md @@ -12,20 +12,21 @@

-This project is based on [react-native-share](https://github.com/react-native-share/react-native-share). +> [!TIP] [Github address](https://github.com/react-native-share/react-native-share) -This third-party library has been migrated to Gitee and is now available for direct download from npm, the new package name is:`@react-native-ohos/react-native-share`, The version correspondence details are as follows: +## Installation and Usage -| Version | Package Name | Repository | Release | Support RN version | -|----------------------------|---------------------------------------| ------------------ | -------------------------- |--------------------| -| <=10.2.1-0.0.6@deprecated | @react-native-oh-tpl/react-native-share Releases(deprecated) | [Github](https://github.com/react-native-oh-library/react-native-share) | [Github Releases](https://github.com/react-native-oh-library/react-native-share/releases) | 0.72 | -| 10.2.2 | @react-native-ohos/react-native-share | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-share) | [Github Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-share/releases) | 0.72 | -| 12.1.1 | @react-native-ohos/react-native-share | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-share) | [GitCode Releases]() | 0.77 | +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-0.0.6@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 | -## Installation and Usage +For older versions not published on npm, please refer to the [Installation Guide](/en/tgz-usage-en.md) to install the tgz package. -Go to the project directory and execute the following instruction: +Go to the project directory and enter the following command: @@ -86,18 +87,23 @@ 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). +This library has been adapted for `Codegen`. Before using it, you need to proactively generate the bridge code for the third-party library. For details, please refer to the [Codegen Usage Documentation](/en/codegen.md). ## Link -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 +| | Is supported autolink | Supported RN Version | +|--------------------------------------|-----------------------|----------------------| +| ~12.1.1 | No | 0.77 | +| ~10.2.2 | Yes | 0.72 | +| <= 10.2.1-0.0.6@deprecated | No | 0.72 | + +Using AutoLink need to be configured according to this document, 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. +If the version you use supports Autolink and the project has been connected to Autolink, skip the ManualLink configuration. +
+ ManualLink: this step is a guide to manually configure native dependencies. -Open the `harmony` directory of the HarmonyOS project in DevEco Studio. +First, use DevEco Studio to open the HarmonyOS project `harmony` in the project directory. ### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project @@ -205,8 +211,9 @@ std::vector> PackageProvider::getPackages(Package::Cont + std::make_shared(ctx) } ``` +
-### 5. Running +## Running Click the `sync` button in the upper right corner. diff --git a/en/react-native-signature-capture.md b/en/react-native-signature-capture.md index 04a406276..51eefa9cb 100644 --- a/en/react-native-signature-capture.md +++ b/en/react-native-signature-capture.md @@ -143,18 +143,23 @@ AppRegistry.registerComponent('RNSignatureExample', () => RNSignatureExample); ## Use Codegen -Version >= @react-native-ohos/react-native-signature-capture@0.4.13, 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). +This library has been adapted for `Codegen`. Before using it, you need to proactively generate the bridge code for the third-party library. For details, please refer to the [Codegen Usage Documentation](/en/codegen.md). ## Link -Version >= @react-native-ohos/react-native-signature-capture@0.4.13 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 +| | Is supported autolink | Supported RN Version | +|--------------------------------------|-----------------------|----------------------| +| ~0.5.0 | No | 0.77 | +| ~0.4.13 | Yes | 0.72 | +| <= 0.4.12@deprecated | No | 0.72 | + +Using AutoLink need to be configured according to this document, 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. +If the version you use supports Autolink and the project has been connected to Autolink, skip the ManualLink configuration. +
+ ManualLink: this step is a guide to manually configure native dependencies. -Open the `harmony` directory of the HarmonyOS project in DevEco Studio. +First, use DevEco Studio to open the HarmonyOS project `harmony` in the project directory. ### 1.Open `entry/oh-package.json5` file and add the following dependencies: @@ -311,8 +316,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 6. Running +## Running Click the `sync` button in the upper right corner. diff --git a/en/react-native-skia.md b/en/react-native-skia.md index 8bcf72307..ec1bde6ad 100644 --- a/en/react-native-skia.md +++ b/en/react-native-skia.md @@ -76,11 +76,19 @@ export default App; ## Link -Version >= @react-native-ohos/react-native-skia@1.3.9, now supports Autolink without requiring manual configuration, currently only supports 72 frameworks. Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | Is supported autolink | Supported RN Version | +|--------------------------------------|-----------------------|----------------------| +| ~1.4.0 | No | 0.77 | +| ~1.3.9 | Yes | 0.72 | +| <= 1.3.8@deprecated | No | 0.72 | -This step provides guidance for manually configuring native dependencies. +Using AutoLink need to be configured according to this document, 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. +If the version you use supports Autolink and the project has been connected to Autolink, skip the ManualLink configuration. +
+ ManualLink: this step is a guide to manually configure native dependencies. + +First, use DevEco Studio to open the HarmonyOS project `harmony` in the project directory. ### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project @@ -239,8 +247,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 6. Running +## Running Click the `sync` button in the upper right corner. diff --git a/en/react-native-snackbar.md b/en/react-native-snackbar.md index 64ff77bde..05ad0a667 100644 --- a/en/react-native-snackbar.md +++ b/en/react-native-snackbar.md @@ -93,17 +93,23 @@ 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). +This library has been adapted for `Codegen`. Before using it, you need to proactively generate the bridge code for the third-party library. For details, please refer to the [Codegen Usage Documentation](/en/codegen.md). ## Link -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 +| | Is supported autolink | Supported RN Version | +|--------------------------------------|-----------------------|----------------------| +| ~2.9.1 | No | 0.77 | +| ~2.7.2 | Yes | 0.72 | +| <= 2.7.1-0.0.2@deprecated | No | 0.72 | + +Using AutoLink need to be configured according to this document, 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. +If the version you use supports Autolink and the project has been connected to Autolink, skip the ManualLink configuration. +
+ ManualLink: this step is a guide to manually configure native dependencies. -Open the `harmony` directory of the HarmonyOS project in DevEco Studio. +First, use DevEco Studio to open the HarmonyOS project `harmony` in the project directory. ### 1.Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project @@ -164,7 +170,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ### 4. Configure CMakeLists and Import SnackbarPackage -If you are using version <= 2.7.1-0.0.2, please skip this chapter. +> If you are using version <= 2.7.1-0.0.2, please skip this chapter. Open `entry/src/main/cpp/CMakeLists.txt` and add: @@ -212,8 +218,9 @@ std::vector> PackageProvider::getPackages(Package::Cont }; } ``` +
-### 5. Running +## Running Click the `sync` button in the upper right corner. diff --git a/en/react-native-splash-screen.md b/en/react-native-splash-screen.md index 5bb8bb6f6..9dbdb1eff 100644 --- a/en/react-native-splash-screen.md +++ b/en/react-native-splash-screen.md @@ -4,7 +4,7 @@

react-native-splash-screen

- [!TIP] [ GitHub address](https://github.com/react-native-oh-library/react-native-splash-screen) +> [!TIP] [ GitHub address](https://github.com/react-native-oh-library/react-native-splash-screen) ## 1. Installation and Usage @@ -95,17 +95,23 @@ export default class WelcomePage extends Component { ## 2. Use Codegen -Version >= @react-native-ohos/react-native-splash-screen@3.3.2, compatible with codegen-lib for generating bridge code. +This library has been adapted for `Codegen`. Before using it, you need to proactively generate the bridge code for the third-party library. For details, please refer to the [Codegen Usage Documentation](/en/codegen.md). -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). +## 3. Link -## 3. Manual Link +| | Is supported autolink | Supported RN Version | +|--------------------------------------|-----------------------|----------------------| +| ~3.4.0 | No | 0.77 | +| ~3.3.2 | Yes | 0.72 | +| <= 3.3.0-0.0.2@deprecated | No | 0.72 | -Version >= @react-native-ohos/react-native-splash-screen@3.3.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 +Using AutoLink need to be configured according to this document, 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. +If the version you use supports Autolink and the project has been connected to Autolink, skip the ManualLink configuration. +
+ ManualLink: this step is a guide to manually configure native dependencies. -Open the `harmony` directory of the HarmonyOS project in DevEco Studio. +First, use DevEco Studio to open the HarmonyOS project `harmony` in the project directory. ### 3.1. Overrides RN SDK @@ -220,8 +226,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 3.5. Running +## 4. Running Click the `sync` button in the upper right corner. @@ -263,9 +270,9 @@ export default App; ``` -## 4. Constraints +## 5. Constraints -### 4.1. Compatibility +### 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. @@ -275,7 +282,7 @@ Verified in the following versions. 2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; 3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; -## 5. API +## 6. API > [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. @@ -299,13 +306,13 @@ Verified in the following versions. | backgroundColor | 启动页背景色 | string | | pageUrl | 首页路由 | bool | -## 6. Known Issues +## 7. Known Issues -## 7. Others +## 8. Others - In iOS, the working principle of the show() method is as follows: In the entry application method, the home page of the App is first loaded, and then a while loop is used to keep the interface on the App's splash screen. During this time, the home page still loads asynchronously. Once the loading is complete, stopping the while loop will hide the splash screen and display the home page. In HarmonyOS, the home page is loaded by calling windowStage.loadContent in the entry onWindowStageCreate method. If a while loop is used at this point, the home page cannot be loaded asynchronously. -## 8. License +## 9. License This project is licensed under [The MIT License (MIT)](https://github.com/crazycodeboy/react-native-splash-screen/blob/v3.3.0/LICENSE). \ No newline at end of file diff --git a/en/react-native-spring-scrollview.md b/en/react-native-spring-scrollview.md index bd1e91bd4..a76b1fe3f 100644 --- a/en/react-native-spring-scrollview.md +++ b/en/react-native-spring-scrollview.md @@ -182,11 +182,19 @@ const styles = StyleSheet.create({ ## Link -Version >= @react-native-ohos/react-native-spring-scrollview@3.0.3, now supports Autolink without requiring manual configuration, currently only supports 72 frameworks. Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | Is supported autolink | Supported RN Version | +|--------------------------------------|-----------------------|----------------------| +| ~3.1.0 | No | 0.77 | +| ~3.0.3 | Yes | 0.72 | +| <= 3.0.2-0.0.4@deprecated | No | 0.72 | -This step provides guidance for manually configuring native dependencies. +Using AutoLink need to be configured according to this document, 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. +If the version you use supports Autolink and the project has been connected to Autolink, skip the ManualLink configuration. +
+ ManualLink: this step is a guide to manually configure native dependencies. + +First, use DevEco Studio to open the HarmonyOS project `harmony` in the project directory. The implementation of this library depends on the native code of @react-native-ohos/lottie-react-native, @react-native-ohos/async-storage. If you have already included this library in your HarmonyOS project, you do not need to include it again. You can skip this section and use the library directly. @@ -310,8 +318,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5. Running +## Running Click the `sync` button in the upper right corner. diff --git a/en/react-native-ssl-pinning.md b/en/react-native-ssl-pinning.md index 4cf363225..6a7f119df 100644 --- a/en/react-native-ssl-pinning.md +++ b/en/react-native-ssl-pinning.md @@ -242,18 +242,23 @@ export default SslPingDemo; ## Use Codegen -Version >= @react-native-ohos/react-native-ssl-pinning@1.5.8, 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). +This library has been adapted for `Codegen`. Before using it, you need to proactively generate the bridge code for the third-party library. For details, please refer to the [Codegen Usage Documentation](/en/codegen.md). ## Link -Version >= @react-native-ohos/react-native-ssl-pinning@1.5.8 now supports Autolink without requiring manual configuration, currently only supports 72 frameworks. -Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | Is supported autolink | Supported RN Version | +|--------------------------------------|-----------------------|----------------------| +| ~1.6.0 | No | 0.77 | +| ~1.5.8 | Yes | 0.72 | +| <= 1.5.7-0.0.2@deprecated | No | 0.72 | + +Using AutoLink need to be configured according to this document, 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. +If the version you use supports Autolink and the project has been connected to Autolink, skip the ManualLink configuration. +
+ ManualLink: this step is a guide to manually configure native dependencies. -Open the harmony directory of the HarmonyOS project in DevEco Studio. +First, use DevEco Studio to open the HarmonyOS project `harmony` in the project directory. ### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project @@ -372,8 +377,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5.Running +## Running Click the sync button in the upper right corner. diff --git a/en/react-native-svg-capi.md b/en/react-native-svg-capi.md index 6a17fd65e..e631088fa 100644 --- a/en/react-native-svg-capi.md +++ b/en/react-native-svg-capi.md @@ -86,11 +86,19 @@ const styles = StyleSheet.create({ ## Link -Version >= @react-native-ohos/react-native-svg@15.0.2 now supports Autolink without requiring manual configuration(The content that still needs to be manually configured has been marked in the corresponding title), currently only supports 72 frameworks. Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | Is supported autolink | Supported RN Version | +|--------------------------------------|-----------------------|----------------------| +| ~15.12.1 | No | 0.77 | +| ~15.0.2 | Yes | 0.72 | +| <= 15.0.1@deprecated | No | 0.72 | -This step provides guidance for manually configuring native dependencies. +Using AutoLink need to be configured according to this document, 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. +If the version you use supports Autolink and the project has been connected to Autolink, skip the ManualLink configuration. +
+ ManualLink: this step is a guide to manually configure native dependencies. + +First, use DevEco Studio to open the HarmonyOS project `harmony` in the project directory. ### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project @@ -209,8 +217,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5. Running +## Running Click the `sync` button in the upper right corner. diff --git a/en/react-native-syan-image-picker.md b/en/react-native-syan-image-picker.md index ebaa91980..a1aa52d0a 100644 --- a/en/react-native-syan-image-picker.md +++ b/en/react-native-syan-image-picker.md @@ -319,17 +319,23 @@ 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). +This library has been adapted for `Codegen`. Before using it, you need to proactively generate the bridge code for the third-party library. For details, please refer to the [Codegen Usage Documentation](/en/codegen.md). ## Link -Version >= @react-native-ohos/react-native-syan-image-picker@0.5.4 now supports Autolink without requiring manual configuration(The content that still needs to be manually configured has been marked in the corresponding title), currently only supports 72 frameworks. Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | Is supported autolink | Supported RN Version | +|--------------------------------------|-----------------------|----------------------| +| ~0.6.0 | No | 0.77 | +| ~0.5.4 | Yes | 0.72 | +| <= 0.5.3-0.0.4@deprecated | No | 0.72 | + +Using AutoLink need to be configured according to this document, 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. +If the version you use supports Autolink and the project has been connected to Autolink, skip the ManualLink configuration. +
+ ManualLink: this step is a guide to manually configure native dependencies. -Open the `harmony` directory of the HarmonyOS project in DevEco Studio. +First, use DevEco Studio to open the HarmonyOS project `harmony` in the project directory. ### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project @@ -342,7 +348,108 @@ Open the `harmony` directory of the HarmonyOS project in DevEco Studio. } ``` -### 2.Configure Entry(This module always requires manual configuration) +### 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-syan-image-picker": "file:../../node_modules/@react-native-ohos/react-native-syan-image-picker/harmony/syan_image_picker.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. Introducing SyanImagePickerPackage to ArkTS + +Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: + +```diff + ... ++ import {SyanImagePickerPackage} from '@react-native-ohos/react-native-syan-image-picker/ts'; + +export function createRNPackages(ctx: RNPackageContext): RNPackage[] { + return [ + new SamplePackage(ctx), ++ new SyanImagePickerPackage(ctx) + ]; +} +``` + +### 4. Configuring CMakeLists and Introducing SyanImagePickerPackage + +> If you are using version <= 0.5.3-0.0.4, please skip this chapter. + +Open `entry/src/main/cpp/CMakeLists.txt`,and add the following code: + +```diff +... + +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") ++ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) + +# RNOH_END: manual_package_linking_1 +add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-syan-image-picker/src/main/cpp" ./syan_image_picker) +# 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_syan_image_picker) +# RNOH_BEGIN: manual_package_linking_2 +``` + +Open `entry/src/main/cpp/PackageProvider.cpp`,and add the following code: + +```diff +#include "RNOH/PackageProvider.h" ++ #include "SyanImagePickerPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { ++ std::make_shared(ctx) +} +``` +
+ +## 必要的配置项 + +> [!TIP] 该模块的内容无法通过autolink自动生成,始终需要手动配置。 + +### Configure Entry(This module always requires manual configuration) **(1)Create ImageCropAbility.ets under entry/src/main/ets/entryability** @@ -443,103 +550,7 @@ struct ImageEdit { } ``` -### 3. 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-syan-image-picker": "file:../../node_modules/@react-native-ohos/react-native-syan-image-picker/harmony/syan_image_picker.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). - -### 4. Introducing SyanImagePickerPackage to ArkTS - -Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: - -```diff - ... -+ import {SyanImagePickerPackage} from '@react-native-ohos/react-native-syan-image-picker/ts'; - -export function createRNPackages(ctx: RNPackageContext): RNPackage[] { - return [ - new SamplePackage(ctx), -+ new SyanImagePickerPackage(ctx) - ]; -} -``` - -### 5.Configuring CMakeLists and Introducing SyanImagePickerPackage - -> If you are using version <= 0.5.3-0.0.4, please skip this chapter. - -Open `entry/src/main/cpp/CMakeLists.txt`,and add the following code: - -```diff -... - -project(rnapp) -cmake_minimum_required(VERSION 3.4.1) -set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") -+ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules") -set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") - -add_subdirectory("${RNOH_CPP_DIR}" ./rn) - -# RNOH_END: manual_package_linking_1 -add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) -+ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-syan-image-picker/src/main/cpp" ./syan_image_picker) -# 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_syan_image_picker) -# RNOH_BEGIN: manual_package_linking_2 -``` - -Open `entry/src/main/cpp/PackageProvider.cpp`,and add the following code: - -```diff -#include "RNOH/PackageProvider.h" -+ #include "SyanImagePickerPackage.h" - -using namespace rnoh; - -std::vector> PackageProvider::getPackages(Package::Context ctx) { - return { -+ std::make_shared(ctx) -} -``` - -### 6. Running +## Running Click the `sync` button in the upper right corner. diff --git a/en/react-native-system-setting.md b/en/react-native-system-setting.md index 9055c3bde..9b8ea53a7 100644 --- a/en/react-native-system-setting.md +++ b/en/react-native-system-setting.md @@ -169,18 +169,23 @@ export default SystemSettingDemo; ## Use Codegen -Version >= @react-native-ohos/react-native-system-setting@1.7.7, compatible with codegen-lib for generating bridge code. - -If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/en/codegen.md). - +This library has been adapted for `Codegen`. Before using it, you need to proactively generate the bridge code for the third-party library. For details, please refer to the [Codegen Usage Documentation](/en/codegen.md). ## Link -Version >= @react-native-ohos/react-native-system-setting@1.7.7 now supports Autolink without requiring manual configuration, currently only supports 72 frameworks. Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | Is supported autolink | Supported RN Version | +|--------------------------------------|-----------------------|----------------------| +| ~1.8.0 | No | 0.77 | +| ~1.7.7 | Yes | 0.72 | +| <= 1.7.6-0.0.1@deprecated | No | 0.72 | + +Using AutoLink need to be configured according to this document, 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. +If the version you use supports Autolink and the project has been connected to Autolink, skip the ManualLink configuration. +
+ ManualLink: this step is a guide to manually configure native dependencies. -Open the `harmony` directory of the HarmonyOS project in DevEco Studio. +First, use DevEco Studio to open the HarmonyOS project `harmony` in the project directory. ### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project @@ -224,23 +229,7 @@ Method 2: Directly link to the source code. > [!TIP] For details, see [Directly Linking Source Code](/en/link-source-code.md). -### 3. Introducing RNSystemSettingPackage to ArkTS - -Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: - -```diff - ... -+ import { RNSystemSettingPackage } from '@react-native-ohos/react-native-system-setting/ts'; - -export function createRNPackages(ctx: RNPackageContext): RNPackage[] { - return [ - new SamplePackage(ctx), -+ new RNSystemSettingPackage(ctx) - ]; -} -``` - -### 4. Configuring CMakeLists and Introducing RNSystemSettingPackage +### 3. Configuring CMakeLists and Introducing RNSystemSettingPackage > If you are using version <= 1.7.6-0.0.1, please skip this chapter. ```diff @@ -296,7 +285,25 @@ std::vector> PackageProvider::getPackages(Package::Cont } ``` -### 5. Running +### 4. Introducing RNSystemSettingPackage to ArkTS + +Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: + +```diff + ... ++ import { RNSystemSettingPackage } from '@react-native-ohos/react-native-system-setting/ts'; + +export function createRNPackages(ctx: RNPackageContext): RNPackage[] { + return [ + new SamplePackage(ctx), ++ new RNSystemSettingPackage(ctx) + ]; +} +``` +
+ + +## Running Click the `sync` button in the upper right corner. diff --git a/en/react-native-tcp-socket.md b/en/react-native-tcp-socket.md index 71d478165..f59cedd6f 100644 --- a/en/react-native-tcp-socket.md +++ b/en/react-native-tcp-socket.md @@ -33,7 +33,6 @@ Navigate to your project directory and run the following command: #### **npm** ```bash -# V0.77 npm install @react-native-ohos/react-native-tcp-socket ``` @@ -576,17 +575,23 @@ const styles = StyleSheet.create({ ## Using Codegen -> Version >= @react-native-ohos/react-native-tcp-socket@6.2.1, compatible with codegen-lib for generating bridge code. - This library has been adapted for `Codegen`. Before use, you need to actively execute the command to generate the third-party library bridging code. Please refer to the [Codegen Usage Documentation](/zh-cn/codegen.md) for details. ## Link -Version >= @react-native-ohos/react-native-tcp-socket@6.2.1 now supports Autolink without requiring manual configuration, currently only supports 72 frameworks. -Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -This step provides guidance for manually configuring native dependencies. +| | 是否支持autolink | RN框架版本 | +|--------------------------------------|-----------------|------------| +| ~6.3.1 | No | 0.77 | +| ~6.2.1 | Yes | 0.72 | +| <= 6.2.0-0.0.3@deprecated | No | 0.72 | + +使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +如您使用的版本支持 Autolink,并且工程已接入 Autolink,可跳过ManualLink配置。 +
+ ManualLink: 此步骤为手动配置原生依赖项的指导 -First, you need to open the HarmonyOS project `harmony` within your project using DevEco Studio. +首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 ### 1. Add the overrides field to the root `oh-package.json5` @@ -707,8 +712,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5. Run +## Running Click the `sync` button in the top right corner. diff --git a/en/react-native-text-gradient.md b/en/react-native-text-gradient.md index f5b5788b1..c745d4f47 100644 --- a/en/react-native-text-gradient.md +++ b/en/react-native-text-gradient.md @@ -96,11 +96,19 @@ const styles = StyleSheet.create({ ## Link -Version >= @react-native-ohos/react-native-text-gradient@0.1.8 now supports Autolink without requiring manual configuration, currently only supports 72 frameworks. Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | Is supported autolink | Supported RN Version | +|--------------------------------------|-----------------------|----------------------| +| ~0.2.0 | No | 0.77 | +| ~0.1.8 | Yes | 0.72 | +| <= 0.1.7-0.0.4@deprecated | No | 0.72 | -This step provides guidance for manually configuring native dependencies. +Using AutoLink need to be configured according to this document, 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. +If the version you use supports Autolink and the project has been connected to Autolink, skip the ManualLink configuration. +
+ ManualLink: this step is a guide to manually configure native dependencies. + +First, use DevEco Studio to open the HarmonyOS project `harmony` in the project directory. ### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project @@ -220,8 +228,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5. Running +## Running Click the `sync` button in the upper right corner. diff --git a/en/react-native-text-input-mask.md b/en/react-native-text-input-mask.md index 0ef7739c5..f5c87b5cd 100644 --- a/en/react-native-text-input-mask.md +++ b/en/react-native-text-input-mask.md @@ -153,11 +153,19 @@ const styles = StyleSheet.create({ ## Link -Version >= @react-native-ohos/react-native-text-input-mask@3.1.6, now supports Autolink without requiring manual configuration, currently only supports 72 frameworks. Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | Is supported autolink | Supported RN Version | +|--------------------------------------|-----------------------|----------------------| +| ~3.2.0 | No | 0.77 | +| ~3.1.6 | Yes | 0.72 | +| <= 3.1.5-0.0.7@deprecated | No | 0.72 | -This step provides guidance for manually configuring native dependencies. +Using AutoLink need to be configured according to this document, 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. +If the version you use supports Autolink and the project has been connected to Autolink, skip the ManualLink configuration. +
+ ManualLink: this step is a guide to manually configure native dependencies. + +First, use DevEco Studio to open the HarmonyOS project `harmony` in the project directory. ### 1.Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project @@ -266,8 +274,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5.Running +## Running Click the `sync` button in the upper right corner. diff --git a/zh-cn/react-native-SmartRefreshLayout.md b/zh-cn/react-native-SmartRefreshLayout.md index 44f5ea000..e7bd36cdd 100644 --- a/zh-cn/react-native-SmartRefreshLayout.md +++ b/zh-cn/react-native-SmartRefreshLayout.md @@ -184,11 +184,19 @@ export default App; ## 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 +| | 是否支持autolink | RN框架版本 | +|--------------------------------------|-----------------|------------| +| ~0.7.0 | No | 0.77 | +| ~0.6.8 | Yes | 0.72 | +| <= 0.6.7-0.2.18@deprecated | No | 0.72 | -此步骤为手动配置原生依赖项的指导。 +使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` +如您使用的版本支持 Autolink,并且工程已接入 Autolink,可跳过ManualLink配置。 +
+ ManualLink: 此步骤为手动配置原生依赖项的指导 + +首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 ### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 @@ -291,7 +299,7 @@ std::vector> PackageProvider::getPackages(Package::Cont } ``` -### 4.在 ArkTs 侧引入 SmartRefreshPackage(版本>=0.6.7-0.2.9) +### 4.在 ArkTs 侧引入 SmartRefreshPackage 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: @@ -306,8 +314,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5.运行 +## 运行 点击右上角的 `sync` 按钮 diff --git a/zh-cn/react-native-send-intent.md b/zh-cn/react-native-send-intent.md index aede22ee5..345143bdc 100644 --- a/zh-cn/react-native-send-intent.md +++ b/zh-cn/react-native-send-intent.md @@ -146,15 +146,21 @@ export default SendIntent; ## 使用 Codegen -Version >= @react-native-ohos/react-native-send-intent@1.3.1,已适配codegen-lib生成桥接代码。 - 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## 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 +| | 是否支持autolink | RN框架版本 | +|--------------------------------------|-----------------|------------| +| ~1.4.0 | No | 0.77 | +| ~1.3.1 | Yes | 0.72 | +| <= 1.3.0-0.0.5@deprecated | No | 0.72 | + +使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -此步骤为手动配置原生依赖项的指导。 +如您使用的版本支持 Autolink,并且工程已接入 Autolink,可跳过ManualLink配置。 +
+ ManualLink: 此步骤为手动配置原生依赖项的指导 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -278,8 +284,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5.运行 +## 运行 点击右上角的 `sync` 按钮 diff --git a/zh-cn/react-native-sensitive-info.md b/zh-cn/react-native-sensitive-info.md index 3ef270521..923983816 100644 --- a/zh-cn/react-native-sensitive-info.md +++ b/zh-cn/react-native-sensitive-info.md @@ -132,17 +132,23 @@ export default SensitiveInfoDemo; ## 使用 Codegen -Version >= @react-native-ohos/react-native-sensitive-info@6.0.1,已适配codegen-lib生成桥接代码。 - 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -Version >= @react-native-ohos/react-native-sensitive-info@6.0.1,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | 是否支持autolink | RN框架版本 | +|--------------------------------------|-----------------|------------| +| ~6.1.0 | No | 0.77 | +| ~6.0.1 | Yes | 0.72 | +| <= 6.0.0-alpha.9-0.0.3@deprecated | No | 0.72 | + +使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -此步骤为手动配置原生依赖项的指导。 +如您使用的版本支持 Autolink,并且工程已接入 Autolink,可跳过ManualLink配置。 +
+ ManualLink: 此步骤为手动配置原生依赖项的指导 -首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` +首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 ### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 @@ -268,8 +274,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5.运行 +## 运行 点击右上角的 `sync` 按钮 diff --git a/zh-cn/react-native-sensors.md b/zh-cn/react-native-sensors.md index fa989cf7f..af0ea9854 100644 --- a/zh-cn/react-native-sensors.md +++ b/zh-cn/react-native-sensors.md @@ -138,11 +138,19 @@ export const App = () => { export default App; ``` -## 2. Manual Link +## 2. Link -Version >= @react-native-ohos/react-native-sensors@7.2.3,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | 是否支持autolink | RN框架版本 | +|--------------------------------------|-----------------|------------| +| ~7.3.7 | No | 0.77 | +| ~7.2.3 | Yes | 0.72 | +| <= 7.2.1@deprecated | No | 0.72 | -此步骤为手动配置原生依赖项的指导。 +使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md。 + +如您使用的版本支持 Autolink,并且工程已接入 Autolink,可跳过ManualLink配置。 +
+ ManualLink: 此步骤为手动配置原生依赖项的指导 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 @@ -245,8 +253,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 2.5 运行 +## 3. 运行 点击右上角的 `sync` 按钮 @@ -259,9 +268,9 @@ ohpm install 然后编译、运行即可。 -## 3. 约束与限制 +## 4. 约束与限制 -### 3.1 兼容性 +### 4.1 兼容性 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 @@ -271,7 +280,7 @@ ohpm install 2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; 3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; -### 3.2 权限要求 +### 4.2 权限要求 在 module.json5 中配置所需要的权限 @@ -279,7 +288,7 @@ accelerometer 需要的权限:ohos.permission.ACCELEROMETER gyroscope 需要的权限:ohos.permission.GYROSCOPE -## 4. API +## 5. API > [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 @@ -296,8 +305,8 @@ gyroscope 需要的权限:ohos.permission.GYROSCOPE | setUpdateIntervalForType | setUpdateIntervalForType | function | no | ios/Android | yes | | setLogLevelForType | setLogLevelForType | function | no | ios/Android | yes | -## 5. 遗留问题 +## 6. 遗留问题 -## 6. 开源协议 +## 7. 开源协议 本项目基于 [The MIT License (MIT)](https://github.com/react-native-sensors/react-native-sensors/blob/master/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file diff --git a/zh-cn/react-native-share.md b/zh-cn/react-native-share.md index 797dfadfe..14188dc4d 100644 --- a/zh-cn/react-native-share.md +++ b/zh-cn/react-native-share.md @@ -12,20 +12,19 @@

-本项目基于 [react-native-share](https://github.com/react-native-share/react-native-share) 开发。 + [!TIP] [Github 地址](https://github.com/react-native-share/react-native-share) +## 安装与使用 -该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/react-native-share`,具体版本所属关系如下: - -| Version | Package Name | Repository | Release | Support RN version | -|----------------------------|---------------------------------------| ------------------ | -------------------------- |--------------------| -| <=10.2.1-0.0.6@deprecated | @react-native-oh-tpl/react-native-share Releases(deprecated) | [Github](https://github.com/react-native-oh-library/react-native-share) | [Github Releases](https://github.com/react-native-oh-library/react-native-share/releases) | 0.72 | -| 10.2.2 | @react-native-ohos/react-native-share | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-share) | [Github Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-share/releases) | 0.72 | -| 12.1.1 | @react-native-ohos/react-native-share | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-share) | [GitCode Releases]() | 0.77 | - +请到三方库的 Releases 发布地址查看配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +|--------| ------------------------------------------------------------ | ---------- | +| <=10.2.1-0.0.6@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包。 进入到工程目录并输入以下命令: @@ -87,17 +86,23 @@ yarn add @react-native-ohos/react-native-share ## 使用 Codegen -Version >= @react-native-ohos/react-native-share@10.2.2,已适配codegen-lib生成桥接代码。 - 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## 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 +| | 是否支持autolink | RN框架版本 | +|--------------------------------------|-----------------|------------| +| ~12.1.1 | No | 0.77 | +| ~10.2.2 | Yes | 0.72 | +| <= 10.2.1-0.0.6@deprecated | No | 0.72 | + +使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -此步骤为手动配置原生依赖项的指导。 +如您使用的版本支持 Autolink,并且工程已接入 Autolink,可跳过ManualLink配置。 +
+ ManualLink: 此步骤为手动配置原生依赖项的指导 -首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` +首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 ### 1.在工程根目录的 `oh-package.json` 添加 overrides 字段 @@ -219,8 +224,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5.运行 +## 运行 点击右上角的 `sync` 按钮 diff --git a/zh-cn/react-native-signature-capture.md b/zh-cn/react-native-signature-capture.md index e9c4065e7..434b9624b 100644 --- a/zh-cn/react-native-signature-capture.md +++ b/zh-cn/react-native-signature-capture.md @@ -141,17 +141,23 @@ AppRegistry.registerComponent('RNSignatureExample', () => RNSignatureExample); ## 使用 Codegen -Version >= @react-native-ohos/react-native-signature-capture@0.4.13,已适配codegen-lib生成桥接代码。 - 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -Version >= @react-native-ohos/react-native-signature-capture@0.4.13,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | 是否支持autolink | RN框架版本 | +|--------------------------------------|-----------------|------------| +| ~0.5.0 | No | 0.77 | +| ~0.4.13 | Yes | 0.72 | +| <= 0.4.12@deprecated | No | 0.72 | + +使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -此步骤为手动配置原生依赖项的指导。 +如您使用的版本支持 Autolink,并且工程已接入 Autolink,可跳过ManualLink配置。 +
+ ManualLink: 此步骤为手动配置原生依赖项的指导 -首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` +首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 ### 1.在工程根目录的 `oh-package.json5` 添加 overrides字段 @@ -308,8 +314,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 6.运行 +## 运行 点击右上角的 `sync` 按钮 diff --git a/zh-cn/react-native-skia.md b/zh-cn/react-native-skia.md index 979992600..39ab91677 100644 --- a/zh-cn/react-native-skia.md +++ b/zh-cn/react-native-skia.md @@ -77,11 +77,19 @@ export default App; ## Link -Version >= @react-native-ohos/react-native-skia@1.3.9,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | 是否支持autolink | RN框架版本 | +|--------------------------------------|-----------------|------------| +| ~1.4.0 | No | 0.77 | +| ~1.3.9 | Yes | 0.72 | +| <= 1.3.8@deprecated | No | 0.72 | -此步骤为手动配置原生依赖项的指导。 +使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` +如您使用的版本支持 Autolink,并且工程已接入 Autolink,可跳过ManualLink配置。 +
+ ManualLink: 此步骤为手动配置原生依赖项的指导 + +首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 ### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 @@ -243,8 +251,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 6.运行 +## 运行 点击右上角的 `sync` 按钮 diff --git a/zh-cn/react-native-snackbar.md b/zh-cn/react-native-snackbar.md index cf0cbdb42..f9f20fd63 100644 --- a/zh-cn/react-native-snackbar.md +++ b/zh-cn/react-native-snackbar.md @@ -101,17 +101,23 @@ const styles = StyleSheet.create({ ## 使用 Codegen -Version >= @react-native-ohos/react-native-snackbar@2.7.2,已适配codegen-lib生成桥接代码。 - 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## 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 +| | 是否支持autolink | RN框架版本 | +|--------------------------------------|-----------------|------------| +| ~2.9.1 | No | 0.77 | +| ~2.7.2 | Yes | 0.72 | +| <= 2.7.1-0.0.2@deprecated | No | 0.72 | + +使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -此步骤为手动配置原生依赖项的指导。 +如您使用的版本支持 Autolink,并且工程已接入 Autolink,可跳过ManualLink配置。 +
+ ManualLink: 此步骤为手动配置原生依赖项的指导 -首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` +首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 ### 1.在工程根目录的 `oh-package.json` 添加 overrides 字段 @@ -223,8 +229,9 @@ std::vector> PackageProvider::getPackages(Package::Cont }; } ``` +
-### 5.运行 +## 运行 点击右上角的 `sync` 按钮 diff --git a/zh-cn/react-native-splash-screen.md b/zh-cn/react-native-splash-screen.md index 51abd01e0..8b6c02403 100644 --- a/zh-cn/react-native-splash-screen.md +++ b/zh-cn/react-native-splash-screen.md @@ -95,15 +95,21 @@ export default class WelcomePage extends Component { ## 2. 使用 Codegen -Version >= @react-native-ohos/react-native-splash-screen@3.3.2,已适配codegen-lib生成桥接代码。 - 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 -## 3. Manual Link +## 3. Link + +| | 是否支持autolink | RN框架版本 | +|--------------------------------------|-----------------|------------| +| ~3.4.0 | No | 0.77 | +| ~3.3.2 | Yes | 0.72 | +| <= 3.3.0-0.0.2@deprecated | No | 0.72 | -Version >= @react-native-ohos/react-native-splash-screen@3.3.2,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -此步骤为手动配置原生依赖项的指导。 +如您使用的版本支持 Autolink,并且工程已接入 Autolink,可跳过ManualLink配置。 +
+ ManualLink: 此步骤为手动配置原生依赖项的指导 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 @@ -219,8 +225,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 3.5. 运行 +## 4. 运行 点击右上角的 `sync` 按钮 @@ -262,9 +269,9 @@ export default App; ``` -## 4. 约束与限制 +## 5. 约束与限制 -### 4.1. 兼容性 +### 兼容性 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 @@ -274,7 +281,7 @@ export default App; 2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; 3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; -## 5. API +## 6. API > [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 @@ -298,13 +305,13 @@ export default App; | backgroundColor | 启动页背景色 | string | | pageUrl | 首页路由 | bool | -## 6. 遗留问题 +## 7. 遗留问题 -## 7. 其他 +## 8. 其他 - 在 iOS 中,show() 方法的工作原理是: 在入口 application 方法中,首先加载 App 首页,然后使用 while 循环让界面停留在 App 启动屏,此时首页仍然会异步加载,加载完成后,停止 while 循环即可隐藏启动屏,显示首页。 HarmonyOS 中,在入口 onWindowStageCreate 中调用 windowStage.loadContent 加载首页,如果此时使用 while 循环,首页无法异步加载。 -## 8. 开源协议 +## 9. 开源协议 本项目基于 [The MIT License (MIT)](https://github.com/crazycodeboy/react-native-splash-screen/blob/v3.3.0/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file diff --git a/zh-cn/react-native-spring-scrollview.md b/zh-cn/react-native-spring-scrollview.md index b718e541b..b84c4f93d 100644 --- a/zh-cn/react-native-spring-scrollview.md +++ b/zh-cn/react-native-spring-scrollview.md @@ -180,11 +180,19 @@ const styles = StyleSheet.create({ ## Link -Version >= @react-native-ohos/react-native-spring-scrollview@3.0.3,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | 是否支持autolink | RN框架版本 | +|--------------------------------------|-----------------|------------| +| ~3.1.0 | No | 0.77 | +| ~3.0.3 | Yes | 0.72 | +| <= 3.0.2-0.0.4@deprecated | No | 0.72 | -此步骤为手动配置原生依赖项的指导。 +使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` +如您使用的版本支持 Autolink,并且工程已接入 Autolink,可跳过ManualLink配置。 +
+ ManualLink: 此步骤为手动配置原生依赖项的指导 + +首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 本库HarmonyOS侧实现依赖@react-native-ohos/lottie-react-native、@react-native-ohos/async-storage的原生端代码,如已在HarmonyOS工程中引入过该库,则无需再次引入,可跳过本章步骤,直接使用。 @@ -310,8 +318,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5.运行 +## 运行 点击右上角的 `sync` 按钮 diff --git a/zh-cn/react-native-ssl-pinning.md b/zh-cn/react-native-ssl-pinning.md index 10e9c682c..148dfe25b 100644 --- a/zh-cn/react-native-ssl-pinning.md +++ b/zh-cn/react-native-ssl-pinning.md @@ -242,18 +242,23 @@ export default SslPingDemo; ## 使用 Codegen -Version >= @react-native-ohos/react-native-ssl-pinning@1.5.8,已适配codegen-lib生成桥接代码。 - 本库已经适配了 Codegen ,在使用前需要主动执行生成三方库桥接代码,详细请参考 [Codegen 文档](/zh-cn/codegen.md)。 ## Link -Version >= @react-native-ohos/react-native-ssl-pinning@1.5.8,已支持 Autolink,无需手动配置,目前只支持72框架。 -Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | 是否支持autolink | RN框架版本 | +|--------------------------------------|-----------------|------------| +| ~1.6.0 | No | 0.77 | +| ~1.5.8 | Yes | 0.72 | +| <= 1.5.7-0.0.2@deprecated | No | 0.72 | + +使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -此步骤为手动配置原生依赖项的指导。 +如您使用的版本支持 Autolink,并且工程已接入 Autolink,可跳过ManualLink配置。 +
+ ManualLink: 此步骤为手动配置原生依赖项的指导 -首先需要使用 DevEco Studio 打开项目里的HarmonyOS工程 `harmony` +首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 ### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 @@ -383,8 +388,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5.运行 +## 运行 点击右上角的 `sync` 按钮 diff --git a/zh-cn/react-native-svg-capi.md b/zh-cn/react-native-svg-capi.md index b62d2a61e..24a39469b 100644 --- a/zh-cn/react-native-svg-capi.md +++ b/zh-cn/react-native-svg-capi.md @@ -85,11 +85,19 @@ const styles = StyleSheet.create({ ## Link -Version >= @react-native-ohos/react-native-svg@15.0.2,已支持 Autolink,无需手动配置(仍需手动配置的内容已在对应标题处标记),目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | 是否支持autolink | RN框架版本 | +|--------------------------------------|-----------------|------------| +| ~15.12.1 | No | 0.77 | +| ~15.0.2 | Yes | 0.72 | +| <= 15.0.1@deprecated | No | 0.72 | -此步骤为手动配置原生依赖项的指导。 +使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` +如您使用的版本支持 Autolink,并且工程已接入 Autolink,可跳过ManualLink配置。 +
+ ManualLink: 此步骤为手动配置原生依赖项的指导 + +首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 ### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 @@ -211,8 +219,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5.运行 +## 运行 点击右上角的 `sync` 按钮 diff --git a/zh-cn/react-native-syan-image-picker.md b/zh-cn/react-native-syan-image-picker.md index d4b6daad2..a0b641b5d 100644 --- a/zh-cn/react-native-syan-image-picker.md +++ b/zh-cn/react-native-syan-image-picker.md @@ -317,17 +317,23 @@ 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 -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 +| | 是否支持autolink | RN框架版本 | +|--------------------------------------|-----------------|------------| +| ~0.6.0 | No | 0.77 | +| ~0.5.4 | Yes | 0.72 | +| <= 0.5.3-0.0.4@deprecated | No | 0.72 | + +使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -此步骤为手动配置原生依赖项的指导。 +如您使用的版本支持 Autolink,并且工程已接入 Autolink,可跳过ManualLink配置。 +
+ ManualLink: 此步骤为手动配置原生依赖项的指导 -首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` +首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 ### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 @@ -340,7 +346,110 @@ Version >= @react-native-ohos/react-native-syan-image-picker@0.5.4,已支持 A } ``` -### 2.配置Entry(该模块始终需要手动配置) +### 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-syan-image-picker": "file:../../node_modules/@react-native-ohos/react-native-syan-image-picker/harmony/syan_image_picker.har" + } +``` + +点击右上角的 `sync` 按钮 + +或者在终端执行: + +```bash +cd entry +ohpm install +``` + +方法二:直接链接源码 + +> [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) + +### 3. 配置 CMakeLists 和引入 SyanImagePickerPackage + +> 若使用的是 <= 0.5.3-0.0.4 版本,请跳过本章。 + +打开 `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-syan-image-picker/src/main/cpp" ./syan_image_picker) +# 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_syan_image_picker) +# RNOH_BEGIN: manual_package_linking_2 +``` + +打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: + +```diff +#include "RNOH/PackageProvider.h" ++ #include "SyanImagePickerPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { ++ std::make_shared(ctx) +} +``` + +### 4. 在 ArkTs 侧引入SyanImagePickerPackage + +打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: + +```diff + ... ++ import {SyanImagePickerPackage} from '@react-native-ohos/react-native-syan-image-picker/ts'; + +export function createRNPackages(ctx: RNPackageContext): RNPackage[] { + return [ + new SamplePackage(ctx), ++ new SyanImagePickerPackage(ctx) + ]; +} +``` +
+ +## 必要的配置项 + +> [!TIP] 该模块的内容无法通过autolink自动生成,始终需要手动配置。 + +### 配置Entry(该模块始终需要手动配置) **(1)在 entry/src/main/ets/entryability 下创建 ImageCropAbility.ets** @@ -441,105 +550,7 @@ struct ImageEdit { } ``` -### 3.引入原生端代码 - -目前有两种方法: - -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-syan-image-picker": "file:../../node_modules/@react-native-ohos/react-native-syan-image-picker/harmony/syan_image_picker.har" - } -``` - -点击右上角的 `sync` 按钮 - -或者在终端执行: - -```bash -cd entry -ohpm install -``` - -方法二:直接链接源码 - -> [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) - -### 4.配置 CMakeLists 和引入 SyanImagePickerPackage - -> 若使用的是 <= 0.5.3-0.0.4 版本,请跳过本章。 - -打开 `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-syan-image-picker/src/main/cpp" ./syan_image_picker) -# 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_syan_image_picker) -# RNOH_BEGIN: manual_package_linking_2 -``` - -打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: - -```diff -#include "RNOH/PackageProvider.h" -+ #include "SyanImagePickerPackage.h" - -using namespace rnoh; - -std::vector> PackageProvider::getPackages(Package::Context ctx) { - return { -+ std::make_shared(ctx) -} -``` - -### 5.在 ArkTs 侧引入SyanImagePickerPackage - -打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: - -```diff - ... -+ import {SyanImagePickerPackage} from '@react-native-ohos/react-native-syan-image-picker/ts'; - -export function createRNPackages(ctx: RNPackageContext): RNPackage[] { - return [ - new SamplePackage(ctx), -+ new SyanImagePickerPackage(ctx) - ]; -} -``` - -### 6.运行 +## 运行 点击右上角的 `sync` 按钮 diff --git a/zh-cn/react-native-system-setting.md b/zh-cn/react-native-system-setting.md index 61882de97..e7818da50 100644 --- a/zh-cn/react-native-system-setting.md +++ b/zh-cn/react-native-system-setting.md @@ -169,17 +169,23 @@ export default SystemSettingDemo ## 使用 Codegen -Version >= @react-native-ohos/react-native-system-setting@1.7.7,已适配codegen-lib生成桥接代码。 - 本库已经适配了 Codegen ,在使用前需要主动执行生成三方库桥接代码,详细请参考 [Codegen 文档](/zh-cn/codegen.md)。 ## Link -Version >= @react-native-ohos/react-native-system-setting@1.7.7,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | 是否支持autolink | RN框架版本 | +|--------------------------------------|-----------------|------------| +| ~1.8.0 | No | 0.77 | +| ~1.7.7 | Yes | 0.72 | +| <= 1.7.6-0.0.1@deprecated | No | 0.72 | + +使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -此步骤为手动配置原生依赖项的指导。 +如您使用的版本支持 Autolink,并且工程已接入 Autolink,可跳过ManualLink配置。 +
+ ManualLink: 此步骤为手动配置原生依赖项的指导 -首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` +首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 ### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 @@ -298,8 +304,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5.运行 +## 运行 点击右上角的 `sync` 按钮 diff --git a/zh-cn/react-native-tcp-socket.md b/zh-cn/react-native-tcp-socket.md index 82b9b334c..fd5841489 100644 --- a/zh-cn/react-native-tcp-socket.md +++ b/zh-cn/react-native-tcp-socket.md @@ -575,16 +575,23 @@ const styles = StyleSheet.create({ ## 使用 Codegen -Version >= @react-native-ohos/react-native-tcp-socket@6.2.1,已适配codegen-lib生成桥接代码。 - 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -Version >= @react-native-ohos/react-native-tcp-socket@6.2.1,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -此步骤为手动配置原生依赖项的指导。 +| | 是否支持autolink | RN框架版本 | +|--------------------------------------|-----------------|------------| +| ~6.3.1 | No | 0.77 | +| ~6.2.1 | Yes | 0.72 | +| <= 6.2.0-0.0.3@deprecated | No | 0.72 | + +使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +如您使用的版本支持 Autolink,并且工程已接入 Autolink,可跳过ManualLink配置。 +
+ ManualLink: 此步骤为手动配置原生依赖项的指导 -首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` +首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 ### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 @@ -706,8 +713,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5.运行 +## 运行 点击右上角的 `sync` 按钮 diff --git a/zh-cn/react-native-text-gradient.md b/zh-cn/react-native-text-gradient.md index ead243608..9d5031b1f 100644 --- a/zh-cn/react-native-text-gradient.md +++ b/zh-cn/react-native-text-gradient.md @@ -96,11 +96,19 @@ const styles = StyleSheet.create({ ## Link -Version >= @react-native-ohos/react-native-text-gradient@0.1.8,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +| | 是否支持autolink | RN框架版本 | +|--------------------------------------|-----------------|------------| +| ~0.2.0 | No | 0.77 | +| ~0.1.8 | Yes | 0.72 | +| <= 0.1.7-0.0.4@deprecated | No | 0.72 | -此步骤为手动配置原生依赖项的指导。 +使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -首先需要使用 DevEco Studio 打开项目里的HarmonyOS工程 `harmony` +如您使用的版本支持 Autolink,并且工程已接入 Autolink,可跳过ManualLink配置。 +
+ ManualLink: 此步骤为手动配置原生依赖项的指导 + +首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 ### 1.在工程根目录的 `oh-package.json5` 添加 overrides 字段 @@ -224,8 +232,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5.运行 +## 运行 点击右上角的 `sync` 按钮 diff --git a/zh-cn/react-native-text-input-mask.md b/zh-cn/react-native-text-input-mask.md index f4be859bb..6f3c0a79a 100644 --- a/zh-cn/react-native-text-input-mask.md +++ b/zh-cn/react-native-text-input-mask.md @@ -147,12 +147,19 @@ const styles = StyleSheet.create({ ## Link +| | 是否支持autolink | RN框架版本 | +|--------------------------------------|-----------------|------------| +| ~3.2.0 | No | 0.77 | +| ~3.1.6 | Yes | 0.72 | +| <= 3.1.5-0.0.7@deprecated | No | 0.72 | -Version >= @react-native-ohos/react-native-text-input-mask@3.1.6,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -此步骤为手动配置原生依赖项的指导。 +如您使用的版本支持 Autolink,并且工程已接入 Autolink,可跳过ManualLink配置。 +
+ ManualLink: 此步骤为手动配置原生依赖项的指导 -首先需要使用 DevEco Studio 打开项目里的HarmonyOS工程 `harmony` +首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 ### 1.在工程根目录的 `oh-package.json` 添加 overrides 字段 @@ -265,8 +272,9 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +
-### 5.运行 +## 运行 点击右上角的 `sync` 按钮 -- Gitee