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.

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

Could [data security type software] interfere with Xcode/the virtual network when an iPhone is connected via USB causing connection and slowness issues?

That’s certainly a possibility. In cases like this I recommend that you work with your IS department to try to isolate the cause. For example, you could set up a test Mac with none of your IS software installed, verify that Xcode works, then add your IS software one item at a time, repeating the Xcode test each time.

Share and Enjoy

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

All respect eskimo, but "working with your IS department" is not a feasible solution for those of us that work in large companies. Using a VPN is a very common requirement for corporate work, and intentionally breaking that workflow is a slap in the face to those of us in the corporate world that are passionate about iOS development.

I'm hopeful that Apple sees this and walks back this requirement.

To Apple devs/support/product: As it's been several months since this issue has been open and still gaining traction, how do we get the ball rolling here to get this addressed? Does your team not have enough bug reports/logs to work with? If so, please let us know and we can provide the needed artifacts. How do we, the corporate iOS dev community, escalate the importance of this issue to your product/business team?

If there are any traffic rules to config in VPNs to allow the connection to iOS devices, please let us know. There must be something Apple is doing internally to make this work with your corp VPN.

I have the same issue even on the latest Xcode and I'm just freelance dev working in coworking places or hotels. I have to keep turning off wifi (which is annoying and not a solution) on my phone to force using USB. On top of that I have to turn off my mullvad VPN on macbook so that xcode can then connect via USB. This whole thing drives me nuts and completely kills any enjoyment of coding in Xcode. Wish Apple listen to their dev community and just roll back previous way even for time being until their figure out what's wrong. Still I prefer to having control of forcing USB - this is the most reliable and fastest way especially if someone working on hotel wifi. WIFI should be only used as fallback if device is not connected by wire. Together with other issues in Xcode I have (debugger broken and I constantly I have to clean project to make it work) wastes too much of developer time...

I'm experiencing a similar issue when I plug my iPhone with iOS 17 into my MacBook Pro and build a run.

My app hangs on the launch screen for a long time (~10 seconds) then once the app UI shows up, it's unresponsive to touches for about 20 seconds.

If I turn wifi off on my iPhone while it's plugged in, it works as I expect it to work: fast build and run, quick launch screen, and instantly responsive once past the launch screen.

However, turning off wifi is not ideal, because if I don't have good cell service it's hard to test my app (which requires internet). Ideally I'd like to be able to build and run at plugged-in speeds when my iPhone is plugged into my computer, even when I have wifi turned on on the iPhone.

I have a test iPhone with iOS 16, and I have connect via network enabled for that device. That devices works as expected: when I have it connected via a cable, it builds and runs quickly, and is instantly responsive to touches when the app starts, like I'd expect. Even when I don't have a cable connected, it takes a little longer to install, but then it starts right up with quick launch screen, and responds to touches immediately, unlike on my iOS 17 device.

I don't have a VPN installed on my iOS 17 device or my MacBook Pro.

It would be great to be able to build and run at a normal speed on iOS 17 devices with wifi enabled again. Hopefully someone on the Xcode team will fix this issue soon! 🤞😢

If I disable Wifi and Bluetooth on the device and connect it to the MacBook via cable, it works fine. However, Apple engineers claim that it should use Cable over the Wifi debugging if it is already connected, which is not True. As soon as I turned Wifi & Bluetooth back on and reconnected my phone with cable, it again chose wifi, and Debugging became so painful. :(

Waiting a solution. This issue its really annoying.

Same thing here...since I started using Xcode 15.. debugging has been a nightmare. Really surprised this still hasn't been fixed, we are at 15.2 version now.

I just tried the solution for https://forums.developer.apple.com/forums/thread/744083 and this fixed the issue for me. Initial investigation and it doesn't seem to matter if I have flight mode on or off. Cable connection is working.

@eskimo This is likely to remain a more annoying problem on Vision Pro where binary sizes could be larger and there is no hardware connection on the consumer device. What's the right feedback categorization for requesting a purchasable connector?

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