RHAddressBook
RHAddressBook copied to clipboard
Not receiving Notifications in swift
Hi
Love the library, not only does it make addressBook much nicer to deal with, but it seems so much quicker than other libraries I've tried.
I'm hitting an issue in a swift app receiving ChangeNotifications I'm trying to register for address book updates in swift, however I don't seem to be receiving the notifications at all.
I've tried both
NSNotificationCenter.defaultCenter().addObserverForName(RHAddressBookExternalChangeNotification, object: nil, queue: nil) { (note: NSNotification!) -> Void in
println("address book changed")
}
and
NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("addressBookChanged:"), name: RHAddressBookExternalChangeNotification, object: nil)
without success. I'm hoping that rather than a NotificationCenter problem between the library and swift that it's my implementation or expectation.
I'm expecting to receive a notification if I have the app backgrounded, and add, edit or delete a contact, even then forgrounding the app doesn't result in the notification being raised.