ABExternalChangeCallback
Prototype for a function callback invoked on an address book when the Address Book database is modified by another address book instance.
Declaration
typealias ABExternalChangeCallback = (ABAddressBook?, CFDictionary?, UnsafeMutableRawPointer?) -> VoidParameters
- addressBook:
An address book used to interact with the Address Book database.
- info:
Always
NULL. - context:
The object to pass to the callback function.
Discussion
If you name your callback function MyAddressBookExternalChangeCallback, you declare it like this:
Discussion
Use ABAddressBookRegisterExternalChangeCallback(_:_:_:) to register and ABAddressBookUnregisterExternalChangeCallback(_:_:_:) to unregister the callback function.
You can register for a callback with different contexts or callback functions. The run loop on the thread that registered the callback invokes the callback.
The addressBook object does not take any action to flush or synchronize cached state with the Address Book database. If you want to ensure that addressBook doesn’t contain stale values, use ABAddressBookRevert(_:).