diff --git a/en/klarna-platform-colors.md b/en/klarna-platform-colors.md index 59d2e243e3b8f92a0d6389a83a4ccc960d3655b9..e669330901446a3d341108d9ffdd19588028f994 100644 --- a/en/klarna-platform-colors.md +++ b/en/klarna-platform-colors.md @@ -21,11 +21,11 @@ Please refer to the Releases page of the third-party library for the correspondi | Third-party Library Version | Release Information | Supported RN Version | | ---------- | ------------------------------------------------------------ | ---------- | -| 0.4.0@deprecated | [@react-native-oh-tpl/platform-colors Releases(deprecated)](https://github.com/react-native-oh-library/platform-colors/releases) | 0.72 | +| <= 0.4.0-0.0.1@deprecated | [@react-native-oh-tpl/platform-colors Releases(deprecated)](https://github.com/react-native-oh-library/platform-colors/releases) | 0.72 | | 0.4.1 | [@react-native-ohos/platform-colors Releases](https://gitcode.com/openharmony-sig/rntpc_platform-colors/releases) | 0.72 | | 0.5.0 | [@react-native-ohos/platform-colors Releases](https://gitcode.com/openharmony-sig/rntpc_platform-colors/releases) | 0.77 | -For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. +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: @@ -253,7 +253,69 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4. Running +### 4. Configure CMakeLists and import RNPlatformColorsPackage + +> If you are using version <= 0.4.0-0.0.1, please skip this chapter. + +open `entry/src/main/cpp/CMakeLists.txt`,add: + +```diff +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") ++ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") +set(LOG_VERBOSITY_LEVEL 1) +set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") +set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") +set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use +add_compile_definitions(WITH_HITRACE_SYSTRACE) + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) + +# RNOH_BEGIN: manual_package_linking_1 +add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/platform-colors/src/main/cpp" ./platform_colors) + +# RNOH_END: manual_package_linking_1 + +file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") + +add_library(rnoh_app SHARED + ${GENERATED_CPP_FILES} + "./PackageProvider.cpp" + "${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp" +) +target_link_libraries(rnoh_app PUBLIC rnoh) + +# RNOH_BEGIN: manual_package_linking_2 +target_link_libraries(rnoh_app PUBLIC rnoh_sample_package) ++ target_link_libraries(rnoh_app PUBLIC rnoh_platform_colors) +# RNOH_END: manual_package_linking_2 +``` + +open `entry/src/main/cpp/PackageProvider.cpp`,add: + +```diff +#include "RNOH/PackageProvider.h" +#include "generated/RNOHGeneratedPackage.h" +#include "SamplePackage.h" ++ #include "RNPlatformColorsPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { + std::make_shared(ctx), + std::make_shared(ctx), ++ std::make_shared(ctx) + }; +} +``` + +### 5. Running Click the `sync` button in the upper right corner. @@ -272,13 +334,11 @@ Then build and run the code. To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -Please refer to the Releases page of the third-party library for the corresponding version information +Verified in the following versions. -| Third-party Library Version | Release Information | Supported RN Version | -| ---------- | ------------------------------------------------------------ | ---------- | -| 0.4.0@deprecated | [@react-native-oh-tpl/platform-colors Releases(deprecated)](https://github.com/react-native-oh-library/platform-colors/releases) | 0.72 | -| 0.4.1 | [@react-native-ohos/platform-colors Releases](https://gitcode.com/openharmony-sig/rntpc_platform-colors/releases) | 0.72 | -| 0.5.0 | [@react-native-ohos/platform-colors Releases](https://gitcode.com/openharmony-sig/rntpc_platform-colors/releases) | 0.77 | +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## Properties diff --git a/en/react-native-audio-recorder-player.md b/en/react-native-audio-recorder-player.md index 0fb4179429d26d4090e3ac703af9ae43a0b9d1af..3bdccd5fa1055bad4e89fe0a733da9948ef4c096 100644 --- a/en/react-native-audio-recorder-player.md +++ b/en/react-native-audio-recorder-player.md @@ -17,9 +17,10 @@ ## Installation and Usage Please refer to the Releases page of the third-party library for the corresponding version information + | Third-party Library Version | Release Information | Supported RN Version | | ---------- | ------------------------------------------------------------ | ---------- | -| 3.6.10@deprecated | [@react-native-oh-tpl/react-native-audio-recorder-player Releases(deprecated)](https://github.com/react-native-oh-library/react-native-audio-recorder-player/releases) | 0.72 | +| <= 3.6.10-0.0.2@deprecated | [@react-native-oh-tpl/react-native-audio-recorder-player Releases(deprecated)](https://github.com/react-native-oh-library/react-native-audio-recorder-player/releases) | 0.72 | | 3.6.11 | [@react-native-ohos/react-native-audio-recorder-player Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-audio-recorder-player/releases) | 0.72 | | 3.6.14 | [@react-native-ohos/react-native-audio-recorder-player Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-audio-recorder-player/releases) | 0.77 | @@ -527,7 +528,7 @@ This step provides guidance for manually configuring native dependencies. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. -### Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project +### Adding the overrides Field to `oh-package.json5 File` in the Root Directory of the Project ```json { @@ -548,8 +549,6 @@ Method 1 (recommended): Use the HAR file. Open `entry/oh-package.json5` file and add the following dependencies: -+ V3.6.11 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -573,6 +572,8 @@ Method 2: Directly link to the source code. ### Configuring CMakeLists and Introducing RNAudioRecorderPlayerPackage +> If you are using version <= 3.6.10-0.0.2, please skip this chapter. + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -630,7 +631,7 @@ std::vector> PackageProvider::getPackages(Package::Cont } ``` -### Introducing react-native-audio-recorder-player Package to ArkTS +### Introducing RNAudioRecorderPlayerPackage to ArkTS Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: @@ -664,12 +665,11 @@ Then build and run the code. To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -Please refer to the Releases page of the third-party library for the corresponding version information -| Third-party Library Version | Release Information | Supported RN Version | -| ---------- | ------------------------------------------------------------ | ---------- | -| 3.6.10@deprecated | [@react-native-oh-tpl/react-native-audio-recorder-player Releases(deprecated)](https://github.com/react-native-oh-library/react-native-audio-recorder-player/releases) | 0.72 | -| 3.6.11 | [@react-native-ohos/react-native-audio-recorder-player Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-audio-recorder-player/releases) | 0.72 | -| 3.6.14 | [@react-native-ohos/react-native-audio-recorder-player Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-audio-recorder-player/releases) | 0.77 | +Verified in the following versions. + +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ### Permission Requirements diff --git a/en/react-native-background-fetch.md b/en/react-native-background-fetch.md index 3042c3ddb6b09138e0ba0e298edc89596fcb03b5..1dabc129eeb6bfbae524b9d49ca73f8e5172d5a8 100644 --- a/en/react-native-background-fetch.md +++ b/en/react-native-background-fetch.md @@ -21,11 +21,11 @@ Please refer to the Releases page of the third-party library for the correspondi | Third-party Library Version | Release Information | Supported RN Version | | ---------- | ------------------------------------------------------------ | ---------- | -| 4.2.5@deprecated | [@react-native-oh-tpl/react-native-background-fetch Releases(deprecated)](https://github.com/react-native-oh-library/react-native-background-fetch/releases) | 0.72 | +| <= 4.2.5-0.0.2@deprecated | [@react-native-oh-tpl/react-native-background-fetch Releases(deprecated)](https://github.com/react-native-oh-library/react-native-background-fetch/releases) | 0.72 | | 4.2.6 | [@react-native-ohos/react-native-background-fetch Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-background-fetch/releases) | 0.72 | | 4.3.0 | [@react-native-ohos/react-native-background-fetch Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-background-fetch/releases) | 0.77 | -For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. +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: @@ -212,7 +212,7 @@ If this repository has been adapted to `Codegen`, generate the bridge code of th ## Link -Version >= @react-native-ohos/react-native-background-fetch@4.2.6 now supports Autolink without requiring manual configuration, currently only supports 72 frameworks. +Version >= @react-native-ohos/react-native-background-fetch@4.2.6 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 This step provides guidance for manually configuring native dependencies. @@ -262,7 +262,7 @@ Method 2: Directly link to the source code. ### Configure CMakeLists and import RNBackgroundFetchPackage -> [!TIP] If using version 4.2.6, please configure CMakeLists and import ShakePackge +> If you are using version <= 4.2.5-0.0.2, please skip this chapter. open `entry/src/main/cpp/CMakeLists.txt`,add: @@ -334,7 +334,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### Introducing RNBackgroundFetchExtensionAbility to ArkTS +### Introducing RNBackgroundFetchExtensionAbility to ArkTS(This module always requires manual configuration) 1. Open'entry/src/main/ets', create a new directory and ArkTS file, and create a new directory and name it WorkSchedulerExtension. In the WorkSchedulerExtension directory, create an ArkTS file and name it WorkSchedulerExtension.ets to implement the delayed task callback interface. @@ -388,11 +388,11 @@ Then build and run the code. To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -This document is verified based on the following versions: +Verified in the following versions. -1. RNOH: 0.72.27; SDK: HarmonyOS-Next-DB1 5.0.0.29(SP1); IDE: DevEco Studio 5.0.3.403; ROM: 3.0.0.25; -2. RNOH:0.72.33; SDK:OpenHarmony 5.0.0.71(API Version 12 Release); IDE:DevEco Studio 5.0.3.900; ROM:NEXT.0.0.71; -3. RNOH:0.77.18; SDK:HarmonyOS 5.1.1 Release; IDE: DevEco Studio 5.1.1.830; ROM:NEXT 5.1.0.150; +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## API diff --git a/en/react-native-camera-kit.md b/en/react-native-camera-kit.md index 593a774b6d369c633676b8e42c4e08788fcf73b3..275c25fd169921f61eacf8ece496ea504f62ab76 100644 --- a/en/react-native-camera-kit.md +++ b/en/react-native-camera-kit.md @@ -4,17 +4,19 @@

react-native-camera-kit

+> [!TIP] [Github address](https://github.com/react-native-oh-library/react-native-camera-kit) + +## Installation and Usage + Please refer to the Releases page of the third-party library for the corresponding version information: | Third-party Library Version | Release Information | Supported RN Version | | ---------- | ------------------------------------------------------------ | ---------- | -| 14.0.1@deprecated | [@react-native-oh-tpl/react-native-camera-kit Releases(deprecated)](https://github.com/react-native-oh-library/react-native-camera-kit/releases) | 0.72 | +| <= 14.0.1@deprecated | [@react-native-oh-tpl/react-native-camera-kit Releases(deprecated)](https://github.com/react-native-oh-library/react-native-camera-kit/releases) | 0.72 | | 14.0.2 | [@react-native-ohos/react-native-camera-kit Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-camera-kit/releases) | 0.72 | | 15.1.1 | [@react-native-ohos/react-native-camera-kit Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-camera-kit/releases) | 0.77 | -## Installation and Usage - -For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. +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: @@ -211,9 +213,9 @@ Method 2: Directly link to the source code. > [!TIP] For details, see [Directly Linking Source Code](/en/link-source-code.md). -### 3. Configuring CMakeLists and Introducing xxx Package +### 3. Introduce RTNCameraKitView component to ArkTs -Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: +Find `function buildCustomRNComponent()`, Generally located in `entry/src/main/ets/pages/index.ets ` or `entry/src/main/ets/rn/LoadBundle.ets`, add: ```diff ... @@ -231,17 +233,14 @@ export function buildCustomRNComponent(ctx: ComponentBuilderContext) { ... } ... -> [!TIP] If the repository uses a mixed solution, the component name needs to be added. +``` -Find the constant `arkTsComponentNames` in `entry/src/main/ets/pages/index.ets` or `entry/src/main/ets/rn/LoadBundle.ets` and add the component name to the array. +In `entry/src/main/ets/pages/index.ets`, if the `arkTsComponentNames` array (new in later versions) exists in the current file, add the following: `RTNCameraKitView.NAME` -​```diff -const arkTsComponentNames: Array = [ - SampleView.NAME, - GeneratedSampleView.NAME, - PropsDisplayer.NAME, -+ RTNCameraKitView.NAME - ]; +```ts + ... + const arkTsComponentNames: Array = [..., RTNCameraKitView.NAME]; + ... ``` ### 4. Introducing RTNCameraKitPackage to ArkTS @@ -260,7 +259,56 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 5. Running +### 5. Configuring CMakeLists and Introducing RTNCameraKitPackage + +> If you are using version <= 14.0.1, please skip this chapter. + +Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: + +```diff +... + +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") ++ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) + +# RNOH_END: manual_package_linking_1 +add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-camera-kit/src/main/cpp" ./camera_kit) +# 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_camera_kit) +# RNOH_BEGIN: manual_package_linking_2 +``` + +Open `entry/src/main/cpp/PackageProvider.cpp` and add the following code: + +```diff +#include "RNOH/PackageProvider.h" ++ #include "RNImageMarkerPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { ++ std::make_shared(ctx) +} +``` + +### 6. Running Click the `sync` button in the upper right corner. @@ -277,9 +325,13 @@ Then build and run the code. ### Compatibility -This document is verified based on the following versions: -1. RNOH:0.72.40; SDK:HarmonyOS NEXT Developer DB3; IDE: DevEco Studio: 5.0.5.220; ROM:NEXT.0.0.105; -2. RNOH:0.77.18; SDK:HarmonyOS 6.0.0 Release; IDE: DevEco Studio 6.0.0.858; ROM:6.0.0.112; +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. + +Verified in the following versions. + +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ### Permission Requirements diff --git a/en/react-native-community-checkbox.md b/en/react-native-community-checkbox.md index 73bc0b0f852218cd8fc82d9ada163419575f5970..bf983e9e7d272756a073f0007bce42c22a82504a 100644 --- a/en/react-native-community-checkbox.md +++ b/en/react-native-community-checkbox.md @@ -4,18 +4,19 @@

@react-native-community/checkbox

-This project is based on [@react-native-community/checkbox](https://github.com/react-native-checkbox/react-native-checkbox). +> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-checkbox) +## 1. Installation and Usage -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/checkbox`, The version correspondence details are as follows: +Please refer to the Releases page of the third-party library for the corresponding version information -| Version | Package Name | Repository | Release | Support RN version | -|----------------------------|---------------------------------|----------------------------------------------------------------------------------------| -------------------------- |--------------------| -| <= 0.5.16-0.1.0@deprecated | @react-native-oh-tpl/checkbox | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox/releases) | 0.72 | -| 0.5.17 | @react-native-ohos/checkbox | [Github](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox) | [Github Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox/releases) | 0.72 | -| 0.6.0 | @react-native-ohos/checkbox | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox) | [GitCode Releases]() | 0.77 | +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| <= 0.5.16-0.1.0@deprecated | [@react-native-oh-tpl/checkbox Releases(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox/releases) | 0.72 | +| 0.5.17 | [@react-native-ohos/checkbox Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox/releases) | 0.72 | +| 0.6.0 | [@react-native-ohos/checkbox Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox/releases) | 0.77 | -## 1. Installation and Usage +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: @@ -66,6 +67,9 @@ export default function CheckBoxExample() { ## 2. Manual Link +Version >= @react-native-ohos/checkbox@0.5.17 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 + This step provides guidance for manually configuring native dependencies. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -119,7 +123,9 @@ Method 2: Directly link to the source code. > [!TIP] For details, see [Directly Linking Source Code](/en/link-source-code.md). -### 2.3. Configuring CMakeLists and Introducing CheckboxPackge +### 2.3. Configuring CMakeLists and Introducing CheckboxPackage + +> If you are using version <= 0.5.16-0.1.0, please skip this chapter. Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: @@ -170,8 +176,6 @@ std::vector> PackageProvider::getPackages(Package::Cont ### 2.4. Introducing RNCCheckBoxPackage to ArkTS -> [!TIP] Required for version `v0.5.17` and above - Open `entry/src/main/ets/RNPackagesFactory.ts` and add: ```diff @@ -237,7 +241,13 @@ Then build and run the code. ### 3.1. Compatibility -Check the release version information in the release address of the third-party library: [@react-native-ohos/checkbox Releases](https://gitee.com/openharmony-sig/rntpc_react-native-checkbox/releases) +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. + +Verified in the following versions. + +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## 4. Properties diff --git a/en/react-native-create-thumbnail.md b/en/react-native-create-thumbnail.md index d8873bdca8a8d14f46e68dd12d7b96e8b60cea6f..f2c3baac26b09310722b40b092eca0371fc95003 100644 --- a/en/react-native-create-thumbnail.md +++ b/en/react-native-create-thumbnail.md @@ -22,10 +22,13 @@ Please refer to the Releases page of the third-party library for the correspondi | Third-party Library Version | Release Information | Supported RN Version | |-------| ------------------------------------------------------------ | ---------- | -| 2.0.0@deprecated | [@react-native-oh-tpl/react-native-create-thumbnail Releases(deprecated)](https://github.com/react-native-oh-library/react-native-create-thumbnail/releases) | 0.72 | +| <= 2.0.0-0.0.4@deprecated | [@react-native-oh-tpl/react-native-create-thumbnail Releases(deprecated)](https://github.com/react-native-oh-library/react-native-create-thumbnail/releases) | 0.72 | | 2.0.1 | [@react-native-ohos/react-native-create-thumbnail Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-create-thumbnail/releases) | 0.72 | | 2.1.0 | [@react-native-ohos/react-native-create-thumbnail Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-create-thumbnail/releases) | 0.77 | +For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. + +Go to the project directory and execute the following instruction: @@ -212,9 +215,9 @@ ohpm install --no-link ### 3.Configure CMakeLists and include CreateThumbnailPackage -> [!TIP] If you are using version 2.0.0, please skip this chapter. +> If you are using version <= 2.0.0-0.0.4, please skip this chapter. -打开 `entry/src/main/cpp/CMakeLists.txt`,添加: +Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff project(rnapp) @@ -252,7 +255,7 @@ target_link_libraries(rnoh_app PUBLIC rnoh_sample_package) # RNOH_END: manual_package_linking_2 ``` -打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: +Open `entry/src/main/cpp/PackageProvider.cpp` and add the following code: ```diff #include "RNOH/PackageProvider.h" @@ -304,10 +307,13 @@ Then build and run the code. ### Compatibility -The content of this document has been validated based on the following version: +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. + +Verified in the following versions. -1. RNOH:0.72.33; SDK:HarmonyOS 5.1.0.150 (API Version 12); IDE:DevEco Studio 5.1.1.830; ROM:5.1.0.150; -2. RNOH:0.77.18; SDK:HarmonyOS 5.1.0.150 (API Version 12); IDE:DevEco Studio 5.1.1.830; ROM:5.1.0.150; +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## API diff --git a/en/react-native-device-info.md b/en/react-native-device-info.md index 25ebf875cb53b6ec76c592a95a407e035a0b1af0..a316937ba0366baf3efe16c9ecaaef78817587d7 100644 --- a/en/react-native-device-info.md +++ b/en/react-native-device-info.md @@ -12,18 +12,20 @@

-This project is based on [react-native-device-info](https://github.com/react-native-device-info/react-native-device-info). +> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-device-info) -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-device-info`, The version correspondence details are as follows: -| Version | Package Name | Repository | Release |Support RN version| -|-------------------|-----------------------------------------------|---------------------------------------------------------------------------------| -------------------------- |-------------------| -| 11.1.0@deprecated | @react-native-oh-tpl/react-native-device-info | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-device-info) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-device-info/releases) |0.72 | -| 11.1.1 | @react-native-ohos/react-native-device-info | [Gitcode](https://gitcode.com/openharmony-sig/rntpc_react-native-device-info) | [Github Releases](https://github.com/react-native-oh-library/react-native-device-info/releases) |0.72 | -| 14.0.5 | @react-native-ohos/react-native-device-info | [Gitcode](https://gitcode.com/openharmony-sig/rntpc_react-native-device-info) | [GitCode Releases]() |0.77 | +## Installation and Usage +Please refer to the Releases page of the third-party library for the corresponding version information -## Installation and Usage +| Third-party Library Version | Release Information | Supported RN Version | +|-------| ------------------------------------------------------------ | ---------- | +| <= 11.1.0-0.0.8@deprecated | [@react-native-oh-tpl/react-native-device-info Releases(deprecated)](https://github.com/react-native-oh-library/react-native-device-info/releases) | 0.72 | +| 11.1.1 | [@react-native-ohos/react-native-device-info Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-device-info/releases) | 0.72 | +| 14.0.5 | [@react-native-ohos/react-native-device-info Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-device-info/releases) | 0.77 | + +For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -159,11 +161,15 @@ export default App; ``` ## Use Codegen -This repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/en/codegen.md). +Version >= @react-native-ohos/react-native-device-info@11.1.1, compatible with codegen-lib for generating bridge code. + +If this repository has been adapted to `Codegen`, generate the bridge code of the third-party library by using the `Codegen`. For details, see [Codegen Usage Guide](/en/codegen.md). ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-device-info@11.1.1 now supports Autolink without requiring manual configuration, currently only supports 72 frameworks. Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +This step provides guidance for manually configuring native dependencies. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -209,7 +215,9 @@ Method 2: Directly link to the source code. > [!TIP] For details, see [Directly Linking Source Code](/en/link-source-code.md). -### 3.Configuring CMakeLists +### 3.Configuring CMakeLists and Introducing RNDeviceInfoPackage + +> If you are using version <= 11.1.0-0.0.8, please skip this chapter. Open `entry/src/main/cpp/CMakeLists.txt` and add the following code @@ -229,7 +237,7 @@ add_library(rnoh_app SHARED "./PackageProvider.cpp" "${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp" ) -+ target_link_libraries(rnoh_app PUBLIC device_info) ++ target_link_libraries(rnoh_app PUBLIC rnoh_device_info) ``` Open `entry/src/main/cpp/PackageProvider.cpp` and add the following code: @@ -247,7 +255,7 @@ std::vector> PackageProvider::getPackages(Package::Cont std::make_shared(ctx), + std::make_shared(ctx), }; - +} ``` ### 4. Introducing RNDeviceInfoPackage to ArkTS @@ -285,8 +293,11 @@ Then build and run the code. To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -1. RNOH: 0.72.27; SDK: HarmonyOS 5.1.1 Release SDK; IDE: DevEco Studio 5.1.1 Release; ROM: 5.0.1.120; -2. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +Verified in the following versions. + +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ### Permission Requirements diff --git a/en/react-native-document-picker.md b/en/react-native-document-picker.md index c51b86e82b2848e04b1a8ec9b215e02c34e6455b..229275b85ecf904b7bf4d2e34f5529b7b2574eaf 100644 --- a/en/react-native-document-picker.md +++ b/en/react-native-document-picker.md @@ -12,11 +12,11 @@ Please refer to the Releases page of the third-party library for the correspondi | Third-party Library Version | Release Information | Supported RN Version | | ---------- | ------------------------------------------------------------ | ---------- | -| 9.2.0@deprecated | [@react-native-oh-tpl/react-native-document-picker Releases(deprecated)](https://github.com/react-native-oh-library/document-picker/releases) | 0.72 | +| <= 9.2.0-0.0.2@deprecated | [@react-native-oh-tpl/react-native-document-picker Releases(deprecated)](https://github.com/react-native-oh-library/document-picker/releases) | 0.72 | | 9.2.2 | [@react-native-ohos/react-native-document-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-document-picker/releases) | 0.72 | | 9.3.2 | [@react-native-ohos/react-native-document-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-document-picker/releases) | 0.77 | -For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. +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: @@ -370,7 +370,7 @@ Method 2: Directly link to the source code. ### 2.3 Configuring CMakeLists and Introducing DocumentPickerPackage -> **[!TIP] Version v9.2.0 and above requires.** +> If you are using version <= 9.2.0-0.0.2, please skip this chapter. Open entry/src/main/cpp/CMakeLists.txt and add the following code: @@ -433,13 +433,13 @@ Then build and run the code. ## 3. Constraints ### 3.1 Compatibility -Please refer to the Releases page of the third-party library for the corresponding version information +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. -| Third-party Library Version | Release Information | Supported RN Version | -| ---------- | ------------------------------------------------------------ | ---------- | -| 9.2.0@deprecated | [@react-native-oh-tpl/react-native-document-picker Releases(deprecated)](https://github.com/react-native-oh-library/document-picker/releases) | 0.72 | -| 9.2.2 | [@react-native-ohos/react-native-document-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-document-picker/releases) | 0.72 | -| 9.3.2 | [@react-native-ohos/react-native-document-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-document-picker/releases) | 0.77 | +Verified in the following versions. + +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## 4. Properties diff --git a/en/react-native-file-viewer.md b/en/react-native-file-viewer.md index 88e6a9e38609b09132473ba7b071c1f6ae52cb01..4eb9ab25dcddf70d0b397c2c9b7a178c13529f18 100644 --- a/en/react-native-file-viewer.md +++ b/en/react-native-file-viewer.md @@ -15,16 +15,17 @@ > [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-file-viewer) -The repository of this third-party library has been migrated to Gitcode and supports direct download from npm. The new package name is: @react-native-ohos/react-native-file-viewer. The specific version relationships are as follows: +## Installation and Usage + +Please refer to the Releases page of the third-party library for the corresponding version information | Third-party Library Version | Release Information | Supported RN Version | -|-------| ------------------------------------------------------------ | ---------- | -| 2.1.6@deprecated | [@react-native-oh-tpl/react-native-file-viewer Releases(deprecated)](https://github.com/react-native-oh-library/react-native-file-viewer/releases) | 0.72 | +| ---------- | ------------------------------------------------------------ | ---------- | +| <= 2.1.6@deprecated | [@react-native-oh-tpl/react-native-file-viewer Releases(deprecated)](https://github.com/react-native-oh-library/react-native-file-viewer/releases) | 0.72 | | 2.1.7 | [@react-native-ohos/react-native-file-viewer Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-file-viewer/releases) | 0.72 | | 2.2.0 | [@react-native-ohos/react-native-file-viewer Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-file-viewer/releases) | 0.77 | - -## Installation and Usage +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: @@ -216,12 +217,10 @@ Method 2: Directly link to the source code. ### 3.configuring CMakeLists and introducing FileViewerPackage -> [!TIP] If you are using a RN0.72 project, please skip this chapter. +> If you are using version <= 2.1.6, please skip this chapter. Open `entry/src/main/cpp/CMakeLists.txt`,add: - -### 3. in ArkTs import RNFileViewerPackage ```cmake project(rnapp) cmake_minimum_required(VERSION 3.4.1) @@ -278,7 +277,7 @@ std::vector> PackageProvider::getPackages(Package::Cont ``` -### 3. Introducing RNFileViewerTurboModule Package to ArkTS +### 4. Introducing RNFileViewerTurboModule Package to ArkTS Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: @@ -311,10 +310,13 @@ Then build and run the code. ### Compatibility -This document is verified based on the following versions: +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. + +Verified in the following versions. -1. RNOH: 0.72.33; SDK: OpenHarmony 5.0.0.71 (API Version 12 Release); IDE: DevEco Studio 5.0.3.900; ROM: NEXT.0.0.71; -2. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.868; ROM: 6.0.0.112; +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## API diff --git a/en/remobile-react-native-toast.md b/en/remobile-react-native-toast.md index cc662500465db504361aa918247ed81a0ebf5b8a..8220792592295dc6730f286fb23e1c26c9279ec0 100644 --- a/en/remobile-react-native-toast.md +++ b/en/remobile-react-native-toast.md @@ -4,20 +4,19 @@

@remobile/react-native-toast

-This project is developed based on [react-native-toast@1.0.7](https://github.com/remobile/react-native-toast). +> [!TIP] [GitHub address](https://github.com/react-native-oh-library/react-native-toast). -Please refer to the Releases page of the third-party library for the corresponding version information: - -| Version | Package Name | Repository | Release | RN Version | -| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ---------- | -|1.0.7@deprecated | @react-native-oh-tpl/react-native-toast | [Github](https://github.com/react-native-oh-library/react-native-toast) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-toast/releases) | 0.72 | -| 1.0.8 | @react-native-ohos/react-native-toast | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-toast) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-toast/releases) | 0.72 | -| 1.1.0 | @react-native-ohos/react-native-toast | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-toast) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-toast/releases) | 0.77 | +## Installation and Usage -For older versions not published on npm, please refer to the [Installation Guide](/zh-cn/tgz-usage.md) to install the tgz package. +Please refer to the Releases page of the third-party library for the corresponding version information -## Installation and Usage +| Third-party Library Version | Release Information | Supported RN Version | +| ---------- | ------------------------------------------------------------ | ---------- | +| <= 1.0.7-0.0.3@deprecated | [@react-native-oh-tpl/react-native-toast Releases(deprecated)](https://github.com/react-native-oh-library/react-native-toast/releases) | 0.72 | +| 1.0.8 | [@react-native-ohos/react-native-toast Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-toast/releases) | 0.72 | +| 1.1.0 | [@react-native-ohos/react-native-toast Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-toast/releases) | 0.77 | +For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -102,7 +101,7 @@ export default ToastMasterDemo; ## Use Codegen -> [!TIP] V1.0.8 no need to execute Codegen +Version >= @react-native-ohos/react-native-toast@1.0.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). @@ -173,7 +172,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ### 4. Configure CMakeLists and import ToastPackage -> [!TIP] If using version 1.0.7, please skip this chapter +> If you are using version <= 1.0.7-0.0.3, please skip this chapter. open `entry/src/main/cpp/CMakeLists.txt`,add: @@ -195,7 +194,8 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) -+ add_subdirectory("${OH_MODULES}/@react-native-ohos/voice/src/main/cpp" ./voice) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-toast/src/main/cpp" ./toast) + # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -209,7 +209,7 @@ 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_voice) ++ target_link_libraries(rnoh_app PUBLIC rn_toast) # RNOH_END: manual_package_linking_2 ``` @@ -219,7 +219,7 @@ open `entry/src/main/cpp/PackageProvider.cpp`,add: #include "RNOH/PackageProvider.h" #include "generated/RNOHGeneratedPackage.h" #include "SamplePackage.h" -+ #include "VoicePackage.h" ++ #include "ToastPackage.h" using namespace rnoh; @@ -227,7 +227,7 @@ std::vector> PackageProvider::getPackages(Package::Cont return { std::make_shared(ctx), std::make_shared(ctx), -+ std::make_shared(ctx) ++ std::make_shared(ctx), }; } ``` @@ -249,10 +249,13 @@ Then build and run the code. ### Compatibility -This document content has been verified against the following environments: +To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. + +Verified in the following versions. -1. RNOH: 0.72.33; SDK: OpenHarmony 5.0.0.71(API Version 12 Release); IDE: DevEco Studio 5.0.3.900; ROM: NEXT.0.0.71; -2. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.868; ROM: 6.0.0.112; +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## API diff --git a/zh-cn/klarna-platform-colors.md b/zh-cn/klarna-platform-colors.md index 42b211d372a128a49564fe773191086361dcd6a3..b0ad34654e85b91606696ce42d1b054686af8c90 100644 --- a/zh-cn/klarna-platform-colors.md +++ b/zh-cn/klarna-platform-colors.md @@ -21,7 +21,7 @@ | 三方库版本 | 发布信息 | 支持RN版本 | |--------| ------------------------------------------------------------ | ---------- | -| 0.4.0@deprecated | [@react-native-oh-tpl/platform-colors Releases(deprecated)](https://github.com/react-native-oh-library/platform-colors/releases) | 0.72 | +| <= 0.4.0-0.0.1@deprecated | [@react-native-oh-tpl/platform-colors Releases(deprecated)](https://github.com/react-native-oh-library/platform-colors/releases) | 0.72 | | 0.4.1 | [@react-native-ohos/platform-colors Releases](https://gitcode.com/openharmony-sig/rntpc_platform-colors/releases) | 0.72 | | 0.5.0 | [@react-native-ohos/platform-colors Releases](https://gitcode.com/openharmony-sig/rntpc_platform-colors/releases) | 0.77 | @@ -253,7 +253,69 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.运行 +### 4.配置 CMakeLists 和引入 RNPlatformColorsPackage + +> 若使用的是 <= 0.4.0-0.0.1 版本,请跳过本章。 + +打开 `entry/src/main/cpp/CMakeLists.txt`,添加: + +```diff +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") ++ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") +set(LOG_VERBOSITY_LEVEL 1) +set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") +set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") +set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use +add_compile_definitions(WITH_HITRACE_SYSTRACE) + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) + +# RNOH_BEGIN: manual_package_linking_1 +add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/platform-colors/src/main/cpp" ./platform_colors) + +# RNOH_END: manual_package_linking_1 + +file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") + +add_library(rnoh_app SHARED + ${GENERATED_CPP_FILES} + "./PackageProvider.cpp" + "${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp" +) +target_link_libraries(rnoh_app PUBLIC rnoh) + +# RNOH_BEGIN: manual_package_linking_2 +target_link_libraries(rnoh_app PUBLIC rnoh_sample_package) ++ target_link_libraries(rnoh_app PUBLIC rnoh_platform_colors) +# RNOH_END: manual_package_linking_2 +``` + +打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: + +```diff +#include "RNOH/PackageProvider.h" +#include "generated/RNOHGeneratedPackage.h" +#include "SamplePackage.h" ++ #include "RNPlatformColorsPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { + std::make_shared(ctx), + std::make_shared(ctx), ++ std::make_shared(ctx) + }; +} +``` + +### 5.运行 点击右上角的 `sync` 按钮 @@ -272,13 +334,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库的 Releases 发布地址查看配套的版本信息: +在以下版本验证通过: -| 三方库版本 | 发布信息 | 支持RN版本 | -|--------| ------------------------------------------------------------ | ---------- | -| 0.4.0@deprecated | [@react-native-oh-tpl/platform-colors Releases(deprecated)](https://github.com/react-native-oh-library/platform-colors/releases) | 0.72 | -| 0.4.1 | [@react-native-ohos/platform-colors Releases](https://gitcode.com/openharmony-sig/rntpc_platform-colors/releases) | 0.72 | -| 0.5.0 | [@react-native-ohos/platform-colors Releases](https://gitcode.com/openharmony-sig/rntpc_platform-colors/releases) | 0.77 | +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## 属性 diff --git a/zh-cn/react-native-audio-recorder-player.md b/zh-cn/react-native-audio-recorder-player.md index d233ba9c551be0693009b6111db185cc0253ee65..2684d909bba3a50981085d99530221457233683a 100644 --- a/zh-cn/react-native-audio-recorder-player.md +++ b/zh-cn/react-native-audio-recorder-player.md @@ -17,9 +17,10 @@ ## 安装与使用 请到三方库的 Releases 发布地址查看配套的版本信息: + | 三方库版本 | 发布信息 | 支持RN版本 | | ---------- | ------------------------------------------------------------ | ---------- | -| 3.6.10@deprecated | [@react-native-oh-tpl/react-native-audio-recorder-player Releases(deprecated)](https://github.com/react-native-oh-library/react-native-audio-recorder-player/releases) | 0.72 | +| <= 3.6.10-0.0.2@deprecated | [@react-native-oh-tpl/react-native-audio-recorder-player Releases(deprecated)](https://github.com/react-native-oh-library/react-native-audio-recorder-player/releases) | 0.72 | | 3.6.11 | [@react-native-ohos/react-native-audio-recorder-player Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-audio-recorder-player/releases) | 0.72 | | 3.6.14 | [@react-native-ohos/react-native-audio-recorder-player Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-audio-recorder-player/releases) | 0.77 | @@ -518,8 +519,7 @@ export default Page; ``` ## Link -Version > @react-native-ohos/react-native-audio-recorder-player@3.6.11,已支持 Autolink,无需手动配置,目前只支持72框架。 -Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +Version >= @react-native-ohos/react-native-audio-recorder-player@3.6.11,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md 此步骤为手动配置原生依赖项的指导。 @@ -535,6 +535,7 @@ Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_nati } } ``` + ### 引入原生端代码 目前有两种方法: @@ -569,6 +570,8 @@ ohpm install ### 配置 CMakeLists 和引入 RNAudioRecorderPlayerPackage +> 若使用的是 <= 3.6.10-0.0.2 版本,请跳过本章。 + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -625,7 +628,8 @@ std::vector> PackageProvider::getPackages(Package::Cont }; } ``` -### 在 ArkTs 侧引入 react-native-audio-recorder-player Package + +### 在 ArkTs 侧引入 RNAudioRecorderPlayerPackage 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: @@ -639,6 +643,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` + ### 运行 点击右上角的 `sync` 按钮 @@ -657,13 +662,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 3.6.10@deprecated | [@react-native-oh-tpl/react-native-audio-recorder-player Releases(deprecated)](https://github.com/react-native-oh-library/react-native-audio-recorder-player/releases) | 0.72 | -| 3.6.11 | [@react-native-ohos/react-native-audio-recorder-player Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-audio-recorder-player/releases) | 0.72 | -| 3.6.14 | [@react-native-ohos/react-native-audio-recorder-player Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-audio-recorder-player/releases) | 0.77 | +在以下版本验证通过: +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ### 权限要求 diff --git a/zh-cn/react-native-background-fetch.md b/zh-cn/react-native-background-fetch.md index 65e99e5e221886b81e699d2432de397161410a8d..71340d311d4f99a3c4b587ba3d149d673fb01aab 100644 --- a/zh-cn/react-native-background-fetch.md +++ b/zh-cn/react-native-background-fetch.md @@ -21,7 +21,7 @@ | 三方库版本 | 发布信息 | 支持RN版本 | | ---------- | ------------------------------------------------------------ | ---------- | -| 4.2.5@deprecated | [@react-native-oh-tpl/react-native-background-fetch Releases(deprecated)](https://github.com/react-native-oh-library/react-native-background-fetch/releases) | 0.72 | +| <= 4.2.5-0.0.2@deprecated | [@react-native-oh-tpl/react-native-background-fetch Releases(deprecated)](https://github.com/react-native-oh-library/react-native-background-fetch/releases) | 0.72 | | 4.2.6 | [@react-native-ohos/react-native-background-fetch Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-background-fetch/releases) | 0.72 | | 4.3.0 | [@react-native-ohos/react-native-background-fetch Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-background-fetch/releases) | 0.77 | @@ -212,7 +212,7 @@ Version >= @react-native-ohos/react-native-background-fetch@4.2.6,已适配cod ## Link -Version >= @react-native-ohos/react-native-background-fetch@4.2.6,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +Version >= @react-native-ohos/react-native-background-fetch@4.2.6,已支持 Autolink,无需手动配置(仍需手动配置的内容已在对应标题处标记),目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md 此步骤为手动配置原生依赖项的指导。 @@ -264,7 +264,7 @@ ohpm install ### 配置 CMakeLists 和引入 RNBackgroundFetchPackage -> [!TIP] V4.2.6 需要配置CMakeLists 和引入 RNBackgroundFetchPackage。 +> 若使用的是 <= 4.2.5-0.0.2 版本,请跳过本章。 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: @@ -336,7 +336,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 在 ArkTs 侧引入 RNBackgroundFetchExtensionAbility +### 在 ArkTs 侧引入 RNBackgroundFetchExtensionAbility(该模块始终需要手动配置) 1. 打开 `entry/src/main/ets`,新建目录及 ArkTS 文件,新建一个目录并命名为 WorkSchedulerExtension。在 WorkSchedulerExtension 目录下,新建一个 ArkTS 文件并命名为 WorkSchedulerExtension.ets,用以实现延迟任务回调接口。 @@ -392,11 +392,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -本文档内容基于以下版本验证通过: +在以下版本验证通过: -1. RNOH: 0.72.27; SDK: HarmonyOS-Next-DB1 5.0.0.29(SP1); IDE: DevEco Studio 5.0.3.403; ROM: 3.0.0.25; -2. RNOH:0.72.33; SDK:OpenHarmony 5.0.0.71(API Version 12 Release); IDE:DevEco Studio 5.0.3.900; ROM:NEXT.0.0.71; -3. RNOH:0.77.18; SDK:HarmonyOS 5.1.1 Release; IDE: DevEco Studio 5.1.1.830; ROM:NEXT 5.1.0.150; +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## API diff --git a/zh-cn/react-native-camera-kit.md b/zh-cn/react-native-camera-kit.md index f9a75ca2c160f85e402f99f126155b08e76ef94a..3035bd0ccccfa2be1129a15fba20e31a0bdf46b1 100644 --- a/zh-cn/react-native-camera-kit.md +++ b/zh-cn/react-native-camera-kit.md @@ -4,16 +4,18 @@

react-native-camera-kit

+> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-camera-kit) + +## 安装与使用 + 请到三方库的 Releases 发布地址查看配套的版本信息: | 三方库版本 | 发布信息 | 支持RN版本 | | ---------- | ------------------------------------------------------------ | ---------- | -| 14.0.1@deprecated | [@react-native-oh-tpl/react-native-camera-kit Releases(deprecated)](https://github.com/react-native-oh-library/react-native-camera-kit/releases) | 0.72 | +| <= 14.0.1@deprecated | [@react-native-oh-tpl/react-native-camera-kit Releases(deprecated)](https://github.com/react-native-oh-library/react-native-camera-kit/releases) | 0.72 | | 14.0.2 | [@react-native-ohos/react-native-camera-kit Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-camera-kit/releases) | 0.72 | | 15.1.1 | [@react-native-ohos/react-native-camera-kit Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-camera-kit/releases) | 0.77 | -## 安装与使用 - 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -258,7 +260,56 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 5.运行 +### 5.配置 CMakeLists 和引入 RTNCameraKitPackage + +> 若使用的是 <= 14.0.1 版本,请跳过本章。 + +打开 `entry/src/main/cpp/CMakeLists.txt`,添加: + +```diff +... + +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") ++ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) + +# RNOH_END: manual_package_linking_1 +add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-camera-kit/src/main/cpp" ./camera_kit) +# 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_camera_kit) +# RNOH_BEGIN: manual_package_linking_2 +``` + +打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: + +```diff +#include "RNOH/PackageProvider.h" ++ #include "RNImageMarkerPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { ++ std::make_shared(ctx) +} +``` + +### 6.运行 点击右上角的 `sync` 按钮 @@ -275,9 +326,13 @@ ohpm install ### 兼容性 -本文档内容基于以下版本验证通过: -1. RNOH:0.72.40; SDK:HarmonyOS NEXT Developer DB3; IDE: DevEco Studio: 5.0.5.220; ROM:NEXT.0.0.105; -2. RNOH:0.77.18; SDK:HarmonyOS 6.0.0 Release; IDE: DevEco Studio 6.0.0.858; ROM:6.0.0.112; +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +在以下版本验证通过: + +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ### 权限要求 diff --git a/zh-cn/react-native-community-checkbox.md b/zh-cn/react-native-community-checkbox.md index e153851cdee7d0dabce8455636e097806df823f8..8db3ad17aa61885623f670476b55ab0e4bd1a940 100644 --- a/zh-cn/react-native-community-checkbox.md +++ b/zh-cn/react-native-community-checkbox.md @@ -4,18 +4,19 @@

@react-native-community/checkbox

-本项目基于 [@react-native-community/checkbox](https://github.com/react-native-checkbox/react-native-checkbox) 开发。 +> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-checkbox) +## 1. 安装与使用 -该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/checkbox`,具体版本所属关系如下: +请到三方库的 Releases 发布地址查看配套的版本信息: -| Version | Package Name | Repository | Release | Support RN version | -|----------------------------|------------------------------| ------------------ | -------------------------- |--------------------| -| <= 0.5.16-0.1.0@deprecated | @react-native-oh-tpl/checkbox | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox/releases) | 0.72 | -| 0.5.17 | @react-native-ohos/checkbox | [Github](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox) | [Github Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox/releases) | 0.72 | -| 0.6.0 | @react-native-ohos/checkbox | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox) | [GitCode Releases]() | 0.77 | +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| <= 0.5.16-0.1.0@deprecated | [@react-native-oh-tpl/checkbox Releases(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox/releases) | 0.72 | +| 0.5.17 | [@react-native-ohos/checkbox Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox/releases) | 0.72 | +| 0.6.0 | [@react-native-ohos/checkbox Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox/releases) | 0.77 | -## 1. 安装与使用 +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -66,6 +67,8 @@ export default function CheckBoxExample() { ## 2. Manual Link +Version >= @react-native-ohos/checkbox@0.5.17,已支持 Autolink,无需手动配置,目前只支持72框架。 Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + 此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 @@ -119,7 +122,9 @@ ohpm install > [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) -### 2.3. 配置 CMakeLists 和引入 CheckboxPackge +### 2.3. 配置 CMakeLists 和引入 CheckboxPackage + +> 若使用的是 <= 0.5.16-0.1.0 版本,请跳过本章。 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: @@ -169,7 +174,6 @@ std::vector> PackageProvider::getPackages(Package::Cont ``` ### 2.4. 在 ArkTs 侧引入 RNCCheckBoxPackage -> [!TIP] 版本 v0.5.17 及以上需要 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: @@ -238,7 +242,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-ohos/checkbox Releases](https://gitee.com/openharmony-sig/rntpc_react-native-checkbox/releases) +在以下版本验证通过: + +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## 4. 属性 diff --git a/zh-cn/react-native-create-thumbnail.md b/zh-cn/react-native-create-thumbnail.md index 4c543217479e9df27517614ffd099e9f9ab4c9de..1fb4a99b6a6a63e8401acce15014f96702f2807d 100644 --- a/zh-cn/react-native-create-thumbnail.md +++ b/zh-cn/react-native-create-thumbnail.md @@ -22,7 +22,7 @@ | 三方库版本 | 发布信息 | 支持RN版本 | |-------| ------------------------------------------------------------ | ---------- | -| 2.0.0@deprecated | [@react-native-oh-tpl/react-native-create-thumbnail Releases(deprecated)](https://github.com/react-native-oh-library/react-native-create-thumbnail/releases) | 0.72 | +| <= 2.0.0-0.0.4@deprecated | [@react-native-oh-tpl/react-native-create-thumbnail Releases(deprecated)](https://github.com/react-native-oh-library/react-native-create-thumbnail/releases) | 0.72 | | 2.0.1 | [@react-native-ohos/react-native-create-thumbnail Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-create-thumbnail/releases) | 0.72 | | 2.1.0 | [@react-native-ohos/react-native-create-thumbnail Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-create-thumbnail/releases) | 0.77 | @@ -222,7 +222,7 @@ ohpm install --no-link ### 3.配置 CMakeLists 和引入 CreateThumbnailPackage -> [!TIP] 若使用的是 2.0.0 版本,请跳过本章。 +> 若使用的是 <= 2.0.0-0.0.4 版本,请跳过本章。 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: @@ -314,10 +314,13 @@ ohpm install ### 兼容性 -本文档内容基于以下版本验证通过: +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -1. RNOH:0.72.33; SDK:HarmonyOS 5.1.0.150 (API Version 12); IDE:DevEco Studio 5.1.1.830; ROM:5.1.0.150; -2. RNOH:0.77.18; SDK:HarmonyOS 5.1.0.150 (API Version 12); IDE:DevEco Studio 5.1.1.830; ROM:5.1.0.150; +在以下版本验证通过: + +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## API diff --git a/zh-cn/react-native-device-info.md b/zh-cn/react-native-device-info.md index 5142ae48d893552308ca4b552a2392b0d1047219..7df3fec879c3dff929481d33ff100ae010378dfd 100644 --- a/zh-cn/react-native-device-info.md +++ b/zh-cn/react-native-device-info.md @@ -12,18 +12,19 @@

-本项目基于 [react-native-device-info](https://github.com/react-native-device-info/react-native-device-info) 开发。 +> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-device-info) -该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/react-native-device-info`,具体版本所属关系如下: +## 安装与使用 -| Version | Package Name | Repository | Release |Support RN version| -|-------------------|-----------------------------------------------|---------------------------------------------------------------------------------| -------------------------- |-------------------| -| 11.1.0@deprecated | @react-native-oh-tpl/react-native-device-info | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-device-info) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-device-info/releases) |0.72 | -| 11.1.1 | @react-native-ohos/react-native-device-info | [Gitcode](https://gitcode.com/openharmony-sig/rntpc_react-native-device-info) | [Github Releases](https://github.com/react-native-oh-library/react-native-device-info/releases) |0.72 | -| 14.0.5 | @react-native-ohos/react-native-device-info | [Gitcode](https://gitcode.com/openharmony-sig/rntpc_react-native-device-info) | [GitCode Releases]() |0.77 | +请到三方库的 Releases 发布地址查看配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +|-------| ------------------------------------------------------------ | ---------- | +| <= 11.1.0-0.0.8@deprecated | [@react-native-oh-tpl/react-native-device-info Releases(deprecated)](https://github.com/react-native-oh-library/react-native-device-info/releases) | 0.72 | +| 11.1.1 | [@react-native-ohos/react-native-device-info Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-device-info/releases) | 0.72 | +| 14.0.5 | [@react-native-ohos/react-native-device-info Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-device-info/releases) | 0.77 | -## 安装与使用 +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -214,7 +215,9 @@ ohpm install > [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) -### 3.配置 CMakeLists +### 3.配置 CMakeLists 和引入 RNDeviceInfoPackage + +> 若使用的是 <= 11.1.0-0.0.8 版本,请跳过本章。 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: @@ -234,7 +237,7 @@ add_library(rnoh_app SHARED "./PackageProvider.cpp" "${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp" ) -+ target_link_libraries(rnoh_app PUBLIC device_info) ++ target_link_libraries(rnoh_app PUBLIC rnoh_device_info) ``` 打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: @@ -252,7 +255,7 @@ std::vector> PackageProvider::getPackages(Package::Cont std::make_shared(ctx), + std::make_shared(ctx), }; - +} ``` ### 4.在 ArkTs 侧引入 RNDeviceInfoPackage @@ -290,8 +293,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -1. RNOH: 0.72.27; SDK: HarmonyOS 5.1.1 Release SDK; IDE: DevEco Studio 5.1.1 Release; ROM: 5.0.1.120; -2. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +在以下版本验证通过: + +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ### 权限要求 diff --git a/zh-cn/react-native-document-picker.md b/zh-cn/react-native-document-picker.md index df76dcf499018ff31f4276d78e5a18e610aefba4..8f89f125f68ba88e16bc73f968280cfd0a42eba2 100644 --- a/zh-cn/react-native-document-picker.md +++ b/zh-cn/react-native-document-picker.md @@ -12,7 +12,7 @@ | 三方库版本 | 发布信息 | 支持RN版本 | |--------| ------------------------------------------------------------ | ---------- | -| 9.2.0@deprecated | [@react-native-oh-tpl/react-native-document-picker Releases(deprecated)](https://github.com/react-native-oh-library/document-picker/releases) | 0.72 | +| <= 9.2.0-0.0.2@deprecated | [@react-native-oh-tpl/react-native-document-picker Releases(deprecated)](https://github.com/react-native-oh-library/document-picker/releases) | 0.72 | | 9.2.2 | [@react-native-ohos/react-native-document-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-document-picker/releases) | 0.72 | | 9.3.2 | [@react-native-ohos/react-native-document-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-document-picker/releases) | 0.77 | @@ -309,7 +309,7 @@ ohpm install ### 2.3 配置 CMakeLists 和引入 DocumentPickerPackage -> **[!TIP] 版本 v9.2.0 及以上需要.** +> 若使用的是 <= 9.2.0-0.0.2 版本,请跳过本章。 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: @@ -372,13 +372,13 @@ ohpm install ## 3. 约束与限制 ### 3.1 兼容性 -请到三方库的 Releases 发布地址查看配套的版本信息: +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -| 三方库版本 | 发布信息 | 支持RN版本 | -|--------| ------------------------------------------------------------ | ---------- | -| 9.2.0@deprecated | [@react-native-oh-tpl/react-native-document-picker Releases(deprecated)](https://github.com/react-native-oh-library/document-picker/releases) | 0.72 | -| 9.2.2 | [@react-native-ohos/react-native-document-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-document-picker/releases) | 0.72 | -| 9.3.2 | [@react-native-ohos/react-native-document-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-document-picker/releases) | 0.77 | +在以下版本验证通过: + +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## 4. 属性 diff --git a/zh-cn/react-native-file-viewer.md b/zh-cn/react-native-file-viewer.md index 1f638d954b80333df7b04a25cb6e8208327626fb..bf5034cdba85157316e0832fdeab46b00e3b8ec3 100644 --- a/zh-cn/react-native-file-viewer.md +++ b/zh-cn/react-native-file-viewer.md @@ -15,16 +15,17 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-file-viewer) -该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:@react-native-ohos/react-native-file-viewer,具体版本所属关系如下: +## 安装与使用 + +请到三方库的 Releases 发布地址查看配套的版本信息: | 三方库版本 | 发布信息 | 支持RN版本 | |-------| ------------------------------------------------------------ | ---------- | -| 2.1.6@deprecated | [@react-native-oh-tpl/react-native-file-viewer Releases(deprecated)](https://github.com/react-native-oh-library/react-native-file-viewer/releases) | 0.72 | +| <= 2.1.6@deprecated | [@react-native-oh-tpl/react-native-file-viewer Releases(deprecated)](https://github.com/react-native-oh-library/react-native-file-viewer/releases) | 0.72 | | 2.1.7 | [@react-native-ohos/react-native-file-viewer Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-file-viewer/releases) | 0.72 | | 2.2.0 | [@react-native-ohos/react-native-file-viewer Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-file-viewer/releases) | 0.77 | - -## 安装与使用 +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -198,7 +199,7 @@ ohpm install ### 3.配置CMakeLists 和引入 FileViewerPackage -> [!TIP] 若使用的是 RN0.72工程,请跳过本章 +> 若使用的是 <= 2.1.6 版本,请跳过本章。 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: @@ -291,10 +292,13 @@ ohpm install ### 兼容性 -本文档内容基于以下版本验证通过: +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +在以下版本验证通过: -1. RNOH:0.72.33; SDK:OpenHarmony 5.0.0.71(API Version 12 Release); IDE:DevEco Studio 5.0.3.900; ROM:NEXT.0.0.71; -2. RNOH:0.77.18; SDK:HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.868; ROM:6.0.0.112; +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## API diff --git a/zh-cn/remobile-react-native-toast.md b/zh-cn/remobile-react-native-toast.md index 69202f6981f0ee64ce020f7901f9dbd4590c9acf..422e9c8a53419c281bb8f72a908d09ca0f2769c4 100644 --- a/zh-cn/remobile-react-native-toast.md +++ b/zh-cn/remobile-react-native-toast.md @@ -5,20 +5,20 @@

@remobile/react-native-toast

-本项目基于 [react-native-toast@1.0.7](https://github.com/remobile/react-native-toast) 开发。 +> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-toast) + +## 安装与使用 请到三方库的 Releases发布地址查看配套的版本信息: -| Version | Package Name | Repository | Release | RN Version | -| ------------------------------ | --------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ---------- | -|1.0.7@deprecated | @react-native-oh-tpl/react-native-toast | [Github](https://github.com/react-native-oh-library/react-native-toast) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-toast/releases) | 0.72 | -| 1.0.8 | @react-native-ohos/react-native-toast | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-toast) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-toast/releases) | 0.72 | -| 1.1.0 | @react-native-ohos/react-native-toast | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-toast) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-toast/releases) | 0.77 | +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| <= 1.0.7-0.0.3@deprecated | [@react-native-oh-tpl/react-native-toast Releases(deprecated)](https://github.com/react-native-oh-library/react-native-toast/releases) | 0.72 | +| 1.0.8 | [@react-native-ohos/react-native-toast Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-toast/releases) | 0.72 | +| 1.1.0 | [@react-native-ohos/react-native-toast Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-toast/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 -## 安装与使用 - 进入到工程目录并输入以下命令: @@ -102,7 +102,7 @@ export default ToastMasterDemo; ## 使用 Codegen -> [!TIP] V1.0.8 不需要执行 Codegen。 +Version >= @react-native-ohos/react-native-toast@1.0.8,已适配codegen-lib生成桥接代码。 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 @@ -176,7 +176,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ### 4.配置 CMakeLists 和引入 ToastPackage -> [!TIP] 若使用的是V 1.0.7 版本,请跳过本章 +> 若使用的是 <= 1.0.7-0.0.3 版本,请跳过本章。 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: @@ -253,10 +253,13 @@ ohpm install ### 兼容性 -本文档内容基于以下环境验证通过: +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +在以下版本验证通过: -1. RNOH:0.72.33; SDK:OpenHarmony 5.0.0.71(API Version 12 Release); IDE:DevEco Studio 5.0.3.900; ROM:NEXT.0.0.71; -2. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.868; ROM: 6.0.0.112; +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## API