cloudmine/cloudmine-ios — pull request #16 by conradev (2012-06-26 17:21:36+00:00)
Title: Replace ASI with Foundation networking

Request building
------------------------

Request building was easily swapped in-place to build `NSURLRequest`s instead of `ASIHTTPRequest`s. See commit dd6789fe1c for most of the grunt work.

Request execution
----------------------------

This involved a bit more work, but was relatively straightforward. `ASINetworkQueue` was replaced with `NSOperationQueue`. Requests are now queued with `[NSURLConnection sendAsynchronousRequest:queue:completionHandler:]`. The only thing that involved some work was porting the code in the handlers, as `ASIHTTPRequest` has a separate success/failure handler, whereas `NSBlockOperation` does not. See commit 51c3881969 for the early grunt work. As error propagation was merged in along with the rest of the develop branch (832aa48e98) the handlers matured to handle errors better.

Kiwi
------

The unit tests for CMWebService were greatly streamlined with the newer `KWCaptureSpy` (4a28e6ab8b).

Reachability
------------------

Reachability *was* on this branch, but I moved it to a separate `reachability` branch, because suspending the queue brings up a new set of issues, and could cause the application to hang. Considering the developer can now handle errors accordingly, Reachability isn't essential for the library to function in bad network situations. Reachability is not a change that should be added in this pull request, at least.