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.