3

I'm wondering if it's possible to import all contacts of a iPhone user once, and after that only import/update the contacts within my app after a change within the real addressbook has occurred? Currently I'm just importing the whole address book in viewDidLoad:, which is not necessary most of the times.

Could it work with the following code? Or is the method "addressBookDidChange" only called if the app is active while the addressbook is changed?

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(addressBookDidChange:) 
name:CNContactStoreDidChangeNotification object:nil];

Thanks!

Larme
  • 24,190
  • 6
  • 51
  • 81
seb
  • 116
  • 7
  • Why do you need to import them at all? – trojanfoe Jan 28 '16 at 15:38
  • Users are able to register themselves with their telephone number on a server. I want a user to see who of his contacts is also registered on the server. In order to do that I need all phone numbers out of a user's phonebook – seb Jan 28 '16 at 16:09
  • I've not been able to find a way. – Avi Jan 28 '16 at 17:02
  • @seb Then can't you enumerate them when needed; my point is why store them? – trojanfoe Jan 28 '16 at 20:51

0 Answers0