Skip to content

Commit

Permalink
ci: Downgrade to Xcode 15, don't run pod install with `react-native…
Browse files Browse the repository at this point in the history
…-macos-init` (#2271)

* Revert "chore(ci): Update to Xcode 16 (#2207)"

This reverts commit 9bf6051.

* Update generate-macos.js

* Update index.js

* Update test-react-native-macos-init.yml

* Update index.js
  • Loading branch information
Saadnajmi authored Nov 13, 2024
1 parent d61d747 commit ffd6abb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 19 deletions.
1 change: 1 addition & 0 deletions .ado/jobs/test-react-native-macos-init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions .ado/variables/vars.yml
Original file line number Diff line number Diff line change
@@ -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'
2 changes: 0 additions & 2 deletions packages/react-native/local-cli/generate-macos.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ function generateMacOS (projectDir, name, options) {
{ overwrite: options.overwrite }
);

installPods(options);

printFinishMessage(name);
}

Expand Down
14 changes: 1 addition & 13 deletions packages/react-native/local-cli/generator-macos/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

0 comments on commit ffd6abb

Please sign in to comment.