11
votes

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.

1
May I know what's wrong with the Question, and why it deserve downvote ?Mrug
Did you get any solution? I too want to know about this!Aditya
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 ? @MrugArpit B Parekh
@ArpitBParekh did you find a solution?A.s.ALI
@Mrug did you find a solution?A.s.ALI

1 Answers

3
votes

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.