Check for a label of kABWorkLabel using ABMultiValueCopyLabelAtIndex.
For example, if you have an ABRecordRef named "person", this code will set a single NSString named "emailAddress":
// Email address (if only one, use it; otherwise, use the first work email address)
CFStringRef value, label;
ABMutableMultiValueRef multi = ABRecordCopyValue(person, kABPersonEmailProperty);
CFIndex count = ABMultiValueGetCount(multi);
if (count == 1) {
value = ABMultiValueCopyValueAtIndex(multi, 0);
emailAddress = (NSString*)value;
[emailAddress retain];
CFRelease(value);
} else {
for (CFIndex i = 0; i < count; i++) {
label = ABMultiValueCopyLabelAtIndex(multi, i);
value = ABMultiValueCopyValueAtIndex(multi, i);
// check for Work e-mail label
if (label && CFStringCompare(label, kABWorkLabel, 0) == 0) {
emailAddress = (NSString*)value;
[emailAddress retain];
break;
}
CFRelease(label);
CFRelease(value);
}
}
CFRelease(multi);