Getting started
IntroductionCompose SwiftUI lets Kotlin Multiplatform apps write real SwiftUI screens in Kotlin, with the Compose runtime driving native SwiftUI views.InstallationApply the Gradle plugin to your shared KMP module, add the generated Swift renderer to your Xcode target once, and show your first Kotlin screen with ComposeView.Your first appBuild a small task list in Kotlin, step by step: a view model, a SwiftUI List with swipe to delete, a detail screen, a sheet to add tasks and a toggle filter, then show it from Swift.How it worksThe Compose runtime builds a tree of nodes in Kotlin; a Swift renderer observes each node and rebuilds only the SwiftUI views whose data changed.API mappingThe rules that turn any SwiftUI view, modifier or value into its Kotlin form, so you can read Apple's documentation and write the Kotlin directly.
Building screens
LayoutStacks, frames, grids, scroll views, geometry and custom layouts: SwiftUI's layout system, driven from Kotlin.Text and imagesText, fonts, localized and Markdown strings, mixed-style text built in Kotlin, labels, SF Symbols, asset and remote images.ControlsButtons, toggles, pickers, text input, menus, progress and forms: native SwiftUI controls bound to Kotlin state, plus custom control styles written in Kotlin.State and dataCompose state, hoisting, view models and flows, effects, SwiftUI environment values, and passing data between Swift and Kotlin.ListsBuild SwiftUI lists from Kotlin data: rows and identity, sections, styles, selection, swipe actions, editing, search, tables and outlines.NavigationPush screens with NavigationStack, build sidebars with NavigationSplitView, switch sections with TabView, fill the toolbar, and keep a Navigation 3 back stack.PresentationPresent sheets, full-screen covers, popovers, inspectors, alerts, confirmation dialogs and file pickers from Kotlin state, and dismiss them cleanly.StylingColors and shape styles, backgrounds and overlays, shapes and clipping, shadows, Liquid Glass, color schemes, tints, built-in and Kotlin-written control styles, and theming patterns.Drawing and animationShapes, custom paths, Canvas drawing in Kotlin, and SwiftUI animations, transitions and effects driven by Kotlin state.Gestures and inputTaps, long presses, drags, pinches and composed gestures, drag and drop, focus, the keyboard, hover, Apple Pencil, URLs and the Digital Crown.AccessibilityVoiceOver labels, traits and actions, element grouping, rotors, accessibility focus, Dynamic Type and reduced motion, and how to test them.
Apple frameworks
Apple framework integrationsMapKit, Swift Charts, StoreKit and the other SwiftUI framework APIs are opt-in: add one Swift file per framework to your target and register it at launch.MapsShow MapKit maps from Kotlin: camera position, markers, annotations and overlays, map styles and controls, selection, MapReader and Look Around.ChartsDraw Swift Charts from Kotlin: marks and plottable values, series and stacking, axes, scales, legends, selection, scrolling, function plots, 3D charts and the chart proxy.In-app purchasesSell products and subscriptions with StoreKit's SwiftUI views from Kotlin: ProductView, StoreView, SubscriptionStoreView, purchase callbacks, offers, store sheets and testing.Photos and mediaPick photos and videos, play video, preview files, react to camera buttons, offer Apple Music and translate text from Kotlin.Web and sign-inEmbed web pages with WebKit's SwiftUI WebView, and sign users in with Sign in with Apple, passkeys, web authentication, the location button and Touch ID.Payments and WalletTake Apple Pay payments, add passes and orders to Wallet, verify identity with Wallet and let users share transactions, from Kotlin.Tips and widgetsShow TipKit tips from Kotlin, style widget and Live Activity content, and write home screen widgets whose timeline and views come from Kotlin.System servicesHealth data access, contacts, Screen Time, Image Playground, journaling suggestions, game saves, schoolwork, certificates, spatial anchors and the other system framework views, from Kotlin.Games and 3DEmbed SpriteKit scenes, SceneKit scenes and RealityKit models in Kotlin screens, and receive game controller input.
Platforms and tools
PlatformsOne Kotlin UI for iOS, iPadOS, macOS, tvOS and watchOS: source sets, API availability, per-platform specifics and how to set up each target in Gradle and Xcode.InteropEmbed Swift, UIKit and AppKit views in Kotlin screens, put Kotlin screens in an existing SwiftUI or UIKit app, pass values both ways, and combine Compose SwiftUI with Compose Multiplatform, Navigation 3 and an Android app.PreviewsAnnotate a composable with @Preview to see it rendered by real SwiftUI, next to the code in IntelliJ IDEA and Android Studio or in Xcode's canvas.PerformanceWhat Compose SwiftUI costs compared with plain SwiftUI, measured on 50 screens and list scenarios, and the practices that keep screens fast.TroubleshootingSymptoms you may hit when setting up or using Compose SwiftUI, what causes each one, and how to fix it.LimitationsWhat Compose SwiftUI doesn't do, why, and what to use instead: visionOS, Swift entry points, Swift-typed APIs, and the SwiftUI entries marked not applicable.Running in productionHow the runtime handles Kotlin exceptions, where it logs, how to read mixed Kotlin/Swift stack traces, and how the