When I run a program on my iPhone through xcode, and turn off the network,xcode will break the link。I connected my iPhone by USB-C line。
xcode had some problems on the Internet
I need to see more information about this to understand your situation better. That includes the Xcode version and iOS versions involved, as well as whether the device was connected to Xcode using your network, even though you have a USB cable connected. You can tell if the device is using a network-based connection by looking in Window > Devices, and looking for a networking globe icon next to your device.
For additional tips on creating Apple Developer Forums posts, see tips on writing forums posts.
— Ed Ford, DTS Engineer