views:

298

answers:

1

I've added a feature to my app that allows the user to save a business's contact details to the address book; however, to guard against adding multiple entries I want to check that the entry doesn't already exist.

Any idea how to do this? The iPhone developer documentation seems a little unclear. I'm using the C api to add the contact.

+2  A: 

Use ABAddressBookCopyPeopleWithName() to fetch a list of potential matches from the Address Book, and then iterate through them to see if they're the name you're adding.

Ben Gottlieb