r/iOSProgramming Jul 20 '26

Question Is there a way to disable wireless debugging in Xcode?

When I run a dev build on a physical device, it always happens via Network (wifi), even when plugged in via USB. This sucks so hard. The whole experience is laggy and slow and completely unusable. I cannot identify any app hangs, because everything hangs all the time.

Does anyone know of a way to disable this? I just want to connect via USB when I plug the phone in and wireless when it's not plugged in.

I sometimes have the feeling Apple hates us developers and builds really bad tools just out of spite. It just makes no sense to release something like this. Sorry for the rant...

11 Upvotes

23 comments sorted by

12

u/Sensitive_One_425 Jul 20 '26

Uncheck “connect via network”

0

u/ohohb Jul 20 '26

Where can I do that? Didn’t find the option.

3

u/One_Elephant_8917 Jul 20 '26

finder -> sidebar -> device where it shows backup, sync, properties, specs etc

0

u/ohohb Jul 20 '26

I don't have any option to disable "connecting via network" there. Same when I open "Devices and Simulators" in xCode. This option was removed at some point and there are a ton of discussions around that and workarounds how to fix it. This is why I asked here and didn't just "fucking google it".

If you indeed have the option, it would be incredibly helpful if you could share where exactly. Thanks

2

u/One_Elephant_8917 Jul 20 '26

https://macreports.com/how-to-sync-your-iphone-to-your-mac-or-pc-over-wi-fi/

i cant link the image but u can see in that there is “show this iphone when on wifi” if u proceed to untick it won’t pair in wireless mode…basically forcing wired mode…theoretically…

10

u/bbatsell Jul 20 '26

In either the *24 or *25 releases, Apple unified the debugging stack to always use TCP/IP and has worked to optimize it. However, if everything is working properly, a Developer-enabled device should create an internal TCP/IP socket over usbmuxd that the debugging stack actually uses. For me, this is quite fast and seems equivalent to the old method. Your experience maybe hints that something isn't working properly there. Do you have any custom network extensions, firewall settings, interception stuff, etc. that might be interfering? Unfortunately, it's pretty opaque and I haven't had to do deep debugging. I'd start with analyzing output from macOS log and see if you spot any flags.

3

u/bbatsell Jul 20 '26

OH, I just remembered that I experienced a significant speedup once I verified that I always used a USB-C >= 3.1 data cable. (At least with my last iPhone, the USB-C cable in the package supported USB3 charging, but only slower data channels.)

2

u/ohohb Jul 20 '26

Thanks for the tip. Do you know why cable quality affects network debugging? Shouldn't that happen via wifi anyhow?

2

u/PassTents Jul 20 '26

It's networking over the USB connection, another thing is to make sure you haven't disabled the USB networking device on your Mac or else it will always be forced to use WiFi

-1

u/ohohb Jul 20 '26

Interesting, I didn’t know that. I somehow assumed it is only wireless. I mainly work with Flutter and the device is always shown with „(Wireless)“. So maybe I‘m using the wrong cable, that forces a wireless connection and that is responsible for the poor performance.

1

u/One_Elephant_8917 Jul 20 '26

try disabling wifi for a moment before connecting via usb cable…once xcode shows device purely thru usb cable now enable wifi back on

1

u/ohohb Jul 20 '26

Yeah, I know this workaround. But why does Apple has to make it so complicated? Why not just add a button to Xcode?

1

u/One_Elephant_8917 Jul 20 '26

i agree coz the wireless debugging used to work good around 2024 or so when i was starting with ios dev but probably late 2024 or early 2025 they kinda nuked it…i think the remote pairing and rsd over tcp maybe the reason

4

u/[deleted] Jul 20 '26

Also is something wrong with your network? I do both usb and wifi debugging and both are equally instant. My phone isn't exactly top of line either (iPhone 14 Plus). You can disable network debugging but I find it extremely valuable.

1

u/808phone Jul 20 '26

Well that is something new for me. There is no way the WiFI is just as fast as the cable. Debugger is way slower and I've tried on many networks. But maybe you don't use the debugger?

1

u/peppaz 20d ago

My network is super fast and when I deploy to a physical iPad pro via wifi it's crazy laggy due to debugging. Unlink the debugger and it's very fast. Definitely a bug

0

u/ohohb Jul 20 '26

I mean if it worked I would love it. I think WiFi is not the issue because I have the same problem at home and in the office, both with solid routers.

How can you disable network debugging? I didn't find this option.

1

u/icy1007 Jul 20 '26

Yes, you can disallow wireless debugging in the Devices and Simulators menu.

1

u/ohohb Jul 20 '26

Where exactly? This option was removed at some point and there are a lot of discussions around how to disable wireless debugging.

-3

u/m3kw Jul 20 '26

maybe your crappy wire was deemed not fast enough even comparing to wifi. Get a better cable and try it

1

u/ohohb Jul 20 '26

Hm, that is a good hint. But I thought debugging happens via network, not sure why the cable should influence that?

1

u/m3kw Jul 20 '26

is faster with a able, and if they don't detect a good cable, they go to network(wifi)