I have following code in func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool
var phoneNumber: String?
if let callIntent = interaction.intent as? INStartVideoCallIntent {
phoneNumber = callIntent.contacts?.first?.personHandle?.value
} else if let callIntent = interaction.intent as? INStartAudioCallIntent {
phoneNumber = callIntent.contacts?.first?.personHandle?.value
}
Phone number has only 10 digit. But when I check the count it shows 12 Digits
When I print the string
I have tried
phoneNumber?.trimmingCharacters(in: .whitespacesAndNewlines).count
phoneNumber?.trimmingCharacters(in: .symbols).count
but it still returns 12
Please help