Home

Awesome

WarpDrive

Timing and threading helpers for Interstellar

This library does not use the term FRP (Functional Reactive Programming) in the way it was defined by Conal Elliot, but as a paradigm that is both functional and reactive. Read more about the difference at Why I cannot say FRP but I just did.

Features

Requirements


Usage

For a full guide on how Interstellar works the the series of blog posts about Functional Reactive Programming in Swift or the talk at UIKonf 2015 How to use Functional Reactive Programming without Black Magic.

Ridiculously simple multithreading

This example executes the greet function on a background thread, then calls next on the main thread.

let text = Signal<String>()
let greet: String->String = { subject in
    return "Hello \(subject)"
}
text.ensure(Thread.background).map(greet).ensure(Thread.main).next { text in
    println(text)
}
text.update(.Success("World"))

Communication

Installation

Dynamic frameworks on iOS require a minimum deployment target of iOS 8 or later.

To use Interstellar with a project targeting iOS 7, you must include all Swift files directly in your project.

CocoaPods

CocoaPods is a dependency manager for Cocoa projects.

CocoaPods 0.36 adds supports for Swift and embedded frameworks. You can install it with the following command:

$ gem install cocoapods

To integrate Interstellar and WarpDrive into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'WarpDrive'

Then, run the following command:

$ pod install

Credits

Interstellar and WarpDrive is owned and maintained by Jens Ravens.

License

WarpDrive is released under the MIT license. See LICENSE for details.