morenoh149 / react-native-contacts

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

Feature Request: query contacts by providing an array of phone numbers? #593

Closed Goutam192002 closed 3 years ago

Goutam192002 commented 3 years ago

Recently, I was implementing a feature where a user can select and deselect his contacts and this information is sent to my server.

So, in a situation where a user has selected contacts initially and wants to update them again, this is the flow that takes place.

  1. Get the contacts list from server
  2. Render flatlist with data as all contacts, and extra data would be an object with selected contacts (which is fetched from the server)

The issue here is that the selected contacts object is referenced by recordID which we do not want to store on our servers. So after getting the initial contacts list from our server, we have to query the contacts to get their recordIDs.

This takes time because we would have be make n queries. We could modify existing implementation or build a new API where we can provide an array of phone numbers as well?

This would give a significant performance increase since we would have to perform only 1 query instead of n.

Right now, there is no API which provides this feature.

Would be more than happy to contribute, but I need help on iOS implementation as I'm not quite experienced with iOS ecosystem.

morenoh149 commented 3 years ago

sounds great. please provide the android version and we can work on the swift version after

Goutam192002 commented 3 years ago

How long before this goes live? I actually wanted to use this feature in my project, and was hoping I won't have to make a custom module in my project

morenoh149 commented 3 years ago

no eta. I'm busy with my job job and am a beginner is swift/obj-c. Would be great to get someone that is young and hungry to build the ios version.

github-actions[bot] commented 3 years ago

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