I\'ve looked into NSFormatter
, NSNumberFormatter
, and the other formatting classes, but can\'t find a build into solution. I need to format phone n
You can try this:
let phoneNumber : CNPhoneNumber
let digits = phoneNumber.performSelector("digits").takeRetainedValue() as! String
It gives you directly the string, without formatting, with the phone number. However if the number is saved with international prefix, you will have it also in the resulted string.