Here’s an updated version of this apple developer walkthrough of how to programmatically access the iPhone address book:

Note: only runs with physically connected iPhone – hence no screen shots.

The address book

The way to the iPhone address book is through the ABPeoplePickerNavigationControllerDelegate.

Yes you will need to import:

#import <AddressBook/AddressBook.h>
#import <AddressBookUI/AddressBookUI.h>

as described here.

When the user clicks the Tap me! button, we throw up the people picker navigation controller:

- (IBAction)readAddressBook:(id)sender {
    
    ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
    picker.peoplePickerDelegate = self;
    
    [self presentModalViewController:picker animated:YES];
}

Which then calls us later via the people picker callback:

- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
      shouldContinueAfterSelectingPerson:(ABRecordRef)person {
    
    NSString* name = (__bridge_transfer NSString *)ABRecordCopyValue(person, kABPersonFirstNameProperty);
    self.firstName.text = name;
    
    [self dismissModalViewControllerAnimated:YES];
    
    return NO;
}

Because we are done once we get the persons name and update the label we then dismiss the controller:

- (BOOL)peoplePickerNavigationController:
(ABPeoplePickerNavigationController *)peoplePicker
      shouldContinueAfterSelectingPerson:(ABRecordRef)person
                                property:(ABPropertyID)property
                              identifier:(ABMultiValueIdentifier)identifier{
    return NO;
}

Here’s the code in all it’s glory:

ViewController.m

#import "Spike3ViewController.h"
#import <AddressBook/AddressBook.h>
#import <AddressBookUI/AddressBookUI.h>

@interface Spike3ViewController() <ABPeoplePickerNavigationControllerDelegate>
@property (weak, nonatomic) IBOutlet UIButton *button;
@property (weak, nonatomic) IBOutlet UILabel *firstName;
@end

@implementation Spike3ViewController

@synthesize button = _button;
@synthesize firstName = _firstName;

- (IBAction)readAddressBook:(id)sender {
    
    ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init];
    picker.peoplePickerDelegate = self;
    
    [self presentModalViewController:picker animated:YES];
}

- (void)peoplePickerNavigationControllerDidCancel:
(ABPeoplePickerNavigationController *)peoplePicker {
    [self dismissModalViewControllerAnimated:YES];
}


- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
      shouldContinueAfterSelectingPerson:(ABRecordRef)person {
    
    NSString* name = (__bridge_transfer NSString *)ABRecordCopyValue(person, kABPersonFirstNameProperty);
    self.firstName.text = name;
    
    [self dismissModalViewControllerAnimated:YES];
    
    return NO;
}

- (BOOL)peoplePickerNavigationController:
(ABPeoplePickerNavigationController *)peoplePicker
      shouldContinueAfterSelectingPerson:(ABRecordRef)person
                                property:(ABPropertyID)property
                              identifier:(ABMultiValueIdentifier)identifier{
    return NO;
}

- (void)viewDidUnload {
    [self setButton:nil];
    [self setFirstName:nil];
    [super viewDidUnload];
}
@end