Kudos to Mattt Thompson and the whole community of collaborators that put work into this release. AFNetworking makes a large part of my job making iOS apps a joy, and I can't wait to start working with latest round of changes and features in this new release (including support for NSURLSession in iOS 7).<p>That said if you haven't used AFNetworking before, I highly recommend doing so. Start with the AFHTTPRequestOperation class(es). And if you're writing an API wrapper of any kind, definitely check out subclassing either AFHTTPRequestOperationManager (for iOS 6) or AFHTTPSessionManager (for iOS 7).<p>Edit: Derp, I was wrong — AFHTTPClient's been split-up. Thanks for calling me out, @dcaunt; I've updated my remarks.<p><a href="https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-2.0-Migration-Guide#afhttpclient--afhttprequestoperationmanager--afhttpsessionmanager" rel="nofollow">https://github.com/AFNetworking/AFNetworking/wiki/AFNetworki...</a>
"Response serializers can also be chained, using AFCompoundSerializer"<p><i>Does a dance.</i><p>"AFNetworking 2.0 introduces AFURLSessionManager, which manages an NSURLSession object based on a specified NSURLSessionConfiguration object, and conforms to <NSURLSessionTaskDelegate>, <NSURLSessionDataDelegate>, <NSURLSessionDownloadDelegate>, and <NSURLSessionDelegate>. Convenience methods to inspect and cancel tasks are provided, as well as block-based callback properties for each delegate method"<p><i>Does another dance</i><p>It just gets better and better.
This library is arguably the most used library on CococaPods, and has been serious refresher for me in terms of what a network API should look like. It was during a discussion about what AFNetworking did that kickstarted CocoaDocs so that everyone has easy access to documentation for any Obj-C library.<p>To bring it back to CocoaPods, Mattt's push towards making sure that CocoaPods works well with AFNetworking and vice-versa has had a huge benefit on the community in terms of both showing what the new standard for OSS on Obj-C should look like and what the best practices for writing apps should be. And I applaud him for this.<p>I think AFNetworking is the library that has most raised the sea level that we all now work at. Thank you Mattt. If I didn't already owe you a beer, I do so doubly now.
I've used AFNetworking pre-iOS7 and it's been a godsend. However with the advent on NSURLSession, I don't see the need to have a 3rd party wrapper to do network calls anymore. Although I admire Mattts' efforts, I'm still not convinced using AFNetworking 2.0 is more effective than using NSURLSession directly.
Very cool. Also, check out and sign up for Matt's link (at the bottom of the page) for his upcoming OReilly book - AFNetworking the definitive guide.
I've been playing around with it for the part couple of weeks or so since his original announcement and it is really awesome - if you aren't already using it, or you're using AFNetworking 1.x in your apps I highly recommend using 2.0 - the serialization and session stuff has made the API not only more streamlined, but helps create really nice code.
This may be the unpopular opinion, but I would never use this. It adds to much complexity in my opinion. To many things that can break. Sure it gives you a lot of stuff that makes things quicker to implement. Plus you have to abide by their design and now how you think it should work. And frankly that doesn't sit well with me.
There look to be some solid improvements.<p>Originally I saw that the 2.0 release would only work on iOS 7. Does it work with iOS 6 and under now as well? That would make me more bullish on upgrading.
Can anyone compare it to MKNetworkKit (<a href="https://github.com/MugunthKumar/MKNetworkKit/" rel="nofollow">https://github.com/MugunthKumar/MKNetworkKit/</a>) ?<p>I have been using it for a few projects and it's been really helpful. Has the correct level of abstraction.