What Can Kotlin Multiplatform Mobile Do?
Even though Kotlin Multiplatform Mobile is in the alpha stage a lot of components are stable. KMM gives developers access to many well-tested and well-tried libraries that let us:
- Perform HTTP requests
- Build a database
- Access local files and app settings
Kotlin Multiplatform’s libraries let us implement a data access layer. You write everything once, test it once, and then you can distribute it across the platforms you need.
But not only that. If you structure your code properly, you can share up to 85% of the code between platforms. You can share everything from the data access layer by Interactors/UseCases to the data presentation layer (ViewModel).
If you are already using Clean Architecture with one of the MV* presentation patterns you’re good to go with KMM.
Kotlin Multiplatform Mobile used in production:
Some time ago one of our clients asked us to create a library that would be distributed on both Android and iOS. The library would make it easier to access the client’s API and provide a handy way to detect a decent number of events that are essential to the client’s business point of view.
This was the perfect use case for KMM. The only risk was that there were no examples of the distribution of the iOS framework built in the KMM. But if we found out that it wasn’t possible, we would still have an Android library already built.
Thanks to the ready-made libraries and the community around KMM (especially Kotlin Slack), the process of implementing this library went really well. Kotlin’s community actively helps to get a job done.
The greatest advantage of using KMM in a business setting was that we could write the code once, test it once, and distribute it on both mobile platforms.
Support is now very easy — it can be handled by only one person with just a little knowledge of the iOS platform.
The library is open source, so feel free to take a look at AudioburstMobileLibrary.
AudioburstMobileLibrary (available on Android and iOS) lets developers add the Audioburst Player and content to their app.
AudioburstMobileLibrary offers easy access to the Audioburst’s Content APIs, letting developers add playlists, get information about playlists, and handle sending required events to the API without any effort. Integration is convenient and simple to increase engagement.
Check out how we helped Audioburst build their mobile apps.