https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
d

David Nedrow

02/14/2023, 4:28 PM
Are we still limited to a single KMM library in iOS projects. E.g., if I have KMMDataManager and KMMDesign, can both be imported directly in an iOS project, or do I have to wrap them in a single iOS framework?
D'oh! I suppose I could just try. ;)
c

Casey Brooks

02/14/2023, 4:35 PM
It should technically work having multiple KMM frameworks in an iOS app, but each one will have a copy of the entire Kotlin/Native runtime and dependencies, making it difficult to share data between the two and bloating the download size. It’s probably best to keep a single
shared
module, but you should be able to set up multiple KMM Gradle modules which
:shared
depends on, so that they all get compiled into the same framework.
This article discusses the details a bit more https://touchlab.co/multiple-kotlin-frameworks-in-application/
4 Views