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

Adding my voice here as well to report that Xcode 15 makes debugging sessions slow and painful, and that I wish a future release makes the debugging experience good and snappy.

On top of that, unplugging the device while a debugging session was on has triggered the nastiest iOS bug I've ever seen (twice):

  1. The UI of the debugged app is unresponsive.
  2. I can't go back to the Home Screen (the gesture does not work).
  3. I can swipe down the notification panel, but can't switch to any other app from there.
  4. I can swipe down the control center, but can't switch to any other app from there.
  5. I can take a screenshot, but can't switch to any other app from there.
  6. The standard shutdown (click buttons on both sides) does not work.

Basically I'm completely stuck on a unresponsive app, without any possibility to do switch to any other app.

The only solution was the very-little-known reboot gesture (short press on the sound up button, short press on the sound down button, long press on the button on the other side). This means that I had to find a computer until I could google for the solution and bring my phone back to life. And you know how phones are important nowadays.

Really not a pleasing experience, Xcode 15 :-/

Xcode15 is like shit, the experience is too bad

I have been struggling with this for months, its been like this on betas as well. I feel that there has been filed enough feedback that this could be prioritized.

Development for us has completely stopped. We need the network in order to control musical instruments. Worse, I cannot roll back my Xcode version because I am running Sonoma and Xcode 14.2 cannot be installed? Please fix.

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.

groue wrote:

On top of that, unplugging the device while a debugging session was on has triggered the nastiest iOS bug I've ever seen

Yikes! Please do file a bug about that, per my advice above. I’m glad you found a way out of this problem. Thanks for sharing that here.

Share and Enjoy

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

I can live very well with the solution that I first connect the iPhone and then start Xcode. Then the data is transferred via USB. As long as it stays that way, I'm happy.

I'll put my 2 cents in here.

This has drastically hurt development for countless people along with my own company. Install times are very slow and causing many headaches.

On top of that the following issues have shown up for me personally.

  • Debugging offline functionality is completely broken.
  • The apps now have to be verified by the internet before you can run them on the install device. This makes development impossible for anyone without an internet connection. The simulator is not a fallback when using hardware specific features.

Due to just those two points creating new features for a client specific app has come to a crawl. And those of us who work remotely and may lose internet are left in a state where we cannot work.

This needs to be reversed in a timely manner. There is no excuse in my mind as to why Apple would do this. The only thing I can think of is they plan on taking away the port all together, which I think is a terrible idea. It looks like many enterprise developers who are required to work under a VPN are blocked as well. Can't imagine that will look good for Apple.

Per @eskimo's comment above, I've "piled on" by submitting a Feedback Assistant bug report (FB13350507). Reiterating that I do not see how this is not an extremely high priority issue and I think that it is unreasonable to expect developers to continue working with these issues for months on end. Most notable issues stemming from this for myself and my team are:

  • Debugging has become extremely slow. Breakpoints take 30-45 seconds to populate with information (such as variables in the current scope). Executing a command via LLDB takes a similar amount of time while Xcode is waiting to execute the command on the device. "Debug View Hierarchy" takes a very long amount of time as well.

  • It is not possible to debug an app while a VPN is running.

  • Our test devices will periodically lose connection or time out. This makes debugging a long running app session difficult if not impossible.

  • Possibly unrelated, but we've noticed a spike in issues relating to code signing failures which necessitate the entire app to be reinstalled (which is particularly frustrating because Replace Container functionality is broken - see FB13253099).

None of these apply if the device is connected via USB.

+1 running apps on my phone has become such a painful and frustrating experience. I'd love to be able to disable the network connection again.

It is basically unusable. Im working on a hybrid app at the moment. RN with some parts being native modules. Given that metro also is handled throught wifi, things that would have taken a couple of seconds are now taking a couple of minutes. How is this considered to be an update? Just because of this, I have to give different estimates on when my tasks will be completed. Apple, please fix this nonsense ASAP.

I was hitting this problem and found Xcode kept trying to connect to other devices that it had used previously, even though I wasn't current debugging with them.

eg, it would try and connect to my personal phone and watch over the wifi network even though I wasn't using them and I had the test device connected via usb. As a workaround i tried two things (not sure about the second one, but it all seems pretty good at the moment).

