compose-multiplatform

Implements Compose Multiplatform patterns for shared UI across Android, iOS, Desktop, and Web targets.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/Jatinkrmahato993203/crime --skill compose-multiplatform-jatinkrmahato993203
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: compose-multiplatform
Source: https://github.com/Jatinkrmahato993203/crime/tree/main/skills/_jutsu/compose-multiplatform
Command: npx skills add https://github.com/Jatinkrmahato993203/crime --skill compose-multiplatform-jatinkrmahato993203

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing one Compose codebase that runs correctly on Android, iOS, Desktop, and Web requires navigating expect/actual declarations, platform interop, density differences, and target-specific quirks that are easy to get wrong. ## Core Features & Use Cases - expect/actual Patterns: Declare shared contracts in commonMain and implement platform-specific composables and functions per target. - Native Interop Recipes: Embed SwiftUI/UIKit views via UIKitView, host Compose inside SwiftUI with UIViewControllerRepresentable, and bridge Android Views, Swing, and Wasm JS. - Platform Quirk Catalog: Reference guides covering safe-area insets, keyboard handling, gesture conflicts, Skia/Skiko rendering differences, and build packaging per target. - Use Case: You are building a KMP app and need a native MapKit map inside a Compose screen on iOS while keeping an Android fallback; the interop reference provides the full Swift bridge, cinterop configuration, and actual implementations. ## Quick Start Ask the assistant to apply the compose-multiplatform skill to set up an expect/actual composable that renders a native map on iOS and a fallback on Android.

Frequently Asked Questions about compose-multiplatform

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write platform-specific composables in Compose Multiplatform?▼

Declare an expect composable in commonMain and provide actual implementations in androidMain, iosMain, and desktopMain. The actual signatures must match exactly, and each target can use platform APIs like RuntimeShader on Android or UIKitView on iOS.

How do I embed SwiftUI views inside Compose Multiplatform on iOS?▼

Wrap the SwiftUI view in a UIHostingController exposed through an @objc Swift bridge class, then load it from iosMain using UIKitViewController. Configure a cinterop def file in build.gradle.kts so Kotlin can call the generated Swift header.

Can Compose Multiplatform share fonts and strings across platforms?▼

Yes, the org.jetbrains.compose.resources plugin generates typed Res accessors from commonMain/composeResources. Place fonts in the font folder and localized strings in values folders, then reference them via Res.font, Res.string, and stringResource.

Does LocalConfiguration work in Compose Multiplatform commonMain?▼

No, LocalConfiguration is Android-only. In commonMain use LocalWindowInfo.current.containerSize for window size, LocalDensity.current for density, or BoxWithConstraints to read layout constraints directly.

Why does my Compose Multiplatform app fail to link on iOS?▼

Common causes are JVM-only APIs like java.util.UUID or java.io.File used in commonMain, or a misconfigured cinterop for Swift bridges. Replace JVM APIs with kotlinx.uuid or okio multiplatform and verify the .def file paths.

What are the limitations of Compose Multiplatform on iOS?▼

iOS has slower first-frame rendering due to Skia bootstrap, edge swipe-back conflicts with drawer gestures, and no AGSL shader support. Keyboard handling requires IOSKeyboardEventListener setup, and system fonts need bundling or a native UILabel via UIKitView.