diff --git a/packages/react-native/scripts/spm/__docs__/spm-scripts.md b/packages/react-native/scripts/spm/__docs__/spm-scripts.md index fcf1ab32821..a6bb5513286 100644 --- a/packages/react-native/scripts/spm/__docs__/spm-scripts.md +++ b/packages/react-native/scripts/spm/__docs__/spm-scripts.md @@ -342,7 +342,6 @@ module.exports = { name: 'MyNativeModule', path: 'ios/MyNativeModule', // relative to app root exclude: ['*.podspec'], // optional - publicHeadersPath: '.', // optional }, ], }, diff --git a/packages/react-native/scripts/spm/generate-spm-autolinking.js b/packages/react-native/scripts/spm/generate-spm-autolinking.js index 5e933af0144..f1cea3687c7 100644 --- a/packages/react-native/scripts/spm/generate-spm-autolinking.js +++ b/packages/react-native/scripts/spm/generate-spm-autolinking.js @@ -232,7 +232,6 @@ function readAutolinkingJson( * name: "MyNativeModule", * path: "ios/MyNativeModule", // relative to appRoot * exclude: ["*.js", "*.podspec"], // optional - * publicHeadersPath: ".", // optional * } * ] * } @@ -1334,7 +1333,9 @@ function main(argv /*:: ?: Array */) /*: 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', diff --git a/packages/react-native/scripts/spm/spm-types.js b/packages/react-native/scripts/spm/spm-types.js index ba290ee05de..deb956e53b4 100644 --- a/packages/react-native/scripts/spm/spm-types.js +++ b/packages/react-native/scripts/spm/spm-types.js @@ -168,7 +168,6 @@ export type SpmModuleConfig = { name: string, path: string, exclude?: Array, - 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:`. diff --git a/packages/rn-tester/react-native.config.js b/packages/rn-tester/react-native.config.js index c63fd9e7127..7d9058c4686 100644 --- a/packages/rn-tester/react-native.config.js +++ b/packages/rn-tester/react-native.config.js @@ -36,7 +36,6 @@ module.exports = { { name: 'ReactCommonSamples', path: '../react-native/ReactCommon/react/nativemodule/samples/platform/ios', - publicHeadersPath: '.', }, { name: 'ReactRCTPushNotification',