egorand

    egorand

    2 years ago
    If the native artifact of a multiplatform library is published as
    klib
    , is there a way for the consumer to transform it into a
    framework
    ? Or does it have to be published as a
    framework
    ?
    s

    Sam

    2 years ago
    You would just create an mpp module, define an iOS target and tell it to use the dependency. I believe it has to be api rather than implementation in order to export it to your Swift/ObjC code. One can also just publish a framework but there is a caveat. Currently only one Kotlin framework can be included into an app at a time. For this reason, the common pattern is to make an umbrella framework that has all klib dependencies.
    egorand

    egorand

    2 years ago
    Makes sense, thanks!