Kotlin Swift Export is in Alpha: what works, and should you use it?
Kotlin Swift Export turns suspend functions into async and Flow into AsyncSequence. Here's what works in Kotlin 2.4.20 and if it's ready.
3 min read
For years, calling Kotlin from Swift meant going through Objective-C. Your suspend functions became completion handlers, Kotlin enums became plain classes, and Swift developers saw odd names like SharedKt.
Swift Export removes that middle step. It reached Alpha in Kotlin 2.4.0 in June 2026, and Kotlin 2.4.20 (7 September 2026) added more. Here's what works today, what doesn't, and whether you should switch.
What Swift Export actually does
Normally, Kotlin/Native generates an Objective-C header, and Swift reads that header. Anything Objective-C can't express gets flattened or lost on the way.
Swift Export skips the header. Kotlin exports your code directly to Swift, so iOS code calls your shared module the way it calls any Swift library.
It's opt-in. Your existing projects keep using Objective-C export until you turn it on.
Change 1: suspend functions become async
This is the big one. With Swift Export, a Kotlin suspend function shows up in Swift as a normal async function.
suspend fun hello(): String {
delay(1000)
return "Hello from Kotlin"
}let msg = try await hello()No callbacks and no wrapper library. Swift developers write the same try await they already use everywhere else.
Change 2: Flow becomes AsyncSequence
Before this, exposing a Kotlin Flow to Swift needed a third-party library, such as KMP-NativeCoroutines or SKIE.
Swift Export now maps kotlinx.coroutines flows to Swift's AsyncSequence out of the box. Type information is kept, so a Flow<String> arrives in Swift as a sequence of String.
If a Flow drives your iOS screens, this removes a whole layer of glue code.
Change 3: sealed classes and Swift subclasses
Kotlin 2.4.20 added two more pieces.
Sealed classes and interfaces now map to Swift enums through a sealedType() method. You can write an exhaustive switch without a default case, and the compiler warns you when someone adds a new subclass.
Cross-language inheritance lets Swift classes implement Kotlin interfaces. You define a contract in Kotlin, implement it in Swift with something like CryptoKit, and pass it back to your shared code.
The same release also generates a Package.swift file next to your XCFramework, which makes SwiftPM distribution easier.
What "Alpha" means for your app
JetBrains is clear about this. The docs say Swift Export is in Alpha and still incomplete, and breaking changes are expected. Alpha also says nothing about when it will reach Stable.
There are smaller gotchas too. Kotlin Int maps to Swift Int32, not Swift's 64-bit Int, so your iOS code may need conversions in places.
So my view is simple. Try it in a branch. Don't ship a client's app on it yet.
Turning it on starts with one Gradle block in your shared module:
kotlin {
iosArm64()
iosSimulatorArm64()
swiftExport {
moduleName = "Shared"
}
}Follow the official Swift Export page for the Xcode build step, because the setup has changed between releases.
Your checklist
- Update to Kotlin 2.4.20 or newer. Sealed class and inheritance support starts in this version.
- Create a test branch. Keep your production build on Objective-C export for now.
- Enable Swift Export in one module. Start small, not with the whole app.
- List your suspend and Flow APIs. That's where you'll see the biggest gain, and where wrapper libraries could go later.
- Check your Int types. Look for places where Swift expects
Intand now getsInt32. - Write down what breaks. Missing features and odd names are worth reporting on YouTrack.
- Re-test on every Kotlin update. Alpha means the generated API can change between versions.
My take
Swift Export is the biggest iOS improvement Kotlin Multiplatform has had in years. It makes your shared code feel like a Swift library, not a foreign framework.
But it's Alpha. Learn it now, so you're ready the day it turns Stable.
Sources
- What's new in Kotlin 2.4.20 — Kotlin
- What's new in Kotlin 2.4.0 — Kotlin
- Interoperability with Swift using Swift export — Kotlin
- Kotlin 2.4.0 Released — JetBrains
- Kotlin 2.4.20 Released — JetBrains
Keep reading
All postsKotlin Multiplatform vs Flutter vs React Native in late 2026: how to choose
All three are stable now. Here's where Kotlin Multiplatform, Flutter and React Native stand in late 2026, how they differ, and how I'd choose.
4 min read
Kotlin 2.3 and the new Kotlin Toolchain: what changed for KMP developers
Kotlin 2.3 and 2.3.20 highlights, plus the KotlinConf 2026 news: the Kotlin Toolchain, ktfmt, Koog 1.0 and Swift export. What KMP developers should do now.
3 min read
Swift on Android vs Kotlin Multiplatform: which one should share your code?
Swift 6.3 brought an official Swift SDK for Android. How it compares with Kotlin Multiplatform, and how to choose which one shares your app's code.
3 min read
Comments
No comments yet — start the conversation.