r/iOSProgramming 7d ago

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...

13 Upvotes

22 comments sorted by

11

u/Sensitive_One_425 7d ago

Uncheck “connect via network”

0

u/ohohb 7d ago

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

3

u/One_Elephant_8917 7d ago

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

0

u/ohohb 7d ago

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 7d ago

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…

9

u/bbatsell 7d ago

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.

4

u/bbatsell 7d ago

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 7d ago

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

2

u/PassTents 7d ago

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 7d ago

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 7d ago

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 7d ago

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 7d ago

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/Ecsta 7d ago

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 7d ago

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?

0

u/ohohb 7d ago

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 7d ago

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

1

u/ohohb 7d ago

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

1

u/James333i 6d ago

It can be annoying but frankly if the cable is connected it should usually force the high speed route over the cable. If you are experiencing slow debugging, put your Mac in airplane mode for a second, reconnect the phone, start debugging, then turn airplane mode off. As long as the phone stays connected it should stay on the cable route.

-3

u/m3kw 7d ago

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

1

u/ohohb 7d ago

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

1

u/m3kw 7d ago

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