Hi! I am using a third party library that is kotlin multiplatform, but I can’t seem to figure out how to import symbols from the library in my Swift code. The library doesn’t export a framework but I expect that I should still be able to import symbols from it since my kotlin code depends on it. The symbols I cannot specifically import are subclasses of a sealed class and extension functions
Copy code
// moduleA of external lib
sealed class Foo
data class FooClazz(val prop: String) : Foo()
// moduleB of my kotlin code; framework shared
fun foo(): Foo = FooClazz(prop = "")
// swift
import shared
struct BarView : View {
var body: some View {
let fooValue = sharedFooKt.foo() as! moduleAFooClazz // Cannot find 'moduleAFooClazz' in scope
Text(fooValue.prop)
}
}