I am trying to set up a Combine stream on a proper...
# kotlin-native
j
I am trying to set up a Combine stream on a property in a Kotlin class like this:
Copy code
myKMPClass.publisher(for: \.someProperty)
   .receive(on: RunLoop.main)
   .map { $0 }
   .assign(to: &$someSwiftPublisher)
...but when this code executes, the app crashes with this exception:
[NSKVONotifying_MyKMPClass setSomeProperty:] can't be overridden: it is final
Ultimately I just want to be able to react to changes on 'someProperty' from my Swift code. Anyone have a fix (or alternative to this approach)?
Apparently if I mark the properties
open
it doesn't crash