Skip to content

Not receiving Notifications in swift #68

@wethanet

Description

@wethanet

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions