marmelroy / PhoneNumberKit

A Swift framework for parsing, formatting and validating international phone numbers. Inspired by Google's libphonenumber.
MIT License
5.11k stars 810 forks source link

How can I parse a number from a region different than the device? #737

Closed steve-u-level closed 5 months ago

steve-u-level commented 7 months ago

PhoneNumberKit determines the defaultRegionCode by accessing CNContactsUserDefaults, which returns "US" for my device, but I am attempting to parse a Chilean number (i.e., 56 XXX XXX XXX), and thus it fails. Is there a way around this behavior to parse international numbers from a US device? I do not know the region of the international number beforehand.

github-actions[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.