marmelroy / PhoneNumberKit

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

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

Closed steve-u-level closed 8 months ago

steve-u-level commented 10 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 8 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.