I’m seeing some differences in iOS 18 beta 6 (but still using Xcode 16 beta 5). I won’t call them “improvements” as the feature is still not reliable, but I do see changes propagating to the main context sometimes.
There hasn’t been a single mention of SwiftData in any of the release notes so far: no known issues, nothing fixed. And that’s concerning, as I am seeing plenty of issues in addition to this one.
Post
Replies
Boosts
Views
Activity
Glad there is a fix coming - let's hope it makes it in time. This is still broken in iOS 18 / Xcode 16 beta 5.
I'm going to hold off on the "workaround" as it is very heavy handed and inefficient. Any single change to the main context will cause all views driven by Query to redraw, regardless if they need to.
Not sure how this one got past QA...
Beta 5 still broken.
Still broken in beta 3
I've confirmed that updates made in a background context are not being reflected in the query results. If I keep everything on the main actor it is fine. Certainly a bug in iOS 18 b1 and b2.
I'm having a similar issue, where a query-driven parent passes results to another view. Updates are not reflected until leaving the view and returning to it.
Same here also!
The response above from apple doesn't address the issue: After installing Xcode 14.3 beta, Xcode 14.2 can no longer build apps using rosetta.
Thanks for the tip about raising deployment target. That works for my testing.
I’ll also add that I see this across two different applications that I use CloudKit in
FYI this has been fixed in release version of 12.5
I still see the issue in Xcode 12.5 beta 3 as well.
I see both a @StateObject initialized twice and onAppear called twice.
One follow up...
Above, how would you break / avoid the cycle? You can't create a weak reference to MyStruct in the closure because it is not a reference type. Might just be don't get yourself in this situation :)
Thanks