The following app builds, but causes a runtime crash when trying to execute on an iOS 14.7 device. Using Xcode 13b5, macOS Monterey b5, iOS 15.b6 & iOS 14.7
import SwiftUI
struct ContentView: View {
@State private var text = "This app causes a runtime error on ios 14.7"
@available(iOS 15.0, *)
@FocusState var isInputActive: Bool
var body: some View {
if #available(iOS 15.0, *) {
TextEditor(text: $text)
.focused($isInputActive)
} else { // ios14 or <
TextEditor(text: $text)
}
}
}