I am developing an App that stores contacts in the address book . I would like to add notes field in my implementation , I know that to add a phone number this is the code to be used :
ABMultiValueRef multiPhone = ABMultiValueCreateMutable(kABMultiRealPropertyType);
ABMultiValueAddValueAndLabel(multiPhone, (__bridge_retained CFStringRef)Tel, kABWorkLabel, NULL);
ABMultiValueAddValueAndLabel(multiPhone, (__bridge_retained CFStringRef)Fax, kABPersonPhoneWorkFAXLabel, NULL);
ABRecordSetValue(contact, kABPersonPhoneProperty, multiPhone, nil);
CFRelease(multiPhone);
I know that the equivalent of kABPersonPhoneProperty is kABNoteProperty but what is the equivalent of kABWorkLabel for the note field?
Thanks
The note property, identified by
kABNoteProperty, is a single-value property, not a multi-value property, so there’s no corresponding label. The phone property is multi-value: it can contain several different values at the same time, so you need labels to distinguish the values. The note property is like the first name or last name property — these can only have one value at a time. UseABRecordSetValue()for this: