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"

16

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

Caching symbols take about 25-30 minutes with iPad Pro attached over USB-C. (So process started over WiFi then I attached cable but nothing changed, still very slow).

My 300 Mb project (with 4-5k asset files) uploads to device in 1-2 minutes with cable attached.

Debugging and running apps on a device become insanely slow!

Feedback filed FB13211128

Thanks for filing all those bugs.

As I learn more about this issue I have an update on the diagnostic info needed to investigate these problems. If you want to help out here, please do the following:

  1. Make a note of the UDID of your device. You can see this in the Devices and Simulators window under Identifier.

  2. Reproduce the problem.

  3. Make a note of the time.

  4. Grab a Core Device diagnostic log with this command:

    % xcrun devicectl diagnose
    
  5. Trigger a sysdiagnose log for both your Mac and the target device. For information about how to do that, see Bug Reporting > Profiles and Logs.

  6. Attach all of the above to your bug report.


florian_buerger wrote:

It was disabled in network settings of the Eero system, I didn't change anything on the Mac or iPhone.

Ah, OK, that’s unlikely to affect things. The system services that rely on IPv6 typically do so because of its link-local capabilities.


ospfranco wrote:

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

Thanks for sharing that; I’d forgotten about it.


DenTelezhkin wrote:

Filed feedback FB13208687

Thanks.

however it's quite strange workaround

Yep. It’s safe to say that this isn’t the developer experience we want you to have )-:


thinkingBanana wrote:

Filed Feedback FB13198191.

Thanks.

More observations that might help to narrow down the issue:

Interesting. Thanks for sharing.


Fedy wrote:

FB13210513

Thanks.

or return the option to disable «Connect Via Network»

As discussed above, that’s not really possible with the current architecture.


den73 wrote:

Feedback filed FB13211128

Thanks.

Share and Enjoy

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

+1

I'm having some of these same issues.

What I have noticed is that debugging while connected to USB-C works great, however, it seems that once I physically disconnect and try to run on a simulator or another device, Xcode attempts to connect back to my default device over the network and totally gets stuck.

Once it gets into this state, Xcode was stuck "Indexing Open Quickly Content" which prevented me from killing Xcode. Had to kill 9 it.

Also, the "Connect via network" option is grayed out so I can't disable this functionality. All I want is debugging over USB-C most of the time.

@eskimo People running React Native can't turn off Wifi on the iPhone. Metro, a fundamentally integral and important part of running/debugging React Native applications, needs Wifi enabled when connected via Cable in order to function.

My observations with Xcode 15 and iOS 17, 17.01, and 17.02:

Background: We recently completed development of a complete re-write of our App. The App is lean by design and has an installed size of 32 MB for a Debug Build. Release builds have an installed size of 9 MB, and the IPA size (compressed) is just 3.2 MB.

  1. Launching an App from Xcode 15 to an iOS 17 device now takes minutes. The longest timed launch was a little over 3 minutes. Even then, the App would become unresponsive to taps and froze temporarily any time the keyboard was summoned. Whether the device was connected by a physical cable or not had no bearing on these symptoms.
  2. Using the debugger and have it actually stop at a breakpoint took an inordinate amount of time.
  3. Using a device with iOS 16.6 or 16.7, and keeping everything else the same (and using a cable), results in a 3-4 second launch. This is typical for the App.
  4. Different Macs with varying configurations all exhibit the same exact behavior: things work great on iOS 16 but come to a screeching halt on iOS 17. This leads us to believe there is something fundamentally broken in iOS 17. Perhaps it's the new architecture that Quinn mentioned, but that is just conjecture.
  5. As an organization, we have halted the use of iOS 17 devices for development, and reverted to iOS 16 devices for the time being. Being a small outfit, we simply can't afford the time (and patience) needed to develop and debug on iOS 17 devices at this time.

Lastly, we started experiencing App launch issues towards the end of the Xcode 15 and iOS 17 beta period, the initial betas did not exhibit these issues.

This post may not be a constructive one, but i wanted to share my experience and hopefully a temporary workaround (the use of iOS 16) for an issue so many of us are facing. i do plan on opening a feedback using the steps Quinn outlined as soon as my schedule permits.

mungbeans wrote:

People running React Native can't turn off Wifi on the iPhone.

OK. But I didn’t suggest turning off Wi-Fi as a permanent solution, or even a workaround. Rather, that suggestion was part of a diagnostic test. If you want to run that diagnostic test and your main app requires Wi-Fi, create a new test project from one of Xcode’s built-in templates.


nokey4 wrote:

i do plan on opening a feedback using the steps Quinn outlined as soon as my schedule permits.

I’m looking forward to it. And thanks for sharing your experience.

Share and Enjoy

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

Same here.. Debugging in device is not usable anymore since Xcode 15 + iOS 17. Send a feedback.

For me, Xcode is hanging on "Attaching to AppName on DeviceName" and "Installing AppName to DeviceName". Nothing changes, no matter how long I wait. And it was working yesterday! I didn't change anything.

HeGe2 wrote:

Send a feedback.

Does that mean you did file a bug? Or that you plan to?

Either way, see this post for advice on how to file your bug. And 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"

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