Target Branch
0.87
Link to commit or PR to be picked
react/react-native#57602
(commit on main: react/react-native@4a66207)
Description
This is a hotfix for a breaking iOS build failure. On Xcode 26.3 (the current CI runner version), pods that declare an spm_dependency on a Swift package containing a C-family target fail to build with error: redefinition of module '<Module>FFI'. Xcode emits the package's generated include/module.modulemap twice (into the shared products dir and into the pod's own CONFIGURATION_BUILD_DIR), and clang hard-errors on the duplicate on Xcode 26.3.
The already-shipped SWIFT_ENABLE_EXPLICIT_MODULES=NO opt-out is confirmed insufficient. This fix builds static-library spm_dependency pod targets straight into the shared products dir so both module-map references resolve to the same file (clang dedupes same-path module maps). USE_FRAMEWORKS=dynamic behavior is unchanged, and the change is inert for projects without any spm_dependency pod.
This supersedes the incomplete workaround in react/react-native#57589 and unblocks the nightly-tests CI job. The commit is already merged into main.
Target Branch
0.87
Link to commit or PR to be picked
react/react-native#57602
(commit on main: react/react-native@4a66207)
Description
This is a hotfix for a breaking iOS build failure. On Xcode 26.3 (the current CI runner version), pods that declare an
spm_dependencyon a Swift package containing a C-family target fail to build witherror: redefinition of module '<Module>FFI'. Xcode emits the package's generatedinclude/module.modulemaptwice (into the shared products dir and into the pod's ownCONFIGURATION_BUILD_DIR), and clang hard-errors on the duplicate on Xcode 26.3.The already-shipped
SWIFT_ENABLE_EXPLICIT_MODULES=NOopt-out is confirmed insufficient. This fix builds static-libraryspm_dependencypod targets straight into the shared products dir so both module-map references resolve to the same file (clang dedupes same-path module maps).USE_FRAMEWORKS=dynamicbehavior is unchanged, and the change is inert for projects without anyspm_dependencypod.This supersedes the incomplete workaround in react/react-native#57589 and unblocks the nightly-tests CI job. The commit is already merged into
main.