diff --git a/packages/react-native/scripts/cocoapods/utils.rb b/packages/react-native/scripts/cocoapods/utils.rb index 7221e81bf40529..144b4d7b26f517 100644 --- a/packages/react-native/scripts/cocoapods/utils.rb +++ b/packages/react-native/scripts/cocoapods/utils.rb @@ -72,6 +72,41 @@ def self.exclude_i386_architecture_while_using_hermes(installer) config.build_settings[key] = "#{current_setting} i386".strip end end + if !excluded_archs_includes_I386 + # Hermes does not support 'i386' architecture + config.build_settings[key] = "#{current_setting} i386".strip + end + end + + project.save() + end + end + end + + def self.fix_flipper_for_xcode_15_3(installer) + installer.pods_project.targets.each do |target| + if target.name == 'Flipper' + file_path = 'Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h' + contents = File.read(file_path) + unless contents.include?('#include ') + mod_content = contents.gsub("#pragma once", "#pragma once\n#include ") + File.chmod(0755, file_path) + File.open(file_path, 'w') do |file| + file.puts(mod_content) + end + end + end + end + end + + def self.set_use_hermes_build_setting(installer, hermes_enabled) + Pod::UI.puts("Setting USE_HERMES build settings") + projects = self.extract_projects(installer) + + projects.each do |project| + project.build_configurations.each do |config| + config.build_settings["USE_HERMES"] = hermes_enabled + end project.save() end diff --git a/packages/react-native/scripts/react_native_pods.rb b/packages/react-native/scripts/react_native_pods.rb index 0c28e6818f9834..4accd95e39e9d8 100644 --- a/packages/react-native/scripts/react_native_pods.rb +++ b/packages/react-native/scripts/react_native_pods.rb @@ -248,6 +248,8 @@ def react_native_post_install( ReactNativePodsUtils.apply_flags_for_fabric(installer, fabric_enabled: fabric_enabled) ReactNativePodsUtils.apply_xcode_15_patch(installer) ReactNativePodsUtils.updateIphoneOSDeploymentTarget(installer) + ReactNativePodsUtils.updateOSDeploymentTarget(installer) + ReactNativePodsUtils.fix_flipper_for_xcode13_5(installer) NewArchitectureHelper.set_clang_cxx_language_standard_if_needed(installer) is_new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == "1"