running on my device used to work fine. However, suddenly, when I run react-native run-ios --device, I get to the ending like
** BUILD SUCCEEDED **
installing and launching your app on User’s iPhone...
However, nothing happens after and the app does not get installed in my device.
Open your react native app's directory, navigate to ios folder, and double-click on . xcworkspace file to open the Xcode. Next, open the Product menu, go to Destination, and select your device. If you don't have an Apple Developer account, you must create one to be able to run your project on an iOS device.
React Native combines the best parts of native development with React, a best-in-class JavaScript library for building user interfaces. Use a little—or a lot. You can use React Native today in your existing Android and iOS projects or you can create a whole new app from scratch.
If you are already familiar with mobile development, you may want to use React Native CLI. It requires Xcode or Android Studio to get started.
For me the following worked a while back when I faced a similar issue:
>npm install -g ios-deploy
>react-native run-ios --device "My iPhone"
I seriously offer you to install ios-deploy
by using brew
:
brew install ios-deploy
If you installed it by npm
before installing by brew
uninstall it by the following command:
sudo npm uninstall -g ios-deploy
After having the correct version with the correct installation plug your device and then run the below command:
npx react-native run-ios --device
This current command directly installs the app on the first plugged device to your macOS system. if you plugged several devices then you should pass the name of a targeted device just like below:
npx react-native run-ios --device "DeviceName"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With