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

How to use this plugin to generate a pod for iOS project to use #27

Closed wuseal closed 3 years ago

wuseal commented 3 years ago

Hi, body, as title said, I want to generate a cocoapods for iOS project as our project use cocoapods as module manager, I'v read the README.md, but can't find how to use it to generate a pod, Any step for me to achieve that?

FYI:Comes from here: https://kotlinlang.slack.com/archives/C3SGXARS6/p1603028341199400?thread_ts=1602236811.143200&cid=C3SGXARS6

ge-org commented 3 years ago

Hi @wuseal,

this plugin cannot create a Pod. It can create an XCFramework and a matching Package.swift file. For integration of Kotlin Multiplatform projects with Cocoapods please take a look at the Cocoapods Plugin: https://kotlinlang.org/docs/reference/native/cocoapods.html

wuseal commented 3 years ago

@ge-org Thank you for quick reply, Yeah, I'v used cocoapods plugin, this is my demo: https://github.com/wuseal/Idle

I created a release version pod by using your plugin now, I tested it and works fine. Now I have another question: How to create XCFramework within DEBUG and RELEASE together and link it in podspec here: https://github.com/wuseal/Idle/blob/2e241d5c285d396b0a49d7dd3a748ff94bca7f86/Idle.podspec#L11

I think DEBUG version is quit fit for development

ge-org commented 3 years ago

Hi @wuseal,

sorry for the late reply. There's no way to include a debug and a release build in the same xcframework at the moment. You could create two pods instead.