tscholze / kotlin-kmm-compose-sample

This is currently a playground to get to know with Kotlin Mobile Multiplatform in combination with a shared Jetpack Compose UI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sample for KMM with shared Compose UI

tl;dr

This is currently a playground to get to know with Kotlin Mobile Multiplatform in combination with a shared Jetpack Compose UI.

Build status

Service Status
- -

Used dependencies

Because of the complexity a non-dependency approach as iOS has is not possible. The following dependencies are required to run the app:

commonMain

  1. KotlinX coroutines as a foundation (X means extension)
  2. Ktor for Network requests and parsing
  3. Ballast for Jetpack Compose navigation

androidMain

  1. Coil used to fetch remote images

Feature roadmap

Setup

  • Setup shared ui :shared:commonMain to contain Jetpack Compose ui
  • Setup :shared:androidMain to containerizes and use :shared:commonMain ui
  • Setup :shared:iOSMain to containerizes and use :shared:commonMain ui
  • Setup a new :desktopApp that must use shared ui
  • Strip down :androidApp to use shared ui
  • Strip down :iOSApp app to use shared ui
  • Get rid of :iOSApp build log flodding

Core functionality

  • Add in-app navigation feature (screen transitations)
  • Add fetching local data (first screen, csv)
  • Add fetching remote data (second screen, json)
  • Add fetching remore assets (second screen, article images)
  • Add user default persisted flags (third screen)

UI

  • Create a fake but real world example of an app ui
  • Evaluate how the translation from Android MD3 controls like BottomBar works in iOS
  • Evaluate how it would be possible to create "custom" ui for each platform but use it in :shared:commonMain

Instruments

  • Check how's the memory consumption
  • Check if there is no memory leakage

Version overview

0.0.4

Main feature

  • Added RemoteImage as actual and expected implementation
  • Fixed list / scrolling insets
  • Dynamic tab view selection handling

UI

Version 0.0.4

0.0.3

Main feature

  • Added Ktor to fetch and parse JSON data
  • Added HttpClientFactory as actual and expected implementation
  • Added "open in external app" sample

UI

Version 0.0.3

0.0.2

Main feature

  • Added ResourceReader as actual and expected implementation
  • Added CSV parsing for German license plate names
  • Added more "complex" UI with keyboard events

UI

Version 0.0.2

0.0.1

Main feature

Project setup and basic Jetpack Compose UI sharing between :androidApp, :iosApp and :shared

UI

Version 0.0.1

Special thanks to

Get in touch

If you wanna talk about Kotlin, KMM, Shared Compose UI, Jetpack Compose pr Jetpack Compose for Web, I would highly recommend to join David's tiny but awesome Discord server for his awesome CfW-enhancing web framework called Kobweb. I never meet such brilliant folks that are not too "good" to help beginners.

License

This project is licensed under the MIT License - see the LICENSE file for details. Dependencies or assets maybe licensed differently.

About

This is currently a playground to get to know with Kotlin Mobile Multiplatform in combination with a shared Jetpack Compose UI.

License:MIT License


Languages

Language:Kotlin 94.3%Language:Swift 5.7%