https://kotlinlang.org logo
s

Shervin

06/22/2022, 8:18 PM
Hey everyone! I have a question about multi-module structure in kotlin-multiplatform. I have a few kotlin modules which I am adding to my
shared
module as “api”, how ever I’m not able to access them from Xcode. I am adding
kotlin("multiplatform")
and also:
Copy code
kotlin {
    jvm()
    iosX64()
    ios() 
}
to the target module which I want to have access from Xcode. I can verify that the
shared
module can be imported in Xcode, but not the modules that it depends on. Any idea what might be the issue? Thanks in advance
m

mkrussel

06/22/2022, 8:57 PM
You need to
export
them in the framework. If you don't then only the symbols used in the public API of the shared module gets included.
Copy code
binaries.framework("Shared") {
   export(project(":dep1")
   export(project(":dep2")
}
👍 1
s

Shervin

06/23/2022, 6:07 AM
@mkrussel thank you. I will try this tonight.
Big thanks! solved my issue
2 Views