Hi, I wondered if anyone could help me out with Ko...
# multiplatform
j
Hi, I wondered if anyone could help me out with Kotlin Multiplatform: I have a multiplatform module that has common / android and ios implementations, with 1 pod dependency. I can build this successfully, and produce a POD. I then have a second multiplatform module that depends on the first one above. In gradle I can build with compile..IosX64KLibrary, and it generates fine. However, when I try and build iOS app, it complains saying "_Module not found_", for the pod dependency in the second module. It fails on the cinterop task of the dependency module after calling (parent module).syncFramework from the kotlin build function. Is there any workaround for this error. Basically, I just want the kotlin multiplatform library, then implementation project(":childModule") in another multiplatform module, and be able to build the iOS app with a dependency just on the parent, and for it to pull in the child explictlly / just build it into the first one Hope that makes sense, and can provide more information if needed! Thanks
m
@Jack Darlington I’m not sure but if it is similar case as here then maybe my answer will help you
j
Seems slightly, different but thanks! The only way I can get around it is by including the cocoapods dependencies in the parent module and adding the src directories to the parent module from the other one, then it can be built independently, or as part of my module. Ideally, I could just do it with the standard implementation project(':module') syntax, but it seems that it doesnt do the poddownload steps for the one being implemented
child:
Copy code
...
ios()
cocoapods {
    summary = "CocoaPods test library"
    homepage = "<https://github.com/JetBrains/kotlin>"

    pod("SomePod", version = "~> 15.2.0")
}

...
parent:
Copy code
...
ios()
cocoapods {
    summary = "Shared code for app"
    homepage = "blah"
}

val commonMain by getting {
     dependencies {
       implementation(":child")
     }
}