Alterplay / APAddressBook

Easy access to iOS address book
MIT License
1.38k stars 193 forks source link

Does this work when the app is in background? #147

Closed techwizardg closed 7 years ago

techwizardg commented 7 years ago

This is not an issue and did not know where to post and hence asking it here. I need to be notified on phone book changes even my app is running in background and need to be notified on changes when app is terminated and reopened again? How do i go about doing it?

belkevich commented 7 years ago

I need to be notified on phone book changes even my app is running in background

Try this:

// start observing
[addressBook startObserveChangesWithCallback:^
{
    // reload contacts
}];

This callback will run when you restore app from background

and need to be notified on changes when app is terminated and reopened again

You can store contacts from previous app session and compare them with contacts from current app session.

techwizardg commented 7 years ago

Thanks and will close it

vijayaa commented 7 years ago

This method is not getting called when app is in foreground/background [addressBook startObserveChangesWithCallback:^ { // reload contacts }];

belkevich commented 7 years ago

@vijayaa moved to issue