Hi everyone, I have a question regarding XCFramewo...
# multiplatform
l
Hi everyone, I have a question regarding XCFramework compilation in KMP. Currently, any change in Kotlin code triggers a full regeneration of the XCFramework. While this is expected, it causes Xcode to recompile all dependent files even if the change was internal and didn't affect the public API (the header file remains identical). We’ve implemented a workaround where we store and compare file hashes and mtimes, restoring them after compilation if there are no changes. This reduced our build time from 3 minutes to about 1 minute for non-public API changes. Is there an official Kotlin compiler flag or a Gradle setting that handles this "smart" update of the framework out of the box? Context: We are using static linking and the
embedAndSignAppleFrameworkForXcode
task.
a
This is a valid point! there is no out-of-the-box or flag right now , but it I think it should work as you say - don’t update files unless they have changed. Please follow https://youtrack.jetbrains.com/issue/KT-85274
👁️ 1
l
Yes, that’s exactly it. But there’s no progress on that ticket. 😞
t
@Lukas Vlk hey, we are still considering what to do with this performance issue. Could you please try the following Swift compiler setting?
l
sure yes, i'll try it this week
thank you color 1