From 73d3429a44e67745a5c5df5d0a0560a40dbbb430 Mon Sep 17 00:00:00 2001 From: Christian Falch Date: Tue, 16 Dec 2025 08:36:49 -0800 Subject: [PATCH] fixed issue with xcconfig being overwritten (#54838) Summary: To be able to change the target xcconfig from within `add_rn_core`, we need to make sure it is not overwritten by the line that sets the config. This commit fixes this by moving it after the line: `spec.pod_target_xcconfig = current_config` ## Changelog: [IOS] [FIXED] - Moved setting xcconfig to after `add_rn_core` pod function is called. Pull Request resolved: https://github.com/facebook/react-native/pull/54838 Test Plan: Run RNTester with precompiled binaries. Reviewed By: huntie Differential Revision: D88849730 Pulled By: cipolleschi fbshipit-source-id: 632e23f5a464ea779035ca3e090c0a3c9475a260 --- packages/react-native/scripts/cocoapods/new_architecture.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/react-native/scripts/cocoapods/new_architecture.rb b/packages/react-native/scripts/cocoapods/new_architecture.rb index 320d79283f5..3873632a7d7 100644 --- a/packages/react-native/scripts/cocoapods/new_architecture.rb +++ b/packages/react-native/scripts/cocoapods/new_architecture.rb @@ -135,9 +135,13 @@ class NewArchitectureHelper depend_on_js_engine(spec) add_rn_third_party_dependencies(spec) - add_rncore_dependency(spec) spec.pod_target_xcconfig = current_config + + # add_rncore_dependency must be called after setting pod_target_xcconfig + # because it reads and modifies the xcconfig. If called before, its changes + # would be overwritten by the assignment above. + add_rncore_dependency(spec) end def self.extract_react_native_version(react_native_path, file_manager: File, json_parser: JSON)