Can I consume multiple dynamic Kotlin/Native frameworks in a single iOS application?
Laxman Sahni
04/26/2022, 2:39 PM
We would like to create multiple dynamic Kotlin/Native frameworks for different purposes & consume in a iOS app through Swift Package Manager. If it's supported, we can host these artifacts on our artifacts repository & consume through
The blog post is old, but not a whole lot has changed (and likely won’t). You can have multiple frameworks in the same app. They cannot communicate with each other. They might share the same dependencies, but those dependencies are distinct at a binary level. So if you had a “Products” framework and a “Taxes” framework, you couldn’t pass a product class instance from “Products” to “Taxes”, even if the “Taxes” kotlin module depends on the “Products” kotlin module.
kpgalligan
04/26/2022, 6:42 PM
If they’re completely separate, you can have multiple, but you will get some duplicate binary which will take up disk space (maybe have some memory implications? That’s a wild guess and probably insignificant, but disk space for sure).
kpgalligan
04/26/2022, 6:45 PM
Oh, ha! I wrote that answer in SO. I just gave a talk about this, but it’s not public yet. I try to explain the “why” a bit better in the talk. May be time for a new blog post.