Share the logic where it creates value
Kotlin Multiplatform can reduce duplicated business logic across Android and iOS, but sharing code is a design choice rather than a goal by itself. Domain rules, validation, API clients, and selected persistence abstractions are common candidates. Platform-specific capabilities such as permissions, camera access, and system navigation may remain native.
Choose boundaries based on how often logic changes and how important behavioral consistency is. The shared module should offer a clear interface to each application, with platform dependencies introduced deliberately.
Choose the interface strategy by product needs
Jetpack Compose provides a modern declarative interface for Android. Compose Multiplatform can extend Compose UI to additional targets where its maturity, platform behavior, accessibility, and design requirements fit. A shared presentation layer can be useful, while native screens can make sense when a product depends on platform conventions or specialized APIs.
The architecture can mix these approaches. Teams should assess navigation, accessibility, localization, performance, release cadence, and developer skills before choosing the amount of UI to share.
Treat offline behavior as a product contract
For mobile workflows used with unreliable connectivity, local state is part of the experience. Define which actions are available offline, how pending changes are shown, and what happens when the server rejects a change made against old data.
A local database can act as the interface source of truth. Synchronisation then reconciles queued user intent with remote records, using versioning or explicit conflict policies where concurrent edits are possible. Avoid silently overwriting user changes.
- Persist user actions before attempting network delivery.
- Make pending, synced, and conflicted states visible when they affect the user.
- Use stable identifiers and idempotent requests for retryable operations.
- Define conflict handling with the business workflow rather than choosing a generic last-write-wins rule.
Keep platform edges testable
Use shared unit tests for domain behavior and serialization, platform tests for integrations with operating system APIs, and end-to-end journeys for critical flows. A small interface around storage, clock, and network access helps keep core behavior deterministic.
Build and release automation must exercise both platforms. Shared code does not remove differences in signing, permissions, store review, or device behavior; it changes where the team can reuse implementation and tests.
Make the trade-offs visible
A shared module can improve consistency and reduce duplicated maintenance, while also adding build configuration and cross-platform coordination. Teams should monitor dependency compatibility, compilation times, and the cost of debugging across platform boundaries.
This article describes a reference architecture for evaluation. It does not claim a particular client implementation or outcome.
Monya