Kotlin Multiplatform Splash Screen for Android and iOS
Verified againstAndroid splash screens,Apple HIG: Launching,Kotlin Multiplatform quickstart: modules in the generated project,Compose Multiplatform: integration with SwiftUI,Compose Multiplatform: using resources,Apple: UILaunchScreenon November 4, 2026.
Kotlin Multiplatform has no cross-platform splash screen API, and the Kotlin Multiplatform docs on kotlinlang.org do not cover splash screens as of November 2026. The launch screen is still drawn by each operating system before any Kotlin runs, so you configure it twice: the SplashScreen API in the Android app and a launch screen in the Xcode project. What you can share is an animated splash composable that plays after launch.
Where each part lives
The KMP wizard generates an androidApp module that builds the Android app, an iosApp Xcode project that uses the shared module as a framework, and shared for common code. Some templates and tutorials use a single composeApp module for shared code and the Kotlin entry points instead. The split below works for both.
| Part | Where | Runs before Kotlin? |
|---|---|---|
| Android launch splash | androidApp: theme XML, manifest, MainActivity | Yes, drawn by the system |
| iOS launch screen | iosApp: Info.plist and asset catalog | Yes, drawn by the system |
| Animated splash | shared: commonMain composable | No, first thing your UI draws |
Android: the SplashScreen API in androidApp
Nothing about this is multiplatform. Add androidx.core:core-splashscreen:1.2.0 to the androidApp dependencies (that is the current stable on the AndroidX release notes), create a theme with parent Theme.SplashScreen, set it on the launcher activity, and install it before setContent:
<style name="Theme.App.Starting" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@color/splash_background</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_splash_logo</item>
<item name="postSplashScreenTheme">@style/Theme.App</item>
</style>class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
installSplashScreen()
super.onCreate(savedInstanceState)
setContent { App() }
}
}The icon follows the adaptive icon geometry: 288 x 288 dp with the visible logo inside a 192 dp circle, or 240 x 240 dp inside a 160 dp circle with an icon background. The Android 12 splash screen requirements page covers the rest, and the Jetpack Compose splash screen guide covers setKeepOnScreenCondition and exit animations.
iOS: the launch screen in iosApp
Open iosApp in Xcode. Add your logo and a background color to the iOS app's asset catalog, then add a UILaunchScreen dictionary to the iOS target's Info.plist:
<key>UILaunchScreen</key>
<dict>
<key>UIColorName</key>
<string>LaunchBackground</string>
<key>UIImageName</key>
<string>LaunchLogo</string>
</dict>These assets live in the Xcode project, not in Compose resources. iOS renders the launch screen before any of your app's code runs, so it cannot read anything in composeResources. Provide the logo at @2x and @3x, which Apple's HIG lists as the iOS scale factors, or use a launch storyboard via UILaunchStoryboardName if you need Auto Layout. The SwiftUI splash screen guide has the full key list.
While you are in that Info.plist: the Compose Multiplatform docs say Compose needs the CADisableMinimumFrameDurationOnPhone key set for high refresh rates, and that without it the app will crash at runtime. If your splash composable works on Android but the iOS app dies right after the launch screen, check this key first.
Shared: one splash composable in commonMain
Both platforms end up calling the same root composable: setContent { App() } on Android, and on iOS a MainViewController() that wraps it in ComposeUIViewController. Put the splash at the top of App() and it plays on both:
@Composable
fun App() {
var showSplash by remember { mutableStateOf(true) }
MaterialTheme {
Box(Modifier.fillMaxSize()) {
MainScreen()
if (showSplash) {
SplashOverlay(onFinished = { showSplash = false })
}
}
}
}
@Composable
fun SplashOverlay(onFinished: () -> Unit) {
val scale = remember { Animatable(1f) }
val alpha = remember { Animatable(1f) }
LaunchedEffect(Unit) {
scale.animateTo(1.15f, tween(350))
launch { scale.animateTo(0.9f, tween(200)) }
alpha.animateTo(0f, tween(200))
onFinished()
}
Box(
Modifier
.fillMaxSize()
.graphicsLayer { this.alpha = alpha.value }
.background(Color(0xFF101418)),
contentAlignment = Alignment.Center,
) {
Image(
painter = painterResource(Res.drawable.splash_logo),
contentDescription = null,
modifier = Modifier
.size(160.dp)
.graphicsLayer { scaleX = scale.value; scaleY = scale.value },
)
}
}Three things make the handoff invisible. The overlay's background color matches both native launch screens. Its logo starts at the size and position the platform drew: on Android that is the splash icon, so size the composable logo to the icon's visible circle; on iOS it is the UIImageName image at its point size. And MainScreen() is composed underneath from the first frame, so its data loading runs during the animation instead of after it.
The logo comes from Compose Multiplatform resources (painterResource(Res.drawable.splash_logo)), a separate copy from the Android drawable and the iOS asset. Export all three from the same source file so they do not drift.
Design one splash for both platforms
Preview splash animations with your logo and export iOS and Android sizes. Processing runs in your browser. Exports are free one size at a time.
Sizes and assets from the generator
The Splash Screen Generator exports full-bleed PNGs: five iPhone sizes from 750 x 1334 to 1320 x 2868, and Android density sizes from 360 x 800 to 1440 x 3200. In a KMP project these fit the shared splash composable as a reference frame or a background image, not the native launch screens. The Android launch splash wants a vector icon in the 288 dp adaptive geometry, and the iOS plist image should be just the logo on transparency. Full size lists are in splash screen sizes.
Common display bugs
- Two different logos in a row. The native launch screen and the composable use different art or sizes. Match the composable's first frame to each platform's launch screen.
- A color flash on iOS between launch screen and Compose. The SwiftUI wrapper's background differs from the splash color. Make the Compose view fill the screen with
.ignoresSafeArea()in the SwiftUI view that hosts it, and give the overlay the same color asLaunchBackground. - Splash plays again on Android after rotation.
rememberstate is lost when the activity is recreated. UserememberSaveableforshowSplash, or hold it in a ViewModel. - Dark mode mismatch. The native launch screens follow the system appearance through their color resources, but a hard-coded
Colorin the composable does not. ReadisSystemInDarkTheme()and pick the matching color.
Related
Frequently asked questions
Is there an official Compose Multiplatform splash screen API?
No. As of November 2026 Compose Multiplatform has no splash API and the Kotlin Multiplatform docs do not describe one. Each platform's own launch screen still applies, and a shared composable can only play after it.
Can I use composeResources images on the iOS launch screen?
No. iOS draws the launch screen from the Xcode project's Info.plist or storyboard and asset catalog before any app code runs. Keep a copy of the logo in the iosApp asset catalog.
Where do I call installSplashScreen in a KMP project?
In the Android activity that calls setContent, in the androidApp module (or composeApp in older templates). It goes before super.onCreate(), exactly as in a single-platform Android app.
Do I need a splash composable at all?
Only if you want motion or a branded moment after launch. Apple's guidance is that the launch screen should look nearly identical to your first screen, so many apps ship just the two native launch screens and go straight to content.