Skip to content

Commit

Permalink
Merge pull request #6533 from cheekiatng/TIMOB-18173
Browse files Browse the repository at this point in the history
[TIMOB-18173] iOS: Fix adding date property for Ti.Contacts.createPerson
  • Loading branch information
vishalduggal committed Jan 6, 2015
2 parents 2f5cc35 + fe51913 commit 329f00d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion iphone/Classes/TiContactsPerson.m
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,12 @@ -(ABMultiValueRef)dictionaryToMultiValue:(NSDictionary*)dict type:(ABPropertyTyp
for (NSString* key in [dict allKeys]) {
NSString* label = [[TiContactsPerson multiValueLabels] valueForKey:key];
for (id value in [dict objectForKey:key]) {
ABMultiValueAddValueAndLabel(multiValue, (CFTypeRef)value, (CFStringRef)label, NULL);
if (type == kABMultiDateTimePropertyType) {
ABMultiValueAddValueAndLabel(multiValue, (CFDateRef)[TiUtils dateForUTCDate:(CFTypeRef)value], (CFStringRef)label, NULL);
}
else {
ABMultiValueAddValueAndLabel(multiValue, (CFTypeRef)value, (CFStringRef)label, NULL);
}
}
}

Expand Down

0 comments on commit 329f00d

Please sign in to comment.