How do I add city/state and country to an existing contact in the address book?
I haven't worked with address book until now. The app is supposed to run through the entire address book and if there is no address there will be an option to add it without opening the address book app.
Here is what I tried to do until now:
ABRecordRef contact = NULL;
ABMultiValueRef multiPhone = ABMultiValueCreateMutable(kABPersonAddressProperty);
ABMultiValueAddValueAndLabel(multiPhone, (__bridge_retained CFStringRef)city,
kABPersonAddressCityKey, NULL);
ABMultiValueAddValueAndLabel(multiPhone, (__bridge_retained CFStringRef)state,
kABPersonAddressStateKey, NULL);
ABMultiValueAddValueAndLabel(multiPhone, (__bridge_retained CFStringRef)country,
kABPersonAddressCountryKey, NULL);
ABRecordSetValue(contact, kABPersonAddressProperty, multiPhone, nil);
CFRelease(multiPhone);