ABPersonRecord Company Extract

My iOS application displays the contents of the user's address book with some elements of the application interface. One of the problems that I can’t understand is where in the AddressBookframework whether the person is marked as company 'is stored, or not. Here's a screenshot using the checkbox in the app for the Mac address book (sorry for the Dutch there, “Bedrijf” means “Company”).

Screenshot of the OSX Address Book app, 'Bedrijf' means 'Company'Screenshot of the OSX Address Book app, company checkbox is off

You cannot edit this property on your iOS device, but it will sync if you use iCloud or some other sync service. As you can see, this affects whether to use the first / last name or company name to display this contact, and it changes the placeholder icon.

I repeat the contents ABAddressBookCopyArrayOfAllPeople(addressBook);and extract the information I need from the instances ABRecordRef. I use the "Personal Information Properties" constants listed in the reference guide , but I just can’t find the constant to get on the note whether the person is marked as a company or person.

I am looking for a flag with something like "company" or "organization", but I obviously am looking the wrong way. Who can point me in the right direction?

+3
source share
1 answer

You almost found this: Property Type of person kABPersonKindProperty property has values kABPersonKindPersonorkABPersonKindOrganization

+2
source

All Articles