We used Locale::usesMetricSystem to distinguish between metric and Imperial(US) measurement systems. We set "-AppleLocale en_US" as launch argument for App in UITests but usesMetricSystem still returns true in case user's locale are not equal to "US" in System Preferences -> Language and Region -> Region.
Here is a demo project to illustrate the issue: https://github.com/yuri-qualtie/UseMetricSystemDemo
Precondition: Change user region to not US(for example Australia) in System Preferences -> Language and Region -> Region
We expect that code:
prints false when -AppleLocale en_US is set but actual result is true
Probably there is alternative way how to change measurement system via launch arguments or App's settings in Xcode?
Here is a demo project to illustrate the issue: https://github.com/yuri-qualtie/UseMetricSystemDemo
Precondition: Change user region to not US(for example Australia) in System Preferences -> Language and Region -> Region
We expect that code:
Code Block print(Locale.current.usesMetricSystem)
prints false when -AppleLocale en_US is set but actual result is true
Probably there is alternative way how to change measurement system via launch arguments or App's settings in Xcode?