← All posts software engineering

Why I Build iOS and Android Apps with Compose Multiplatform

G
Gary Vincent
2026-11-094 min read
Why I Build iOS and Android Apps with Compose Multiplatform

I build and ship mobile apps as a one-person studio. Right now that is a portfolio of apps on both the App Store and Google Play: a grocery planner, a songwriting app, a bartending reference, a smoker-probe controller, a book-writing app and more. I could not do that with two codebases. Compose Multiplatform is the reason it works at all.

This post is the honest version: how my apps are put together, why I chose it, and the sharp edges I hit along the way.

Why one codebase

The honest answer is arithmetic. Every feature I build has to work on Android and iOS. With two native codebases, every feature is built twice, tested twice, and fixed twice. As a solo developer that cost is the whole business.

With Compose Multiplatform I write the UI and the logic once, in Kotlin, and it runs on both. I still ship two real native apps through the two real stores. Users don't see a "cross-platform app". They see an app.

What "shared" actually looks like

I counted lines of code in a few of my own apps instead of guessing. These are rough line counts including comments and blank lines.

  • SongBook: about 14,800 lines of shared Kotlin, about 1,300 Android-specific, about 1,400 iOS-specific Kotlin, and 44 lines of Swift.
  • EverList: about 27,000 shared, about 850 Android-specific, about 680 iOS-specific, and about 440 lines of Swift.
  • A newer app, My StoryBook: about 20,000 shared, about 1,500 Android-specific and about 1,600 iOS-specific.

So roughly 85 to 95 percent of each app is written once. The remainder is the part where the two platforms genuinely differ: audio, Bluetooth, file pickers, billing glue, and the entry point on each side.

How the platform differences are handled

Kotlin has a feature built for exactly this, called expect and actual. You declare what you need in shared code, and each platform provides its own implementation.

// commonMain: what the shared code needs
expect fun openStoreListing(appId: String)

// androidMain: how Android does it
actual fun openStoreListing(appId: String) {
    // launch a Play Store intent
}

// iosMain: how iOS does it
actual fun openStoreListing(appId: String) {
    // open the App Store URL
}

The shared code just calls openStoreListing. It never has to know which platform it is on. This keeps the platform-specific code small, and it also keeps each store's rules satisfied. Apple, for example, does not want to see another store's names or links inside an iOS build, so the Play-specific links only ever compile into the Android app.

What bit me

I'm not going to pretend it's frictionless. A few real ones:

  • Native libraries pin each other. The in-app purchase library I use ships a Kotlin layer and a native iOS layer, and the two version numbers have to match exactly. When they did not, the app crashed on launch on iOS, and that got four of my apps rejected in one review round. My rule now: configure that library at startup, not lazily, so a mismatch fails in my testing and not in the reviewer's.
  • A dependency listed is not a dependency wired. One app had an HTTP library in its version catalog but not in the build for one platform. It compiled until I used it.
  • Narrow and foldable screens expose layout assumptions. A layout that is fine on a normal phone can wrap awkwardly on a folded phone. I now test on a screen the width of a foldable and design defensively.
  • Build tooling is fussy. I build iOS on an Intel Mac, and I have hit a JDK version crash in Xcode's Gradle step and a deployment-target setting that lives in three different files. Each was a one-time fix, but you only learn them by hitting them.

Would I do it again

Yes, without hesitation. The shared code is where the product lives, and I get to spend my time on features instead of on keeping two apps in sync. If your app is mostly standard screens, lists, forms, and data, you get almost all the benefit. If it leans hard on one platform's deepest APIs, expect more platform code, but you still share the rest.

If you have questions about any of this, or want a follow-up on a specific piece like billing, audio or project structure, leave a comment and tell me which.

Related reading

Tagged: software engineering · compose multiplatform · kotlin multiplatform · kotlin · ios · android

Discussion

No comments yet. Be the first.