I have a contact component that works as expected, but if a user initially denies the request to grant my app access to their contact the request is not being asked again, the contact modal instead appears empty:
useEffect(() => {
(async () => {
const { status } = await Contacts.requestPermissionsAsync()
if (status === "granted") {
const { data } = await Contacts.getContactsAsync({
fields: [Contacts?.Fields?.PhoneNumbers],
});
if (data.length > 0) {
setContacts(data);
}
}
})();
}, []);