morenoh149 / react-native-contacts

React Native Contacts
MIT License
1.65k stars 564 forks source link

This package does not work on iOS 15.3.1. When user allows the app to access to contacts, app is crashed #665

Closed micha1333 closed 2 years ago

micha1333 commented 2 years ago

Hello everyone, I hope you all are doing well. this package works well on iOS except for iOS 15.3.1

useEffect(() => { if(Platform.OS == 'ios') { Contacts.requestPermission() .then(permission => { if(permission === 'authorized') { Contacts.getAll() .then((list) => { setContacts(list) props.refreshProviderList() refresh() }) .catch((error) => { console.log(error) }) } }) } }, [])

Please help me

cetindogu commented 2 years ago

Solved?

micha1333 commented 2 years ago

Hey yes, I solved the problem

On Thu, Mar 31, 2022 at 6:18 PM cetindogu @.***> wrote:

Solved?

— Reply to this email directly, view it on GitHub https://github.com/morenoh149/react-native-contacts/issues/665#issuecomment-1084736221, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSOYSCX6WOP5CUNM24V36LVCW62TANCNFSM5SEACMCQ . You are receiving this because you modified the open/close state.Message ID: @.***>

mcabs3 commented 2 years ago

I am also having this issue on my sim. RN 0.64.1 and react-native-contacts 7.0.4.

I have the plist property set, when I call requestPermission it crashes on my simulator.

mcabs3 commented 2 years ago

I got it to work, it was the permission not being int the Info.plist. Project was pointing to a different one 🤦‍♂️