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

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.

I've got a slightly different problem but I think it's related. I'm trying to connect an iPhone 11 with iOS 17 to Xcode 15 and I get stuck on a message stating: Waiting to reconnect to iPhone. I've opened a bug: https://feedbackassistant.apple.com/feedback/13267950

I think this is also related to this new network only debugging architecture thingy.

Same problem here. I still got an SE 1st gen (iOS 15.7) and an XS Max (iOS 16.7.1) which I can use for fast debugging, but my brand new 15 Pro Max is slow as molasses (same app), whether I plug in the cable or not.

I am having the same situation.

Sometimes my app launches very slowly, and debugging is slow as well. I am always using USB cable, but I can unplug it and see debugger still works, which makes me think it's debugging wirelessly.

Sometimes it's fast, and I've observed that disabling USB cable immediately stops the debugging.

I would really like to work with the cable, because it was launching a couple of times faster than now.

I've tried disabling Wi-Fi and Bluetooth, and the app does not launch. I receive an error, works well when I am connected to Wi-Fi

The request to open "com.redacted.app.staging" failed.
Domain: IDELaunchCoreDevice
Code: 0
User Info: {
    DVTErrorCreationDateKey = "2023-10-16 16:37:11 +0000";
    IDERunOperationFailingWorker = IDELaunchCoreDeviceWorker;
}
--
The application failed to launch.
Domain: com.apple.dt.CoreDeviceError
Code: 10002
User Info: {
    BundleIdentifier = "com.redacted.app.staging";
}
--
The request to open "com.redacted.app.staging" failed.
Domain: FBSOpenApplicationServiceErrorDomain
Code: 1
Failure Reason: The request was denied by service delegate (SBMainWorkspace).
User Info: {
    BSErrorCodeDescription = RequestDenied;
    FBSOpenApplicationRequestID = 0xde7f;
}
--
The operation couldn’t be completed. The process failed to launch.
Domain: FBProcessExit
Code: 64
Failure Reason: The process failed to launch.
User Info: {
    BSErrorCodeDescription = "launch-failed";
}
--
The operation couldn’t be completed. Launch failed.
Domain: RBSRequestErrorDomain
Code: 5
Failure Reason: Launch failed.
--
Launchd job spawn failed
Domain: NSPOSIXErrorDomain
Code: 85
Failure Reason: Bad executable (or shared library)
--

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_isCoreDevice" = 1;
    "device_model" = "iPhone16,1";
    "device_osBuild" = "17.0.2 (21A350)";
    "device_platform" = "com.apple.platform.iphoneos";
    "dvt_coredevice_version" = "348.1";
    "dvt_mobiledevice_version" = "1643.2.4";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 7856;
    "operation_errorCode" = 0;
    "operation_errorDomain" = IDELaunchCoreDevice;
    "operation_errorWorker" = IDELaunchCoreDeviceWorker;
    "operation_name" = IDERunOperationWorkerGroup;
    "param_debugger_attachToExtensions" = 0;
    "param_debugger_attachToXPC" = 1;
    "param_debugger_type" = 3;
    "param_destination_isProxy" = 0;
    "param_destination_platform" = "com.apple.platform.iphoneos";
    "param_diag_MainThreadChecker_stopOnIssue" = 0;
    "param_diag_MallocStackLogging_enableDuringAttach" = 0;
    "param_diag_MallocStackLogging_enableForXPC" = 1;
    "param_diag_allowLocationSimulation" = 1;
    "param_diag_checker_tpc_enable" = 1;
    "param_diag_gpu_frameCapture_enable" = 0;
    "param_diag_gpu_shaderValidation_enable" = 0;
    "param_diag_gpu_validation_enable" = 1;
    "param_diag_memoryGraphOnResourceException" = 0;
    "param_diag_queueDebugging_enable" = 1;
    "param_diag_runtimeProfile_generate" = 0;
    "param_diag_sanitizer_asan_enable" = 0;
    "param_diag_sanitizer_tsan_enable" = 0;
    "param_diag_sanitizer_tsan_stopOnIssue" = 0;
    "param_diag_sanitizer_ubsan_stopOnIssue" = 0;
    "param_diag_showNonLocalizedStrings" = 0;
    "param_diag_viewDebugging_enabled" = 1;
    "param_diag_viewDebugging_insertDylibOnLaunch" = 1;
    "param_install_style" = 0;
    "param_launcher_UID" = 2;
    "param_launcher_allowDeviceSensorReplayData" = 0;
    "param_launcher_kind" = 0;
    "param_launcher_style" = 99;
    "param_launcher_substyle" = 8192;
    "param_runnable_appExtensionHostRunMode" = 0;
    "param_runnable_productType" = "com.apple.product-type.application";
    "param_structuredConsoleMode" = 1;
    "param_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "iphoneos17.0";
    "sdk_osVersion" = "17.0";
    "sdk_variant" = iphoneos;
}
--


