Skip to content

Always set RCT_REMOVE_LEGACY_ARCH for the open-source RNTester iOS build#56821

Open
christophpurrer wants to merge 1 commit into
facebook:mainfrom
christophpurrer:export-D105118393
Open

Always set RCT_REMOVE_LEGACY_ARCH for the open-source RNTester iOS build#56821
christophpurrer wants to merge 1 commit into
facebook:mainfrom
christophpurrer:export-D105118393

Conversation

@christophpurrer
Copy link
Copy Markdown
Contributor

Summary:
RNTester (the OSS sample app under packages/rn-tester) is the reference open-source iOS build for React Native and is intentionally tracking the new architecture. Today the Podfile inherits the default behavior from react_native_pods.rb, where prepare_react_native_project! only sets RCT_REMOVE_LEGACY_ARCH = 1 when the user has not explicitly exported RCT_REMOVE_LEGACY_ARCH=0 in their shell. That means an environment with the variable set to 0 (or anyone overriding it via CI) silently re-enables the legacy (Paper) architecture for RNTester, which is no longer a supported configuration for this app and now also fails to compile after the legacy-arch removal in the iOS sources.

This change forces ENV['RCT_REMOVE_LEGACY_ARCH'] = '1' at the top of the RNTester Podfile, before prepare_react_native_project! and use_react_native! consult the variable. The OSS RNTester build will now always pass -DRCT_REMOVE_LEGACY_ARCH=1 to the React Native compile, matching what the internal Buck build already gets via the react-fit constraint pipeline.

Scope: only packages/rn-tester/Podfile. The default in react_native_pods.rb is unchanged, so OSS apps that consume use_react_native! in their own Podfile keep the existing opt-out behavior; this is a per-app override for RNTester only.

Changelog:
[Internal] - Force RCT_REMOVE_LEGACY_ARCH=1 for the RNTester iOS sample app

Differential Revision: D105118393

Summary:
RNTester (the OSS sample app under `packages/rn-tester`) is the reference open-source iOS build for React Native and is intentionally tracking the new architecture. Today the Podfile inherits the default behavior from `react_native_pods.rb`, where `prepare_react_native_project!` only sets `RCT_REMOVE_LEGACY_ARCH = 1` when the user has not explicitly exported `RCT_REMOVE_LEGACY_ARCH=0` in their shell. That means an environment with the variable set to `0` (or anyone overriding it via CI) silently re-enables the legacy (Paper) architecture for RNTester, which is no longer a supported configuration for this app and now also fails to compile after the legacy-arch removal in the iOS sources.

This change forces `ENV['RCT_REMOVE_LEGACY_ARCH'] = '1'` at the top of the RNTester Podfile, before `prepare_react_native_project!` and `use_react_native!` consult the variable. The OSS RNTester build will now always pass `-DRCT_REMOVE_LEGACY_ARCH=1` to the React Native compile, matching what the internal Buck build already gets via the `react-fit` constraint pipeline.

Scope: only `packages/rn-tester/Podfile`. The default in `react_native_pods.rb` is unchanged, so OSS apps that consume `use_react_native!` in their own Podfile keep the existing opt-out behavior; this is a per-app override for RNTester only.

Changelog:
[Internal] - Force `RCT_REMOVE_LEGACY_ARCH=1` for the RNTester iOS sample app

Differential Revision: D105118393
@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 May 14, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented May 14, 2026

@christophpurrer has exported this pull request. If you are a Meta employee, you can view the originating Diff in D105118393.

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. fb-exported meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant