ABMutableMultiValueRef *address = (NSString *)ABRecordCopyValue(thisPerson, kABPersonAddressProperty);
for (CFIndex i=0; i < ABMultiValueGetCount(address); i++) {
CFDictionaryRef dict = ABMultiValueCopyValueAtIndex(address, i);
The code works but ge开发者_StackOverflownerates a warning. Any clue?
Warning: FirstViewController.m:46: warning: initialization from incompatible pointer type
I believe you're getting a warning because you're assigning an NSString* value to a ABMutableMultiValueRef* variable. You should only assign a pointer variable to a pointer of the same type.
ABMutableMultiValueRef is a CFTypeRef, so perhaps casting the result of ABRecordCopyValue to CFString instead of NSString would be the simple solution.
加载中,请稍侯......
精彩评论