[ 
https://issues.apache.org/jira/browse/CB-3950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13690123#comment-13690123
 ] 

Olivier Louvignes commented on CB-3950:
---------------------------------------

The issue comes from that any custom label will be converted to @"other" when 
reading from AB, but when writing the check whether the label has changed will 
be made against the correct value @"iPhone". A possible fix would be to either 
dismiss @"other" labels or to properly read custom labels:

Replacing l.507 in CDVContact.m (v2.7.0) :

from:
if ((labelAB == nil) || ![label isEqualToString:labelAB]) {

to:
if ((labelAB == nil) || (![label isEqualToString:@"_$!<Other>!$_"] && ![label 
isEqualToString:labelAB])) {

fixes the issue for me.
                
> Custom labels are removed when a contact is saved on iOS.
> ---------------------------------------------------------
>
>                 Key: CB-3950
>                 URL: https://issues.apache.org/jira/browse/CB-3950
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.7.0
>            Reporter: Olivier Louvignes
>            Assignee: Shazron Abdullah
>              Labels: contacts, ios
>
> When I update an existing contact that has some custom labels (like 
> "BlackBerry", "iPhone"), theses labels are replaced by "other" even if I do 
> not touch the "phoneNumbers" array.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to