[RN][iOS][0.71] Fix flipper for Xcode 15.3

This commit is contained in:
Riccardo Cipolleschi
2024-03-06 13:53:48 +00:00
parent ede87f82a1
commit 2944ca6554
3 changed files with 567 additions and 545 deletions
File diff suppressed because it is too large Load Diff
+21
View File
@@ -144,6 +144,27 @@ class ReactNativePodsUtils
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'
if !File.exist?(file_path)
return
end
contents = File.read(file_path)
if contents.include?('#include <functional>')
return
end
mod_content = contents.gsub("#pragma once", "#pragma once\n#include <functional>")
File.chmod(0755, file_path)
File.open(file_path, 'w') do |file|
file.puts(mod_content)
end
end
end
end
def self.apply_xcode_15_patch(installer, xcodebuild_manager: Xcodebuild)
projects = self.extract_projects(installer)
+1
View File
@@ -226,6 +226,7 @@ def react_native_post_install(installer, react_native_path = "../node_modules/re
ReactNativePodsUtils.set_node_modules_user_settings(installer, react_native_path)
ReactNativePodsUtils.apply_xcode_15_patch(installer)
ReactNativePodsUtils.updateIphoneOSDeploymentTarget(installer)
ReactNativePodsUtils.fix_flipper_for_xcode_15_3(installer)
NewArchitectureHelper.set_clang_cxx_language_standard_if_needed(installer)
is_new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == "1"