0

I have an app with partial copying of native Contacts app functionality. Then, I meet such bug: on some devices, I create new contact, add phone number with kABPersonPhoneIPhoneLabel, save it and read later, the number has no label! When investigated, I found that issue occurs only if Exchange account contacts sync (Google in my case) is turned on. Also, check the list of labels to choose in cases when Exchange sync is ON and OFF. (please note, that you should have no contacts in address book)

Exchange is OFF, phone numbers available labels are:

  • mobile, iPhone, home, work, main, home fax, work fax, other fax, pager, other

and user can add custom labels.

Exchange is ON, the labels are:

  • mobile, home, work, home fax, work fax, pager, assistant, car, company main, radio

and user CAN NOT add custom labels

My app handle only standard labels, mentioned in first case.

So, the question is: how can I retrieve available labels list, and how to know is user allowed to add custom labels or no?

Thank you for answer, or any related info about this.

Dmitry Salnikov
  • 337
  • 5
  • 16

1 Answers1

0

You can add labels with:

bool ABMultiValueAddValueAndLabel (
   ABMutableMultiValueRef multiValue,
   CFTypeRef value,
   CFStringRef label,
   ABMultiValueIdentifier *outIdentifier
);
Ravi Gautam
  • 960
  • 2
  • 9
  • 20
Cliff Harris
  • 754
  • 2
  • 7
  • 9