You want to find a specific person or group in the address book database.
ABAddressBookCopyArrayOfAllGroups functions to
find all people and groups in the address book. Traverse the returned
arrays to find the information you are looking for. Alternatively, you
can use the
ABAddressBookCopyPeopleWithName function to
find an entry about a person with a specific name.
Up to this point, we have been inserting group and person entries
into the address book without checking whether such a group or person
already exists. We can use the
functions to get the array of all people and groups in the address book
and search in the array to see whether the person or group entries we
are about to insert into the address book already exist. When we check
whether strings match, we also have to check for null strings (which we
assume mean that the contacts match). Here are two methods that will
make use of these functions and that can also be used in other
@"The address book is null."