Views don't update with @Published data on subclasses of ObservableObject class for iOS 14

@Published var value: String = ""

Views don't update with @Published data on subclasses of ObservableObject class for iOS 14 while it works for iOS 15. I try following code as workaround:

   var value: String = "" {     willSet { objectWillChange.send() }   }

This works, but does anyone have any better suggestions?

How is your ObservableObject imported inside the view? You have to use @ObservedObject oder @StateObject for @Published to work.

https://www.hackingwithswift.com/quick-start/swiftui/all-swiftui-property-wrappers-explained-and-compared

I use @ObservedObject in the view.

Have you found the solution to this? I need to support iOS 14 and I have this issue on 14.0 simulator, but not the 14.8.1 device

When self.objectWillChange.append(super.objectWillChange) is added in subclass, the issue is fixed.

Views don't update with @Published data on subclasses of ObservableObject class for iOS 14
 
 
Q