Hey everyone.. is there a way to integrate a Swift...
# multiplatform
s
Hey everyone.. is there a way to integrate a SwiftUI multiplatform project (i.e. it supports iOS, macOS, tvOS, and watchOS) in a KMP project? If so, is there an example repo for the same?
t
I think if you think the shared KMM module is just a library then it will be the same any swift project
s
I found this article by John O Reilly https://johnoreilly.dev/posts/swiftui-multiplatform-kotlin-multiplatform/ But seems like now the SwiftUI app depends on a packaged KMP library Won't that be slower when it comes to simultaneous development? i.e. make changes to Kotlin code, publish it, and then consume it in the Swift project?
Just like a scratch KMM project that has the
ios
module already wired up to the
shared
module, I want an
apple
module to be wired up to the
shared
module so that whenever I make code changes inside
shared
, it's instantly available to the
apple
module.
t
Yes sure. Just create another sourceset and named it to be “apple”
p
You can take a look at this example from the compose-jb repo: https://github.com/JetBrains/compose-jb/tree/master/examples%2Ftodoapp
Interesting to also check the ones under the experimental folder: https://github.com/JetBrains/compose-jb/tree/master/experimental%2Fexamples