-
Notifications
You must be signed in to change notification settings - Fork 848
Open
Description
The value of CNContactsUserDefaults.shared().countryCode.uppercased() is actually address format, not the current region user has set on macOS. On top if user deletes default value or has been upgrading from old macOS version it will have legacy values which cause the korean bug....
This was already mentioned before in #694
| // macCatalyst OS bug if language is set to Korean |
// macCatalyst OS bug if language is set to Korean
// CNContactsUserDefaults.shared().countryCode will return ko instead of kr
// Failed parsing any phone number.
let countryCode = CNContactsUserDefaults.shared().countryCode.uppercased()
import Contacts
let locale = Locale.current
locale.language
locale.region
let countryCode = CNContactsUserDefaults.shared().countryCode.uppercased()
print(countryCode)
This will print SK and SN (region Slovakia but address format Senegal)
New Issue Checklist
- [x ] Updated PhoneNumberKit to the latest version
- Phone number formatted correctly on JavaScript version
- I searched for existing GitHub issues
- I am aware that this library is not responsible of adding/removing/changing phone number formats and any request should be done at libphonenumber repo
Steps to reproduce
Expected result
Actual result
Environment
Metadata
Metadata
Assignees
Labels
No labels
