参见英文答案 >
how to check and retrieve changed/newly added contact details from address book in iOS?2个
我想在iPhone的联系人有插入/更新事件时收到通知.
我想在iPhone的联系人有插入/更新事件时收到通知.
对于IOS Swift来说,只是一个新手……
我不期待完整的源代码.只是想知道它是否可能,也暗示.
提前致谢.
解决方法
在iOS中,它可以使用 –
ABAddressBookRef ntificationaddressbook = ABAddressBookCreate(); ABAddressBookRegisterExternalChangeCallback(ntificationaddressbook,MyAddressBookExternalChangeCallback,self);
实施回电 –
void MyAddressBookExternalChangeCallback (ABAddressBookRef ntificationaddressbook,CFDictionaryRef info,void *context) { // called when there is any change in AddressBook }
有关详细信息,请参阅此链接 –
Detect what was changed from ABAddressBookRegisterExternalChangeCallback