Post

Replies

Boosts

Views

Activity

Reply to SwiftData not loading under iOS 26.1
Here it is: FB20953695 Struggled a bit with clean reproduction, but cleaning the build folder before running helps after changing the store files in the build. Had to refactor whole code in my own app to avoid optionals in arrays of model properties as a workaround, which still doesn't feel like proper solution :( . It also is not solving the issue that app is not running as iPad app under macOS 26.1 anymore.
Nov ’25
Reply to How to correctly fetch data using SwiftData
I would look into @Attribute(.trasformable) macro to save images (haven't tried it myself, but I think that's the direction worth investigating. I don't see any view in you last code, but I think in your pattern data is being fetched on init, but you actually can access it no earlier than in .onAppear modifier. So I would try something like: @State var count: Int = 0 .... var body: some View { Text("\(count)") .onAppear { count = fetchedData?.count ?? 0 } } And put the fetching part in init method of your view.
Topic: UI Frameworks SubTopic: General Tags:
Nov ’25