What is the recommended project structure for KMM ...
# multiplatform
a
What is the recommended project structure for KMM applications? 1. One single git project containing both native apps as well as their shared logic. 2. Two git projects - one containing android native and shared and other containing iOS native (We currently have this) 3. Three git projects one for each Android, iOS and shared. Is this even possible?
j
We do 3. One repo for shared code. And then one for each of android, iOS, web, and server. Do whatever works best for you.
a
Thanks. We wanted to go with third option as well so that code can be shared with multiple android and iOS projects.
Is there a sample project utilizing third option?
j
I have no idea. The only interesting bit is producing a fat framework for iOS. For Android, web, and server it's just a normal library that can be published to an internal Artifactory or similar.
👍 3
a
How can we test it in local, for example when I want to change something in shared and test it for Android? And what IDE are you using?
h
We are using a big mono repo for everything (android and iOS clients and backend). I think, it mainly depends on the team size, with a small team this is structure is easy and everybody understand the whole code and is needed for reviews, but in a larger team splitting the code base makes sense to focus on your area
s
take a look at https://github.com/prof18/kmp-fatframework-cocoa for the iOS side. There’s an accompanying blog post linked in the readme
a
Thank you