sergey.bogolepov
12/20/2024, 2:01 PMenum
and sealed
classes, which means all types of classes are covered except tricky value
ones :D
• Added support for simple method overrides. Not-so-basic covariant and fake overrides will come later after we implement support for interfaces.
• Rolled out initial support for the @Throws
annotation by translating it to an untyped throws
.
Current Focus Areas
• Interfaces. Even though we excluded cross-language inheritance from the initial scope, interfaces remain very challenging to implement.
• Functional types (aka closures/lambdas). Recently, we merged support for the () -> Unit
type and are now expanding support for the rest of the possible signatures. We also need to ensure that throwing works properly, along with overrides. Oh man.
Glimpse into the future
For now, we are continuing to use a type system that is more or less the same as in Objective-C export (KotlinBase
as the root of the class hierarchy). However, we see limitations of this approach and a potentially better option that promises to be much more flexible: KotlinBridgeable protocol. We will not switch to it before the first public release, but it is clearly something we want to explore as soon as possible.
Thank you for following our progress—see you in the new year! 👋David
01/21/2025, 6:41 AMcolintheshots
01/26/2025, 9:21 PM> A failure occurred while executing org.jetbrains.kotlin.gradle.plugin.mpp.apple.swiftexport.internal.SwiftExportAction
> Can't translate return type in fun MainViewController(): platform.UIKit.UIViewController: Symbol not found for platform/UIKit/UIViewController
// from androidx.compose.ui.window
import platform.UIKit.UIViewController
fun ComposeUIViewController(content: @Composable () -> Unit): UIViewController =
ComposeUIViewController(configure = {}, content = content)
Simon Frost
02/03/2025, 1:24 PMAlex Murphy
02/04/2025, 5:05 PMstruct
) export on the roadmap? From what i've seen data class exports from Kotlin will still use reference types (swift class
)sergio
02/13/2025, 8:05 AMMohamed Mabrouki
02/13/2025, 10:11 AMNadeen Ashraf
02/20/2025, 11:04 AMGrigory Panko
03/20/2025, 11:00 AMSirUnsupportedType
appearing which later cause java.lang.IllegalStateException: Attempt to bridge unbridgeable type: SirUnsupportedType.
? I'm experimenting with Swift export in our project, and trying to export almost any module (trying to at least export dependencies before exporting our own modules) produces this exception. I've succeeded only with exporting single kotlin-stdlib
, while having this exception with, for example, kotlinx-datetime
, ktor-http
, ktor-client-core
or coroutines-core
. Maybe there is some list of supported/unsupported types, or I'm just setting up something wrong?Dmitriy Tarasevich
04/19/2025, 5:43 PMmattinger
05/21/2025, 1:05 PMdata class SomeClass(val value: Int = 0)
I can't instantiate this in swift code without supplying the value
parameter.
I'm unable to use SKIE because we're modeling log data which has a large number of optional constructor parameters, which SKIE isn't good at handling (as it tries to create all the different permutations available)
Is there something i'm missing, or is this just not something available yet?Marco Righini
06/19/2025, 2:08 PMGuilherme Delgado
06/25/2025, 10:34 PMursus
07/06/2025, 1:19 AMFlow<T>
?ursus
07/06/2025, 1:24 AMHien Nguyen
07/16/2025, 9:51 AMSamuele Perricone
07/16/2025, 3:16 PMsoderbjorn
07/31/2025, 9:43 PMsuspend
functions. In the past they were exported to ObjectiveC and very easy to call from Swift, e.g.:
viewModel.run() { error in
if let error = error {
// ...
}
}
Now, looking at the generated Swift source code, my suspend
functions are completely excluded from export! 😱 Other functions in the same class are exported, even with similar (empty) method signature, as long as they are not suspend
functions.
I must be missing something here. What might be going on? 🤔
Edit: Hmm, I guess this is probably just a consequence of coroutines not being supported yet.russhwolf
08/06/2025, 5:05 PMJaypalsinh Barad
08/10/2025, 8:06 AMCees Wiersma
08/14/2025, 1:18 PMCaused by: java.lang.IllegalArgumentException: Collection contains more than one matching element.
at org.jetbrains.kotlin.swiftexport.standalone.builders.BuildSwiftModuleKt.buildSirSession(buildSwiftModule.kt:148)
at org.jetbrains.kotlin.swiftexport.standalone.translation.ModuleTranslationKt.translateCrossReferencingModulesTransitively(ModuleTranslation.kt:110)
at org.jetbrains.kotlin.swiftexport.standalone.SwiftExportRunnerKt.translateModules(SwiftExportRunner.kt:167)
at org.jetbrains.kotlin.swiftexport.standalone.SwiftExportRunnerKt.runSwiftExport(SwiftExportRunner.kt:139)
at org.jetbrains.kotlin.gradle.plugin.mpp.apple.swiftexport.internal.SwiftExportAction.execute(SwiftExportAction.kt:55)
Is this something worth creating an issue for on YouTrack or simply a configuration mistake on my end?John O'Reilly
08/24/2025, 10:16 AMJohn O'Reilly
08/25/2025, 6:27 PMJohn O'Reilly
08/25/2025, 8:24 PMembedSwiftExportForXcode
etc) and now at point where seeing some issues with some of the Swift code I'm using.....more in 🧵Siggi Gunnarss
09/03/2025, 11:33 AMembedSwiftExportForXcode
to use Swift export for the foreseeable future?
https://kotlinlang.slack.com/archives/C073GUW6WN9/p1750342126794569
https://youtrack.jetbrains.com/issue/KT-78747/Swift-export-for-SPMArsildo Murati
09/03/2025, 11:32 PMrudolf.hladik
09/05/2025, 8:37 AMexport-kdoc
feature with swift export and it doesn't work. Is there a plan to support it?
Is there other way how to show doc comments from shared code to our fellow iOS devs?
we used dokka with gh pages for public repos but for private ones it is no go coz gh pages are public.spencer
09/09/2025, 10:41 PMGhasem Shirdel
09/19/2025, 1:15 PM