Telephone Number Formatting

Originator:dulio.denis
Number:rdar://15516158 Date Originated:20-Nov-2013 02:20 PM
Status:Open Resolved:
Product:iOS SDK Product Version:7.0.4
Classification:Feature (New) Reproducible:Always
 
Summary:
On the iPhone the Apple Contacts App has private API for Phone Number Formatting that is not public.  This is evident when inserting an AddressBook Phone Number Record with a leading one or without having the format correctly handled as 1 (###) ###-#### or (###) ###-####. This is also evident in International phone number strings such as 011-(Country Code)-...  

Making the API public would enable developers to consistently display phone numbers on the iPhone to match the Apple phone number formatting.

Steps to Reproduce:
1. Create an App with the ABAddressBook Framework.
2. Insert a contact with a phone number record 4089961010 into the Address Book.
3. Look at it in the Contacts App. Number is formatted as (408) 996-1010
4. There is no way to format this number in Xcode without writing an NSFormatter and some regular expression to parse the pattern in order to apply the proper format.

Expected Results:
Expect an API to format phone numbers on the iPhone based on the locale.

Actual Results:


Version:
iOS 7.0.4

Notes:


Configuration:


Attachments:

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!