lundi 23 novembre 2015

How to get deleted contact callback for ABAddressBook framework in Swift?

Currently in my project I'm fetching contacts using ABAddressBook.

What I'm done so far

I've written logic whenever some contact is edited or newly added I'm maintaining sqlite DB.

Using kABPersonModificationDateProperty and ABRecordGetRecordID I'm maintaining sqlite perfectly without any callback or notification. But now when some contact is deleted its going very difficult to handle without getting any callback or notification from ABAddressBook.

What I'm looking for

I need some callback or notification in my app for deleted contact ABRecordGetRecordID So using that i will delete that contact from my sqlite DB.

I've gone through number of questions

Get Deleted contact using ABAddressBookRegisterExternalChangeCallback or any other notification

Address Book External Change Callback in Swift (with C Function Pointers?)

AddressBook synchronization in iOS

But none of them is accepted solution or what I'm looking for.

Aucun commentaire:

Enregistrer un commentaire