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
- A Greeting Function in commonMain
- Call Shared Code from the Android App
- Call Shared Code from the iOS App
- Change Once, See It on Both Apps