Promise / Future concept for Swift developing.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Version Author Build Passing Swift
Platforms MIT
Cocoapods Carthage SPM

🏵 Introduction

Oath is a Promise / Future concept implementation for Swift developing.

Learn more about Promise.

📋 Requirements

  • iOS 8.0+
  • macOS 10.10+
  • tvOS 9.0+
  • Xcode 9.0+ with Swift 4.0+

📲 Installation

Oath is available on CocoaPods:

pod 'Oath'

❤️ Contribution

You are welcome to fork and submit pull requests.

🔖 License

Oath is open-sourced software, licensed under the MIT license.

💫 Usage

fetchUserInfo().then { info in
    print("User: \(info)")
}.onError { e in
    print("An error occured : \(e)")
}.finally {
    print("Everything is done <3")
func fetchUserInfo() -> Promise<String> {
    return Promise { resolve, reject in
        print("fetching user info...")
        wait { resolve("Elias") }