a

    agustibm

    3 years ago
    Hi! One question. The Kotlin multiplatform is only business logic? In other words, is it possible import dependencies, for example okhttp?
    v

    vincent.desmet

    3 years ago
    You can import dependencies, but probably not the ones you want. OkHttp is built for JVM, so you can’t use OkHttp if you want to build to Native(e.g. iOS). But you should have a look at Ktor (http://ktor.io), a network server/client library by Jetbrains. They just released a beta version with multiplatform support.
    a

    agustibm

    3 years ago
    Thank you. This tutorial will be useful http://ktor.io/clients/http-client/multiplatform.html?
    And more things... is it possible the with js?
    c

    coletz

    3 years ago
    yep the tutorial is useful. I've had a lot of problems with 0.9.5, while using 1.0.0 beta everything works
    gildor

    gildor

    3 years ago
    it’s impossible to use Jvm dependencies, correct, but interesting that people from Square actually plan to make okhttp multiplatform, they already did it with okio Check this talk if you interested

    https://www.youtube.com/watch?v=Q8B4eDirgk0

    Slide from this talk about porting another libraries to multiplatform
    For now you can use ktor client as multiplatform http client
    a

    agustibm

    3 years ago
    Do you have an example uploaded?@coletz
    Or @gildor
    c

    coletz

    3 years ago
    nope, sorry. At the moment I don't have a completely working example, but you can check this one https://github.com/touchlab/DroidconKotlin/
    woops sorry, ktor is not used here :S
    Sergio Casero

    Sergio Casero

    3 years ago
    I have an example with mpp client
    But I can't compile the JS project, for iOS and Android works
    kpgalligan

    kpgalligan

    3 years ago
    I talked about libraries a bit in my talk. Listed what's currently available for mobile dev. Should follow up with a post on that, but working on a new library. Only so much time. The droidcon app is strictly native mobile. No JS. Sqldelight should "run" on JS, but JS doesn't (officially) support sql. http://www.youtube.com/watch?v=Dul17VSiejo&t=24m0s
    a

    agustibm

    3 years ago
    Thanks @Sergio Casero, but it haven’t ktor client, right?
    Sergio Casero

    Sergio Casero

    3 years ago
    It has the ktor client common
    a

    agustibm

    3 years ago
    sorry, it’s in feature/network_calls_common_client branch
    Sergio Casero

    Sergio Casero

    3 years ago
    Yep!