Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

startObserveChangesWithCallback doesn't work in my swift project #81

Closed
lyair1 opened this issue Jul 4, 2015 · 5 comments
Closed

startObserveChangesWithCallback doesn't work in my swift project #81

lyair1 opened this issue Jul 4, 2015 · 5 comments

Comments

@lyair1
Copy link

lyair1 commented Jul 4, 2015

        self.addressBook.startObserveChangesWithCallback({() in
            println("Address book change detected")
        })

I added this code to my project, it's never being called. What am I doing wrong?

Thank you very much!

@belkevich
Copy link
Contributor

Are you sure have changes in your address book?))
See example app and use it in your code. It works fine with changes.
If it doesn't help, provide more code (APAddressBook initialization, calls). And describe how you made changes in device address book.

@romaincointepas
Copy link

+1, it never gets called in Swift.

See this thread for a potential solution:
http://stackoverflow.com/questions/25346563/address-book-external-change-callback-in-swift-with-c-function-pointers

@belkevich
Copy link
Contributor

Thank you, for feedback. I'll check it.

@laptobbe
Copy link
Contributor

+1, does not seem to work, have not looked into the workaround yet. Might post a PR when I do.

@belkevich
Copy link
Contributor

Fixed in 0.1.12.
I've also updated swift example with 'observe external changes'. You can pull it from develop branch now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants