I wonder what the best setup is if you have an ind...
# multiplatform
s
I wonder what the best setup is if you have an independent iOS app that should consume a multiplatform library from maven. Would you create some kind of small shell kmm setup locally to consume the maven dependency and build a local framework to consume from the iOS app? Or are there other, more iOS idiomatic ways of doing that (which do not require a full gradle build setup locally)?
💯 1
m
I guess you could publish the iOS framework to a private Cocoapods repo, couldn't you?
s
Hm, interesting. I need to look into that. Looks like there’s a
native.cocoapods
gradle plugin? 🤔
p
You can just build the binaries and add Package.swift in your MPP library
s
@Paul Woitaschek Thanks! I just tried this gradle plugin for generating a swift package. This worked nicely in a test setup. I wonder how that would work if it gets more complicated, e.g. if the library would depend on ktor. Not sure if I’d still get around having a local kmm project for iOS? Or maybe I could build a swift package from that kmm project that binds everything together? 🤔
p
@Sebastian Kaspari It's a binary framework, it has all the code bundled in
j
Wrote a short post on using the above plugin https://johnoreilly.dev/posts/kotlinmultiplatform-swift-package/
s
@John O'Reilly Awesome. Will read that. 🙂