Skip to content

Fix macOS framework bundle layout (versioned/deep) in harmony_uniffiFFI.xcframework - #3

Merged
ronaldmannak merged 4 commits into
mainfrom
claude/macos-framework-deep-bundle
Jul 9, 2026
Merged

Fix macOS framework bundle layout (versioned/deep) in harmony_uniffiFFI.xcframework#3
ronaldmannak merged 4 commits into
mainfrom
claude/macos-framework-deep-bundle

Conversation

@ronaldmannak

Copy link
Copy Markdown
Contributor

Problem

Consumers that embed harmony_uniffiFFI.framework into a macOS app fail to build with:

Framework .../Contents/Frameworks/harmony_uniffiFFI.framework contains Info.plist, expected Versions/Current/Resources/Info.plist since the platform does not use shallow bundles

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 under Versions/A/, with Resources/Info.plist and top-level symlinks into Versions/Current.

Because harmony_uniffiFFI is 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.shmake_framework() now branches on the target platform:

  • macOS: versioned bundle — Versions/A/{harmony_uniffiFFI, Headers/, Modules/, Resources/Info.plist}, plus Versions/Current -> A and the top-level harmony_uniffiFFI, Headers, Modules, Resources symlinks.
  • iOS / simulator: unchanged flat layout (iOS does use shallow bundles).

The Binaries/harmony_uniffiFFI.xcframework was regenerated by the Build XCFramework workflow on a macOS runner (swift build + swift test passed) and committed. The committed macOS slice now has Versions/A/Resources/Info.plist and correct symlinks.

Notes / follow-up

  • The framework binary is a static ar archive. 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 .a XCFramework, which SwiftPM links but never embeds. Left as a follow-up since it's a packaging-strategy change and depends on whether the original include/module.modulemap collision (the reason for moving to framework bundles) still applies with the current chroma-swift fork.
  • iOS behaviour is unchanged; only the macOS slice layout differs.

Generated by Claude Code

ronaldmannak and others added 4 commits July 8, 2026 20:21
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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ronaldmannak
ronaldmannak merged commit bc3bf72 into main Jul 9, 2026
2 checks passed
@ronaldmannak
ronaldmannak deleted the claude/macos-framework-deep-bundle branch July 9, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant