I want to batch remove custom labels from AddressBook programmatically. But there are no public API. Any one have better resolve, thanks!
Assuming you're talking about the labels associated with the emails, phones, and addresses, you would presumably
ABAddressBookCopyArrayOfAllPeople
);ABRecordCopyValue
to get the ABMultiValueRef
associated with multivalue properties you're interested in (e.g., possibly kABPersonEmailProperty
, kABPersonAddressProperty
and/or the kABPersonPhoneProperty
).ABMultiValueGetCount
to get the count of the labels;ABMultiValueCopyLabelAtIndex
to get the actual labels; kABHomeLabel
, kABWorkLabel
, and kABOtherLabel
; andFor more information, see Address Book Programming Guide for iOS: Direct Interaction: Programmatically Accessing the Database as well as the Address Book Framework Reference for iOS.