2011-01-20 15 views

答えて

2

が、これは便利見つけることを願っています。

ABAddressBookRef addressBook = ABAddressBookCreate(); 
CFArrayRef allPeople = ABAddressBookCopyArrayOfAllPeople(addressBook); 
CFIndex nPeople = ABAddressBookGetPersonCount(addressBook);  
for(int i = 0 ; i < nPeople ; i++) 
{ 
    ABRecordRef person = CFArrayGetValueAtIndex(allPeople, i); 

    //Get First Name 
    NSString* firstName = (NSString *)ABRecordCopyValue(person, kABPersonFirstNameProperty); 
    //Get Last Name 
    NSString* lastName = (NSString *)ABRecordCopyValue(person, kABPersonLastNameProperty); 
} 
関連する問題