rickclephas / KMP-ObservableViewModel

Library to use AndroidX/Kotlin ViewModels with SwiftUI
MIT License
569 stars 29 forks source link

Cannot find type 'Kmp_observableviewmodel_coreViewModel' in scope error in Xcode #73

Closed yassineAbou closed 3 months ago

yassineAbou commented 3 months ago

I added the Gradle dependencies for KMP-ObservableViewModel in Android Studio and included the rickclephas/KMP-ObservableViewModel.git package for Xcode. However, I have the error "Cannot find type 'Kmp_observableviewmodel_coreViewModel' in scope". How can I resolve this issue? Screenshot 2024-05-22 at 19 21 41

rickclephas commented 3 months ago

Hi! Have you already created a ViewModel in Kotlin as well?

yassineAbou commented 3 months ago

no, I didn't create the ViewModel

yassineAbou commented 3 months ago

The problem was fixed. I forgot to include the Kotlin viewModel. Thanks for the help.