diff --git a/en/react-native-turbo-log.md b/en/react-native-turbo-log.md index 6f37c00400b364288f46eaab9948085697941ccf..87f95fe1297592564dea78d1ae31a14d2fe6d82e 100644 --- a/en/react-native-turbo-log.md +++ b/en/react-native-turbo-log.md @@ -13,16 +13,21 @@ Please refer to the Releases page of the third-party library for the matching ve > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-turbo-log) +## Installation and Usage + +Go to the project directory and execute the following instruction: + #### npm ```bash -npm install @@react-native-ohos/react-native-turbo-log +npm install @react-native-ohos/react-native-turbo-log ``` #### yarn + ```bash -yarn add @@react-native-ohos/react-native-turbo-log +yarn add @react-native-ohos/react-native-turbo-log ``` @@ -159,11 +164,6 @@ const styles = StyleSheet.create({ }); ``` -## Using Codegen -Version >= @react-native-ohos/react-native-turbo-log@0.6.1, which has been adapted to codegen-lib to generate bridge code. - -This library has been adapted to Codegen. Before using it, you need to actively execute the generation of third-party library bridge code. For details, please refer to the Codegen Usage Documentation. - ## Link This step is a guide for manually configuring native dependencies. First, you need to open the HarmonyOS project harmony in the project using DevEco Studio. @@ -180,7 +180,7 @@ First, you need to open the HarmonyOS project harmony in the project using DevEc } ``` -There are currently two methods: + ### There are currently two methods: Import via har package (this method will be deprecated after the IDE improves related functions, and it is the preferred method currently); Link source code directly. @@ -194,7 +194,7 @@ Open the entry/oh-package.json5 file and append the following dependencies: ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-ohos/react-native-turbo-log": "file:../../node_modules/@@react-native-ohos/react-native-turbo-log/harmony/turbo_log.har" + "@react-native-ohos/react-native-turbo-log": "file:../../node_modules/@react-native-ohos/react-native-turbo-log/harmony/turbo_log.har" } ``` @@ -212,7 +212,7 @@ Method 2: Link the source code directly > [!TIP] For direct source code linking, refer to [Direct Source Code Linking Instructions](/zh-cn/link-source-code.md) -### 4.Configure CMakeLists and import turbo_log +### 3.Configure CMakeLists and import turbo_log open entry/src/main/cpp/CMakeLists.txt,add: @@ -260,8 +260,9 @@ target_link_libraries(rnoh_app PUBLIC rnoh_gesture_handler) # RNOH_END: manual_package_linking_2 ``` +### 4.Import the TurboLogPackage module on the ArkTS side -打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: +open `entry/src/main/cpp/PackageProvider.cpp`,add: ```diff #include "RNOH/PackageProvider.h" diff --git a/zh-cn/react-native-turbo-log.md b/zh-cn/react-native-turbo-log.md index 6841e7d69495d2262380ec4bf2f8438ec31773fb..92bb9c1e54372dad27f436ff6d3cb601d0af2f28 100644 --- a/zh-cn/react-native-turbo-log.md +++ b/zh-cn/react-native-turbo-log.md @@ -166,12 +166,6 @@ const styles = StyleSheet.create({ }); ``` -## 使用 Codegen - -Version >= @react-native-ohos/react-native-turbo-log@0.6.1,已适配codegen-lib生成桥接代码。 - -本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 - ## Link 此步骤为手动配置原生依赖项的指导。 @@ -273,6 +267,8 @@ target_link_libraries(rnoh_app PUBLIC rnoh_gesture_handler) ``` +### 4.Import the TurboLogPackage on the ArkTS side + 打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: ```diff