问题
iOS11 devices are occasionally issue this error: "HTTP load failed (error code: -1005 [1:54])."
The app is connecting to https json web service and while its in the foreground everything runs smoothly (timer is doing the web service calls), but from time to time (cannot replicate the issue all the time) this error occurs when the app is moving from background to foreground.
Whenever app is moving to background I invalidate the timer performing the calls, and whenever app is brought to foreground the timer is initialised again - everything runs smoothly most of the time.
My JSON parsing function says no data has been received.
Cannot replicate this issue in Simulator.
ATS is allowing Arbitrary Loads and I've also configured my domain as Exception Domain.
Using XCode9.3 and iPhones with iOS11 and up, and no clue what might be causing this.
--- update ---
I also find these errors usually nearby the error mentioned earlier:
"dnssd_clientstub read_all(6) DEFUNCT"
"nw_resolver_create_dns_service_locked DNSServiceCreateDelegateConnection failed: ServiceNotRunning(-65563)"
--- end of update ---
Thank you in advance.
BR, JC
来源:https://stackoverflow.com/questions/49151429/ios-11-and-xcode-9-3-http-load-failed