ABAdressbook get FullName from Telephonenumber
Hi I want to search the ABAdressbook and g开发者_运维技巧et the name from a given telephone number? How can I do that?
You can't.
There are just a few ways of interacting with ABAdressBook
.
The most impartant ones are saving or deleting ABPerson
entrys by giving IDs and the ABPeoplePickerNavigationControllerDelegate. It seems, this is for reasons of privacy, so that the only way to get info out of th AB is over the user.
EDIT:
Maybe i was wrong... check out if this helps you.
look at https://github.com/erica/ABContactHelper there is a method called contactsMatchingPhone which is what you want to use.
NSArray *match = [ABContactsHelper contactsMatchingPhone:@"your number"];
You can then use the ABContact helper to iterate through the results.
精彩评论