Find Favorite contacts from the iOS Address Book API
Asked Answered
P

3

12

Is there a way to find Favorite contacts from the iOS Address Book API? I'm referring to the contacts a user places in his Favorites tab in the Contacts app.

Poach answered 2/8, 2011 at 19:15 Comment(0)
U
21

Favorites are stored inside Phone.app, not inside the Address Book database itself. You can't access other app's sandbox on a non-jailbroken iPhone, so unfortunately the answer is no.

Also, it would be pretty bad for privacy if any app could see your favorite contacts. It's already bad that it can access entire address book without asking you.

Uranic answered 8/8, 2011 at 9:43 Comment(4)
Since this discussion is more than two years old, has something changed maybe? What about iOS 7?Useless
@Joqn nope, still the same. You just need users' approval to access their contacts since iOS 6.0 :)Uranic
Is this still true using Contacts?Weingartner
@Weingartner it is.Uranic
P
7

Filip is correct, you cannot access the list of favorite contacts on iOS via a public, app-store legal API.

To come close you could try to guess a user's favorite or most important contacts from their address book. Let's assume that people know most about the people they are closest to and that this is also reflected by their phone's address book:

For example, the address book contact for a close friend contains more information (address, birthday, maybe a nickname) than a contact for a business associate or a colleague at work.

We could then use this information to compute an importance score for each address book contact. By taking the n most important contacts we could approximate a user's favorite contacts.

I've written about this idea some more on my blog: http://dbader.org/blog/guessing-favorite-contacts-ios You can also find a sample implementation and a demo application there.

Palma answered 9/1, 2013 at 12:19 Comment(2)
I think Path (path.com) is also doing something like this to populate their "invite friends" list.Palma
I dont know if you can check if the contact is a facebook contact, facebook contacts have lots of information.Guck
L
1

I have searched through the API and could not find any appropriate methods. Maybe Apple believes that this is a Phone-app data field or maybe it is about security. I'd love to use it, too.

Lightman answered 8/8, 2011 at 9:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.