Skip to content

Releases

v0.10.0

Choose a tag to compare

@github-actions github-actions released this 22 Nov 11:52
e457665

Production readiness, ahead of 1.0.0: the public Kotlin ABI is now checked on every change, and the versioning and
deprecation policy that 1.0.0 will follow is written down (see docs/VERSIONING.md).

Breaking

  • Intel targets dropped: iosX64 and macosX64 are no longer published, like in the Compose runtime 1.11 and AndroidX
    Lifecycle 2.11 this release moves to (needed for the official LocalViewModelStoreOwner on Apple platforms).
  • Compose runtime 1.11.4, AndroidX Lifecycle 2.11.0, SavedState 1.4.0.
  • explicitApi(): declarations that were public by accident are now internal. SwiftView and Modifier.element need
    @OptIn(InternalComposeSwiftUIApi::class): they are for the generated bindings.
  • dev.nucleusframework.composeswiftui.LocalViewModelStoreOwner is deprecated in favor of the official
    androidx.lifecycle.viewmodel.compose.LocalViewModelStoreOwner (both are provided).

Added

  • Errors never terminate the app. An exception in a callback Swift invokes (actions, bindings, gestures, drawing,
    layout…), in composition or an effect, or in a task { } is caught, logged to os_log (subsystem
    dev.nucleusframework.composeswiftui) and passed to ComposeSwiftUI.onError, for Crashlytics or Sentry. A host whose
    composition failed shows nothing (a red message in debug builds); the others keep running.
  • Release builds show no diagnostics to users: an unsupported view kind or a missing NativeView renders nothing, and
    is logged once.
  • Lifecycle. Each ComposeView is a LifecycleOwner (onAppear/onDisappear and the scene phase):
    collectAsStateWithLifecycle, LifecycleResumeEffect and LifecycleEventEffect work. The suspend callbacks of a
    host are cancelled with it.
  • View models and DI. The official LocalViewModelStoreOwner and non-empty CreationExtras: viewModel { } with
    createSavedStateHandle(), and koinViewModel(), work unchanged.
  • Process death. ComposeView(restorationID:) keeps rememberSaveable values and SavedStateHandles in
    @SceneStorage; host.saveState() / restoreState() without SwiftUI.
  • First composition sees the SwiftUI environment (currentSwiftUIEnvironment): no light-mode flash in dark mode,
    right size classes from the first frame. SwiftUIEnvironment.displayScale.
  • stringResource works without providing LocalDensity: the Gradle plugin provides it in modules that use Compose UI.
    ComposeSwiftUI.addHostDecorator provides other composition locals to every host.
  • Swift Int64 / UInt64 arguments are Kotlin Longs (Args.long, KBox.long), no longer truncated.
  • Test API. runComposeSwiftUITest { setContent { … }; onNodeWithText("Increment").performClick() }, finders by
    text and accessibilityIdentifier, performTextInput, waitUntil (@ExperimentalComposeSwiftUIApi).
  • Swift package and CocoaPods. assembleComposeSwiftUIPackage writes a Swift package and a podspec: the frameworks
    as an XCFramework and the renderer of the same version. No build phase, so no ENABLE_USER_SCRIPT_SANDBOXING = NO.
  • composeSwiftUI { integrations } now also registers the listed integrations: no register…() call to write.
  • composeSwiftUI { syncRendererOnBuild = false } keeps a renderer under version control.
  • The renderer sync warns when the Xcode project misses renderer files (a group instead of a folder).
  • The renderer builds with the previous Xcode (N-1): APIs of the newest SDKs are behind #if compiler(>=6.4).
  • Guide: Running in production (errors, logging, symbolication of mixed Kotlin/Swift
    stack traces, lifecycle, saved state).

Fixed

  • A disposed host leaked its root node and its Swift model (a reference cycle across ARC and the Kotlin GC).
  • ComposeGenerated.setUp() ran twice when called by the app before the first ComposeView, dropping the renderers
    and settings registered in between.
  • flushCompose() only runs the hosts with pending work, instead of every live host four times.
  • SNode.children is computed once per structural change instead of on every read from Swift.

