Hello.
I've seen some other posts about NavigationStack, but my variation seems a little different.
FYI, I have not migrated from ObservableObject to Observable yet. However, having a path in either seems to be a factor in this issue.
My code has no issues when built with Xcode 15.
When built with Xcode 16 I keep hitting scenarios where the .onAppear for my first tab gets called over and over again endlessly.
If I go to my second tab, which uses a NavStack with a path and then navigate anywhere my .onAppear for my FIRST tab gets call endlessly. I’ll sometimes see a “double push” to the stack. (Someone posted a video of this happening on Mastodon, which apparently I’m not allowed to link to here.) The second tab is accessing the path property via an @EnvironmentObject.
I can stop this endless loop by removing @Published from the property in my ObservableObject that holds my path.
But then if I go to my third tab, which does NOT use a path, the .onAppear for my FIRST tab again gets called endlessly.
So far on Mastodon I’ve seen three people encountering problems possibly related to storing a path in something being observed.
Feedback requires a sample project, which I am having trouble creating to show the problem.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Version 14.0 beta 4 (14A5284g)
This is all referring to the simulator.
When I run the Shortcuts app my phrase is properly shown for my app and the app's name is correctly populated.
However, when I try to add a SiriTipView the same phrase shows the application name as ${APPLICATIONNAME}. I changed the first letter of the phrase and verified the change showed up in the Shortcuts app and my app tip.
I'm not sure if I'm doing something wrong or should file feedback instead.
I'm using UICalendarView in my SwiftUI app. Inside of my func calendarView() I'm specifying emojis for decorations for certain days and they're showing up just fine. The problem is that VoiceOver completely ignores the decorations. If I touch a day it says the date and "button", which is exactly what I want. I've tried adding all of the accessibility items below but none of them cause VoiceOver to mention the day's decoration.
return .customView {
let emoji = UILabel()
emoji.text = foundEvent.emoji
emoji.isAccessibilityElement = true
emoji.accessibilityIdentifier = "identifier"
emoji.accessibilityTraits = .staticText
emoji.accessibilityLabel = "I like turtles."
emoji.accessibilityValue = foundEvent.emoji
emoji.accessibilityHint = "I also like turtles."
return emoji
}
I added gesture support to my app that supports iOS 16 and 17 and have never had issues with it.
However, when I compiled my app with Xcode 16 I immediately noticed a problem with the app when I ran it in the simulator. I couldn't scroll up or down. I figured out it’s because of my gesture support.
My gesture support is pretty simple.
let myDragGesture = DragGesture()
.onChanged { gesture in
self.offset = gesture.translation
}
.onEnded { _ in
if self.offset.width > threshold {
...some logic
} else if self.offset.width < -threshold {
...some other logic
}
logitUI.debug("drag gesture width was \(self.offset.width)")
self.offset = .zero
}
If I pass nil to .gesture instead of myDragGesture then scrolling starts working again.
Here’s some example output when I’m trying to scroll down. These messages do NOT appear when I run my app on an iOS 16/17 simulator with Xcode 15.
drag gesture width was 5.333328
drag gesture width was -15.333344
drag gesture width was -3.000000
drag gesture width was -24.333328
drag gesture width was -30.666656
I opened FB14205678 about this.