0

I am trying to get the total count for the phone numbers listed in the AddressBook, in all groups as a whole.

I can successfully retrieve Person count and Group count, just not the total number of Phone Numbers.

ABAddressBookRef m_addressbook = ABAddressBookCreate();
CFIndex nPeople  = ABAddressBookGetPersonCount(m_addressbook);
CFIndex nGroups  = ABAddressBookGetGroupCount(m_addressbook);
WrightsCS
  • 50,551
  • 22
  • 134
  • 186

2 Answers2

1
CFIndex nPeople = ABAddressBookGetPersonCount(m_addressbook);

Should return the count for everyone in the address book.

Costique
  • 23,712
  • 4
  • 76
  • 79
Jordan
  • 21,746
  • 10
  • 51
  • 63
1

Try this:

ABAddressBookRef addressbook = ABAddressBookCreate();
int nPeople = ABAddressBookGetPersonCount(addressbook);
printf("%d",nPeople);
Costique
  • 23,712
  • 4
  • 76
  • 79
Terry Cjhu
  • 11
  • 1