Xcode 15, how to uncheck "Connect via network" for physical device?

This thread has been locked by a moderator; it no longer accepts new replies.

In Xcode 15, the checkbox for "Connect via network" is grayed out and cannot be unchecked. However, I would like to disable it because debugging via network is too slow for me.

Does anyone have an idea how I can disable this?

Answered by DTS Engineer in 771548022

Last week Apple published TN3158 Resolving Xcode 15 device connection issues that addresses this topic in depth.

IMPORTANT While this technote is associated with changes in macOS 14.4 and Xcode 15.3, both currently available as release candidates, installing these builds will not automagically fix all device connection problems. Read TN3158 for more backstory on this.

Because I want to separate the pre- and post-TN3158 discussion of this issue, I’ve locked this thread. If you have more to say on this subject, I’ve created a new thread for that discussion, namely Xcode 15.3 device connection issues.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Pre-TN3158 bugs

FB13198191 FB13203790 FB13204677 FB13208687 FB13210513 FB13211128 FB13231882 FB13246000 FB13256031 FB13267950 FB13278689 FB13350507 FB13380011 FB13474705 FB13513987 FB13601388

Revision History

  • 2023-03-05 Made major changes to reference TN3158.

  • 2024-02-09 Added more bug numbers.

  • 2024-01-09 Added more bug numbers.

  • 2023-11-09 Added more bug numbers.

  • 2023-11-08 First posted.

Boost

Would love a solution here as well !

I have to disconnect my iPhone from the wifi if I want to debug, because even if plugged, debugging seems to prioritize network over usb. It also seems to slow down all my network connections on my phone which is a bummer.

I observed a clear regression from beta 8, it was way faster on the prior iOS 17 / Xcode 15 betas.

Same, it's absolutely killing me how slow app launches and debugging are.

same here, Copying shared cache symbols for 20 minutes because force using of "Connect via network"

+1

There are two parts to this:

  • Why is that checkbox greyed out?

  • Why is debugging slow?

The answer to the first is straightforward: iOS 17 has new debugging infrastructure such that all debugging goes over the network. That’s not the same thing as going over Wi-Fi. If you have the device attached via USB, the network requests will go over a virtual network interface running over USB.

Consider this test:

  1. On an iOS 17 device, go to Settings > Wi-Fi and Settings > Bluetooth and disable both.

  2. Attach the device to your Mac.

  3. With Xcode 15, create a new test project from the iOS > App templates.

  4. Select your device as a run destination.

  5. Choose Build > Run.

You can install and debug the app just fine. This wouldn’t work if it were using Wi-Fi.


Which brings us to the the second issue: Why is this slow? This seems to only affect some folks. If it were affecting everyone, there’d be a lot more activity on this thread |-:

I suspect that something above your setup is causing the network to misbehave. For example:

  • It could be that Xcode’s connection over the USB virtual network interface is failing, resulting in the traffic going over Wi-Fi.

  • Or perhaps something is just slowing everything down.

As a first step I recommend that you repeat my test above. Are you able to debug on a device with Wi-Fi disabled? If not, that’s evidence for my first theory.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Yes perhaps something is just slowing everything down. But I don't know that something, and this problem is pain. We need option to disable "Connect via network"

24

it is the critical problem

florian_buerger wrote:

Disabling WiFi & Bluetooth on the phone (or disabling WiFi on the Mac) does seems to solve this for me, but isn't a long-term solution.

I neven suggested it was. Rather, it’s a useful diagnostic test.

Reported FB13203790

Thanks.

Reading that bug it seems that your issue is that things run very slowly. In that case, I recommend that you retest this on a ‘clean’ machine, one with a freshly installed copy of macOS and Xcode and nothing else.

I suspect that’ll work, which then suggests that there’s something about the network configuration on your main Mac that’s causing this issue. You can use that as a basic of your investigation. For example, your main Mac might have some sort of firewall that’s causing this issue [1].

OTOH, if you still see this problem on a clean machine, that’s more interesting, suggesting that the issue is with your wider network environment.

[1] Possibly even the Apple firewall!


jvc_canfieldsci wrote:

I can't debug on a device connected by wire because my VPN requires disabling the local network to maintain our ISO certification.

That makes things challenging, but at least it’s an explanation as to why things are failing.

