Skip to content
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
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,
};
Loading