From 5f28450b2686b6559c0afacba83ffcfbffbaff73 Mon Sep 17 00:00:00 2001 From: Christian Falch Date: Wed, 10 Dec 2025 13:57:33 +0100 Subject: [PATCH] Move add_rn_core to after updating the current_config 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` --- 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 8c7508b5400f..2eaef9127dcc 100644 --- a/packages/react-native/scripts/cocoapods/new_architecture.rb +++ b/packages/react-native/scripts/cocoapods/new_architecture.rb @@ -133,9 +133,13 @@ def self.install_modules_dependencies(spec, new_arch_enabled, folly_version = He 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)