Hi,
I'm pulling my hair out with this one. I have this code:
Code:
-(BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier
{
NSString *contactName = (NSString *)ABRecordCopyCompositeName(person);
myContactLabel.text = contactName;
ABMultiValueRef phoneProperty = ABRecordCopyValue(person,property);
myContactPhoneNumber = (NSString *)ABMultiValueCopyValueAtIndex(phoneProperty,identifier); <-----
// Get rid of the Contact picker
[peoplePicker dismissModalViewControllerAnimated:YES];
return NO;
}
I get a CFRetain crash on the line marked with <----- above and the value shown for
Code:
myContactPhoneNumber
is "Invalid CFStringRef".
HOWEVER, this only happens if a contact has more than one number and I don't select the first number in the list.
I've been chasing this one for hours. Any ideas?
TVM