Hi There,
I built a VPN using NEPacketTunnelProvider and created the UDP session using createUDPSessionToEndpoint:fromEndpoint:(https://developer.apple.com/documentation/networkextension/neprovider/1406004-createudpsessiontoendpoint?language=objc).
When I tested on an iPhone with sim card installed, everything works fine with or without a wifi connected.
However, when I removed the sim card from the iPhone, even if my wifi is still connected, I can no longer connect to the backend. And the session above falls into the failed state every time. I disabled the VPN, my phone can open any website as normal.
I tried to reboot my iPhone multiple times, delete the app and reinstall multiple times, no luck. As soon as I inserted my sim card into the device, the app starts working fine again.
I built a VPN using NEPacketTunnelProvider and created the UDP session using createUDPSessionToEndpoint:fromEndpoint:(https://developer.apple.com/documentation/networkextension/neprovider/1406004-createudpsessiontoendpoint?language=objc).
When I tested on an iPhone with sim card installed, everything works fine with or without a wifi connected.
However, when I removed the sim card from the iPhone, even if my wifi is still connected, I can no longer connect to the backend. And the session above falls into the failed state every time. I disabled the VPN, my phone can open any website as normal.
I tried to reboot my iPhone multiple times, delete the app and reinstall multiple times, no luck. As soon as I inserted my sim card into the device, the app starts working fine again.