I recently changed from coding SwiftUI on my Macbook Pro with Catalina beta to a Macbook Pro with Mojave 10.14.6 (18G103)
.
Using iPhone Simulator, whenever I focus a TextField
, even the most simple app hangs. I cannot input any text and I cannot focus another textfield.
But it works (app does not hang, and textfield receives input) using an iPhone Device (instead of simulator) or using Catalina Beta (with simulator or device).
Has anyone else had this problem?
struct ContentView: View {
@State private var firstName = ""
@State private var lastName = ""
// Using an iOS 13 Simulator, focusing any of the TextFields below on macOS Mojave result in the app hanging. We cannot input anything and we cannot focus another textfield.
// However, this works just fine on macOS Catalina Beta `19A558d` (will upgrade to Beta 11 now)
var body: some View {
VStack {
TextField("First", text: $firstName)
TextField("Last", text: $lastName)
Text("Your name: '\(firstName) \(lastName)'")
}
}
}
Maybe not the most convenient solution, but since Catalina was released today, I tried updating to it and the issue was resolved.