From e40c1d265a2045730dcf751eed4ebf32e099f0c7 Mon Sep 17 00:00:00 2001 From: Christian Falch Date: Thu, 22 May 2025 05:48:04 -0700 Subject: [PATCH] add missing React-RCTSettings (#51523) Summary: Added missing module React-RCTSettings to the Swift package. This was found when testing intergrating with a bare bones React Native project. ## Changelog: [IOS] [FIXED] - add missing React-RCTSettings to Swift package Pull Request resolved: https://github.com/facebook/react-native/pull/51523 Test Plan: Run against a bare bones React Native project (not available in repo yet) Reviewed By: rshest Differential Revision: D75204445 Pulled By: cipolleschi fbshipit-source-id: d9fcb27cc532846eece591152462ff9c88f82302 --- .gitignore | 1 + packages/react-native/Package.swift | 9 +++++++++ packages/react-native/scripts/ios-prebuild.js | 1 + 3 files changed, 11 insertions(+) diff --git a/.gitignore b/.gitignore index 031c3eb99cc..7318721e3c6 100644 --- a/.gitignore +++ b/.gitignore @@ -127,6 +127,7 @@ vendor/ # Swift Package build folder /packages/react-native/.build +/packages/react-native/.swiftpm # @react-native/codegen /packages/react-native/React/FBReactNativeSpec/ diff --git a/packages/react-native/Package.swift b/packages/react-native/Package.swift index 1f012bb3bda..a0787941287 100644 --- a/packages/react-native/Package.swift +++ b/packages/react-native/Package.swift @@ -514,6 +514,13 @@ let reactRCTLinking = RNTarget( dependencies: [.jsi, .reactTurboModuleCore] ) +let reactSettings = RNTarget( + name: .reactSettings, + path: "Libraries/Settings", + searchPaths: ["ReactCommon", ReactFBReactNativeSpecPath, FBLazyVectorPath], + dependencies: [.reactTurboModuleCore, .yoga] +) + let targets = [ reactDebug, jsi, @@ -567,6 +574,7 @@ let targets = [ reactFeatureflagsNativemodule, reactNativeModuleDom, reactAppDelegate, + reactSettings, ] let package = Package( @@ -646,6 +654,7 @@ extension String { static let reactFeatureflagsNativemodule = "React-featureflagsnativemodule" static let reactNativeModuleDom = "React-domnativemodule" static let reactAppDelegate = "React-RCTAppDelegate" + static let reactSettings = "React-RCTSettings" } func relativeSearchPath(_ depth: Int, _ path: String) -> String { diff --git a/packages/react-native/scripts/ios-prebuild.js b/packages/react-native/scripts/ios-prebuild.js index 0de5fa1346b..5d9b4af36c5 100644 --- a/packages/react-native/scripts/ios-prebuild.js +++ b/packages/react-native/scripts/ios-prebuild.js @@ -156,6 +156,7 @@ async function main() { link('Libraries/Blob', 'React'); link('Libraries/NativeAnimation', 'React'); link('Libraries/LinkingIOS', 'React'); + link('Libraries/Settings', 'React'); link('ReactCommon/hermes', 'reacthermes'); link('ReactCommon/hermes', 'jsireact');