Skip to content

flutter run should support wireless debugging of iOS devices #15072

Description

@phumberdroz

Latest update: #15072 (comment)


Steps to Reproduce

connect iPhone via usb
Open xcode -> window -> devices & Simulators -> select correct device and enable connect via network
Network Symbol is shown in the list to the left
disconnect iPhone

Android Studio shows devices but if you try to run it it is in an endless waiting loop without visual indication

If you then connect the devices via USB it continues on

Logs

https://gist.github.com/phumberdroz/9700d43d2bc9f5e510bebc6dab9b509c

Flutter Doctor

[✓] Flutter (Channel beta, v0.1.5, on Mac OS X 10.13.3 17D102, locale en-US)
    • Flutter version 0.1.5 at /Users/phumberdroz/flutter
    • Framework revision 3ea4d06340 (8 days ago), 2018-02-22 11:12:39 -0800
    • Engine revision ead227f118
    • Dart version 2.0.0-dev.28.0.flutter-0b4f01f759

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/phumberdroz/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.2, Build version 9C40b
    • ios-deploy 1.9.2
    • CocoaPods version 1.4.0

[✓] Android Studio (version 3.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] IntelliJ IDEA Ultimate Edition (version 2017.3.4)
    • Flutter plugin version 22.2.2
    • Dart plugin version 173.4548.30

[✓] VS Code (version 1.20.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Dart Code extension version 2.9.2

[✓] Connected devices (2 available)
    • Pierre’s iPhone • ec754a5c0607923df2a99ccd051938e0045dee6b • ios • iOS 11.2.6
    • iPhone 7        • 5001A557-2FB6-49EB-8C5C-ABC8396F19E9     • ios • iOS 11.2 (simulator)

• No issues found!
> For more information about diagnosing and reporting Flutter bugs, please see [https://flutter.io/bug-reports/](https://flutter.io/bug-reports/).

Activity

  1. Hixie commented on May 30, 2018

    @Hixie
    Contributor

    cc @devoncarew IDE bug

  2. devoncarew commented on Jun 1, 2018

    @devoncarew
    Contributor

    This issue was moved to flutter/flutter-intellij#2308

  3. devoncarew commented on Jun 1, 2018

    @devoncarew
    Contributor

    @phumberdroz, to re-phrase your report:

    • connect iPhone via usb
    • use an xcode feature to enable connect via network
    • disconnect iPhone

    We then locate the device correctly, but when you try and run, flutter run doesn't work with it. It sounds like flutter_tools doesn't work with the network style connection. @cbracken @xster

  4. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    platform-iosiOS applications specifically
    on Jun 1, 2018
  5. changed the title [-]Wireless Debugging does not work with Android Studio[/-] [+]flutter_tools doesn't support the wireless debugging style connections for iOS devices (for flutter run)[/+] on Jun 1, 2018
  6. added this to the milestone on Jun 1, 2018
  7. phumberdroz commented on Jun 1, 2018

    @phumberdroz
    Author

    100% correct

  8. cbracken commented on Jun 4, 2018

    @cbracken
    Member

    I suspect we'll need to apply patches to our integration with the libimobiledevice toolchain. IIRC, we intentionally disabled wifi debugging due to issues a couple of years ago. I'll see if I can dig up the issue(s) and x-ref them here then we can look at a fix. Tooling has improved significantly since then, so definitely worth another look.

  9. cbracken commented on Jun 4, 2018

    @cbracken
    Member

    #8309 is where I disabled this. #7233 and #8308 were a couple reports of issues with wifi debugging enabled.

  10. tonikami commented on Nov 24, 2018

    @tonikami

    @cbracken Any update on this?

  11. anderscheow commented on Feb 11, 2019

    @anderscheow

    We need this :(

  12. zoechi commented on Feb 11, 2019

    @zoechi
    Contributor

    The thumbs-ups should be on the initial comment to raise priority.

  13. 85 remaining items

  14. saviourdog commented on Nov 18, 2022

    @saviourdog
  15. edgarfroes commented on Nov 19, 2022

    @edgarfroes
  16. ahyangnb commented on Dec 5, 2022

    @ahyangnb
  17. jmagman commented on Dec 5, 2022

    @jmagman
    Member

    However, please PLEASE do not reply to this issue with "any updates?" or "me too" or other reasons why this feature should be implemented. You're adding noise to an issue with 50 participants and untold subscribers. And you're pushing out actually informative comments (like this one). Just hit it with a 👍.

  18. jmagman commented on Jan 19, 2023

    @jmagman
    Member

    #118826 was temporarily reverted.

  19. jmagman commented on Jan 20, 2023

    @jmagman
    Member

    #118104 is available on the master channel, and we would love some feedback!

    Setup

    1. Follow the instructions under "Steps to setup" in the Support iOS wireless debugging #118104 description. There's currently no way to set up wireless debugging from flutter, you need to do it from Xcode.
      Add feature to enable iOS wireless debugging from a flutter command. #118912
    2. Try flutter devices --device-timeout 5 / flutter run --device-timeout 5 etc. from the command line. You may need to adjust that timeout number up depending on your network.

    Caveats

    1. You'll need to add --device-timeout to your flutter commands, as networked devices take longer to discover. We're working on making this a better experience.
      iOS network device not available when doing flutter run #118109
      iOS network device not selected when running/debugging in VSCode #118113
    2. Because of the device timeout issue, when you Run from your IDE, it may not discover your wirelessly connected device before timing out. Try the workaround listed in Support iOS wireless debugging #118104 to pass in --device-timeout as args.
      VSCode launch.json example:
    {
      ...
      "configurations": [
          {
              "name": "my_app",
              "request": "launch",
              "type": "dart",
              "args": ["--device-timeout", "5"]
          },
          ...
      ]
    }
    
    1. There is no documentation for iOS wireless debugging yet. We will add it to the website when the feature is further along.
    2. Installing and hot reloading wirelessly over the network is much slower than over a USB tether. There's not much Flutter can do about that, it's the performance characteristics of Xcode/iOS.
    3. To run your app from Xcode and flutter attach, you must add --observatory-host=0.0.0.0 or --observatory-host=::0 as a launch argument in your Xcode scheme. This would also be true for running an add-to-app host app with an embedded Flutter module. See Support iOS wireless debugging #118104 for instructions.
    4. If Xcode can't find your device, then Flutter tooling won't be able to either. If Flutter isn't discovering your device, open Xcode > Window > Devices and Simulators > Devices and make sure you see the device is under connected with globe network icon, and Connect via Network is checked. If either isn't true then you'll have to play with the settings in Xcode until it shows up.
      211061613-9f6f145d-be97-4722-9d2c-f5deee316be5

    Please file new issues, including usability suggestions, as you see them. Thank you!

  20. AmitSonkhiya commented on Jan 30, 2023

    @AmitSonkhiya

    #118104 is available on the master channel, and we would love some feedback!

    Submitted feedback
    #119493

  21. added
    r: fixedIssue is closed as already fixed in a newer version
    on Feb 1, 2023
  22. jmagman commented on Feb 21, 2023

    @jmagman
    Member

    #118104 is available on 3.7.0-24.0.pre and higher on the beta channel. If you are trying to test this you must either be on the master or beta channels, it is not yet available in stable.

  23. github-actions commented on Mar 7, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  24. locked as resolved and limited conversation to collaborators on Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P2Important issues not at the top of the work lista: annoyanceRepeatedly frustrating issues with non-experimental functionalityc: new featureNothing broken; request for a new capabilitycustomer: crowdAffects or could affect many people, though not necessarily a specific customer.platform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versiontoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions