I’m rolling my own PeoplePicker, using the following code to get all my contacts:
ABAddressBookRef ab = ABAddressBookCreate(); ABRecordRef source = ABAddressBookCopyDefaultSource(ab); NSArray *allContacts = (NSArray *) ABAddressBookCopyArrayOfAllPeopleInSourceWithSortOrdering(ab, source, ABPersonGetSortOrdering());
It’s worked fine during development, but now we’re in beta, and a user complained that when they went to choose a contact in my app, the list they were given to choose from was a small subset of all their contacts in their phone.
We pinned it down to the fact that it was actually just displaying one of their groups.
A while later, I realized you can set your default group in Settings > Mail, Contacts, Calendars > Contacts > Default Group
If a user has a specific group selected, then just that group displays in my app.
I think this is because I’m using ABAddressBookCopyDefaultSource to get all the contacts.
How can I grab all a user’s contacts without regard to the default source?
Thanks!
try this,