Closed humblehacker closed 1 year ago
Hi! In order to subclass the ViewModel in Swift you'll need to mark the Kotlin VM as open
:
open class TimeTravelViewModel: KMMViewModel()
🤦 Calling Kotlin from Swift has muddied my brain! Thanks and sorry for the noise.
The readme claims that it's possible to subclass my view model in Swift:
... but when I try I get the error Cannot inherit from non-open class 'MyViewModel' outside of its defining module. Any advice?