You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having an issue getting the correct country back from getRegionCode(forCountryCode:). For the following code, I am getting "US" back when I should be getting "CA". Can someone tell me if there is an issue with the library or if my code is incorrect?
let fullPhoneNumber = "+15065552222"
guard let phoneUtil = NBPhoneNumberUtil.sharedInstance() else {
return "error"
}
do {
let phoneNumber = try phoneUtil.parse(fullPhoneNumber, defaultRegion: "ZZ")
return phoneUtil.getRegionCode(forCountryCode: phoneNumber.countryCode)
} catch {
return "error"
}
The text was updated successfully, but these errors were encountered:
I am having an issue getting the correct country back from getRegionCode(forCountryCode:). For the following code, I am getting "US" back when I should be getting "CA". Can someone tell me if there is an issue with the library or if my code is incorrect?
The text was updated successfully, but these errors were encountered: