← Nesim Apps

What Stays Platform-Specific in a Kotlin Multiplatform App

By Nesim Razon, independent mobile developer · 2026-12-07

#Android#iOS

When I moved two small apps to Kotlin Multiplatform, most of the code went to the shared module and a short list did not. The list is useful: it shows where the platforms really differ, and it decided what shipped in the first iOS version. This post walks through the structure, the pieces that stayed native and the reasons for leaving three features out of iOS at first.

The structure: a shared module and two thin shells

Each app became three parts. A shared module holds the Kotlin code for both platforms. An Android shell holds what only Android can do. An iOS shell, a small Swift project generated from a project file, holds what only iOS can do and hosts the shared screens.

In the shared module I put the domain logic, the content and all the screens. In one app that means the astronomy and date calculations, the text bank with its assembler and a small pure Kotlin hashing routine, and every screen. The text files moved into the shared resources, so both platforms read the same data.

The one interface that carries the difference

Instead of scattering platform checks through the code, the shared module declares a small set of interfaces: the platform itself, preferences, notifications, the remove-ads purchase and analytics events. Each shell implements them with its own tools and hands the implementation to the shared app when it starts.

This keeps the shared screens honest. A screen calls notifications or events without knowing how they work, and a missing feature can be provided as a no-op. The interface list is also my inventory of every place where the two platforms differ.

What stayed in the Android shell

What stayed in the iOS shell

Three features I left out of the first iOS release

Three things were available on Android and not in the first iOS version: the remove-ads purchase, the home screen widgets and the image share card. Each needed new native work: a store product with Swift purchase code, a widget extension, and image sharing through the iOS share sheet. iOS shares plain text instead of the picture for now.

The decision was deliberate and I made it with the owner, who also happens to be me. A first release that works and is reviewed is worth more than a complete one that waits. The rule I follow is that anything postponed is said out loud and approved, not silently dropped, and the hidden button in the iOS profile screen is part of that.

Tests and what moves with the code

Tests that check the core results, such as the date and sign calculations or a payroll style calculator against official examples, moved to the shared module and must pass unchanged. Those are the tests that tell me the Kotlin code behaves the same wherever it runs.

Tests that exercise Android classes, such as the widget or the update checker, stay with the Android shell. It is worth deciding early which tests describe the product and which describe a platform, because the first group becomes your safety net for the port.

A short rule for the next app

Frequently asked questions

What goes in the shared module of a Kotlin Multiplatform app?

The domain logic, content, calculations and, with Compose Multiplatform, the screens. Anything that does not need a platform API.

How do you handle platform differences?

A small set of interfaces in shared code, implemented by each platform shell and passed to the shared app at startup.

Can widgets be shared between Android and iOS?

Not directly. Android widgets and iOS widget extensions use different APIs, so each stays in its own shell.

Why leave features out of the first iOS release?

Each needed new native work. Shipping a working first version and adding them later was the safer plan.

Which tests move to the shared module?

The ones that describe the product, such as calculation results, because they must pass the same on both platforms.

More from the blog