Skip to content

fix(plugin-brownfield-ios): keep relative symlinks when copying XCFrameworks - #741

Open
cusnirvladislav wants to merge 1 commit into
callstackincubator:mainfrom
cusnirvladislav:fix/preserve-xcframework-symlinks
Open

cusnirvladislav wants to merge 1 commit into
callstackincubator:mainfrom
cusnirvladislav:fix/preserve-xcframework-symlinks

Conversation

@cusnirvladislav

Copy link
Copy Markdown

Fixes #740

Summary

Adds verbatimSymlinks: true to the cpSync calls that copy frameworks during package:ios: copyHermesXcframework, both copies in copyReactXcframeworks, and copyDirectory in mergeFrameworks. With it, relative symlinks in versioned framework slices stay relative instead of pointing into the packaging machine's Pods folder, so SwiftPM can extract the published binary targets.

Test plan

  • New copyHermesXcframework.test.ts copies a versioned framework with relative links and checks them afterwards. Without the change the link comes back as an absolute path and the test fails.
  • vitest run packages/plugin-brownfield-ios packages/platform-apple-helpers passes (38 tests).
  • In our app, a package built with this change resolves in Xcode 27 on the machine that packaged it, and hermesvm.framework/Resources in the published zip points to Versions/Current/Resources.

…meworks

fs.cpSync rewrites relative symlinks into absolute paths unless
verbatimSymlinks is set. Versioned framework slices, such as the Mac
Catalyst slice of hermesvm.xcframework, then point into the packaging
machine's Pods folder, and SwiftPM refuses to extract a binary target
whose symlinks resolve outside the archive.

Fixes callstackincubator#740

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 20, 2026

Copy link
Copy Markdown

@cusnirvladislav is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

package:ios ships XCFrameworks with absolute symlinks, which SwiftPM refuses to extract

1 participant