I need a contact's street address. I know how to get the single value properties, but the street address is a multivalue property. Apple's documentation shows how to set it, but not retrieve it. Any help?
PS: this does not work:
ABRecordCopyValue(person, kABPersonAddressStreetKey);
I just figured it out:
ABMultiValueRef st = ABRecordCopyValue(person, kABPersonAddressProperty);
if (ABMultiValueGetCount(st) > 0) {
CFDictionaryRef dict = ABMultiValueCopyValueAtIndex(st, 0);
self.street.text = CFDictionaryGetValue(dict, kABPersonAddressStreetKey);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With