Skip to content

fix(rn-tester): use framework-style import for RCTFabricComponentsPlugins.h - #57697

Closed
chrfalch wants to merge 1 commit into
mainfrom
chrfalch/fix-rntester-spm-plugins-header
Closed

fix(rn-tester): use framework-style import for RCTFabricComponentsPlugins.h#57697
chrfalch wants to merge 1 commit into
mainfrom
chrfalch/fix-rntester-spm-plugins-header

Conversation

@chrfalch

Copy link
Copy Markdown
Collaborator

Summary:

rn-tester's MyNativeView example imports RCTFabricComponentsPlugins.h with the quoted form, which only resolves under CocoaPods (header maps re-vend the bare filename via FACADE_REEXPOSED_HEADERS in rncore_facades.rb — see also scripts/ios-prebuild/__docs__/headers-rules.md, which documents the quoted form as CocoaPods-only). Under SwiftPM the header is exposed as an include directory, so only <React/RCTFabricComponentsPlugins.h> resolves — the quoted import makes MyNativeView fail to compile when rn-tester is converted to SwiftPM (surfaced by the new SPM CI lane in #57659).

The angle form resolves under both distributions. One line, no behavior change under CocoaPods.

Changelog:

[INTERNAL] [FIXED] - Fix rn-tester's NativeComponentExample header import so it compiles under SwiftPM

Test Plan:

  • Repro on clean main: converting rn-tester to SwiftPM (spm add --deintegrate) and building fails at RNTMyNativeViewComponentView.mm:16 (fatal error: 'RCTFabricComponentsPlugins.h' file not found) — both against CI-composed prebuilt artifacts and locally-built ones (identical failure; clang search paths verified via the compile response file: the header is reachable only as React/RCTFabricComponentsPlugins.h).
  • With this change applied: same conversion + xcodebuild -configuration Debug -sdk iphonesimulatorBUILD SUCCEEDED, embedded React.framework verified Debug-flavored.
  • Existing CocoaPods CI (test_ios_rntester) covers the unchanged CocoaPods path.

…gins.h

The quoted form resolves only under CocoaPods (header maps re-vend the
bare filename via FACADE_REEXPOSED_HEADERS in rncore_facades.rb).
SwiftPM exposes React headers as an include directory, so the header is
only reachable as <React/RCTFabricComponentsPlugins.h> — the quoted
import makes MyNativeView fail to compile when rn-tester is converted
to SwiftPM. The angle form resolves under both distributions.

Cherry-picked from the SPM stack (ecdd1771019).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@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 Jul 27, 2026
@chrfalch
chrfalch requested a review from cipolleschi July 27, 2026 09:40
@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 Jul 27, 2026
@meta-codesync

meta-codesync Bot commented Jul 27, 2026

Copy link
Copy Markdown

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

@cortinico cortinico 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.

Review automatically exported from Phabricator review in Meta.

@meta-codesync meta-codesync Bot closed this in 6d0612c Jul 27, 2026
@meta-codesync meta-codesync Bot added the Merged This PR has been merged. label Jul 27, 2026
@meta-codesync

meta-codesync Bot commented Jul 27, 2026

Copy link
Copy Markdown

@fabriziocucci merged this pull request in 6d0612c.

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. Merged This PR has been merged. p: Expo Partner: Expo Partner 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