-
Notifications
You must be signed in to change notification settings - Fork 29.7k
clarify other reason for failing to connect #144095
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
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
nate-thegrate
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jd-bus, thanks for submitting the clarification: I bet this will reduce frustration for lots of people down the road :)
We have a few tests that look for this string, so you'll need to update those as well. You can find them in packages/flutter_tools/test/general.shard/runner/target_devices_test.dart.
You'll also need to sign the CLA before any changes you make to Flutter can be approved.
| String flutterSpecifiedDeviceDevModeDisabled(String deviceName) => 'To use ' | ||
| "'$deviceName' for development, enable Developer Mode in Settings → Privacy & Security."; | ||
| "'$deviceName' for development, enable Developer Mode in Settings → Privacy & Security. " | ||
| 'You may also need to open XCode while the device is connected, and say yes when prompted to Trust the device.'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmagman I think you don't need XCode to be open to get prompted, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I unpair my phone and turn off developer mode and run flutter devices or doctor I see:
Error: iPhone is not paired with your computer. To use iPhone with Xcode, unlock it and choose to trust this computer when prompted. (code -9)
However that doesn't seem to be checked during flutter run and I get:
Could not run build/ios/iphoneos/Runner.app on iPhone.
Try launching Xcode and selecting "Product > Run" to fix the problem:
open ios/Runner.xcworkspace
Installing and launching... 71ms
Error launching application on iPhone.
I can't seem to reproduce the issue where the phone is unpaired and it prints the enable Developer Mode in Settings → Privacy & Security error message. I'm not sure when Xcode would not open during flutter run since we now launch it. An issue with reproduction steps would have been helpful 🙂
It would be better if the tool checked if it's paired during device discovery, I can't find an issue for that at the moment, filed #144447
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR out at #144551
|
You do. Without opening it, this " for development, enable Developer Mode
in Settings → Privacy & Security. " message just gets printed. It
happened to me, which is why I found the Stackoverflow.
…On Thu, Feb 29, 2024 at 4:59 PM Christopher Fujino ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In packages/flutter_tools/lib/src/runner/target_devices.dart
<#144095 (comment)>:
> @@ -29,7 +29,8 @@ String _foundSpecifiedDevicesMessage(int count, String deviceId) =>
String _noMatchingDeviceMessage(String deviceId) => 'No supported devices found with name or id '
"matching '$deviceId'.";
String flutterSpecifiedDeviceDevModeDisabled(String deviceName) => 'To use '
- "'$deviceName' for development, enable Developer Mode in Settings → Privacy & Security.";
+ "'$deviceName' for development, enable Developer Mode in Settings → Privacy & Security. "
+ 'You may also need to open XCode while the device is connected, and say yes when prompted to Trust the device.';
@jmagman <https://github.com/jmagman> I think you don't need XCode to be
open to get prompted, right?
—
Reply to this email directly, view it on GitHub
<#144095 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4MXQUGNADFCTSTZBCSMQVLYV6SFJAVCNFSM6AAAAABDYPHZQ6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSMBZHE2DSOBTGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
https://stackoverflow.com/questions/77648341/flutter-not-reading-device-developer-mode-setting