Migrating an Android app to iOS with KMP — Part II: Data sources and migrations

<p>In the&nbsp;<a href="https://proandroiddev.com/migrating-an-android-app-to-ios-with-kmp-part-i-first-steps-and-architecture-cd151a930bc9" rel="noopener ugc nofollow" target="_blank">first article</a>, we covered the basics of application architecture and the first steps in multiplatform using KMP. This time we will dive into data sources, which libraries to use, and how to keep the data integrity during the migration.</p> <p>&mdash;</p> <p>This article is part of a series of migrating an existing Android app to run on iOS using Kotlin Multiplatform. You can access the other articles in the following links:</p> <ul> <li><a href="https://proandroiddev.com/migrating-an-android-app-to-ios-with-kmp-part-i-first-steps-and-architecture-cd151a930bc9" rel="noopener ugc nofollow" target="_blank">Part I: First steps and architecture</a></li> <li>Part II: Data sources and migrations</li> </ul> <p>&mdash;</p> <h1>Architecture</h1> <p>Going back to the architecture, Alkaa has two data sources:&nbsp;<code>local</code>&nbsp;and&nbsp;<code>datastore</code>. The first one is responsible for data persistence using SQLite through Room, and the second is for a key-value light database, using Preferences DataStore. At this time, there is no&nbsp;<code>remote</code>&nbsp;layer connecting to a server.</p> <p><a href="https://proandroiddev.com/migrating-an-android-app-to-ios-with-kmp-part-ii-data-sources-and-migrations-149480546881"><strong>Learn More</strong></a></p>