I have the following code for some Address Book search:
ABAddressBookRef ab = ABAddressBookCreate();
NSString *matchStr = [NSString stringWithFormat:@"%@ %@", firstName, lastName];
CFStringRef namestr = (CFStringRef)matchStr;
CFArrayRef matched = ABAddressBookCopyPeopleWithName(ab, namestr);
The last line gives me the warning: Initialization from incompatible pointer type
.
Any ideas why开发者_如何学Go?
This code compiles fine for me, as it seems to do for Steven. You probably have a warning on code close to that part, which you mistakenly attributed to this last line.
精彩评论