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

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"

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.

When changing anything that impacts standard workflow, Apple should clearly state that at WWDC. I missed the Appleseed for IT presentation (if there was one), but was it mentioned there?

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 |-:

Now I think you have your answer: everyone is affected! When this was the case during the beta testing during the summer, I attributed this issue to the beta itself and although annoyed, ignored it hopping for the final release to fix it... I'm working with about 80 iOS devs in our team and EVERYBODY with iOS 17 devices can't deploy apps since our Macs are isolated on the network (stealth mode with VPN). My colleague had a call two days ago with someone at Apple after we reported that through our Apple Care Enterprise program. It has been escalated, but I wonder if that will help since it's a corporate decision... (And no, the issue is not the VPN providers as I've read Apple is replying to some customers)

I have done a lot of testing on an iPhone 15 Pro (not MDM managed) connected to my personal MacMini M1 (repeated deploy of the same app "NIPeekaboo" Apple sample code, never ran clean folder as I don't want compiling affecting the results):

  • When wifi is activated on the phone and not connected with cable, it takes in average 15.0" to deploy (median: 11.53")
  • When wifi is activated on the phone and plugged in with the USB-C cable, it takes 11.53"" to deploy and the median is 9.6". Sometimes I even get an error (timeout or "could not attached to device").
  • When I switch off wifi, it takes in average 5.03" to deploy the same app (median: 2.7"). (The first try got a "Preparing..." so it took 17", otherwise constantly about 2.6")

So clearly, as long as wifi is activate, with or without cable it takes 250% more time to deploy an app (9.6"-2.7"/2.7 x100).

Bored of:

  • "Message from the debugger: Xcode has killed the LLDB RPC server to allow the debugger to detach from your process. You may need to manually terminate your process"
  • "Timeout while connecting to remote device." (domain: com.apple.mobiledevice. Code: -402652910) -> Radar sent to Apple FB13246000.
  • "Browsing on the local area network for XXXXX, which has previously reported preparation errors. Ensure the device is unlock [of course it is!] ans attached with a cable or associated with the same local area network as this Mac [yes it is]. The device must be opted into Developer Mode to connect wirelessly [again, yes it is!]"

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).

Same here. With each update it took roughly 25 minutes to collect the symbols. Next time I'll switch wifi off to force debugging through the cable, I will certainly gain a factor 10 in transfer speed.

I hope my feedback with countless others will be sent to Apple for direct actions. I don't see any benefit for us developers to use debugging through wifi as it has been demonstrated being 250% slower than with cable on an iPhone 15 Pro. Hence please revert that "new debugging architecture" to one that is similar to iOS16's and its predecessors. As an engineer we use to say: why changing something that works? (Here I get the feeling Apple tries to force gathering information of the surrounding devices connected through wifi. Sorry if that's how I feel. As many have already express here: please give us the choice to activate the "connect via network". Don't force us.)

Same issue here since Xcode 15 iOS 17 device (I really hoped 17.0.3 would fix but it didn't).

Now I've got a problem of my app not installing when I'm running from Xcode. So I cannot recommend that my team upgrades until this is fixed, as we simply won't be able to code. Raise a bug FB13256031

same +1

+1

Same here... I've turned of macbook's wifi/bluetooth and iPhone's wifi/bluetooth but this did not solved the problem.

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