Skip to content

Fix Mac Catalyst framework symlinks in published iOS prebuilds - #59819

Open
theeket wants to merge 1 commit into
react:mainfrom
theeket:fix/preserve-ios-prebuild-symlinks
Open

theeket wants to merge 1 commit into
react:mainfrom
theeket:fix/preserve-ios-prebuild-symlinks

Conversation

@theeket

@theeket theeket commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

Addresses the React Dependencies and Core framework symlink corruption reported in #55540.

Mac Catalyst frameworks use a versioned bundle layout (as macOS): the framework binary and Resources point into Versions/Current, which points to the actual version directory. These symlinks must survive packaging. Although the local build scripts (including local-generated .tar.gz) work correctly, all the maven publishing have broken Mac Catalyst slice.

The correct framework → artifact upload loses symlinks → download
→ compose XCFramework → tar.gz → Maven

Now, both iOS prebuild workflows upload raw Build/Products directories. GH's artifact ZIP writer explicitly resolves symlinks with realpath() and stores their targets as ordinary files. (See implementation) So, the final .tar.gz archives faithfully package that already-damaged layout, and Maven publishes those archives.

The problem predates the reported 0.84: published dependency archives inspected from 0.79.2, 0.83.0, 0.84.0, and 0.88.1 all lack Catalyst symlinks. The inspected 0.88.1 React Core archive has the same problem.

Hermes already protects this handoff with a “Compress slices to preserve Symlinks” step. This PR follows the archive-before-upload approach to React Native's workflows.


Changes in prebuild-ios-core.yml and prebuild-ios-dependencies.yml:

  • Archive slice products before upload, including products restored from cache; extract them before XCFramework composition.
Incorrect (Resolved to file) Correct (Preserve symlinks)
x1 x2

Changelog:

[IOS] [FIXED] - Preserve Mac Catalyst framework symlinks in published React Native prebuild artifacts.

Test Plan:

(Update) Prebuilt frameworks test passed, and have correct symlinks

React Dependencies: Debug, Release
React Core: Debug, Release

Composed XCFramework: Debug, Release

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 6, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Nov 6, 2026
@theeket

theeket commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi @cipolleschi 👋 (I hope you don’t mind the mention 😅) when you have some time, could you please take a look at this fix? So it could land in 0.90.

This fixes #55540 that symlinks breaks on Mac Catalyst (as stated above), similar to hermes#1883 that is already fixed, the RN main repo is not fixed yet. (Note that it breaks on every versions)

This PR follows Hermes approach that “Compress slices to preserve Symlinks” when uploading artifacts, then extract it to compose xcframework. All prebuilt artifacts now have correct symlinks. (See artifacts in checks)

Thanks 🙏

@cipolleschi cipolleschi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for fixing this!

@cipolleschi

Copy link
Copy Markdown
Contributor

@theeket Can you please rebase on top of main? I tried to rebase from github, but it says that there are conflicts.

@theeket
theeket force-pushed the fix/preserve-ios-prebuild-symlinks branch from 378e7cc to 51a676f Compare November 13, 2026 12:22
@theeket

theeket commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

@cipolleschi done. Is it available now ?

@github-actions

Copy link
Copy Markdown

Visual regression

2 visual difference(s) at 51a676fed1e1. Visual differences need maintainer approval. Review the report, then apply visual-change-approved.

ios button/default-styling/default: Changed, 38223 px (1.533%)

diff

Expected and Captured
Expected Captured
expected captured

ios scroll-view/sticky-header/end: Changed, 113294 px (15.657%)

diff

Expected and Captured
Expected Captured
expected captured

@meta-codesync

meta-codesync Bot commented Nov 13, 2026

Copy link
Copy Markdown

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D131815435.

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

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants