title: Creating an iPhone contact in Objective-C
body: <p>I am trying to create a contact in the internal address book. My code is as follows:</p>
  
  <p>in the CreateNewAccountPage.h file:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import &lt;Foundation/Foundation.h&gt;
  #import &lt;AddressBook/AddressBook.h&gt;
  #import &lt;AddressBookUI/AddressBookUI.h&gt;
  ....
  @interface CreateNewAccountPage : UIViewController &lt;UIScrollViewDelegate,
  UITextViewDelegate, MainMenuDelegate, ABNewPersonViewControllerDelegate&gt; {
  ....
  }
  
  - (IBAction)goToContactCreation;
  ...
  @end
  </code></pre>
  
  <p>In the CreateNewAccountPage.m file:</p>
  
  <pre><code>#import "CreateNewAccountPage.h"
  
  @implementation CreateNewAccountPage
  
  -(void)showNewPersonViewController
  {
  ABNewPersonViewController *picker = [[ABNewPersonViewController alloc] init];
  picker.newPersonViewDelegate = self;
  
  UINavigationController *navigation = [[UINavigationController alloc]    initWithRootViewController:picker];
  [self presentModalViewController:navigation animated:YES];
  
  [picker release];
  [navigation release];
   }
  
   -(IBAction)goToContactCreation {
  [self showNewPersonViewController];
   }
  
   - (void)newPersonViewController:(ABNewPersonViewController *)newPersonViewController didCompleteWithNewPerson:(ABRecordRef)person
   {
  [self dismissModalViewControllerAnimated:YES];
   }
   ...
   @end
  </code></pre>
  
  <p>The error that I am getting is:</p>
  
  <p>"_OBJC_CLASS_$_ABNewPersonViewController", referenced from:
  objc-class-ref-to-ABNewPersonViewController in CreateNewAccountPage.o
  ld: symbol(s) not found
  collect2: ld returned 1 exit status</p>
  
  <p>If I comment out the lines:</p>
  
  <pre><code>ABNewPersonViewController *picker = [[ABNewPersonViewController alloc] init];
  picker.newPersonViewDelegate = self;
  ...
  [picker release];
  </code></pre>
  
  <p>I no longer receive the error. I am just trying to get a contact to be created. It doesn't have to do with accessing the contact list. I just want a button to create the contact.</p>
  
  <p>Thanks so much!</p>