Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-contacts-picker

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-contacts-picker

通讯录选择器,兼容iOS8,兼容最新RN版本

  • 0.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-native-contacts-picker

react-native兼容iOS8的通讯录选择器

使用方式(Android)

  • 安装模块
npm i react-native-contacts-picker -s
  • 关联模块
react-native link react-native-contacts-picker
  • 添加权限
<uses-permission android:name="android.permission.READ_CONTACTS" />
  • 引入模块
import ContactPickerBridge from 'react-native-contacts-picker';

使用方式(iOS)

  • 安装模块
npm i react-native-contacts-picker -s
  • 关联模块
react-native link react-native-contacts-picker
  • 添加权限

    Info.plist 中添加 Privacy - Contacts Usage Description 权限

  • 引入模块

import ContactPickerBridge from 'react-native-contacts-picker';

接口说明

接口名接口成功返回接口失败返回注意点
openContactPicker返回 {"data": {"phone":"(555) 564-8583","name":"Bell Kate"}, "code": 0} 格式数据{"msg": "失败原因", "code": 1/2}
getAllContact返回 {"data": [{"phoneArray":["(555) 766-4823","(707) 555-1854"],"name":"ZakroffHank"}], "code": 0} 格式数据{"msg": "失败原因", "code": 1/2}
checkContactPermissions{"status": true/false}由于Android 6.0以下没有原生权限管理,因此目标版本在23以下时,返回的永远是true。不过可以使用 getAllContact 方法看返回的数据是否为空来粗略判断权限。

FAQs

Package last updated on 27 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc