PowerSyncKotlin XCFramework improvements#309
Merged
stevensJourney merged 5 commits intomainfrom Jan 15, 2026
Merged
Conversation
simolus3
previously approved these changes
Jan 5, 2026
Contributor
simolus3
left a comment
There was a problem hiding this comment.
Enabling produceDistributableFramework() looks like a clear improvement to me, so I'm happy with that change 👍
simolus3
approved these changes
Jan 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The PowerSyncKotlin xcframework was being built with absolute paths embedded in the debug symbols and Clang module breadcrumbs. This caused issues when users integrated the framework into their projects.
The module cache warning
The built framework contained references to paths on the GitHub Actions runner like
/Users/runner/work/powersync-kotlin/.../swift-module-cache/.../*.pcm. When users built their apps, they would see warnings like:This happens because the Swift compiler embeds DWARF skeleton compilation units for imported Clang modules when building with
-gmodules. These reference.pcmfiles in the module cache which only exist on the build machine. SKIE's documentation recommends enabling the-no-clang-module-breadcrumbsflag when building redistributable static frameworks to prevent this.The fix
This PR configures SKIE's
produceDistributableFramework()which sets three flags: it removes the Clang module breadcrumbs from static frameworks vianoClangModuleBreadcrumbsInStaticFrameworks, enables Swift library evolution for ABI stability, and uses relative paths in debug symbols instead of absolute ones viaenableRelativeSourcePathsInDebugSymbols.Verification
To verify the fix, I compared the old framework against the new build using the following commands.
Checking for
.pcmreferences in the binary:The old framework returned multiple
.pcmpaths pointing to the runner's machine. The new framework returns nothing.Checking the debug symbol compilation directory:
The old framework showed
DW_AT_comp_diras/Users/runner/work/powersync-kotlin/.../iosArm64/swift. The new framework showsDW_AT_comp_diras.(relative). Debug symbols are confirmed present in both builds via the.debug_infosection in the dwarfdump output.Verified when linking the PowerSyncKotlin framework locally to the PowerSync Swift SDK, the
swift buildcommand no longer warns about missing PCM files.The PowerSyncExample Swift Demo application was also compiled and smoke tested with these local changes.