Hi all, i have this view model delegate on ios sid...
# multiplatform
x
Hi all, i have this view model delegate on ios side that looks like this
Copy code
import Foundation

class ViewModelDelegate : ObservableObject {

    @Published var state: State = ViewModelsKt.DEFAULT_STATE
    @Published var command: Command? = nil
    
    init() {
        subscribe(viewModel: ModuleKt.viewModel)
    }
    
    func subscribe(viewModel: ViewModel) {
        viewModel.onChange { (state) in
            self.state = state
        }
    }
}
is it possible to use Combine’s
@Published
from kotlin side and get rid of this delegate all together?
r
No, Kotlin can only talk to Obj-C and not Swift, so it can’t talk to Combine.
😢 5