Announcing Multiplatform Paging
Article Summary
Veyndan Stuart from Cash App just open-sourced a solution to one of mobile development's most annoying problems: writing pagination logic twice for Android and iOS.
Cash App released Multiplatform Paging, a Kotlin Multiplatform wrapper around AndroidX Paging that lets teams share pagination logic across platforms. It tackles the hard problems of paginated data (caching, request deduplication, page jumping) without rewriting code for each platform.
Key Takeaways
- Binary compatible with AndroidX Paging on JVM, no API changes needed
- Shares repository and view model layers across Android and iOS
- Drop-in replacement means existing AndroidX Paging dependencies still work
- Provides UI components for rendering paged items on both platforms
Cash App's Multiplatform Paging lets you write pagination logic once and use it on both Android and iOS without learning a new API.
About This Article
Pagination looks straightforward on the surface, but it involves tricky problems like in-memory caching, request deduplication, and page jumping that need complex solutions across multiple platforms.
Cash App wrapped AndroidX Paging for Kotlin and Multiplatform by creating two modules: paging-common for shared logic across platforms and paging-runtime for Android and iOS.
Multiplatform Paging maintains binary compatibility with AndroidX Paging on the JVM, so all dependent libraries keep working without any modifications or API changes.