Contents

Flutter iOS Wireless Debugging

Flutter can debug on a physical iPhone over Wi-Fi: same network as the Mac, enable Connect via network in Xcode, then flutter run -d <device id>. Pair once over USB first; if the firewall blocks the session, allow it.

Setting Up Wireless Debugging

Connect to the Same Network

Ensure the Mac and iPhone are on the same Wi-Fi network.

Enable Network Debugging

  • Enable Developer Mode on the phone in Settings > Privacy & Security > Developer Mode.
  • Open Xcode and connect the iPhone.
  • Select the device in Window > Devices and Simulators.
  • Choose Connect via Network.
  • Find the Network debugging information displayed in Xcode.

Run App

  • Open a terminal and navigate to the Flutter project directory.
  • Use the flutter run -d <device id> command, replacing <device id> with the information from Xcode’s Network debugging details.
  • Watch the app launch on the iPhone.

Refreshing the device list in Android Studio also shows the iPhone.

Troubleshooting

  • Verify Network Connection: Double-check if both devices are on the same Wi-Fi network.
  • Confirm Network Debugging: Ensure “Connect via Network” is selected in Xcode and the device ID is correct.
  • Firewall Settings: Sometimes firewalls can interfere. Check firewall settings and grant Flutter access if necessary.

Resources