-
Notifications
You must be signed in to change notification settings - Fork 919
Getting "No iOS devices connected" for MacOS target on 4.4.0 #1078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
cc @alloy |
Should be fixed by #1068 |
It’s quite weird why the error is happening because release 4.4.0 had the note “support run-ios on Mac target (Catalyst) (#1024)” :) Cc @robertying |
The device name should be the same with what you set in System Preferences Bluetooth sharing panel. For example, mine is Rui’s Mac mini. And I can feed —device with “Rui’s Mac mini” But be aware the single quote for ‘s may be slightly different. Better just copy and paste the Mac device name and wrap it in double quotes. Let me know if this works for you. :) |
@robertying yes, that's exactly what I've set there... also |
Can you console.log(devices) here to debug? Add the code to the corresponding place in node_modules. |
@robertying here you go:
Name equals to what I see in No wonder why it fails: condition is |
😅 yeah I just realized this too. The original PR worked as expected. We must have got lost during the review process. Do you mind submitting another PR to fix this properly? Thank you! |
@robertying I don't mind, but I don't quite know what to put there :))) logic should be — if it's true iOS target, then |
Or we could just remove this condition check, since on any Mac, there is at least one device connected (Mac). Hmm but this could cause confusion if people haven’t started to implement Catalyst...🤔 I don’t really like the idea to separate it with run-mac because Catalyst uses iOS’s UIKit and not Mac’s AppKit. Maybe we can just drop the check only if the device name passed is the host Mac. If not, we return no iOS device connected. |
Exactly.
Makes sense. Just check if device name in args matches the first in the list and go on. Otherwise check if there are more than one. |
@robertying One more problem, when I commented out the check I got this: |
Yeah you need to. You didn’t see this note probably because you used to deploy only to simulators? For real device, this seems a must. |
Yep. But maybe then this tool can be shipped together with cli package? Does not seem to be an overhead... |
Yeah but that's another topic. Let's focus on this missing feature first :) |
@robertying @kirill-konshin Have you checked #1078 (comment)? In my testing it solves the initial issue. Please give it a try and let us know |
@thymikee this looks neat. I think it's more thorough. 👍 |
@thymikee @robertying Did not work for me... |
@kirill-konshin can you run
and make sure that If it's up-to-date, then I'll need your help in debugging this, e.g. by throwing around some console.logs around this code: cli/packages/platform-ios/src/commands/runIOS/parseIOSDevicesList.ts Lines 24 to 42 in a4a0f78
and seeing why it doesn't match your device |
@thymikee thank you, you're right, I should have bumped those too. I did it with {
"resolutions": {
"@react-native-community/*": "4.5.0",
}
} It was just |
It does start the compilation but I got a whole bunch of different errors for mac target... that's a separate issue though. Should I post it in this repo or in main React Native repo? |
If there's no difference running through command line and Xcode directly, then file an issue in main RN Repo please |
Running [....] Waiting up to 5 seconds for iOS device to be connected
[....] Found b0cecc07f4565a0c254bcd20f0c051129a0d5982 (D22AP, iPhone X, iphoneos, arm64, 14.5.1, 18E212) a.k.a. 'Kasra’s iPhone' connected through USB. But running error Could not find a device with udid: "b0cecc07f4565a0c254bcd20f0c051129a0d5982". Available devices: Xcode
|
me too Xcode 12.5 |
For anyone having issues deploying on a device from command line: #1404 |
|
same, I run this command |
This works for me doing:
|
just update the cli-platform-ios inside @react-native-community/ hope it works |
Still not working. |
Yup, this did the trick for me. |
In my case, bad USB cable. |
Uh oh!
There was an error while loading. Please reload this page.
Environment
Description
When I run
react-native run-ios --device XXX
I get:Where
XXX
can be found in:Mac target is enabled:
The text was updated successfully, but these errors were encountered: