Drop the inert publicHeadersPath from spm.modules (#58059)

Summary:
When using `react-native.config.js` to declare app-side modules using the `spm.modules` field, there is a field for providing the public header files for a module which is not used by the code. This field does not have any meaning either, a local app-side module is registered through module discovery anyway.

This PR removes this field from the SPM config.

## Changelog:

[IOS] [FIXED] - Removed unused field spm.modules.publicHeaderFiles from react-native.config.js's spm section

Pull Request resolved: https://github.com/react/react-native/pull/58059

Test Plan: ✅ Unit tests/CI

Reviewed By: christophpurrer

Differential Revision: D116935666

Pulled By: cipolleschi

fbshipit-source-id: 78c9576cb6bd9996a4972ba6f38f21bb4743d4af
This commit is contained in:
Christian Falch authored and meta-codesync[bot] committed 2026-08-24 02:52:48 -07:00
1 parent ed76640ba6
commit 5168f5f831
4 files changed
+3 -5

No files matched your search

@@ -342,7 +342,6 @@ module.exports = {
name: 'MyNativeModule',
path: 'ios/MyNativeModule', // relative to app root
exclude: ['*.podspec'], // optional
publicHeadersPath: '.', // optional
},
],
},
@@ -238,7 +238,6 @@ function readAutolinkingJson(
* name: "MyNativeModule",
* path: "ios/MyNativeModule", // relative to appRoot
* exclude: ["*.js", "*.podspec"], // optional
* publicHeadersPath: ".", // optional
* }
* ]
* }
@@ -1342,7 +1341,9 @@ function main(argv /*:: ?: Array<string> */) /*: void */ {
name: mod.name,
path: relPath,
exclude: mod.exclude ?? [],
publicHeadersPath: mod.publicHeadersPath ?? null,
// The synth wrapper owns the module's public interface: it declares
// publicHeadersPath: "include", a symlink to the module's header tree.
publicHeadersPath: null,
sources: userSources,
},
origin: 'spmModule',
-1
View File
@@ -168,7 +168,6 @@ export type SpmModuleConfig = {
name: string,
path: string,
exclude?: Array<string>,
publicHeadersPath?: ?string,
// Optional CocoaPods-style glob allowlist (analog of s.source_files).
// When set, replaces auto source discovery for the module — only files
// matching one of these patterns are passed to SPM via `sources:`.
@@ -36,7 +36,6 @@ module.exports = {
{
name: 'ReactCommonSamples',
path: '../react-native/ReactCommon/react/nativemodule/samples/platform/ios',
publicHeadersPath: '.',
},
{
name: 'ReactRCTPushNotification',