Target Branch
0.87
Link to commit or PR to be picked
react/react-native@482acee
Description
Requesting this pick for the SwiftPM preview shipped in 0.87.
The Package.swift scaffolder currently derives every target name from the package name and ignores the documented spm.name override in a library's react-native.config.js. For libraries that need this override, the generated manifest therefore exposes a product name that differs from the name registered by autolinking, causing SwiftPM dependency resolution to fail. This was reported through real-world community integration work in powersync-ja/powersync-js#1076.
This commit makes the scaffolder use the Swift name already resolved by autolinking, while retaining the existing derived-name fallback for callers that do not supply it. It also passes resolved Swift names through sibling dependency references. The change is scoped to SwiftPM manifest scaffolding and its types, and adds focused unit-test coverage (58 added test lines); the upstream PR reports the unit tests passing. Picking it ensures the documented spm.name configuration works in the 0.87 SwiftPM flow.
Target Branch
0.87
Link to commit or PR to be picked
react/react-native@482acee
Description
Requesting this pick for the SwiftPM preview shipped in 0.87.
The Package.swift scaffolder currently derives every target name from the package name and ignores the documented
spm.nameoverride in a library'sreact-native.config.js. For libraries that need this override, the generated manifest therefore exposes a product name that differs from the name registered by autolinking, causing SwiftPM dependency resolution to fail. This was reported through real-world community integration work in powersync-ja/powersync-js#1076.This commit makes the scaffolder use the Swift name already resolved by autolinking, while retaining the existing derived-name fallback for callers that do not supply it. It also passes resolved Swift names through sibling dependency references. The change is scoped to SwiftPM manifest scaffolding and its types, and adds focused unit-test coverage (58 added test lines); the upstream PR reports the unit tests passing. Picking it ensures the documented
spm.nameconfiguration works in the 0.87 SwiftPM flow.