How whatsapp get updated contacts from addressbook faster in iOS?
Asked Answered
W

1

11

My findings

I am designing a logic to sync contact with my Backend. I gone through some apps that doing same thing in IOS. I will take the example of WhatsApp, I found that When I update any contact in Native Addressbook, it reflect that change into Whatsapp withing a fraction.

My Concern

I just want to know that how it is syncing in a very faster way. Even a new contact gets synced with its Remote server and get displayed on contact, and with the ability to initiate Whatsapp chat if that number is registered one.

Summary of Queries

So, in nutshell my queries are,

  1. How Whatsapp is syncing the contact?
  2. How whatsapp is getting just updated contact list from Native Addressbook (if it's doing so) ?
  3. How whatsapp is just getting just new Contact added in addressbook, is there anything that manages like timestamp or anything else?

I know the following things are there like,

ABAddressBookGetPersonCount
ABAddressBookGetPersonWithRecordID
ABAddressBookCopyArrayOfAllPeople

Using the ABAddressBookGetPersonCount i can know if any new contacts are there but still how i will be able to know its Record ID without iterating each contact using ABAddressBookCopyArrayOfAllPeople

So i am just asking for the way to get just updated list.

Westbrooke answered 1/8, 2015 at 8:25 Comment(7)
May I know what's wrong with the Question, and why it deserve downvote ?Westbrooke
Did you get any solution? I too want to know about this!Shuma
Have you find any solution, i also need to update contact in my app, if native contact is updated, i am using cncontact for now ? @WestbrookeMalonis
@ArpitBParekh did you find a solution?Archimedes
@Westbrooke did you find a solution?Archimedes
@Shuma did you find a solution?Archimedes
i have not implemented, may check below anwer of DanielT @ArchimedesMalonis
S
3

The way to do this is by registering an external change callback. This way, your app will be notified of any changes to the address book as soon as they happen.

Sparke answered 1/8, 2015 at 13:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.