diff --git a/en/lottie-react-native.md b/en/lottie-react-native.md index 36816007abeff25a5e9d7dab69f685b4eb54f2e3..01b301a6c562c94f17aedb1ab5a5267788878ff2 100644 --- a/en/lottie-react-native.md +++ b/en/lottie-react-native.md @@ -14,9 +14,16 @@ > [!TIP] [GitHub address](https://github.com/react-native-oh-library/lottie-react-native) +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/lottie-react-native`, After introducing the new version of the third-party library, The version correspondence details are as follows: + +| Version | Package Name | Repository | Release | +| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| <= 6.4.1-0.1.17@deprecated | @react-native-oh-tpl/lottie-react-native | [Github(deprecated)](https://github.com/react-native-oh-library/lottie-react-native) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/lottie-react-native/releases) | +| >= 6.4.2 | @react-native-ohos/lottie-react-native | [GitCode](https://gitcode.com/openharmony-sig/rntpc_lottie-react-native) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_lottie-react-native/releases) | + ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/lottie-react-native Releases](https://github.com/react-native-oh-library/lottie-react-native/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. +Find the matching version information in the release address of a third-party library: [@react-native-ohos/lottie-react-native Releases](https://gitcode.com/openharmony-sig/rntpc_lottie-react-native/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: @@ -27,13 +34,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/lottie-react-native +npm install @react-native-ohos/lottie-react-native ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/lottie-react-native +yarn add @react-native-ohos/lottie-react-native ``` @@ -66,7 +73,11 @@ export default App; ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/lottie-react-native@6.4.2 now supports Autolink without requiring manual configuration. +Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +The 0.72 branch supports full Autolinking functionality starting from the RNOH 0.72.94 version (corresponding to the @react-native-oh/react-native-harmony-cli version 0.0.40). + +Currently, Version <= @react-native-oh-tpl/lottie-react-native@6.4.1-0.1.17@deprecated does not support AutoLink. Therefore, you need to manually configure the linking. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -94,7 +105,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/lottie-react-native": "file:../../node_modules/@react-native-oh-tpl/lottie-react-native/harmony/lottie.har" + "@react-native-ohos/lottie-react-native": "file:../../node_modules/@react-native-ohos/lottie-react-native/harmony/lottie.har" } ``` @@ -133,7 +144,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/lottie-react-native/src/main/cpp" ./lottie) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/lottie-react-native/src/main/cpp" ./lottie) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -173,7 +184,7 @@ Open `entry/src/main/ets/RNPackagesFactory.ts` and add: ```diff ... -+ import {LottieAnimationViewPackage} from '@react-native-oh-tpl/lottie-react-native/ts'; ++ import {LottieAnimationViewPackage} from '@react-native-ohos/lottie-react-native/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -188,7 +199,7 @@ Find `function buildCustomRNComponent()`, which is usually located in `entry/src ```diff ... -+ import { LottieAnimationView, LOTTIE_TYPE } from "@react-native-oh-tpl/lottie-react-native" ++ import { LottieAnimationView, LOTTIE_TYPE } from "@react-native-ohos/lottie-react-native" @Builder export function buildCustomRNComponent(ctx: ComponentBuilderContext) { @@ -236,7 +247,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. -Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/lottie-react-native Releases](https://github.com/react-native-oh-library/lottie-react-native/releases) +Check the release version information in the release address of the third-party library: [@react-native-ohos/lottie-react-native Releases](https://gitcode.com/openharmony-sig/rntpc_lottie-react-native/releases) ### Permission Requirements diff --git a/en/react-native-async-storage-async-storage.md b/en/react-native-async-storage-async-storage.md index 795d63dc252711002bcc2fab03cc48240d1d976d..aad2459a7854c3cf3163e540da6534ffd483cc42 100644 --- a/en/react-native-async-storage-async-storage.md +++ b/en/react-native-async-storage-async-storage.md @@ -14,9 +14,16 @@ > [!TIP] [GitHub address](https://github.com/react-native-oh-library/async-storage) +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/async-storage`, After introducing the new version of the third-party library, The version correspondence details are as follows: + +| Version | Package Name | Repository | Release | +| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| <= 1.21.0-0.2.2@deprecated | @react-native-oh-tpl/async-storage | [Github(deprecated)](https://github.com/react-native-oh-library/async-storage) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/async-storage/releases) | +| >= 1.21.1 | @react-native-ohos/async-storage | [GitCode](https://gitcode.com/openharmony-sig/rntpc_async-storage) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_async-storage/releases) | + ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/async-storage Releases](https://github.com/react-native-oh-library/async-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. +Find the matching version information in the release address of a third-party library: [@react-native-ohos/async-storage Releases](https://gitcode.com/openharmony-sig/rntpc_async-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: @@ -27,13 +34,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/async-storage +npm install @react-native-ohos/async-storage ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/async-storage +yarn add @react-native-ohos/async-storage ``` @@ -111,7 +118,10 @@ export default function App() { ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/async-storage@1.21.1 now supports Autolink without requiring manual configuration. +Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +Currently, Version <= @react-native-oh-tpl/async-storage@1.21.0-0.2.2@deprecated does not support AutoLink. Therefore, you need to manually configure the linking. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -140,7 +150,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/async-storage": "file:../../node_modules/@react-native-oh-tpl/async-storage/harmony/async_storage.har" + "@react-native-ohos/async-storage": "file:../../node_modules/@react-native-ohos/async-storage/harmony/async_storage.har" } ``` @@ -179,7 +189,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/async-storage/src/main/cpp" ./async-storage) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/async-storage/src/main/cpp" ./async-storage) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -220,7 +230,7 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... -+ import {AsyncStoragePackage} from '@react-native-oh-tpl/async-storage/ts'; ++ import {AsyncStoragePackage} from '@react-native-ohos/async-storage/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -249,7 +259,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. -Check the release version information in the release address of the third-party library: [@react-native-oh-library/async-storage Releases](https://github.com/react-native-oh-library/async-storage/releases) +Check the release version information in the release address of the third-party library: [@react-native-ohos/async-storage Releases](https://gitcode.com/openharmony-sig/rntpc_async-storage/release) ## APIs diff --git a/en/react-native-blob-util.md b/en/react-native-blob-util.md index 105a5ca96e2810785ee9c993e6c9fd436220b1e2..49fcd3d86ca1eb15eed54630a5ca6c83e09b8304 100644 --- a/en/react-native-blob-util.md +++ b/en/react-native-blob-util.md @@ -15,9 +15,16 @@ > [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-blob-util) +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-blob-util`, After introducing the new version of the third-party library, The version correspondence details are as follows: + +| Version | Package Name | Repository | Release | +| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| <= 0.19.7@deprecated | @react-native-oh-tpl/react-native-blob-util | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-blob-util) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-blob-util/releases) | +| >= 0.19.8 | @react-native-ohos/react-native-blob-util | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-blob-util) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-blob-util/releases) | + ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-blob-util Releases](https://github.com/react-native-oh-library/react-native-blob-util/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. +Find the matching version information in the release address of a third-party library: [@react-native-ohos/react-native-blob-util Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-blob-util/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: @@ -28,13 +35,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-blob-util +npm install @react-native-ohos/react-native-blob-util ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-blob-util +yarn add @react-native-ohos/react-native-blob-util ``` @@ -393,11 +400,16 @@ const styles = StyleSheet.create({ ## Use Codegen +Version >= @react-native-ohos/react-native-blob-util@0.19.8, 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-blob-util@0.19.8 now supports Autolink without requiring manual configuration. +Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +Currently, Version <= @react-native-oh-tpl/react-native-blob-util@0.19.7@deprecated does not support AutoLink. Therefore, you need to manually configure the linking. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -428,7 +440,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-blob-util": "file:../../node_modules/@react-native-oh-tpl/react-native-blob-util/harmony/blobUtil.har" + "@react-native-ohos/react-native-blob-util": "file:../../node_modules/@react-native-ohos/react-native-blob-util/harmony/blobUtil.har" } ``` @@ -450,7 +462,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 {BlobUtilPackage} from '@react-native-oh-tpl/react-native-blob-util/ts'; ++ import {BlobUtilPackage} from '@react-native-ohos/react-native-blob-util/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -478,7 +490,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. -Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-blob-util Releases](https://github.com/react-native-oh-library/react-native-blob-util/releases) +Check the release version information in the release address of the third-party library: [@react-native-ohos/react-native-blob-util Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-blob-util/releases) ## APIs diff --git a/en/react-native-cameraroll.md b/en/react-native-cameraroll.md index 75f672d9f64e0d9ac3ffd44fcb6fd75f1c56e2ea..9ec808c04202881e50710ef67055562e21df3a58 100644 --- a/en/react-native-cameraroll.md +++ b/en/react-native-cameraroll.md @@ -14,9 +14,16 @@ > [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-cameraroll) +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/camera-roll`, After introducing the new version of the third-party library, The version correspondence details are as follows: + +| Version | Package Name | Repository | Release | +| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| <= 7.8.3-0.1.5@deprecated | @react-native-oh-tpl/camera-roll | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-cameraroll) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-cameraroll/releases) | +| >= 7.8.4 | @react-native-ohos/camera-roll | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-cameraroll) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-cameraroll/releases) | + ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-cameraroll Releases](https://github.com/react-native-oh-library/react-native-cameraroll/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. +Find the matching version information in the release address of a third-party library: [@react-native-ohos/react-native-cameraroll Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-cameraroll/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: @@ -27,13 +34,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/camera-roll +npm install @react-native-ohos/camera-roll ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/camera-roll +yarn add @react-native-ohos/camera-roll ``` @@ -66,11 +73,16 @@ export default function App() { ## Use Codegen +Version >= @react-native-ohos/camera-roll@7.8.4, compatible with codegen-lib for generating bridge code. + If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/en/codegen.md). ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/camera-roll@7.8.4 now supports Autolink without requiring manual configuration. +Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +Currently, Version <= @react-native-oh-tpl/camera-roll@7.8.3-0.1.5@deprecated does not support AutoLink. Therefore, you need to manually configure the linking. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -98,7 +110,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/camera-roll": "file:../../node_modules/@react-native-oh-tpl/camera-roll/harmony/camera_roll.har" + "@react-native-ohos/camera-roll": "file:../../node_modules/@react-native-ohos/camera-roll/harmony/camera_roll.har" } ``` @@ -121,7 +133,7 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... -+ import { CameraRollPackage } from '@react-native-oh-tpl/camera-roll/ts'; ++ import { CameraRollPackage } from '@react-native-ohos/camera-roll/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -150,7 +162,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. -Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/camera-roll Releases](https://github.com/react-native-oh-library/react-native-cameraroll/releases) +Check the release version information in the release address of the third-party library: [@react-native-ohos/camera-roll Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-cameraroll/releases) ## Static Methods diff --git a/en/react-native-community-netinfo.md b/en/react-native-community-netinfo.md index 4ef3f260fe1e73e1f5c094c4cc1bba9c796e7278..3962255055bf2b72d8a3c7e10de5bb2f8b6f1365 100644 --- a/en/react-native-community-netinfo.md +++ b/en/react-native-community-netinfo.md @@ -14,9 +14,16 @@ > [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-netinfo) +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/netinfo`, After introducing the new version of the third-party library, The version correspondence details are as follows: + +| Version | Package Name | Repository | Release | +| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| <= 11.1.0-0.0.8@deprecated | @react-native-oh-tpl/netinfo | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-netinfo) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-netinfo/releases) | +| >= 11.1.1 | @react-native-ohos/netinfo | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-netinfo) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-netinfo/releases) | + ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/netinfo Releases](https://github.com/react-native-oh-library/react-native-netinfo/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. +Find the matching version information in the release address of a third-party library: [@react-native-ohos/netinfo Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-netinfo/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: @@ -27,13 +34,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/netinfo +npm install @react-native-ohos/netinfo ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/netinfo +yarn add @react-native-ohos/netinfo ``` @@ -75,7 +82,10 @@ export default App; ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/netinfo@11.1.1 now supports Autolink without requiring manual configuration. +Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +Currently, Version <= @react-native-oh-tpl/netinfo@11.1.0-0.0.8@deprecated does not support AutoLink. Therefore, you need to manually configure the linking. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -103,7 +113,7 @@ Open `entry/oh-package.json5` file and add the following dependencies: ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/netinfo": "file:../../node_modules/@react-native-oh-tpl/netinfo/harmony/netinfo.har" + "@react-native-ohos/netinfo": "file:../../node_modules/@react-native-ohos/netinfo/harmony/netinfo.har" } ``` @@ -142,7 +152,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/netinfo/src/main/cpp" ./netinfo) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/netinfo/src/main/cpp" ./netinfo) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -185,7 +195,7 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... -+ import {NetInfoPackage} from '@react-native-oh-tpl/netinfo/ts'; ++ import {NetInfoPackage} from '@react-native-ohos/netinfo/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -214,7 +224,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. -Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/netinfo Releases](https://github.com/react-native-oh-library/react-native-netinfo/releases) +Check the release version information in the release address of the third-party library: [@react-native-ohos/netinfo Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-netinfo/releases) ## Properties diff --git a/en/react-native-fs.md b/en/react-native-fs.md index 14e63b7165a254de12bcf97650f97a1f6f024ac1..bd89004fa2ef48a67fa8258975905de77fd3be32 100644 --- a/en/react-native-fs.md +++ b/en/react-native-fs.md @@ -9,7 +9,7 @@ This project is based on [react-native-fs@2.20.0](https://github.com/itinance/re | Version | Package Name | Repository | Release | | --------------------------- | ------------------------------------ | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | <= 2.20.0-0.1.14@deprecated | @react-native-oh-tpl/react-native-fs | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-fs) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-fs/releases) | -| >= 2.20.1 | @react-native-ohos/react-native-fs | [Gitee](https://gitee.com/openharmony-sig/rntpc_react-native-fs) | [Gitee Releases](https://gitee.com/openharmony-sig/rntpc_react-native-fs/releases) | +| >= 2.20.1 | @react-native-ohos/react-native-fs | [Gitee](https://gitcode.com/openharmony-sig/rntpc_react-native-fs) | [Gitee Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-fs/releases) | ## 1. Installation and Usage @@ -117,6 +117,10 @@ export default App; ``` ## 2. Manual Link +Version >= @react-native-ohos/react-native-fs@2.20.2 now supports Autolink without requiring manual configuration. +Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +Currently, Version < @react-native-ohos/react-native-fs@2.20.2,Version <= @react-native-oh-tpl/react-native-fs@2.20.0-0.1.14@deprecated does not support AutoLink. Therefore, you need to manually configure the linking. This step provides guidance for manually configuring native dependencies. diff --git a/en/react-native-linear-gradient.md b/en/react-native-linear-gradient.md index e280088903320fa2c83f1079bf2452ad1a0a4c7d..7e66d3a066f910cfbdc64828bdc280fc1963714f 100644 --- a/en/react-native-linear-gradient.md +++ b/en/react-native-linear-gradient.md @@ -90,6 +90,11 @@ var styles = StyleSheet.create({ ## 2. Manual Link +Version >= @react-native-ohos/react-native-linear-gradient@3.0.2 now supports Autolink without requiring manual configuration. +Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +Currently, Version < @react-native-ohos/react-native-linear-gradient@3.0.2,Version <= @react-native-oh-tpl/react-native-linear-gradient@3.0.0-0.5.0@deprecated does not support AutoLink. Therefore, you need to manually configure the linking. + This step provides guidance for manually configuring native dependencies. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. diff --git a/en/react-native-localize.md b/en/react-native-localize.md index d940c9320d9e8c9f91e0f84f6346bad34997efce..2c05a692c819d9049cefc917c85e5e45f513cf75 100644 --- a/en/react-native-localize.md +++ b/en/react-native-localize.md @@ -14,10 +14,16 @@ > [!TIP] [Github address](https://github.com/react-native-oh-library/react-native-localize) +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-localize`, After introducing the new version of the third-party library, The version correspondence details are as follows: + +| Version | Package Name | Repository | Release | +| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| <= 3.1.0-0.0.1@deprecated | @react-native-oh-tpl/react-native-localize | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-localize) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-localize/releases) | +| > 3.1.0 | @react-native-ohos/react-native-localize | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-localize) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-localize/releases) | ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-localize Releases](https://github.com/react-native-oh-library/react-native-localize/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. +Find the matching version information in the release address of a third-party library: [@react-native-ohos/react-native-localize Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-localize/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: @@ -27,13 +33,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-localize +npm install @react-native-ohos/react-native-localize ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-localize +yarn add @react-native-ohos/react-native-localize ``` @@ -115,11 +121,16 @@ export default LocalizeDemo; ## Use Codegen +Version > @react-native-ohos/react-native-localize@3.1.0, 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-localize@3.1.0 now supports Autolink without requiring manual configuration. +Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +Currently, Version <= @react-native-oh-tpl/react-native-localize@3.1.0-0.0.1@deprecated does not support AutoLink. Therefore, you need to manually configure the linking. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -148,7 +159,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-localize": "file:../../node_modules/@react-native-oh-tpl/react-native-localize/harmony/rn_localize.har" + "@react-native-ohos/react-native-localize": "file:../../node_modules/@react-native-ohos/react-native-localize/harmony/rn_localize.har" } ``` @@ -172,7 +183,7 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... -+ import { RNLocalizePackage } from '@react-native-oh-tpl/react-native-localize/ts'; ++ import { RNLocalizePackage } from '@react-native-ohos/react-native-localize/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -201,7 +212,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. -Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-localize Releases](https://github.com/react-native-oh-library/react-native-localize/releases) +Check the release version information in the release address of the third-party library: [@react-native-ohos/react-native-localize Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-localize/releases) ## API diff --git a/en/react-native-orientation-locker.md b/en/react-native-orientation-locker.md index 873262f674ee56d0888ace54383d07bce1ba8188..613581bbb8522ed130fc1abb1758caa46bb3e73a 100644 --- a/en/react-native-orientation-locker.md +++ b/en/react-native-orientation-locker.md @@ -14,6 +14,13 @@ > [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-orientation-locker) +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-orientation-locker`, After introducing the new version of the third-party library, The version correspondence details are as follows: + +| Version | Package Name | Repository | Release | +| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| <= 1.7.0-0.0.7@deprecated | @react-native-oh-tpl/react-native-orientation-locker | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-orientation-locker) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-orientation-locker/releases) | +| > 1.7.0 | @react-native-ohos/react-native-orientation-locker | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-orientation-locker) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-orientation-locker/releases) | + ## Installation and Usage Find the matching version information in the release address of a third-party library: [@react-native-oh-library/react-native-orientation-locker Releases](https://github.com/react-native-oh-library/react-native-orientation-locker/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. @@ -27,13 +34,13 @@ Go to the project directory and execute the following instruction: #### npm ```bash -npm install @react-native-oh-tpl/react-native-orientation-locker +npm install @react-native-ohos/react-native-orientation-locker ``` #### yarn ```bash -yarn add @react-native-oh-tpl/react-native-orientation-locker +yarn add @react-native-ohos/react-native-orientation-locker ``` @@ -211,7 +218,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-orientation-locker@1.7.0 now supports Autolink without requiring manual configuration. +Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +Currently, Version <= @react-native-oh-tpl/react-native-orientation-locker@1.7.0-0.0.7@deprecated does not support AutoLink. Therefore, you need to manually configure the linking. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -239,7 +249,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-orientation-locker":"file:../../node_modules/@react-native-oh-tpl/react-native-orientation-locker/harmony/orientation_locker.har" + "@react-native-ohos/react-native-orientation-locker":"file:../../node_modules/@react-native-ohos/react-native-orientation-locker/harmony/orientation_locker.har" } ``` @@ -261,7 +271,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-orientation-locker":"file:../../node_modules/@react-native-oh-tpl/react-native-orientation-locker/harmony/orientation_locker" + "@react-native-ohos/react-native-orientation-locker":"file:../../node_modules/@react-native-ohos/react-native-orientation-locker/harmony/orientation_locker" } ``` @@ -278,7 +288,7 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... -+ import { RNOrientationLockerPackage } from '@react-native-oh-tpl/react-native-orientation-locker/ts'; ++ import { RNOrientationLockerPackage } from '@react-native-ohos/react-native-orientation-locker/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ new SamplePackage(ctx), diff --git a/en/react-native-sound.md b/en/react-native-sound.md index baf473a6deaf9d5f5cdb534ff887875a7f587a75..33caf7e5e0f1ce176d5b287ad2d8f71770fb31d7 100644 --- a/en/react-native-sound.md +++ b/en/react-native-sound.md @@ -14,6 +14,13 @@ > [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-sound) +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-sound`, After introducing the new version of the third-party library, The version correspondence details are as follows: + +| Version | Package Name | Repository | Release | +| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| <= 0.11.2-0.0.13@deprecated | @react-native-oh-tpl/react-native-sound | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-sound) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-sound/releases) | +| >= 0.11.3 | @react-native-ohos/react-native-sound | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-sound) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-sound/releases) | + ## Installation and Usage Find the matching version information in the release address of a third-party library: [@react-native-oh-library/react-native-sound Releases](https://github.com/react-native-oh-library/react-native-sound/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. @@ -27,13 +34,13 @@ Go to the project directory and execute the following instruction: #### npm ```bash -npm install @react-native-oh-tpl/react-native-sound +npm install @react-native-ohos/react-native-sound ``` #### yarn ```bash -yarn add @react-native-oh-tpl/react-native-sound +yarn add @react-native-ohos/react-native-sound ``` @@ -157,7 +164,10 @@ export default SoundDemo; ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-sound@0.11.3 now supports Autolink without requiring manual configuration. +Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +Currently, Version <= @react-native-oh-tpl/react-native-sound@0.11.2-0.0.13@deprecated does not support AutoLink. Therefore, you need to manually configure the linking. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -185,7 +195,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-sound": "file:../../node_modules/@react-native-oh-tpl/react-native-sound/harmony/sound.har" + "@react-native-ohos/react-native-sound": "file:../../node_modules/@react-native-ohos/react-native-sound/harmony/sound.har" } ``` @@ -224,7 +234,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-sound/src/main/cpp" ./sound) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-sound/src/main/cpp" ./sound) # RNOH_BEGIN: manual_package_linking_1 add_library(rnoh_app SHARED @@ -263,7 +273,7 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... -+ import { SoundPackage } from '@react-native-oh-tpl/react-native-sound/ts'; ++ import { SoundPackage } from '@react-native-ohos/react-native-sound/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ diff --git a/en/react-native-webview.md b/en/react-native-webview.md index 6e3bdd197fe35122a774a89ef6dba008b6a0b08c..7218cc02795eb10219bde7f32c495b4af63bef15 100644 --- a/en/react-native-webview.md +++ b/en/react-native-webview.md @@ -14,10 +14,17 @@ > [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-webview) +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-webview`, After introducing the new version of the third-party library, The version correspondence details are as follows: + +| Version | Package Name | Repository | Release | +| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| <= 13.10.4@deprecated | @react-native-oh-tpl/react-native-webview | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-webview) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-webview/releases) | +| > 13.10.4 | @react-native-ohos/react-native-webview | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-webview) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-webview/releases) | + ## Installation and Usage -Find the matching version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-webview Releases](https://github.com/react-native-oh-library/react-native-webview /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. +Find the matching version information in the release address of the third-party library: [@react-native-ohos/react-native-webview Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-webview/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: @@ -27,13 +34,13 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-webview +npm install @react-native-ohos/react-native-webview ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-webview +yarn add @react-native-ohos/react-native-webview ``` @@ -54,7 +61,11 @@ export default function WebViewDemo() { ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version > @react-native-ohos/react-native-webview@13.10.4 now supports Autolink without requiring manual configuration. +Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +The 0.72 branch supports full Autolinking functionality starting from the RNOH 0.72.94 version (corresponding to the @react-native-oh/react-native-harmony-cli version 0.0.40). + +Currently, Version <= @react-native-oh-tpl/react-native-webview@13.10.4@deprecated does not support AutoLink. Therefore, you need to manually configure the linking. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -83,7 +94,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-webview": "file:../../node_modules/@react-native-oh-tpl/react-native-webview/harmony/rn_webview.har" + "@react-native-ohos/react-native-webview": "file:../../node_modules/@react-native-ohos/react-native-webview/harmony/rn_webview.har" } ``` @@ -123,7 +134,7 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) -+ add_subdirectory("${OH_MODULE_DIR}/@react-native-oh-tpl/react-native-webview/src/main/cpp" ./webview) ++ add_subdirectory("${OH_MODULE_DIR}/@react-native-ohos/react-native-webview/src/main/cpp" ./webview) # RNOH_END: manual_package_linking_1 @@ -164,7 +175,7 @@ std::vector> PackageProvider::getPackages(Package::Cont Find `function buildCustomRNComponent()`, which is usually located in `entry/src/main/ets/pages/index.ets` or `entry/src/main/ets/rn/LoadBundle.ets`, and add the following code: ```diff -+ import { WebView, WEB_VIEW } from "@react-native-oh-tpl/react-native-webview" ++ import { WebView, WEB_VIEW } from "@react-native-ohos/react-native-webview" @Builder function buildCustomComponent(ctx: ComponentBuilderContext) { @@ -199,7 +210,7 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff import type {RNPackageContext, RNPackage} from 'rnoh/ts'; import {SamplePackage} from 'rnoh-sample-package/ts'; -+ import { WebViewPackage } from '@react-native-oh-tpl/react-native-webview/ts'; ++ import { WebViewPackage } from '@react-native-ohos/react-native-webview/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -228,7 +239,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. -Check the release version information in the release address of the third-party library: [ @react-native-oh-tpl/react-native-webview Releases](https://github.com/react-native-oh-library/react-native-webview/releases) +Check the release version information in the release address of the third-party library: [ @react-native-ohos/react-native-webview Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-webview/releases) ## Properties > [!WARNING] The "ignoreSilentHardwareSwitch" needs to be set to "true" for the web page to have sound when playing. diff --git a/zh-cn/lottie-react-native.md b/zh-cn/lottie-react-native.md index 766a4addf9bc4e5f27da3ebba895c62d904a9719..fb343a01645cc103a3c10a487b367463a9f409b5 100644 --- a/zh-cn/lottie-react-native.md +++ b/zh-cn/lottie-react-native.md @@ -14,9 +14,16 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/lottie-react-native) +该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/lottie-react-native`,具体版本所属关系如下: + +| Version | Package Name | Repository | Release | +| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| <= 6.4.1-0.1.17@deprecated | @react-native-oh-tpl/lottie-react-native | [Github(deprecated)](https://github.com/react-native-oh-library/lottie-react-native) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/lottie-react-native/releases) | +| >= 6.4.2 | @react-native-ohos/lottie-react-native | [GitCode](https://gitcode.com/openharmony-sig/rntpc_lottie-react-native) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_lottie-react-native/releases) | + ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/lottie-react-native Releases](https://github.com/react-native-oh-library/lottie-react-native/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-ohos/lottie-react-native Releases](https://gitcode.com/openharmony-sig/rntpc_lottie-react-native/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -25,13 +32,13 @@ #### **npm** ```bash -npm install @react-native-oh-tpl/lottie-react-native +npm install @react-native-ohos/lottie-react-native ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/lottie-react-native +yarn add @react-native-ohos/lottie-react-native ``` @@ -64,7 +71,11 @@ export default App; ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/lottie-react-native@6.4.2,已支持 Autolink,无需手动配置。 +Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +0.72分支从RNOH 0.72.94版本(对应 @react-native-oh/react-native-harmony-cli 版本是0.0.40)开始可使用完整的 Autolinking 功能。 + +Version <= @react-native-oh-tpl/lottie-react-native@6.4.1-0.1.17@deprecated 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -95,7 +106,7 @@ export default App; ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/lottie-react-native": "file:../../node_modules/@react-native-oh-tpl/lottie-react-native/harmony/lottie.har" + "@react-native-ohos/lottie-react-native": "file:../../node_modules/@react-native-ohos/lottie-react-native/harmony/lottie.har" } ``` @@ -134,7 +145,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/lottie-react-native/src/main/cpp" ./lottie) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/lottie-react-native/src/main/cpp" ./lottie) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -174,7 +185,7 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... -+ import {LottieAnimationViewPackage} from '@react-native-oh-tpl/lottie-react-native/ts'; ++ import {LottieAnimationViewPackage} from '@react-native-ohos/lottie-react-native/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -189,7 +200,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ```diff ... -+ import { LottieAnimationView, LOTTIE_TYPE } from "@react-native-oh-tpl/lottie-react-native" ++ import { LottieAnimationView, LOTTIE_TYPE } from "@react-native-ohos/lottie-react-native" @Builder export function buildCustomRNComponent(ctx: ComponentBuilderContext) { @@ -237,7 +248,7 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/lottie-react-native Releases](https://github.com/react-native-oh-library/lottie-react-native/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-ohos/lottie-react-native Releases](https://gitcode.com/openharmony-sig/rntpc_lottie-react-native/releases) ### 权限要求 diff --git a/zh-cn/react-native-async-storage-async-storage.md b/zh-cn/react-native-async-storage-async-storage.md index 11572d4b8e454b0a03acfb968560483237701419..0cd956c518152adbdd75f501a801e16fc82619f5 100644 --- a/zh-cn/react-native-async-storage-async-storage.md +++ b/zh-cn/react-native-async-storage-async-storage.md @@ -15,9 +15,16 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/async-storage) +该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/async-storage`,具体版本所属关系如下: + +| Version | Package Name | Repository | Release | +| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| <= 1.21.0-0.2.2@deprecated | @react-native-oh-tpl/async-storage | [Github(deprecated)](https://github.com/react-native-oh-library/async-storage) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/async-storage/releases) | +| >= 1.21.1 | @react-native-ohos/async-storage | [GitCode](https://gitcode.com/openharmony-sig/rntpc_async-storage) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_async-storage/releases) | + ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/async-storage Releases](https://github.com/react-native-oh-library/async-storage/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-ohos/async-storage Releases](https://gitcode.com/openharmony-sig/rntpc_async-storage/release) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -26,13 +33,13 @@ #### **npm** ```bash -npm install @react-native-oh-tpl/async-storage +npm install @react-native-ohos/async-storage ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/async-storage +yarn add @react-native-ohos/async-storage ``` @@ -109,7 +116,10 @@ export default function App() { ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/async-storage@1.21.1,已支持 Autolink,无需手动配置。 +Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +Version <= @react-native-oh-tpl/async-storage@1.21.0-0.2.2@deprecated 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -141,7 +151,7 @@ export default function App() { "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/async-storage": "file:../../node_modules/@react-native-oh-tpl/async-storage/harmony/async_storage.har" + "@react-native-ohos/async-storage": "file:../../node_modules/@react-native-ohos/async-storage/harmony/async_storage.har" } ``` @@ -180,7 +190,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/async-storage/src/main/cpp" ./async-storage) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/async-storage/src/main/cpp" ./async-storage) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -221,7 +231,7 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... -+ import {AsyncStoragePackage} from '@react-native-oh-tpl/async-storage/ts'; ++ import {AsyncStoragePackage} from '@react-native-ohos/async-storage/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -249,7 +259,7 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-library/async-storage Releases](https://github.com/react-native-oh-library/async-storage/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-ohos/async-storage Releases](https://gitcode.com/openharmony-sig/rntpc_async-storage/release) ## API diff --git a/zh-cn/react-native-blob-util.md b/zh-cn/react-native-blob-util.md index e1ee142c2701b299d0297e9833d23cd0258f2b4f..944b47f6652a8928672bf73e636f127c071b97d0 100644 --- a/zh-cn/react-native-blob-util.md +++ b/zh-cn/react-native-blob-util.md @@ -15,9 +15,16 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-blob-util) +该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/react-native-blob-util`,具体版本所属关系如下: + +| Version | Package Name | Repository | Release | +| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| <= 0.19.7@deprecated | @react-native-oh-tpl/react-native-blob-util | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-blob-util) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-blob-util/releases) | +| >= 0.19.8 | @react-native-ohos/react-native-blob-util | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-blob-util) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-blob-util/releases) | + ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-blob-util Releases](https://github.com/react-native-oh-library/react-native-blob-util/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-ohos/react-native-blob-util Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-blob-util/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -26,13 +33,13 @@ #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-blob-util +npm install @react-native-ohos/react-native-blob-util ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-blob-util +yarn add @react-native-ohos/react-native-blob-util ``` @@ -390,12 +397,16 @@ const styles = StyleSheet.create({ ``` ## 使用 Codegen +Version >= @react-native-ohos/react-native-blob-util@0.19.8,已适配codegen-lib生成桥接代码。 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-blob-util@0.19.8,已支持 Autolink,无需手动配置。 +Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +Version <= @react-native-oh-tpl/react-native-blob-util@0.19.7@deprecated 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -426,7 +437,7 @@ const styles = StyleSheet.create({ ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-blob-util": "file:../../node_modules/@react-native-oh-tpl/react-native-blob-util/harmony/blobUtil.har" + "@react-native-ohos/react-native-blob-util": "file:../../node_modules/@react-native-ohos/react-native-blob-util/harmony/blobUtil.har" } ``` @@ -448,7 +459,7 @@ ohpm install 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: ```diff -+ import {BlobUtilPackage} from '@react-native-oh-tpl/react-native-blob-util/ts'; ++ import {BlobUtilPackage} from '@react-native-ohos/react-native-blob-util/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -476,7 +487,7 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-blob-util Releases](https://github.com/react-native-oh-library/react-native-blob-util/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-ohos/react-native-blob-util Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-blob-util/releases) ## API diff --git a/zh-cn/react-native-cameraroll.md b/zh-cn/react-native-cameraroll.md index 595689637025665899a528a17e8541047427fe26..19a5525e64e4fcc2a4196ad77801729747665404 100644 --- a/zh-cn/react-native-cameraroll.md +++ b/zh-cn/react-native-cameraroll.md @@ -14,9 +14,16 @@ > [!Tip] [Github 地址](https://github.com/react-native-oh-library/react-native-cameraroll) +该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/camera-roll`,具体版本所属关系如下: + +| Version | Package Name | Repository | Release | +| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| <= 7.8.3-0.1.5@deprecated | @react-native-oh-tpl/camera-roll | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-cameraroll) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-cameraroll/releases) | +| >= 7.8.4 | @react-native-ohos/camera-roll | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-cameraroll) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-cameraroll/releases) | + ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-cameraroll Releases](https://github.com/react-native-oh-library/react-native-cameraroll/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-ohos/react-native-cameraroll Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-cameraroll/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -25,13 +32,13 @@ #### **npm** ```bash -npm install @react-native-oh-tpl/camera-roll +npm install @react-native-ohos/camera-roll ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/camera-roll +yarn add @react-native-ohos/camera-roll ``` @@ -64,11 +71,16 @@ export default function App() { ## 使用 Codegen +Version >= @react-native-ohos/camera-roll@7.8.4,已适配codegen-lib生成桥接代码。 + 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/camera-roll@7.8.4,已支持 Autolink,无需手动配置。 +Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +Version <= @react-native-oh-tpl/camera-roll@7.8.3-0.1.5@deprecated 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -99,7 +111,7 @@ export default function App() { ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/camera-roll": "file:../../node_modules/@react-native-oh-tpl/camera-roll/harmony/camera_roll.har" + "@react-native-ohos/camera-roll": "file:../../node_modules/@react-native-ohos/camera-roll/harmony/camera_roll.har" } ``` @@ -122,7 +134,7 @@ ohpm install ```diff ... -+ import { CameraRollPackage } from '@react-native-oh-tpl/camera-roll/ts'; ++ import { CameraRollPackage } from '@react-native-ohos/camera-roll/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -151,7 +163,7 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/camera-roll Releases](https://github.com/react-native-oh-library/react-native-cameraroll/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-ohos/camera-roll Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-cameraroll/releases) ## 静态方法 diff --git a/zh-cn/react-native-community-netinfo.md b/zh-cn/react-native-community-netinfo.md index 733bc412027fc03e3d8939a178a42a5df75fef83..a921e2bbd03020f605a933f0d832b2c2ae1fa55b 100644 --- a/zh-cn/react-native-community-netinfo.md +++ b/zh-cn/react-native-community-netinfo.md @@ -14,9 +14,16 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-netinfo) +该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/netinfo`,具体版本所属关系如下: + +| Version | Package Name | Repository | Release | +| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| <= 11.1.0-0.0.8@deprecated | @react-native-oh-tpl/netinfo | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-netinfo) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-netinfo/releases) | +| >= 11.1.1 | @react-native-ohos/netinfo | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-netinfo) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-netinfo/releases) | + ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/netinfo Releases](https://github.com/react-native-oh-library/react-native-netinfo/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-ohos/netinfo Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-netinfo/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -25,13 +32,13 @@ #### **npm** ```bash -npm install @react-native-oh-tpl/netinfo +npm install @react-native-ohos/netinfo ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/netinfo +yarn add @react-native-ohos/netinfo ``` @@ -73,7 +80,10 @@ export default App; ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/netinfo@11.1.1,已支持 Autolink,无需手动配置。 +Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +Version <= @react-native-oh-tpl/netinfo@11.1.0-0.0.8@deprecated 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -104,7 +114,7 @@ export default App; ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/netinfo": "file:../../node_modules/@react-native-oh-tpl/netinfo/harmony/netinfo.har" + "@react-native-ohos/netinfo": "file:../../node_modules/@react-native-ohos/netinfo/harmony/netinfo.har" } ``` @@ -143,7 +153,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/netinfo/src/main/cpp" ./netinfo) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/netinfo/src/main/cpp" ./netinfo) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -186,7 +196,7 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... -+ import {NetInfoPackage} from '@react-native-oh-tpl/netinfo/ts'; ++ import {NetInfoPackage} from '@react-native-ohos/netinfo/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -215,7 +225,7 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/netinfo Releases](https://github.com/react-native-oh-library/react-native-netinfo/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-ohos/netinfo Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-netinfo/releases) ## 属性 diff --git a/zh-cn/react-native-fs.md b/zh-cn/react-native-fs.md index c60ea9c24e60a66565963209efb24a9b066a30dd..eaf15c40cd95468a1c4e0587314ac709ca522175 100644 --- a/zh-cn/react-native-fs.md +++ b/zh-cn/react-native-fs.md @@ -9,7 +9,7 @@ | Version | Package Name | Repository | Release | | --------------------------- | ------------------------------------ | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | | <= 2.20.0-0.1.14@deprecated | @react-native-oh-tpl/react-native-fs | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-fs) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-fs/releases) | -| >= 2.20.1 | @react-native-ohos/react-native-fs | [Gitee](https://gitee.com/openharmony-sig/rntpc_react-native-fs) | [Gitee Releases](https://gitee.com/openharmony-sig/rntpc_react-native-fs/releases) | +| >= 2.20.1 | @react-native-ohos/react-native-fs | [Gitee](https://gitcode.com/openharmony-sig/rntpc_react-native-fs) | [Gitee Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-fs/releases) | ## 1. 安装与使用 @@ -117,6 +117,10 @@ export default App; ``` ## 2. Manual Link +Version >= @react-native-ohos/react-native-fs@2.20.2,已支持 Autolink,无需手动配置。 +Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +Version < @react-native-ohos/react-native-fs@2.20.2,Version <= @react-native-oh-tpl/react-native-fs@2.20.0-0.1.14@deprecated 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 此步骤为手动配置原生依赖项的指导。 diff --git a/zh-cn/react-native-linear-gradient.md b/zh-cn/react-native-linear-gradient.md index 6da3ab669741f57978124e8c2c7d6adb2441eb50..487762993b19cde28544dac55e42d4558c7ec019 100644 --- a/zh-cn/react-native-linear-gradient.md +++ b/zh-cn/react-native-linear-gradient.md @@ -90,6 +90,11 @@ var styles = StyleSheet.create({ ## 2. Manual Link +Version >= @react-native-ohos/react-native-linear-gradient@3.0.2,已支持 Autolink,无需手动配置。 +Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +Version < @react-native-ohos/react-native-linear-gradient@3.0.2,Version <= @react-native-oh-tpl/react-native-linear-gradient@3.0.0-0.5.0@deprecated 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 + 此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 diff --git a/zh-cn/react-native-localize.md b/zh-cn/react-native-localize.md index a76cb978f832b935503dc3777cea48df321b786e..135f81bfb1576d329ad80a8548c3299ef2f454e9 100644 --- a/zh-cn/react-native-localize.md +++ b/zh-cn/react-native-localize.md @@ -14,10 +14,16 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-localize) +该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/react-native-localize`,具体版本所属关系如下: + +| Version | Package Name | Repository | Release | +| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| <= 3.1.0-0.0.1@deprecated | @react-native-oh-tpl/react-native-localize | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-localize) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-localize/releases) | +| > 3.1.0 | @react-native-ohos/react-native-localize | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-localize) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-localize/releases) | ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-localize Releases](https://github.com/react-native-oh-library/react-native-localize/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-ohos/react-native-localize Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-localize/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -27,13 +33,13 @@ #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-localize +npm install @react-native-ohos/react-native-localize ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-localize +yarn add @react-native-ohos/react-native-localize ``` @@ -114,12 +120,16 @@ export default LocalizeDemo; ``` ## 使用 Codegen +Version > @react-native-ohos/react-native-localize@3.1.0,已适配codegen-lib生成桥接代码。 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version > @react-native-ohos/react-native-localize@3.1.0,已支持 Autolink,无需手动配置。 +Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +Version <= @react-native-oh-tpl/react-native-localize@3.1.0-0.0.1@deprecated 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -150,7 +160,7 @@ export default LocalizeDemo; ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-localize": "file:../../node_modules/@react-native-oh-tpl/react-native-localize/harmony/rn_localize.har" + "@react-native-ohos/react-native-localize": "file:../../node_modules/@react-native-ohos/react-native-localize/harmony/rn_localize.har" } ``` @@ -174,7 +184,7 @@ ohpm install ```diff ... -+ import { RNLocalizePackage } from '@react-native-oh-tpl/react-native-localize/ts'; ++ import { RNLocalizePackage } from '@react-native-ohos/react-native-localize/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -203,7 +213,7 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-localize Releases](https://github.com/react-native-oh-library/react-native-localize/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-ohos/react-native-localize Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-localize/releases) ## API diff --git a/zh-cn/react-native-orientation-locker.md b/zh-cn/react-native-orientation-locker.md index 45394872b7b09543b4fcfd1b16fde8c4f92723b7..fb9843b9cdbf8d8456bea5a7efac7ac3761e8451 100644 --- a/zh-cn/react-native-orientation-locker.md +++ b/zh-cn/react-native-orientation-locker.md @@ -14,6 +14,13 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-orientation-locker) +该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/react-native-orientation-locker`,具体版本所属关系如下: + +| Version | Package Name | Repository | Release | +| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| <= 1.7.0-0.0.7@deprecated | @react-native-oh-tpl/react-native-orientation-locker | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-orientation-locker) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-orientation-locker/releases) | +| > 1.7.0 | @react-native-ohos/react-native-orientation-locker | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-orientation-locker) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-orientation-locker/releases) | + ## 安装与使用 请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-library/react-native-orientation-locker Releases](https://github.com/react-native-oh-library/react-native-orientation-locker/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -26,13 +33,13 @@ #### npm ```bash -npm install @react-native-oh-tpl/react-native-orientation-locker +npm install @react-native-ohos/react-native-orientation-locker ``` #### yarn ```bash -yarn add @react-native-oh-tpl/react-native-orientation-locker +yarn add @react-native-ohos/react-native-orientation-locker ``` @@ -213,7 +220,10 @@ const styles = StyleSheet.create({ ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version > @react-native-ohos/react-native-orientation-locker@1.7.0,已支持 Autolink,无需手动配置。 +Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +Version <= @react-native-oh-tpl/react-native-orientation-locker@1.7.0-0.0.7@deprecated 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -244,7 +254,7 @@ const styles = StyleSheet.create({ ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-orientation-locker":"file:../../node_modules/@react-native-oh-tpl/react-native-orientation-locker/harmony/orientation_locker.har" + "@react-native-ohos/react-native-orientation-locker":"file:../../node_modules/@react-native-ohos/react-native-orientation-locker/harmony/orientation_locker.har" } ``` @@ -266,7 +276,7 @@ ohpm install ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-orientation-locker":"file:../../node_modules/@react-native-oh-tpl/react-native-orientation-locker/harmony/orientation_locker" + "@react-native-ohos/react-native-orientation-locker":"file:../../node_modules/@react-native-ohos/react-native-orientation-locker/harmony/orientation_locker" } ``` @@ -283,7 +293,7 @@ ohpm install --no-link ```diff ... -+ import { RNOrientationLockerPackage } from '@react-native-oh-tpl/react-native-orientation-locker/ts'; ++ import { RNOrientationLockerPackage } from '@react-native-ohos/react-native-orientation-locker/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ new SamplePackage(ctx), diff --git a/zh-cn/react-native-sound.md b/zh-cn/react-native-sound.md index 5c2909a99ed2b4a79dc3bdd4c73eae60e8ba2710..0d587be5c9b683f99d32adb172430e278170a335 100644 --- a/zh-cn/react-native-sound.md +++ b/zh-cn/react-native-sound.md @@ -14,6 +14,13 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-sound) +该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/react-native-sound`,具体版本所属关系如下: + +| Version | Package Name | Repository | Release | +| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| <= 0.11.2-0.0.13@deprecated | @react-native-oh-tpl/react-native-sound | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-sound) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-sound/releases) | +| >= 0.11.3 | @react-native-ohos/react-native-sound | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-sound) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-sound/releases) | + ## 安装与使用 请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-library/react-native-sound Releases](https://github.com/react-native-oh-library/react-native-sound/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -25,13 +32,13 @@ #### npm ```bash -npm install @react-native-oh-tpl/react-native-sound +npm install @react-native-ohos/react-native-sound ``` #### yarn ```bash -yarn add @react-native-oh-tpl/react-native-sound +yarn add @react-native-ohos/react-native-sound ``` @@ -155,7 +162,10 @@ export default SoundDemo; ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-sound@0.11.3,已支持 Autolink,无需手动配置。 +Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +Version <= @react-native-oh-tpl/react-native-sound@0.11.2-0.0.13@deprecated 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -186,7 +196,7 @@ export default SoundDemo; ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-sound": "file:../../node_modules/@react-native-oh-tpl/react-native-sound/harmony/sound.har" + "@react-native-ohos/react-native-sound": "file:../../node_modules/@react-native-ohos/react-native-sound/harmony/sound.har" } ``` @@ -225,7 +235,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-sound/src/main/cpp" ./sound) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-sound/src/main/cpp" ./sound) # RNOH_BEGIN: manual_package_linking_1 add_library(rnoh_app SHARED @@ -264,7 +274,7 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... -+ import { SoundPackage } from '@react-native-oh-tpl/react-native-sound/ts'; ++ import { SoundPackage } from '@react-native-ohos/react-native-sound/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ diff --git a/zh-cn/react-native-webview.md b/zh-cn/react-native-webview.md index 5ba3125d2fe12b84bbda6005f2bb0617164f8443..ecbfcbf235187c152fb730eeec4d1613bb12ec12 100644 --- a/zh-cn/react-native-webview.md +++ b/zh-cn/react-native-webview.md @@ -14,9 +14,16 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-webview) +该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/react-native-webview`,具体版本所属关系如下: + +| Version | Package Name | Repository | Release | +| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | +| <= 13.10.4@deprecated | @react-native-oh-tpl/react-native-webview | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-webview) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-webview/releases) | +| > 13.10.4 | @react-native-ohos/react-native-webview | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-webview) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-webview/releases) | + ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-webview Releases](https://github.com/react-native-oh-library/react-native-webview/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-ohos/react-native-webview Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-webview/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -26,13 +33,13 @@ #### **npm** ```bash -npm install @react-native-oh-tpl/react-native-webview +npm install @react-native-ohos/react-native-webview ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-webview +yarn add @react-native-ohos/react-native-webview ``` @@ -53,7 +60,11 @@ export default function WebViewDemo() { ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version > @react-native-ohos/react-native-webview@13.10.4,已支持 Autolink,无需手动配置。 +Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +0.72分支从RNOH 0.72.94版本(对应 @react-native-oh/react-native-harmony-cli 版本是0.0.40)开始可使用完整的 Autolinking 功能。 + +Version <= @react-native-oh-tpl/react-native-webview@13.10.4@deprecated 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -85,7 +96,7 @@ export default function WebViewDemo() { "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-webview": "file:../../node_modules/@react-native-oh-tpl/react-native-webview/harmony/rn_webview.har" + "@react-native-ohos/react-native-webview": "file:../../node_modules/@react-native-ohos/react-native-webview/harmony/rn_webview.har" } ``` @@ -125,7 +136,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-webview/src/main/cpp" ./webview) ++ add_subdirectory("${OH_MODULE_DIR}/@react-native-ohos/react-native-webview/src/main/cpp" ./webview) # RNOH_END: manual_package_linking_1 @@ -166,7 +177,7 @@ std::vector> PackageProvider::getPackages(Package::Cont 找到 **function buildCustomComponent()**,一般位于 `entry/src/main/ets/pages/index.ets` 或 `entry/src/main/ets/rn/LoadBundle.ets`,添加: ```diff -+ import { WebView, WEB_VIEW } from "@react-native-oh-tpl/react-native-webview" ++ import { WebView, WEB_VIEW } from "@react-native-ohos/react-native-webview" @Builder function buildCustomComponent(ctx: ComponentBuilderContext) { @@ -201,7 +212,7 @@ const arkTsComponentNames: Array = [ ```diff import type {RNPackageContext, RNPackage} from 'rnoh/ts'; import {SamplePackage} from 'rnoh-sample-package/ts'; -+ import { WebViewPackage } from '@react-native-oh-tpl/react-native-webview/ts'; ++ import { WebViewPackage } from '@react-native-ohos/react-native-webview/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -230,7 +241,7 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[ @react-native-oh-tpl/react-native-webview Releases](https://github.com/react-native-oh-library/react-native-webview/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[ @react-native-ohos/react-native-webview Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-webview/releases) ## 属性 > [!WARNING]ignoreSilentHardwareSwitch需要设置true网页播放才有声音