Building a Kotlin Multiplatform Mobile App

A reflection on my experience using kotlin multiplatform mobile.

Let me start off saying I'm still super against hybrid apps (personal reasons), BUT I wanted to give Kotlin Multiplatform Mobile (KMM) a try. I wanted to see what it would be like to use a shared library across mobile environments. I have been keeping this on the backburner for awhile and I think it's time to talk about if this is here to stay.

TLDR: Yes, I think KMM will be here to stay long term

What Sparked this?

As you know I'm big into automation and simplifying workflows. That being said I was wondering "what if I could speed up app deploys by writing logic once for both native platforms". A few videos and web searches later and here we are...back at KMM. I had heard a few good things about using it for the web but never about using it for apps. If you don't already know I love kotlin and swift. They are very similar and don't make me internally as mad as Java and Objective-C. 😅

Where is the code?

You know I got you! Check out my repo here. I want to try to do some more example projects in the future but I make it a point to work from windows for personal projects. Feels a bit unbalanced to not test iOS, but we shall see ya know.

Thoughts Overall?

I like this but per usual it doesn't consider Jetpack Compose. I'll be looking into making a template for it so no worries. There is also some weird KMM specific packages to use (Ktor and SqlDelight). I wasn't really for them especially SqlDelight. I would love to know what makes these preferred for shared modules but that's for another day.

I think long term this will be a pretty good cross-platform option for the growing amount of kotlin developers. Cross-platform in this sense is Android, iOS, and Web. I think next steps for me (and others) will be to see more cross-platform examples and writeups. As of now KMM is still seen as too new but I think that's just because people can't see it in production. If more people start talking about it's use in production and not just as hobby projects I can see this taking off and maybe being the default especially for mobile devs that want to dip a toe in the web space.

I'm just rambling at this point but give it a try and let me know what you think.