Sync Services With AddressBook
- by Marcus
Hi,
I've developed an application to sync the Mac address book with another application.
I was using an NSNotification (kABDatabaseChangedExternallyNotification) which are sent every time the address book is edited to do the syncing.
However I found that if I 'overloaded' the address book (by adding 20 records really quickly or something) I didn't get all of the notifications.
I have since found the Sync Services framework which seems to be aimed at my kind of application and it seems to work fine.
The problem is that the changes are not 'pushed' to me in the same was as an NSNotification - I have to sync every 5 minutes or so. And, from what I can understand, I shouldn't use the AddressBook API directly but push changes back through sync services.
This means that changes are not instant but lagged by how often address book/my app syncs.
Is there any way to make it instant? or to use the NSNotifications reliably?
Thanks for your time,
Marc