|
I'm having an issue that I can't seem to figure out what might be the problem. I have a custom view that works fine outside of a ForEach, however the same custom view generates this error for the top level view once it is in a ForEach. Error: Failed to produce diagnostic for expression; please submit a bug report Location:
Example of it working outside of ForEach
This generates the error:
However, the same ForEach works fine with anything else in it...
I even tried this thinking it was the sytax used for the action:
Any insight is much appreciated. If I need to provide additional context let me know. Thanks! |
|
hi mythical, sorry, this is definitely one that requires more code for context. the SwiftUI compiler is not wholly reliable in pinpointing errors within the suggestion: code for the top level view and the you may get more of a response then, DMG |
|
No worries, I had a feeling it would need more code. Here is a trimmed down body for the view, the body for the categorypill and the vm class. I trimmed it down some and the error does still occur. The app still uses RxSwift. I haven't converted it to Combine yet in case that might matter.... Thanks!
CategoryPill body
Contents of vm
|
|
Nevermind... I figured it out. It was in the $vm... the type the CategoryPill was expecting was not what I was passing. Lack of sleep. I apologize :) |
SPONSORED AppSweep by Guardsquare helps developers automate the mobile app security testing process with fast, free scans. By using AppSweep’s actionable recommendations, developers can improve the security posture of their apps in accordance with security standards like OWASP.
Sponsor Hacking with Swift and reach the world's largest Swift community!
You need to create an account or log in to reply.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.