ABAddressBookRef is class in iOS used to access the address book (a centralized database used by multiple application). with this class we can add, modify, delete the contact.
Create new address book object from address book database.:-
ABAddressBookRef pAddressBook = ABAddressBookCreateWithOptions(NULL, &error);
ABRecordRef class holds one record inside.
You can access records as follows
ABAddressBookRef addressBook = ABAddressBookCreateWithOptions(NULL, &error);
CFArrayRef allSources = ABAddressBookCopyArrayOfAllSources(addressBook);
for (CFIndex i = 0; i < CFArrayGetCount(allSources); i++)
{
ABRecordRef source = (ABRecordRef)CFArrayGetValueAtIndex(allSources, i);
}
0 comments:
Post a Comment