beansoft / react-native-console

🧩 an IDEA/WebStorm/Android Studio Plugin for One-Click run React Native commands in embed terminal
BSD 3-Clause "New" or "Revised" License
185 stars 28 forks source link

The "iOS run device" does not select the correct device #69

Open Ptitou-fr opened 3 years ago

Ptitou-fr commented 3 years ago

using the button "iOS run device" run the command: "/opt/homebrew/opt/node@14/bin/npx react-native run-ios --device" Unfortunately in my case, it try to use my mac mini, not my iphone "info Using first available device named "Patrick’s Mac mini" due to lack of name supplied."

Is there any setup that I've missed? How could I specify a specific device?

beansoft commented 3 years ago

This logic is controlled by the react native command it self. I noticed the real device list function is comment out in some version, I’ve uploaded a new version to the Jetbrains plugin center, you can download it then install it from disk and have a try first or waiting for the Jetbrains’ admin to approve it. https://plugins.jetbrains.com/plugin/download?rel=true&updateId=126671 Then with the new version you can use the button next to it: There should have your iPhone in the list’s top(please connect your iPhone by USB and enable developer mode).

The finally command will like this: /usr/local/bin/npx react-native run-ios --device "your iPhone name here"

beansoft commented 3 years ago

This update has been published, please take a try with the latest version.

image

Ptitou-fr commented 3 years ago

First of all Thank you, the improvement is greatly appreciated.

However, it's really frustrating that we cannot control which device is selected by the button "iOS run device". Some people are lucky enough to get the right one! So, since we often use the same physical device, how about a button to run directly by the last device we used ?

beansoft commented 3 years ago

Great advice and I'll change this command's behavior by only showing physical devices and auto select the last used one, please wait for the next version. Update will first posted here.

beansoft commented 3 years ago

The new release had fixed this issue and allowing remember last chosen iOS device, please have a try.