morenoh149 / react-native-contacts

React Native Contacts
MIT License
1.64k stars 560 forks source link

Listen to Contact Store Updates #637

Closed jbromberg closed 2 years ago

jbromberg commented 3 years ago

Apple provides an API for knowing when a user's contacts have changed. It is called CNContactStoreDidChange.

Documentation: https://developer.apple.com/documentation/foundation/nsnotification/name/1403253-cncontactstoredidchange

It is extremely common for apps to periodically sync a user's contacts with the server and this would make that very easy. Right now, the only solution with this library is to periodically fetch the user's entire contact list and see what has been changed. Implementing this API would be extremely helpful to many people using this library. I would be willing to do it, but unfortunately, I don't know any native code.

github-actions[bot] commented 2 years ago

This issue is stale, please provide more information about the status

mfbx9da4 commented 2 years ago

I believe Android also provides this functionality through ContentObservers on the Contacts ContentResolver. Is there any reason why it's not possible to unify the android and apple APIs to get notified when contacts change?

github-actions[bot] commented 2 years ago

This issue is stale, please provide more information about the status