ios - Get contact images from Address Book -


I'm looking to show contact thumbnails in my app based on email address, such as some mail apps for email conversations We do . The images will be shown in a tableview.

I have tried to search the address book and get a thumbnail for every contact, but it is too slow to use. I have already tried to load the image, triggered by the cellarrowoutindpath, and is searching in the background thread to not block the main thread. Testing with only about 7,000 contacts, this can take approximately 30 seconds per contact.

Here is a brief summary of the general code - obviously it can only be customized to load all the contacts once, but for the sake of the question it does not matter.

Some users can contact up to 100,000 on their device, so this is very slow.

A suggestion that came up to synchronize contacts from the iOS address book, and save them in core data

What is the best way to do this task?


Comments