File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed
packages/react-native/scripts Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,41 @@ def self.exclude_i386_architecture_while_using_hermes(installer)
7272 config . build_settings [ key ] = "#{ current_setting } i386" . strip
7373 end
7474 end
75+ if !excluded_archs_includes_I386
76+ # Hermes does not support 'i386' architecture
77+ config . build_settings [ key ] = "#{ current_setting } i386" . strip
78+ end
79+ end
80+
81+ project . save ( )
82+ end
83+ end
84+ end
85+
86+ def self . fix_flipper_for_xcode_15_3 ( installer )
87+ installer . pods_project . targets . each do |target |
88+ if target . name == 'Flipper'
89+ file_path = 'Pods/Flipper/xplat/Flipper/FlipperTransportTypes.h'
90+ contents = File . read ( file_path )
91+ unless contents . include? ( '#include <functional>' )
92+ mod_content = contents . gsub ( "#pragma once" , "#pragma once\n #include <functional>" )
93+ File . chmod ( 0755 , file_path )
94+ File . open ( file_path , 'w' ) do |file |
95+ file . puts ( mod_content )
96+ end
97+ end
98+ end
99+ end
100+ end
101+
102+ def self . set_use_hermes_build_setting ( installer , hermes_enabled )
103+ Pod ::UI . puts ( "Setting USE_HERMES build settings" )
104+ projects = self . extract_projects ( installer )
105+
106+ projects . each do |project |
107+ project . build_configurations . each do |config |
108+ config . build_settings [ "USE_HERMES" ] = hermes_enabled
109+ end
75110
76111 project . save ( )
77112 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