First thing I think helps the most was go into Window | Devices And Simulators and set the Run Destination for all devices to Never and then go back to just the devices u want to debug to Auto or Always - hopefully this will stop Xcode trying to connect simultaneously to anything it has ever used.

I've also got both ethernet and WIFI running (can't get air drop to work over ethernet, despite Apple saying iOS 17 it does work, and the ethernet interface is much faster generally). So I've changed the priority of the services in System | Network so that ethernet is above WIFI

These two changes seem to help a lot and for me it's back to what it used to be

Basically unusable and unable to do any work on device anymore.

Debugging on Xcode 15 is extremely slow and completely unusable. It's kind of a shame. There is no way to force cable-only debugging. Disabling WiFi and Bluetooth on macOS and iOS does not solve the problem.

Filed feedback FB13380011.

Debugging is slow for me, like others reported, but this Feedback report specifically addresses when Xcode 15 completely hangs while launching an app for debug. It might shed some light on things, and includes a stack trace for Xcode.

This full freeze of Xcode (and the iOS app while connecting to the debugging process) occurs about once every dozen launches. The iOS app being launched hangs on the Launch Screen. Happens across projects, even new ones. When it occurs, Xcode has to be force quit and restarted; same for the iOS app. Then, things work again for awhile.

Hopefully this helps!

Just tried it on Xcode 15.1 Beta 3 (15C5059c) and iOS 17.1.1 (21B91), can confirm this is still an issue.

Let's strap in and be prepared to deal with this for quite a long time. Meanwhile, I want to offer a workaround that works for me 100% of the time, although judging by what we have been seeing in this thread, no workaround posted so far works for 100% of the people 100% of the time.

Background of my workaround:

  1. I noticed that when Xcode 15 and iOS 17 work together, they are pretty persistent in using the network as the debug method; as @eskimo said, the cable should be considered a virtual network, but in practice, Xcode 15 always prioritize my Wi-Fi
  2. The persistency is so prevalent, to the point that even when I turn off all networks on my iOS device, Xcode still tries to hunt the iOS device down over Wi-Fi
  3. Continuing from point 2, I found the only way to guide the stubborn Xcode to reconsider how it should connect to iOS is to quit Xcode and start it from scratch

Steps to workaround:

  1. Start your regular debug session with a cable plugged in. Hopefully, a new version of Xcode already works for you without issue
  2. If it doesn't work, take your iOS device off the network and start debugging again. This can be turning off Wi-Fi, entering airplane mode, etc.
  3. When step 2 fails, quit Xcode completely, restart Xcode, and start debugging. We are leveraging Xcode's stubbornness to our advantage in this step; it should be trying a cable connection relentlessly now
  4. If your device has a backup network, such as cellular, it should be working now, and you can feel free to turn your network back on. If your device does not have a backup network, it will display an error message saying you need to connect to the internet to authorize the App, move to the next step
  5. If your device does not have a backup network, e.g. a Wi-Fi-only iPad, make sure you see an error message complaining about network authentication when trying previous steps; once you see the error message, you will know for sure that Xcode is trying to debug over the cable. You can safely turn the Wi-Fi back on and continue your debug session.

More data points for Apple debugging this issue:

  • In my setup, I connect my MacBook to a HP TB Dock G2 (https://support.hp.com/us-en/product/details/hp-thunderbolt-dock-g2-with-combo-cable/21816261), my iOS devices does not connect to my mac directly, they connect to it via the dock.

deverlof wrote:

Can you point more precise than "Xcode Release Notes"?

My point was that:

  • We don’t make official announcements here on DevForums.

  • If we do have anything official to say about this, the place to look for that would be the Xcode Release Notes.

So, if you’re being affected by the issue, I encourage you to monitor the Xcode release notes for updates. Then again, that’s nothing new (-: The Xcode release notes always make for an interesting read.

ps Sorry about not responding earlier. When you reply in the comments I’m not notified. It’s best to reply as a reply. For this and other tips, see Quinn’s Top Ten DevForums Tips.

Share and Enjoy

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

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.

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.

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

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"

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.

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