Skip to content

Commit

Permalink
- Using ReactiveSwift 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine van der Lee committed Jan 4, 2017
1 parent a26c911 commit 64493e4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
4 changes: 2 additions & 2 deletions ALDataRequestView.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "ALDataRequestView"
s.version = "2.1.4"
s.version = "2.2.0"
s.summary = "A view representation for data requests. Support for ReactiveCocoa and RXSwift."
s.description = "A view representation for data requests. Support for ReactiveCocoa and RXSwift by attached it to signalproducers and observables."
s.homepage = "https://github.com/AvdLee/ALDataRequestView"
Expand Down Expand Up @@ -31,7 +31,7 @@ Pod::Spec.new do |s|

s.subspec "ReactiveCocoa" do |ss|
ss.source_files = "Source/ReactiveCocoa/*.swift"
ss.dependency "ReactiveSwift", "1.0.0-alpha.4"
ss.dependency "ReactiveSwift"
ss.dependency "ALDataRequestView/Core"
end
end
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 2.2.0
- Using ReactiveSwift 1.0.0

# 2.1.4
- Using ReactiveSwift beta 4

Expand Down
6 changes: 5 additions & 1 deletion Example/ALDataRequestView/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import PureLayout
import RxSwift
import ReactiveSwift
import RxCocoa
import Result

class ViewController: UIViewController {

Expand Down Expand Up @@ -41,7 +42,7 @@ class ViewController: UIViewController {
}

func testWithEmptySignalProducer(){
signalProducer = SignalProducer(signal: signal).attachTo(dataRequestView: dataRequestView!)
signalProducer = SignalProducer(signal).attachTo(dataRequestView: dataRequestView!)
signalProducer?.start()

delay(delay: 3.0, closure: { [weak self] () -> Void in
Expand All @@ -55,6 +56,9 @@ class ViewController: UIViewController {
let request = URLRequest(url: URL(string: "http://httpbin.org/status/400")!)
dataSignalProducer = URLSession.shared
.reactive.data(with: request)
.flatMapError({ (error) -> SignalProducer<(Data, URLResponse), NSError> in
return SignalProducer(error: error as NSError)
})
.flatMap(.latest, transform: { (data, response) -> SignalProducer<Data, NSError> in
if let httpResponse = response as? HTTPURLResponse, httpResponse.statusCode > 299 {
return SignalProducer(error: NSError(domain: "", code: httpResponse.statusCode, userInfo: nil))
Expand Down
20 changes: 10 additions & 10 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
PODS:
- ALDataRequestView (2.1.3):
- ALDataRequestView/Core (= 2.1.3)
- ALDataRequestView/Core (2.1.3):
- ALDataRequestView (2.2.0):
- ALDataRequestView/Core (= 2.2.0)
- ALDataRequestView/Core (2.2.0):
- PureLayout
- ReachabilitySwift (~> 3)
- ALDataRequestView/ReactiveCocoa (2.1.3):
- ALDataRequestView/ReactiveCocoa (2.2.0):
- ALDataRequestView/Core
- ReactiveSwift (= 1.0.0-alpha.4)
- ALDataRequestView/RxSwift (2.1.3):
- ReactiveSwift
- ALDataRequestView/RxSwift (2.2.0):
- ALDataRequestView/Core
- RxCocoa (~> 3.0.0)
- RxSwift (~> 3.0.0)
- PureLayout (3.0.2)
- ReachabilitySwift (3)
- ReactiveSwift (1.0.0-alpha.4):
- Result (~> 3.0)
- ReactiveSwift (1.0.0):
- Result (~> 3.1)
- Result (3.1.0)
- RxCocoa (3.0.1):
- RxSwift (~> 3.0)
Expand All @@ -30,10 +30,10 @@ EXTERNAL SOURCES:
:path: ../

SPEC CHECKSUMS:
ALDataRequestView: 6331b0b38ea6e337ca44ddb098f55629395731ff
ALDataRequestView: 15a7980586ff23c8c3d5e94da9880b729af663b4
PureLayout: 4d550abe49a94f24c2808b9b95db9131685fe4cd
ReachabilitySwift: f5b9bb30a0777fac8f09ce8b067e32faeb29bb64
ReactiveSwift: 3fa49d2db97609ea700cd2b8f1bfbdd162024f97
ReactiveSwift: f391724ee318a2cfd3e37dfb041cd49ecf4e7869
Result: 4e3ed5995ed94d0cd6a09be9a431fce3f3624bbf
RxCocoa: 15a52fc590dcc700cb4a690a633b5c5184ce3a78
RxSwift: af5680055c4ad04480189c52d28385b1029493a6
Expand Down

0 comments on commit 64493e4

Please sign in to comment.