I hereby claim:
- I am samritchie on github.
- I am samritchie (https://keybase.io/samritchie) on keybase.
- I have a public key whose fingerprint is DC33 7050 1832 5D77 58A9 9D37 5A36 7C74 0BD7 C903
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
/** | |
* Adapted from https://github.com/indragiek/AlamofireRACExtensions | |
*/ | |
public func get<T>(url: String, f: (AnyObject -> Result<T, NSError>)) -> SignalProducer<T, NSError> { | |
return SignalProducer { sink, disposable in | |
let request = Alamofire.request(.GET, hostname + url) | |
.responseJSON { (request, response, responseObject, error) in | |
if let error = error { | |
sendError(sink, error) | |
} else if let response = response { |
import UIKit | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |