From c745cd4b8600e5d4b174534cf72d7dbda551c285 Mon Sep 17 00:00:00 2001 From: p60087772 Date: Wed, 11 Jun 2025 11:02:39 +0800 Subject: [PATCH 1/2] =?UTF-8?q?docs:=20[Issues:=20#ICE896]=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9push-notification-ios=E3=80=81permissions=E5=92=8Ctext?= =?UTF-8?q?-size=E8=8B=B1=E6=96=87=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...-native-community-push-notification-ios.md | 4 +- en/react-native-permissions.md | 64 +++++++++---------- en/react-native-text-size.md | 6 +- 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/en/react-native-community-push-notification-ios.md b/en/react-native-community-push-notification-ios.md index 4a054769..1f482e9b 100644 --- a/en/react-native-community-push-notification-ios.md +++ b/en/react-native-community-push-notification-ios.md @@ -350,8 +350,8 @@ _NotificationRequest:_ ## 6. Known Issues -- [ ] HarmonyOS 的 NotificationManager 的规格和 IOS 不一致,其 NotificationRequest 所含参数,在 HarmonyOS 上部分没有适配对应参数,问题: [issue#1](https://github.com/react-native-oh-library/react-native-push-notification-ios/issues/4) -- [ ] 原库部分接口在 HarmonyOS 中没有对应接口处理相关逻辑,问题: [issue#2](https://github.com/react-native-oh-library/react-native-push-notification-ios/issues/3) +- [ ] The **NotificationManager** specifications of HarmonyOS are different from those of iOS. Some parameters contained in **NotificationRequest** are not adapted to HarmonyOS: [issue#1](https://github.com/react-native-oh-library/react-native-push-notification-ios/issues/4). +- [ ] Some APIs in the source library do not have the corresponding API processing logic on HarmonyOS: [issue#2](https://github.com/react-native-oh-library/react-native-push-notification-ios/issues/3). ## 7. Others diff --git a/en/react-native-permissions.md b/en/react-native-permissions.md index c0deac7e..3bb74a79 100644 --- a/en/react-native-permissions.md +++ b/en/react-native-permissions.md @@ -40,7 +40,7 @@ yarn add @react-native-oh-tpl/react-native-permissions The following code shows the basic use scenario of the repository: -> [!WARNING] 在使用import...from "react-native-permissions" 导入时因为原库没有抛出关于HarmonyOS有关字段,在使用PERMISSIONS.HARMONY.ACCESS_BLUETOOTH编辑器会报ts类型错误没有HARMONY字段(使用可以正常编译运行),所以想要使用PERMISSIONS.HARMONY.ACCESS_BLUETOOTH,可以使用 import...from "@react-native-oh-tpl/react-native-permissions" +> [!WARNING] When using **import ... from "react-native-permissions"**, a TypeScript type error occurs because the original library does not include the HarmonyOS fields. Specifically, when trying to use **PERMISSIONS.HARMONY.ACCESS_BLUETOOTH**, TypeScript throws an error indicating that the **HARMONY** field is missing. (However, the code will still compile and run correctly.) To resolve this issue and use **PERMISSIONS.HARMONY.ACCESS_BLUETOOTH**, you should instead use **import...from "@react-native-oh-tpl/react-native-permissions"**. ```js import { ScrollView, StyleSheet, View, Text, Button } from "react-native"; @@ -257,13 +257,13 @@ To use this repository, you need to use the correct React-Native and RNOH versio Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-permissions Releases](https://github.com/react-native-oh-library/react-native-permissions/releases) -### 权限申请使用的工作流程 +### Applying for and Using a Permission -应用在访问数据或者执行操作时,需要评估该行为是否需要应用具备相关的权限。如果确认需要目标权限,则需要在应用安装包中申请目标权限。 +You need to determine whether your application needs related permissions before accessing data or performing an operation. If permissions are required, you must request the permissions in the application installation package. -然后,需要判断目标权限是否属于用户授权类。如果是,应用需要使用动态授权弹框来提供用户授权界面,请求用户授权目标权限。 +Determine whether the required permissions need user authorization. If yes, display a dialog box dynamically to request user authorization. -当用户授予应用所需权限后,应用可成功访问目标数据或执行目标操作。 +After the user grants the permissions, the application can access the data or perform the operation. ``` ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ @@ -306,9 +306,9 @@ Check the release version information in the release address of the third-party └─────────────────┘ └─────────────────┘ ``` -### 权限要求 +### Required Permissions -需要在`entry/src/main/module.json5`中声明权限并创建 reason string value。 +You need to declare the permissions in `entry/src/main/module.json5` and create the reason string value. ``` "requestPermissions": [ @@ -335,13 +335,13 @@ Check the release version information in the release address of the third-party ] ``` -reason 字段的内容写作规范及建议如下: +How to set: - 保持句子简洁、不要加入多余的分割符号。 - - 建议句式:用于某事。 - - 示例:用于扫码拍照。 + Keep the sentence concise without redundant separators. + + Recommended sentence pattern: Used for something/Used to do something/Used for doing something. + + Example: Used for code scanning and photographing. ``` { @@ -350,21 +350,21 @@ reason 字段的内容写作规范及建议如下: }, ``` -### 权限等级说明 +### Levels of Permissions -根据权限对于不同等级应用有不同的开放范围,权限类型对应分为以下三种,等级依次提高。 +The permissions available to applications vary with the APL. The permission levels include the following in ascending order of seniority. -- **normal 权限** +- **normal** - normal 权限允许应用访问超出默认规则外的普通系统资源。这些系统资源的开放(包括数据和功能)对用户隐私以及其他应用带来的风险很小。 + The **normal** permission allows access to common system resources beyond the default rules. Access to these resources (including data and functions) has minor risks on user privacy and other applications. - 该类型的权限仅向 APL 等级为 normal 及以上的应用开放。 + The permissions of this level are available to applications of the **normal** or higher APL. -- **system_basic 权限** +- **system_basic** - system_basic 权限允许应用访问操作系统基础服务相关的资源。这部分系统基础服务属于系统提供或者预置的基础功能,比如系统设置、身份认证等。这些系统资源的开放对用户隐私以及其他应用带来的风险较大。 + The **system_basic** permission allows access to resources related to basic OS services. The basic services are basic functions provided or preconfigured by the system, such as system settings and identity authentication. Access to these resources may have considerable risks to user privacy and other applications. - 该类型的权限仅向 APL 等级为 system_basic 及以上的应用开放。 + The permissions of this level are available only to applications of the **system_basic** or **system_core** APL. ``` normal权限列表 @@ -407,17 +407,17 @@ system_basic列表 ``` -注: -ohos.permission.LOCATION_IN_BACKGROUND 允许应用在后台运行时获取设备位置信息。 -由于安全隐私要求,应用不能通过弹窗的形式被授予后台位置权限,应用如果需要使用后台位置权限,需要引导用户到设置界面手动授予。 -申请流程: -通过弹窗申请前台位置权限。存在两种允许情况: -申请前台模糊位置权限:ohos.permission.APPROXIMATELY_LOCATION。 -申请前台精确位置权限:ohos.permission.APPROXIMATELY_LOCATION 和 ohos.permission.LOCATION。 -当用户点击弹窗授予前台位置权限后,应用通过弹窗、提示窗等形式告知用户前往设置界面授予后台位置权限。 -用户在设置界面中的选择“始终允许”应用访问位置信息权限,完成手动授予。 - -## APIs +Note: +**ohos.permission.LOCATION_IN_BACKGROUND** allows an app running in the background to obtain the device location. +For security purposes, this permission cannot be granted to applications in a dialog box. If an application needs this permission, direct the user to manually grant this permission on the **Settings** screen. +Request process: +Request the foreground location permissions in the dialog box. You can request either of the following permissions: +Request **ohos.permission.APPROXIMATELY_LOCATION**. +Request **ohos.permission.APPROXIMATELY_LOCATION** and **ohos.permission.LOCATION**. +After the user grants the foreground location permissions, display a message to direct the user to go to the **Settings** screen to grant the **ohos.permission.LOCATION_IN_BACKGROUND** permission. +The permission is granted to the application if the user selects **Always allow** on the **Settings** screen. + +## API > [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. diff --git a/en/react-native-text-size.md b/en/react-native-text-size.md index ba181744..2e53cbce 100644 --- a/en/react-native-text-size.md +++ b/en/react-native-text-size.md @@ -327,7 +327,7 @@ To use this repository, you need to use the correct React-Native and RNOH versio Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-text-size Releases](https://github.com/react-native-oh-library/react-native-text-size/releases) -## APIs +## API > [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. @@ -347,8 +347,8 @@ Check the release version information in the release address of the third-party ## Known Issues -- [ ] fontFamilyNames&fontNamesForFamilyName 问题:需要依赖手机文件 font 目录下的 json 文件,该文件目前没有预置在手机目录下,会导致该接口调用为空。后续底层框架侧修复该问题 [issue#1](https://github.com/react-native-oh-library/react-native-text-size/issues/1) -- [ ] measure方法缺少lineInfo的返回处理 [issue#2](https://github.com/react-native-oh-library/react-native-text-size/issues/8) +- [ ] **fontFamilyNames** and **fontNamesForFamilyName** issues: The JSON file in the **font** directory of the mobile phone is required. Currently, the JSON file is not preset in the mobile phone directory, which will cause the API call to return null. This issue will be resolved on the bottom-layer framework side: [issue#1](https://github.com/react-native-oh-library/react-native-text-size/issues/1) +- [ ] The **measure** method does not return **lineInfo**: [issue#2](https://github.com/react-native-oh-library/react-native-text-size/issues/8). ## Others -- Gitee From 795bcfacf6e6127a26bc23534f9a69bcd68d246d Mon Sep 17 00:00:00 2001 From: p60087772 Date: Wed, 11 Jun 2025 15:17:48 +0800 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20[Issues:=20#ICE896]=20=E8=A1=A5?= =?UTF-8?q?=E5=85=85=E4=BF=AE=E6=94=B9=E8=8B=B1=E6=96=87=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...-native-community-push-notification-ios.md | 2 +- en/react-native-permissions.md | 38 +++++++++---------- en/react-native-text-size.md | 10 ++--- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/en/react-native-community-push-notification-ios.md b/en/react-native-community-push-notification-ios.md index 1f482e9b..083283f7 100644 --- a/en/react-native-community-push-notification-ios.md +++ b/en/react-native-community-push-notification-ios.md @@ -298,7 +298,7 @@ Then build and run the code. Check the release version information in the release address of the third-party library: [@react-native-ohos/push-notification-ios Releases](https://gitee.com/openharmony-sig/rntpc_ios/releases) -## 4. APIs +## 4. API > [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. diff --git a/en/react-native-permissions.md b/en/react-native-permissions.md index 3bb74a79..8cfed7fd 100644 --- a/en/react-native-permissions.md +++ b/en/react-native-permissions.md @@ -65,21 +65,21 @@ export function PermissionsExample() { return (