Hello everyone I am trying to update a contact's phone using the following code
ABAddressBookRef addressBook = ABAddressBookCreate();
CFErrorRef error = nil;
ABMutableMultiValueRef phoneMultiValue = ABMultiValueCreateMutable(kABPersonPhoneProperty);
bool didAddphone = ABMultiValueAddValueAndLabel(phoneMultiValue, (CFTypeRef)(_homePhoneText.text), kABHomeLabel, NULL);
if(didAddphone){
ABRecordSetValue(ABAddressBookGetPersonWithRecordID(addressBook, [_ID integerValue]),
kABPersonPhoneProperty,
phoneMultiValue,
nil);
} else {
NSLog(@"Error adding email: %@", error);
error = nil;
}
But its not working. Any help ?