My Honest Opinion About Kotlin Multiplatform Mobile (KMM)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys welcome back to a new video so many of you actually wanted me to make videos about kmm about kotlin multi-platform for those of you who actually hear that for the first time and don't know what that is it's basically a way to use kotlin to make an ios and android app together with kotlin so it's not fully cross platform like flutter so you don't have just one code base instead you just have a big portion of code that's shared between ios and android so basically business logic data layer all that stuff can solely be done in kotlin and you only need to write the ui natively so android for jetpack compose with jpeg compose and on ios with swift ui that way you can in the end have an ios and android app that yeah shares the same business logic so you just eliminate having to define the same logic and the same data layer for two different apps and this is a great idea so the idea comes from jetbrains those are the guys who actually developed that it's great i actually tried it out and i want to give you the answer here why i don't make videos about kmm at least yet because i am a little bit disappointed for now which yeah i will explain why that is the case here in this video i still want to highlight that this video should not put cameron kmm in a bad light because it's still an alpha here when i record this in february 2022 and they actually announced to put it at least in beta in this year's spring so let's see how everything develops however let's talk about the issues i face and the issues i have with kmm at the moment and why i'm a little bit disappointed so the biggest issue it has is that it's an absolute an absolute pain to configure so you pretty much open your project and android studio will throw the first error in your face so far it's so good you solve the error you maybe install some third-party software or whatever you need to actually run this um for example there's a cocoapods which is a dependency manager for ios pretty popular need to install that not an issue but it will lead to issues when being used with km at least that was the case for me and i've heard so many other people who have the same issues so for example this cocoa pods actually um or rather android studio always told me hey coco pods is not installed even though it was installed if i used it from the command line by myself then everything worked well but android studio didn't like it then it's an absolute pain to actually get gradle the gradle configuration right because in the end the way it came and works is you have a multi-module application by default and you have a shared module so the shared module will contain all the shared code between ios and android and then you have an android and an ios module which both well just contain their native code like the android jetpack compose code and the ios swift ui codes and on the one hand it was always a pain to actually be able to rebuild the project because that's what you need to do every time you change something in this shared module you click rebuild android studio and it tells you can't rebuild didn't find project derivative whatever however if you run this from the command line like with the gradle wrapper everything works just fine on the other hand uh i had tons of issues with xcode so the ide in which you develop ios apps it never really found the shared module and it had some other errors where i actually needed to exclude some specific cpu architectures because i'm developing on an m1 macbook and that came with other issues and it was an absolute pain so overall i really needed like five six hours maybe to just get my first hello world app working and yeah it's not like it works once and then you're good then you can develop your app then you can work on the project no actually every little change you then make can can come with new issues and it can break everything again so it really feels like you're you're building a huge house of cards and any small change any small mistake you just take away one card and everything falls apart that's how km feels at the moment so that sadly does not really make it usable yet and this is just for my setup i have seen other people have so many more different errors that i did not face so it's very specific also in terms of which which kind of laptop you use um well you have to use a mac here at least if you want to make the ios app as well um but then yeah it totally depends what kind of cpu you have do you have an intel processor do you have an m1 processor it's really a pain however by simply experimenting with km trying around with it i got a really good first impression of it an impression of how it works how these different modules work together like there are some new kotlin language features we can now use how that works and i must say it's really promising so i really like the idea behind it i like that you share big portions of your code but you do the ui um separately in native language because the advantage of that is you in the end get two native apps it's not like with flutter where you have one code base and the apps look exactly the same way on both platforms no with kmm you have two native apps you have a native ios app and a native android app that both look and feel native on their corresponding platform because they both use the native ui controls and all that stuff and if there's some feature on the ios side that you only want on the ios site you just put it in the ios module and you also write it in swift as far as i understood at least so i didn't get that far um but in the end yeah that is the big advantage here that i seen came um on the one hand of course that used kotlin which is an amazing language and on the other hand that you get yeah two native apps and you don't have that problem with flutter that it that you just get one app that doesn't feel native on both platforms so overall taking the raw idea of km i see it as superior over things like flutter and react native so if jetbrains actually releases the beta of kmm in spring sometime this year then i will definitely try it again and if they improve these issues which i'm sure they are actually aware of because i also posted some of my issues in my instagram story and i got so many replies from people who actually have the same issues and who who needed like a whole workday to make a hello world app as soon as jetprings fixes that i think km is an amazing thing and in that case if it's easier to configure and yeah leads to less errors i will definitely make tutorials about that and i'm very looking forward to that what is actually your experience with km have you already tried it it would be really cool if you could let us know in the comments apart from that i wish an amazing day thanks for watching this video and i'll see you back in the next one bye bye [Music]
Info
Channel: Philipp Lackner
Views: 48,851
Rating: undefined out of 5
Keywords: android, tutorial, philip, philipp, filipp, filip, fillip, fillipp, phillipp, phillip, lackener, leckener, leckner, lackner, kotlin, mobile, kmm, kotlin multiplatform, kmp, ios android, multiplatform, cross platform, business logic
Id: GafPwVksGOQ
Channel Id: undefined
Length: 7min 43sec (463 seconds)
Published: Wed Feb 09 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.