PlatformViewModel creates a platform-specific abstraction to use the native android ViewModel class and viewModelScope property.
StateFlowWrapper is a wrapper for kotlin flow to enable Swift code to collect values for any change.
On Android, the shared module is seen as a traditional module and the build is trivial (open project in Android Studio and run)
To build an iOS app using KMM we need to build the shared module first.
On the project folder run ./gradlew createSwiftpackage
to build a shared module as Swift package.
This repository includes a stupid example app that counts clicks and shows the current time updating every second.
Android | iOS |
---|---|