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

Поділитися
Вставка
  • Опубліковано 1 жов 2024
  • 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/Seb...
    Tooling:
    KDoctor development environment analysis tool: github.com/Kot...
    Kotlin Multiplatform plugin for Android Studio: plugins.jetbra...
    Demo API endpoint: sebastianaigne...
    Libraries used:
    Kamel Kotlin Asynchronous Media Loader: github.com/Kam...
    Ktor: ktor.io/
    kotlinx.serialization: github.com/Kot...
    Moko-MVVM: github.com/ice...
  • Наука та технологія

КОМЕНТАРІ • 186

  • @Kotlin
    @Kotlin  Рік тому +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 Рік тому +1

      Thank you 🙏🏾

    • @RaajKanchan
      @RaajKanchan Рік тому

      Thank You

    • @dk98126
      @dk98126 Рік тому +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 Рік тому

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

    • @BhanitGaurav
      @BhanitGaurav Рік тому

      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 Рік тому +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 ❤

  • @SAPierce2006
    @SAPierce2006 Рік тому +24

    A fantastic Kotlin Multiplatform demo!

  • @nicolagallazzi9295
    @nicolagallazzi9295 Рік тому +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 Рік тому +1

      Decompose by Arkadiy Ivanov?

    • @diegoberaldin7888
      @diegoberaldin7888 Рік тому +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 Рік тому +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 Рік тому +11

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

    • @imamyusupbachtiar5461
      @imamyusupbachtiar5461 Рік тому +1

      @@GakisStylianos That's very kind of you

  • @RexTorres
    @RexTorres Рік тому +11

    I learned a LOT just from this one video!

  • @nanonkay5669
    @nanonkay5669 Рік тому +7

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

  • @RaajKanchan
    @RaajKanchan Рік тому +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 Рік тому

      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 Рік тому

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

    • @beefpancakez8097
      @beefpancakez8097 Рік тому +1

      UPDATE THE KOTLIN PLUGIN SERIALIZATION MINE FINALLY WORKED

    • @imharshvardhan
      @imharshvardhan Рік тому

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

    • @imharshvardhan
      @imharshvardhan Рік тому +1

      ah! got it, updated to 1.9.0 and it works

  • @YassineMikeAlpha
    @YassineMikeAlpha Рік тому +8

    The tutorial is explained very well

  •  10 місяців тому +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.

  • @boskovaskovic
    @boskovaskovic 10 місяців тому +1

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

  • @jamesvaldir6350
    @jamesvaldir6350 Рік тому +1

    Some people don't use mac on the account of mac being shit . But we still wanna produce shit for shit consumers to consume.
    Will we be able to use kmm in the near future without touching shit ?

  • @offlineuser1888
    @offlineuser1888 Рік тому +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)?

  • @mrkaydev
    @mrkaydev Рік тому +2

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

  • @GabrielSouza-of7kt
    @GabrielSouza-of7kt Рік тому +5

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

    • @RR-et6zp
      @RR-et6zp 5 місяців тому

      flutterflow will tbh

  • @cdrv5
    @cdrv5 Рік тому +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.

    • @小弟劉-x6o
      @小弟劉-x6o Рік тому +1

      😅yvy9998😊 14:28 😊😊 14:29

  • @aleksamatic9558
    @aleksamatic9558 Рік тому +3

    When will compose IOS get to the beta state?

  • @djodoidao
    @djodoidao Рік тому +6

    Excited to introduce this in company

    • @xorfive
      @xorfive Рік тому +2

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

    • @osisuper98
      @osisuper98 Рік тому +6

      @@xorfiveYeah but you should start learning now

    • @DmitryZatuchny
      @DmitryZatuchny 8 місяців тому

      @@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

    • @metalor696
      @metalor696 Місяць тому +2

      Haha the classic shiny new toy 😂

  • @kyay10
    @kyay10 Рік тому +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

  • @anumamin3886
    @anumamin3886 Рік тому +3

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

  • @BenjaminBK
    @BenjaminBK 9 місяців тому +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

  • @xozzy7809
    @xozzy7809 Рік тому +3

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

  • @arozendojr
    @arozendojr Рік тому +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

  • @sage_ranjan
    @sage_ranjan Рік тому +2

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

  • @barryfawthrop9962
    @barryfawthrop9962 Рік тому +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

  • @markusmcgee
    @markusmcgee Рік тому +2

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

  • @kamil_supabase_enjoyer
    @kamil_supabase_enjoyer Рік тому +1

    Compare to Flutter its very hard to use. Maybe someday compose will be as good as Flutter

  • @ledsonvanini7421
    @ledsonvanini7421 Рік тому +2

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

  • @yannmassard3970
    @yannmassard3970 Рік тому

    this video represents everything wrong in the American way of doing things. Man, I m sure you are a capable coder, but this whole thing was ridiculous. Instead of creating purely assisted new generations of coders, just let them go full native on both platforms. WTF was even that ?

  • @Daaaaaaavid
    @Daaaaaaavid Рік тому +1

    I will wait the next decade for the day when you can write the UI in Compose and it translates to native iOS Style automatically, that's the only day I will think OK now we are talking.

    • @GakisStylianos
      @GakisStylianos Рік тому

      That's already possible for the most part, just someone has to sit down and write those components. But you can call the same function and have a different actual implementation on iOS vs on Android.

  • @dmitriyobidin6049
    @dmitriyobidin6049 3 місяці тому

    iOS native devs are obsolete now?
    Amazing, spent 5 months learning new skill just to find out that it will be useless in the future...

  • @rolandwinter9260
    @rolandwinter9260 12 днів тому

    Clark Kimberly Davis Frank Gonzalez Brenda

  • @RhexGomez
    @RhexGomez Рік тому +2

    I actually appreciate the walkthrough on the documentation.

  • @niloythings
    @niloythings 6 місяців тому

    How do I change status bar color in compose multiplatform ?

  • @MichaelMossmanNZ
    @MichaelMossmanNZ 3 місяці тому

    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 =)

  • @ITwalebhaiya
    @ITwalebhaiya 11 місяців тому

    Waoh How simplify you Teach Thank you 🙏🤝

  • @ocramato
    @ocramato 4 місяці тому

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

  • @toshempire8296
    @toshempire8296 3 місяці тому

    Am flutter developer what are the benefits of KMP

  • @krishsehgal
    @krishsehgal 2 місяці тому

    saif ali khan start teaching kotlin, every indian understand it 😅

  • @BhanitGaurav
    @BhanitGaurav Рік тому

    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?

  • @nishu33389
    @nishu33389 2 місяці тому

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

  • @SpaceGuideHub
    @SpaceGuideHub 3 місяці тому

    You look like Steve Jobs when he was jung))

  • @محمدباقرملایی
    @محمدباقرملایی 3 місяці тому

    its not 100 % kotlin
    it dosnt support google google map yet!

  • @neunmalelf
    @neunmalelf Рік тому

    It's a great Product and a good Language, but you lost me at ".. to the next level .."
    This is not TikTok, and we don't talk about nail polishing.

  • @weissmannrob
    @weissmannrob 11 місяців тому

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

  • @gregas3068
    @gregas3068 11 місяців тому

    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?

  • @VirgilioSolano
    @VirgilioSolano 2 місяці тому

    Nice, congratulations for whole JetBrains team.👏

  • @Narazgul
    @Narazgul Рік тому

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

  • @bettertoaster
    @bettertoaster Рік тому

    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)

  • @mobix25
    @mobix25 5 місяців тому

    you look like seif ali khan a bollywood actor

  • @samsadch
    @samsadch Рік тому

    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?

  • @ericvalencia161
    @ericvalencia161 Рік тому

    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.

  • @Germansdev
    @Germansdev 4 місяці тому

    Thanks good Sebastian!

  • @vikashparajuli
    @vikashparajuli 11 місяців тому

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

  • @juniorMr
    @juniorMr Рік тому

    jet pack mult platform will kill flutter

  • @abdrsbte
    @abdrsbte 2 місяці тому

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

  • @destro4157
    @destro4157 6 місяців тому

    Hey is there a mentor that can guide me ?

  • @34adse3
    @34adse3 11 місяців тому

    Excellent, but holy moly that’s complicated.

  • @neingtyyyy
    @neingtyyyy Рік тому

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

  • @tuyulghost291
    @tuyulghost291 Рік тому

    what the different between compose multiplatform and kotlin multiplatform

  • @konstantinvolkov2629
    @konstantinvolkov2629 15 днів тому

    interesting thing, thanks

  • @mohanaggarwal4058
    @mohanaggarwal4058 Рік тому +1

    Truly awesome demo! Tysm Seb!😁😉💖

  • @renascienza.bazarclub
    @renascienza.bazarclub Рік тому

    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?

  • @khaqim4148
    @khaqim4148 10 місяців тому

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

  • @Razik-z2y
    @Razik-z2y Рік тому +1

    Osm lecture ❤

  • @loliconmaster7152
    @loliconmaster7152 Рік тому +1

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

  • @DaleKingProfile
    @DaleKingProfile 10 місяців тому

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

  • @cisimon7
    @cisimon7 Рік тому

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

  • @guanacodevs
    @guanacodevs Рік тому

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

  • @MrPieTech
    @MrPieTech 10 місяців тому

    You confirmed everything i wanted
    Thanks

  • @sanjaykarki6238
    @sanjaykarki6238 Рік тому

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

  • @dontknowunknow187
    @dontknowunknow187 Рік тому

    how to change screen like jetpack compose navigation?

  • @michal_castek
    @michal_castek Рік тому

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

  • @shinobivdk
    @shinobivdk Рік тому

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

  • @teeesen
    @teeesen 10 місяців тому

    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 9 місяців тому +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.

  • @khantsithuphyo5484
    @khantsithuphyo5484 10 місяців тому

    have tutorial for android+iso+smart tv ??

  • @aseemsharma4643
    @aseemsharma4643 Рік тому

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

  • @samsadch
    @samsadch Рік тому

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

  • @letme4u
    @letme4u Рік тому

    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.

  • @bunhengborath7698
    @bunhengborath7698 10 місяців тому

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

  • @khalidrinaldy3671
    @khalidrinaldy3671 Рік тому

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

  • @odayprogrammer
    @odayprogrammer Рік тому

    Great work, thank you

  • @guai9632
    @guai9632 9 місяців тому

    multiplatform tied to mac. apple is so apple

  • @emlioms
    @emlioms 11 місяців тому

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

    • @verryondrums
      @verryondrums 11 місяців тому

      Probably never.... Because Apple 😅

  • @adamfatyga7977
    @adamfatyga7977 Рік тому

    12 errors with oracle/java :/

  • @sheikhfajlayrabbi6070
    @sheikhfajlayrabbi6070 Рік тому

    why he looks like steve jobs? 😳😳

    • @DevilLord5678
      @DevilLord5678 Рік тому

      I was thinking that he looks similar to someone but couldn't guess who it was but you got it right 😂

  • @MujahidKhan-hh7wj
    @MujahidKhan-hh7wj Рік тому

    VEry very poor documentation

  • @hinocenciopaulo
    @hinocenciopaulo 10 місяців тому

    Thank you for this wonderful tutorial 🙏

  • @finchicoph
    @finchicoph 6 місяців тому

    Oh my goodness, I love this.

  • @US-Air-Forces
    @US-Air-Forces 10 місяців тому

    Can I write all of this in java?

  • @code-with-mehdi
    @code-with-mehdi Рік тому

    The iOS support sucks. I have not been able to get a successful build yet after many attempts. So wild errors pop up during build :(

    • @pablovaldes6022
      @pablovaldes6022 Рік тому +1

      What problem you have?
      Open an issue in the sample project and they help you there

  • @hestonic5114
    @hestonic5114 Рік тому

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

    • @hestonic5114
      @hestonic5114 Рік тому

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

  • @mckenytech8033
    @mckenytech8033 Рік тому

    Does map box navigation work with this?

  • @owaistnt
    @owaistnt Рік тому

    Magnificent effort. I really look forward to your videos.

  • @hestonic5114
    @hestonic5114 Рік тому

    How can we provide and use context in common main?

  • @lutfiikbalmajid
    @lutfiikbalmajid Рік тому

    can i develop it in Android Studio?

  • @hak5448
    @hak5448 Рік тому

    This development is great, but please use XML when designing. Please!

    • @notbambang
      @notbambang Рік тому

      XML view based? maybe It will depracated soon as mobile development are moving into declarative programming with compose and swift UI

  • @oriohac
    @oriohac Рік тому

    What will happen to KMM?

  • @tylerwilson3027
    @tylerwilson3027 Рік тому

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

  • @mytubekt
    @mytubekt Рік тому

    Great content! Thanks for sharing!

  • @ОлександрНадюк-л9ч

    high-quality content, thank you!
    🤯