Project

  • CI on pull requests and main: every Apple target, unit tests, ABI check, Gradle plugin and generator tests,
    verify.py, renderer typecheck on four platforms, docs snippets, end-to-end tests (a SwiftUI app driven through the
    accessibility API, XCTest with snapshots and leak checks, an iOS app through the Swift package and through CocoaPods).
  • GitHub Actions pinned by SHA, Dependabot, CycloneDX SBOM and provenance attestations on releases, signed IntelliJ
    plugin published to the JetBrains Marketplace.
  • One version for everything, in VERSION; a release tag must match it.
  • SECURITY.md, CODE_OF_CONDUCT.md, MAINTAINERS.md, CODEOWNERS, issue and pull request templates.

Install with the Gradle plugin in your shared KMP module:

plugins {
    id("dev.nucleusframework.compose-swiftui") version "0.10.0"
}

Library: dev.nucleusframework:compose-swiftui:0.10.0 on Maven Central.
Gradle plugin: dev.nucleusframework.compose-swiftui 0.10.0 on the Gradle Plugin Portal.
IDE plugin (previews in IntelliJ IDEA / Android Studio): Compose SwiftUI on the JetBrains Marketplace,
or the zip below (Settings › Plugins › ⚙ › Install Plugin from Disk).

Supply chain: compose-swiftui-0.10.0.cdx.json is the CycloneDX SBOM of the library; the release files
and the Maven artifacts carry GitHub provenance attestations (gh attestation verify <file> --repo NucleusFramework/ComposeSwiftUI).

Full Changelog: v0.9.3...v0.10.0

v0.9.3

Choose a tag to compare

@github-actions github-actions released this 19 Nov 12:07
d874898

Added

  • iOS Simulator tool window: Lock, Volume Up and Volume Down, real hardware buttons pressed through Xcode's
    CoreDevice (a small helper compiled on the Mac on first use), as Xcode's device window does.
  • A phone outline icon for the iOS Simulator tool window, the iOS App configuration and the simulators of the
    toolbar, like Android Studio's for its devices.

