

In the end, we’re not strictly dependent on it. This plugin does the code generation heavy-lifting for us, but I believe we gain from knowing what’s happening behind the curtains, that’s why I’ll guide you through the logic of creating those classes. Right now it doesn’t work with versions starting from 1.6.0. Note: at the time of writing, the authors are in the process of updating it for newer Kotlin versions. To listen for state changes we just consume an ObservableObject inside a View and the Combine/Flow communications and lifecycles are automatically managed for us. swift helper classes so we don’t have to worry about how things work under the hood. Orbit also provides us with a swift-gradle-plugin to generate. Orbit Multiplatform library – you can guess it by its name -, is already multiplatform-ready. Note: If you wonder why can’t we take advantage of JitPack service, there’s an issue about it. Until this PR is accepted and published, one option is to copy StateMachine.kt and add it to our project in the shared module. Tinder’s State Machine is not yet upgraded to be used as a multiplatform library, but luckily there’s a pull request (PR) with that implementation, which is quite simple actually. Common prerequisitesĪfter creating a new KMM project, we need to make sure we can use our FSM and MVI implementations. SwiftUI and Combine ( Publishers & Subscription).
