Skip to content

Commit 1d69e2f

Browse files
authored
Merge pull request #43344 from facebook/cipolleschi/fix-flipper-072
[RN][iOS][0.72] Fix flipper for Xcode 15.3
2 parents 0724c27 + a316e01 commit 1d69e2f

File tree

3 files changed

+485
-462
lines changed

3 files changed

+485
-462
lines changed

Diff for: packages/react-native/scripts/cocoapods/utils.rb

+22
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,28 @@ def self.exclude_i386_architecture_while_using_hermes(installer)
7878
end
7979
end
8080

81+
def self.fix_flipper_for_xcode_15_3(installer)
82+
83+
installer.pods_project.targets.each do |target|
84+
if target.name == 'Flipper'
85+
file_path = 'Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h'
86+
if !File.exist?(file_path)
87+
return
88+
end
89+
90+
contents = File.read(file_path)
91+
if contents.include?('#include <functional>')
92+
return
93+
end
94+
mod_content = contents.gsub("#pragma once", "#pragma once\n#include <functional>")
95+
File.chmod(0755, file_path)
96+
File.open(file_path, 'w') do |file|
97+
file.puts(mod_content)
98+
end
99+
end
100+
end
101+
end
102+
81103
def self.set_node_modules_user_settings(installer, react_native_path)
82104
Pod::UI.puts("Setting REACT_NATIVE build settings")
83105
projects = self.extract_projects(installer)

Diff for: packages/react-native/scripts/react_native_pods.rb

+1
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ def react_native_post_install(
248248
ReactNativePodsUtils.apply_flags_for_fabric(installer, fabric_enabled: fabric_enabled)
249249
ReactNativePodsUtils.apply_xcode_15_patch(installer)
250250
ReactNativePodsUtils.updateIphoneOSDeploymentTarget(installer)
251+
ReactNativePodsUtils.fix_flipper_for_xcode_15_3(installer)
251252

252253
NewArchitectureHelper.set_clang_cxx_language_standard_if_needed(installer)
253254
is_new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == "1"

0 commit comments

Comments
 (0)