File tree Expand file tree Collapse file tree 2 files changed +39
-1
lines changed
packages/react-native/scripts Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,43 @@ def self.exclude_i386_architecture_while_using_hermes(installer)
7171 # Hermes does not support `i386` architecture
7272 config . build_settings [ key ] = "#{ current_setting } i386" . strip
7373 end
74- end
74+ end
75+
76+ project . save ( )
77+ end
78+ end
79+ end
80+
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+
103+ def self . set_use_hermes_build_setting ( installer , hermes_enabled )
104+ Pod ::UI . puts ( "Setting USE_HERMES build settings" )
105+ projects = self . extract_projects ( installer )
106+
107+ projects . each do |project |
108+ project . build_configurations . each do |config |
109+ config . build_settings [ "USE_HERMES" ] = hermes_enabled
110+ end
75111
76112 project . save ( )
77113 end
Original file line number Diff line number Diff line change @@ -248,6 +248,8 @@ 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 . updateOSDeploymentTarget ( installer )
252+ ReactNativePodsUtils . fix_flipper_for_xcode_15_3 ( installer )
251253
252254 NewArchitectureHelper . set_clang_cxx_language_standard_if_needed ( installer )
253255 is_new_arch_enabled = ENV [ 'RCT_NEW_ARCH_ENABLED' ] == "1"
You can’t perform that action at this time.
0 commit comments