My generic module depends on another KMM module. This second module, let's say, has two objects, both subclasses of a sealed class, so I can't put them in different modules.
1. One of them has to be included in the iOS framework, so I force this module to be included as shown here.
2. The second object must be reused in another module, so I can't make it internal, but I need to exclude it from the iOS framework.
Is there any way to do this?
b
Big Chungus
10/24/2021, 8:07 PM
Move the second object to a separate module and don't export that to objc? Make it public in kotlin
p
Philip Dukhov
10/24/2021, 8:45 PM
@Big Chungus The problem is that they are subclasses of the same sealed class, so I can't do it 🙄
b
Big Chungus
10/24/2021, 8:50 PM
Hmm, then maybe define interfaces and factory function for exposed stuff? Then your sealed classes can just implement the interface
r
russhwolf
10/24/2021, 9:44 PM
What do you need to be able to do to the first object from the Swift side? If it’s a limited set of operations you might be able to design some sort of wrapper around it and only expose that.