Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-native-contacts-picker
Advanced tools
react-native兼容iOS8的通讯录选择器
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';
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
通讯录选择器,兼容iOS8,兼容最新RN版本
We found that react-native-contacts-picker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.