My problem is similar to this post but switching to an iOS 17 simulator does not fix the issue.
As far as I know there should be no OS_ACTIVITY_DT_MODE set anywhere in my project but I'm not sure exactly where to check.
I've tried in Beta 6 and 7 so far and I've set all of my minimums to iOS 17.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
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)
}
}
}
}
}
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
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)")
}
}
}