What's new in Compose Multiplatform 1.10.0
Here are the highlights for this feature release:
You can find the full list of changes for this release on GitHub.
Breaking changes and deprecations
Deprecated dependency aliases
Dependency aliases supported by the Compose Multiplatform Gradle plugin (compose.ui and others) are deprecated with the 1.10.0-beta01 release. We encourage you to add direct library references to your version catalogs. Specific references are suggested in the corresponding deprecation notices.
This change should make dependency management for Compose Multiplatform libraries a bit more transparent. In the future, we hope to provide a BOM for Compose Multiplatform to simplify setting up compatible versions.
Deprecated PredictiveBackHandler()
The PredictiveBackHandler() function was introduced in Compose Multiplatform to bring native Android back navigation gesture to other platforms. With the release of Navigation 3, the old implementation has been deprecated in favor of the new Navigation Event library and its APIs. Specifically, instead of using the PredictiveBackHandler() function, you should now use the new NavigationBackHandler() function that wraps the more general NavigationEventHandler() implementation.
The simplest migration can look like this:
Here:
The
stateparameter is mandatory:NavigationEventInfois designed to hold contextual information about the UI state. If you don't have any information to store for now, you can useNavigationEventInfo.Noneas a stub.The
onBackparameter has been split intoonBackCancelledandonBackCompleted, so you don't need to track canceled gestures separately.The
NavigationEventState.transitionStateproperty helps to track the progress of the physical gesture.
For details on the implementation, see the NavigationEventHandler page in the Navigation Event API reference.
Minimum Kotlin version increased
If your project includes native or web targets, the latest features require an upgrade to Kotlin 2.2.10.
Across platforms
Unified @Preview annotation
We've unified the approach to previews across platforms. You can now use the androidx.compose.ui.tooling.preview.Preview annotation in the commonMain source set.
All other annotations, such as org.jetbrains.compose.ui.tooling.preview.Preview and the desktop-specific androidx.compose.desktop.ui.tooling.preview.Preview, have been deprecated.
Autosizing interop views
Compose Multiplatform now supports automatic resizing for native interop elements on both desktop and iOS. These elements can now adapt their layout to their content, eliminating the need to calculate exact sizes manually and specify fixed dimensions in advance.
On desktop,
SwingPanelautomatically adjusts its size based on the embedded component's minimum, preferred, and maximum sizes.On iOS, UIKit interop views now support sizing according to the view's fitting size (intrinsic content size). This enables proper wrapping of SwiftUI views (via
UIHostingController) and basicUIViewsubclasses that do not depend onNSLayoutConstraints.
Stable Popup and Dialog properties
The following properties in DialogProperties have been promoted to stable and are no longer experimental: usePlatformInsets, useSoftwareKeyboardInset, and scrimColor.
Similarly, the usePlatformDefaultWidth and usePlatformInsets properties in PopupProperties have also been promoted to stable.
The deprecation level for Popup overloads without the PopupProperties parameter has been changed to ERROR to enforce the use of the updated API.
Skia updated to Milestone 138
The version of Skia used by Compose Multiplatform, via Skiko, has been updated to Milestone 138.
The previous version of Skia used was Milestone 132. You can see the changes made between these versions in the release notes.
Support for Navigation 3
Navigation 3 is a new navigation library designed to work with Compose. With Navigation 3, you have full control over your back stack, and navigating to and from destinations is as simple as adding and removing items from a list. You can read about the new guiding principles and decisions in the Navigation 3 documentation, as well as in the announcement blog post.
Compose Multiplatform 1.10.0-beta01 provides Alpha support for using new navigation APIs on non-Android targets. The released multiplatform artifacts are:
Navigation 3 UI library,
org.jetbrains.androidx.navigation3:navigation3-uiViewModel for Navigation 3,
org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-navigation3Material 3 adaptive layouts for Navigation 3,
org.jetbrains.compose.material3.adaptive:adaptive-navigation3
You can find an example of a multiplatform Navigation 3 implementation in the nav3-recipes sample mirrored from the original Android repository.
Some platform-specific implementation details:
On iOS, you can now manage navigation for end edge pan gestures using the EndEdgePanGestureBehavior option (
Disabledby default). "End edge" here refers to the right edge of the screen in LTR interfaces and the left edge in RTL ones. The start edge is the opposite to the end edge and is always bound to the back gesture.In web apps, pressing the Esc key in a desktop browser now returns the user to the previous screen (and closes dialogs, popups and some widgets like Material 3's
SearchBar), just as it already does in desktop apps.Support for browser history navigation and using a destination in the address bar will not be extended to Navigation 3 with Compose Multiplatform 1.10. This has been postponed until a later version of the multiplatform library.
iOS
Window insets
Compose Multiplatform now supports WindowInsetsRulers, which provides functionality to position and size UI elements based on window insets, such as the status bar, navigation bar, or on-screen keyboard.
This new approach to managing window insets uses a single implementation for retrieving platform-specific window inset data. This means both WindowInsets and WindowInsetsRulers use a common mechanism to manage insets consistently.
Improved IME configuration
Following the iOS-specific IME customization introduced in 1.9.0, this release adds new APIs for configuring text input views with PlatformImeOptions.
These new APIs allow customization of the input interface when a field gains focus and triggers the IME:
UIResponder.inputViewspecifies a custom input view to replace the default system keyboard.UIResponder.inputAccessoryViewdefines a custom accessory view that attaches to the system keyboard or a custominputViewupon IME activation.
Overlay placement for interop views
You can now place UIKitView and UIKitViewController views above the Compose UI using the experimental placedAsOverlay flag. This flag allows interop views to support transparent backgrounds and native shader effects.
To render an interop view as an overlay, use the @OptIn(ExperimentalComposeUiApi::class) annotation and set the placedAsOverlay parameter to true in UIKitInteropProperties:
Keep in mind that this configuration renders the view on top of the Compose UI layer; consequently, it will visually cover any other composables located in the same area.
Web
Resource caching
Compose Multiplatform now uses the Web Cache API to cache successful responses for static assets and string resources. This approach avoids the delays associated with the browser's default cache, which validates stored content through repeated HTTP requests and can be particularly slow on low-bandwidth connections. The cache is cleared on every app launch or page refresh to ensure resources remain consistent with the application's current state.
For more details, see the pull request and the Caching web resources documentation.
Desktop
Compose Hot Reload integration
The Compose Hot Reload plugin is now bundled with the Compose Multiplatform Gradle plugin. You no longer need to configure the Hot Reload plugin separately, as it is enabled by default for Compose Multiplatform projects targeting desktop.
What this means for the projects that explicitly declare the Compose Hot Reload plugin:
You can safely remove the declaration in order to use the version provided by the Compose Multiplatform Gradle plugin.
If you choose to keep a specific version declaration, that version will be used instead of the bundled one.
The minimum Kotlin version for the bundled Compose Hot Reload Gradle plugin is 2.1.20. If an older version of Kotlin is detected, the hot reload functionality will be disabled.
Gradle
Support for AGP 9.0.0
Compose Multiplatform introduces support for version 9.0.0 of the Android Gradle Plugin (AGP). For compatibility with the new AGP version, make sure you upgrade to Compose Multiplatform 1.9.3 or 1.10.0.
To make the update process smoother in the long term, we recommend changing your project structure to use a dedicated Android application module.
Dependencies
Library | Maven coordinates | Based on Jetpack version |
|---|---|---|
Runtime |
| |
UI |
| |
Foundation |
| |
Material |
| |
Material3 |
| |
Material3 Adaptive |
| |
Lifecycle |
| |
Navigation |
| |
Navigation3 |
| |
Navigation Event |
| |
Savedstate |
| |
WindowManager Core |
|