0Pricing
Kotlin Multiplatform Academy · Lesson

Targets: Android, iOS, Desktop, Web, Server

The platforms a single Kotlin codebase can compile to.

Targets: Android, iOS, Desktop, Web, Server is a free Kotlin Multiplatform Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Kotlin Multiplatform Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

What Is a Target

A target is a platform your Kotlin code compiles to. One shared codebase can produce builds for several targets at once. 🎯

The Android Target

Android is the most common starting target. Kotlin compiles to JVM bytecode, the same format Android apps have always used.

The iOS Target

For iOS, Kotlin compiles ahead of time into a native binary using Kotlin/Native, packaged as a framework Swift can call.

The Desktop Target

Desktop apps for Windows, macOS, and Linux run on the JVM too. The same desktop target serves all three operating systems.

The Web Target

Kotlin can target the browser by compiling to JavaScript or to WebAssembly, so shared logic runs on the web as well.

The Server Target

On the backend, Kotlin runs on the JVM server side. You can even share models and validation between your app and your API.

Declaring Targets

You list targets in your Gradle build. Each call like androidTarget adds one platform to the shared module.

kotlin {
    androidTarget()
    iosArm64()
    jvm("desktop")
}

Pick Only What You Need

You do not have to ship every target. Most teams start with just Android and iOS and add more targets only when needed.

iOS Has Variants

iOS itself has a few targets: real devices use arm64, while the simulator uses x64 or arm64 depending on your Mac.

Share the Same Source

Every target reads from your common code. That shared source set is compiled fresh for each platform you declared.

One Codebase, Many Outputs

The magic is reach: a single Kotlin codebase becomes an APK, an iOS framework, a desktop app, and more from one build.

Quick Check

Let's confirm what targets are.

Recap

Targets are the platforms you compile to: Android, iOS, desktop, web, and server. Declare only the targets your team actually needs. 🌍

Frequently asked questions

Is the “Targets: Android, iOS, Desktop, Web, Server” lesson free?

Yes — the full text of “Targets: Android, iOS, Desktop, Web, Server” is free to read here on the web, and the Kotlin Multiplatform Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Kotlin Multiplatform Academy course, upgrade to CoddyKit PRO.

What will I learn in “Targets: Android, iOS, Desktop, Web, Server”?

The platforms a single Kotlin codebase can compile to. You practise Kotlin Multiplatform Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Kotlin Multiplatform Academy?

No prior experience is required. Kotlin Multiplatform Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Targets: Android, iOS, Desktop, Web, Server” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Kotlin Multiplatform Academy lesson?

Yes. Every Kotlin Multiplatform Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Share Logic, Not UI: The KMP Promise
  2. KMP vs Flutter vs React Native
  3. Targets: Android, iOS, Desktop, Web, Server
  4. What You Can and Cannot Share Yet
← Back to Kotlin Multiplatform Academy