Hello, I am currently developing an iOS app using ...
# kotlin-native
a
Hello, I am currently developing an iOS app using kotlin native 0.6.1, based on the uikit sample and the gradle plugin. At this point is there a way to make auto-completion available in the IDE (IJ Ultimate or CLion) for obj-c classes ? Thanks
g
New CLion 2018.1 supports ObjC as I remember Also Appcode
a
thank you, I will check the latest EAP and report back
I have tried to open the project with the Clion EAP and kotlin plugin, no auto-completion so far 😞
Maybe I am missing something ?
g
I've never tried, just saw some news about support of ObjC
a
my guess is that konanc is using some kind of pre-generated kotlin sources stubs for platform libraries such as foundation and uikit, but I have no clue how to find these sources on recent kotlin native version
from this point we could manually add these files as sources to the intellij module (a dirty hack) and have some kind of auto completion
right now it is tedious to use kotlin on ios because you constantly have to read the objective c docs and try to translate to kotlin interop version by trial and error.
Hopefully Jetbrains will get it right at some point
c
JetBrains is known for great tooling, so I guess once Kotlin/Native reaches 1.0, this will work fine?
t
install CLion EAP and the Kotlin/Native plugin. Autocomplete works for me.
Also do not install the plugin through the IDE as it is an older version. Search for it on the JetBrains site and install manually
h
I had to run the
generateCMake
gradle task to get autocomplete to work
g
Oh, do you mean auto-completion in Kotlin code for ObjC code? For platform code it should work out of the box on CLion and K/N plugin. And yeah, you need CLion 2018.1.