如何在IOS中的联系人更改事件中得到通知? [英] How to get notified in contact changed event in IOS?

查看:75
本文介绍了如何在IOS中的联系人更改事件中得到通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在iPhone的联系人发生插入/更新事件时得到通知.

I wants to get notified when there is insert/update event to contacts of iPhone.

是否可以通知我有关特定联系人更改事件发生的应用程序?

Is it possible to get notification to my app regarding specific contact changed event happened ?

对于iOS Swift来说只是个新手.

Just a newbie... for IOS Swift.

我不希望获得完整的源代码.只是想知道它是否可能,并且还会提示.

I am not expecting full source code. Just wants to know whether its possible or not and also hint.

谢谢.

推荐答案

在iOS中,可以使用-

In iOS it could be done using -

注册外部更改回叫通知器-

Register the external change call back notifier-

ABAddressBookRef ntificationaddressbook = ABAddressBookCreate();
    ABAddressBookRegisterExternalChangeCallback(ntificationaddressbook, MyAddressBookExternalChangeCallback, self);

实施回叫-

void MyAddressBookExternalChangeCallback (ABAddressBookRef ntificationaddressbook,CFDictionaryRef info,void *context)
{
    // called when there is any change in AddressBook
}

有关更多详细信息,您可以参考此链接-

For more details you can refer this link-

检测ABAddressBookRegisterExternalChangeCallback的更改

这篇关于如何在IOS中的联系人更改事件中得到通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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