AB UI displays phone number incorrectly in call-confirmation dialog in OS 3.0

Originator:yahoo
Number:rdar://7012356 Date Originated:26-Jun-2009 04:03 PM
Status:Duplicate/7018549 Resolved:
Product:iPhone Product Version:3.0 (7A341)
Classification:Serious Bug Reproducible:Always
 
** Summary:

OS 3.0 introduced a new call-confirmation dialog that is presented to the user any time a 3rd-party app attempts to dial.

If that dialog is invoked from an Address Book UI view controller
(ABPeoplePickerNavigationController or ABPersonViewController) then the
confirmation dialog displays the target phone number incorrectly.

Instead of saying:

    (444) 555-1212
   [Cancel]  [Call]

instead it will say:

   4445551212abuid2706
   [Cancel]  [Call]

This makes my app look very broken to the end-user.


** Steps to Reproduce:

1) Create new project from the 'View-based Application' template
2) Add to the bottom of -applicationDidFinishLaunching:

    ABPeoplePickerNavigationController *picker =
            [[ABPeoplePickerNavigationController alloc] init];
    picker.peoplePickerDelegate = self;
    [viewController presentModalViewController:picker animated:YES];
    [picker release];

3) Mark the delegate @interface as implementing
ABPeoplePickerNavigationControllerDelegate protocol, with
<ABPeoplePickerNavigationControllerDelegate>

4) Provide basic "YES" implementations for the
ABPeoplePickerNavigationControllerDelegate in the app delegate:
- 
(void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationCon
troller *)peoplePicker
{
    NSLog(@"peoplePickerNavigationControllerDidCancel:%@", peoplePicker);
    [viewController dismissModalViewControllerAnimated:YES];
}


- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController
*)peoplePicker
    shouldContinueAfterSelectingPerson:(ABRecordRef)person
{
    NSLog(@"peoplePickerNavigationController:%@ shouldContinueAfterSelectingPerson:%@", peoplePicker, person);
    return YES;
}

- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController
*)peoplePicker
    shouldContinueAfterSelectingPerson:(ABRecordRef)person
    property:(ABPropertyID)property
    identifier:(ABMultiValueIdentifier)identifier
{
    NSLog(@"peoplePickerNavigationController:%@ shouldContinueAfterSelectingPerson:%@ property:%ld identifier:%ld", peoplePicker, person, property, identifier);
    return YES;
}

5) Compile, install on device, run, choose contact, tap phone number, see
broken display in dialog.


** Expected Results:

Call-confirmation dialog displaying:

    (444) 555-1212
   [Cancel]  [Call]

(or, better, no dialog -- this dialog is perhaps not the best idea to come out of Apple; but that's not the key point of this bug)


** Actual Results:

Call-confirmation dialog displaying:

   4445551212abuid2706
   [Cancel]  [Call]


** Notes:

Screen shot and sample project attached. The sample project matches the code in the steps-to-reproduce above, except also has a workaround that is disabled with an '#if 0' section.

Note that the phone number is indeed correctly dialed, but in my experience so far most users have already become confused, assume it will do the wrong thing, and don't even try to complete the call, instead just assuming this functionality in my app is broken.

The apparent workaround is to intercept the initiate-call action, extract the phone number information, then create and open a tel: URL; however, this requires processing the phone number, as characters that address book may provide (such as parenthesis around area codes) can break the creation of the tel: URL.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!