Need help with PMKAlamofire?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

135 Stars 42 Forks MIT License 54 Commits 6 Opened issues


Promises for Swift & ObjC

Services available


Need anything else?

Contributors list

PromiseKit Alamofire Extensions Build Status

This project adds promises to Alamofire.

This project supports Swift 3.1, 3.2, 4.0 and 4.1.


Alamofire.request("", method: .GET)
    .responseJSON().then { json, rsp in
    }.catch{ error in

Of course, the whole point in promises is composability, so:

func login() -> Promise {
    let q =
    UIApplication.shared.isNetworkActivityIndicatorVisible = true

return firstly { in
    Alamofire.request(url, method: .get).responseData()
}.map(on: q) { data, rsp in
}.ensure {
    UIApplication.shared.isNetworkActivityIndicatorVisible = false


firstly { login() }.done { user in //… }.catch { error in UIAlertController(//).show() }


# Podfile
pod 'PromiseKit/Alamofire', '~> 6.0'
// `.swift` files
import PromiseKit
import Alamofire
// `.m files`
@import PromiseKit;
@import Alamofire;


github "PromiseKit/PMKAlamofire" ~> 3.0

The extensions are built into their own framework:

// `.swift` files
import PromiseKit
import PMKAlamofire
// `.m files`
@import PromiseKit;
@import PMKAlamofire;


let package = Package(
    dependencies: [
        .Target(url: "", majorVersion: 3)

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.