I have experienced the same issue. My code was like:
In side the view:
@StateObject var foo: AbstractFoo
class AbstractFoo: ObservableObject {}
class Foo: AbstractFoo{}
I tried not having the view model be a subclass which was itself conforming to ObservableObject and so far haven't seen a single crash report from this version.
If the above is true, does that mean I'm not supposed to use inheritance for StateObject? Can someone from Apple please confirm?
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: