I keep stumbling on a weird issue on my devices running iOS 10.
I got an app still using the old (deprecated) NSURLRequest / NSURLConnection APIs for networking, and my requests randomly fail for a reason that seems unclear to me.
These failures produce some system logs though :
 nw_connection_read 18 Connection is not ready, sending error callback  nw_connection_write_close 18 Connection is not ready, sending error callback  __tcp_connection_write_eof_block_invoke Write close callback received error:  Socket is not connected
It only happens on my devices running iOS 10 (10.2 beta included), the same app running under iOS 9.3 runs fine, and the weirdest thing is that the bugs only seem to occur when the device is connected on a Wifi network. I never encountered the issue when using a cellular connection yet. I tested it on 3 different Wifi networks at home and at work, and I can confirm that the issue happens on all 3 networks.
Also, the issue happens on my app built with the iOS 9 SDK, and recompiling it with the iOS 10 SDK doesn't solve the issue.
I tried creating a test project that would send the requests to the same server by using the newer NSURLSession APIs, but the issue is still happening, so it would seem like it's not a bug related to NSURLSession.
Have you guys encountered a similar issue on iOS 10 ?
I tried doing some research but have found very few threads talking about this, with people saying they resolved it with the weirdest fixes, like fixing the App capabilities in Project Settings or adding some missing Privacy Reasons in Info.plist. ( http://stackoverflow.com/questions/39480988/error-received-error-57-socket-is-not-connected-ios-10 )
Obviously, none of it solved this yet in my case.
Thanks for your help !