Hi, all. Can someone point me to a site that expla...
# multiplatform
d
Hi, all. Can someone point me to a site that explains how to generate distributables from a KMP project? Mine is targeting both Android and iOS so would like to have it generate a package for both the App Store and Google's store that I can then distribute.
I found this page: https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-publish-apps.html#android-app However, the first thing it mentions, about ensuring the build id and app name are unique, I can't find any such file (Config.xcconfig) in my project.
a
I haven't generated a distributable with kmp project yet but I have with native android and native iOS swift ui apps. From what I understand is that the process of creating the executables is the same as you would with native apps so and there are pleanty of tutorials out there regarding this so just follow them and you should be good
d
ℹ️ You should follow the standard Android and iOS instructions for creating final deliverables, and these instructions should not be impacted by KMP. Packaging is outside the scope of KMP to manage; and this is definitely correct. It should not be in scope - KMP becomes 'just' a shared library module in your otherwise toolchain-native App delivery pipeline.
Of the two, iOS is definitely the more painful code-signing process; I recommend you check out
fastlane
to assist with this. (I've just implemented the
fastlane match
workflow which has helped simplify maintenance of our CI/CD pipeline).
For Desktop Apps check out https://hydraulic.dev/
d
@darkmoon_uk sorry if I wasn’t clear before. What I meant to ask is if the default Gradle build environment for KMP apps had a build target to generate those different distributions bundles.
d
Yeah, that actually was my interpretation of your question so the answer is the same; I don't think KMP should have anything to do with that.
When it comes to Mobile targets; KMP builds a shared library that goes in your native App.
It doesn't build the native App.
The exception is Compose for Desktop/Web, which does build distributables; I guess because there is no existing ecosystem to tie into there.
But Android and iOS packaging and codesigning is very involved... KMP shouldn't tangle with that.
c
This project is archived and no longer maintained, but I really like how Chris Banes managed all the build artifacts and publishing with GitHub Actions in the Tivi app. I learned a lot of tricks for managing secrets, building Android and iOS apps, and publishing the artifacts. Nothing KMP specific, but it can be helpful to see build steps for multiple targets all in the same GitHub Actions configuration. https://github.com/chrisbanes/tivi/blob/main/.github/workflows/build.yml
👍 1