Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nothing happens after react-native run-ios --device in react native

running on my device used to work fine. However, suddenly, when I run react-native run-ios --device, I get to the ending like

  • [[ true != true ]]

** 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.

like image 614
Seongmin Choo Avatar asked Jan 16 '19 06:01

Seongmin Choo


People also ask

How do you run on iOS device React Native?

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.

Does React Native work on both iOS and Android?

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.

Can I use React Native without Xcode?

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.


2 Answers

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"
like image 153
Felix Too Avatar answered Oct 18 '22 22:10

Felix Too


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"
like image 45
AmerllicA Avatar answered Oct 18 '22 21:10

AmerllicA