Fix macOS framework bundle layout (versioned/deep) in harmony_uniffiFFI.xcframework - #3
Conversation
The macOS slice of harmony_uniffiFFI.xcframework was assembled with the
flat (shallow) bundle layout used for iOS - Info.plist, Headers/, Modules/
and the binary at the framework root. macOS frameworks must instead use the
versioned layout (Versions/A/{binary,Headers,Modules,Resources/Info.plist}
plus Versions/Current and top-level symlinks).
Consumers that embed the framework into a macOS .app therefore failed with:
contains Info.plist, expected Versions/Current/Resources/Info.plist since
the platform does not use shallow bundles
make_framework() now branches on the target platform: macOS builds the deep,
symlinked bundle; iOS and the simulator keep the shallow layout. Binaries must
be regenerated (Build XCFramework workflow) and committed for the fix to ship.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PegWoiCoBfBS6JfPg1f1BL
Lets the deep-bundle rebuild run and commit back without an interactive workflow_dispatch. Reverted before this branch merges to main. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PegWoiCoBfBS6JfPg1f1BL
The deep-bundle rebuild has been produced and committed; restore the workflow to dispatch-only before merging to main. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PegWoiCoBfBS6JfPg1f1BL
There was a problem hiding this comment.
Code Review
This pull request updates the UniFFI build script (build_uniffi.sh) to generate a versioned ("deep") bundle layout for macOS frameworks, while keeping the flat ("shallow") layout for iOS and simulator frameworks. This prevents embedding apps on macOS from failing to build due to incorrect bundle structures. The Info.plist and framework structure for harmony_uniffiFFI.xcframework have been updated accordingly. I have no further feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Problem
Consumers that embed
harmony_uniffiFFI.frameworkinto a macOS app fail to build with:The macOS slice of the XCFramework was assembled with the flat (shallow) bundle layout used for iOS —
Info.plist,Headers/,Modules/and the binary all at the framework root. macOS frameworks must use the versioned (deep) layout instead: everything underVersions/A/, withResources/Info.plistand top-level symlinks intoVersions/Current.Because
harmony_uniffiFFIis a transitive SwiftPM binary target, downstream apps (e.g. via PicoCore) have no project-level "Do Not Embed" toggle for it — SPM auto-embeds it — so this can only be fixed here at the package level.Change
scripts/build_uniffi.sh→make_framework()now branches on the target platform:Versions/A/{harmony_uniffiFFI, Headers/, Modules/, Resources/Info.plist}, plusVersions/Current -> Aand the top-levelharmony_uniffiFFI,Headers,Modules,Resourcessymlinks.The
Binaries/harmony_uniffiFFI.xcframeworkwas regenerated by the Build XCFramework workflow on a macOS runner (swift build+swift testpassed) and committed. The committed macOS slice now hasVersions/A/Resources/Info.plistand correct symlinks.Notes / follow-up
ararchive. The deep layout resolves the reported shallow-bundle error. If a consuming macOS app then hits a codesign error embedding a static-library framework, the durable fix is to stop embedding it (a static lib should be link-only) — e.g. revert to a static.aXCFramework, which SwiftPM links but never embeds. Left as a follow-up since it's a packaging-strategy change and depends on whether the originalinclude/module.modulemapcollision (the reason for moving to framework bundles) still applies with the current chroma-swift fork.Generated by Claude Code