Yes, Deferred allows to call Just on retry but doesn't explain why print changes behaviour of sequence. Anyway, @squirrel987 thank you for suggestion!
Post
Replies
Boosts
Views
Activity
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
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, 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.
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, I've marked wrong post as solved answer but can't find a way how to change it. Any way to change?
What I can do is mark my initial response as Apple Recommended (-:
Awesome! Thank you
I've tried to add NavigationView but it doesn't help
I tried to create an empty project and paste your code. Live preview for alert works now but it doesn't work for my project. I will investigate what's different between projects. Anyway, thank you for help @workingdogintokyo
Nathan, if it helps I opened
Feedback Assistant: FB9584439
TSI Case ID: 779392495
Hello Nathan,
Thank you for investigation and response. I'm glad that my report helped to detect the issue. We as a first adopters of SwiftUI are really inspired to make it better and help to overcome young diseases.
Good news that macOS Monterey (12.0) doesn't have this issue. We will update our development and CI instances to Monterey when it is officially released. Unfortunately, we don't want to increase minimum requirements for our customers so we are definitely interested in a workaround. I tried that you suggested for var body: some View of PickerWithBindingView but still have memory leaks.
My steps:
Deleted all the .containerAccessibility from MainView.swift
Added in PickerWithBindingView.swift:
VStack {
..... previous body
}
.accessibilityElement(children: .contain)
.accessibilityIdentifier("picker-with-binding-view")
I pushed it to separate branch: https://github.com/yuri-qualtie/MemoryLeaks/tree/try-workaround
Could you please try? Maybe I misunderstood your suggestion for workaround.
Thanks,
Yuri-
I opened TSI for the issue and got reply from Apple DTS Engineer that resolves my issue:
The automationmodetool command line tool allows you to manage UI automation security preferences, see its man page for details. To resolve your issue, run the following command as a administrator on your machine:
automationmodetool enable-automationmode-without-authentication
To disable this mode, run the following command as a administrator on your machine:
automationmodetool disable-automationmode-without-authentication
Note that the man page shows leading dash in front of each of the above two commands, it is a bug. Please disregard it and use the commands as described above.
Same for macOs App built on SwiftUI. Started to happen after update to macOS 12.1 and Xcode 13.2
We got same issue. As a workaround we successfully submitted our App to AppStore with Xcode 13.1
Still happens on Monterey 12.1 and Xcode 13.2