Build an iOS & Android app in 100% Kotlin with Compose Multiplatform

Sdílet
Vložit
  • čas přidán 26. 07. 2023
  • Visit jb.gg/compose to start building 100% Kotlin mobile apps!
    The new iOS target for Compose Multiplatform means you can build cross-platform mobile apps entirely in Kotlin - including the UI!
    Compose Multiplatform for iOS is currently in Alpha, so now is a great time to explore the technology: Let’s build a simple app from start to finish in Kotlin. In the process, you’ll see how Compose Multiplatform and Kotlin Multiplatform enable sharing everything - from the networking layer, to business logic, to UI. The end result will be a small app that can load and display different bird pictures from an API, that will run on both Android and iOS!
    Find the full, final “My Bird App” project at github.com/SebastianAigner/my...
    Tooling:
    KDoctor development environment analysis tool: github.com/Kotlin/kdoctor
    Kotlin Multiplatform plugin for Android Studio: plugins.jetbrains.com/plugin/...
    Demo API endpoint: sebastianaigner.github.io/dem...
    Libraries used:
    Kamel Kotlin Asynchronous Media Loader: github.com/Kamel-Media/Kamel
    Ktor: ktor.io/
    kotlinx.serialization: github.com/Kotlin/kotlinx.ser...
    Moko-MVVM: github.com/icerockdev/moko-mvvm
  • Věda a technologie

