From ffd6abbb23c6313bb28c1e387a6ab2f5df5328a1 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Tue, 12 Nov 2024 20:11:09 -0600 Subject: [PATCH] ci: Downgrade to Xcode 15, don't run `pod install` with `react-native-macos-init` (#2271) * Revert "chore(ci): Update to Xcode 16 (#2207)" This reverts commit 9bf6051fa79c4e748fbe1ee1b7736b2a2436aaab. * Update generate-macos.js * Update index.js * Update test-react-native-macos-init.yml * Update index.js --- .ado/jobs/test-react-native-macos-init.yml | 1 + .ado/variables/vars.yml | 8 ++++---- packages/react-native/local-cli/generate-macos.js | 2 -- .../local-cli/generator-macos/index.js | 14 +------------- 4 files changed, 6 insertions(+), 19 deletions(-) diff --git a/.ado/jobs/test-react-native-macos-init.yml b/.ado/jobs/test-react-native-macos-init.yml index 430c8076d33078..5a7031689b84b1 100644 --- a/.ado/jobs/test-react-native-macos-init.yml +++ b/.ado/jobs/test-react-native-macos-init.yml @@ -38,6 +38,7 @@ jobs: # We need to set the npm registry here otherwise it won't stick $(Build.Repository.LocalPath)/.ado/scripts/verdaccio.sh configure node $(Build.Repository.LocalPath)/packages/react-native-macos-init/bin.js --verbose --version latest --overwrite --prerelease + pod install --project-directory=macos workingDirectory: $(Agent.BuildDirectory)/testcli displayName: Apply macOS template (new project) diff --git a/.ado/variables/vars.yml b/.ado/variables/vars.yml index 16e13cfa6b678d..e976033d97f3a4 100644 --- a/.ado/variables/vars.yml +++ b/.ado/variables/vars.yml @@ -1,6 +1,6 @@ variables: VmImageApple: macos-latest-internal - xcode_friendly_name: 'Xcode 16.0' - xcode_version: '/Applications/Xcode_16.0.app' - ios_version: '18.0' - ios_simulator: 'iPhone 16' + xcode_friendly_name: 'Xcode 15.2' + xcode_version: '/Applications/Xcode_15.2.app' + ios_version: '17.2' + ios_simulator: 'iPhone 15' diff --git a/packages/react-native/local-cli/generate-macos.js b/packages/react-native/local-cli/generate-macos.js index 3a01420a80aa3c..2de8b18ca5986c 100644 --- a/packages/react-native/local-cli/generate-macos.js +++ b/packages/react-native/local-cli/generate-macos.js @@ -30,8 +30,6 @@ function generateMacOS (projectDir, name, options) { { overwrite: options.overwrite } ); - installPods(options); - printFinishMessage(name); } diff --git a/packages/react-native/local-cli/generator-macos/index.js b/packages/react-native/local-cli/generator-macos/index.js index 9b6cc63e8c7d3a..119c432bbfa18f 100644 --- a/packages/react-native/local-cli/generator-macos/index.js +++ b/packages/react-native/local-cli/generator-macos/index.js @@ -122,32 +122,20 @@ function installDependencies(options) { childProcess.execSync(isYarn ? 'yarn' : 'npm i', execOptions); } -/** - * @param {{ verbose?: boolean }=} options - */ -function installPods(options) { - const cwd = path.join(process.cwd(), macOSDir); - const quietFlag = options && options.verbose ? '' : '--quiet'; - childProcess.execSync(`npx ${quietFlag} pod-install --non-interactive ${quietFlag}`, { stdio: 'inherit', cwd }); -} - /** * @param {string} newProjectName */ function printFinishMessage(newProjectName) { console.log(` ${chalk.blue(`Run instructions for ${chalk.bold('macOS')}`)}: + • pod install --project-directory=macos • npx react-native run-macos - ${chalk.dim('- or -')} - • Open ${xcworkspacePath(newProjectName)} in Xcode or run "xed -b ${macOSDir}" • yarn start:macos - • Hit the Run button `); } module.exports = { copyProjectTemplateAndReplace, installDependencies, - installPods, printFinishMessage, };