fix(swift-sdk): produce versioned bundle layout for macOS xcframework - #665
Merged
i386 merged 1 commit intoMay 24, 2026
Merged
Conversation
macOS requires framework bundles to use the Versions/A/ directory structure with top-level symlinks (Versions/Current, Headers, Modules, Resources). Flat bundles — where Info.plist sits at the framework root and there is no Versions/ tree — are rejected by the macOS dynamic linker at load time. Both build scripts were creating flat bundles for every platform, which works on iOS/simulator/Catalyst but breaks on macOS. This caused the xcframework to fail when consumed by an Xcode project on macOS. Changes: - build-xcframework.sh: split create_framework() into a versioned path for "macos" and a flat path for iOS/sim/catalyst; move Info.plist and PrivacyInfo.xcprivacy into Versions/A/Resources/ for the macOS slice; add the five canonical Versions/Current symlinks; use cp -RP (not cp -R) when copying the macOS framework in the xcodebuild fallback path so that symlinks are preserved rather than dereferenced. - build-host-macos-xcframework.sh: apply the same versioned layout to the inline macOS framework construction; cp -R → cp -RP for the xcframework assembly step.
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.
fix(swift-sdk): produce versioned bundle layout for macOS xcframework
macOS requires framework bundles to use a Versions/A/ directory structure with top-level symlinks. Flat bundles — where Info.plist sits at the framework root — are rejected by the macOS dynamic linker at load time.
Both build scripts were creating flat bundles for all platforms, which works on iOS/simulator/Catalyst but breaks on macOS. This caused the xcframework to fail when consumed by an Xcode project.
Changes:
Versions/A/Resources/; add the five canonical Versions/Current symlinks; use cp -RP (not cp -R) in the xcodebuild fallback so symlinks are preserved