Instead of converting the string to a number, you can do a "transliteration" to the Latin script, using CFStringTransform()
from the Foundation library:
let arabicPhoneNumber = "٠١٠١٢٣٤٥٦٧٨٩"
// We need a CFMutableString and a CFRange:
let cfstr = NSMutableString(string: arabicPhoneNumber) as CFMutableString
var range = CFRange(location: 0, length: CFStringGetLength(cfstr))
// Do the transliteration (this mutates `cfstr`):
CFStringTransform(cfstr, &range, kCFStringTransformToLatin, false)
// Convert result back to a Swift string:
let phoneNumber = cfstr as String
print(phoneNumber) // 010123456789
This preserves all digits as well as possible separators.
Remark: The above example (from the question) contains "Arabic Indic" digits, for example ١
= U+0661 = "ARABIC-INDIC DIGIT ONE".
These are correctly transliterated on macOS 10.12 and iOS 10.
On earlier OS versions,
CFStringTransform(cfstr, &range, kCFStringTransformLatinArabic, true)
CFStringTransform(cfstr, &range, kCFStringTransformStripCombiningMarks, false)
worked correctly in my tests to convert arabic digits to latin.