iPhone 14 pro iOS 16.4
第一次请求 出错,无法连接
2023-04-10 10:15:13.652836+0800 xxx[56687:3154364] 请求失败-----Error Domain=NSURLErrorDomain Code=-1009 "似乎已断开与互联网的连接。" UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x281e43c30 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_NSURLErrorNWPathKey=unsatisfied (Denied over Wi-Fi interface), interface: en0[802.11], ipv4, dns, _kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <86498641-D292-42F4-8BBF-686D1D79EA49>.<2>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <86498641-D292-42F4-8BBF-686D1D79EA49>.<2>"
), NSLocalizedDescription=似乎已断开与互联网的连接。, NSErrorFailingURLStringKey=https:// 你的api, NSErrorFailingURLKey=你的api, _kCFStreamErrorDomainKey=1}
-------
2023-04-10 10:15:13.653316+0800 xxxxx[56687:3154663] Connection 4: received failure notification
2023-04-10 10:15:13.653340+0800 xxxxx[56687:3154663] Connection 4: failed to connect 1:50, reason -1
2023-04-10 10:15:13.653352+0800 xxxxx[56687:3154663] Connection 4: encountered error(1:50)
2023-04-10 10:15:13.656967+0800 xxxxx[56687:3154663] Task <C5BB853A-4B34-4BD1-8154-9ED5EAAD642A>.<3> HTTP load failed, 0/0 bytes (error code: -1009 [1:50])
2023-04-10 10:15:13.657326+0800 xxxxx[56687:3154663] Task <C5BB853A-4B34-4BD1-8154-9ED5EAAD642A>.<3> finished with error [-1009] Error Domain=NSURLErrorDomain Code=-1009 "似乎已断开与互联网的连接。" UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x281e96dc0 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_NSURLErrorNWPathKey=unsatisfied (Denied over Wi-Fi interface), interface: en0[802.11], ipv4, dns, _kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <C5BB853A-4B34-4BD1-8154-9ED5EAAD642A>.<3>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <C5BB853A-4B34-4BD1-8154-9ED5EAAD642A>.<3>"
), NSLocalizedDescription=似乎已断开与互联网的连接。, NSErrorFailingURLStringKey=https://你的api, NSErrorFailingURLKey=你的api, _kCFStreamErrorDomainKey=1}
2023-04-10 10:15:13.658121+0800 xxxx[56687:3154663] Connection 5: received failure notification
2023-04-10 10:15:13.658143+0800 xxxx[56687:3154663] Connection 5: failed to connect 1:50, reason -1
2023-04-10 10:15:13.658160+0800 xxxx[56687:3154663] Connection 5: encountered error(1:50)
2023-04-10 10:15:13.658685+0800 xxxx[56687:3154656] Task <9A881215-B5AF-48BE-A5B5-618E081D830B>.<4> HTTP load failed, 0/0 bytes (error code: -1009 [1:50])
2023-04-10 10:15:13.658812+0800 xxxx[56687:3154656] Task <9A881215-B5AF-48BE-A5B5-618E081D830B>.<4> finished with error [-1009] Error Domain=NSURLErrorDomain Code=-1009 "似乎已断开与互联网的连接。" UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x281ebe010 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_NSURLErrorNWPathKey=unsatisfied (Denied over Wi-Fi interface), interface: en0[802.11], ipv4, dns, _kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <9A881215-B5AF-48BE-A5B5-618E081D830B>.<4>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <9A881215-B5AF-48BE-A5B5-618E081D830B>.<4>"
), NSLocalizedDescription=似乎已断开与互联网的连接。, NSErrorFailingURLStringKey=你的api, NSErrorFailingURLKey=你的api, _kCFStreamErrorDomainKey=1}
<AppDelegate.mm : 551> -[AppDelegate application:didRegisterForRemoteNotificationsWithDeviceToken:]
2023-04-10 10:15:13.677743+0800 xxxx[56687:3154364] 获取的deviceToken {length = 32, bytes = 0x8592b4e5 d828a977 cc86afc3 ad7c3d3d ... bfe64228 71560a74 }
别的手机号系统未发现这个错误,
iOS 16前,在你没有点击“允许网络访问”时,在didFinishLaunchingWithOptions 中请求是可以,16以后,只有在点击允许网络访问后,才能进行网络访问、