AFNetworking + PromiseKit

AFNetworking is the de-facto standard for implementing a robust and scalable network infrastructure in your iOS or OS X application. I personally have used it for the implementation of many professional projects that I have been involved in. And lately I have stumbled across an delightful Framework, PromiseKit, a Promises implementation for iOS. I have then taken the liberty of incorporating Promises features into AFNetworking.

PromiseKit  + AFNetworking is a category on AFNetworking, covering AFHTTPRequestOperation, AFHTTPRequestOperationManager and AFHTTPSessionManager .

An example use of PromiseKit  + AFNetworking:

Sample function that logins using an AFHTTPSessionManager below:

In order to include these capabilities to your project, you have two options: Either use cocoapods (look into the appropriate section below), or ust copy AFNetworking+Promises.h and AFNetworking+Promises.m in your project and use them.

Source code, and detailed README: https://github.com/csotiriou/AFNetworking-PromiseKit
PromiseKit: http://promisekit.org
AFNetworking: http://github.com/AFNetworking/AFNetworking