Hi, We have developed a VPN app, we recently received feedback from some iOS 16 users that VPN connections cannot be established, We found that PacketTunnel's network request fails, but requesting the same site in the main app works fine, the Wireless Data settings for the application are set to allow WLAN & Cellular Data. Network requests use NSURLSession.
After analysis, we think this may be a problem caused by network permissions on the App extension, and it returns to normal after restarting the phone.
Seems to only appear on Chinese version devices, iOS 16.0, iOS 16.0.2 versions have similar feedback.
Error log:
Error Domain=NSURLErrorDomain Code=-1009 "似乎已断开与互联网的连接。"
unsatisfied (Path was denied by NECP policy), interface: pdp_ip0[lte], ipv4, ipv6, expensive
ERROR: <PacketTunnelProvider:(454)> API request failed: Error Domain=NSURLErrorDomain Code=-1009 "似乎已断开与互联网的连接。" UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x1047674c0 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_NSURLErrorNWPathKey=unsatisfied (Path was denied by NECP policy), interface: pdp_ip0[lte], ipv4, ipv6, expensive, _kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <6602B486-A9E4-4B73-9D56-5BC4F49F5495>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <6602B486-A9E4-4B73-9D56-5BC4F49F5495>.<1>"
), NSLocalizedDescription=似乎已断开与互联网的连接。, NSErrorFailingURLStringKey=***, NSErrorFailingURLKey=***, _kCFStreamErrorDomainKey=1}