From e84b664479b56fffbe2b91c0c12289d21a1e823e Mon Sep 17 00:00:00 2001 From: Lorenzo Sciandra Date: Mon, 3 Apr 2023 11:09:48 +0100 Subject: [PATCH 1/3] minimal change needed --- .circleci/config.yml | 2 +- scripts/react_native_pods.rb | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 99840a20218749..9a53e5c520ac68 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -79,7 +79,7 @@ executors: reactnativeios: <<: *defaults macos: - xcode: &_XCODE_VERSION "13.3.0" + xcode: &_XCODE_VERSION "14.3.0" resource_class: macos.x86.medium.gen2 # ------------------------- 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" => From 17fa237669ae7bfd6a3e6d5c2c01acfe4ad3b67d Mon Sep 17 00:00:00 2001 From: Lorenzo Sciandra Date: Mon, 3 Apr 2023 11:44:39 +0100 Subject: [PATCH 2/3] feedback --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9a53e5c520ac68..99840a20218749 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -79,7 +79,7 @@ executors: reactnativeios: <<: *defaults macos: - xcode: &_XCODE_VERSION "14.3.0" + xcode: &_XCODE_VERSION "13.3.0" resource_class: macos.x86.medium.gen2 # ------------------------- From 2357c812162ab2d195564bf41d683c0c69ae6142 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Mon, 3 Apr 2023 15:59:02 +0100 Subject: [PATCH 3/3] fix: move the installation of MyNativeView after calling use_react_native --- packages/rn-tester/Podfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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