System Information

macOS Version 14.0 (Build 23A344)
Xcode 15.0 (22265) (Build 15A240d)
Timestamp: 2023-10-16T18:37:11+02:00

Filed a report: FB13278689

This issue is so annoying. My whole team is falling behind because we upgraded our macs and phones. We need to be able to turn off Network mode. I don't understand why it would be locked on... It's been clear over the years that it's not very performant.

Same here. We are trying to test/debug a critical feature involving network (which obviously needs to be tested on losing/reconnecting wifi) and it is–as of now, writing this post–impossibile: even when launching with the device attached to USB the debugger crashes as soon as wifi is disabled. Honestly a little concerning that this was overlooked.

The same problem is here! Can't develop with my normal speed at all... Apple, bring fresh air back!

What worked for me is:

  1. Turn off WiFi on my phone then run the app. XCode can't connect to the phone over WiFi and is forced to use the cable for debugging.
  2. Once the app is running and debugging is quick again, I can turn WiFi back on and XCode continues to use the cable for debugging.
Accepted Answer

I've updated my devices to iOS 17.1 (21B5066a) today, and I've observed that if I first connect devices (I use both, iPhone and iPad) to the Mac, BEFORE launching Xcode, then the debugging works smoothly and app launch is much faster.

If I unplug and plug it back, when Xcode is already launched, and I build again, I end up having super long launch time and slow performance.

Try it on your end:

1. Plug device to your Mac first

2. Launch xcode

Cannot confirm if that's the case, but this solution worked for me and today was the first day since Xcode 15, that I've been working efficiently.

I cannot debug apps while connected to Cisco Secure Client VPN on Sonoma, Xcode 15 and iOS 17. This is an exceptionally narrow-minded change by Apple ignoring the fact that all big companies require VPN for daily work and most developers are working remotely now.

It is disgusting. And often can't connect to my iPad. I can't close WIFI of my iPad. Have no idea how to close it.

Same here... I've turned off the Mac and iPhone's wifi/bluetooth, restarted the Mac and Xcode, nothing works. This Xcode 15 is the buggiest of them all.

I also cannot debug apps locally on a physical device while my Mac is connected to a VPN via Cisco Secure Client on Ventura 13.6, Xcode 15 and iOS 17.

Same issue here, and beside the issues mentioned already, this is quite a pain of you have a number of potential devices to run on.

While previously devices were automatically switched when connected via cable, now I always have to select them in the menu. Which can be quite bothersome, if you have multiple similar devices.

Cable debugging was always way faster than remote debugging, and I really do not understand why Apple is fixing something that was not broken.

I also cannot debug apps locally on a physical device while my Mac is connected to a VPN via Cisco Secure Client on Ventura 13.6, Xcode 15 and iOS 17.Unbelievable

Same issue here, I also cannot debug apps on a physical device while my Mac and the device are both connected to a VPN. The Mac use on Sonoma 14.1, Xcode 15.0.1 and iOS 17.1.

Read all. Same problems here. Debug is really slow on certain operations if i keep the ipad's wifi enabled, simple breakpoints are really really slow. Turning off wifi on ipad is faster. The problem is that I have to debug some remote api :-/ I agree with the last post: that's unbelievable.

save problem what I met. Xcode has become a fat tool which made a bad taste now. Why we can not use cable debug not choose via network, we need alternative choice.

@eskimo Are there plans to revert this change? I have not seen any reference to this on the Xcode beta update notes. Between the VPN issue and speed of the debugger, I am spending an order of magnitude more time dealing with the reliability of my tools versus being productive.

@eskimo Been strugging for months with an abysmally slow debugger in Xcode 15, and only now realized that the always-on “Connect via network” causes this issue. So much time wasted waiting for Xcode. When I turn off Wi-Fi and Bluetooth on my iOS and iPadOS devices debugger works just fine, and works A LOT faster. I wish Xcode prioritized USB debugging over network or let me disable network debugging for my devices.

Just to add my name to the list, I'm facing the exact same issues when debugging on iOS 17/Xcode15.

The app freezes at launch for a long time, waiting for the debugger. Usage is affected as well, with all the most verbose actions taking a long time to display on terminal and being rendered on screen.

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