Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ntamvl/8e40784cda177902ceb479060cbb7197 to your computer and use it in GitHub Desktop.
Save ntamvl/8e40784cda177902ceb479060cbb7197 to your computer and use it in GitHub Desktop.
Run react-native application on iOS device directly from command line

Run react-native application on iOS device directly from command line

The following worked for me (tested on react native 0.38 and 0.40):

npm install -g ios-deploy
# Run on a connected device, e.g. Max's iPhone:
react-native run-ios --device "Max's iPhone"

This is the proper way to do this according to fb. If you try to run just the run-ios command, you will find that the script recommends that you npm install -g ios-deploy when it comes to the install step after building.

While the documentation on the various commands that react-native offers is a little sketchy, it is worth doing as they suggest and going in to look at react-native/local-cli. There you can see all the commands available and the code that they run - you can thus work out what switches are available for undocumented commands.

source: https://stackoverflow.com/questions/38495793/run-react-native-application-on-ios-device-directly-from-command-line/41632929#41632929

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment