From 1dff5a30519f7f9d5a360b4e2bcbe6aeaf0b869d Mon Sep 17 00:00:00 2001 From: aaumond <79145906+aaumond@users.noreply.github.com> Date: Fri, 4 Nov 2022 15:46:26 +0100 Subject: [PATCH] Update SwiftLibphonenumberPlugin.swift --- .../ios/Classes/SwiftLibphonenumberPlugin.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libphonenumber_plugin/ios/Classes/SwiftLibphonenumberPlugin.swift b/libphonenumber_plugin/ios/Classes/SwiftLibphonenumberPlugin.swift index fbc46af..4566a39 100644 --- a/libphonenumber_plugin/ios/Classes/SwiftLibphonenumberPlugin.swift +++ b/libphonenumber_plugin/ios/Classes/SwiftLibphonenumberPlugin.swift @@ -90,7 +90,7 @@ public class SwiftLibphonenumberPlugin: NSObject, FlutterPlugin { do { let p : NBPhoneNumber = try phoneUtils.parse(phoneNumber, defaultRegion: isoCode.uppercased()) - let regionCode : String? = phoneUtils.getRegionCode(for: p) + let regionCode : String? = try phoneUtils.getRegionCode(for: p) let countryCode : String? = p.countryCode.stringValue as String let formattedNumber : String? = try phoneUtils.format(p, numberFormat: NBEPhoneNumberFormat.NATIONAL)