Skip to content

Commit d3c94b4

Browse files
cipolleschikelset
authored andcommitted
Fix Cocoapods for Xcode 14.3.0 (facebook#36759)
Summary: Pull Request resolved: facebook#36759 On Thursday the 30th, Apple Released Xcode 14.3.0. This Version of Xcode enforce some version checks for which React-Codegen, which supported iOS 11 as minimum supported version, could not be build anymore. This change ensue that React-Codegen is always aligned to the min version supported by React Native. Plus, it moves CircleCI's Xcode to 14.3.0, to keep this problem in Check. While working on this, I figured that, with the monorepo, Ruby tests stopped working because they were in the wrong folder: I moved them in the right one. ## Changelog: [iOS][Fixed] - Make React Native build with Xcode 14.3.0 and fix tests Reviewed By: blakef Differential Revision: D44605617 fbshipit-source-id: 3ec1f5b36858ef07d9f713d74eb411a1edcccd45
1 parent e795b53 commit d3c94b4

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ references:
4646
# Dependency Anchors
4747
# -------------------------
4848
dependency_versions:
49-
xcode_version: &xcode_version "14.2.0"
49+
xcode_version: &xcode_version "14.3.0"
5050
nodelts_image: &nodelts_image "cimg/node:18.12.1"
5151
nodeprevlts_image: &nodeprevlts_image "cimg/node:16.18.1"
5252

@@ -620,7 +620,7 @@ jobs:
620620
- run:
621621
name: Run Ruby Tests
622622
command: |
623-
cd scripts
623+
cd packages/react-native/scripts
624624
sh run_ruby_tests.sh
625625
- run_yarn
626626
- *attach_hermes_workspace

packages/react-native/scripts/cocoapods/__tests__/codegen_utils-test.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
require_relative "./test_utils/CodegenScriptPhaseExtractorMock.rb"
1616
require_relative "./test_utils/FileUtilsMock.rb"
1717

18+
# mocking the min_ios_version_supported function
19+
# as it is not possible to require the original react_native_pod
20+
# without incurring in circular deps
21+
# TODO: move `min_ios_version_supported` to utils.rb
22+
def min_ios_version_supported
23+
return '12.4'
24+
end
25+
1826
class CodegenUtilsTests < Test::Unit::TestCase
1927
:base_path
2028

@@ -527,7 +535,7 @@ def get_podspec_no_fabric_no_script
527535
'source' => { :git => '' },
528536
'header_mappings_dir' => './',
529537
'platforms' => {
530-
'ios' => '11.0',
538+
'ios' => '12.4',
531539
},
532540
'source_files' => "**/*.{h,mm,cpp}",
533541
'pod_target_xcconfig' => {

packages/react-native/scripts/cocoapods/codegen_utils.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def get_react_codegen_spec(package_json_file, folly_version: '2021.07.22.00', fa
111111
'source' => { :git => '' },
112112
'header_mappings_dir' => './',
113113
'platforms' => {
114-
'ios' => '11.0',
114+
'ios' => min_ios_version_supported,
115115
},
116116
'source_files' => "**/*.{h,mm,cpp}",
117117
'pod_target_xcconfig' => {
File renamed without changes.

0 commit comments

Comments
 (0)