
For iOS I just needed to wrap the data in a CommonFlow object, as shown below: val landPager = Pager(Ĭonfig = PagingConfig(pageSize = PAGE_SIZE, enablePlaceholders = false), // Ignored on iOS This library was built to support the Jetpack Paging library out of the box, so very little needed to change for my pre-existing Android implementation. So I did a little digging and found a KMM multiplatform paging library. As I started down the path of writing my pagination logic I very quickly got frustrated that I was creating duplicate logic across the two platforms. iOS, unfortunately, doesn’t have a native pagination library. For Android this assumption was correct, and I was able to use the Android Jetpack Paging Library. When I started work on implementing the KMM repository layer it was under the assumption that both Android and iOS had their own native pagination.

Because of that, I’d encourage you to open the repository in a second pane to provide context to the snippets as needed. I’m going to try and cut the code snippets down to only the most salient bits in order to keep this post’s size a little more manageable. The ODIN API provides in-depth information about a wide array of military equipment. I’m using the Army’s brand new ODIN API for a reboot of my WEG iOS and Android applications. Today I will cover implementation of the SwiftUI user interface for the iOS app.


This is the last entry in a multi-part series on Kotlin Multiplatform Mobile.
