Skip to content

Conversation

tom-un
Copy link
Collaborator

@tom-un tom-un commented Apr 11, 2020

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

This change adds a react-native run-macos command similar to run-ios and run-android. It will build the macOS app and then launch it.

The change also modified the macos-generator command to output an updated final message that informs the user to run via npx react-native run-macos.

A minor bug in the macos xcodeproj template is fixed: it was creating an App bundle Id in the form org.reactjs.native.AppName.AppName instead of org.reactjs.AppName.AppName.

The new run-macos command is registered in react-native.config.js for macos platform.

scripts/packager.sh was updated so that when the "Launch Packager" custom build step in React runs, it correctly starts the packager in react-native-macos mode similar to what yarn start:macos does.

This command is patterned after the run-ios command which is implemented at https://github.com/react-native-community/cli/tree/master/packages/platform-ios/src/commands/runIOS.

Focus areas to test

npx react-native init AwesomeApp
cd AwesomeApp
npx react-native-macos-init
npx react-native run-macos

react-native run-macos

Microsoft Reviewers: Open in CodeFlow

@tom-un tom-un self-assigned this Apr 11, 2020
@pull-bot
Copy link

pull-bot commented Apr 11, 2020

Messages
📖

📋 Missing Changelog - Can you add a Changelog? To do so, add a "## Changelog" section to your PR description. A changelog entry has the following format: [CATEGORY] [TYPE] - Message.

CATEGORY may be:
  • General
  • iOS
  • Android
  • JavaScript
  • Internal (for changes that do not need to be called out in the release notes)

TYPE may be:

  • Added, for new features.
  • Changed, for changes in existing functionality.
  • Deprecated, for soon-to-be removed features.
  • Removed, for now removed features.
  • Fixed, for any bug fixes.
  • Security, in case of vulnerabilities.

MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.

📖 📋 Missing Test Plan - Can you add a Test Plan? To do so, add a "## Test Plan" section to your PR description. A Test Plan lets us know how these changes were tested.
📖 📋 Missing Summary - Can you add a Summary? To do so, add a "## Summary" section to your PR description. This is a good place to explain the motivation for making this change.

Generated by 🚫 dangerJS against 3267418

Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code analysis results:

  • shellcheck found some issues.

@ghost ghost removed the Needs: Author Feedback label Apr 11, 2020
@tom-un tom-un merged commit 6196f60 into microsoft:master Apr 14, 2020
@alloy
Copy link
Member

alloy commented Apr 14, 2020

Nice ✨

@tom-un tom-un deleted the tomun/run-macos branch May 8, 2020 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants