Hey team! I'm looking for resources about migratin...
# multiplatform
a
Hey team! I'm looking for resources about migrating existing iOS and Android apps to KMP. Most guides I've found (including official ones) only cover the Android-first approach - starting with Android and then building iOS from scratch. Has anyone come across materials specifically about migrating when you already have both platforms up and running? Would appreciate any links or experiences you could share!
m
Hi! I am not aware of such resources but the way I would approach this is as follows: 1. Try to separate out the business logic from Android App into KMP library. 2. Use the library in a layer that is shared between two apps and write the ViewModels for the UI (

https://www.youtube.com/watch?v=H8iQZxWgSCs

) 3. Remove the business logic from swift leaving only the UI and use shared ViewModels for UI interactions I think this approach would give you the head start because you first work on Android side and as You pointed out there is much more resources there 🙌
Let me know what approach You will pick because that is very unique and interesting problem 🤓
a
I'm embarking on this also, and found this guide. I can't yet speak to the quality of it, but it covers at least some aspects of the iOS conversion process. https://www.thedroidsonroids.com/blog/convert-native-project-to-kotlin-multiplatform-developers-guide
a
I'm just getting through a rebuild of a couple or existing apps. There's some really painful parts of it. I guess it'd be nice to help others and maybe get some help on my stuck parts of it. It would be somewhat challenging to keep it short though..
a
@Mikolaj @Aidan @Adrian Garcia Thank for responses guys, I'll let you know how it would go, it would take some time for sure and a lot of prep before I can even start to migrating things