whatsapp如何在iOS中更快地从地址簿获得更新的联系人? [英] How whatsapp get updated contacts from addressbook faster in iOS?

查看:284
本文介绍了whatsapp如何在iOS中更快地从地址簿获得更新的联系人?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的发现

我正在设计一个与我的后端同步联系的逻辑。我经历了一些在IOS中做同样事情的应用程序。我将以WhatsApp为例,我发现当我更新Native Addressbook中的任何联系人时,它反映了Whatsapp的变化。

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.

我的关注

我只是想知道它是如何同步的一种非常快的方式。即使是新的联系人也会与其远程服务器同步并在联系人时显示,并且如果该号码已注册,则能够启动Whatsapp聊天。

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.

摘要查询

因此,简而言之,我的查询是,

So, in nutshell my queries are,


  1. Whatsapp如何同步联系人?

  2. whatsapp如何从Native Addressbook获取更新的联系人列表(如果它正在这样做)?

  3. 如何使用whatsapp只是在地址簿中添加了新的联系人,是否有任何像时间戳或其他任何东西管理?

我知道以下内容是那里,

I know the following things are there like,

ABAddressBookGetPersonCount
ABAddressBookGetPersonWithRecordID
ABAddressBookCopyArrayOfAllPeople

使用 ABAddressBookGetPersonCount 我可以知道是否有任何新的联系人,但我仍然可以知道它的记录ID而不重复每个联系人使用 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.

推荐答案

执行此操作的方法是注册外部更改回调。这样,您的应用会在通知发生时立即通知对地址簿的任何更改。

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.

这篇关于whatsapp如何在iOS中更快地从地址簿获得更新的联系人?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