AlexT
AlexT

Reputation: 616

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.

Upvotes: 4

Views: 606

Answers (2)

AlexT
AlexT

Reputation: 616

ABPerson's superclass ABRecord has the displayName property which is exactly what we need.

Upvotes: 0

Marco
Marco

Reputation: 6692

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.

Upvotes: 2

Related Questions