Skip to content

Conversation

@google-cla
Copy link

google-cla bot commented Feb 25, 2024

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.

@flutter-dashboard
Copy link

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.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 25, 2024
Copy link
Contributor

@nate-thegrate nate-thegrate left a 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.';
Copy link
Contributor

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?

Copy link
Member

@jmagman jmagman Mar 1, 2024

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR out at #144551

@jd-bus
Copy link
Author

jd-bus commented Feb 29, 2024 via email

@jmagman
Copy link
Member

jmagman commented Mar 4, 2024

@jd-bus I hopefully made the unpaired error case clearer in #144551. Would you mind trying it on master and seeing if it works for you? And if not, please file a new issue and include reproduction steps. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants