My App is crashing while using any method of react-native-contacts.
function getPhoneRecords() {
PermissionsAndroid.requestMultiple([
PermissionsAndroid.PERMISSIONS.WRITE_CONTACTS,
PermissionsAndroid.PERMISSIONS.READ_CONTACTS,
]).then(() => {
Contacts.getAll((err, contacts) => {
if (err) {
console.log(err, 'failed to fetch phone Records!');
} else {
setPhoneRecords(contacts);
}
});
});}
Here is the function to getAllContacts but whenever this function executes my app crashes with no error. How can I solve this issue? Thanks in Advance.