Skip to content

Choosing an Integration

sonmbol edited this page Jul 28, 2026 · 1 revision

Choosing an Integration

SKIE KMP-NativeCoroutines
Swift shape Typed AsyncSequence plus current value Generated NativeFlow callback
Product KMPObservableBridgeSKIE KMPObservableBridgeNative
Configuration Macro fields or explicit key paths Explicit NativeFlow key path
Field metadata Available for macro fields Global by default
Reflection None None

SKIE

Use SKIE when synchronous StateFlow value access and field-aware Observation fit the application:

@KMPObservable(
    ArticleViewModel.self,
    fields: \.articleState
)
extension ArticleViewModel: @retroactive KMPStaticallyObservable {}

Swift macros cannot inspect members of an imported Kotlin type. Explicit fields are therefore required and compiler checked.

KMP-NativeCoroutines

NativeFlow supplies observation and cancellation; a separately exported property supplies the current renderable value:

@KMPStateObject(
    state: \.kmpObservationFlow,
    updatePolicy: .immediate
)
private var example = BridgeExampleViewModel()

Text(example.nativeMessageValue)

Choose the exporter already validated by the application unless measurements justify migration. The core bridge also supports callbacks, Combine publishers, and custom adapters.

Clone this wiki locally