ABUnknownPersonViewController will not behave like unknown, recent call
Unfortunately, the SDK seems to force me to specify the phone number in advance as a mobile/home/work/etc. number.
If you look at Apple's implementation, they put the number in bold at the top and then when you specify Create New Contact/Add to Existing Contact, you can choose to put it as mobile/home/work/etc.
(And if you look closely, when you Add to Existing Contact they will try to first to assign it as a mobile number, then home number, then work number, etc.. down the hierarchy automatically.)
My question to you is, how can I recreate Apple's implementation of assigning a phone number?
This is what I'm having to do now..
// Create the person with a phone number of a given type (mobile)
ABRecordRef person = ABPersonCreate();
CFErrorRef *error = NULL;
ABMultiValueRef phoneNumbers = ABMultiValueCreateMutable(kABPersonPhoneProperty);
BOOL addedNumber = ABMultiValueAddValueAndLabel(phoneNumbers, @"987-654-3210", kABPersonPhoneMobileLabel, NULL);
if (addedNumber)
ABRecordSetValue(person, kABPersonPhoneProperty, phoneNumbers, error);
// Create the unknown view controller and add the person
ABUnknownPersonViewController *personViewController = [[ABUnknownPersonViewController alloc] init];
personViewController.displayedPerson = person;
personViewController.allowsAddingToAddressBook = YES;
personViewController.allowsActions = YES; // this doesn't seem to work?
personViewController.unknownPersonViewDelegate = self;
personViewController.alternateName = @"987-654-3210";
personViewController.message = @"August 17, 2008 3:20 PM";
// will eventually make this modal view controller
[self.navigationController pushViewController:personViewController animated:YES];
Mac Pro and Macbook Pro, Mac OS X (10.5.4)