Hi all, does anyone know the best way to create an...
# kotlin-native
w
Hi all, does anyone know the best way to create and distribute a KN binary - without source - that’s consumable for iOS developers? Preferably via Cocoapods?
k
there's a cocoapods plugin
w
Sorry, let me ask the question differently. I’m already using the Cocoapods plugin, but I’m wondering if there’s a way to make the pod to use the binary framework and not source files? So ideally an iOS developer without java on their machine could still develop an iOS app that’s consuming the pod
b
you'll want to have CI (or manually) run a script that generates the .framework and pushes it somewhere internally, and you can make a podspec that references that internal framework
k
last i tried the cocoapods plugin, it did use the framework. did that change?
b
it's possible the cocoapods plugin creates a task that will create this podspec for you
k
that's exactly what the cocoapods plugin does
🙌 1
w
@basher Thanks for the response! My follow up question would be: do I need to do anything on the K/N side to support multiple architectures? Does this produce a fat framework?
b
well it's possible the cocoapods plugin will handle it, but here is a FatFrameworkTask you can use: https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#building-universal-frameworks
👍 2
k
you don't need a fat-framework task for the cocoapods plugin. in fact the two tasks would be independent.
however, the syntax is kotlin.targets["iosArm32"], or kotlin.targets.withType<KotlinNativeTarget>()