iosmacoscocoaabaddressbook

Can I get a person's display name or composite name from AddressBook on OS X?


I have come across ABRecordCopyCompositeName() in these pages but, having Spotlighted it, have a hunch it's only available for the iOS platform. The AddressBook app itself, and ABPeoplePicker obviously do something similar internally, so is there an equivalent API for OS X? It's a tedious thing to retrieve title, first name, middle name, last name, suffix and work out if it's a company before building it yourself.


Solution

  • Unfortunately as you've surmised, ABRecordCopyCompositeName is only available on iOS as of this writing. There does not appear to be equivalent public API in OS X.