PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, October 21, 2022

[FIXED] How to get changed contacts using Contacts Framework in iOS

 October 21, 2022     contacts, ios, notifications, swift     No comments   

Issue

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?


Solution

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



Answered By - Tanvi Jain
Answer Checked By - Robin (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing