Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Filtering out email addresses from ABPeoplePickerNavigationController

I'm using ABPeoplePicker to show a list of contacts.

I'd like to filter this list of contacts to only show the contacts that have email addresses. How would I do so?

like image 259
smtlaissezfaire Avatar asked Mar 28 '11 17:03

smtlaissezfaire


2 Answers

I needed it, so I started working on something like that. Check out https://github.com/stuffmc/MCFilteredPeoplePickerNavigationController

like image 194
StuFF mc Avatar answered Sep 28 '22 19:09

StuFF mc


here is the good blog tutorial for extracting address book values,

http://blog.slaunchaman.com/2009/01/21/cocoa-touch-tutorial-extract-address-book-address-values-on-iphone-os/

try with below:

ABPeoplePickerNavigationController *peoplePicker = [[ABPeoplePickerNavigationController alloc] init];
    [peoplePicker setPeoplePickerDelegate:self];
    [peoplePicker setDisplayedProperties:[NSArray arrayWithObject:[NSNumber numberWithInt:kABPersonEmailProperty]]];
like image 35
Jhaliya - Praveen Sharma Avatar answered Sep 28 '22 20:09

Jhaliya - Praveen Sharma