I’m building a social media app, and I want to implement a feature where users allow access to their contacts so that they can easily see who of their contacts has already registered with our app. For obvious reasons, I can’t really display a list of contacts that isn’t sorted both alphabetically and by contacts that already have an account.
When I test fetching contacts on my personal device (iphone X, 440 contacts) it takes almost 30 seconds to fetch them all, and that kind of speed isn’t tolerable.
I can’t sort the contacts alphabetically until ALL of the users contacts have been returned, and it’s only until after some of the contacts are returned that I can send a request to my app’s server that determines if a user with the phone number exists.
Even the shoddiest of internet connections returns requests from our server 30x faster than the contacts API returns contacts, so what do you recommend I do to handle how long the contacts API takes? I want the user to enable access to contacts during the onboarding process but I can’t have the user waiting 30 seconds or more to see if their friends have an account. Is there any way besides detaching my app to not rely on expo’s contacts API?