Anton Afanasev

    Anton Afanasev

    11 months ago
    Hi. What do you do with high binary sizes on iOS? I have watched this talk

    https://www.youtube.com/watch?v=hrRqX7NYg3Q&t=1892s

    from Kevin Galligan from a year ago. Wondering if anybody knows anything about progress on reducing the sizes, K\N-Swift interop
    kpgalligan

    kpgalligan

    11 months ago
    Can discuss. What kind of numbers are you getting and how do you measure?
    b

    Brian G

    11 months ago
    I find the binary size to be quite acceptable. My final *.ipa is <20MiB which is not bad. What's yours?
    Anton Afanasev

    Anton Afanasev

    11 months ago
    My .framework is around ~15 mb. For a pretty small sdk with a couple of standard dependencies like ktor. I am fine with that, but you know...customers complains. So I must check if there are anything to do with binary sizes. I tried "internalizing" all I could. And there were a pretty nice effect. I actually saw a reduction of ~500 kb after doing that on a bunch of data classes. Wonder if there are anything else that can help to downsize.@kpgalligan I remember you were talking about KMM team working on K\N - Swift interoperability which should reduce the size. Wondering if there are any progress on that. I read somewhere that this work was frozen.
    kpgalligan

    kpgalligan

    11 months ago
    Well, again, to measure the actual size, you need to either push it to the app store and let apples servers crunch numbers, or run local size estimates with Xcode. The size on your dev disk is not wha the actual app size will be. I don't remember how I presented it in that talk (and I have a talk today that I'm really not prepared for, so I don't have a lot of time to reply here...), but raw numbers on disk don't really tell the story. For KaMP Kit, which has ktor, sqldelight, and a few others, our sizes were ~1.5m as a final size increase on real devices. I assume local disk size was much larger, but it's been a while.
    Anton Afanasev

    Anton Afanasev

    11 months ago
    Wow, thats are really great numbers.
    kpgalligan

    kpgalligan

    11 months ago
    Anton Afanasev

    Anton Afanasev

    11 months ago
    thaks. Looking into that
    kpgalligan

    kpgalligan

    11 months ago
    They're not 100% the same as uploaded, but very close.
    Anton Afanasev

    Anton Afanasev

    11 months ago
    Thank you @kpgalligan for great advise. With the help of our iOS team I was able to run the size report and results were pretty good looking. Original
    ~26mb
    .framework file was reduced to
    ~6mb
    . I believe it should calm down our client. However, for educational purpose I am wondering if anybody have any understanding about processes that makes this downsize actually happen. Why initial .framework is so big and how it is downsized...
    kpgalligan

    kpgalligan

    11 months ago
    I don't have a ton of detail, but there are a number of things. Debugging info, possibly multiple architectures (actual device only needs one). Probably a bunch of other stuff. It's not unique to kotlin. Ios size estimation can be complicated