Fixed

  • Remote Mac: previews' Gradle renders and the iOS App configuration's Xcode builds take turns on the Mac (a lock
    file, with lockf). Running both at once left Kotlin/Native's incremental caches inconsistent: the next link failed
    with "is cached, but its dependency isn't". Stop also ends the Xcode build.
  • Previews: when the simulator lost the preview host (its files are there but it isn't registered, after an erase or a
    crash of the simulator's services), it is installed again instead of failing to launch every time.

Install with the Gradle plugin in your shared KMP module:

plugins {
    id("dev.nucleusframework.compose-swiftui") version "0.9.3"
}

Library: dev.nucleusframework:compose-swiftui:0.9.3 on Maven Central.
Gradle plugin: dev.nucleusframework.compose-swiftui 0.9.3 on the Gradle Plugin Portal.
IDE plugin (previews in IntelliJ IDEA / Android Studio): download the zip below, then
Settings › Plugins › ⚙ › Install Plugin from Disk.

Full Changelog: v0.9.2...v0.9.3

v0.9.2

Choose a tag to compare

@github-actions github-actions released this 19 Nov 11:19
3080d9e

Added

  • iOS Simulator tool window: Rotate Left and Rotate Right; the screen, touches and the Home gesture follow the
    app's orientation.

Fixed

  • iOS Simulator tool window with a foldable simulator (iPhone Duo): it shows the screen the posture lights, instead of
    the dark one. Its touches go through CoreDevice, which the stream can't reach yet: it is view only (sending them
    crashed the simulator's backboardd). Its screenshots capture the shown screen.
  • Remote Mac: paths come back mapped when ~/.compose-swiftui/projects on the Mac is a symbolic link to another disk.
  • Simulators of a device's own runtime are listed as iOS 27.2, not iOS 27.2.iPhone19.4.

Install with the Gradle plugin in your shared KMP module:

plugins {
    id("dev.nucleusframework.compose-swiftui") version "0.9.2"
}

Library: dev.nucleusframework:compose-swiftui:0.9.2 on Maven Central.
Gradle plugin: dev.nucleusframework.compose-swiftui 0.9.2 on the Gradle Plugin Portal.
IDE plugin (previews in IntelliJ IDEA / Android Studio): download the zip below, then
Settings › Plugins › ⚙ › Install Plugin from Disk.

Full Changelog: v0.9.1...v0.9.2

v0.9.1

Choose a tag to compare

@github-actions github-actions released this 19 Nov 10:26
dc2ab64

Fixed

  • Copy Android Studio mcp.json copies a whole mcp.json ({"mcpServers": {"compose-swiftui": …}}), valid as pasted
    into Android Studio's MCP Servers › JSON View; the entry alone was rejected there.

Install with the Gradle plugin in your shared KMP module:

plugins {
    id("dev.nucleusframework.compose-swiftui") version "0.9.1"
}

Library: dev.nucleusframework:compose-swiftui:0.9.1 on Maven Central.
Gradle plugin: dev.nucleusframework.compose-swiftui 0.9.1 on the Gradle Plugin Portal.
IDE plugin (previews in IntelliJ IDEA / Android Studio): download the zip below, then
Settings › Plugins › ⚙ › Install Plugin from Disk.

Full Changelog: v0.9.0...v0.9.1

v0.9.0

Choose a tag to compare

@github-actions github-actions released this 19 Nov 10:19
82cb736

Added

  • Apple development from Linux and Windows with a remote Mac: set Settings › Tools › Compose SwiftUI Previews ›
    Remote Mac
    to an SSH destination, and the IDE plugin works as on a Mac. The project is synchronized there with
    rsync (only what changed); Gradle builds and renders in the Mac's daemon; images, results and compiler errors come
    back with this machine's paths. Live literals, interactive mode (its stream forwarded over SSH), the agent tools and
    Run Preview work the same.
  • The iOS Simulator tool window: a simulator of the Mac (this one or the remote one) live in the IDE, like Android
    Studio's Running Devices. The screen is read from the simulator's framebuffer and touches, keys and the Home
    gesture are sent as HID events, headless: no Simulator window, no screen recording permission. The mouse touches,
    drags and scrolls, the keyboard types. Beside the screen: Home, the app switcher, a screenshot, shake, light or dark
    appearance. It connects to the booted simulator when it opens.
  • The iOS App run configuration: builds the app's Xcode project on the Mac, installs it on a simulator and runs it,
    with its output in the Run tool window; Stop ends it on the simulator. With a remote Mac, it is created for the
    project's Xcode project, and the toolbar lists the Mac's simulators next to it.
  • ./gradlew -p intellij-plugin runAndroidStudio -PandroidStudio=<install dir> runs the IDE plugin in a sandbox
    Android Studio, with the sample.

Fixed

  • Previews use the app's asset catalogs: named colors and images (Color("Brand"), Image("logo")) rendered empty, as
    the preview host didn't have them. The .xcassets of the app's sources (the folder of swiftOutputDir) are compiled
    into it; composeSwiftUI { previewAssetCatalogs } sets others.
  • Android Studio: the preview pane shows for files with previews. Android Studio's own Kotlin editor was selected
    instead, leaving the previews in a tab at the bottom of the editor.

Install with the Gradle plugin in your shared KMP module:

plugins {
    id("dev.nucleusframework.compose-swiftui") version "0.9.0"
}

Library: dev.nucleusframework:compose-swiftui:0.9.0 on Maven Central.
Gradle plugin: dev.nucleusframework.compose-swiftui 0.9.0 on the Gradle Plugin Portal.
IDE plugin (previews in IntelliJ IDEA / Android Studio): download the zip below, then
Settings › Plugins › ⚙ › Install Plugin from Disk.

Full Changelog: v0.8.2...v0.9.0

v0.8.2

Choose a tag to compare

@github-actions github-actions released this 18 Nov 20:05
25dd1ed

Added

  • The agent tools in Android Studio and any MCP client: the IDE plugin serves them on an MCP server of its own
    (http://127.0.0.1:64360/mcp, streamable HTTP) when the IDE has no MCP Server plugin, for Android Studio's agent
    (mcp.json), Claude Code, Codex or Gemini CLI. Settings › Tools › Compose SwiftUI Previews shows its address
    and copies the configuration.

Install with the Gradle plugin in your shared KMP module:

plugins {
    id("dev.nucleusframework.compose-swiftui") version "0.8.2"
}

Library: dev.nucleusframework:compose-swiftui:0.8.2 on Maven Central.
Gradle plugin: dev.nucleusframework.compose-swiftui 0.8.2 on the Gradle Plugin Portal.
IDE plugin (previews in IntelliJ IDEA / Android Studio): download the zip below, then
Settings › Plugins › ⚙ › Install Plugin from Disk.

Full Changelog: v0.8.1...v0.8.2

v0.8.1

Choose a tag to compare

@github-actions github-actions released this 18 Nov 17:14
0d8b86c

Added

  • Previews of macOS apps in the IDE: in a module with the macOS target and no iOS simulator target, previews render on
    the Mac itself, with AppKit's SwiftUI; elsewhere @Preview(device = "mac") (or previewDevice.set("mac")) sends
    them there. A background host app without a Dock icon renders them off screen, captured as the WindowServer draws
    them, with live literals, click-to-code, the agent tools, interactive mode (real mouse and key events) and Run
    Preview
    in a window. The macOS framework is only linked when a preview renders on the Mac.
  • Previews for AI agents, like Android Studio's agent tools for Compose previews:
    • IDE plugin: tools on the IDE's MCP server (list_swiftui_previews, render_swiftui_preview,
      render_swiftui_preview_code, check_swiftui_preview, compare_swiftui_preview_to_image, compare_images,
      verify_batch_visual_parity) for Claude Code, Junie, Codex or any agent connected to the IDE;
    • listComposeSwiftUIPreviews, and renderComposeSwiftUIPreviews with -PcomposeSwiftUI.previewFile and
      -PcomposeSwiftUI.golden, writing report.md and a component tree per preview (<key>.tree.txt);
    • UI checks of every rendered preview: touch targets, text contrast, small text, overlapping texts, clipped views;
    • image comparison with expected images or folders of screenshots (mismatch, PSNR, diff and side-by-side images);
    • scratch previews: throwaway code in build/composeSwiftUI/scratch rendered without touching the sources.
  • The layout of a rendered preview records the strings of each view (text, label, SF Symbol name).

Changed

  • Run on Simulator is now Run Preview, as Mac previews open on the Mac.

Install with the Gradle plugin in your shared KMP module:

plugins {
    id("dev.nucleusframework.compose-swiftui") version "0.8.1"
}

Library: dev.nucleusframework:compose-swiftui:0.8.1 on Maven Central.
Gradle plugin: dev.nucleusframework.compose-swiftui 0.8.1 on the Gradle Plugin Portal.
IDE plugin (previews in IntelliJ IDEA / Android Studio): download the zip below, then
Settings › Plugins › ⚙ › Install Plugin from Disk.

Full Changelog: v0.8.0...v0.8.1

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 17 Nov 06:11
94db482

Added

  • @Preview arguments: group, device, width / height, sizeThatFits, colorScheme, dynamicTypeSize,
    locale, layoutDirection and backgroundColor, applied in the IDE and in Xcode's #Previews.

  • Variants: @Preview is repeatable and works on annotation classes (multipreviews), with @PreviewLightDark,
    @PreviewDynamicTypeSizes, @PreviewScreenSizes and @PreviewLayoutDirections provided.

  • @PreviewParameter(Provider::class, limit) and PreviewParameterProvider: one preview per sample value.

  • IDE plugin, at parity with Android Studio's Compose preview:

    • previews render when a file opens and on save (or while typing, or only on demand), only while the pane is
      visible, and show Out of date when the code changed;
    • list, grid and gallery layouts, zoom (toolbar, Ctrl/⌘ + wheel, fit), group filter;
    • the caret selects the preview of its function, and clicking a preview moves the caret to its function;
    • Run on Simulator opens a preview live on the simulator; copy or save a preview image; render one preview or the
      whole module;
    • compile errors as links to their line, and the Kotlin exception of a crashing preview in its place;
    • click a view of a preview to go to its code (hover outlines it and names the call);
    • live literals: string, number and boolean edits show in the previews within half a second, without a build;
    • interactive mode in the pane: the preview runs live, the mouse taps, drags and scrolls (real touches), the keyboard
      types; Select Component goes to a view's code, Slow Animations slows animations down, and Record Animation
      replays them frame by frame on a timeline (the animation inspector);
    • an inspection for @Preview functions that can't render, with quick fixes;
    • Settings › Tools › Compose SwiftUI Previews.
  • ComposeSwiftUIHost.inspectable and setLiteralPatches(…): the hooks the IDE previews use (source of each node,
    literal edits without recompiling). The library is compiled with Compose source information.

Changed

  • The Gradle plugin turns on Compose source information (composeCompiler { includeSourceInformation }) except in
    Xcode Release builds, for click-to-code and live literals. A value set in composeCompiler { } wins.
  • Faster previews: only the previews of the open file render, up to 8 at once, each captured as soon as it stops
    changing (no more fixed 800 ms per preview). The host app stays running on the simulator between renders, is only
    compiled once per library version (adding a preview or changing the app's API no longer recompiles it), and is
    relinked and reinstalled only when the framework changed. Simulators of different devices render in parallel, and
    the IDE turns on Kotlin/Native incremental compilation. A re-render without a Kotlin change takes about a second,
    down from six or more.
  • A preview that throws no longer stops the others: it shows its Kotlin exception. So do a
    PreviewParameterProvider that throws or has no values, and a preview that blocks the main thread (stopped after
    30 s). A preview that crashed renders first and alone next time, so it costs one host restart, not three.
  • Previews render on a simulator of their own, Compose SwiftUI Previews, booted in the background, with one host app
    per module: modules and projects no longer replace each other's app.
  • Previews named in backticks (fun `Dark mode`()) render.
  • The IDE plugin needs IntelliJ IDEA / Android Studio 2026.2 (build 262) running on Java 25.
  • IDE previews render on save again (0.6.2 made them on demand): each render now only costs what changed. Choose
    Only when asked in the settings to keep the 0.6.2 behavior.

Install with the Gradle plugin in your shared KMP module:

plugins {
    id("dev.nucleusframework.compose-swiftui") version "0.8.0"
}

Library: dev.nucleusframework:compose-swiftui:0.8.0 on Maven Central.
Gradle plugin: dev.nucleusframework.compose-swiftui 0.8.0 on the Gradle Plugin Portal.
IDE plugin (previews in IntelliJ IDEA / Android Studio): download the zip below, then
Settings › Plugins › ⚙ › Install Plugin from Disk.

Full Changelog: v0.7.1...v0.8.0

v0.7.1

Choose a tag to compare

@github-actions github-actions released this 16 Nov 16:20
1e150f1

Added

  • Modifier.toolbarItem(placement, sharedBackgroundVisibility) { }: SwiftUI's
    ToolbarContent.sharedBackgroundVisibility(_:) (iOS 26 / macOS 26, ignored on tvOS, watchOS and earlier systems).
    Visibility.hidden drops the Liquid Glass capsule behind the item.

Install with the Gradle plugin in your shared KMP module:

plugins {
    id("dev.nucleusframework.compose-swiftui") version "0.7.1"
}

Library: dev.nucleusframework:compose-swiftui:0.7.1 on Maven Central.
Gradle plugin: dev.nucleusframework.compose-swiftui 0.7.1 on the Gradle Plugin Portal.
IDE plugin (previews in IntelliJ IDEA / Android Studio): download the zip below, then
Settings › Plugins › ⚙ › Install Plugin from Disk.

Full Changelog: v0.7.0...v0.7.1

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 16 Nov 13:38
3307a7e

Added

  • TextEditor(StyledString, onTextChange, selection, onSelectionChange): SwiftUI's rich-text editor (iOS 26 /
    macOS 26). Formatting from ⌘B / ⌘I / ⌘U, the Format menu and its panel (fonts, sizes, colors, alignment, line
    height) comes back as a StyledString; attributes with no SpanStyle property are kept in
    SpanStyle.nativeAttributes.
  • RichTextSelection (SwiftUI AttributedTextSelection: ranges and typing style) with transformStyle, styles and
    replaceSelection, the counterparts of transformAttributes(in:), attributes(in:) and replaceSelection.
  • Modifier.attributedTextFormattingDefinition(AttributedTextFormattingDefinition(AttributedTextValueConstraint…)).
  • SpanStyle.backgroundColor, tracking, link (also drawn by Text(StyledString)) and alignment;
    StyledString(text, style), subSequence, replace.
  • macOS: ⌘B / ⌘I and the Format menu need .commands { TextFormattingCommands() } on the app's scene, as in SwiftUI.

Fixed

  • Text(StyledString): an italic run with its own font or weight is drawn italic.

Install with the Gradle plugin in your shared KMP module:

plugins {
    id("dev.nucleusframework.compose-swiftui") version "0.7.0"
}

Library: dev.nucleusframework:compose-swiftui:0.7.0 on Maven Central.
Gradle plugin: dev.nucleusframework.compose-swiftui 0.7.0 on the Gradle Plugin Portal.
IDE plugin (previews in IntelliJ IDEA / Android Studio): download the zip below, then
Settings › Plugins › ⚙ › Install Plugin from Disk.

Full Changelog: v0.6.2...v0.7.0