I recommend that you file a bug about this with the details of your specific situation, including the VPN client you’re using and as as many details about how it’s configured as your IS folks are will to share.

Please post your bug number, just for the record.

In the meantime, I encourage you to discuss this with your IS folks. It’s possible that they can work out some sort of exception for you.


iTarek wrote:

We need option to disable "Connect via network"

As discussed above, that’s not really possible with the current architecture. I recommend that you follow the same path as florian_buerger, that is:

  • File a bug.

  • Runs tests to determine if there’s something about your network configuration that’s causing this.


Fedy wrote:

Yes, it is critical

That’s not really actionable feedback. Please read through the above and see if your situation matches one of those listed there. If not, please post more details.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks for getting back to me.

Reading that bug it seems that your issue is that things run very slowly. In that case, I recommend that you retest this on a ‘clean’ machine, one with a freshly installed copy of macOS and Xcode and nothing else.

I don't have the resources to do a clean install on a separate machine to investigate this, sorry.

I suspect that’ll work, which then suggests that there’s something about the network configuration on your main Mac that’s causing this issue. You can use that as a basic of your investigation. For example, your main Mac might have some sort of firewall that’s causing this issue [1].

OTOH, if you still see this problem on a clean machine, that’s more interesting, suggesting that the issue is with your wider network environment.

This happens on my home wifi, which is a standard Eero mesh system. The only custom network configuration I can think of is:

  1. IPv6 is disabled,
  2. I am using AdGuard home as my local DNS server. I tested with AdGuard disabled, same result.
  3. No firewall is set up, either in Eero or on my Mac

It worked much better in early Xcode 15 betas, but I don't recall when it became unusable.

1. IPv6 is disabled

How did you disable IPv6? On just the Wi-Fi interface? Or system wide?

Disabling IPv6 system wide is really not a good idea these days; lots of stuff relies on it.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I'm experiencing super slow installs on Xcode 15. I have nothing between me and the router and the phone, yet installing an app that would take a minute at most before is now stuck after 15 mins.

The changelog seems to suggest turning off WiFi on mac and on iPhone forces to switch to USB connection but not even that is working.

https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes issue 109466074

Is there any other workaround to disable network debugging? I simply cannot launch any app right now.

Hi there,

I can confirm that running development apps on an iPhone connected via USB is now much slower than before.

Xcode stays in the "Installing <app> on <device>" state for roughly 5-10 seconds on average, whereas previously this was almost instant.

This massively slows down development, since this is an action I run several times a minute, especially when doing UI work.

(I can also confirm that the "Connect via network" checkbox is checked and disabled.)

Versions: macOS Version 13.6 (Build 22G120) Xcode 15.0 (22265) (Build 15A240d) iOS 17.0.1 (21A340)

Hi! Filed feedback FB13208687, also experiencing very slow debug runs on iPhone. Turning Wifi / Bluetooth "fixes" the issue, however it's quite strange workaround to turn off wifi and turn it back on for almost every app launch.

Filed Feedback FB13198191.

More observations that might help to narrow down the issue:

  1. Using Instruments to start the app, it runs smoothly, and the app remains responsive with or without cable; at least, I cannot tell the difference easily. (can somebody else try this as well?)
  2. Using Xcode to start the app in iOS 17.0.2, the following are observed:
    • If Wi-Fi is enabled, the app is slow at everything: lanching, response to touch, and debugging; it doesn't seem to care if I connect the cable or not
      • Bonus: if I unplug the cable during debugging, Xcode debugging is not disconnected (fail safe or was never going through the cable in the first place?)
    • If Wi-Fi is disabled and the cable is plugged in, the app is almost as responsive as it is in the instrument, and debugging is very fast as well
  3. Using Xcode to start the app in iOS 16.7 (make sure to turn on Network debug), the following are observed:
    • If the cable is plugged in, debugging is very fast. If the cable is unplugged during debugging, Xcode will disconnect from the device
    • If the cable is not plugged in, debugging is very slow. You can plug the cable in during debugging, but the app will still be unresponsive since it does not hot-swap the debug section to the cable connection

Please provide information with network requirements or return the option to disable «Connect Via Network»

FB13210513

Xcode 15, how to uncheck "Connect via network" for physical device?
 
 
Q