-
Notifications
You must be signed in to change notification settings - Fork 28.4k
Support iOS wireless debugging #118104
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
Support iOS wireless debugging #118104
Conversation
@@ -413,11 +413,32 @@ class IOSDevice extends Device { | |||
} | |||
|
|||
_logger.printTrace('Application launched on the device. Waiting for observatory url.'); | |||
final Timer timer = Timer(discoveryTimeout ?? const Duration(seconds: 30), () { | |||
_logger.printError('iOS Observatory not discovered after 30 seconds. This is taking much longer than expected...'); | |||
final int defaultTimeout = interfaceType == IOSDeviceConnectionInterface.network ? 60 : 30; |
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 found that this took longer when using a network device. 60 seconds might be a bit generous, though. Sometimes 30 seconds is enough, but sometimes it's more like 35. Not sure if people's internet connections might influence this (mine is pretty fast), which is why I overestimated.
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.
Wow that's a long time. Maybe 45 and we'll see if we get complaints?
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.
Sounds good. Updated.
@jmagman As we discussed before, this solution does not require any engine changes. However, the biggest drawback to this approach in my opinion is that you need to run in once while connected and click "Allow" for the network permission prompt. We could extend the timeout and print something in the command line to let them know they need to accept it, but I'm unsure of how to confirm that they did without some output from the engine to tell the tool. Let me know if you have any ideas. |
loadDevicesStatus = _logger.startProgress( | ||
'Loading devices...', | ||
); | ||
} |
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.
This change just gives some visual feedback that it's loading the devices.
Which timeout is this hitting? Can we get rid of the timeout if we know we're on wireless? Generally in the tool we like to avoid hard timeouts and instead prefer "this is taking longer than expected..." type output. |
_logger.printError('Port publication (publish-port) must be enabled for wireless debugging.'); | ||
return LaunchResult.failed(); |
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.
Messages like this need to be actionable by the user. What are they supposed to do in this case to fix it? When we have actionable errors like this we should throwToolExit
.
Something like:
_logger.printError('Port publication (publish-port) must be enabled for wireless debugging.'); | |
return LaunchResult.failed(); | |
throwToolExit('Cannot start app on wirelessly tethered iOS device. Try running again with the --publish-port flag'); |
Introduced in #67452 to prevent the pop-up from blocking the app in a CI setting.
Maybe drive
should default to always publishing, and we update our CI scripts to pass --no-publish-port
so users manually running tests won't hit this? wdyt?
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.
Updated the error message.
And thanks for the reminder about drive
, I misunderstood the first time we talked about it. I tried a different approach, so basically added an override for disablePortPublication
that checks if the flag wasn't provided as an actual argument and it's a network device, then changes publish-port to be enabled. It's a little bit hacky, but allows drive
to continue functioning as it was before for all wired devices without needing to update anything. Let me know if you think that's not a good solution.
@@ -413,11 +413,32 @@ class IOSDevice extends Device { | |||
} | |||
|
|||
_logger.printTrace('Application launched on the device. Waiting for observatory url.'); | |||
final Timer timer = Timer(discoveryTimeout ?? const Duration(seconds: 30), () { | |||
_logger.printError('iOS Observatory not discovered after 30 seconds. This is taking much longer than expected...'); | |||
final int defaultTimeout = interfaceType == IOSDeviceConnectionInterface.network ? 60 : 30; |
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.
Wow that's a long time. Maybe 45 and we'll see if we get complaints?
This lookup has a default timeout of 5 seconds flutter/packages/flutter_tools/lib/src/mdns_discovery.dart Lines 69 to 73 in b63c79c
In the comments of the lookup function, it describe the timeout as "The [timeout] parameter specifies how long the internal cache should hold on to the record.". However, from what I can tell in the code and having observed by testing it out, seems to me that timeout is how long it continues to look for records. https://github.com/flutter/packages/blob/e1ab965985d4e8ab5fdcf1b9989cf1c22d770205/packages/multicast_dns/lib/multicast_dns.dart#L189-L228 https://github.com/flutter/packages/blob/e1ab965985d4e8ab5fdcf1b9989cf1c22d770205/packages/multicast_dns/lib/src/lookup_resolver.dart#L42-L45 So to remove the timeout, we'd have to update the multicast_dns package, which we could do. |
Can we keep retrying the lookup on the tool side when it times out? |
That's a good idea, I'll try that |
…takes too long to find observatory url, update flutter drive to enable publish-port if using network 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.
This is looking great!
packages/flutter_tools/test/commands.shard/hermetic/drive_test.dart
Outdated
Show resolved
Hide resolved
packages/flutter_tools/test/commands.shard/hermetic/drive_test.dart
Outdated
Show resolved
Hide resolved
// Wait for iOS Observatory to start up. | ||
await observatoryDiscovery?.uri; | ||
|
||
// If observatory url is not found within 2.2 seconds, change the status |
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.
This caller shouldn't have to know the guts of MDnsObservatoryDiscovery
to know it's a 2 second timeout. Instead, try adding the lookup duration parameter into MDnsObservatoryDiscovery
, and then add 200 ms to it out here.
|
||
List<PtrResourceRecord> pointerRecords = <PtrResourceRecord>[]; | ||
if (isNetworkDevice) { | ||
// Keep checking for records every 2 seconds. |
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.
It looks like this restarts the lookup every 2 seconds. Can we instead let it look for longer, since the caller will handle "this is taking longer than expected"?
(I realize this contradicts the advice of #118104 (comment) but it seems like we can let the internal lookup take much longer until it finds the record, and the external caller to handle the "well this is taking awhile, make sure you hit Allow")
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.
How long did you have in mind? The default was 5 seconds, but when I tested it, 2 seconds was always enough time but maybe that's an invalid assumption. And this lookup does not end when it finds it, it will end at the timeout. So if you put a timeout of 30 seconds, it will run for 30 seconds regardless of what it finds. So if we put a higher timeout, that's longer that the user has to wait for it to finish even though it probably already found what it's looking for.
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.
And this lookup does not end when it finds it, it will end at the timeout.
It looks like it's returning a Stream
, are you sure it's not waiting that long because you added a toList()
at the end, which will wait until the stream is closed?
https://github.com/flutter/packages/blob/e1ab965985d4e8ab5fdcf1b9989cf1c22d770205/packages/multicast_dns/lib/src/lookup_resolver.dart#L48
See their await for
example:
https://github.com/flutter/packages/blob/88585ef98897007eacc1895f90e1288b5624b960/packages/multicast_dns/example/main.dart#L21-L22
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.
You're right, I see. I refactored so it stays open for longer (10 minutes). Let me know if you think longer/shorter time would be better
…ultiple instances of the same app. Update drive command to make publish-port more stable. Update attach for iOS to only use Protocol Discovery if applicable, run mDNS and Protocol Discovery simultaneously, handle --debug-port/--debug-url/--device-vmservice-port, continously poll for obseravtories with mDNS, include port in error message when mutliple available
packages/flutter_tools/test/commands.shard/hermetic/attach_test.dart
Outdated
Show resolved
Hide resolved
Duration timeout = const Duration(minutes: 10), | ||
}) async { | ||
// Poll for 5 seconds to see if there are already services running. | ||
// Use a new instance of MDnsClient so result don't get cached in _client. |
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.
Why don't we want to cache the results? Will the presence of anything in the cache cause it to not to try and lookup anything again?
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.
Exactly, so if it finds records in the first 5 second poll but it doesn't match the parameters (app id and/or device port), those results are cached and then the next poll will end immediately because it gets from the cache.
…r attach, other small improvements
…le print the time it took.
* 3348987 Add new macos target configured for flavors (flutter/flutter#117352) * 6277520 Roll Plugins from 4e5cf2d to 11361d0 (4 revisions) (flutter/flutter#118682) * 997d436 Fix applyBoxFit's handling of fitWidth and fitHeight. (flutter/flutter#117185) * 8a58ec5 Roll Flutter Engine from f79030440948 to c52b290813bd (29 revisions) (flutter/flutter#118720) * 374f09e [flutter_tools] No more implicit --no-sound-null-safety (flutter/flutter#118491) * ae1cc18 remove single-view assumption from `paintImage` (flutter/flutter#118721) * bb8b96a Fix path for require.js (flutter/flutter#118722) * c83a698 update uikit view documentation (flutter/flutter#118715) * 2b3ca0d Bump github/codeql-action from 2.1.38 to 2.1.39 (flutter/flutter#118735) * 666dccc [macOS] bringup new e2e_summary devicelab test (flutter/flutter#118717) * d07b88e Docs fix an=>a (flutter/flutter#118652) * 11d21e0 Add @pragma('vm:entry-point') to RestorableRouteBuilder arguments (flutter/flutter#118738) * 7d9eaab Appbar iconTheme override fix (flutter/flutter#118681) * 6f70830 Roll Flutter Engine from c52b290813bd to 290636c1cb6b (2 revisions) (flutter/flutter#118743) * b3059d2 Bump activesupport from 6.1.5 to 6.1.7.1 in /dev/ci/mac (flutter/flutter#118745) * ffcf63a Add verbose flag to plugin_dependencies_test to debug flake (flutter/flutter#118755) * 2609212 2a11023c7 [ios_platform_view] more precision when determine if a clip rrect is necessary (flutter/engine#38965) (flutter/flutter#118751) * 21fb443 8ed6790b5 Bump chrome_and_driver version to 110. (flutter/engine#38986) (flutter/flutter#118758) * e5c9d06 Forgot to remove emulator flag. (flutter/flutter#118762) * 6a9b2db 95b0c151f Roll Dart SDK from 645fd748e79e to ddf70a598f27 (14 revisions) (flutter/engine#38990) (flutter/flutter#118763) * 0bbb5ec 40f7f0f09 Roll Fuchsia Mac SDK from P5QcCJU8I71xVXuMT... to tlYMsnCv86Fjt5LfF... (flutter/engine#38994) (flutter/flutter#118771) * d53cc4a [macOS] New e2e_summary benchmark fails without Cocoapods. (flutter/flutter#118754) * 3e71e0c Updated `ListTile` documentation, add Material 3 example and other `ListTile` examples fixes. (flutter/flutter#118705) * 213b3cb Check whether slider is mounted before interaction, no-op if unmounted (flutter/flutter#113556) * 06909cc Update packages + fix tests for javascript mime change (flutter/flutter#118617) * 46c7fd1 88e61d8bd Remove references to Observatory (flutter/engine#38919) (flutter/flutter#118793) * b9ab640 Remove incorrect statement in documentation (flutter/flutter#118636) * ea36b3a Add focus detector to CupertinoSwitch (flutter/flutter#118345) * 9b5ea30 Switching over from iOS-15 to iOS-16 in .ci.yaml. (flutter/flutter#118807) * 67ffaef 29a0582a1 Roll Fuchsia Mac SDK from tlYMsnCv86Fjt5LfF... to 6oiZwMyNsjucSxTHJ... (flutter/engine#39004) (flutter/flutter#118817) * 5cd2d4c Support iOS wireless debugging (flutter/flutter#118104) * cbf2e16 Revert "Support iOS wireless debugging (#118104)" (flutter/flutter#118826) * 2258590 Do not run Mac_arm64_ios run_debug_test_macos in presubmit during iPhone 11 migration (flutter/flutter#118828) * 1dd7f45 Add `build macos --config-only` option. (flutter/flutter#118649) * 22520f5 [macOS] Add timeline summary benchmarks (flutter/flutter#118748) * 99e4ca5 Roll Flutter Engine from 29a0582a1d5f to 78bbea005d27 (2 revisions) (flutter/flutter#118829) * c5ceff1 [flutter_tools] Ensure service worker starts caching assets since first load (flutter/flutter#116833) * 818bb4e Roll Flutter Engine from 78bbea005d27 to 26b6609c603b (3 revisions) (flutter/flutter#118839) * 09bd0f6 Support logging 'flutter run' communication to DAP clients (flutter/flutter#118674) * 73096fd [macos] add flavor options to commands in the `flutter_tool` (flutter/flutter#118421) * 030288d Revert "[macos] add flavor options to commands in the `flutter_tool` (#118421)" (flutter/flutter#118858) * 9acf34d Roll Flutter Engine from 26b6609c603b to 7d40e77d0035 (2 revisions) (flutter/flutter#118852) * ec51d32 Remove unnecessary null checks in ‘dev/conductor’ (flutter/flutter#118843) * 54217bd Remove unnecessary null checks in `dev/benchmarks` (flutter/flutter#118840) * 98c18ca Remove unnecessary null checks in examples/ (flutter/flutter#118848) * 99b5262 Remove unnecessary null checks in dev/tools (flutter/flutter#118845) * 52d1205 Roll Flutter Engine from 7d40e77d0035 to 730e88fb6787 (3 revisions) (flutter/flutter#118869) * ee9c9b6 3876320cb Roll Skia from aedfc8695954 to 1b3aa8b6e1cc (43 revisions) (flutter/engine#39024) (flutter/flutter#118871) * 589f2eb d2436a536 Extract WideToUTF16String/UTF16StringToWide to FML (flutter/engine#39020) (flutter/flutter#118873) * 74645b4 Fix `NavigationBar` indicator ripple doesn't account for label height (flutter/flutter#117473) * f78b1f3 dfe67f4c7 Roll Skia from 1b3aa8b6e1cc to f6a5c806294d (11 revisions) (flutter/engine#39027) (flutter/flutter#118874) * 572f0a1 66e177a3d Roll Dart SDK from ddf70a598f27 to fbbfc122dba6 (9 revisions) (flutter/engine#39029) (flutter/flutter#118878) * 26472b5 ccccee513 [macos] Synthesize modifier keys events on pointer events (flutter/engine#37870) (flutter/flutter#118880) * 095b1ab Checkbox borderSide lerp bug fix (flutter/flutter#118728) * ec6ff90 Roll Flutter Engine from ccccee513fb2 to d84b3dc74c9f (2 revisions) (flutter/flutter#118893) * 492d572 Cleanup obsolete --compact-async compiler option (flutter/flutter#118894) * f291eb3 Remove unnecessary null checks in integration_test (flutter/flutter#118861) * ab3c822 Remove unnecessary null checks in dev/devicelab (flutter/flutter#118842) * bf72f5e 58eb1061e Revert "Remove references to Observatory (#38919)" (flutter/engine#39035) (flutter/flutter#118899) * a07e8a6 [reland] Support wireless debugging (flutter/flutter#118895)
* 3348987 Add new macos target configured for flavors (flutter/flutter#117352) * 6277520 Roll Plugins from 4e5cf2d to 11361d0 (4 revisions) (flutter/flutter#118682) * 997d436 Fix applyBoxFit's handling of fitWidth and fitHeight. (flutter/flutter#117185) * 8a58ec5 Roll Flutter Engine from f79030440948 to c52b290813bd (29 revisions) (flutter/flutter#118720) * 374f09e [flutter_tools] No more implicit --no-sound-null-safety (flutter/flutter#118491) * ae1cc18 remove single-view assumption from `paintImage` (flutter/flutter#118721) * bb8b96a Fix path for require.js (flutter/flutter#118722) * c83a698 update uikit view documentation (flutter/flutter#118715) * 2b3ca0d Bump github/codeql-action from 2.1.38 to 2.1.39 (flutter/flutter#118735) * 666dccc [macOS] bringup new e2e_summary devicelab test (flutter/flutter#118717) * d07b88e Docs fix an=>a (flutter/flutter#118652) * 11d21e0 Add @pragma('vm:entry-point') to RestorableRouteBuilder arguments (flutter/flutter#118738) * 7d9eaab Appbar iconTheme override fix (flutter/flutter#118681) * 6f70830 Roll Flutter Engine from c52b290813bd to 290636c1cb6b (2 revisions) (flutter/flutter#118743) * b3059d2 Bump activesupport from 6.1.5 to 6.1.7.1 in /dev/ci/mac (flutter/flutter#118745) * ffcf63a Add verbose flag to plugin_dependencies_test to debug flake (flutter/flutter#118755) * 2609212 2a11023c7 [ios_platform_view] more precision when determine if a clip rrect is necessary (flutter/engine#38965) (flutter/flutter#118751) * 21fb443 8ed6790b5 Bump chrome_and_driver version to 110. (flutter/engine#38986) (flutter/flutter#118758) * e5c9d06 Forgot to remove emulator flag. (flutter/flutter#118762) * 6a9b2db 95b0c151f Roll Dart SDK from 645fd748e79e to ddf70a598f27 (14 revisions) (flutter/engine#38990) (flutter/flutter#118763) * 0bbb5ec 40f7f0f09 Roll Fuchsia Mac SDK from P5QcCJU8I71xVXuMT... to tlYMsnCv86Fjt5LfF... (flutter/engine#38994) (flutter/flutter#118771) * d53cc4a [macOS] New e2e_summary benchmark fails without Cocoapods. (flutter/flutter#118754) * 3e71e0c Updated `ListTile` documentation, add Material 3 example and other `ListTile` examples fixes. (flutter/flutter#118705) * 213b3cb Check whether slider is mounted before interaction, no-op if unmounted (flutter/flutter#113556) * 06909cc Update packages + fix tests for javascript mime change (flutter/flutter#118617) * 46c7fd1 88e61d8bd Remove references to Observatory (flutter/engine#38919) (flutter/flutter#118793) * b9ab640 Remove incorrect statement in documentation (flutter/flutter#118636) * ea36b3a Add focus detector to CupertinoSwitch (flutter/flutter#118345) * 9b5ea30 Switching over from iOS-15 to iOS-16 in .ci.yaml. (flutter/flutter#118807) * 67ffaef 29a0582a1 Roll Fuchsia Mac SDK from tlYMsnCv86Fjt5LfF... to 6oiZwMyNsjucSxTHJ... (flutter/engine#39004) (flutter/flutter#118817) * 5cd2d4c Support iOS wireless debugging (flutter/flutter#118104) * cbf2e16 Revert "Support iOS wireless debugging (#118104)" (flutter/flutter#118826) * 2258590 Do not run Mac_arm64_ios run_debug_test_macos in presubmit during iPhone 11 migration (flutter/flutter#118828) * 1dd7f45 Add `build macos --config-only` option. (flutter/flutter#118649) * 22520f5 [macOS] Add timeline summary benchmarks (flutter/flutter#118748) * 99e4ca5 Roll Flutter Engine from 29a0582a1d5f to 78bbea005d27 (2 revisions) (flutter/flutter#118829) * c5ceff1 [flutter_tools] Ensure service worker starts caching assets since first load (flutter/flutter#116833) * 818bb4e Roll Flutter Engine from 78bbea005d27 to 26b6609c603b (3 revisions) (flutter/flutter#118839) * 09bd0f6 Support logging 'flutter run' communication to DAP clients (flutter/flutter#118674) * 73096fd [macos] add flavor options to commands in the `flutter_tool` (flutter/flutter#118421) * 030288d Revert "[macos] add flavor options to commands in the `flutter_tool` (#118421)" (flutter/flutter#118858) * 9acf34d Roll Flutter Engine from 26b6609c603b to 7d40e77d0035 (2 revisions) (flutter/flutter#118852) * ec51d32 Remove unnecessary null checks in ‘dev/conductor’ (flutter/flutter#118843) * 54217bd Remove unnecessary null checks in `dev/benchmarks` (flutter/flutter#118840) * 98c18ca Remove unnecessary null checks in examples/ (flutter/flutter#118848) * 99b5262 Remove unnecessary null checks in dev/tools (flutter/flutter#118845) * 52d1205 Roll Flutter Engine from 7d40e77d0035 to 730e88fb6787 (3 revisions) (flutter/flutter#118869) * ee9c9b6 3876320cb Roll Skia from aedfc8695954 to 1b3aa8b6e1cc (43 revisions) (flutter/engine#39024) (flutter/flutter#118871) * 589f2eb d2436a536 Extract WideToUTF16String/UTF16StringToWide to FML (flutter/engine#39020) (flutter/flutter#118873) * 74645b4 Fix `NavigationBar` indicator ripple doesn't account for label height (flutter/flutter#117473) * f78b1f3 dfe67f4c7 Roll Skia from 1b3aa8b6e1cc to f6a5c806294d (11 revisions) (flutter/engine#39027) (flutter/flutter#118874) * 572f0a1 66e177a3d Roll Dart SDK from ddf70a598f27 to fbbfc122dba6 (9 revisions) (flutter/engine#39029) (flutter/flutter#118878) * 26472b5 ccccee513 [macos] Synthesize modifier keys events on pointer events (flutter/engine#37870) (flutter/flutter#118880) * 095b1ab Checkbox borderSide lerp bug fix (flutter/flutter#118728) * ec6ff90 Roll Flutter Engine from ccccee513fb2 to d84b3dc74c9f (2 revisions) (flutter/flutter#118893) * 492d572 Cleanup obsolete --compact-async compiler option (flutter/flutter#118894) * f291eb3 Remove unnecessary null checks in integration_test (flutter/flutter#118861) * ab3c822 Remove unnecessary null checks in dev/devicelab (flutter/flutter#118842) * bf72f5e 58eb1061e Revert "Remove references to Observatory (#38919)" (flutter/engine#39035) (flutter/flutter#118899) * a07e8a6 [reland] Support wireless debugging (flutter/flutter#118895)
* da5f8cf Roll Flutter Engine from a512cebdcd30 to 7dc5e7efa66a (2 revisions) (flutter/flutter#118505) * baefecc 35479aa1c Roll Fuchsia Mac SDK from 21nYb648VWbpxc36t... to w0hr1ZMvYGJnWInwK... (flutter/engine#38880) (flutter/flutter#118509) * ca300ce 25cb82272 Add include to make g3 happy (flutter/engine#38850) (flutter/flutter#118510) * 1220245 f79030440 Roll Skia from c72c7bf7e45b to c64a10d525d1 (7 revisions) (flutter/engine#38858) (flutter/flutter#118511) * 7188c3e Update documentation about accent color (flutter/flutter#116778) * 8c2fdb8 M3 Button padding adjustments (flutter/flutter#118449) * f22280a Revert "M3 Button padding adjustments (#118449)" (flutter/flutter#118598) * cc7845e Post a ToolEvent when selecting widget for inspection (flutter/flutter#118098) * a3629a2 Roll Plugins from 92a5367 to 4e5cf2d (8 revisions) (flutter/flutter#118624) * ae7b99e Rename `_*Marker` classes to be `_*Scope`, for consistency (flutter/flutter#118070) * 6fafbc3 Updated tokens to v0.152 (flutter/flutter#118594) * 4b3cf9b Add reference to HardwareKeyboard in RawKeyboard documentation (flutter/flutter#118607) * 0449030 Disable Xcode cache cleanup (flutter/flutter#118641) * f989d55 Devicelab android emulator (flutter/flutter#113472) * 0eaa83a Fix some Focus related documentation typos (flutter/flutter#118576) * 780563c Add const constructor to TextInputFormatter (flutter/flutter#116654) * 973cff4 [Re-land] Button padding m3 (flutter/flutter#118640) * 3348987 Add new macos target configured for flavors (flutter/flutter#117352) * 6277520 Roll Plugins from 4e5cf2d to 11361d0 (4 revisions) (flutter/flutter#118682) * 997d436 Fix applyBoxFit's handling of fitWidth and fitHeight. (flutter/flutter#117185) * 8a58ec5 Roll Flutter Engine from f79030440948 to c52b290813bd (29 revisions) (flutter/flutter#118720) * 374f09e [flutter_tools] No more implicit --no-sound-null-safety (flutter/flutter#118491) * ae1cc18 remove single-view assumption from `paintImage` (flutter/flutter#118721) * bb8b96a Fix path for require.js (flutter/flutter#118722) * c83a698 update uikit view documentation (flutter/flutter#118715) * 2b3ca0d Bump github/codeql-action from 2.1.38 to 2.1.39 (flutter/flutter#118735) * 666dccc [macOS] bringup new e2e_summary devicelab test (flutter/flutter#118717) * d07b88e Docs fix an=>a (flutter/flutter#118652) * 11d21e0 Add @pragma('vm:entry-point') to RestorableRouteBuilder arguments (flutter/flutter#118738) * 7d9eaab Appbar iconTheme override fix (flutter/flutter#118681) * 6f70830 Roll Flutter Engine from c52b290813bd to 290636c1cb6b (2 revisions) (flutter/flutter#118743) * b3059d2 Bump activesupport from 6.1.5 to 6.1.7.1 in /dev/ci/mac (flutter/flutter#118745) * ffcf63a Add verbose flag to plugin_dependencies_test to debug flake (flutter/flutter#118755) * 2609212 2a11023c7 [ios_platform_view] more precision when determine if a clip rrect is necessary (flutter/engine#38965) (flutter/flutter#118751) * 21fb443 8ed6790b5 Bump chrome_and_driver version to 110. (flutter/engine#38986) (flutter/flutter#118758) * e5c9d06 Forgot to remove emulator flag. (flutter/flutter#118762) * 6a9b2db 95b0c151f Roll Dart SDK from 645fd748e79e to ddf70a598f27 (14 revisions) (flutter/engine#38990) (flutter/flutter#118763) * 0bbb5ec 40f7f0f09 Roll Fuchsia Mac SDK from P5QcCJU8I71xVXuMT... to tlYMsnCv86Fjt5LfF... (flutter/engine#38994) (flutter/flutter#118771) * d53cc4a [macOS] New e2e_summary benchmark fails without Cocoapods. (flutter/flutter#118754) * 3e71e0c Updated `ListTile` documentation, add Material 3 example and other `ListTile` examples fixes. (flutter/flutter#118705) * 213b3cb Check whether slider is mounted before interaction, no-op if unmounted (flutter/flutter#113556) * 06909cc Update packages + fix tests for javascript mime change (flutter/flutter#118617) * 46c7fd1 88e61d8bd Remove references to Observatory (flutter/engine#38919) (flutter/flutter#118793) * b9ab640 Remove incorrect statement in documentation (flutter/flutter#118636) * ea36b3a Add focus detector to CupertinoSwitch (flutter/flutter#118345) * 9b5ea30 Switching over from iOS-15 to iOS-16 in .ci.yaml. (flutter/flutter#118807) * 67ffaef 29a0582a1 Roll Fuchsia Mac SDK from tlYMsnCv86Fjt5LfF... to 6oiZwMyNsjucSxTHJ... (flutter/engine#39004) (flutter/flutter#118817) * 5cd2d4c Support iOS wireless debugging (flutter/flutter#118104) * cbf2e16 Revert "Support iOS wireless debugging (#118104)" (flutter/flutter#118826) * 2258590 Do not run Mac_arm64_ios run_debug_test_macos in presubmit during iPhone 11 migration (flutter/flutter#118828) * 1dd7f45 Add `build macos --config-only` option. (flutter/flutter#118649) * 22520f5 [macOS] Add timeline summary benchmarks (flutter/flutter#118748) * 99e4ca5 Roll Flutter Engine from 29a0582a1d5f to 78bbea005d27 (2 revisions) (flutter/flutter#118829) * c5ceff1 [flutter_tools] Ensure service worker starts caching assets since first load (flutter/flutter#116833) * 818bb4e Roll Flutter Engine from 78bbea005d27 to 26b6609c603b (3 revisions) (flutter/flutter#118839) * 09bd0f6 Support logging 'flutter run' communication to DAP clients (flutter/flutter#118674) * 73096fd [macos] add flavor options to commands in the `flutter_tool` (flutter/flutter#118421)
`idevicesyslog` requires the `--network` flag to obtain logs for iOS devices when wirelessly paired. When running Flutter on devices with iOS 12 or earlier versions, [the `idevicesyslog` command is used.](https://github.com/flutter/flutter/blob/5931b4f21da0c564b28794f40257b5f660596a3e/packages/flutter_tools/lib/src/ios/devices.dart#L1269-L1277). Related Issue: #15072 Related PRs: #118104, #118895, #60623
Is this usable? I couldn't get my Android Emulator on another computer to connect over a specific port using this option |
iOS wireless debugging is enabled, but sounds like what you're trying to do is something else. Please file a new issue. |
Allows you to run flutter with a wireless iOS device. Uses mDNS service to get the IP of the wireless device and then access the observatory using it.
Unlike when running through a usb device, the Dart VM port does not get forwarded.
--device-vmservice-port
and--dds-port
works same as before.--host-vmservice-port
is slightly different. Before it would usehost-vmservice-port
as the port to forward the Dart VM to ifdds-port
was also provided, but ifdds-port
was not provided, it would usehost-vmservice-port
as the port for the DDS service and select a random port for the forwarded Dart VM. With this changehost-vmservice-port
is not used for port forwarding since there is none. It will only be used as the port for the DDS service ifdds-port
is not provided, but ifdds-port
is providedhost-vmservice-port
is basically ignored.I tested
flutter run
,flutter attach
,flutter install
, andflutter screenshot
,flutter drive
.Fixes #15072.
Steps to setup
(If you don't get that little network icon next to the device name it probably didn't work, regardless of checkbox state.)
Steps to test
flutter run
flutter run --device-timeout 5
Steps to test
flutter attach
(with app running in Xcode)--observatory-host=0.0.0.0
(IPv4) or--observatory-host=::0
(IPv6) as launch argumentflutter attach --device-timeout 5
Steps to test with IPv6
To test any of the above commands with IPv6, you need to use the
--ipv6
flag when running the commands. You'll need to setup an IPv6 network. I used this tutorial to temporarily create an IPv6 network:https://developer.apple.com/library/archive/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW16
Limitations
Must run once connected and click "Allow" to network permission prompt.Fixed by 7b6da55.--device-timeout
flag to set the timeout longer.flutter attach
to work (when running app in Xcode), user must manually add launch argument to Xcode.--no-publish-port
flag. mDNS is required for this to work.Things still need to be done
This will still work even without these fixes, but these fixes will help stabilize it.
flutter run
#118109--device-timeout 5
flutter clean
.--device-timeout 5
as arg to default configuration (see below)Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.