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
Separate attached and wireless devices #122615
Separate attached and wireless devices #122615
Conversation
@@ -1302,6 +1306,13 @@ class FakeIOSDevice extends Fake implements IOSDevice { | |||
@override | |||
final IOSDeviceConnectionInterface interfaceType; | |||
|
|||
@override | |||
DeviceConnectionInterface get connectionInterface { |
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.
I know you added this enum in a previous refactor PR #121359, but is there any reason to maintain both DeviceConnectionInterface
and IOSDeviceConnectionInterface
? Can we swap the iOS device to use DeviceConnectionInterface
instead, with the none
either removed, or added to DeviceConnectionInterface
?
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.
Good point, on further inspection, I think we can safely get rid of IOSDeviceConnectionInterface. The none
case is for simulators, which we consider attached
and aren't even included in IOSDevice
. The "unknown future interfaces" gets categorized as usb
currently, which will get changed to attached
.
flutter/packages/flutter_tools/lib/src/macos/xcdevice.dart
Lines 360 to 371 in fcf1134
// Interface can be "usb", "network", or "none" for simulators | |
// and unknown future interfaces. | |
final Object? interface = deviceProperties['interface']; | |
if (interface is String) { | |
if (interface.toLowerCase() == 'network') { | |
return IOSDeviceConnectionInterface.network; | |
} else { | |
return IOSDeviceConnectionInterface.usb; | |
} | |
} | |
return IOSDeviceConnectionInterface.none; |
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.
LGTM
This PR includes 4 changes:
flutter run
.flutter devices
command.IOSDeviceConnectionInterface
withDeviceConnectionInterface
since it's no longer needed.IOSDeviceConnectionInterface.network
->DeviceConnectionInterface.wireless
IOSDeviceConnectionInterface.usb
->DeviceConnectionInterface.attached
IOSDeviceConnectionInterface.none
->DeviceConnectionInterface.attached
Note: This PR does not include updates for extended search for wireless iOS devices.
Part 3 in breakdown of #121262.
Fixes #119271.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.