Hi all :slightly_smiling_face: We have an existing...
# multiplatform
e
Hi all 🙂 We have an existing native iOS/Android project where we are trying to create a shared KMM library create more consistent code between the platforms and reuse code. What we would like to retain is the way we build the projects (that means using Xcode for iOS). Does anyone know if there's some official documentation on how to integrate kotlin KMM module well with an existing project or have managed to do it somehow? So far it seems for iOS the best working solution for us have been to use the Cocoapods integration, however we are having some issues there since we manage multiple configurations in our iOS project (not just Develop and Release, which is the only configurations supported by the plugin by default).
I've currently worked around the Cocoapods issue by manually changing the generated
.podspec
file to include a specific variable based on the build type:
Copy code
spec.pod_target_xcconfig = {
    ...,
    'KOTLIN_CONFIGURATION' => 'Release',
    'KOTLIN_CONFIGURATION[config=Debug]' => 'Debug'
}
and in the script-phase I use
$KOTLIN_CONFIGURATION
instead of
$CONFIGURATION
. This assumes that any configuration that is not Debug is a Release, which is probably not flexible enough for the community as a default solution.
a
Hi Even, Alex here from IceRock👋 here's the toolkit we released for accelerating mobile multiplatform development for iOS & Android platforms: https://moko.icerock.dev
👍 1
also, our templates - https://github.com/icerockdev/moko-template - there are classes and interfaces divided by modules
👍 1