Skip to content

Commit 74ba411

Browse files
kelsetRiccardo Cipolleschi
and
Riccardo Cipolleschi
authored
fix(xcode): backport Xcode 14.3 fix to 69 (#36767)
Co-authored-by: Riccardo Cipolleschi <[email protected]>
1 parent 7d0a3d9 commit 74ba411

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

packages/rn-tester/Podfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ def pods(options = {}, use_flipper: false)
2424
hermes_enabled = ENV['USE_HERMES'] == '1'
2525
puts "Building RNTester with Fabric #{fabric_enabled ? "enabled" : "disabled"}.#{hermes_enabled ? " Using Hermes engine." : ""}"
2626

27-
if ENV['USE_CODEGEN_DISCOVERY'] == '1'
28-
# Custom fabric component is only supported when using codegen discovery.
29-
pod 'MyNativeView', :path => "NativeComponentExample"
30-
end
31-
3227
use_react_native!(
3328
path: @prefix_path,
3429
fabric_enabled: fabric_enabled,
@@ -37,6 +32,11 @@ def pods(options = {}, use_flipper: false)
3732
app_path: "#{Dir.pwd}",
3833
config_file_dir: "#{Dir.pwd}/node_modules",
3934
)
35+
36+
if ENV['USE_CODEGEN_DISCOVERY'] == '1'
37+
# Custom fabric component is only supported when using codegen discovery.
38+
pod 'MyNativeView', :path => "NativeComponentExample"
39+
end
4040
pod 'ReactCommon/turbomodule/samples', :path => "#{@prefix_path}/ReactCommon"
4141

4242
# Additional Pods which aren't included in the default Podfile

scripts/react_native_pods.rb

+8-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
DEFAULT_OTHER_CPLUSPLUSFLAGS = '$(inherited)'
1818
NEW_ARCH_OTHER_CPLUSPLUSFLAGS = '$(inherited) -DRCT_NEW_ARCH_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1'
1919

20+
# This function returns the min iOS version supported by React Native
21+
# By using this function, you won't have to manually change your Podfile
22+
# when we change the minimum version supported by the framework.
23+
def min_ios_version_supported
24+
return '12.4'
25+
end
26+
2027
def use_react_native! (options={})
2128
# The prefix to react-native
2229
prefix = options[:path] ||= "../node_modules/react-native"
@@ -420,7 +427,7 @@ def get_react_codegen_spec(options={})
420427
'source' => { :git => '' },
421428
'header_mappings_dir' => './',
422429
'platforms' => {
423-
'ios' => '11.0',
430+
'ios' => min_ios_version_supported,
424431
},
425432
'source_files' => "**/*.{h,mm,cpp}",
426433
'pod_target_xcconfig' => { "HEADER_SEARCH_PATHS" =>

0 commit comments

Comments
 (0)