KMP Tutorial #2: Setting Up Your First Kotlin Multiplatform Project
In the previous tutorial, we learned what KMP is and why it matters. Now let’s get our hands dirty — create a real project, understand every file in it, write shared code, and run it on both Android and iOS. This is a long tutorial. Take your time. By the end, you will have a working cross-platform app and understand exactly how every piece fits together. Part 1: Setting Up Your Environment What You Need Tool Required Purpose Android Studio Yes IDE for KMP development (latest stable) Xcode Yes (Mac only) Builds and runs iOS apps JDK 17+ Yes Kotlin compiler depends on it Mac computer For iOS Apple requires Xcode, which only runs on macOS CocoaPods Optional Some KMP libraries need it for iOS If you are on Windows or Linux, you can still write shared code and build the Android app. But you cannot build or run iOS. There is no way around this — Apple controls iOS builds. ...