2

I have added the framework:

#import "AddressBook/ABAddressBook.h"
#import "AddressBookUI/AddressBookUI.h"

I want to get the image.you can modify my code ,or give me links

ABAddressBookRef addressBook = ABAddressBookCreate();
    CFArrayRef nameArray = ABAddressBookCopyArrayOfAllPeople (addressBook);

    m_SourceContactsUserArray = [[NSMutableArray alloc] init];
    for (int i = 0; i<CFArrayGetCount(nameArray); i++) {
        ABRecordRef person = CFArrayGetValueAtIndex(nameArray, i);
        NSString *personName = (NSString*)ABRecordCopyValue(person,kABPersonFirstNameProperty);
        [m_SourceContactsUserArray addObject:personName];
    }
    CFRelease(addressBook);
    CFRelease(nameArray);

thank you very much.

iamsult
  • 1,581
  • 1
  • 15
  • 21
Gaojian922188
  • 503
  • 3
  • 9
  • 20
  • possible duplicate of [Get image of a person from AddressBook](http://stackoverflow.com/questions/2085959/get-image-of-a-person-from-addressbook) – CanSpice Feb 20 '12 at 19:52

1 Answers1

4

The below links will definitely help you...

http://adeem.me/blog/2009/04/02/get-image-from-contact-stored-in-addressbook/

or

Get image of a person from iPhone address book

Community
  • 1
  • 1
Praveen
  • 301
  • 2
  • 11