CocoaPods trunk is moving to be read-only. Read more on the blog, there are 13 months to go.
| TestsTested | ✗ |
| LangLanguage | SwiftSwift |
| License | MIT |
| ReleasedLast Release | Jan 2017 |
| SwiftSwift Version | 3.0 |
| SPMSupports SPM | ✗ |
Maintained by Antoine v.d. Lee.
| Depends on: | |
| Moya | ~> 8.0.0 |
| ReactiveSwift | >= 0 |
To run the example project, clone the repo, and run pod install from the Example directory first.
The pod includes extensions for SignalProducer.
This pod includes an extension for the new SignalProducer. This brings the methods we're familiar with from earlier versions of ReactiveCocoa.
let producer = SignalProducer<String, NSError>(value: "testValue")
// Prints "producer started!"
producer.onStarting { () -> () in
print("producer started!")
}.start()
// Prints "testValue"
producer.onNext { (object) -> () in
print(object)
}.start()
// Prints "testValue", can be used to cast AnyObjects for example
producer.onNextAs { (string:String) -> () in
print(string)
}.start()
// Prints "testValue", can be used to cast AnyObjects for example
producer.startWithNextAs { (string:String) -> () in
print(string)
}
// Prints "Error Domain=sample.domain Code=-1 "(null)""
let errorProducer = SignalProducer<String, NSError>(error:NSError(domain: "sample.domain", code: -1, userInfo: nil))
errorProducer.onError { (error) -> () in
print(error)
}.start()ReactiveCocoa 5.0.0 and up
ALReactiveCocoaExtension is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "ALReactiveCocoaExtension"| Swift version | Pod version |
|---|---|
| 3.X | >= 4.0.0 |
| 2.3 | 3.0.3 |
Antoine van der Lee, https://twitter.com/twannl https://www.avanderlee.com
ALReactiveCocoaExtension is available under the MIT license. See the LICENSE file for more info.