Latest 0.2.0
Homepage https://github.com/Thomvis/FutureProofing
License MIT
Platforms ios 8.0, osx 10.10, tvos 9.0, watchos 2.0
Dependencies BrightFutures
Authors

A companion library to BrightFutures with extensions to CocoaTouch that provides a Future-based alternative to asynchronous API’s.

The goal for this library is to become a community driven, best practice, helper-framework that most users of BrightFutures include when using the core library.

This project is inspired by, and based in part on, the PromiseKit categories.

Extensions

UIView

UIView.animateWithDuration(0.5) {
  // perform animation
}.onComplete { _ in
  // callback executed when the Future returned from animateWithDuration completes
}

NSURLSession

let (task, f) = session.dataTaskWithURL(NSURL(string: "http://www.example.org")!)
task.resume()

f.onSuccess { (data, response) in
  // do something with the response
}.onFailure { error in 
  // handle error
}

Latest podspec

{
    "name": "FutureProofing",
    "version": "0.2.0",
    "summary": "Provide a Future based interface to asynchronous API.",
    "description": "A companion library to BrightFutures with extensions thatnprovide a Future based interface to asynchronous API's",
    "homepage": "https://github.com/Thomvis/FutureProofing",
    "license": "MIT",
    "authors": {
        "Thomas Visser": "[email protected]"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.10",
        "tvos": "9.0",
        "watchos": "2.0"
    },
    "source": {
        "git": "https://github.com/Thomvis/FutureProofing.git",
        "tag": "v0.2.0"
    },
    "dependencies": {
        "BrightFutures": [
            "~> 4.0"
        ]
    },
    "default_subspecs": "Foundation",
    "subspecs": [
        {
            "name": "Accounts",
            "ios": {
                "source_files": "FutureProofing/Accounts/*"
            },
            "frameworks": "Accounts"
        },
        {
            "name": "AVFoundation",
            "ios": {
                "source_files": "FutureProofing/AVFoundation/*",
                "frameworks": "AVFoundation"
            }
        },
        {
            "name": "CoreLocation",
            "ios": {
                "source_files": "FutureProofing/CoreLocation/*"
            },
            "osx": {
                "source_files": "FutureProofing/CoreLocation/*"
            },
            "frameworks": "CoreLocation"
        },
        {
            "name": "Foundation",
            "source_files": "FutureProofing/Foundation/*",
            "frameworks": "Foundation"
        },
        {
            "name": "HomeKit",
            "ios": {
                "source_files": "FutureProofing/HomeKit/*"
            },
            "frameworks": "HomeKit"
        },
        {
            "name": "MapKit",
            "ios": {
                "source_files": "FutureProofing/MapKit/*"
            },
            "osx": {
                "source_files": "FutureProofing/MapKit/*"
            },
            "frameworks": "MapKit"
        },
        {
            "name": "Photos",
            "ios": {
                "source_files": "FutureProofing/Photos/*",
                "frameworks": "Photos"
            }
        },
        {
            "name": "StoreKit",
            "ios": {
                "source_files": "FutureProofing/StoreKit/*"
            },
            "osx": {
                "source_files": "FutureProofing/StoreKit/*"
            },
            "frameworks": "StoreKit"
        },
        {
            "name": "UIKit",
            "ios": {
                "source_files": "FutureProofing/UIKit/*",
                "frameworks": "UIKit"
            }
        }
    ]
}

Pin It on Pinterest

Share This