nothing happens after react-native run-ios --device in react native
Asked Answered
W

5

10

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.

Wherewith answered 16/1, 2019 at 6:28 Comment(7)
for ios i would recommend launching app directly from xcode instead of command linePennywise
directly from xcode does the same thing. NOthing happens after buidling even though it succeedsWherewith
does the metro bundler opens and have you trusted your computer in your iphone and lastly is the app atleast installed in the iphone or none of them happens ?Pennywise
the app does not get installed. I just checked, and other apps I create from xcode works fine so it has something to do with the react native compilerWherewith
yeah I used xcode instead of terminal and nothing gets installed eitherWherewith
can you try restarting your xcode and closing all metro bundlersPennywise
I already tried that several timesWherewith
D
10

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"
Dreda answered 16/1, 2019 at 12:16 Comment(0)
L
8

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"
Lapillus answered 9/6, 2020 at 10:54 Comment(3)
This does not list my deviceGreasewood
No iOS devices connected.Esmaria
I tried all kinds of stuff around re-installing the XCode command line tools and such as mentioned in other answers but THIS was it for me.Optimum
J
0

Don't forget to have your device connected! 🤦‍♂️

Justiciar answered 26/6, 2023 at 9:46 Comment(0)
A
0

https://reactnative.dev/docs/running-on-simulator-ios

npm run ios -- --simulator="iPhone 15 Pro" try this.

Avalon answered 2/5 at 16:15 Comment(0)
B
0

When the React Native CLI fails to install the app on your phone, you can run the install yourself with the following command:

xcrun devicectl device install app --device "Tamlyn's iPhone" ~/Library/Developer/Xcode/DerivedData/*/Build/Products/Debug-iphoneos/*.app/
  • You'll need to use the name of your device instead of Tamlyn's iPhone (or you can use the device ID that you get from running xcrun devicectl list devices).
  • You may also need to change the path to the app bundle, depending on your build setup. You can usually find the path by trawling through the build output from the React Native CLI.

If the install succeeds you should see output like:

10:53:39  Acquired tunnel connection to device.
10:53:39  Enabling developer disk image services.
10:53:40  Acquired usage assertion.
57%... 60%... 62%... 66%... 68%... 72%... 74%... 76%... 80%... 84%... 88%... 92%... 96%... Complete!
App installed:
• bundleID: com.whatever.foo
• installationURL: file:///private/var/containers/Bundle/Application/C9DEB594-0000-1111-AAAA-0E155F58106D/MyApp.app/
Bazooka answered 13/9 at 12:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.