From 0010c3807d7e47d7d518667dbfac62f7c0da1ac1 Mon Sep 17 00:00:00 2001 From: Lorenzo Sciandra Date: Mon, 3 Apr 2023 14:49:34 +0100 Subject: [PATCH] fix(xcode): backport Xcode 14.3 fix to 71 (#36769) --- scripts/cocoapods/__tests__/codegen_utils-test.rb | 10 +++++++++- scripts/cocoapods/codegen_utils.rb | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/cocoapods/__tests__/codegen_utils-test.rb b/scripts/cocoapods/__tests__/codegen_utils-test.rb index f8580d20288bfe..318698707b6ad5 100644 --- a/scripts/cocoapods/__tests__/codegen_utils-test.rb +++ b/scripts/cocoapods/__tests__/codegen_utils-test.rb @@ -486,6 +486,14 @@ def test_assertCodegenFolderIsEmpty_whenItIsNotEmpty_itAborts private + # mocking the min_ios_version_supported function + # as it is not possible to require the original react_native_pod + # without incurring in circular deps + # TODO: move `min_ios_version_supported` to utils.rb + def min_ios_version_supported + return '12.4' + end + def get_podspec_no_fabric_no_script spec = { 'name' => "React-Codegen", @@ -498,7 +506,7 @@ def get_podspec_no_fabric_no_script '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" => diff --git a/scripts/cocoapods/codegen_utils.rb b/scripts/cocoapods/codegen_utils.rb index 3694e686b79acf..c305fa605fb6ff 100644 --- a/scripts/cocoapods/codegen_utils.rb +++ b/scripts/cocoapods/codegen_utils.rb @@ -85,7 +85,7 @@ def get_react_codegen_spec(package_json_file, folly_version: '2021.07.22.00', fa '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" =>