Skip to content

Commit

Permalink
fix(xcode): backport Xcode 14.3 fix to 70 (#36768)
Browse files Browse the repository at this point in the history
  • Loading branch information
kelset authored Apr 3, 2023
1 parent ea11efa commit 34f3794
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
10 changes: 9 additions & 1 deletion scripts/cocoapods/__tests__/codegen_utils-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,14 @@ def testCleanUpCodegenFolder_whenFolderExists_deleteItAndSetCleanupDone

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",
Expand All @@ -443,7 +451,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" =>
Expand Down
9 changes: 8 additions & 1 deletion scripts/cocoapods/codegen_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ def generate_react_codegen_podspec!(spec, codegen_output_dir)
@@REACT_CODEGEN_PODSPEC_GENERATED = true
end

# 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

# It generates the podspec object that represents the `React-Codegen.podspec` file
#
# Parameters
Expand All @@ -84,7 +91,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" =>
Expand Down

0 comments on commit 34f3794

Please sign in to comment.