From 7fa11372d8c2be3e78d0d27b33bdccbfffb5cb15 Mon Sep 17 00:00:00 2001 From: gongjq Date: Fri, 30 Jan 2026 17:10:40 +0800 Subject: [PATCH] docs: contacts adaptions as change from 8.0.6 to 8.0.7 Signed-off-by: gongjq --- en/react-native-contacts.md | 8 +++++--- zh-cn/react-native-contacts.md | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/en/react-native-contacts.md b/en/react-native-contacts.md index 0a6c7b6f..c683f237 100644 --- a/en/react-native-contacts.md +++ b/en/react-native-contacts.md @@ -559,8 +559,8 @@ Open the `entry/src/main/module.json5` file and add the following code: | getContactsMatchingString(str: string): Promise | where string is any string to match a name (first, middle, family) to | function | no | Android,iOS | yes | | getContactsByPhoneNumber(phoneNumber: string): Promise | where string is a phone number to match to. | function | no | Android,iOS | yes | | getContactsByEmailAddress(emailAddress: string): Promise | where string is an email address to match to. | function | no | Android,iOS | yes | -| checkPermission(): Promise<'authorized' \| 'denied' \| 'undefined'>; | checks permission to access Contacts ios only | function | no | iOS | yes | -| requestPermission(): Promise<'authorized' \| 'denied' \| 'undefined'> | request permission to access Contacts ios only | function | no | iOS | yes | +| checkPermission(): Promise<'authorized' \| 'denied' \| 'undefined' \| 'limited'> | checks permission to access Contacts ios only | function | no | iOS | partially | +| requestPermission(): Promise<'authorized' \| 'denied' \| 'undefined' \| 'limited'> | request permission to access Contacts ios only | function | no | iOS | partially | | writePhotoToPath(contactId: string, file: string): Promise | writes the contact photo to a given path android only | function | no | Android | no | **Contacts** @@ -643,10 +643,12 @@ Open the `entry/src/main/module.json5` file and add the following code: - [ ] **writePhotoToPath**: The system contact application does not support this API. [issue#1](https://github.com/react-native-oh-library/react-native-contacts/issues/1) - [ ] **openExistingContact**: At present, no relevant interface is provided to open the edit mode for existing contacts. The current behavior is that it opens in view mode. If the existing contact does not exist, a blank page will be returned. [issue#9](https://gitcode.com/openharmony-sig/rntpc_react-native-contacts/issues/9) - [ ] **viewExistingContact**: If the existing contact does not exist, a blank page will be returned. [issue#9](https://gitcode.com/openharmony-sig/rntpc_react-native-contacts/issues/9) -- [ ] state, department and isStarred these fields are not supported at present.[issue#9](https://gitcode.com/openharmony-sig/rntpc_react-native-contacts/issues/9) +- [ ] **state, department and isStarred**: These fields are not supported at present.[issue#9](https://gitcode.com/openharmony-sig/rntpc_react-native-contacts/issues/9) ## Others +- [ ] **checkPermission&requestPermission**: The result of these two interfaces can only in authorized and denied,limited is not supported at present. + ## License This project is licensed under [The MIT License (MIT)](https://github.com/morenoh149/react-native-contacts/blob/master/LICENSE). diff --git a/zh-cn/react-native-contacts.md b/zh-cn/react-native-contacts.md index 7083cfe8..d8537355 100644 --- a/zh-cn/react-native-contacts.md +++ b/zh-cn/react-native-contacts.md @@ -557,8 +557,8 @@ ohpm install | getContactsMatchingString(str: string): Promise | where string is any string to match a name (first, middle, family) to | function | no | Android,iOS | yes | | getContactsByPhoneNumber(phoneNumber: string): Promise | where string is a phone number to match to. | function | no | Android,iOS | yes | | getContactsByEmailAddress(emailAddress: string): Promise | where string is an email address to match to. | function | no | Android,iOS | yes | -| checkPermission(): Promise<'authorized' \| 'denied' \| 'undefined'>; | checks permission to access Contacts ios only | function | no | iOS | yes | -| requestPermission(): Promise<'authorized' \| 'denied' \| 'undefined'> | request permission to access Contacts ios only | function | no | iOS | yes | +| checkPermission(): Promise<'authorized' \| 'denied' \| 'undefined' \| 'limited'> | checks permission to access Contacts ios only | function | no | iOS | partially | +| requestPermission(): Promise<'authorized' \| 'denied' \| 'undefined' \| 'limited'> | request permission to access Contacts ios only | function | no | iOS | partially | | writePhotoToPath(contactId: string, file: string): Promise | writes the contact photo to a given path android only | function | no | Android | no | @@ -647,6 +647,8 @@ ohpm install ## 其他 +- [ ] checkPermission跟requestPermission:鸿蒙获取的权限目前支持authorized跟denied,不支持部分权限limited. + ## 开源协议 本项目基于 [The MIT License (MIT)](https://github.com/morenoh149/react-native-contacts/blob/master/LICENSE) ,请自由地享受和参与开源。 -- Gitee