문제

If want to check if a person record has email addresses. So:

ABMultiValueRef emailMultiValue = ABRecordCopyValue(person, kABPersonEmailProperty);

If the record has no email addresses, do I get a NULL value in emailMultiValue, or some other special CFTypeRef value?

도움이 되었습니까?

해결책

You do not get NULL value cause of kABPersonEmailProperty record returns multi value type.
Actually it returns valid object with empty list of values:
NSLog(@"%@", emailMultiValue) -> ABMultiValueRef 0x156bbb00 with 0 value(s)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top