In my code I use ABPeoplePickerNavigationController to select person. After user select person from contact list, I look if specified person record have any phone number:
- (BOOL) peoplePickerNavigationController:(ABPeoplePickerNavigationController*)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person {
ABMutableMultiValueRef phones;
phones = ABRecordCopyValue(person, kABPersonPhoneProperty);
if (phones == nil || ABMultiValueGetCount(phones) == 0)
{
return NO;
}
// other code....
}
I created contact, added phone number to it and tested my code. In iOS 5 this code works well. phones variable contains one phone number.
But in iOS 6, after linking contact to facebook account, phones variable doesn't contain any values.
After unlinking contact with facebook account everything works well again.
How can I read person phone numbers this method?
- (BOOL) peoplePickerNavigationController:(ABPeoplePickerNavigationController*)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person
UPD
If i return YES in the function above, then in function
(BOOL) peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier
I can read all person phone numbers in normal way. So why I can't read them in the first function?