How to connect Iphone real device wirelessly without using usb

I can be able to connect the iphone wirelessly by removing the lighting cable.

but in some cases, if the phone is getting disconnected with appium to re-initiate the session, someone need to connect through usb physically to make the connection. Then only we can be achieve wireless connection, how to avoid this dependency by directly connecting the phone wirelessly

Looking forward :slight_smile:

Hi everyone,

Could someone help me out with iOS wireless connectivity in Appium?

Here’s my setup and what’s happening:

  1. Both iOS device and Mac are connected to the same 5GHz Wi-Fi network.

  2. Wireless debugging in Xcode works perfectly — WebDriverAgent is installed successfully on the iOS device (tested over both wired and wireless).

  3. However, when I try to start a session in Appium Inspector, I get the following error:
    “There’s no device identified with the specified UDID.”

  4. My goal is to connect the iOS device wirelessly with Appium to run automated test cases.

  5. Versions:

    • Xcode: Xcode 16.4

    • iOS: 18.1.1

    • Appium: 2.15.0

Observations:

  • idevice_id command works fine only with USB connected (returns UDID correctly).

  • xcrun xctrace list devices doesn’t list the device with the “(Wi-Fi)” tag.

  • Xcode detects and interacts with the device wirelessly.

  • Appium fails to identify the UDID wirelessly.

  • Tried connecting with device IP address, and it works — launches apps on both simulator and real device.

Desired Outcome:
I want Appium to establish a wireless session with my iOS device (no USB) and run WebDriverAgent + tests successfully.

Capabilities Used:

{

“platformName”: “iOS”,

“automationName”: “XCUITest”,

“deviceName”: “iPhone”,

“udid”: “”,

“wdaHost”: “”,

“wdaLocalPort”: 8100,

“xcodeOrgId”: “”,

“xcodeSigningId”: “”,

“updatedWDABundleId”: “com.facebook.WebDriverAgentRunner”,

“useNewWDA”: false,

“noReset”: true,

“connectHardwareKeyboard”: true,

“wdaLaunchTimeout”: 60000,

“wdaConnectionTimeout”: 60000

}

Question:
If anyone has faced this issue — especially on iOS 18.1.1 — could you share what additional setup or configuration helped Appium recognize the device wirelessly?

I don’t believe this is officially supported.

However, there are some additional steps listed here that might help:

CAVEAT: Although there are posts that talk about running iOS test over wifi, in none of those posts have I seen any reference to running Appium Inspector over wifi. May be a limitation, I don’t know.

Hi wreed ,
Thanks for the response, I’ll look into it and get back once i find the solution to iOS test over WIFI.

Hi wreed,
I have found a way to do the wireless iOS debugging ,
Appium inspector flow in (WIFI) :
Appium Inspector
↓ (HTTP)
Appium Server
↓ (HTTP over WiFi)
URL (WDA on iPhone)
↓ (XCUITest APIs)
iOS UI Elements
Appium Inspector in (USB):
Appium Inspector
↓ (HTTP via localhost)
Appium Server (on Mac)
↓ (WebDriverAgent proxying via USB)
usbmuxd → 127.0.0.1: ⇆ iPhone (WDA running on device)
↓ (XCUITest APIs)
iOS UI Elements

Now , when your device is connected through the USB/Lightning , the connection is established between the Appium and real device through the (`instruments`, `xcrun xctrace`) , but in my case the UDID is not available is the USB when the cable is unpluged . so in order to establish the UDID to appium i connected the mobile initially and then disconnected the cable so the port forwarding will be taken care by the ‘webDriverAgentUrl‘ . There is a direct connection to device with Installed WDA and sends commands Directly
Capabilities :
{

“platformName”: “iOS”,

“appium:automationName”: “XCUITest”,

“appium:deviceName”: “”,

“appium:platformVersion”: “”,

“appium:udid”: “”,

“appium:webDriverAgentUrl”: “”,

“appium:preventWDAAttachments”: true,

“appium:shouldUseSingletonTestManager”: false,

“appium:xcodeOrgId”: “”,

“appium:xcodeSigningId”: “”,

“appium:updatedWDABundleId”: “com.facebook.WebDriverAgentRunner”,

“appium:noReset”: true,

“appium:bundleId”: “com.apple.Preferences”

}
Summary

  • Connect once via USB to register UDID, If UDID is present then no worries.

  • Start WDA on the iPhone (ensure it’s reachable via Wi-Fi) and check in Xcode for ‘connect via network‘.

  • Use webDriverAgentUrl in capabilities to connect directly over Wi-Fi/Network.

Hope this might be helpful , Thanks.

1 Like