Komentáře • 188

  • @Kotlin
    @Kotlin  Před 11 měsíci +29

    If you're coding along with the tutorial: Make sure the kotlinx.serialization plugin (13:38) has the same version as the Kotlin version (currently 1.9.0 in the template, see the gradle.properties file!) Currently, that means using the following:
    kotlin("plugin.serialization") version "1.9.0"

    • @mofeejegi
      @mofeejegi Před 11 měsíci +1

      Thank you 🙏🏾

    • @RaajKanchan
      @RaajKanchan Před 11 měsíci

      Thank You

    • @dk98126
      @dk98126 Před 11 měsíci +2

      can you please create an annotation in this video so people would realise that just in time when they watch it? I spent for about a half an hour trying to figure out why serialization doesnt work. BTW this video is such a quality content omg!!! Thank you for your work!

    • @RaajKanchan
      @RaajKanchan Před 11 měsíci

      @@dk98126 It waited for 4 days and several tries, to figure out what's the issue. Glad to get the answer today.

    • @BhanitGaurav
      @BhanitGaurav Před 11 měsíci

      The templete has build error, which does not let compiler to generate the sqldelight build classes. Need soloution on this. Yes, app runs fine but how to use sqldelight with build issue? @Kotlin

  • @ravipoon09
    @ravipoon09 Před 11 měsíci +37

    As someone who is learning jetpack compose and doing it on the job, I find this extremely useful and motivating ☺️. Thank you compose multiplatform team for all your efforts ❤

  • @nanonkay5669
    @nanonkay5669 Před 10 měsíci +6

    Finally you can now build UIs for both platforms. That was the one thing I was waiting for. Its finally come

  • @SAPierce2006
    @SAPierce2006 Před 11 měsíci +21

    A fantastic Kotlin Multiplatform demo!

  • @VirgilioSolano
    @VirgilioSolano Před dnem

    Nice, congratulations for whole JetBrains team.👏

  • @vlogan79
    @vlogan79 Před 11 měsíci

    One of the clearer Jetpack compose tutorials out there, thanks.

  •  Před 8 měsíci +6

    Great tutorial. As someone who has a background of developing backend apps using Kotlin, this video is super helpful to understand KMM and the basic mobile concepts.

  • @GabrielSouza-of7kt
    @GabrielSouza-of7kt Před 11 měsíci +5

    Great video Seb!!! Kotlin and Compose will take the world!
    Awesome to see Voyager! Thanks for sharing

    • @RR-et6zp
      @RR-et6zp Před 3 měsíci

      flutterflow will tbh

  • @mohanaggarwal4058
    @mohanaggarwal4058 Před 11 měsíci +1

    Truly awesome demo! Tysm Seb!😁😉💖

  • @RhexGomez
    @RhexGomez Před 11 měsíci +2

    I actually appreciate the walkthrough on the documentation.

  • @bunhengborath7698
    @bunhengborath7698 Před 8 měsíci

    Kotlin is doing some magic now hope there are more nice tutorial like this in the future. thank compose multiplatform team for your handwork.

  • @anumamin3886
    @anumamin3886 Před 11 měsíci +3

    Finally some good example video by Jetbrains 🎉 please make more such videos and keep doing amazing work!

  • @sanjaykarki6238
    @sanjaykarki6238 Před 11 měsíci

    Thank you for the video and also information about precompose library i was just looking for the library like that❤️❤️❤️

  • @owaistnt
    @owaistnt Před 11 měsíci

    Magnificent effort. I really look forward to your videos.

  • @RexTorres
    @RexTorres Před 11 měsíci +11

    I learned a LOT just from this one video!

  • @MichaelMossmanNZ
    @MichaelMossmanNZ Před měsícem

    Thanks so much for a great tutorial ... I like your style! ... I've never actually sat through a 50 minute YT video before, but I'm glad I did, and I even paid attention. I have an Android app that I've been working on for about 2 years (99% Kotlin) and now I want that to also run on iOS devices. I'm doing this at the right time IMHO, since CMP is maturing nicely and Google is supporting KMM in general. I just have to learn more Compose, then Multiplatform, and probably a little Swift ... wish me luck =)

  • @BenAyesu
    @BenAyesu Před 11 měsíci

    Been waiting for this!!

  • @khalidrinaldy3671
    @khalidrinaldy3671 Před 10 měsíci

    Great video, i love your penguin meme doll at the back sir

  • @xozzy7809
    @xozzy7809 Před 11 měsíci +3

    Voyager library is the goat, easy to use and easy to understand

  • @BenAyesu
    @BenAyesu Před 11 měsíci

    That was amazing. Thank you!

  • @user-fg3wl4xu9d
    @user-fg3wl4xu9d Před 10 měsíci

    That's great! More of that please!

  • @user-dv1ff1dw6b
    @user-dv1ff1dw6b Před 10 měsíci

    high-quality content, thank you!
    🤯

  • @abdrsbte
    @abdrsbte Před dnem

    What a beautiful Rectangular app 😂
    A very nice code along 👍

  • @hinocenciopaulo
    @hinocenciopaulo Před 7 měsíci

    Thank you for this wonderful tutorial 🙏

  • @MrPieTech
    @MrPieTech Před 7 měsíci

    You confirmed everything i wanted
    Thanks

  • @nicolagallazzi9295
    @nicolagallazzi9295 Před 11 měsíci +32

    Great tutorial! It would be a piece of cake to have a consistent navigation library, hope something would pop up in the next future!

    • @alekseyblekot119
      @alekseyblekot119 Před 11 měsíci +1

      Decompose by Arkadiy Ivanov?

    • @diegoberaldin7888
      @diegoberaldin7888 Před 11 měsíci +1

      Or Voyager as suggested in the video. I've used mostly Decompose in my multiplatform JVM desktop projects and I think it's great, because it's more than a navigation library, its "slots" (as opposed to stacks) allow to isolate components and have discrete portions of UI+state holders that can easily be moved or reused. I'm experimenting Voyager in another project and it's fine too but still have to put it under stress test with nested navigation and so on...

    • @bierdav
      @bierdav Před 11 měsíci +1

      I found the documentation and setup of decompose to be very complicated. Until now I have not a working solution. Would be great to see a proper guide on how to use all of those libraries

    • @GakisStylianos
      @GakisStylianos Před 11 měsíci +11

      Decompose
      voyager
      appyx
      circuit
      precompose
      Decompose-Router
      Are all multiplatform navigation libraries. They already have popped up, the future is here

    • @imamyusupbachtiar5461
      @imamyusupbachtiar5461 Před 11 měsíci +1

      @@GakisStylianos That's very kind of you

  • @letme4u
    @letme4u Před 11 měsíci

    thanks for amazing session. Please do consider map-layer and realtime notifications to UI like websockets / graphql subscriptions for next tutorial series on compose multiplatform.

  • @YassineMikeAlpha
    @YassineMikeAlpha Před 11 měsíci +8

    The tutorial is explained very well

  • @chen_xi_xi
    @chen_xi_xi Před 11 měsíci

    Very useful tutorial, thanks!

  • @ledsonvanini7421
    @ledsonvanini7421 Před 9 měsíci +2

    Parabéns pelo conteúdo. Você é incrível🔥👏

  • @odayprogrammer
    @odayprogrammer Před 11 měsíci

    Great work, thank you

  • @mytubekt
    @mytubekt Před 11 měsíci

    Great content! Thanks for sharing!

  • @tylerwilson3027
    @tylerwilson3027 Před 11 měsíci

    Great video. It would be fun to see this in the warm target too. :-)

  • @guanacodevs
    @guanacodevs Před 11 měsíci

    I'll admit that I was very skeptical, but this one just convinced me. Take my money.

  • @cdrv5
    @cdrv5 Před 11 měsíci +6

    Nice tutorial, Just need these types of tutorials to setup my app and start working on. I still prefer to flutter for both ios and android but looking forward to explore kotlin even further as Kotlin for data science libraries would be great to build good applications for future ai applications.

  • @gokhanfromearth5735
    @gokhanfromearth5735 Před 9 měsíci

    great tutorial, thanks!

  • @finchicoph
    @finchicoph Před 4 měsíci

    Oh my goodness, I love this.

  • @ITwalebhaiya
    @ITwalebhaiya Před 9 měsíci

    Waoh How simplify you Teach Thank you 🙏🤝

  • @djodoidao
    @djodoidao Před 11 měsíci +5

    Excited to introduce this in company

    • @xorfive
      @xorfive Před 11 měsíci +2

      You should wait until it's ready, before bringing into your product.

    • @osisuper98
      @osisuper98 Před 11 měsíci +6

      @@xorfiveYeah but you should start learning now

    • @DmitryZatuchny
      @DmitryZatuchny Před 5 měsíci

      @@xorfive I was waiting for jetpack compose to get ready when I started my current project so at that time i chose xml and now I'm stuck with it for a long time. rewriting certain major screens in my app is just not worth it. sometimes you have to predict the future

  • @Germansdev
    @Germansdev Před měsícem

    Thanks good Sebastian!

  • @barryfawthrop9962
    @barryfawthrop9962 Před 11 měsíci +2

    Please consider following this up with an example of how to use hardware like camera in Compose KMP OR where you use native code with Views, thanks Great work

  • @shinobivdk
    @shinobivdk Před 11 měsíci

    amazing, I was looking for that., it will save my money XD

  • @emmanuelmtera5936
    @emmanuelmtera5936 Před 11 měsíci

    Very Good Tutorial Indeed

  • @markusmcgee
    @markusmcgee Před 11 měsíci +2

    Good tutorial. Would like to see more components like LazyList for iOS and Themes (theme for iOS, Android, MacOS deployment)

  • @user-yb6vl9nc9g
    @user-yb6vl9nc9g Před 11 měsíci

    Great content!

  • @eric-ampire
    @eric-ampire Před 11 měsíci

    This is a great video

  • @renascienza.bazarclub
    @renascienza.bazarclub Před 11 měsíci

    I found kind of tricky manage internal images on KMM Compose Multiplatform, since seems that gradle doesn't add new image files to iOS project dependencies.
    This issue is already addressed nowadays?

  • @arozendojr
    @arozendojr Před 11 měsíci +1

    I'm new to mobile, felt complicated trying to install the development environment, android studio, gradle, ruby, cocoapods versions had conflicts. I am working to resolve the conflicts

  • @weissmannrob
    @weissmannrob Před 8 měsíci

    Great Tutorial. Thanks.
    kotlin("plugin.serialization") version "1.8.21" caused problems switched to "1.9.10" then it worked.

  • @Narazgul
    @Narazgul Před 10 měsíci

    I'm curious about the Midjourney Images Compose Multiplatform project. Would you mind telling, me what has been worked on there?

  • @cisimon7
    @cisimon7 Před 11 měsíci

    Just great, android compose developers becoming iOS developers overnight. It's magic

  • @aseemsharma4643
    @aseemsharma4643 Před 11 měsíci

    How are we managing the navigation, if we want to keep it in shared module? Does compose has plans to work on this?

  • @offlineuser1888
    @offlineuser1888 Před 11 měsíci +2

    Great, carefully selected example app: shows only pictures on a grid. This hides the most important aspects of the mobile apps: platform native look and feel. Is this possible with kotlin compose on iOS/Android just like Flutter can do (inlcuding navigation)?

  • @gregas3068
    @gregas3068 Před 8 měsíci

    Thank you mister for this nice example. I have a following question. I have build an android app in Jetpack Compose. Now I am building a seperate one in Swift for iOS devices. I have a question. Since the app uses camera, ML model, Firebase, Google Play Billing . . . Do you perhaps have an idea of which of these parts (if any at all) can be shared so that it makes sense to use Compose Multiplatform project?

  • @ferg
    @ferg Před 8 měsíci

    Awesome video

  • @BhanitGaurav
    @BhanitGaurav Před 11 měsíci

    The templete has build error, which does not let compiler to generate the sqldelight build classes. Need soloution on this. Yes, app runs fine but how to use sqldelight with build issue?

  • @kyay10
    @kyay10 Před 11 měsíci +2

    Btw, Copilot is amazing at creating data classes from JSON. You can just make a top-level val like:
    ```
    // A typical Json response
    val pictureResponse = """{ isPicture: true }"""
    ```
    and copilot will make the dataclasses that follow that JSON's structure

  • @ezriouil
    @ezriouil Před 11 měsíci

    Nice tutorial from morocco

  • @nishu33389
    @nishu33389 Před 6 dny

    Does the shared rest api call also implemented in this demo project?

  • @samsadch
    @samsadch Před 11 měsíci

    I have an Android and iOS application in the production. Can I create a compose feature module and plug the module into existing iOS and Android application?

  • @khaqim4148
    @khaqim4148 Před 8 měsíci

    is there any tutorial like this but with the native UI like swift ui and jetpack compose?

  • @boskovaskovic
    @boskovaskovic Před 7 měsíci +1

    So basically I need to have mac, iphone, xcode and to be familiar with swift ? Only benefit is to have shared module ?

  • @user-cv4vv6ie3b
    @user-cv4vv6ie3b Před 11 měsíci +1

    Osm lecture ❤

  • @aleksamatic9558
    @aleksamatic9558 Před 11 měsíci +3

    When will compose IOS get to the beta state?

  • @michal_castek
    @michal_castek Před 10 měsíci

    Is necessary to use Android Studio or Can use IntelliJ???

  • @bettertoaster
    @bettertoaster Před 10 měsíci

    kdoctor doesn't seem to check that Java 17 is used. And it is required to run the ios build. At least with my IDE (Hedgehog)

  • @eduardoruesta5180
    @eduardoruesta5180 Před 7 měsíci

    Thanksss!!

  • @BenjaminBK
    @BenjaminBK Před 6 měsíci +1

    So, how does all the setup work without "hey, take this template" and "hey, the IDE does all the magic stuff". I want to understand what gradlestuff does what and which folderstructure is neccessary and if the function locations and names are important or custom etc. When i understood all that, i have no problems to use templates or let the IDE do magic

  • @DaleKingProfile
    @DaleKingProfile Před 7 měsíci

    Is there any support for creating UI tests for iOS compose?

  • @TheZukkino
    @TheZukkino Před 11 měsíci +1

    Incredible guide. Well done and thanks for this work. If possible, please add, as you said, the repository with DB caching management and injection. This could cover a bit chunck of the development.

  • @mrkaydev
    @mrkaydev Před 11 měsíci +2

    does someone facing issue with kotlinx serilization to convert data to List ???

  • @sunfisoft
    @sunfisoft Před 11 měsíci

    hello is it available for web development too?

  • @niloythings
    @niloythings Před 3 měsíci

    How do I change status bar color in compose multiplatform ?

  • @mckenytech8033
    @mckenytech8033 Před 11 měsíci

    Does map box navigation work with this?

  • @asmanmirza9083
    @asmanmirza9083 Před 11 měsíci

    Does KMM supports Material 3?

  • @samsadch
    @samsadch Před 11 měsíci

    How can we add png or jpeg images to res and show. In Android it's showing. iOS its crashing

  • @hestonic5114
    @hestonic5114 Před 11 měsíci

    How can we provide and use context in common main?

  • @tuyulghost291
    @tuyulghost291 Před 9 měsíci

    what the different between compose multiplatform and kotlin multiplatform

  • @emlioms
    @emlioms Před 8 měsíci

    Fantastic !
    Do you know when will be available to use iOS UI emulator on windows ?

    • @verryondrums
      @verryondrums Před 8 měsíci

      Probably never.... Because Apple 😅

  • @vikashparajuli
    @vikashparajuli Před 8 měsíci

    I don't see the way to change the status bar color using compose multiplatform

  • @teeesen
    @teeesen Před 7 měsíci

    Great tutorial. One problem I had was at 34:27 the overload of `items` wasn't recognized. I'm not sure why. I ended up using `items(uiState.images.size,itemContent={k -> imageCell(uiState.images[k])})` which seemed to work ok. This is my first program in Kotlin, so I probably missed something. I found that a lot of import declarations had to be added that were not shown in the video; perhaps this was a case where the correct overload of `items` had to be imported.

    • @trejkaz
      @trejkaz Před 6 měsíci +1

      One frequent trap I find with items() is, if I type this:
      items(items = clipboardEntries)
      IDEA will complain: "Cannot find a parameter with this name: items"
      But it has no issue at all with this:
      items(items = clipboardEntries) { clipboardEntry -> TODO() }
      Unfortunately, IDEA is just not very nice when it comes to showing you where the error is. In this case, it should have put the red underline at the end of the line, but instead it just complains about the parameter you did provide, even though it's named correctly.

  • @dmytrorysovanyi8815
    @dmytrorysovanyi8815 Před 11 měsíci

    Thats great, thank you. I want the interface of Android Studio like yours, how to do that :) ?

    • @letme4u
      @letme4u Před 11 měsíci

      I believe they are using Ultimate version.

  • @loliconmaster7152
    @loliconmaster7152 Před 11 měsíci +1

    is it a bit difficult or am I just stupid that I can't get it well?

  • @dontknowunknow187
    @dontknowunknow187 Před 10 měsíci

    how to change screen like jetpack compose navigation?

  • @ocramato
    @ocramato Před měsícem

    Hello. You must update the video because links are not the same

  • @lutfiikbalmajid
    @lutfiikbalmajid Před 9 měsíci

    can i develop it in Android Studio?

  • @hassanjamil841
    @hassanjamil841 Před 9 měsíci

    Brilliant and pretty clear and understandable video, and I would like to know about the dependency injection (like Hilt), and testing in multiplatform. Cheer up!

  • @ericvalencia161
    @ericvalencia161 Před 11 měsíci

    Is that for real can it do what flutter does? Loved kotlin before but since I came to know flutter, I never look back to kotlin.

  • @khantsithuphyo5484
    @khantsithuphyo5484 Před 7 měsíci

    have tutorial for android+iso+smart tv ??

  • @donfreeman686
    @donfreeman686 Před 11 měsíci

    You stated I would need a mac for testing ios. Can this be used to create for ipad?

    • @firstnamelastname-oy7es
      @firstnamelastname-oy7es Před 11 měsíci +1

      Yes, if you have a mac you can make it work on iphone and ipad.
      If you don't you can still follow the tutorial and make it work on android.

  • @US-Air-Forces
    @US-Air-Forces Před 7 měsíci

    Can I write all of this in java?

  • @destro4157
    @destro4157 Před 3 měsíci

    Hey is there a mentor that can guide me ?

  • @neingtyyyy
    @neingtyyyy Před 10 měsíci

    Ah the internet permission..would have missed it even if i knew.:D

  • @oriohac
    @oriohac Před 11 měsíci

    What will happen to KMM?

  • @sylensdrake9706
    @sylensdrake9706 Před 10 měsíci

    What ide is this?

  • @RaajKanchan
    @RaajKanchan Před 11 měsíci +5

    Getting the follwing exception at 19:23
    Expected class kotlinx.serialization.json.JsonObject as the serialized body of kotlinx.serialization.Polymorphic, but had class kotlinx.serialization.json.JsonArray

    • @beefpancakez8097
      @beefpancakez8097 Před 11 měsíci

      im pretty sure that instead of doing getImage() you do showImage. Although I am new to coding so take my advice with a grain of salt

    • @beefpancakez8097
      @beefpancakez8097 Před 11 měsíci

      nvm i am wrong, i got that bug near the end and now I'm stuck

    • @beefpancakez8097
      @beefpancakez8097 Před 11 měsíci +1

      UPDATE THE KOTLIN PLUGIN SERIALIZATION MINE FINALLY WORKED

    • @imharshvardhan
      @imharshvardhan Před 11 měsíci

      @@beefpancakez8097 what have you updated? as I'm facing the same error

    • @imharshvardhan
      @imharshvardhan Před 11 měsíci +1

      ah! got it, updated to 1.9.0 and it works

  • @sage_ranjan
    @sage_ranjan Před 11 měsíci +2

    Please use the dark theme...🙏🙏🙏🙏🙏🙏🙏

  • @Nick-cx4rs
    @Nick-cx4rs Před 11 měsíci

    When kmm official launch ?

  • @hestonic5114
    @hestonic5114 Před 11 měsíci

    Does anyone know, when I use IOS emulator, how can I look println's which I left in the code ???

    • @hestonic5114
      @hestonic5114 Před 11 měsíci

      I found solution. Press command + k (Mac hot key) when iPhone emulator is running to show logcat

  • @BlackSkyCrew
    @BlackSkyCrew Před 27 dny

    You look like Steve Jobs when he was jung))