diff --git a/src/add-to-app/debugging.md b/src/add-to-app/debugging.md index 717eac29249..043f92c323a 100644 --- a/src/add-to-app/debugging.md +++ b/src/add-to-app/debugging.md @@ -62,3 +62,52 @@ Select the device on which the Flutter module runs so `flutter attach` filters f [debugging functionalities]: {{site.url}}/testing/debugging + +### Wireless debugging + +You can debug your app wirelessly on an iOS or Android device +using `flutter attach`. + + +#### iOS + +On iOS, you must follow the steps below: + +
    +
  1. + +Ensure that your device is wirelessly connected to Xcode +as described in the [iOS setup guide][]. + +
  2. +
  3. + +Open **Xcode > Product > Scheme > Edit Scheme** + +
  4. +
  5. + +Select the **Arguments** tab + +
  6. +
  7. + +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. + +Check the box that says 'connect via network' from the devices and simulators page + +
  8. +
+ +#### Android + +Ensure that your device is wirelessly connected to Android Studio +as described in the [Android setup guide][]. + +[iOS setup guide]: {{site.url}}/get-started/install/macos#deploy-to-ios-devices +[Android setup guide]: {{site.url}}/get-started/install/macos#set-up-your-android-device diff --git a/src/assets/images/docs/development/add-to-app/debugging/wireless-port.png b/src/assets/images/docs/development/add-to-app/debugging/wireless-port.png new file mode 100644 index 00000000000..c41032c6482 Binary files /dev/null and b/src/assets/images/docs/development/add-to-app/debugging/wireless-port.png differ diff --git a/src/get-started/install/_android-setup.md b/src/get-started/install/_android-setup.md index 47c86fe87f9..8a3dd10f25a 100644 --- a/src/get-started/install/_android-setup.md +++ b/src/get-started/install/_android-setup.md @@ -26,6 +26,9 @@ you need an Android device running Android 4.1 (API level 16) or higher. 1. Enable **Developer options** and **USB debugging** on your device. Detailed instructions are available in the [Android documentation]({{site.android-dev}}/studio/debug/dev-options). + 1. [Optional] To leverage wireless debugging, enable **Wireless debugging** + on your device. Detailed instructions are available in the + [Android documentation]({{site.android-dev}}/studio/run/device#wireless). 1. Windows-only: Install the [Google USB Driver]({{site.android-dev}}/studio/run/win-usb). 1. Using a USB cable, plug your phone into your computer. If prompted on your diff --git a/src/get-started/install/_ios-setup.md b/src/get-started/install/_ios-setup.md index 17e779faf65..040abd8595f 100644 --- a/src/get-started/install/_ios-setup.md +++ b/src/get-started/install/_ios-setup.md @@ -86,7 +86,35 @@ and an Apple Developer account. If your app is using Flutter plugins, you will also need the third-party CocoaPods dependency manager.
    - +
  1. + +To set up physical device deployment in Xcode, +connect your device to the USB port on your +computer. +
  2. +
  3. + +[Optional] To leverage wireless debugging, ensure that +your device is on the same network as your computer +and that the device has a set passcode. + +While the device is attached, open **Xcode > Window > Devices and Simulators**. +Select your phone, and check **Connect via Network.** +For more details, check out +[Apple's documentation on pairing a wireless device with Xcode][]. + +Once the network icon appears next to the device name, +you can unplug your device from USB. + +Sometimes it takes longer to find network devices. +If you don't see your device listed when using `flutter run`, +try extending the timeout: `flutter run --device-timeout 10`. + +For additional help troubleshooting, +check out [Apple's Developer Forums][]. For setting up +wireless debugging with `flutter attach`, +checkout [Debugging your add-to-app module][]. +
  4. @@ -186,3 +214,6 @@ or clicking the Run button in Xcode. [Xcode account add]: {{site.url}}/assets/images/docs/setup/xcode-account.png [Apple Silicon Mac]: https://support.apple.com/en-us/HT211814 [Developer Mode]: https://developer.apple.com/documentation/xcode/enabling-developer-mode-on-a-device +[Apple's Developer Forums]: {{site.apple-dev}}/forums/ +[Debugging your add-to-app module]: {{site.url}}/development/add-to-app/debugging/#wireless-debugging +[Apple's documentation on pairing a wireless device with Xcode]: https://help.apple.com/xcode/mac/9.0/index.html?localePath=en.lproj#/devbc48d1bad \ No newline at end of file