Reputation: 7148
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.
Upvotes: 2
Views: 1508
Reputation: 85542
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.
Upvotes: 5