What is FutureKit?

FutureKit is a Swift implementation of Futures and Promises, but modified specifically for iOS/OSX programmers.

FutureKit uses Swift generic classes, to allow you to easily deal with asynchronous/multi-threaded issues when coding for iOS or OSX.

Features:

  • is 100% Swift. It currently supports Swift 2.x/3.0 and Xcode 8+. For Swift 2.x compatibility, use the version 2.3.0.
  • is type safe. It uses Swift Generics classes that can automatically infer the type you wish to return from asynchronous logic. And supports both value and reference Swift types (Both ‘Any’ types, and ‘AnyObject/NSObject’ types.)
  • Is Swift error handling friendly. All FutureKit handler methods can already catch and complete a Future using any ErrorType. So you don’t need to wrap your code with ‘do/try/catch’.
  • FutureKit in Swift is designed to simplify error handling, allowing you to attach a single error handler that can catch any error that may occur. This can make dealing with composing async operations much easier and more reliable.
  •  
  • uses simple to understand methods (onComplete/onSuccess/onFail etc) that let’s you simplify complex asynchronous operations into clear and simple to understand logic.
  • is highly composeable, since any existing Future can be used to generate a new Future. And Errors and Cancelations can be automatically passed through, simplifying error handling logic.
  • Super easy cancelation composition (which is a fancy way to say cancel works when you want it to automatically). Future’s are designed so there is never any confusion about whether an asynchronous operation completed, failed, or was canceled. And the consumer has full control over whether he needs to be notified that the operation was canceled or not. (0% confusion about whether your completion blocks will get called when the operation is cancelled).
  • works well editing code within Xcode auto-completion. The combination of type-inference and code-completion makes FutureKit coding fast and easy.
  • simplifies the use of Apple GCD by using Executors – a simple Swift enumeration that simplifies the most common iOS/OSX Dispatch Queues (Main,Default,Background, etc). Allowing you to guarantee that logic will always be executed in the context you want. (You never have to worry about having to call the correct dispatch_async() function again).
  • is highly tunable, allowing you to configure how the primary Executors (Immediate vs Async) execute, and what sort Thread Synchronization FutureKit will use (Barriers – Locks, etc). Allowing you to tune FutureKit’s logic to match what you need.

Overview

  • Pricing: Free
  • Resource Link: https://github.com/FutureKit/FutureKit
  • Resource Maker: FutureKit
  • Mobile Platform Destination: iOS Apps
  • Mobile Platform Support: Native iOS
  • Programming Languages: Swift