diff --git a/packages/rn-tester/Podfile b/packages/rn-tester/Podfile index da290080cd933a..696ac1aa018d66 100644 --- a/packages/rn-tester/Podfile +++ b/packages/rn-tester/Podfile @@ -24,11 +24,6 @@ def pods(options = {}, use_flipper: false) hermes_enabled = ENV['USE_HERMES'] == '1' puts "Building RNTester with Fabric #{fabric_enabled ? "enabled" : "disabled"}.#{hermes_enabled ? " Using Hermes engine." : ""}" - if ENV['USE_CODEGEN_DISCOVERY'] == '1' - # Custom fabric component is only supported when using codegen discovery. - pod 'MyNativeView', :path => "NativeComponentExample" - end - use_react_native!( path: @prefix_path, fabric_enabled: fabric_enabled, @@ -37,6 +32,11 @@ def pods(options = {}, use_flipper: false) app_path: "#{Dir.pwd}", config_file_dir: "#{Dir.pwd}/node_modules", ) + + if ENV['USE_CODEGEN_DISCOVERY'] == '1' + # Custom fabric component is only supported when using codegen discovery. + pod 'MyNativeView', :path => "NativeComponentExample" + end pod 'ReactCommon/turbomodule/samples', :path => "#{@prefix_path}/ReactCommon" # Additional Pods which aren't included in the default Podfile diff --git a/scripts/react_native_pods.rb b/scripts/react_native_pods.rb index e7c59ad5f874d3..48d8b9f4b3b999 100644 --- a/scripts/react_native_pods.rb +++ b/scripts/react_native_pods.rb @@ -17,6 +17,13 @@ DEFAULT_OTHER_CPLUSPLUSFLAGS = '$(inherited)' NEW_ARCH_OTHER_CPLUSPLUSFLAGS = '$(inherited) -DRCT_NEW_ARCH_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1' +# This function returns the min iOS version supported by React Native +# By using this function, you won't have to manually change your Podfile +# when we change the minimum version supported by the framework. +def min_ios_version_supported + return '12.4' +end + def use_react_native! (options={}) # The prefix to react-native prefix = options[:path] ||= "../node_modules/react-native" @@ -420,7 +427,7 @@ def get_react_codegen_spec(options={}) 'source' => { :git => '' }, 'header_mappings_dir' => './', 'platforms' => { - 'ios' => '11.0', + 'ios' => min_ios_version_supported, }, 'source_files' => "**/*.{h,mm,cpp}", 'pod_target_xcconfig' => { "HEADER_SEARCH_PATHS" =>