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

This thread has been locked by a moderator.
  • 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.

  • +1

Apple Recommended

  • Can you point more precise than "Xcode Release Notes"? I'm unable to find anything related in the changelog from "Xcode 15.1 Beta 2 Release Notes" or "Xcode 15.0.1 Release Notes"

  • What if Apple "keeps this professional" and does not take such radical decisions that affects hundreds of thousands of people. Loading apps on device and debugging is extremely slow, and I've lost hours of works because of this. Guessing by the comments here, tons of feedback has been received by Apple, even from the beta stage, yet Apple released this crawling Xcode.

  • Using and debugging with Xcode is now so pain in the *** that I seriously consider using another tool and Apple answer is not an answer !

Replies

Answered in https://stackoverflow.com/questions/77135232/checkmark-connect-via-network-in-physical-device/77506622#77506622

Get an Application Firewall such as LuLu and disable all connections for Xcode.

Post not yet marked as solved Up vote reply of Fedy Down vote reply of Fedy

I had this issue and posted here earlier. I thought Apple rolled something out that fixes this, as I've not had this in a few weeks now. Currently running Version 15.0.1 (15A507) iPad 10.5 Pro iOS 17.1.1 (21B91). Not sure what changed to me, but debugging over USB is back to regular speeds and even wireless debugging is fast now. Not sure what happened so I expected all the recent messages here to be the same :/

My iPhone 15 Pro annoyed me by always connecting to Xcode automatically. This worked for me in getting of this device from the automatic perspective of Xcode:

Be sure the device is not connected with a USB cable. In the Devices and Simulators window, you should have some kind of a round "network" icon to the right of the device's name.

Right-click on the device and choose Unpair Device from the menu.

At least in my case, the iPhone 15 Pro disappeared from the Xcode sidebar and didn't appear again upon restarting Xcode.

When I actually wanted to connect this device to work with it, I connected it with a USB-C cable and Xcode worked perfectly with it.

Your mileage may vary.

  • I meant to write:

    This worked for me in getting rid of this device from the automatic perspective of Xcode

Add a Comment

Same, Xcode debugging on iOS 17 device is unusable. Works ok on older iOS devices though. - Apple, fix this.

Post not yet marked as solved Up vote reply of timt Down vote reply of timt

How can we test offline functionality now? I used to just switch to airplane mode to mimic loss of network and then disable airplane mode again to be back online. What happens now, is that I loose the connection to the debugger and the console output, when doing so. It took me a while to even understand, that it is not my apps fault, that the connection to the debugger keeps on dropping and the apps gets killed, as if it would crash, but without any crash logs... Unfortunately I do not have enough hair left, which I could pull out over this issue.

I am not even talking about the annoyance, when waiting for the deugging session to finally start.

I am not able to do my work properly and haven't found a way around it yet, does someone have some sort of "trick" to debug offline mode?

How can we test offline functionality now?

Try this:

  1. Turn on Airplane Mode.

  2. Run your app from Xcode.

  3. Turn off Airplane Mode.

  4. Run your test as you did before (that is, do some networking, turn Airplane Mode on, make sure your app responds properly, turn it back off again, and so on).

This works because, when Airplane Mode is on, Xcode is forced to use the USB network interface in step 2, and it sticks with that interface throughout the debugging session.

Obviously this is less than ideal, so I’d appreciate you filing a bug about this case too. Please post your bug number, just for the record.

Share and Enjoy

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

  • works

  • Hi @eskimo, is that problem solved in Xcode 15.1 - RC (15C65) brand new version? I couldn't find any info regarding that issue.

  • Thank you so much for your help, @eskimo Very much appreciated. While it works at first, unfortunately the connection still drops after a while, even if I started debugging in flight mode. :-( The app is terminated, so I can not even re-attach it to the debugger, as the app session is terminated and this the app is restarted. But even after restarting the app and trying to attach it to the debugger Xcode stays for ever in "Waiting to attach to AppName on iPhone" mode.

I have the same problem, the application will just not install on the device. It seems to work if I disable the Wifi and Bluetooth on the iPhone but as others have said this is not really a solution. I don't understand why the checkbox that would (probably ?) fix the issue is greyed out in XCode, what is the point of displaying it in the UI if we are not allowed to use it ?

Do we have any updates? Besides the two issues mentioned by @florian_buerger

Why is that checkbox greyed out? Why is debugging slow?

I'm also seeing an issue where debug session take a long time to configure the device and sometimes I get errors that I will attach once I get a screenshot of them.

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.

  • created feedback to apple refer FB13474705

  • Thanks filing FB13474705.

Add a Comment

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.