Skip to content

Commit 5f28450

Browse files
committed
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`
1 parent c36665f commit 5f28450

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/react-native/scripts/cocoapods/new_architecture.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,13 @@ def self.install_modules_dependencies(spec, new_arch_enabled, folly_version = He
133133

134134
depend_on_js_engine(spec)
135135
add_rn_third_party_dependencies(spec)
136-
add_rncore_dependency(spec)
137136

138137
spec.pod_target_xcconfig = current_config
138+
139+
# add_rncore_dependency must be called after setting pod_target_xcconfig
140+
# because it reads and modifies the xcconfig. If called before, its changes
141+
# would be overwritten by the assignment above.
142+
add_rncore_dependency(spec)
139143
end
140144

141145
def self.extract_react_native_version(react_native_path, file_manager: File, json_parser: JSON)

0 commit comments

Comments
 (0)