Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The rollercoaster of releasing an Android, iOS, and macOS app with Kotlin Multiplatform | KotlinConf

The rollercoaster of releasing an Android, iOS, and macOS app with Kotlin Multiplatform | KotlinConf

With the rise of Kotlin Multiplatform, the possibility of expanding to multiple platforms has increased, especially for Android Developers. It's easier than before to build for other platforms.

But how to release your app to multiple platforms?

In this talk, I will share all the things I've learned around distributing FeedFlow, an Android, iOS, and macOS app built with Kotlin Multiplatform, coming from an Android development background.

We will cover the deployment of the binary, automating everything with CI, crash reporting, logging, internationalization, and all you need to know to successfully distribute your KMP app.

Marco Gomiero

May 23, 2024
Tweet

More Decks by Marco Gomiero

Other Decks in Programming

Transcript

  1. The rollercoaster of releasing an Android, iOS, and macOS app

    with Kotlin Multiplatform Marco Gomiero @marcoGomier Senior Android Developer @ Airalo Google Developer Expert for Kotlin
  2. @marcoGomier • Sign the app • Provisioning profiles • Upload

    to TestFlight • All handled by Xcode (or manually on the CI) iOS
  3. @marcoGomier macOS - App Store • Sign the app •

    Provisioning profiles • Upload to TestFlight
  4. @marcoGomier val isSandboxed = System.getenv("APP_SANDBOX_CONTAINER_ID") != null if (isSandboxed) {

    val resourcesPath = System.getProperty("compose.application.resources.dir") // sqlite-jdbc System.setProperty("org.sqlite.lib.path", resourcesPath) System.setProperty("org.sqlite.lib.name", "libsqlitejdbc.dylib") }
  5. @marcoGomier internal expect fun crashReportingLogWriter(): LogWriter actual fun crashReportingLogWriter(): LogWriter

    = CrashlyticsLogWriter() actual fun crashReportingLogWriter(): LogWriter = SentryLogWriter()
  6. @marcoGomier val feedFlowStrings: Map<String, FeedFlowStrings> = mapOf( Locales.It to ItFeedFlowStrings,

    Locales.En to EnFeedFlowStrings, Locales.De to DeFeedFlowStrings, ) Text(strings.searchHintTitle) let strings = feedFlowStrings["it"] ?? EnFeedFlowStrings Text(text = LocalFeedFlowStrings.current.feedUrl)
  7. > Twitter: @marcoGomier > Github: prof18 > Website: marcogomiero.com >

    Mastodon: androiddev.social/@marcogom Thank you, and don’t forget to vote
  8. Bibliography / Useful Links • https: / / feedflow.dev/ •

    https: / / help.apple.com/itc/transporteruserguide/en.lproj/static.html#apd70774093eddb4 • https: / / developer.apple.com/documentation/security/app_sandbox/protecting_user_data_with_app_sandbox • https: / / github.com/JetBrains/compose-multiplatform/blob/master/tutorials/Native_distributions_and_local_execution/ README.md#adding-files-to-packaged-application • https: / / firebase.google.com/products/crashlytics • https: / / docs.sentry.io/platforms/java/ • https: / / github.com/touchlab/CrashKiOS • https: / / github.com/touchlab/Kermit • https: / / github.com/adrielcafe/lyricist • https: / / www.jetbrains.com/help/kotlin-multiplatform-dev/compose-images-resources.html#strings • https: / / www.marcogomiero.com/posts/2024/kmp-ci-android • https: / / www.marcogomiero.com/posts/2024/kmp-ci-ios • https: / / www.marcogomiero.com/posts/2024/kmp-ci-macos-github-releases • https: / / www.marcogomiero.com/posts/2024/kmp-ci-macos-appstore • https: / / www.marcogomiero.com/posts/2024/compose-macos-app-store/