Skip to content

Commit 102a596

Browse files
authored
Merge pull request #43341 from facebook/cipolleschi/bump-flipper
[RN][iOS] Fix flipper for Xcode 15.3
2 parents 12381e2 + 228c2b0 commit 102a596

File tree

3 files changed

+251
-27
lines changed

3 files changed

+251
-27
lines changed

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,27 @@ def self.exclude_i386_architecture_while_using_hermes(installer)
8686
end
8787
end
8888

89+
def self.fix_flipper_for_xcode_15_3(installer)
90+
installer.pods_project.targets.each do |target|
91+
if target.name == 'Flipper'
92+
file_path = 'Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h'
93+
if !File.exist?(file_path)
94+
return
95+
end
96+
97+
contents = File.read(file_path)
98+
if contents.include?('#include <functional>')
99+
return
100+
end
101+
mod_content = contents.gsub("#pragma once", "#pragma once\n#include <functional>")
102+
File.chmod(0755, file_path)
103+
File.open(file_path, 'w') do |file|
104+
file.puts(mod_content)
105+
end
106+
end
107+
end
108+
end
109+
89110
def self.set_use_hermes_build_setting(installer, hermes_enabled)
90111
Pod::UI.puts("Setting USE_HERMES build settings")
91112
projects = self.extract_projects(installer)

packages/react-native/scripts/react_native_pods.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ def react_native_post_install(
308308
ReactNativePodsUtils.apply_flags_for_fabric(installer, fabric_enabled: fabric_enabled)
309309
ReactNativePodsUtils.apply_xcode_15_patch(installer)
310310
ReactNativePodsUtils.updateOSDeploymentTarget(installer)
311+
ReactNativePodsUtils.fix_flipper_for_xcode_15_3(installer)
311312

312313
NewArchitectureHelper.set_clang_cxx_language_standard_if_needed(installer)
313314
NewArchitectureHelper.modify_flags_for_new_architecture(installer, NewArchitectureHelper.new_arch_enabled)

0 commit comments

Comments
 (0)