Post

Replies

Boosts

Views

Activity

View.navigationLinkIndicatorVisibility(_:) crashes apps running on iOS 18.x
Apps crash on launch when using View.navigationLinkIndicatorVisibility(_:) (which is iOS 17.0+ iPadOS 17.0+ Mac Catalyst 17.0+). Catalyst also crashes. Stack trace starts with: Symbol not found: _$s7SwiftUI17EnvironmentValuesV33_navigationIndicatorVisibilityABIAA0G0OvpMV Xcode 26.0.1 (17A400) iPadOS 18.3.1 (22D8075) It also crashed a user on iOS 18.6.2 macOS 15.6.1 (24G90) FB20596543 import SwiftUI @main struct NavLinkDisabledApp: App { var body: some Scene { WindowGroup { NavigationStack { List { NavigationLink("Text") {} .navigationLinkIndicatorVisibility(.hidden) } } } } }
4
0
132
Oct ’25
Crash when triggering sheet presentation from a task
Given the following code, if line 17 isn't present there'll be a crash upon presenting the sheet. Since content shouldn't be nil at the time of presentation, why does this crash? import SwiftUI struct ContentView: View { @State private var isPresented = false @State private var content: String? @State private var startTask = false var body: some View { Text("Tap me") .onTapGesture { startTask = true } .task(id: startTask) { guard startTask else { return } startTask = false // <===== Crashes if removed content = "Some message" isPresented = true } .sheet(isPresented: $isPresented) { Text(content!) } } } iOS 16.4, Xcode 14.3.1
6
0
998
Aug ’23
Xcode 15 Breaks Usage Of TextField.focused()
My usage of TextField.focused() works fine in Xcode 14.3.1 but is broken as of Xcode 15. I first noticed it in the second beta and it's still broken as of the 4th beta. Feedback / OpenRadar # FB12432084 import SwiftUI struct ContentView: View { @State private var text = "" @FocusState var isFocused: Bool var body: some View { ScrollView { TextField("Test", text: $text) .textFieldStyle(.roundedBorder) .focused($isFocused) Text("Text Field Is Focused: \(isFocused.description)") } } }
7
1
1.6k
Feb ’25