Skip to content

Commit

Permalink
[RN][iOS] Fix flipper for Xcode 15.3
Browse files Browse the repository at this point in the history
  • Loading branch information
cipolleschi committed Mar 6, 2024
1 parent 02f163e commit ca5f9c9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/react-native/scripts/cocoapods/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,22 @@ def self.exclude_i386_architecture_while_using_hermes(installer)
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 <functional>')
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
end

def self.set_use_hermes_build_setting(installer, hermes_enabled)
Pod::UI.puts("Setting USE_HERMES build settings")
projects = self.extract_projects(installer)
Expand Down
1 change: 1 addition & 0 deletions packages/react-native/scripts/react_native_pods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ def react_native_post_install(
ReactNativePodsUtils.apply_flags_for_fabric(installer, fabric_enabled: fabric_enabled)
ReactNativePodsUtils.apply_xcode_15_patch(installer)
ReactNativePodsUtils.updateOSDeploymentTarget(installer)
ReactNativePodsUtils.fix_flipper_for_xcode_15_3(installer)

NewArchitectureHelper.set_clang_cxx_language_standard_if_needed(installer)
NewArchitectureHelper.modify_flags_for_new_architecture(installer, NewArchitectureHelper.new_arch_enabled)
Expand Down

0 comments on commit ca5f9c9

Please sign in to comment.