Skip to content

KMPObservableBridge 1.0.1 — Kotlin State. Native SwiftUI.

Choose a tag to compare

@sonmbol sonmbol released this 25 Jul 07:54
· 16 commits to main since this release
c0f861d

KMPObservableBridge lets SwiftUI use real Kotlin Multiplatform ViewModels directly—without a duplicate Swift adapter ViewModel.

@KMPStateObject
private var profile = ProfileViewModel()

Highlights

  • Automatic lazy SKIE StateFlow discovery with compatibility diagnostics and cached runtime detection.
  • Direct KMP-NativeCoroutines NativeFlow observation.
  • Explicit typed state: and states: key paths for deterministic integration.
  • SwiftUI-style owning, observed, environment, and child ViewModel wrappers.
  • Main-actor invalidation, update coalescing, rebinding, cancellation, disposal, and stale-emission suppression.
  • No required Kotlin superclass, annotation, compiler plugin, code generator, or third-party runtime dependency in the Swift package.

Installation

Add https://github.com/sonmbol/KMPObservableBridge as a Swift Package dependency and import KMPObservableBridge.

Compatibility

  • Swift 5.9+
  • iOS 14+, macOS 11+, tvOS 14+, watchOS 7+
  • SKIE and KMP-NativeCoroutines integration demonstrated by the included DailyPulse application

Please open a Discussion if you want help integrating one ViewModel or want to share your Kotlin, SKIE/KMP-NativeCoroutines, Swift, and Xcode version combination.

See the README, integration guide, and DailyPulse example for complete usage.