iOS6 large downloads time out

2019-04-12 00:50发布

问题:

It seems like all large downloads timeout on iOS6 using ASIHTTPRequest.

Does anybody know of any forks that have updated this library for iOS6. I love this library and really do not want to have to switch.

EDIT: This issue is not specific to ASIHTTPRequest. Upon testing FSNetwork, MKNetwork, AFNetwork, and NSURLConnection they all fail.

A sample project can be downloaded from here: https://github.com/BLamy/NetworkTest

It must be built to an actual device running iOS6 (I used an iPad2 unsure if that makes a difference).

回答1:

I was having the issue with uploading. The solution I found was to set the cachePolicy of the urlRequest to NSURLRequestReloadIgnoringLocalAndRemoteCacheData. (There were a few other networking bugs I encountered too which only occurred on iPhone 5.)



回答2:

Are you getting the timeouts on apps that are build against iOS SDK 5.x running on iOS 6 (ie your old builds. If you don't have access to an old build, how about the one you have existing on the App Store?).
Or are your symptoms ONLY occurring for new builds with Xcode 4.5 against iOS SDK 6.0? If the latter, and you really don't want to give ASI up, (and you don't want to implement any of the new iOS functionality), then you could consider building against iOS SDK 5.x instead of 6.0. See my answer here for instructions.

If you need to implement new iOS 6 features, or iOS 6 actually broke your implementation of ASIHTTP (built against iOS SDK 5.x), then you should consider other networking options. It's been over a year since Ben advised developers to seek other options, with good reason.



回答3:

iOS6 has serious problem related to Wi-Fi. We use ASIHTTPREQUEST. We find small file downloads work fine, in some case large file(10MB above) downloads too, but after the download, we keep the device idle for a minute, again you try to add operation to the queue. The app crashes.

Initially, we got many Network unavailable alerts, though the internet was available. Later, we changed the Wi-Fi setting security mode WAP to NONE. Then for sometime we did not find the network unavailable error, as well downloads were ok..

However, when the server itself becomes loaded, the connectivity and download becomes to halt at mid of the progress. I have noticed this behavior, even in native SDK facebook app.

The simulators work very fine, even the devices like iPad1, iO5.0, iPhone 4 with iOS5.0, the never crash.

I sum up..Apple half baked the iOS6.0, may be the iOS6.0 is suitable only for iPhone 5,the new antenna structure. Unless Apple fix the iOS6.0 issue may not be solved.