Skip to content

Conversation

@esthor
Copy link
Contributor

@esthor esthor commented Jan 25, 2023

What: There is a new --list-devices flag being added to the React Native CLI that provides an interactive list of available devices (for both iOS and Android). It's very nice.

Why: TL;DR: Convenience & ✨✨ Developer Experience ✨✨

This interactive approach allows a user to not need to manually run xcrun simctl list devices or adb devices in order to copy and then paste the exact device name into a --simulator <simulator_name> or --deviceID <device_id> , for iOS and Android, respectively.

Status: Besides approval on this PR, these changes need to land over in React Native CLI land:


Not In Scope

Consolidating the docs around running on devices and simulators/emulators.
I noticed that there are at least 3 few places mentioning how to run (Environment Setup, Running on Device, Running on iOS Simulator), but it doesn't feel like there is a definitive place or pattern to the docs. For instance, that third location is a specific iOS guide for running on specific devices/simulators, but there isn't a similar page in the Android guide on the same topic.

Suggestion:

  1. Make an Android "Running on Emulator" (mirroring the iOS "Running on Simulator")
  2. Expand these to fully cover running on physical devices, as well. They should become the definitive guides on building to specific iOS and Android dev targets, respectively.
  3. Remove explanations in Environment Setup and Running on Device pages, and replace them with a reference to these 2 new "definitive" pages.
  4. Drastically simplify the "Running on Device" page to use the automated processes the CLI supports. E.g., for Android, the CLI will try to do the adb reverse for selected device, it will also interactively list devices, etc. You could turn this page for Android dev into "Run npx react-native run-android --list-devices and select the connected device or emulator you'd prefer. For more information, check the Page", which would also have the (old) manual steps.

I may also be hyper-focused on this topic and it's maybe not that big of a deal. 🤷

@facebook-github-bot
Copy link

Hi @esthor!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@netlify
Copy link

netlify bot commented Jan 25, 2023

Deploy Preview for react-native ready!

Name Link
🔨 Latest commit eb7eb1d
🔍 Latest deploy log https://app.netlify.com/sites/react-native/deploys/63d14b68a3d70300088a9c8f
😎 Deploy Preview https://deploy-preview-3534--react-native.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@cortinico cortinico added the 🕐 Waiting on PR These may be waiting for a PR to the facebook/react-native to be merged label Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed 🕐 Waiting on PR These may be waiting for a PR to the facebook/react-native to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants