Inquiry on xcode-kotlin for Debugging XCFrameworks in Separate iOS Projects #110
Replies: 1 comment
-
Short answer: no. LLVM/native builds write the absolute path of the source file when building debug info. It's not a Kotlin-specific issue. Any native binary will have the same problem. Distributing a Kotlin XCFramework requires building a native binary. Most Swift/ObjC frameworks, if not closed-source, are distributed with source code and built on the user's machine. This is a large part of the reason why we don't recommend distributing XCFramework binaries for iOS devs if they need to debug the code. We have a library KMMBridge for binary publishing, but we are no longer recommending that for teams who want debugging support. We have a new tool, GitPortal, to accomplish the same thing (library publishing), but with source. It's conceptually like using git submodules, but with much less hassle. Now, for a complete answer, you can "map" a specific path within your built framework, then map that to a developer's local path. It's possible. However, it's a huge pain to set up, and each iOS dev would then need to clone the Kotlin code separately, and configure that mapping. We have built prototypes, but the overhead was way more than just building locally, so the prototypes didn't get very far. |
Beta Was this translation helpful? Give feedback.
-
Hi Touchlab Team,
I am currently working on a Kotlin Multiplatform (KMP) project and have successfully generated an XCFramework as part of the build process. This XCFramework is then integrated into a separate iOS project.
I am interested in using xcode-kotlin for debugging purposes. Specifically, can xcode-kotlin be utilized to debug the Kotlin code within the XCFramework when it is integrated into a separate iOS project? My current understanding is that xcode-kotlin primarily facilitates debugging when the iOS project and the KMP code reside within the same project structure.
Any guidance or clarification on this would be greatly appreciated.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions