Hi. Anyone using ballast in a KMM project? I’m new to iOS development and I wanted to know if ballast was a good fit here, or even if it was a good idea bringing the common code to the MVI framework in the first place.
01/04/2023, 5:26 PM
Ballast does work on iOS, but honestly I’ve only seen it used as a POC for KMM iOS apps at this point. My team at work was using Ballast for rewriting an Android app, and I put together a POC for several of those screens on iOS, but moved to a new team before it got fully adopted, and they didn’t go back to rewrite the iOS app with KMM and Ballast. So it does work, but I personally do not have the experience with KMM iOS in general to say whether Ballast’s currently iOS implementation is really what’s needed for that space, and there’s an open issues for discussion if you have more insight here.
As to whether you should write the MVI code in the KMM common layer, that’s more up to the skills/constraints of you and the other developers on your team. If you do use Ballast for the whole Android and iOS apps, you can achieve a very high percentage of shared code, with only the UI code (Compose and SwiftUI) needing to be platform-specific. But this does require some more specialized knowledge from both the Android and iOS devs, while using KMM for just the API calls, for example, could be easier to integrate into your team but offer less code reuse.