[network.framwork] Lost debug connection when try to force connection to cellular and on/off mobile network icon

Hi, i got a weird issue. my app forces cellular connection using network. everything is ok but I lost the debug connection when I try to change the mobile network.

Step to reproduce:

  1. I tried to force tcp connection to cellular network via Network using this :

    let params = NWParameters(tls: options) params.requiredInterfaceType = .cellular

  2. Tap to change status mobile network icon (on -> off or off -> on) on iOS

  3. Debug app killed on my phone

  4. I got popup message in Xcode : "Lost connection to the debugger on “iPhone”. "

Even my IPhone device icon still in the Xcode build bar.

iOS: 14.6

Do you have any idea?

It sounds like your app crashed in a way that broke the debugger. That’s kinda weird.

Does this reproduce if you run the app from the Home screen? If so, does that generate a crash report?

Share and Enjoy

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

[network.framwork] Lost debug connection when try to force connection to cellular and on/off mobile network icon
 
 
Q