0Pricing
Kotlin Multiplatform Academy · Lesson

Change Once, See It on Both Apps

Edit shared logic and watch both platforms update.

The Real Payoff

Now comes the magic of KMP: edit the shared function once and both apps change together. No copy-paste, no drift.

Tweak the Greeting

Open greet in commonMain and change the wording. This is the only place you touch, even though two apps depend on it.

fun greet(name: String): String {
    return "Welcome, $name!"
}

All lessons in this course

  1. A Greeting Function in commonMain
  2. Call Shared Code from the Android App
  3. Call Shared Code from the iOS App
  4. Change Once, See It on Both Apps
← Back to Kotlin Multiplatform Academy