ge-org/multiplatform-swiftpackage

Missing cocoapods dependency in XCFramework

Opened this issue · 5 comments

Hey!

Thanks for the repo. Unfortunately, we ran into an issue with a cocoapods dependency, which is not present in the final XCFramework. Is there any way to add this dependency to the binary?

cocoapods {
        // Configure fields required by CocoaPods.
        summary = ""
        homepage = ""
        // You can change the name of the produced framework.
        // By default, it is the name of the Gradle project.
        ios.deploymentTarget = "12"

        pod("Mixpanel")
    }
multiplatformSwiftPackage {
        swiftToolsVersion("5.3")
        targetPlatforms {
            iOS { v("12") }
            macOS { v("11") }
        }
        outputDirectory(File(projectDir, ""))

    }

Cross link to #kotlin-native channel

Hello, the plugin aims to export a XCframework to be consumed via the Swift Package Manager, not CocoaPods. I suggest to take a look at https://kotlinlang.org/docs/native-cocoapods.html

Thanks @nicoonguitar!
Maybe I explained myself wrong though. I'm expecting it to export a XCFramework, what is missing though is the dependency in the the exported XCFramework, in this case the Mixpanel dependency

This guide might help you exporting your dependencies to the binaries: https://kotlinlang.org/docs/mpp-build-native-binaries.html#export-dependencies-to-binaries

@neugartf are you able to solve this issue to include the dependencies? We are facing the same issue with missing dependencies.

@neugartf @anandlalvb were either one of you able to solve this issue? I'm also facing the same issue.