My generic module depends on another KMM module. T...
# multiplatform
p
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
Move the second object to a separate module and don't export that to objc? Make it public in kotlin
p
@Big Chungus The problem is that they are subclasses of the same sealed class, so I can't do it 🙄
b
Hmm, then maybe define interfaces and factory function for exposed stuff? Then your sealed classes can just implement the interface
r
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.