jiawen
jiawen

Reputation: 1208

How to get changed contacts using Contacts Framework in iOS

I can monitor contacts change using:

NotificationCenter.default.addObserver(
            self, selector: #selector(contactStoreDidChange), name: .CNContactStoreDidChange, object: nil)
    }

@objc func contactStoreDidChange(notification: NSNotification) {

}

But how can I get the changed contacts from the notification? Things like which contact is added/removed/changed etc?

Upvotes: 3

Views: 2868

Answers (1)

Tanvi Jain
Tanvi Jain

Reputation: 937

You just can get notify in the method.and you have to then refetch all objects and create your dataSource again for updated data!!

Upvotes: 2

Related Questions