Skip to content

v0.1.0

Choose a tag to compare

@kdroidFilter kdroidFilter released this 15 Nov 03:23
· 30 commits to main since this release
90c48ce

First release of Compose SwiftUI: write SwiftUI screens in Kotlin with the Compose runtime, on iOS, macOS, tvOS and watchOS.

Install with the Gradle plugin in your shared KMP module (Kotlin 2.4.20+):

plugins {
    kotlin("multiplatform")
    id("dev.nucleusframework.compose-swiftui") version "0.1.0"
}

Then build once in Xcode, add the generated iosApp/ComposeSwiftUI folder to your app target, and show a screen with ComposeView { MyScreenKt.myScreen() }. The README has the full guide.

What's in 0.1.0:

  • Kotlin API generated from the SwiftUI SDK: 3,568 entries of Apple's SwiftUI documentation, each compiled for iOS, macOS, tvOS and watchOS.
  • Your androidx ViewModels, StateFlows and remember state work unchanged.
  • Hand-written APIs for navigation by path, item-driven sheets and alerts, environment values, focus, gestures, matched geometry, withAnimation, custom layouts and shapes, and embedded UIKit/AppKit views.
  • Benchmark of 50 screens against plain SwiftUI: updates 0.82x the time on iOS and 0.99x on macOS, mounts 1.06x and 1.14x; 48/50 screens pixel-identical on iOS, 50/50 on macOS.

Artifacts: dev.nucleusframework:compose-swiftui:0.1.0 on Maven Central, plugin dev.nucleusframework.compose-swiftui 0.1.0 on the Gradle Plugin Portal.