
Security News
Feross on Risky Business Weekly Podcast: npm’s Ongoing Supply Chain Attacks
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
react-native-contacts-chooser
Advanced tools
Native wrapper for iOS and Android contacts picker UIs.
$ npm install react-native-contacts-chooser --save
$ react-native link react-native-contacts-chooser
Libraries
➜ Add Files to [your project's name]
node_modules
➜ react-native-contacts-chooser
and add RNContactsPicker.xcodeproj
libRNContactsPicker.a
to your project's Build Phases
➜ Link Binary With Libraries
Cmd+R
)<Privacy - Contacts Usage Description
to your project's info.plistandroid/app/src/main/java/[...]/MainActivity.java
import com.bluebamboostudios.RNContactsPickerPackage;
to the imports at the top of the filenew RNContactsPickerPackage()
to the list returned by the getPackages()
methodandroid/settings.gradle
:
include ':react-native-contacts-picker'
project(':react-native-contacts-picker').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-contacts-picker/android')
android/app/build.gradle
:
compile project(':react-native-contacts-picker')
<uses-permission android:name="android.permission.READ_CONTACTS" />
to your Android Manifestimport ContactsPicker from 'react-native-contacts-chooser';
try {
const granted = ContactsPicker.requestAccess();
if (granted) {
const contact = ContactsPciker.pickContact();
alert(JSON.stringify(contact));
}
} catch (e) {
console.warn(e);
}
import ContactsPicker from 'react-native-contacts-chooser';
try {
const granted = ContactsPicker.requestAccess();
} catch (e) {
console.error(e);
}
import ContactsPicker from 'react-native-contacts-chooser';
try {
const granted = ContactsPicker.checkAccess();
} catch (e) {
console.error(e);
}
import ContactsPicker from 'react-native-contacts-chooser';
try {
const contact = ContactsPicker.pickContact();
} catch (e) {
console.error(e);
}
import ContactsPicker from 'react-native-contacts-chooser';
try {
const contacts = ContactsPicker.pickContacts();
} catch (e) {
console.error(e);
}
import ContactsPicker from 'react-native-contacts-chooser';
try {
const contact = ContactsPicker.pickProperty();
} catch (e) {
console.error(e);
}
on iOS there is a bug with picking multiple properties that causes the picker UI to present as the mutliple contact picker and therefore fails to return multiple properties.
FAQs
Native wrapper for iOS and Android contacts picker UIs.
We found that react-native-contacts-chooser 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.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.