Find Favorite contacts from the iOS Address Book API

只谈情不闲聊 提交于 2019-12-17 19:38:32

问题


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.


回答1:


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.




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/6917329/find-favorite-contacts-from-the-ios-address-book-api

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!