I'm doing some testing on AddressBook and though I can get the data I am looking for I'm curious about how it is delivered. Specifically CFDictionaryRef. When I cast this to a NSDictionary and log to console I just get a string value, not a key=value pair. If I try to log allKeys my test app breaks.
Here's the code snippet I'm using:
if ([contactName isEqualToString:ownerName]) {
//get reference to their email addresses
ABMultiValueRef contactEmails = ABRecordCopyValue(thisPerson, kABPersonEmailProperty);
//loop
for (NSUInteger e = 0; e < ABMultiValueGetCount(contactEmails); e++){
CFDictionaryRef thisPersonCFEmailDict = ABMultiValueCopyValueAtIndex(contactEmails, e);
NSDictionary* thisPersonEmailDict = (__bridge NSDictionary*)thisPersonCFEmailDict;
NSLog(@"%@", [thisPersonEmailDict allKeys]);
}
}