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

Samuel Bichsel

08/13/2020, 8:37 AM
I am trying to export a Kotlin Native dependency to Swift through cocooapods. How can I achieve that? My build.gradle looks like that:
Copy code
targets {
        targetFromPreset(presets.android, "android")

        final def iOSTarget = project.findProperty("kotlin.native.cocoapods.target") == "ios_arm"    \
                                 ? presets.iosArm64 : presets.iosX64

        fromPreset(iOSTarget, 'ios')
    }

    cocoapods {
        summary = "Shared Kotlin/Native module"
        homepage = "<https://github.com/dreipol>"
        frameworkName = "Shared"
    }
I read in the documentation, that yore able to export it like that , but that doesn’t work with the cocoapods integration:
Copy code
fromPreset(iOSTarget, 'ios').binaries {
    framework {
        export "ch.dreipol:dreimultiplatform:$dreiMultiplatformVersion"
    }
}
Does anyone have a hint?
y

yousefa2

08/13/2020, 8:52 AM