2

Currently I am working on one KMM project. It would be really useful to be able to debug the shared code which is in kotlin in xcode project. I am aware of this solution but I have problem to tell Xcode that *.kt files are source files

to be more specific in the above github link it is written :

You need to tell Xcode that *.kt files are source files, and run an lldb formatter script when debugging starts. Advanced users may want to do this manually, but if you have Xcode installed in the default place, you can run the setup script. Unless you're using Xcode 11 (in which case look here for help), the following script will install both debugging and formatting support:

./setup.sh

I do not know where and how I should run the ./setup.sh or if there is another way to do it?

1 Answers1

1

The setup script is included in the github repository: https://github.com/touchlab/xcode-kotlin/blob/main/setup.sh

The above plugin is great if you want to debug on Xcode and I highly recommend it. Just an FYI, in case you didn't notice, there is also a plugin for debugging shared code on iOS for Android Studio: https://plugins.jetbrains.com/plugin/14936-kotlin-multiplatform-mobile

Róbert Nagy
  • 6,720
  • 26
  • 45