ge-org / multiplatform-swiftpackage

Gradle plugin that generates a Swift Package Manager manifest and an XCFramework to distribute a Kotlin Multiplatform library for Apple platforms.
Apache License 2.0
333 stars 49 forks source link

Missing cocoapods dependency in XCFramework #37

Open neugartf opened 2 years ago

neugartf commented 2 years ago

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

nicoonswift commented 2 years ago

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

neugartf commented 2 years ago

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

leandrofavarin commented 2 years ago

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

anandlalvb commented 8 months ago

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

OttoFI commented 2 months ago

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