JThora JThora - 10 months ago 481
Objective-C Question

Error: received error: [57] Socket is not connected - iOS 10

I just updated to Xcode 8 and iOS 10.

After creating a build, I'm running into an error which I think is contributing to some data not getting fetched.

I don't know where to go from here, but it appears to be related to http calls somehow. Either way, I don't like the looks of these errors and need to get to the bottom of things.

In the log I get:

[] nw_connection_write_close 9 Connection is not ready, sending error callback
[] __tcp_connection_write_eof_block_invoke Write close callback received error: [57] Socket is not connected

What do these errors mean and how might I go about finding where to look?

Are these error reports related to the depreciation of NSURLConnection as of iOS 9?

Answer Source

We got the same error. The problem was that we used background without having the key in the info.plist file (see image below).

enter image description here

After we fixed this, the error message disappeared. Instead we got a lot of log messages, which you can turn off (see Hide strange unwanted Xcode 8 logs).

I hope this helps.