Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top