Hey Team, thanks for creating all rounder IDE for ...
# fleet
s
Hey Team, thanks for creating all rounder IDE for us developers. I am facing one issue specifically related to Kotlin multiplatform development in fleet. I have created a kotlin multiplatform module (NOT app). Integrated it with an existing iOS app. Opened the project in Fleet. I am able to run the project in Fleet however when I am debugging or setting breakpoints in KMP code they are not getting hit. (Swift breakpoints are working fine) Two observations : 1. From swift to KMP code references are resolving but vice versa is not working. 2. If I set breakpoints in iosMain files they are just working fine. One more thing if I am downloading template from
Copy code
<https://kmp.jetbrains.com/?_gl=1*1lhjvr4*_gcl_au*NDE3MDA1NzQ0LjE3MjA3NjMwNTA.*_ga*OTgzMDAwMzA2LjE3MjA3NjMwMDA.*_ga_9J976DJZ68*MTcyMTQxMjU5NS43LjEuMTcyMTQxMjg4Ni41OS4wLjA.#newProject>
breakpoints are just working fine in android ios both as expected. If someone could just help me solve this problem. We are just not using KMP in production because we are not able to debug iOS app along with KMP code.
👀 1
o
Hi! If possible may you please share the sample project where the debug issue is reproduced for you. Please also share the logs folder (Collect Logs... action). Thanks
f
Hi Suraj, could you please also provide details how you integrated your KMP module with your iOS app? Can you confirm that your KMP project was correctly imported in Gradle?
From swift to KMP code references are resolving but vice versa is not working.
Could please also clarify: 1. When you say the Swift to KMP references are resolving, where does say Cmd+Click lead you? To the Kotlin file, or somewhere else? 2. What references in the other direction are you referring to?
s
Hey Florian, Ok so here are the answers : I integrated KMP module with iOS app just by copy pasting KMP module project folder besides the iOS project's root folder and then modified the project.pbxproj file as follows : 1. I have added the KMP module gradle build command in buildPhases. 2. added path of output xcFramework at FRAMEWORK_SEARCH_PATHS block in both debug and release configuration. Yes my KMP project imported correctly as soon as I opened the build.gradle file of KMP module in fleet gradle sync and build started. While in swift code Cmd+Click was leading me to kotlin file of commonMain code of KMP (classes and functions). Other direction means suppose I Cmd+Click any function in kotlin file of commonMain references where not resolving to iOS swift file (meaning the call sites if the function was not shown). But after sometime when I reopen the project in fleet, everything started working somehow.