hi channel, I have use case that I am not fully aw...
# multiplatform
a
hi channel, I have use case that I am not fully aware if it is possible or not using KMP. I'm working in a project in my current job that is to implement something called "Context Based Design Tokens" (or something like that)... the thing is that, I have a script that generates a lot of Kotlin classes from a Design JSON, and those models are used in a Compose Multiplatform solution I wrote. The thing is that, I wanted to achieve the same on iOS, but the Compose Multiplatform API is not "native" for them (I am using Locals in Compose, and in SwiftUI I know I can achieve the same with custom Modifiers), so I was thinking on reusing the generated Kotlin models from the
shared/commonMain
source set, in my
shared/iosMain
source set but from a Swift file, so I can write a fully native SwiftUI API. I was looking in the internet, and I wasn't able to find any implementation around this. My idea is that I can reuse my generated models so we don't have to maintain 2 implementations of the same logic. The final XCFramework should contain these new Swift files included as part of the API. Is this something achievable with KMP? I think my question is: can I write a Swift file inside
shared/iosMain
souce set that uses the Kotlin code from the
shared/commonMain
source set? Please let me know if my explanation is confusing or you need me to expand on it