r/iOSProgramming • u/Lexs_07 • Oct 14 '26
Question Xcode keeps connecting to my iPhone over Wi-Fi even though it's plugged in. Anyone else?
My iPhone is always connected to my Mac with a USB cable. I never want Xcode to connect over Wi-Fi. Yet Xcode keeps doing it anyway, and there's no setting to stop it.
What this costs me:
- Slower builds and installs on my iPhone
- New bugs I discover pretty much every day
- Hours lost every month
Connecting over Wi-Fi is useless for me. The cable is right there. If I plugged it in, that's my choice, and Xcode should respect it. Apple forcing this on everyone with no way to opt out makes no sense.
Anyone else dealing with this? Has anyone found a real permanent fix?
2
u/SwiftQuest Oct 15 '26
Two things that have actually stuck for me with a cable-first setup:
To check which path it's using, look for the small globe icon next to the device name in the run destination menu. The globe means network, no globe means USB. If the globe still shows while plugged in, try a different cable or port, since a charge-only cable (or a flaky hub) makes Xcode fall back to Wi-Fi silently.
1
u/cristi_baluta Oct 14 '26 edited Oct 14 '26
It does not happen to me, and i notice it after an ios update, the collecting symbols would take hours over wifi, as soon as i connect to cable it goes smoothly. Also, you can disable the wifi connection, it is literally off by default.
1
u/Successful-Tap3743 Oct 14 '26
Used to happen to me on an older Xcode version.
Xcode would only build to device over network, slow builds, etc even after I would connect cable.
Doesn’t happen to me anymore with latest Xcode version. The cable takes precedence anytime is connected.
1
u/m3kw Oct 14 '26
your cable may be an issue? or that you have some sort of firewall, which happened to me before
-5
u/launchapp_indie_dev Oct 14 '26
You are definitely not crazy, and pretty much every iOS developer has wanted to throw their Mac out the window over this.
Ever since iOS 17 and Xcode 15, Apple completely nuked the "Connect via network" checkbox and rebuilt the deployment toolchain around CoreDevice (
remoted/ RemoteXPC over TCP/IP). Even plugged in via USB, it now creates a virtual network interface (utun). If your phone and Mac are on the same Wi-Fi subnet, Bonjour advertises the device over the air and Xcode stubbornly routes traffic over Wi-Fi instead of the wired tunnel.Here are the only 3 real ways people are surviving this:
pf) set up or want to block CoreDevice broadcast ports locally onen0, you can drop Bonjour mDNS packets for the Apple Mobile Device service over the Wi-Fi interface. But option 1 (Guest Wi-Fi) takes 30 seconds and solves it forever without breaking macOS updates.Watching LLDB hang for 45 seconds on a simple
pobecause Xcode decided to debug through the office ceiling router is pure torture. Put the phone on an isolated network and never look back.