Read name of ABSource

719 views Asked by At

I want to read the name of an ABSource in the addressBook framework. Is this possible? The following code sample leaves me with null, while the currentSource pointer is valid.

        NSString* stringName = (NSString*)ABRecordCopyValue(currentSource, kABSourceNameProperty); 

Thank you in advance, Martin

1

There are 1 answers

2
Michaël On
NSString *sourceTypeName = (NSString *)((CFStringRef)ABRecordCopyValue(source, kABSourceNameProperty));


ABSourceType sourceType = [(NSNumber *)ABRecordCopyValue(currentSource, kABSourceTypeProperty) intValue];

See ABSourceType for values.