iOS get user contacts excluding businesses

Posted by Kyle Begeman on Stack Overflow See other posts from Stack Overflow or by Kyle Begeman
Published on 2014-08-20T03:07:53Z Indexed on 2014/08/20 4:22 UTC
Read the original article Hit count: 178

Filed under:
|

I have an app that is loading all of a users contacts. I would like to exclude any business, but I can't seem to find a way to determine if a contact is a business.

I initially considered check if the "company" field contains a value when the first and last name do not, but I can't find this property from the ABRecord.

Here is how I am grabbing the first and last name:

NSString *firstName = (__bridge_transfer NSString *)ABRecordCopyValue(contactPerson, kABPersonFirstNameProperty);
NSString *lastName = (__bridge_transfer NSString *)ABRecordCopyValue(contactPerson, kABPersonLastNameProperty);

Any ideas? Thanks!

© Stack Overflow or respective owner

Related posts about ios

Related posts about abrecord