Thread
#multiplatform
    Sebastian Kaspari

    Sebastian Kaspari

    1 year ago
    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)?
    matej

    matej

    1 year ago
    I guess you could publish the iOS framework to a private Cocoapods repo, couldn't you?
    Sebastian Kaspari

    Sebastian Kaspari

    1 year ago
    Hm, interesting. I need to look into that. Looks like there’s a
    native.cocoapods
    gradle plugin? 🤔
    Paul Woitaschek

    Paul Woitaschek

    1 year ago
    You can just build the binaries and add Package.swift in your MPP library
    Sebastian Kaspari

    Sebastian Kaspari

    1 year ago
    @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? 🤔
    Paul Woitaschek

    Paul Woitaschek

    1 year ago
    @Sebastian Kaspari It's a binary framework, it has all the code bundled in
    John O'Reilly

    John O'Reilly

    1 year ago
    Wrote a short post on using the above plugin https://johnoreilly.dev/posts/kotlinmultiplatform-swift-package/
    Sebastian Kaspari

    Sebastian Kaspari

    1 year ago
    @John O'Reilly Awesome. Will read that. 🙂