Aakash Sigdel Aakash Sigdel - 4 months ago 16
iOS Question

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

Is it possible to run react-native application on an iOS device directly from the command line like we do on simulator with

react-native run ios --simulator "iPhone 5s"
?

Answer

Not directly from command line. But you can run it via Xcode.

  1. Make sure that the phone is on the same Wi-Fi as your computer.
  2. Open the Xcode project file in $ <Path to React-Native project folder>/ios/.
  3. Press "Build and Run"

You can build the project from command line using the following, in the ios folder of the project

xcodebuild -scheme <RN project Name> -sdk iphoneos build

But I'm not sure how to run it on the device without using additional tools such as fruitstrap GitHub or npm and tutorial.

Comments