Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(xcode): backport Xcode 14.3 fix to 70 #36768

Merged
merged 2 commits into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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