19

In Xcode I'm able to connect iOS device wirelessly but not in android studio. Can anyone know how to do in android studio if it is possible?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
jaspreet Singh
  • 298
  • 1
  • 3
  • 16

3 Answers3

18

Not yet, but it will be implemented soon. Take a look at this issue.

alectogeek
  • 890
  • 1
  • 6
  • 20
9

You sure can! On Flutter 3.10. Note: it requires XCode (more details).

https://docs.flutter.dev/add-to-app/debugging#wireless-debugging

  1. Ensure that your device is wirelessly connected to Xcode as described in the iOS setup guide.

  2. Open Xcode > Product > Scheme > Edit Scheme

  3. Select the Arguments tab

  4. Add either --vm-service-host=0.0.0.0 for IPv4, or --vm-service-host=::0 for IPv6 as a launch argument

    You can determine if you’re on an IPv6 network by opening your Mac’s Settings > Wi-Fi > Details (of the network you’re connected to) > TCP/IP and check to see if there is an IPv6 address section.

xcode

Mathis wrote a great write-up with more details if you get stuck.

Kyle Venn
  • 4,597
  • 27
  • 41
  • 1
    You can check my article if you want fancy images to guide you through the process : https://medium.com/@mfqscode/how-to-debug-wirelessly-on-flutter-with-an-ios-device-5ea1ff55adf4. I cover ios setup + flutter setup – Mathis Fouques May 12 '23 at 10:56
  • Nice write-up! I'll link it in the answer. – Kyle Venn May 14 '23 at 20:37
1

Yes, you can run a Flutter app wirelessly on an iOS device using a process called wireless debugging. This process was introduced in Xcode 9. Wireless debugging allows you to deploy and debug your apps on an iOS device without a USB cord. Here's how you can setup wireless debugging:

  1. First, make sure that your iOS device and your Mac are on the same Wi-Fi network.

  2. Connect your iOS device to your Mac using a USB cable.

  3. Open Xcode, then go to the Window menu and choose Devices and Simulators.

  4. Select your device from the Discovered list on the left side of the window.

  5. Check the box that says "Connect via network." A globe icon will appear next to your iOS device in the sidebar, indicating that it's available for wireless debugging.

  6. Disconnect your device from USB. Now, you can deploy and debug apps wirelessly.

You can verify this by running a Flutter app from your terminal with the command: flutter run

If your device is set up correctly, it will appear in the list of available devices.

Please note that if your device or Mac goes to sleep, they might lose network connection, and you might need to reconnect your device to your Mac with a USB cable to re-enable network debugging.

Ali Moussa
  • 11
  • 3