Is it possible to navigate to the kotlin source fr...
# multiplatform
u
Is it possible to navigate to the kotlin source from a ios callsite? (Trying to figure out what the dev ux for ios side will be)
m
Yes. TouchLab have a (free) XCode plugin that facilitates this (if I've understood correctly).
u
understood me or what the plugin does 😄
m
You🤔
u
I just want navigation back to the kotlin source. Now if I go into the implementation, it obviously just takes me to the obj source, which will be impossible to read when using coroutines etc. therefore I'd have swap back to Android studio, and then open the source manually / search kotlin file
also, what's interesting, xcode takes me to some objc header thing while AppCode takes me to "nicer" swift source
shared.h
vs
shared.swift
d
I’m using the Xcode Kotlin plugin that Mark mentioned. With that plugin, you’ll still not land at the Kotlin source but in the Objective-C header for the Kotlin framework, but after adding the Kotlin source tree to your iOS project as a folder reference, you can at least Cmd+Shift+O to open the relevant Kotlin source file if you remember its name (or navigate through the Kotlin source tree within Xcode if you don’t). Once you’re in the Kotlin source, you can set breakpoints etc., which is the no. 1 feature of the plugin for me. If instead you’re fine with the header info but want it in a more readable form in Swift, you can switch to a generated Swift interface: