I've tried to add NavigationView but it doesn't help
Post
Replies
Boosts
Views
Activity
What I can do is mark my initial response as Apple Recommended (-:
Awesome! Thank you
Quinn, I've marked wrong post as solved answer but can't find a way how to change it. Any way to change?
It looks like -AppleMetricUnits false/ works as expected. It's important to set false/ not just false
Quinn, thank you very much for your attentiveness and help!
Quinn, we double checked the issue on different machine. Unfortunately, it still reproducible. Here is a screenshots: https://github.com/yuri-qualtie/UseMetricSystemDemo/issues/1
We submitted DTS with Follow-up: 767934016 and referenced this thread as you suggested.
My region - Russia and Measurement units: Metric.
I’m testing with Xcode 12.4 on macOS 11.2.3 with my Mac’s region set to United Kingdom (I also tried Australia, just in case it was specific to the oddball UK measurement system).
Could you please click "Advanced..." at Language & Region Preferences and change Measurement units to "Metric". It looks like that AppleLocale or AppleMetricUnits doesn't override measurement units
Quinn, thank you for reply!
I've just tried
AppleLocale en_US -AppleMetricUnits false/ -AppleMeasurementUnits Inches
but unfortunately it doesn't help.
I've updated my example project at https://github.com/yuri-qualtie/UseMetricSystemDemo in case you want take a look.
We definitely won't use these arguments in production code. It's just for UITests
I put some simple code example with print but actually I test in the example App - https://github.com/yuri-qualtie/UseMetricSystemDemo by following code:
struct ContentView: View {
var body: some View {
VStack {
Text("Current Locale: \(Locale.current.regionCode!)")
Text("Curren Locale uses metric system: " + "\(Locale.current.usesMetricSystem)")
.padding()
Text("US Locale: \(Locale(identifier: "en_US").regionCode!)")
Text("US uses metric system: " + "\(Locale(identifier: "en_US").usesMetricSystem)")
.padding()
}
}
}
So I always see:
Current Locale: US
Curren Locale uses metric system: true
US Locale: US
US uses metric system: false
Yes, Deferred allows to call Just on retry but doesn't explain why print changes behaviour of sequence. Anyway, @squirrel987 thank you for suggestion!