https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
l

Laurence Muller

08/08/2021, 12:12 AM
Hi, for the iOS framework distribution, some projects use the "regular framework" and just add in their exports like this: ( https://kotlinlang.org/docs/mpp-build-native-binaries.html#export-dependencies-to-binaries )
Copy code
iosTarget("ios") {
    binaries {
        framework {
            baseName = "shared"
            export("com.arkivanov.decompose:decompose:0.3.1")
            export("com.arkivanov.essenty:lifecycle:0.1.2")
        }
    }
}
But what if I created my projects with the KMM plugin which by default sets it to the "CocoaPods dependency manager" how would I add those exports?
Copy code
cocoapods {
    summary = "Some description for the Shared Module"
    homepage = "Link to the Shared Module homepage"
    ios.deploymentTarget = "14.1"
    frameworkName = "shared"
    podfile = project.file("../iosApp/Podfile")

    // How to include the same exports?
}
v

Viacheslav Kormushkin

08/08/2021, 6:39 AM
In 1.5.30 there will be a new DSL for this:
Copy code
cocoapods {
 framework {
  export(...)
 }
}
Before that you can try a hack:
Copy code
iosTarget("iOS") {          binaries.getFramework("DEBUG").export(...)
}
🎉 1
👍 2
l

Laurence Muller

08/09/2021, 12:38 PM
Thank you! This works great :)