# rickclephas/KMP-NativeCoroutines

Library to use Kotlin Coroutines from Swift code in KMP apps

Repository: https://github.com/rickclephas/KMP-NativeCoroutines
Canonical: https://ross.abutalabs.com/products/kmp-nativecoroutines
Language: Kotlin
License: MIT
License Family: permissive
Topics: ios, kotlin, swift, kotlin-coroutines, kotlin-multiplatform, combine, kotlin-multiplatform-mobile, kmp, kmm, macos
Last push: 2026-08-18T07:18:02+00:00

## Health v2 (maintenance only)
Score: 92/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 81, longevity 100
- inputs: {"age_days": 1914, "days_push": 15, "days_rel": 49, "gap_med": 34.0, "n_releases_24m": 19}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1325, forks 49 (observed 2026-08-28T04:04:22.585320+00:00)

## What it is
A library that enables using Kotlin Coroutines (suspend functions and Flows) from Swift code in Kotlin Multiplatform apps. It adds proper cancellation support and preserves generic Flow types, which are lost in the default Objective-C interoperability layer.

## Use cases
- call Kotlin suspend functions from Swift with cancellation support
- consume Kotlin Flows in Swift as AsyncSequence, Combine publishers, or RxSwift observables
- share business logic between iOS and Android using KMP with coroutines
- fix missing generics on Kotlin Flow when exposed to Swift
- use async/await in Swift with Kotlin Multiplatform shared code

## When to choose
- you are building a Kotlin Multiplatform Mobile app with an iOS/Swift frontend
- you need cancellation of in-flight Kotlin suspend function calls from Swift
- you want typed Kotlin Flows in Swift instead of untyped ObjC interfaces
- you need to support older iOS versions via the RxSwift implementation

## When to avoid
- your project does not use Kotlin Multiplatform
- you rely on Swift export interop and do not need this bridge
- you target platforms outside the supported Apple OSes (iOS, macOS, tvOS, watchOS)

## Facets
- artifact type: library
- maturity: stable
- function: concurrency, sdk, developer-tools
- domain: mobile-development, cross-platform, developer-tools
- platform: jvm, cross-platform
- tags: kotlin-multiplatform, kmm, coroutines, swift-interop, combine, async-await, flows, cancellation-support, ios, macos, swift, mobile

## Member repositories
- rickclephas/KMP-NativeCoroutines (main) score 92

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:22.585320+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:46:35.701363+00:00, confidence not recorded.
  - readme: https://github.com/rickclephas/KMP-NativeCoroutines (fetched 2026-08-28T04:04:22.585320+00:00, sha fb12fa2cca5e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
