问题
I have used ASIHTTPRequest a thousand times. This times is no different or special, but... when I start a request in the simulator (iOS 5.0) all is fine, when I start one on the iPad connected during development all is fine, but when I burn an AdHoc build and load it onto the iPad, this one particular ASIHTTPRequest starts, but never completes or fails. Well, I presume it is starting. Any ideas?
BTW, the same app uses ASIHTTPRequest is several other places, and all work fine.
回答1:
Apparently there is a bug on ASIHTTPRequest. If you turn off optimization for ASIFormDataRequest.m ASIHTTPRequest.m everything seems to work.
You turn of optimization by selecting the target project, select the file in "Compile sources" section of the "Build Phases" tab; and add -O0 (capitol O zero).
Everything is explained here
来源:https://stackoverflow.com/questions/9934231/asihttprequest-begins-but-never-ends