How to run a react-native app on a real device using terminal

👋🏿Jambo folks,
Constantly opening Xcode to build your app on a real device is a pain, open your terminal and lets’ dive right in.

Step 1

For whatever weird reason you don’t have it yet, install homebrew

/bin/bash -c “$(curl -fsSL https://raw.gith…


This content originally appeared on DEV Community and was authored by ochieng seth

👋🏿Jambo folks,
Constantly opening Xcode to build your app on a real device is a pain, open your terminal and lets' dive right in.

Step 1

  • For whatever weird reason you don't have it yet, install homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Step 2

  • install ios-deploy

brew install ios-deploy

now what you have been waiting for 😛

  • connect your device via usb (of-course) then in terminal,

ios-deploy -c

The result will be

Found 7875****************** (D20AP, <iphone version>, iphoneos, arm64, 1543) a.k.a. '<device name>' connected through USB.

  • copy the 7875******************
  • now lets build the app with

npx react-native run-ios --udid 7875******************

Hope it helps😊


This content originally appeared on DEV Community and was authored by ochieng seth


Print Share Comment Cite Upload Translate Updates
APA

ochieng seth | Sciencx (2022-02-10T07:47:06+00:00) How to run a react-native app on a real device using terminal. Retrieved from https://www.scien.cx/2022/02/10/how-to-run-a-react-native-app-on-a-real-device-using-terminal/

MLA
" » How to run a react-native app on a real device using terminal." ochieng seth | Sciencx - Thursday February 10, 2022, https://www.scien.cx/2022/02/10/how-to-run-a-react-native-app-on-a-real-device-using-terminal/
HARVARD
ochieng seth | Sciencx Thursday February 10, 2022 » How to run a react-native app on a real device using terminal., viewed ,<https://www.scien.cx/2022/02/10/how-to-run-a-react-native-app-on-a-real-device-using-terminal/>
VANCOUVER
ochieng seth | Sciencx - » How to run a react-native app on a real device using terminal. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/02/10/how-to-run-a-react-native-app-on-a-real-device-using-terminal/
CHICAGO
" » How to run a react-native app on a real device using terminal." ochieng seth | Sciencx - Accessed . https://www.scien.cx/2022/02/10/how-to-run-a-react-native-app-on-a-real-device-using-terminal/
IEEE
" » How to run a react-native app on a real device using terminal." ochieng seth | Sciencx [Online]. Available: https://www.scien.cx/2022/02/10/how-to-run-a-react-native-app-on-a-real-device-using-terminal/. [Accessed: ]
rf:citation
» How to run a react-native app on a real device using terminal | ochieng seth | Sciencx | https://www.scien.cx/2022/02/10/how-to-run-a-react-native-app-on-a-real-device-using-terminal/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.