NSURLConnection timing out on iOS8

[亡魂溺海] 提交于 2019-12-01 19:20:55

Well, I have found a fix for this issue.
The app had basic authentication in place for each REST webservice. This means that we used to get an authentication challenge for each webservice where we sent the credentials back with the challenge. I changed this to send the credentials in the request header (in encrypted format) as a header field.

I am not sure how this was working in iOS 7 and not in iOS 8. But this seems to have fixed my problem :).

If you are streaming data to the NSURLConnection make sure you write new data exactly once when the stream event hasSpaceAvail has arrived - I found I had connection issues when I had wrong handling of the hasSpaceAvail event.

do not write more than once in response to the event

do not write zero times (or else you won't get another hasSpaceAvail event)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!