Hi! I am using Kotlin/Native to develop multiplatf...
# kotlin-native
m
Hi! I am using Kotlin/Native to develop multiplatform project and was wondering how should I structure the project and which IDE to use? Like should we have android, ios, js etc. as separate modules in the same project? Or should we have a separate project for ios and separate for say common+android+js with each as modules. And then we could use Gradle to link this project with iOS. Also, how would this playout with the IDE for each project?
a
Check this project from jetbrain https://github.com/JetBrains/kotlinconf-app
IDE is CLion or AppCode preview "alpha" version is free
a
Personally prefer clion, in 2018.2 Gradle support is implemented
s
Can you develop android apps in app code?
a
No because only for iOS/macOS development
d
I would suggest following structure laid out here https://github.com/JetBrains/kotlin-native/blob/master/MULTIPLATFORM.md
It allows you to use the IDE of your choice for the different platforms, and still share the common modules
m
Yeah but they use Kotlin to develop a framework and use it as a library in Swift using XCode. There should be a better way to develop iOS apps entirely in Kotlin/Native.
d
You can do an entire iOS app via KN(though I would not recommend it). If you are using AppCode with the Kotlin/Native plugin, there is an option to create an iOS application. This does NOT create any frameworks builds the entire project as if its and Objc iOS app. I'm not to sure how well that type of project works with MPP though.