I'm developing an app with a chart
in SwiftUI. I want the following block of code to run when the chart
is clicked. On my personal iPhone, the app works flawlessly. But when I try it in the simulator it crashes and gives me about 5-10 of the following errors. When I remove the @Query macro from the code block, the application does not crash in the simulator, but I continue to get the errors I mentioned. If I do not run the following code block, I do not get the errors I mentioned.
struct SaleDetailView: View {
@Query(filter: #Predicate<Registration> {
!$0.activeRegistration
}) private var regs: [Registration]
var body: some View {
VStack {
DailySaleView()
}
.padding()
}
}
Thank you in advance for your answers. Do not hesitate to ask if you have any questions.
Thanks, MFS