Learning Mobile Development

Share Common Network Fetching Code for iOS and Android

Combining the essential logic side of iOS and Android Development

Photo by Vincent van Zalinge on Unsplash

A few weeks ago, I shared the various way one can combine iOS and Android developments. Today I’ll be focusing on one specific approach which seems to be can have great potential moving forward, the Kotlin Multiplatform Mobile (KMM).

The problem we try to solve

To illustrate this clearly, it’s good to know what problem we have today.

Typically in native mobile development, we need to have 2 sets of development, i.e. Android and iOS. This applies to Android and iOS platform-specific code (e.g. UI) and also the common logic code.

This is not ideal, as the common logic code, can be almost an identical duplication of each other, just written in two different languages (Swift and Kotlin).

How nice if we can have just one common logic code. That’s what KMM came to rescue!

The Single Common Logic Solution.

--

--