开发者

How do you access the current user's record in Address Book?

Is there a way in the Address Book API to access the current user's record programatically? In other words, if this iPhone belongs to John Smith, to get the contact record that is John Smith (whichever record is marked a开发者_如何转开发s Me in Contacts)?

Obviously you can popup the picker and let the user select themselves from their Contacts, but this seems like an unnecessary action for the user to take.

Use case: I have a form in my app and I'd like to pre-populate the form for the user based on their contact info they've already entered. It would be nicer to just display this for them than make them go through all of their contacts and select themselves.


There is no access to the users address book card. The reason is that Apple don't want apps to have the ability to see potentially personal information without the user first giving the app access to that information.

I, for one, would not want an app to be able to read my email address, phone number, and home address from my card and do what it pleases with it unless I said it could in the first place.

For that reason, you will have to present the user with the address book picker and allow them to select their address book entry.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