My iOS app is showing the contents of a user's address book with some app-specific UI elements. One challenge that I'm unable to figure out, is where in the AddressBook framework it's stored whether a person is marked 'as a company', or not. Here's a screenshot of the checkbox in the Mac address book app (sorry for the Dutch in there, 'Bedrijf' means 'Company').

You can't edit this property on an iOS device, but it syncs over if you use iCloud or some other sync service. As you see, it influences whether the first-name/last-name or the company name should be used to display this contact and it changes the placeholder icon.
I'm iterating over the contents of ABAddressBookCopyArrayOfAllPeople(addressBook); and extract the info I need from the ABRecordRef instances. I'm using the 'Personal Information Properties' constants listed in the reference guide, but I just can't find the constant to get at the flag whether a person is marked as a company or a person.
I'm looking for a flag with something of 'company' or 'organization' in there, but I'm obviously looking in the wrong place. Who can point me in the right direction?
You've almost found it: Person Type Property
kABPersonKindProperty property has values of kABPersonKindPerson or kABPersonKindOrganization
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With