5 concepts · 15 practice questions
Code in commonMain compiles for every target; androidMain and iosMain hold platform code. Common code can only use Kotlin and multiplatform libraries, not java.* or Android APIs. Teams usually share data, networking and business logic first and keep UI native, or share it later.
kotlin {
android {
namespace = "com.example.shared"
compileSdk = 36
}
iosArm64()
iosSimulatorArm64()
sourceSets {
commonMain.dependencies {
implementation(libs.kotlinx.coroutines.core)
}
}
}
Sign in to read the rest and take the 15-question test.
Sign in to continue