Primal Android 2.2 was released this week, bringing some long-awaited features. But that’s just one side of the story - back in March, we began decoupling our monolithic Android app into Kotlin Multiplatform reusable modules for both Android and iOS. Here are two major milestones we’ve achieved:
- Blossom Uploader: The first multiplatform module to be integrated into Primal iOS 2.2. Once development was completed for Android, it took us just a few hours to integrate it on iOS. The module can be found in `core/networking-upload` in the `primal-android/app` Git repo for anyone interested.
- Local Caching Repository: We’ve completely decoupled the data layer for all social app features, achieving a clear separation of concerns. The app is now fully agnostic to the source of the data, using only domain models and interfaces to interact with it. It always communicates with the repository, which handles data retrieval and storage in the local database from one or more remote sources (currently just our caching service). We are one step away from completing proof-of-concept tests on the iOS app with this module, and the Android app is already using it in production. This multiplatform module can be found in `data/repository-caching`.
Anyone else here bullish on Kotlin Multiplatform?
View quoted note →
Login to reply
Replies (12)
What does debugging on iOS look like for the Kotlin Multiplatform pieces?
I thank you for going KMP. But there is no point on investing in it if the company has a Swift native app and a web app.
i am now yes
I am honestly bullish on the web, not google and ios wall gardens
Decoupling the Android app was already in the pipeline, and we were also looking at how to add local caching on iOS. Since only the Android app had local caching so far, trying out KMP felt like a good opportunity. We split some code into KMP modules (instead of regular Android ones) and exported them as an XCFramework for the native iOS project to use.
This is just an add-on to the existing native projects to help avoid duplicating business logic. It’s totally optional—each native project can either use the shared code or roll their own solution.
Ohh, makes sense for a backend module they didn't have.
I think it would be a terrible waste of time to make screens on KMP and import it on iOS at this time.
Maybe next year things start to become more interesting for KMP
Great!! Do you plan to implement push notifications in the GitHub version in the future?
There is also Compose Multiplatform if you want to build UI with a single Kotlin codebase.


JetBrains
Compose Multiplatform – Beautiful UIs Everywhere
Compose Multiplatform is a declarative framework for building beautiful shared UIs across Android, iOS, desktop, and web – powered by Kotlin Mult...
Push notifications do not work for me. Do they require GooglePlay services? I'm on a degoogled phone, so those aren't available
Yes. They require Google build and Play Services on the phone. Github APK does not have the Google dependencies.
Ahh, figures. Any chance of UnifiedPush support?
Great explanation
Clear breakdown of how KMP works with swift integration