if you already have the details and you just want to write them to the address book then you don't need the - ABNewPersonViewController.
the ABNewPersonViewController is used for letting the user to add record to the address book with the common controller of the iphone address book.
instead you should do the following:
a) add the address book () frame work to your app.
b) import the address book headers to your view.
c) create an addressbook instanse and a new record:
ABAddressBookRef iPhoneAddressBook = ABAddressBookCreate();
ABRecordRef newPerson = ABPersonCreate();
d) for single value properties you use:
ABRecordSetValue(newPerson, kABPersonFirstNameProperty, CFSTR("Katie"), nil);
ABRecordSetValue(newPerson, kABPersonLastNameProperty, CFSTR("Bell"), nil);
e)for the multy value properties such as phone number / mail you use:
ABMutableMultiValueRef multiPhone = ABMultiValueCreateMutable(kABMultiStringPropertyType);
ABMultiValueAddValueAndLabel(multiPhone, @"054-5429920", kABHomeLabel, NULL);
ABMultiValueAddValueAndLabel(multiPhone,@"02-9809878", kABWorkLabel, NULL);
ABRecordSetValue(newPerson, kABPersonPhoneProperty, multiPhone,nil);
CFRelease(multiPhone);
ABMutableMultiValueRef multiEmail = ABMultiValueCreateMutable(kABMultiStringPropertyType);
ABMultiValueAddValueAndLabel(multiEmail, @"shannoga@me.com", kABHomeLabel, NULL);
ABRecordSetValue(newPerson, kABPersonEmailProperty, multiEmail, &error);
CFRelease(multiEmail);
f) save the changes to the address book, none of the code you wrote wond take effect with out this:
ABAddressBookAddRecord(addressBook, newPerson, nil);
BOOL didAdd = ABAddressBookSave(addressBook, nil);
g) relese the record and the address book and check if the record addaed:
CFRelease(newPerson);
CFRelease(addressBook);
NSLog(@"didAdd = %d",didAdd);
thats all
good luck
hope it helped
shani