开发者

Find Favorite contacts from the iOS Address Book API

开发者 https://www.devze.com 2023-03-24 12:34 出处:网络
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 Con开发者_JAVA技巧tacts app. Favorites are stored insid

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 Con开发者_JAVA技巧tacts app.


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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消