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

On an AnyConnect VPN setup, disabling Bluetooth, WIFI, and Data has no effect unless you disconnect the VPN. Making this thing exclusive to the network is crazy. What if all this traffic leaves the local network before reaching its internal point-to-point target because of how a given network is configured? USB 3+ and Thunderbolt 2+ are more reliable in the form of a cable connection. If it's not broken, don't change it.

The new debugger also has issues with the simulators. After 5 or 6 plus app launches, the sim will black screen and not load the app or sometimes when you close the app via Xcode, the sim will black screen and refuse to launch. Killing the simulator disconnects some debugger processes and then you're able to resume running on the sim.

The new debugger also has issues with the simulators.

I’m not sure what’s going on there but it’s likely a separate issue from the one being discussed here. Please start a new thread about it. Tag it with Debugging so that I see it.

Share and Enjoy

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

Xcode 15.1, iOS 17.2 – no updates. The "Connect via network" is still unable to uncheck.

I cannot connect my iPhone and debug with XCode 15.1, it's always say "Previous preparation error: An error occurred while communicating with a remote process.. The connection was invalidated." Apple please fix it.

I am blocked. In manage run destinations I get "Waiting to reconnect to myiPadName" "Previous preparation error: An error occurred while communicating with a remote process.. The connection was invalidated."

I have tried (I didn't restart mac of iPad after each of these, not sure if that would make a difference)

  1. switching off wifi and ble and using a usb cable.
  2. switching on airplane mode and using a usb cable
  3. switching on wifi and removing the usb cable. (the global circle icon is present in the dropdown list in xcode)
  4. I created a hotspot from my phone and used this on my mac and the iPad, no joy
  5. I tried another iPad with steps 1) to 4)

first iPad iOS 17.2, second iPad 17.1.1 xcode : 15.1 macOS : 14.2

I have tried xcode beta 15.2 not all the options but looks to be the same.

The only other option that I can see if to either reinstall xcode on a clean machine or restart after each each test. Not sure what else to do. And being blocked is not a great feeling. Any option is a good option at the moment.

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.

If the new architecture of iOS17 is entirely network based, then there is actually a reason to explain this behavior, it requires a usb shared network to be established when using a usb connection to Xcode, however on the iPhone a usb shared network conflicts with wifi, you can only use one of them at a time and wifi has a higher priority. When you manually turn off wifi, the usb connection still doesn't automatically become a usb network, because your Mac is connected to wifi at the time, and when the Mac's wifi is turned off, the usb connection officially becomes a shared usb network, and takes significantly less time to transfer, and shows the shared network logo on the iPhone.

This is just a hypothesis, but at least for me, Xcode worked fine after the usb shared network was established.

Same here. as @_lilpit says, "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."

emas. I don't understand, so many people are concerned about this bug, why don't the authorities solve it.

I had slow app startup times (12s) on my iPad when debugging (via cable). My iPhone, which I did not want to use for debugging, was connected via Wifi. After I connected also the iPhone, startup time on the iPad went down to 3s. After disconnecting the iPhone, startup time stayed on 3s.

I have a tidbit that may prove helpful - I'm also suffering from this super slow-no UI feedback xcode debugging over wifi issue, BUT I've also found that my Mac is somehow accessing the internet even when I'm not explicitly connected to wifi or bluetooth, so... yeah, I don't know what logs you'd want but I'm down to provide them given any instructions.

Hey, I also exp. an issue with “ERR_NETWORK_CHANGED” and from what I read here at Chromium (https://bugs.chromium.org/p/chromium/issues/detail?id=1498910), this issue seems the root cause. It makes all my Chromium-based/Electron-apps pretty unusable from time to time when this happens.

I have this issue since a few weeks, and it's crazy how often it appears. My MacBook has none of this issue, nor my Windows PC, so it must be related to this. I once clicked to allow connecting over network to not always dock my iPhone and able to actually walk around and show my device without carrying my laptop with me.

Here is my Feedback ID where I just created a new ticket as well: FB13513987

I also do not like this feature. I'm not concerned about whether it is slow or not; I just want to control which device is a debug device now. I have multiple Apple devices around me, and I want to ensure that the one plugged in via USB will be the default target, not my personal iPhone nearby.

Disabling wifi doesnt work...

Verify that the Developer App certificate for your account is trusted on your device. Open Settings on the device and navigate to General -> VPN & Device Management, then select your Developer App certificate to trust it.

An Internet connection is required to verify the trust of developer "..." This app will not be available until verified.

This is basically a complete blocker when will this be fixed?? Previous version of xcode was fine why was this change forced?

My (company supplied) MacBook has lots of software on it for data security type things i.e. like detecting the browsers are not connecting to malicious web sites etc.

One of them is called Forecepoint, I've long suspected it of causing lots of hassles with internet usage.

Could software of this type interfere with Xcode/the virtual network when an iPhone is connected via USB causing connection and slowness issues? @eskimo

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