|
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 :) |
SAVE 50% All our books and bundles are half price for Black Friday, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.