Compare commits

..

1 Commits

Author SHA1 Message Date
Junior B 50faf2e72a Adds NSProgressIndicator and NSTextView bindings for RxCocoa on Mac 2016-06-21 14:44:00 +02:00
489 changed files with 10110 additions and 10430 deletions

View File

@ -1,6 +1,6 @@
language: objective-c
osx_image: xcode8
osx_image: xcode7.3
notifications:
slack: rxswift:3ykt2Z61f8GkdvhCZTYPduOL
@ -8,6 +8,4 @@ notifications:
script:
- "bundle exec danger --verbose"
- xcodebuild -version
- xcodebuild -showsdks
- ./scripts/all-tests.sh
- ./scripts/pre-release-tests.sh

View File

@ -5,61 +5,12 @@ All notable changes to this project will be documented in this file.
## Master
## [3.0.0.alpha.1](https://github.com/ReactiveX/RxSwift/releases/tag/3.0.0.alpha.1) (Xcode 8 beta 6 compatible 8S201h)
#### Features
* Modernizes API to be more consistent with Swift 3.0 API Design Guidelines
* Replaces `rx_*` prefix with `rx.*` extensions. (Inspired by `.lazy` collections API). We've tried annotate deprecated APIs with `@available(*, deprecated, renamed: "new method")` but trivial replacements aren't annotated.
* `rx_text` -> `rx.text`
* `rx_tap` -> `rx.tap`
* `rx_date` -> `rx.date`
* ...
* Deprecates `subscribeNext`, `subscribeError`, `subscribeCompleted` in favor of `subscribe(onNext:onError:onCompleted:onDisposed)` (The downsides of old extensions were inconsistencies with Swift API guidelines. They also weren't expressing that calling them actually performes additional subscriptions and thus potentially additional work beside just registering observers).
* Deprecates `doOnNext`, `doOnCompleted`, `doOnError` in favor of `do(onNext:onCompleted:onError:onSubscribe:onDisposed:)`
* Adds `onSubscribe` and `onDisposed` to `do` operator.
* Adds namespace for immutable disposables called `Disposables`
* Deprecates `AnonymousDisposable` in favor of `Disposables.create(with:)`
* Deprecates `NopDisposable` in favor of `Disposables.create()`
* Deprecates `BinaryDisposable` in favor of `Disposables.create(_:_:)`
* Deprecates `toObservable` in favor of `Observable.from()`.
* Replaces old javascript automation tests with Swift UI Tests.
* ...
#### Anomalies
* There is a problem using `UISwitch` extensions because it seems that a bug exists in UIKit that causes all `UISwitch` instances to leak. https://github.com/ReactiveX/RxSwift/issues/842
## [2.6.0](https://github.com/ReactiveX/RxSwift/releases/tag/2.6.0)
#### Features
* Adds Swift 2.3 compatibility.
* Adds `UIViewController.rx_title` extension.
* Adds `UIScrollView.rx_scrollEnabled` extension.
* Resolve static analysis issues relating to non-use of an assigned value, and potential null dereferences in RxCocoa's Objective-C classes.
* Changes `forwardDelegate` property type on `DelegateProxy` from `assign` to `weak`.
* Simplifies UITable/CollectionView data source generic parameters.
* Adds simple usage examples to UITable/CollectionView data source extensions.
* Documents UITable/CollectionView data source extensions memory management and adds unit tests to cover that documentation.
* Adds `.jazzy.yml`
* Adds `UITabBar` extensions and delegate proxy wrapper
* rx_didSelectItem
* rx_willBeginCustomizing
* rx_didBeginCustomizing
* rx_willEndCustomizing
* rx_didEndCustomizing
* Adds `UIPickerView` delegate proxy and extensions:
* rx_itemSelected
* Adds `UIAlertAction.rx_enabled` extension.
* Adds `UIButton.rx_title(controlState: UIControlState = .Normal)` extension.
* Adds `UIPageControl.rx_currentPage` extension.
* Adds `hasObservers` property to `*Subject`.
#### Anomalies
* Fixes problem with UITable/CollectionView releasing of data sources when result subscription disposable wasn't retained.
* Fixes all Xcode analyzer warnings
* Adds `rx_title` to `UIViewController`.
* Adds `rx_scrollEnabled` to `UIScrollView`.
* Adds bindings to `NSTextView`
* Adds bindings to `NSProgressIndicator`
## [2.5.0](https://github.com/ReactiveX/RxSwift/releases/tag/2.5.0)
@ -143,12 +94,12 @@ All notable changes to this project will be documented in this file.
This is example of those changes:
```swift
- public func rx_itemsWithCellFactory<S : Sequence, O : ObservableType where O.E == S>
- public func rx_itemsWithCellFactory<S : SequenceType, O : ObservableType where O.E == S>
(source: O)
(cellFactory: (UITableView, Int, S.Iterator.Element) -> UITableViewCell) -> Disposable
+ public func rx_itemsWithCellFactory<S : Sequence, O : ObservableType where O.E == S>
(cellFactory: (UITableView, Int, S.Generator.Element) -> UITableViewCell) -> Disposable
+ public func rx_itemsWithCellFactory<S : SequenceType, O : ObservableType where O.E == S>
(source: O)
-> (cellFactory: (UITableView, Int, S.Iterator.Element) -> UITableViewCell) -> Disposable
-> (cellFactory: (UITableView, Int, S.Generator.Element) -> UITableViewCell) -> Disposable
```
* Fixes anomaly in `CLLocationManager` extensions
@ -420,7 +371,7 @@ let (
* `NSURLSession` extensions now return `Observable<(NSData!, NSHTTPURLResponse)>` instead of `Observable<(NSData!, NSURLResponse!)>`.
* Optimizes consecutive map operators. For example `map(validate1).map(validate2).map(parse)` is now internally optimized to one `map` operator.
* Adds overloads for `just`, `sequenceOf`, `toObservable` that accept scheduler.
* Deprecates `asObservable` extension of `Sequence` in favor of `toObservable`.
* Deprecates `asObservable` extension of `SequenceType` in favor of `toObservable`.
* Adds `toObservable` extension to `Array`.
* Improves table view animated data source example.
* Polishing of `RxDataSourceStarterKit`
@ -532,7 +483,7 @@ let (
* Renames `ScopedDispose` to `ScopedDisposable`
* Deprecates `observeSingleOn` in favor of `observeOn`
* Adds inline documentation
* Renames `from` to `asObservable` extension method on `Sequence`
* Renames `from` to `asObservable` extension method on `SequenceType`
* Renames `catchErrorResumeNext` in favor of `catchErrorJustReturn`
* Deprecates `catchErrorToResult`, the preferred way is to use Swift `do/try/catch` mechanism.
* Deprecates `RxResult`, the preferred way is to use Swift `do/try/catch` mechanism.

View File

@ -13,14 +13,6 @@ So what does this mean in practice:
* Please target your PR to **develop** branch
* If you want to make a bigger contribution to the project, please [open an issue first](https://github.com/ReactiveX/RxSwift/issues/new) so we can plan that work, discuss the architecture and brainstorm around that idea first.
## Submitting a Pull Request
Before submitting a pull request please make sure **`./scripts/all-tests.sh`** is passing (exits with 0), otherwise we won't be able to pull your code.
To be able to run `./scripts/all-tests.sh`, you'll need to install [xcpretty](https://github.com/supermarin/xcpretty).
`sudo gem install xcpretty`
## Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:

View File

@ -1,6 +1,6 @@
# Warn about develop branch
current_branch = env.request_source.pr_json["base"]["ref"]
warn("Please target PRs to `develop` branch") if current_branch != "develop" && current_branch != "swift-3.0"
warn("Please target PRs to `develop` branch") if current_branch != "develop"
# Sometimes it's a README fix, or something like that - which isn't relevant for
# including in a project's CHANGELOG for example

View File

@ -102,13 +102,13 @@ Creating new operators is also pretty straightforward.
```swift
extension Reactive where Base: NSObject {
extension NSObject {
public var deallocated: Observable<Void> {}
public var rx_deallocated: Observable<Void> {}
#if !DISABLE_SWIZZLING
public var deallocating: Observable<Void> {}
public var rx_deallocating: Observable<Void> {}
#endif
@ -118,9 +118,9 @@ extension Reactive where Base: NSObject {
```swift
extension Reactive where Base: NSObject {
extension NSObject {
public func observe<Element>(
public func rx_observe<Element>(
type: E.Type,
_ keyPath: String,
options: NSKeyValueObservingOptions = .New | .Initial,
@ -129,7 +129,7 @@ extension Reactive where Base: NSObject {
#if !DISABLE_SWIZZLING
public func observeWeakly<Element>(
public func rx_observeWeakly<Element>(
type: E.Type,
_ keyPath: String,
options: NSKeyValueObservingOptions = .New | .Initial
@ -140,23 +140,23 @@ extension Reactive where Base: NSObject {
```
```swift
extension Reactive where Base: NSURLSession {
extension NSURLSession {
public func response(request: NSURLRequest) -> Observable<(NSData, NSURLResponse)> {}
public func rx_response(request: NSURLRequest) -> Observable<(NSData, NSURLResponse)> {}
public func data(request: NSURLRequest) -> Observable<NSData> {}
public func rx_data(request: NSURLRequest) -> Observable<NSData> {}
public func JSON(request: NSURLRequest) -> Observable<AnyObject> {}
public func rx_JSON(request: NSURLRequest) -> Observable<AnyObject> {}
public func JSON(URL: NSURL) -> Observable<AnyObject> {}
public func rx_JSON(URL: NSURL) -> Observable<AnyObject> {}
}
```
```swift
extension Reactive where Base: NSNotificationCenter {
extension NSNotificationCenter {
public func notification(name: String, object: AnyObject?) -> Observable<NSNotification> {}
public func rx_notification(name: String, object: AnyObject?) -> Observable<NSNotification> {}
}
```
@ -170,39 +170,39 @@ class DelegateProxy {
```
```swift
extension Reactive where Base: CLLocationManager {
extension CLLocationManager {
public var delegate: DelegateProxy {}
public var rx_delegate: DelegateProxy {}
public var didUpdateLocations: Observable<[CLLocation]> {}
public var rx_didUpdateLocations: Observable<[CLLocation]> {}
public var didFailWithError: Observable<NSError> {}
public var rx_didFailWithError: Observable<NSError> {}
public var didFinishDeferredUpdatesWithError: Observable<NSError> {}
public var rx_didFinishDeferredUpdatesWithError: Observable<NSError> {}
public var didPauseLocationUpdates: Observable<Void> {}
public var rx_didPauseLocationUpdates: Observable<Void> {}
public var didResumeLocationUpdates: Observable<Void> {}
public var rx_didResumeLocationUpdates: Observable<Void> {}
public var didUpdateHeading: Observable<CLHeading> {}
public var rx_didUpdateHeading: Observable<CLHeading> {}
public var didEnterRegion: Observable<CLRegion> {}
public var rx_didEnterRegion: Observable<CLRegion> {}
public var didExitRegion: Observable<CLRegion> {}
public var rx_didExitRegion: Observable<CLRegion> {}
public var didDetermineStateForRegion: Observable<(state: CLRegionState, region: CLRegion)> {}
public var rx_didDetermineStateForRegion: Observable<(state: CLRegionState, region: CLRegion)> {}
public var monitoringDidFailForRegionWithError: Observable<(region: CLRegion?, error: NSError)> {}
public var rx_monitoringDidFailForRegionWithError: Observable<(region: CLRegion?, error: NSError)> {}
public var didStartMonitoringForRegion: Observable<CLRegion> {}
public var rx_didStartMonitoringForRegion: Observable<CLRegion> {}
public var didRangeBeaconsInRegion: Observable<(beacons: [CLBeacon], region: CLBeaconRegion)> {}
public var rx_didRangeBeaconsInRegion: Observable<(beacons: [CLBeacon], region: CLBeaconRegion)> {}
public var rangingBeaconsDidFailForRegionWithError: Observable<(region: CLBeaconRegion, error: NSError)> {}
public var rx_rangingBeaconsDidFailForRegionWithError: Observable<(region: CLBeaconRegion, error: NSError)> {}
public var didVisit: Observable<CLVisit> {}
public var rx_didVisit: Observable<CLVisit> {}
public var didChangeAuthorizationStatus: Observable<CLAuthorizationStatus> {}
public var rx_didChangeAuthorizationStatus: Observable<CLAuthorizationStatus> {}
}
```
@ -211,281 +211,281 @@ extension Reactive where Base: CLLocationManager {
```swift
extension Reactive where Base: UIControl {
extension UIControl {
public func controlEvent(controlEvents: UIControlEvents) -> ControlEvent<Void> {}
public func rx_controlEvent(controlEvents: UIControlEvents) -> ControlEvent<Void> {}
public var enabled: ObserverOf<Bool> {}
public var rx_enabled: ObserverOf<Bool> {}
}
```
```swift
extension Reactive where Base: UIButton {
extension UIButton {
public var tap: ControlEvent<Void> {}
public var rx_tap: ControlEvent<Void> {}
}
```
```swift
extension Reactive where Base: UITextField {
extension UITextField {
public var text: ControlProperty<String> {}
public var rx_text: ControlProperty<String> {}
}
```
```swift
extension Reactive where Base: UITextView {
extension UITextView {
override func createDelegateProxy() -> RxScrollViewDelegateProxy {}
override func rx_createDelegateProxy() -> RxScrollViewDelegateProxy {}
public var text: ControlProperty<String> {}
public var rx_text: ControlProperty<String> {}
}
```
```swift
extension Reactive where Base: UISearchBar {
extension UISearchBar {
public var delegate: DelegateProxy {}
public var rx_delegate: DelegateProxy {}
public var searchText: ControlProperty<String> {}
public var rx_searchText: ControlProperty<String> {}
}
```
```swift
extension Reactive where Base: UILabel {
extension UILabel {
public var text: ObserverOf<String> {}
public var rx_text: ObserverOf<String> {}
}
```
```swift
extension Reactive where Base: UIDatePicker {
extension UIDatePicker {
public var date: ControlProperty<NSDate> {}
public var rx_date: ControlProperty<NSDate> {}
}
```
```swift
extension Reactive where Base: UIImageView {
extension UIImageView {
public var image: ObserverOf<UIImage!> {}
public var rx_image: ObserverOf<UIImage!> {}
public func imageAnimated(transitionType: String?) -> AnyObserver<UIImage?>
public func rx_imageAnimated(transitionType: String?) -> AnyObserver<UIImage?>
}
```
```swift
extension Reactive where Base: UIScrollView {
extension UIScrollView {
public var delegate: DelegateProxy {}
public var rx_delegate: DelegateProxy {}
public func setDelegate(delegate: UIScrollViewDelegate) {}
public func rx_setDelegate(delegate: UIScrollViewDelegate) {}
public var contentOffset: ControlProperty<CGPoint> {}
public var rx_contentOffset: ControlProperty<CGPoint> {}
}
```
```swift
extension Reactive where Base: UIBarButtonItem {
extension UIBarButtonItem {
public var tap: ControlEvent<Void> {}
public var rx_tap: ControlEvent<Void> {}
}
```
```swift
extension Reactive where Base: UISlider {
extension UISlider {
public var value: ControlProperty<Float> {}
public var rx_value: ControlProperty<Float> {}
}
```
```swift
extension Reactive where Base: UITableView {
extension UITableView {
public var dataSource: DelegateProxy {}
public var rx_dataSource: DelegateProxy {}
public func setDataSource(dataSource: UITableViewDataSource) -> Disposable {}
public func rx_setDataSource(dataSource: UITableViewDataSource) -> Disposable {}
public func itemsWithCellFactory(source: O)(cellFactory: (UITableView, Int, S.Iterator.Element) -> UITableViewCell) -> Disposable {}
public func rx_itemsWithCellFactory(source: O)(cellFactory: (UITableView, Int, S.Generator.Element) -> UITableViewCell) -> Disposable {}
public func itemsWithCellIdentifier(cellIdentifier: String, cellType: Cell.Type = Cell.self)(source: O)(configureCell: (Int, S.Iterator.Element, Cell) -> Void) -> Disposable {}
public func rx_itemsWithCellIdentifier(cellIdentifier: String, cellType: Cell.Type = Cell.self)(source: O)(configureCell: (Int, S.Generator.Element, Cell) -> Void) -> Disposable {}
public func itemsWithDataSource(dataSource: DataSource)(source: O) -> Disposable {}
public func rx_itemsWithDataSource(dataSource: DataSource)(source: O) -> Disposable {}
public var itemSelected: ControlEvent<IndexPath> {}
public var rx_itemSelected: ControlEvent<NSIndexPath> {}
public var itemDeselected: ControlEvent<IndexPath> {}
public var rx_itemDeselected: ControlEvent<NSIndexPath> {}
public var itemInserted: ControlEvent<IndexPath> {}
public var rx_itemInserted: ControlEvent<NSIndexPath> {}
public var itemDeleted: ControlEvent<IndexPath> {}
public var rx_itemDeleted: ControlEvent<NSIndexPath> {}
public var itemMoved: ControlEvent<ItemMovedEvent> {}
public var rx_itemMoved: ControlEvent<ItemMovedEvent> {}
// This method only works in case one of the `rx.itemsWith*` methods was used, or data source implements `SectionedViewDataSourceType`
public func modelSelected<T>(modelType: T.Type) -> ControlEvent<T> {}
// This method only works in case one of the `rx_itemsWith*` methods was used, or data source implements `SectionedViewDataSourceType`
public func rx_modelSelected<T>(modelType: T.Type) -> ControlEvent<T> {}
// This method only works in case one of the `rx.itemsWith*` methods was used, or data source implements `SectionedViewDataSourceType`
public func modelDeselected<T>(modelType: T.Type) -> ControlEvent<T> {}
// This method only works in case one of the `rx_itemsWith*` methods was used, or data source implements `SectionedViewDataSourceType`
public func rx_modelDeselected<T>(modelType: T.Type) -> ControlEvent<T> {}
}
```
```swift
extension Reactive where Base: UICollectionView {
extension UICollectionView {
public var dataSource: DelegateProxy {}
public var rx_dataSource: DelegateProxy {}
public func setDataSource(dataSource: UICollectionViewDataSource) -> Disposable {}
public func rx_setDataSource(dataSource: UICollectionViewDataSource) -> Disposable {}
public func itemsWithCellFactory(source: O)(cellFactory: (UICollectionView, Int, S.Iterator.Element) -> UICollectionViewCell) -> Disposable {}
public func rx_itemsWithCellFactory(source: O)(cellFactory: (UICollectionView, Int, S.Generator.Element) -> UICollectionViewCell) -> Disposable {}
public func itemsWithCellIdentifier(cellIdentifier: String, cellType: Cell.Type = Cell.self)(source: O)(configureCell: (Int, S.Iterator.Element, Cell) -> Void) -> Disposable {}
public func rx_itemsWithCellIdentifier(cellIdentifier: String, cellType: Cell.Type = Cell.self)(source: O)(configureCell: (Int, S.Generator.Element, Cell) -> Void) -> Disposable {}
public func itemsWithDataSource(dataSource: DataSource)(source: O) -> Disposable {}
public func rx_itemsWithDataSource(dataSource: DataSource)(source: O) -> Disposable {}
public var itemSelected: ControlEvent<IndexPath> {}
public var rx_itemSelected: ControlEvent<NSIndexPath> {}
public var itemDeselected: ControlEvent<IndexPath> {}
public var rx_itemDeselected: ControlEvent<NSIndexPath> {}
// This method only works in case one of the `rx.itemsWith*` methods was used, or data source implements `SectionedViewDataSourceType`
public func modelSelected<T>(modelType: T.Type) -> ControlEvent<T> {}
// This method only works in case one of the `rx_itemsWith*` methods was used, or data source implements `SectionedViewDataSourceType`
public func rx_modelSelected<T>(modelType: T.Type) -> ControlEvent<T> {}
// This method only works in case one of the `rx.itemsWith*` methods was used, or data source implements `SectionedViewDataSourceType`
public func modelSelected<T>(modelType: T.Type) -> ControlEvent<T> {}
// This method only works in case one of the `rx_itemsWith*` methods was used, or data source implements `SectionedViewDataSourceType`
public func rx_modelSelected<T>(modelType: T.Type) -> ControlEvent<T> {}
}
```
```swift
extension Reactive where Base: UIGestureRecognizer {
extension UIGestureRecognizer {
public var event: ControlEvent<UIGestureRecognizer> {}
public var rx_event: ControlEvent<UIGestureRecognizer> {}
}
```
```swift
extension Reactive where Base: UIImagePickerController {
extension UIImagePickerController {
public var didFinishPickingMediaWithInfo: Observable<[String : AnyObject]> {}
public var rx_didFinishPickingMediaWithInfo: Observable<[String : AnyObject]> {}
public var didCancel: Observable<()> {}
public var rx_didCancel: Observable<()> {}
}
```
```swift
extension Reactive where Base: UISegmentedControl {
extension UISegmentedControl {
public var value: ControlProperty<Int> {}
public var rx_value: ControlProperty<Int> {}
}
```
```swift
extension Reactive where Base: UISwitch {
extension UISwitch {
public var value: ControlProperty<Bool> {}
public var rx_value: ControlProperty<Bool> {}
}
```
```swift
extension Reactive where Base: UIActivityIndicatorView {
extension UIActivityIndicatorView {
public var animating: AnyObserver<Bool> {}
public var rx_animating: AnyObserver<Bool> {}
}
```
```swift
extension Reactive where Base: UINavigationItem {
extension UINavigationItem {
public var title: AnyObserver<String?> {}
public var rx_title: AnyObserver<String?> {}
}
```
**OSX**
```swift
extension Reactive where Base: NSControl {
extension NSControl {
public var controlEvent: ControlEvent<()> {}
public var rx_controlEvent: ControlEvent<()> {}
public var enabled: AnyObserver<Bool> {}
public var rx_enabled: AnyObserver<Bool> {}
}
```
```swift
extension Reactive where Base: NSSlider {
extension NSSlider {
public var value: ControlProperty<Double> {}
public var rx_value: ControlProperty<Double> {}
}
```
```swift
extension Reactive where Base: NSButton {
extension NSButton {
public var tap: ControlEvent<Void> {}
public var rx_tap: ControlEvent<Void> {}
public var state: ControlProperty<Int> {}
public var rx_state: ControlProperty<Int> {}
}
```
```swift
extension Reactive where Base: NSImageView {
extension NSImageView {
public var image: ObserverOf<NSImage?> {}
public var rx_image: ObserverOf<NSImage?> {}
public func imageAnimated(transitionType: String?) -> AnyObserver<NSImage?>
public func rx_imageAnimated(transitionType: String?) -> AnyObserver<NSImage?>
}
```
```swift
extension Reactive where Base: NSTextField {
extension NSTextField {
public var delegate: DelegateProxy {}
public var rx_delegate: DelegateProxy {}
public var text: ControlProperty<String> {}
public var rx_text: ControlProperty<String> {}
}
```
```swift
extension Reactive where Base: UITabBarItem {
extension UITabBarItem {
public var badgeValue: AnyObserver<String?> {}
public var rx_badgeValue: AnyObserver<String?> {}
}
```
```swift
extension Reactive where Base: UITabBar {
extension UITabBar {
public var didSelectItem: ControlEvent<UITabBarItem> {}
public var rx_didSelectItem: ControlEvent<UITabBarItem> {}
public var willBeginCustomizing: ControlEvent<[UITabBarItem]> {}
public var rx_willBeginCustomizing: ControlEvent<[UITabBarItem]> {}
public var didBeginCustomizing: ControlEvent<[UITabBarItem]> {}
public var rx_didBeginCustomizing: ControlEvent<[UITabBarItem]> {}
public var willEndCustomizing: ControlEvent<(items: [UITabBarItem], changed: Bool)> {}
public var rx_willEndCustomizing: ControlEvent<(items: [UITabBarItem], changed: Bool)> {}
public var didEndCustomizing: ControlEvent<(items: [UITabBarItem], changed: Bool)> {}
public var rx_didEndCustomizing: ControlEvent<(items: [UITabBarItem], changed: Bool)> {}
}
```

View File

@ -49,9 +49,9 @@ let c = Observable.combineLatest(a.asObservable(), b.asObservable()) { $0 + $1 }
// 1 + 2 = 3 which is >= 0, so `c` is initially equal to "3 is positive"
// To pull values out of the Rx `Observable` `c`, subscribe to values from `c`.
// `subscribe(onNext:)` means subscribe to the next (fresh) values of `c`.
// `subscribeNext` means subscribe to the next (fresh) values of `c`.
// That also includes the initial value "3 is positive".
c.subscribe(onNext: { print($0) }) // prints: "3 is positive"
c.subscribeNext { print($0) } // prints: "3 is positive"
// Now, let's increase the value of `a`
a.value = 4 // prints: 6 is positive
@ -72,17 +72,17 @@ b.value = -8 // doesn't print anything
## Simple UI bindings
* Instead of binding to variables, let's bind to `UITextField` values using the `rx.text` property
* Instead of binding to variables, let's bind to `UITextField` values using the `rx_text` property
* Next, `map` the `String` into an `Int` and determine if the number is prime using an async API
* If the text is changed before the async call completes, a new async call will replace it via `concat`
* Bind the results to a `UILabel`
```swift
let subscription/*: Disposable */ = primeTextField.rx.text // type is Observable<String>
let subscription/*: Disposable */ = primeTextField.rx_text // type is Observable<String>
.map { WolframAlphaIsPrime(Int($0) ?? 0) } // type is Observable<Observable<Prime>>
.concat() // type is Observable<Prime>
.map { "number \($0.n) is prime? \($0.isPrime)" } // type is Observable<String>
.bindTo(resultLabel.rx.text) // return Disposable that can be used to unbind everything
.bindTo(resultLabel.rx_text) // return Disposable that can be used to unbind everything
// This will set `resultLabel.text` to "number 43 is prime? true" after
// server call completes.
@ -108,7 +108,7 @@ Let's give it a shot.
```swift
// bind UI control values directly
// use username from `usernameOutlet` as username values source
self.usernameOutlet.rx.text
self.usernameOutlet.rx_text
.map { username in
// synchronous validation, nothing special here
@ -152,12 +152,12 @@ self.usernameOutlet.rx.text
// That's what `switchLatest` does.
.switchLatest()
// Now we need to bind that to the user interface somehow.
// Good old `subscribe(onNext:)` can do that.
// Good old `subscribeNext` can do that.
// That's the end of `Observable` chain.
.subscribe(onNext: { valid in
.subscribeNext { valid in
errorLabel.textColor = validationColor(valid)
errorLabel.text = valid.message
})
}
// This will produce a `Disposable` object that can unbind everything and cancel
// pending async operations.
// Instead of doing it manually, which is tedious,

View File

@ -67,32 +67,32 @@ These are called marble diagrams. There are more marble diagrams at [rxmarbles.c
If we were to specify sequence grammar as a regular expression it would look like:
**next* (error | completed)?**
**Next* (Error | Completed)?**
This describes the following:
* **Sequences can have 0 or more elements.**
* **Once an `error` or `completed` event is received, the sequence cannot produce any other element.**
* **Once an `Error` or `Completed` event is received, the sequence cannot produce any other element.**
Sequences in Rx are described by a push interface (aka callback).
```swift
enum Event<Element> {
case next(Element) // next element of a sequence
case error(Swift.Error) // sequence failed with error
case completed // sequence terminated successfully
case Next(Element) // next element of a sequence
case Error(ErrorType) // sequence failed with error
case Completed // sequence terminated successfully
}
class Observable<Element> {
func subscribe(_ observer: Observer<Element>) -> Disposable
func subscribe(observer: Observer<Element>) -> Disposable
}
protocol ObserverType {
func on(_ event: Event<Element>)
func on(event: Event<Element>)
}
```
**When a sequence sends the `completed` or `error` event all internal resources that compute sequence elements will be freed.**
**When a sequence sends the `Completed` or `Error` event all internal resources that compute sequence elements will be freed.**
**To cancel production of sequence elements and free resources immediately, call `dispose` on the returned subscription.**
@ -102,7 +102,7 @@ If a sequence does not terminate in some way, resources will be allocated perman
**Using dispose bags or `takeUntil` operator is a robust way of making sure resources are cleaned up. We recommend using them in production even if the sequences will terminate in finite time.**
In case you are curious why `Swift.Error` isn't generic, you can find explanation [here](DesignRationale.md#why-error-type-isnt-generic).
In case you are curious why `ErrorType` isn't generic, you can find explanation [here](DesignRationale.md#why-error-type-isnt-generic).
## Disposing
@ -116,7 +116,7 @@ let subscription = Observable<Int>.interval(0.3, scheduler: scheduler)
print(event)
}
NSThread.sleep(forTimeInterval: 2.0)
NSThread.sleepForTimeInterval(2)
subscription.dispose()
@ -133,7 +133,7 @@ This will print:
5
```
Note that you usually do not want to manually call `dispose`; this is only educational example. Calling dispose manually is usually a bad code smell. There are better ways to dispose subscriptions. We can use `DisposeBag`, the `takeUntil` operator, or some other mechanism.
Note the you usually do not want to manually call `dispose`; this is only educational example. Calling dispose manually is usually a bad code smell. There are better ways to dispose subscriptions. We can use `DisposeBag`, the `takeUntil` operator, or some other mechanism.
So can this code print something after the `dispose` call executed? The answer is: it depends.
@ -208,7 +208,7 @@ Additional way to automatically dispose subscription on dealloc is to use `takeU
```swift
sequence
.takeUntil(self.rx.deallocated)
.takeUntil(self.rx_deallocated)
.subscribe {
print($0)
}
@ -218,9 +218,9 @@ sequence
There is also a couple of additional guarantees that all sequence producers (`Observable`s) must honor.
It doesn't matter on which thread they produce elements, but if they generate one element and send it to the observer `observer.on(.next(nextElement))`, they can't send next element until `observer.on` method has finished execution.
It doesn't matter on which thread they produce elements, but if they generate one element and send it to the observer `observer.on(.Next(nextElement))`, they can't send next element until `observer.on` method has finished execution.
Producers also cannot send terminating `.completed` or `.error` in case `.next` event hasn't finished.
Producers also cannot send terminating `.Completed` or `.Error` in case `.Next` event hasn't finished.
In short, consider this example:
@ -276,9 +276,9 @@ let searchForMe = searchWikipedia("me")
let cancel = searchForMe
// sequence generation starts now, URL requests are fired
.subscribe(onNext: { results in
.subscribeNext { results in
print(results)
})
}
```
@ -291,16 +291,16 @@ Let's create a function which creates a sequence that returns one element upon s
```swift
func myJust<E>(element: E) -> Observable<E> {
return Observable.create { observer in
observer.on(.next(element))
observer.on(.completed)
return Disposables.create()
observer.on(.Next(element))
observer.on(.Completed)
return NopDisposable.instance
}
}
myJust(0)
.subscribe(onNext: { n in
.subscribeNext { n in
print(n)
})
}
```
this will print:
@ -325,11 +325,11 @@ Lets now create an observable that returns elements from an array.
func myFrom<E>(sequence: [E]) -> Observable<E> {
return Observable.create { observer in
for element in sequence {
observer.on(.next(element))
observer.on(.Next(element))
}
observer.on(.completed)
return Disposables.create()
observer.on(.Completed)
return NopDisposable.instance
}
}
@ -339,17 +339,17 @@ print("Started ----")
// first time
stringCounter
.subscribe(onNext: { n in
.subscribeNext { n in
print(n)
})
}
print("----")
// again
stringCounter
.subscribe(onNext: { n in
.subscribeNext { n in
print(n)
})
}
print("Ended ----")
```
@ -382,15 +382,15 @@ func myInterval(interval: NSTimeInterval) -> Observable<Int> {
var next = 0
dispatch_source_set_timer(timer, 0, UInt64(interval * Double(NSEC_PER_SEC)), 0)
let cancel = Disposables.create {
let cancel = AnonymousDisposable {
print("Disposed")
dispatch_source_cancel(timer)
}
dispatch_source_set_event_handler(timer, {
if cancel.isDisposed {
if cancel.disposed {
return
}
observer.on(.next(next))
observer.on(.Next(next))
next += 1
})
dispatch_resume(timer)
@ -406,12 +406,11 @@ let counter = myInterval(0.1)
print("Started ----")
let subscription = counter
.subscribe(onNext: { n in
.subscribeNext { n in
print(n)
})
}
NSThread.sleep(forTimeInterval: 0.5)
NSThread.sleepForTimeInterval(0.5)
subscription.dispose()
@ -439,19 +438,19 @@ let counter = myInterval(0.1)
print("Started ----")
let subscription1 = counter
.subscribe(onNext: { n in
.subscribeNext { n in
print("First \(n)")
})
}
let subscription2 = counter
.subscribe(onNext: { n in
.subscribeNext { n in
print("Second \(n)")
})
}
NSThread.sleep(forTimeInterval: 0.5)
NSThread.sleepForTimeInterval(0.5)
subscription1.dispose()
NSThread.sleep(forTimeInterval: 0.5)
NSThread.sleepForTimeInterval(0.5)
subscription2.dispose()
@ -504,13 +503,13 @@ let counter = myInterval(0.1)
print("Started ----")
let subscription1 = counter
.subscribe(onNext: { n in
.subscribeNext { n in
print("First \(n)")
})
}
let subscription2 = counter
.subscribe(onNext: { n in
.subscribeNext { n in
print("Second \(n)")
})
}
NSThread.sleepForTimeInterval(0.5)
@ -555,27 +554,27 @@ Behavior for URL observables is equivalent.
This is how HTTP requests are wrapped in Rx. It's pretty much the same pattern like the `interval` operator.
```swift
extension Reactive where Base: NSURLSession {
public func response(request: NSURLRequest) -> Observable<(NSData, NSURLResponse)> {
extension NSURLSession {
public func rx_response(request: NSURLRequest) -> Observable<(NSData, NSURLResponse)> {
return Observable.create { observer in
let task = self.dataTaskWithRequest(request) { (data, response, error) in
guard let response = response, data = data else {
observer.on(.error(error ?? RxCocoaURLError.Unknown))
observer.on(.Error(error ?? RxCocoaURLError.Unknown))
return
}
guard let httpResponse = response as? NSHTTPURLResponse else {
observer.on(.error(RxCocoaURLError.nonHTTPResponse(response: response)))
observer.on(.Error(RxCocoaURLError.NonHTTPResponse(response: response)))
return
}
observer.on(.next(data, httpResponse))
observer.on(.completed)
observer.on(.Next(data, httpResponse))
observer.on(.Completed)
}
task.resume()
return Disposables.create {
return AnonymousDisposable {
task.cancel()
}
}
@ -615,13 +614,13 @@ extension ObservableType {
return Observable.create { observer in
let subscription = self.subscribe { e in
switch e {
case .next(let value):
case .Next(let value):
let result = transform(value)
observer.on(.next(result))
case .error(let error):
observer.on(.error(error))
case .completed:
observer.on(.completed)
observer.on(.Next(result))
case .Error(let error):
observer.on(.Error(error))
case .Completed:
observer.on(.Completed)
}
}
@ -638,9 +637,9 @@ let subscription = myInterval(0.1)
.myMap { e in
return "This is simply \(e)"
}
.subscribe(onNext: { n in
.subscribeNext { n in
print(n)
})
}
```
and this will print
@ -669,9 +668,9 @@ This isn't something that should be practiced often, and is a bad code smell, bu
let magicBeings: Observable<MagicBeing> = summonFromMiddleEarth()
magicBeings
.subscribe(onNext: { being in // exit the Rx monad
.subscribeNext { being in // exit the Rx monad
self.doSomeStateMagic(being)
})
}
.addDisposableTo(disposeBag)
//
@ -681,7 +680,7 @@ This isn't something that should be practiced often, and is a bad code smell, bu
being,
UIApplication.delegate.dataSomething.attendees
)
kittens.on(.next(kitten)) // send result back to rx
kittens.on(.Next(kitten)) // send result back to rx
//
// Another mess
//
@ -699,9 +698,9 @@ Every time you do this, somebody will probably write this code somewhere
```swift
kittens
.subscribe(onNext: { kitten in
.subscribeNext { kitten in
// so something with kitten
})
}
.addDisposableTo(disposeBag)
```
@ -717,7 +716,7 @@ If you are unsure how exactly some of the operators work, [playgrounds](../Rx.pl
## Error handling
There are two error mechanisms.
The are two error mechanisms.
### Asynchronous error handling mechanism in observables
@ -784,9 +783,9 @@ let subscription = myInterval(0.1)
.map { e in
return "This is simply \(e)"
}
.subscribe(onNext: { n in
.subscribeNext { n in
print(n)
})
}
NSThread.sleepForTimeInterval(0.5)
@ -798,15 +797,15 @@ will print
```
[my probe] subscribed
Subscribed
[my probe] -> Event next(Box(0))
[my probe] -> Event Next(Box(0))
This is simply 0
[my probe] -> Event next(Box(1))
[my probe] -> Event Next(Box(1))
This is simply 1
[my probe] -> Event next(Box(2))
[my probe] -> Event Next(Box(2))
This is simply 2
[my probe] -> Event next(Box(3))
[my probe] -> Event Next(Box(3))
This is simply 3
[my probe] -> Event next(Box(4))
[my probe] -> Event Next(Box(4))
This is simply 4
[my probe] dispose
Disposed
@ -822,17 +821,17 @@ extension ObservableType {
let subscription = self.subscribe { e in
print("event \(identifier) \(e)")
switch e {
case .next(let value):
observer.on(.next(value))
case .Next(let value):
observer.on(.Next(value))
case .error(let error):
observer.on(.error(error))
case .Error(let error):
observer.on(.Error(error))
case .completed:
observer.on(.completed)
case .Completed:
observer.on(.Completed)
}
}
return Disposables.create {
return AnonymousDisposable {
print("disposing \(identifier)")
subscription.dispose()
}
@ -852,9 +851,9 @@ In case you want to have some resource leak detection logic, the simplest method
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool
*/
_ = Observable<Int>.interval(1, scheduler: MainScheduler.instance)
.subscribe(onNext: { _ in
print("Resource count \(RxSwift.resourceCount)")
})
.subscribeNext { _ in
print("Resource count \(RxSwift.resourceCount)")
}
```
Most efficient way to test for memory leaks is:
@ -876,7 +875,7 @@ The reason why 2 navigations are suggested is because first navigation forces lo
Variable wraps a [`Subject`](http://reactivex.io/documentation/subject.html). More specifically it is a `BehaviorSubject`. Unlike `BehaviorSubject`, it only exposes `value` interface, so variable can never terminate or fail.
It will also broadcast its current value immediately on subscription.
It will also broadcast it's current value immediately on subscription.
After variable is deallocated, it will complete the observable sequence returned from `.asObservable()`.
@ -934,14 +933,14 @@ There are two built in ways this library supports KVO.
```swift
// KVO
extension Reactive where Base: NSObject {
public func observe<E>(type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions, retainSelf: Bool = true) -> Observable<E?> {}
extension NSObject {
public func rx_observe<E>(type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions, retainSelf: Bool = true) -> Observable<E?> {}
}
#if !DISABLE_SWIZZLING
// KVO
extension Reactive where Base: NSObject {
public func observeWeakly<E>(type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions) -> Observable<E?> {}
extension NSObject {
public func rx_observeWeakly<E>(type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions) -> Observable<E?> {}
}
#endif
```
@ -952,25 +951,25 @@ Example how to observe frame of `UIView`.
```swift
view
.rx.observe(CGRect.self, "frame")
.subscribe(onNext: { frame in
.rx_observe(CGRect.self, "frame")
.subscribeNext { frame in
...
})
}
```
or
```swift
view
.rx.observeWeakly(CGRect.self, "frame")
.subscribe(onNext: { frame in
.rx_observeWeakly(CGRect.self, "frame")
.subscribeNext { frame in
...
})
}
```
### `rx.observe`
### `rx_observe`
`rx.observe` is more performant because it's just a simple wrapper around KVO mechanism, but it has more limited usage scenarios
`rx_observe` is more performant because it's just a simple wrapper around KVO mechanism, but it has more limited usage scenarios
* it can be used to observe paths starting from `self` or from ancestors in ownership graph (`retainSelf = false`)
* it can be used to observe paths starting from descendants in ownership graph (`retainSelf = true`)
@ -979,14 +978,14 @@ view
E.g.
```swift
self.rx.observe(CGRect.self, "view.frame", retainSelf: false)
self.rx_observe(CGRect.self, "view.frame", retainSelf: false)
```
### `rx.observeWeakly`
### `rx_observeWeakly`
`rx.observeWeakly` has somewhat slower than `rx.observe` because it has to handle object deallocation in case of weak references.
`rx_observeWeakly` has somewhat slower than `rx_observe` because it has to handle object deallocation in case of weak references.
It can be used in all cases where `rx.observe` can be used and additionally
It can be used in all cases where `rx_observe` can be used and additionally
* because it won't retain observed target, it can be used to observe arbitrary object graph whose ownership relation is unknown
* it can be used to observe `weak` properties
@ -994,7 +993,7 @@ It can be used in all cases where `rx.observe` can be used and additionally
E.g.
```swift
someSuspiciousViewController.rx.observeWeakly(Bool.self, "behavingOk")
someSuspiciousViewController.rx_observeWeakly(Bool.self, "behavingOk")
```
### Observing structs
@ -1005,7 +1004,7 @@ KVO is an Objective-C mechanism so it relies heavily on `NSValue`.
When observing some other structures it is necessary to extract those structures from `NSValue` manually.
[Here](../RxCocoa/Common/KVORepresentable+CoreGraphics.swift) are examples how to extend KVO observing mechanism and `rx.observe*` methods for other structs by implementing `KVORepresentable` protocol.
[Here](../RxCocoa/Common/KVORepresentable+CoreGraphics.swift) are examples how to extend KVO observing mechanism and `rx_observe*` methods for other structs by implementing `KVORepresentable` protocol.
## UI layer tips
@ -1071,18 +1070,18 @@ let request = NSURLRequest(URL: NSURL(string: "http://en.wikipedia.org/w/api.php
If you want to just execute that request outside of composition with other observables, this is what needs to be done.
```swift
let responseJSON = NSURLSession.sharedSession().rx.JSON(request)
let responseJSON = NSURLSession.sharedSession().rx_JSON(request)
// no requests will be performed up to this point
// `responseJSON` is just a description how to fetch the response
let cancelRequest = responseJSON
// this will fire the request
.subscribe(onNext: { json in
.subscribeNext { json in
print(json)
})
}
NSThread.sleep(forTimeInterval: 3.0)
NSThread.sleepForTimeInterval(3)
// if you want to cancel request after 3 seconds have passed just call
cancelRequest.dispose()
@ -1094,7 +1093,7 @@ cancelRequest.dispose()
In case you want a more low level access to response, you can use:
```swift
NSURLSession.shared.rx.response(myNSURLRequest)
NSURLSession.sharedSession().rx_response(myNSURLRequest)
.debug("my request") // this will print out information to console
.flatMap { (data: NSData!, response: NSURLResponse!) -> Observable<String> in
if let response = response as? NSHTTPURLResponse {

View File

@ -0,0 +1,45 @@
**Please copy the following template [here](https://github.com/ReactiveX/RxSwift/issues/new) and fill in the missing fields so we can help you as soon as possible.**
**If you don't have something to report in the following format, it will probably be easier and faster to ask in the [slack channel](http://http://slack.rxswift.org/) first.**
```
*Short description*:
description here
*Code that reproduces the issue*:
code goes here
*Xcode version*:
Xcode version goes here
*Expected outcome*:
what you expect to happen goes here
*What actually happens*:
what actually happens goes here
// filling in additional information below is optional, but resolving your issue could potentially be a lot faster
*Installation method*:
(so we don't waste time investigating an incorrect integration)
* CocoaPods
* Carthage
* Git submodules
*I have multiple versions of Xcode installed*:
(so we can know if this is a potential cause of your issue)
* yes (which ones)
* no
*Level of RxSwift knowledge*:
(this is so we can understand your level of knowledge
and formulate the response in an appropriate manner)
* just starting
* I have a small code base
* I have a significant code base
```

View File

@ -28,4 +28,4 @@ What works:
What doesn't work:
* Schedulers - because they are dependent on https://github.com/apple/swift-corelibs-libdispatch and it still hasn't been released
* Multithreading - still no access to c11 locks
* For some reason it looks like Swift compiler generates wrong code when using `Swift.Error` on `Linux`, so don't use errors, otherwise you can get weird crashes.
* For some reason it looks like Swift compiler generates wrong code when using `ErrorType` on `Linux`, so don't use errors, otherwise you can get weird crashes.

View File

@ -13,7 +13,7 @@ There are two main operators that work with schedulers, `observeOn` and `subscri
If you want to perform work on a different scheduler just use `observeOn(scheduler)` operator.
You would usually use `observeOn` a lot more often than `subscribeOn`.
You would usually use `observeOn` a lot more often then `subscribeOn`.
In case `observeOn` isn't explicitly specified, work will be performed on whichever thread/scheduler elements are generated.
@ -33,7 +33,7 @@ sequence1
If you want to start sequence generation (`subscribe` method) and call dispose on a specific scheduler, use `subscribeOn(scheduler)`.
In case `subscribeOn` isn't explicitly specified, the `subscribe` method will be called on the same thread/scheduler on which `subscribe(onNext:)` or `subscribe` is called.
In case `subscribeOn` isn't explicitly specified, the `subscribe` method will be called on the same thread/scheduler on which `subscribeNext` or `subscribe` is called.
In case `subscribeOn` isn't explicitly specified, the `dispose` method will be called on the same thread/scheduler that initiated disposing.

View File

@ -164,7 +164,7 @@ E.g.
This is a typical beginner example.
```swift
let results = query.rx.text
let results = query.rx_text
.throttle(0.3, scheduler: MainScheduler.instance)
.flatMapLatest { query in
fetchAutoCompleteItems(query)
@ -172,11 +172,11 @@ let results = query.rx.text
results
.map { "\($0.count)" }
.bindTo(resultCount.rx.text)
.bindTo(resultCount.rx_text)
.addDisposableTo(disposeBag)
results
.bindTo(resultsTableView.rx.itemsWithCellIdentifier("Cell")) { (_, result, cell) in
.bindTo(resultsTableView.rx_itemsWithCellIdentifier("Cell")) { (_, result, cell) in
cell.textLabel?.text = "\(result)"
}
.addDisposableTo(disposeBag)
@ -195,7 +195,7 @@ So, what are the problems with this code?:
A more appropriate version of the code would look like this:
```swift
let results = query.rx.text
let results = query.rx_text
.throttle(0.3, scheduler: MainScheduler.instance)
.flatMapLatest { query in
fetchAutoCompleteItems(query)
@ -207,11 +207,11 @@ let results = query.rx.text
results
.map { "\($0.count)" }
.bindTo(resultCount.rx.text)
.bindTo(resultCount.rx_text)
.addDisposableTo(disposeBag)
results
.bindTo(resultTableView.rx.itemsWithCellIdentifier("Cell")) { (_, result, cell) in
.bindTo(resultTableView.rx_itemsWithCellIdentifier("Cell")) { (_, result, cell) in
cell.textLabel?.text = "\(result)"
}
.addDisposableTo(disposeBag)
@ -222,7 +222,7 @@ Making sure all of these requirements are properly handled in large systems can
The following code looks almost the same:
```swift
let results = query.rx.text.asDriver() // This converts a normal sequence into a `Driver` sequence.
let results = query.rx_text.asDriver() // This converts a normal sequence into a `Driver` sequence.
.throttle(0.3, scheduler: MainScheduler.instance)
.flatMapLatest { query in
fetchAutoCompleteItems(query)
@ -231,11 +231,11 @@ let results = query.rx.text.asDriver() // This converts a normal sequence
results
.map { "\($0.count)" }
.drive(resultCount.rx.text) // If there is a `drive` method available instead of `bindTo`,
.drive(resultCount.rx_text) // If there is a `drive` method available instead of `bindTo`,
.addDisposableTo(disposeBag) // that means that the compiler has proven that all properties
// are satisfied.
results
.drive(resultTableView.rx.itemsWithCellIdentifier("Cell")) { (_, result, cell) in
.drive(resultTableView.rx_itemsWithCellIdentifier("Cell")) { (_, result, cell) in
cell.textLabel?.text = "\(result)"
}
.addDisposableTo(disposeBag)
@ -246,7 +246,7 @@ So what is happening here?
This first `asDriver` method converts the `ControlProperty` unit to a `Driver` unit.
```swift
query.rx.text.asDriver()
query.rx_text.asDriver()
```
Notice that there wasn't anything special that needed to be done. `Driver` has all of the properties of the `ControlProperty` unit, plus some more. The underlying observable sequence is just wrapped as a `Driver` unit, and that's it.

View File

@ -55,7 +55,7 @@ _ = xs
.filter { ... }
.map { ... }
.switchLatest()
.takeUntil(someObject.deallocated) // <-- note the `takeUntil` operator
.takeUntil(someObject.rx_deallocated) // <-- note the `takeUntil` operator
.subscribe(onNext: {
...
}, onError: {
@ -114,9 +114,9 @@ let disposeBag = DisposeBag()
xs
.filter { ... }
.map { ... }
.subscribe(onNext: { nextElement in // <-- note the `subscribe*` method
.subscribeNext { nextElement in // <-- note the `subscribe*` method
// use the element
print(nextElement)
})
}
.addDisposableTo(disposeBag)
```

View File

@ -1,51 +0,0 @@
:warning: If you don't have something to report in the following format, it will probably be easier and faster to ask in the [slack channel](http://http://slack.rxswift.org/) first. :warning:
**Short description of the issue**:
_description here_
**Self contained code example that reproduces the issue**:
```swift
code goes here
// If we can't get a self contained code example that reproduces the issue, there is a big chance we won't be able
// to help you because there is not much we can do.
// `Self contained code example` means:
// * that we should be able to just run the provided code without changing it.
// * that it will reproduce the issue upon running
```
**Xcode version**:
```
Xcode version goes here
```
**Expected outcome**:
_what you expect to happen goes here_
**What actually happens**:
_what actually happens goes here_
:warning: Fields below are optional for general issues or in case those questions aren't related to your issue, but filling them out will increase the chances of getting your issue resolved. :warning:
**Installation method**:
- [ ] CocoaPods
- [ ] Carthage
- [ ] Git submodules
**I have multiple versions of Xcode installed**:
(so we can know if this is a potential cause of your issue)
- [ ] yes (which ones)
- [ ] no
**Level of RxSwift knowledge**:
(this is so we can understand your level of knowledge
and formulate the response in an appropriate manner)
- [ ] just starting
- [ ] I have a small code base
- [ ] I have a significant code base

View File

@ -3,6 +3,11 @@ import PackageDescription
#if os(OSX)
let package = Package(
name: "RxSwift",
exclude: [
"Sources/RxCocoa",
"Sources/RxTests",
"Sources/AllTests"
],
targets: [
Target(
name: "RxSwift"
@ -27,16 +32,14 @@ let package = Package(
.Target(name: "RxTests")
]
)
],
exclude: [
"Sources/RxCocoa",
"Sources/RxTests",
"Sources/AllTests"
]
)
#elseif os(Linux)
let package = Package(
name: "RxSwift",
exclude: [
"Sources/RxCocoa",
],
targets: [
Target(
name: "RxSwift"
@ -61,9 +64,6 @@ let package = Package(
.Target(name: "RxTests")
]
)
],
exclude: [
"Sources/RxCocoa",
]
)
#endif

View File

@ -166,7 +166,6 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
@ -202,7 +201,6 @@
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_VERSION = 3.0;
};
name = Release;
};

View File

@ -16,29 +16,28 @@ if Process.argc != 3 {
let sourceFilesRoot = Process.arguments[1]
let derivedData = Process.arguments[2]
let fileManager = FileManager()
let fileManager = NSFileManager()
func escape(value: String) -> String {
let escapedString = value.replacingOccurrences(of: "\n", with: "\\n")
let escapedString1 = escapedString.replacingOccurrences(of: "\r", with: "\\r")
let escapedString2 = escapedString1.replacingOccurrences(of: "\"", with: "\\\"")
let escapedString = value.stringByReplacingOccurrencesOfString("\n", withString: "\\n")
let escapedString1 = escapedString.stringByReplacingOccurrencesOfString("\r", withString: "\\r")
let escapedString2 = escapedString1.stringByReplacingOccurrencesOfString("\"", withString: "\\\"")
return "\"\(escapedString2)\""
}
func processFile(path: String, outputPath: String) -> String {
let url = URL(fileURLWithPath: path)
let rawContent = try! Data(contentsOf: url)
let content = String(data: rawContent, encoding: String.Encoding.utf8)
let rawContent = NSData(contentsOfFile: path)!
let content = NSString(data: rawContent, encoding: NSUTF8StringEncoding)! as String
guard let components = content?.components(separatedBy: "<%") else { return "" }
let components = content.componentsSeparatedByString("<%")
var functionContentComponents: [String] = []
functionContentComponents.append("var components: [String] = [\"// This file is autogenerated. Take a look at `Preprocessor` target in RxSwift project \\n\"]\n")
functionContentComponents.append("components.append(\(escape(value: components[0])))\n")
functionContentComponents.append("components.append(\(escape(components[0])))\n")
for codePlusSuffix in (components[1 ..< components.count]) {
let codePlusSuffixSeparated = codePlusSuffix.components(separatedBy: "%>")
let codePlusSuffixSeparated = codePlusSuffix.componentsSeparatedByString("%>")
if codePlusSuffixSeparated.count != 2 {
fatalError("Error in \(path) near \(codePlusSuffix)")
}
@ -47,24 +46,24 @@ func processFile(path: String, outputPath: String) -> String {
let suffix = codePlusSuffixSeparated[1]
if code.hasPrefix("=") {
functionContentComponents.append("components.append(String(\(code.substring(from: code.index(after: code.startIndex)))))\n")
functionContentComponents.append("components.append(String(\(code.substringFromIndex(code.startIndex.successor()))))\n")
}
else {
functionContentComponents.append("\(code)\n")
}
functionContentComponents.append("components.append(\(escape(value: suffix)));\n")
functionContentComponents.append("components.append(\(escape(suffix)));\n")
}
functionContentComponents.append("try! components.joined(separator:\"\").write(toFile:\"\(outputPath)\", atomically: false, encoding: String.Encoding.utf8)")
functionContentComponents.append("try! components.joinWithSeparator(\"\").writeToFile(\"\(outputPath)\", atomically: false, encoding: NSUTF8StringEncoding)")
return functionContentComponents.joined(separator: "")
return functionContentComponents.joinWithSeparator("")
}
func runCommand(path: String) {
_ = ProcessInfo().processIdentifier
_ = NSProcessInfo().processIdentifier
let task = Task()
let task = NSTask()
task.launchPath = "/bin/bash"
task.arguments = ["-c", "xcrun swift \"\(path)\""]
@ -72,34 +71,34 @@ func runCommand(path: String) {
task.waitUntilExit()
if task.terminationReason != Task.TerminationReason.exit {
if task.terminationReason != NSTaskTerminationReason.Exit {
exit(-1)
}
}
let files = try fileManager.subpathsOfDirectory(atPath: sourceFilesRoot)
let files = fileManager.subpathsAtPath(sourceFilesRoot)
var generateAllFiles = ["// Generated code\n", "import Foundation\n"]
for file in files {
for file in files! {
if ((file as NSString).pathExtension ?? "") != "tt" {
continue
}
print(file)
let path = (sourceFilesRoot as NSString).appendingPathComponent(file as String)
let endIndex = path.index(before: path.index(before: path.index(before: path.endIndex)))
let outputPath = path.substring(to: endIndex) + ".swift"
let path = (sourceFilesRoot as NSString).stringByAppendingPathComponent(file as String)
generateAllFiles.append("_ = { () -> Void in\n\(processFile(path: path, outputPath: outputPath))\n}()\n")
let outputPath = path.substringToIndex(path.endIndex.predecessor().predecessor().predecessor()) + ".swift"
generateAllFiles.append("_ = { () -> Void in\n\(processFile(path, outputPath: outputPath))\n}()\n")
}
let script = generateAllFiles.joined(separator: "")
let scriptPath = (derivedData as NSString).appendingPathComponent("_preprocessor.sh")
let script = generateAllFiles.joinWithSeparator("")
let scriptPath = (derivedData as NSString).stringByAppendingPathComponent("_preprocessor.sh")
do {
try script.write(toFile: scriptPath, atomically: true, encoding: String.Encoding.utf8)
try script.writeToFile(scriptPath, atomically: true, encoding: NSUTF8StringEncoding)
} catch _ {
}
runCommand(path: scriptPath)
runCommand(scriptPath)

View File

@ -3,12 +3,10 @@
[![Travis CI](https://travis-ci.org/ReactiveX/RxSwift.svg?branch=master)](https://travis-ci.org/ReactiveX/RxSwift) ![platforms](https://img.shields.io/badge/platforms-iOS%20%7C%20OSX%20%7C%20tvOS%20%7C%20watchOS%20%7C%20Linux%28experimental%29-333333.svg) ![pod](https://img.shields.io/cocoapods/v/RxSwift.svg) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
Xcode 7.3 Swift 2.2 required
## About Rx
**:warning: This readme describes RxSwift 3.0 version that requires Swift 3.0:warning:**
**:warning: If you are looking for Swift 2.3 compatible version, please take a look at RxSwift ~> 2.0 versions and [swift-2.3](https://github.com/ReactiveX/RxSwift/tree/rxswift-2.0) branch :warning:**
Rx is a [generic abstraction of computation](https://youtu.be/looJcaeboBY) expressed through `Observable<Element>` interface.
This is a Swift version of [Rx](https://github.com/Reactive-Extensions/Rx.NET).
@ -35,7 +33,6 @@ KVO observing, async operations and streams are all unified under [abstraction o
* [what are hot and cold observable sequences?](Documentation/HotAndColdObservables.md)
* [what does the the public API look like?](Documentation/API.md)
###### ... install
* Integrate RxSwift/RxCocoa with my app. [Installation Guide](Documentation/Installation.md)
@ -47,8 +44,8 @@ KVO observing, async operations and streams are all unified under [abstraction o
###### ... interact
* All of this is great, but it would be nice to talk with other people using RxSwift and exchange experiences. <br />[![Slack channel](http://rxswift-slack.herokuapp.com/badge.svg)](http://slack.rxswift.org) [Join Slack Channel](http://rxswift-slack.herokuapp.com)
* Report a problem using the library. [Open an Issue With Bug Template](ISSUE_TEMPLATE.md)
* All of this is great, but it would be nice to talk with other people using RxSwift and exchange experiences. <br />[![Slack channel](http://slack.rxswift.org/badge.svg)](http://slack.rxswift.org) [Join Slack Channel](http://slack.rxswift.org/)
* Report a problem using the library. [Open an Issue With Bug Template](Documentation/IssueTemplate.md)
* Request a new feature. [Open an Issue With Feature Request Template](Documentation/NewFeatureRequestTemplate.md)
@ -80,7 +77,7 @@ KVO observing, async operations and streams are all unified under [abstraction o
</tr>
<tr>
<td><div class="highlight highlight-source-swift"><pre>
let searchResults = searchBar.rx.text
let searchResults = searchBar.rx_text
.throttle(0.3, scheduler: MainScheduler.instance)
.distinctUntilChanged()
.flatMapLatest { query -> Observable<[Repository]> in
@ -99,7 +96,7 @@ let searchResults = searchBar.rx.text
<tr>
<td width="30%"><div class="highlight highlight-source-swift"><pre>
searchResults
.bindTo(tableView.rx.items(cellIdentifier: "Cell")) {
.bindTo(tableView.rx_itemsWithCellIdentifier("Cell")) {
(index, repository: Repository, cell) in
cell.textLabel?.text = repository.name
cell.detailTextLabel?.text = repository.url
@ -109,16 +106,6 @@ searchResults
</table>
## Requirements
* Xcode 8.0 beta 6 (8S201h)
* Swift 3.0
* iOS 8.0+
* Mac OS X 10.10+
* tvOS 9.0+
* watchOS 2.0+
## Installation
Rx doesn't contain any external dependencies.
@ -131,48 +118,38 @@ Open Rx.xcworkspace, choose `RxExample` and hit run. This method will build ever
### [CocoaPods](https://guides.cocoapods.org/using/using-cocoapods.html)
**:warning: IMPORTANT! For tvOS support, CocoaPods `0.39` is required. :warning:**
```
# Podfile
use_frameworks!
target 'YOUR_TARGET_NAME' do
pod 'RxSwift', '~> 3.0.0.alpha.1'
pod 'RxCocoa', '~> 3.0.0.alpha.1'
pod 'RxSwift', '~> 2.0'
pod 'RxCocoa', '~> 2.0'
end
# RxTests and RxBlocking make the most sense in the context of unit/integration tests
target 'YOUR_TESTING_TARGET' do
pod 'RxBlocking', '~> 3.0.0.alpha.1'
pod 'RxTests', '~> 3.0.0.alpha.1'
pod 'RxBlocking', '~> 2.0'
pod 'RxTests', '~> 2.0'
end
```
Replace `YOUR_TARGET_NAME` and then, in the `Podfile` directory, type:
**:warning: If you want to use CocoaPods with Xcode 8.0 beta and Swift 3.0, you might need to add the following
lines to your podfile: :warning:**
```
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.10'
end
end
end
```
```
$ pod install
```
### [Carthage](https://github.com/Carthage/Carthage)
**Xcode 7.1 required**
Add this to `Cartfile`
```
github "ReactiveX/RxSwift" "3.0.0.alpha.1"
github "ReactiveX/RxSwift" ~> 2.0
```
```

View File

@ -22,7 +22,7 @@ example("startWith") {
.startWith("1")
.startWith("2")
.startWith("3", "🅰️", "🅱️")
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
/*:
@ -40,7 +40,7 @@ example("merge") {
Observable.of(subject1, subject2)
.merge()
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
subject1.onNext("🅰️")
@ -70,7 +70,7 @@ example("zip") {
Observable.zip(stringSubject, intSubject) { stringElement, intElement in
"\(stringElement) \(intElement)"
}
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
stringSubject.onNext("🅰️")
@ -98,7 +98,7 @@ example("combineLatest") {
Observable.combineLatest(stringSubject, intSubject) { stringElement, intElement in
"\(stringElement) \(intElement)"
}
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
stringSubject.onNext("🅰️")
@ -115,13 +115,13 @@ example("Array.combineLatest") {
let disposeBag = DisposeBag()
let stringObservable = Observable.just("❤️")
let fruitObservable = Observable.from(["🍎", "🍐", "🍊"])
let fruitObservable = ["🍎", "🍐", "🍊"].toObservable()
let animalObservable = Observable.of("🐶", "🐱", "🐭", "🐹")
[stringObservable, fruitObservable, animalObservable].combineLatest {
"\($0[0]) \($0[1]) \($0[2])"
}
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
/*:
@ -141,7 +141,7 @@ example("switchLatest") {
variable.asObservable()
.switchLatest()
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
subject1.onNext("🏈")

View File

@ -23,11 +23,11 @@ func sampleWithoutConnectableOperators() {
let interval = Observable<Int>.interval(1, scheduler: MainScheduler.instance)
_ = interval
.subscribe(onNext: { print("Subscription: 1, Event: \($0)") })
.subscribeNext { print("Subscription: 1, Event: \($0)") }
delay(5) {
_ = interval
.subscribe(onNext: { print("Subscription: 2, Event: \($0)") })
.subscribeNext { print("Subscription: 2, Event: \($0)") }
}
}
@ -47,18 +47,18 @@ func sampleWithPublish() {
.publish()
_ = intSequence
.subscribe(onNext: { print("Subscription 1:, Event: \($0)") })
.subscribeNext { print("Subscription 1:, Event: \($0)") }
delay(2) { _ = intSequence.connect() }
delay(2) { intSequence.connect() }
delay(4) {
_ = intSequence
.subscribe(onNext: { print("Subscription 2:, Event: \($0)") })
.subscribeNext { print("Subscription 2:, Event: \($0)") }
}
delay(6) {
_ = intSequence
.subscribe(onNext: { print("Subscription 3:, Event: \($0)") })
.subscribeNext { print("Subscription 3:, Event: \($0)") }
}
}
@ -79,18 +79,18 @@ func sampleWithReplayBuffer() {
.replay(5)
_ = intSequence
.subscribe(onNext: { print("Subscription 1:, Event: \($0)") })
.subscribeNext { print("Subscription 1:, Event: \($0)") }
delay(2) { _ = intSequence.connect() }
delay(2) { intSequence.connect() }
delay(4) {
_ = intSequence
.subscribe(onNext: { print("Subscription 2:, Event: \($0)") })
.subscribeNext { print("Subscription 2:, Event: \($0)") }
}
delay(8) {
_ = intSequence
.subscribe(onNext: { print("Subscription 3:, Event: \($0)") })
.subscribeNext { print("Subscription 3:, Event: \($0)") }
}
}
@ -107,24 +107,24 @@ func sampleWithMulticast() {
let subject = PublishSubject<Int>()
_ = subject
.subscribe(onNext: { print("Subject: \($0)") })
.subscribeNext { print("Subject: \($0)") }
let intSequence = Observable<Int>.interval(1, scheduler: MainScheduler.instance)
.multicast(subject)
_ = intSequence
.subscribe(onNext: { print("\tSubscription 1:, Event: \($0)") })
.subscribeNext { print("\tSubscription 1:, Event: \($0)") }
delay(2) { _ = intSequence.connect() }
delay(2) { intSequence.connect() }
delay(4) {
_ = intSequence
.subscribe(onNext: { print("\tSubscription 2:, Event: \($0)") })
.subscribeNext { print("\tSubscription 2:, Event: \($0)") }
}
delay(6) {
_ = intSequence
.subscribe(onNext: { print("\tSubscription 3:, Event: \($0)") })
.subscribeNext { print("\tSubscription 3:, Event: \($0)") }
}
}

View File

@ -63,13 +63,13 @@ example("of") {
let disposeBag = DisposeBag()
Observable.of("🐶", "🐱", "🐭", "🐹")
.subscribe(onNext: { element in
.subscribeNext { element in
print(element)
})
}
.addDisposableTo(disposeBag)
}
/*:
> This example also introduces using the `subscribe(onNext:)` convenience method. Unlike `subscribe(_:)`, which subscribes an _event_ handler for all event types (Next, Error, and Completed), `subscribe(onNext:)` subscribes an _element_ handler that will ignore Error and Completed events and only produce Next event elements. There are also `subscribe(onError:)` and `subscribe(onCompleted:)` convenience methods, should you only want to subscribe to those event types. And there is a `subscribe(onNext:onError:onCompleted:onDisposed:)` method, which allows you to react to one or more event types and when the subscription is terminated for any reason, or disposed, in a single call:
> This example also introduces using the `subscribeNext(_:)` convenience method. Unlike `subscribe(_:)`, which subscribes an _event_ handler for all event types (Next, Error, and Completed), `subscribeNext(_:)` subscribes an _element_ handler that will ignore Error and Completed events and only produce Next event elements. There are also `subscribeError(_:)` and `subscribeCompleted(_:)` convenience methods, should you only want to subscribe to those event types. And there is a `subscribe(onNext:onError:onCompleted:onDisposed:)` method, which allows you to react to one or more event types and when the subscription is terminated for any reason, or disposed, in a single call:
```
someObservable.subscribe(
onNext: { print("Element:", $0) },
@ -79,14 +79,14 @@ example("of") {
)
```
----
## from
## toObservable
Creates an `Observable` sequence from a `SequenceType`, such as an `Array`, `Dictionary`, or `Set`.
*/
example("from") {
example("toObservable") {
let disposeBag = DisposeBag()
Observable.from(["🐶", "🐱", "🐭", "🐹"])
.subscribe(onNext: { print($0) })
["🐶", "🐱", "🐭", "🐹"].toObservable()
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
/*:
@ -100,9 +100,9 @@ example("create") {
let myJust = { (element: String) -> Observable<String> in
return Observable.create { observer in
observer.on(.next(element))
observer.on(.completed)
return Disposables.create()
observer.on(.Next(element))
observer.on(.Completed)
return NopDisposable.instance
}
}
@ -132,7 +132,7 @@ example("repeatElement") {
Observable.repeatElement("🔴")
.take(3)
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
/*:
@ -149,7 +149,7 @@ example("generate") {
condition: { $0 < 3 },
iterate: { $0 + 1 }
)
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
/*:
@ -170,16 +170,16 @@ example("deferred") {
observer.onNext("🐶")
observer.onNext("🐱")
observer.onNext("🐵")
return Disposables.create()
return NopDisposable.instance
}
}
deferredSequence
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
deferredSequence
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
/*:
@ -190,7 +190,7 @@ example("deferred") {
example("error") {
let disposeBag = DisposeBag()
Observable<Int>.error(TestError.test)
Observable<Int>.error(Error.Test)
.subscribe { print($0) }
.addDisposableTo(disposeBag)
}
@ -203,8 +203,8 @@ example("doOn") {
let disposeBag = DisposeBag()
Observable.of("🍎", "🍐", "🍊", "🍋")
.do(onNext: { print("Intercepted:", $0) }, onError: { print("Intercepted error:", $0) }, onCompleted: { print("Completed") })
.subscribe(onNext: { print($0) })
.doOn { print("Intercepted:", $0) }
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
//: > There are also `doOnNext(_:)`, `doOnError(_:)`, and `doOnCompleted(_:)` convenience methods to intercept those specific events, and `doOn(onNext:onError:onCompleted:)` to intercept one or more events in a single call.

View File

@ -24,7 +24,7 @@ example("debug") {
observer.onNext("🍊")
if count < 5 {
observer.onError(TestError.test)
observer.onError(Error.Test)
print("Error encountered")
count += 1
}
@ -34,13 +34,13 @@ example("debug") {
observer.onNext("🐭")
observer.onCompleted()
return Disposables.create()
return NopDisposable.instance
}
sequenceThatErrors
.retry(3)
.debug()
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
/*:
@ -59,11 +59,11 @@ example("RxSwift.resourceCount") {
let variable = Variable("🍎")
let subscription1 = variable.asObservable().subscribe(onNext: { print($0) })
let subscription1 = variable.asObservable().subscribeNext { print($0) }
print(RxSwift.resourceCount)
let subscription2 = variable.asObservable().subscribe(onNext: { print($0) })
let subscription2 = variable.asObservable().subscribeNext { print($0) }
print(RxSwift.resourceCount)
@ -80,4 +80,4 @@ print(RxSwift.resourceCount)
#endif
//: > `RxSwift.resourceCount` is not enabled by default, and should generally not be enabled in Release builds. [Click here](Enable_RxSwift.resourceCount) for instructions on how to enable it.
//: [Next](@next) - [Table of Contents](Table_of_Contents)
//: [Table of Contents](Table_of_Contents)

View File

@ -29,7 +29,7 @@ example("catchErrorJustReturn") {
sequenceThatFails.onNext("😨")
sequenceThatFails.onNext("😡")
sequenceThatFails.onNext("🔴")
sequenceThatFails.onError(TestError.test)
sequenceThatFails.onError(Error.Test)
}
/*:
----
@ -55,7 +55,7 @@ example("catchError") {
sequenceThatFails.onNext("😨")
sequenceThatFails.onNext("😡")
sequenceThatFails.onNext("🔴")
sequenceThatFails.onError(TestError.test)
sequenceThatFails.onError(Error.Test)
recoverySequence.onNext("😊")
}
@ -75,7 +75,7 @@ example("retry") {
observer.onNext("🍊")
if count == 1 {
observer.onError(TestError.test)
observer.onError(Error.Test)
print("Error encountered")
count += 1
}
@ -85,12 +85,12 @@ example("retry") {
observer.onNext("🐭")
observer.onCompleted()
return Disposables.create()
return NopDisposable.instance
}
sequenceThatErrors
.retry()
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
/*:
@ -109,7 +109,7 @@ example("retry maxAttemptCount") {
observer.onNext("🍊")
if count < 5 {
observer.onError(TestError.test)
observer.onError(Error.Test)
print("Error encountered")
count += 1
}
@ -119,12 +119,12 @@ example("retry maxAttemptCount") {
observer.onNext("🐭")
observer.onCompleted()
return Disposables.create()
return NopDisposable.instance
}
sequenceThatErrors
.retry(3)
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}

View File

@ -25,7 +25,7 @@ example("filter") {
.filter {
$0 == "🐱"
}
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
/*:
@ -39,7 +39,7 @@ example("distinctUntilChanged") {
Observable.of("🐱", "🐷", "🐱", "🐱", "🐱", "🐵", "🐱")
.distinctUntilChanged()
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
/*:
@ -53,7 +53,7 @@ example("elementAt") {
Observable.of("🐱", "🐰", "🐶", "🐸", "🐷", "🐵")
.elementAt(3)
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
/*:
@ -66,7 +66,7 @@ example("single") {
Observable.of("🐱", "🐰", "🐶", "🐸", "🐷", "🐵")
.single()
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
@ -99,7 +99,7 @@ example("take") {
Observable.of("🐱", "🐰", "🐶", "🐸", "🐷", "🐵")
.take(3)
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
/*:
@ -113,7 +113,7 @@ example("takeLast") {
Observable.of("🐱", "🐰", "🐶", "🐸", "🐷", "🐵")
.takeLast(3)
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
/*:
@ -127,7 +127,7 @@ example("takeWhile") {
Observable.of(1, 2, 3, 4, 5, 6)
.takeWhile { $0 < 4 }
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
/*:
@ -168,7 +168,7 @@ example("skip") {
Observable.of("🐱", "🐰", "🐶", "🐸", "🐷", "🐵")
.skip(2)
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
/*:
@ -182,7 +182,7 @@ example("skipWhile") {
Observable.of(1, 2, 3, 4, 5, 6)
.skipWhile { $0 < 4 }
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
/*:
@ -197,7 +197,7 @@ example("skipWhileWithIndex") {
.skipWhileWithIndex { element, index in
index < 3
}
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
/*:
@ -214,7 +214,7 @@ example("skipUntil") {
sourceSequence
.skipUntil(referenceSequence)
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
sourceSequence.onNext("🐱")

View File

@ -7,9 +7,7 @@
----
[Previous](@previous)
*/
import RxSwift
/*:
# Introduction
@ -32,11 +30,11 @@ All of these various systems makes our code needlessly complex. Wouldn't it be b
* `ObservableType.subscribe(_:)` takes an observer (`ObserverType`) parameter, which will be subscribed to automatically receive sequence events and elements emitted by the `Observable`, instead of manually calling `next()` on the returned generator.
*/
/*:
If an `Observable` emits a next event (`Event.next(Element)`), it can continue to emit more events. However, if the `Observable` emits either an error event (`Event.error(ErrorType)`) or a completed event (`Event.completed`), the `Observable` sequence cannot emit additional events to the subscriber.
If an `Observable` emits a Next event (`Event.Next(Element)`), it can continue to emit more events. However, if the `Observable` emits either an Error event (`Event.Error(ErrorType)`) or a Completed event (`Event.Completed`), the `Observable` sequence cannot emit additional events to the subscriber.
Sequence grammar explains this more concisely:
`next* (error | completed)?`
`Next* (Error | Completed)?`
And this can also be explained more visually using diagrams:
@ -46,7 +44,7 @@ All of these various systems makes our code needlessly complex. Wouldn't it be b
`--tap--tap----------tap--> // "|" = Continues indefinitely, such as a sequence of button taps`
> These diagrams are called marble diagrams. You can learn more about them at [RxMarbles.com](http://rxmarbles.com).
> These diagrams are call marble diagrams. You can learn more about them at [RxMarbles.com](http://rxmarbles.com).
*/
/*:
### Observables and observers (aka subscribers)
@ -56,9 +54,9 @@ All of these various systems makes our code needlessly complex. Wouldn't it be b
example("Observable with no subscribers") {
_ = Observable<String>.create { observerOfString -> Disposable in
print("This will never be printed")
observerOfString.on(.next("😬"))
observerOfString.on(.completed)
return Disposables.create()
observerOfString.on(.Next("😬"))
observerOfString.on(.Completed)
return NopDisposable.instance
}
}
/*:
@ -66,11 +64,11 @@ example("Observable with no subscribers") {
In the following example, the closure will be executed when `subscribe(_:)` is called:
*/
example("Observable with subscriber") {
_ = Observable<String>.create { observerOfString in
_ = Observable<String>.create { observerOfString in
print("Observable created")
observerOfString.on(.next("😉"))
observerOfString.on(.completed)
return Disposables.create()
observerOfString.on(.Next("😉"))
observerOfString.on(.Completed)
return NopDisposable.instance
}
.subscribe { event in
print(event)

View File

@ -34,7 +34,7 @@ example("reduce") {
Observable.of(10, 100, 1000)
.reduce(1, accumulator: +)
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
/*:

View File

@ -19,7 +19,7 @@ example("map") {
let disposeBag = DisposeBag()
Observable.of(1, 2, 3)
.map { $0 * $0 }
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}
/*:
@ -42,7 +42,7 @@ example("flatMap and flatMapLatest") {
player.asObservable()
.flatMap { $0.score.asObservable() } // Change flatMap to flatMapLatest and observe change in printed output
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
👦🏻.score.value = 85
@ -71,7 +71,7 @@ example("scan") {
.scan(1) { aggregateValue, newValue in
aggregateValue + newValue
}
.subscribe(onNext: { print($0) })
.subscribeNext { print($0) }
.addDisposableTo(disposeBag)
}

View File

@ -18,7 +18,7 @@ extension ObservableType {
Add observer with `id` and print each emitted event.
- parameter id: an identifier for the subscription.
*/
func addObserver(_ id: String) -> Disposable {
func addObserver(id: String) -> Disposable {
return subscribe { print("Subscription:", id, "Event:", $0) }
}
@ -47,7 +47,7 @@ example("PublishSubject") {
subject.onNext("🅱️")
}
/*:
> This example also introduces using the `onNext(_:)` convenience method, equivalent to `on(.next(_:)`, which causes a new Next event to be emitted to subscribers with the provided `element`. There are also `onError(_:)` and `onCompleted()` convenience methods, equivalent to `on(.error(_:))` and `on(.completed)`, respectively.
> This example also introduces using the `onNext(_:)` convenience method, equivalent to `on(.Next(_:)`, which causes a new Next event to be emitted to subscribers with the provided `element`. There are also `onError(_:)` and `onCompleted()` convenience methods, equivalent to `on(.Error(_:))` and `on(.Completed)`, respectively.
----
## ReplaySubject
Broadcasts new events to all subscribers, and the specified `bufferSize` number of previous events to new subscribers.

View File

@ -5,31 +5,32 @@ import Foundation
- parameter description: example description
- parameter action: `Void` closure
*/
public func example(_ description: String, action: (Void) -> Void) {
public func example(description: String, @noescape action: Void -> Void) {
printExampleHeader(description)
action()
}
public func printExampleHeader(_ description: String) {
public func printExampleHeader(description: String) {
print("\n--- \(description) example ---")
}
public enum TestError: Swift.Error {
case test
public enum Error: ErrorType {
case Test
}
/**
Executes `closure` on main thread after `delay` seconds.
- parameter delay: time in seconds to wait before executing `closure`
- parameter closure: `Void` closure
*/
public func delay(_ delay: Double, closure: @escaping (Void) -> Void) {
let delayTime = DispatchTime.now() + DispatchTimeInterval.seconds(Int(delay))
DispatchQueue.main.asyncAfter(deadline: delayTime) {
closure()
}
public func delay(delay: Double, closure: Void -> Void) {
dispatch_after(
dispatch_time(
DISPATCH_TIME_NOW,
Int64(delay * Double(NSEC_PER_SEC))
),
dispatch_get_main_queue(),
closure)
}
#if NOT_IN_PLAYGROUND
@ -38,10 +39,10 @@ public func delay(_ delay: Double, closure: @escaping (Void) -> Void) {
#else
import PlaygroundSupport
import XCPlayground
public func playgroundShouldContinueIndefinitely() {
PlaygroundPage.current.needsIndefiniteExecution = true
XCPlaygroundPage.currentPage.needsIndefiniteExecution = true
}
#endif

View File

@ -1,12 +0,0 @@
[
{
"file": "/Users/mo/Documents/OpenSource/RxSwift/Rx.playground/Sources/SupportCode.swift",
"offset": 276,
"remove": 9,
},
{
"file": "/Users/mo/Documents/OpenSource/RxSwift/Rx.playground/Sources/SupportCode.swift",
"offset": 733,
"text": "@escaping ",
}
]

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<playground version='6.0' target-platform='osx' display-mode='raw' last-migration='0800'>
<playground version='6.0' target-platform='osx' display-mode='rendered'>
<pages>
<page name='Table_of_Contents'/>
<page name='Introduction'/>

View File

@ -66,7 +66,6 @@
84E4D3931C9AFD3500ADFDC9 /* UISearchController+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E4D3901C9AFCD500ADFDC9 /* UISearchController+Rx.swift */; };
84E4D3941C9AFD3600ADFDC9 /* UISearchController+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E4D3901C9AFCD500ADFDC9 /* UISearchController+Rx.swift */; };
84E4D3961C9B011000ADFDC9 /* UISearchController+RxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E4D3951C9B011000ADFDC9 /* UISearchController+RxTests.swift */; };
87379AE01D61C6F50047CA88 /* Reactive.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2F461001CD7ABE400527B4D /* Reactive.swift */; };
88718CFE1CE5D80000D88D60 /* UITabBar+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88718CFD1CE5D80000D88D60 /* UITabBar+Rx.swift */; };
88718CFF1CE5D80000D88D60 /* UITabBar+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88718CFD1CE5D80000D88D60 /* UITabBar+Rx.swift */; };
88718D011CE5DE2600D88D60 /* UITabBar+RxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88718D001CE5DE2500D88D60 /* UITabBar+RxTests.swift */; };
@ -122,6 +121,8 @@
C8093CDE1B8A72BE0088E94D /* DisposeBag.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C581B8A72BE0088E94D /* DisposeBag.swift */; };
C8093CDF1B8A72BE0088E94D /* DisposeBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C591B8A72BE0088E94D /* DisposeBase.swift */; };
C8093CE01B8A72BE0088E94D /* DisposeBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C591B8A72BE0088E94D /* DisposeBase.swift */; };
C8093CE11B8A72BE0088E94D /* NAryDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C5A1B8A72BE0088E94D /* NAryDisposable.swift */; };
C8093CE21B8A72BE0088E94D /* NAryDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C5A1B8A72BE0088E94D /* NAryDisposable.swift */; };
C8093CE51B8A72BE0088E94D /* NopDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C5C1B8A72BE0088E94D /* NopDisposable.swift */; };
C8093CE61B8A72BE0088E94D /* NopDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C5C1B8A72BE0088E94D /* NopDisposable.swift */; };
C8093CE71B8A72BE0088E94D /* ScheduledDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C5D1B8A72BE0088E94D /* ScheduledDisposable.swift */; };
@ -138,8 +139,8 @@
C8093CF61B8A72BE0088E94D /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C641B8A72BE0088E94D /* Event.swift */; };
C8093CF71B8A72BE0088E94D /* ImmediateSchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C651B8A72BE0088E94D /* ImmediateSchedulerType.swift */; };
C8093CF81B8A72BE0088E94D /* ImmediateSchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C651B8A72BE0088E94D /* ImmediateSchedulerType.swift */; };
C8093CFB1B8A72BE0088E94D /* ObservableType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C671B8A72BE0088E94D /* ObservableType+Extensions.swift */; };
C8093CFC1B8A72BE0088E94D /* ObservableType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C671B8A72BE0088E94D /* ObservableType+Extensions.swift */; };
C8093CFB1B8A72BE0088E94D /* Observable+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C671B8A72BE0088E94D /* Observable+Extensions.swift */; };
C8093CFC1B8A72BE0088E94D /* Observable+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C671B8A72BE0088E94D /* Observable+Extensions.swift */; };
C8093CFD1B8A72BE0088E94D /* Observable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C681B8A72BE0088E94D /* Observable.swift */; };
C8093CFE1B8A72BE0088E94D /* Observable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C681B8A72BE0088E94D /* Observable.swift */; };
C8093CFF1B8A72BE0088E94D /* Amb.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C6B1B8A72BE0088E94D /* Amb.swift */; };
@ -351,10 +352,6 @@
C80DDEB21BCE8CA3006A1832 /* Driver+Operators+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = C80DDEB01BCE8CA3006A1832 /* Driver+Operators+arity.swift */; };
C80DDEB31BCE8CA3006A1832 /* Driver+Operators+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = C80DDEB01BCE8CA3006A1832 /* Driver+Operators+arity.swift */; };
C80DDEB41BCE8CA3006A1832 /* Driver+Operators+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = C80DDEB01BCE8CA3006A1832 /* Driver+Operators+arity.swift */; };
C80EEC341D42D06E00131C39 /* DispatchQueueConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C80EEC331D42D06E00131C39 /* DispatchQueueConfiguration.swift */; };
C80EEC351D42D06E00131C39 /* DispatchQueueConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C80EEC331D42D06E00131C39 /* DispatchQueueConfiguration.swift */; };
C80EEC361D42D06E00131C39 /* DispatchQueueConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C80EEC331D42D06E00131C39 /* DispatchQueueConfiguration.swift */; };
C80EEC371D42D06E00131C39 /* DispatchQueueConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C80EEC331D42D06E00131C39 /* DispatchQueueConfiguration.swift */; };
C811C89D1C24D80100A2DDD4 /* DeallocObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C811C89C1C24D80100A2DDD4 /* DeallocObservable.swift */; };
C811C89E1C24D80100A2DDD4 /* DeallocObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C811C89C1C24D80100A2DDD4 /* DeallocObservable.swift */; };
C811C89F1C24D80100A2DDD4 /* DeallocObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C811C89C1C24D80100A2DDD4 /* DeallocObservable.swift */; };
@ -370,6 +367,7 @@
C83100661BF7D51600AAE3CD /* Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = C83100631BF7D51600AAE3CD /* Sequence.swift */; };
C83100671BF7D51600AAE3CD /* Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = C83100631BF7D51600AAE3CD /* Sequence.swift */; };
C83508C81C386F6F0027C24C /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C8A56AD71AD7424700B4673B /* RxSwift.framework */; };
C83509271C38706E0027C24C /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C83508D51C38706D0027C24C /* Info.plist */; };
C83509291C38706E0027C24C /* PerformanceTools.swift in Sources */ = {isa = PBXBuildFile; fileRef = C83508D71C38706D0027C24C /* PerformanceTools.swift */; };
C835092A1C38706E0027C24C /* CLLocationManager+RxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C83508D91C38706D0027C24C /* CLLocationManager+RxTests.swift */; };
C835092C1C38706E0027C24C /* Control+RxTests+UIKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = C83508DB1C38706D0027C24C /* Control+RxTests+UIKit.swift */; };
@ -557,8 +555,6 @@
C8350A231C38756B0027C24C /* VirtualSchedulerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C835091C1C38706D0027C24C /* VirtualSchedulerTest.swift */; };
C8350A2A1C3875B50027C24C /* RxMutableBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093CB01B8A72BE0088E94D /* RxMutableBox.swift */; };
C8350A2B1C3875B60027C24C /* RxMutableBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093CB01B8A72BE0088E94D /* RxMutableBox.swift */; };
C8379EF41D1DD326003EF8FC /* UIButton+RxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8379EF31D1DD326003EF8FC /* UIButton+RxTests.swift */; };
C8379EF51D1DD326003EF8FC /* UIButton+RxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8379EF31D1DD326003EF8FC /* UIButton+RxTests.swift */; };
C839365F1C70E02200A9A09E /* UIApplication+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = C839365E1C70E02200A9A09E /* UIApplication+Rx.swift */; };
C83D73B81C1DBAEE003DC470 /* AnonymousInvocable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C83D73B31C1DBAEE003DC470 /* AnonymousInvocable.swift */; };
C83D73B91C1DBAEE003DC470 /* AnonymousInvocable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C83D73B31C1DBAEE003DC470 /* AnonymousInvocable.swift */; };
@ -633,9 +629,6 @@
C86409FD1BA593F500D3C4E8 /* Range.swift in Sources */ = {isa = PBXBuildFile; fileRef = C86409FB1BA593F500D3C4E8 /* Range.swift */; };
C8640A031BA5B12A00D3C4E8 /* Repeat.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8640A021BA5B12A00D3C4E8 /* Repeat.swift */; };
C8640A041BA5B12A00D3C4E8 /* Repeat.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8640A021BA5B12A00D3C4E8 /* Repeat.swift */; };
C86B1E221D42BF5200130546 /* SchedulerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C86B1E211D42BF5200130546 /* SchedulerTests.swift */; };
C86B1E231D42BF5200130546 /* SchedulerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C86B1E211D42BF5200130546 /* SchedulerTests.swift */; };
C86B1E241D42BF5200130546 /* SchedulerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C86B1E211D42BF5200130546 /* SchedulerTests.swift */; };
C88254161B8A752B00B02D69 /* RxCollectionViewReactiveArrayDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88253F11B8A752B00B02D69 /* RxCollectionViewReactiveArrayDataSource.swift */; };
C88254171B8A752B00B02D69 /* RxTableViewReactiveArrayDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88253F21B8A752B00B02D69 /* RxTableViewReactiveArrayDataSource.swift */; };
C88254181B8A752B00B02D69 /* ItemEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88253F41B8A752B00B02D69 /* ItemEvents.swift */; };
@ -668,10 +661,10 @@
C88E296C1BEB712E001CCB92 /* RunLoopLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88E296A1BEB712E001CCB92 /* RunLoopLock.swift */; };
C88E296D1BEB712E001CCB92 /* RunLoopLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88E296A1BEB712E001CCB92 /* RunLoopLock.swift */; };
C88E296E1BEB712E001CCB92 /* RunLoopLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88E296A1BEB712E001CCB92 /* RunLoopLock.swift */; };
C88F76811CE5341700D5A014 /* TextInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88F76801CE5341700D5A014 /* TextInput.swift */; };
C88F76821CE5341700D5A014 /* TextInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88F76801CE5341700D5A014 /* TextInput.swift */; };
C88F76831CE5341700D5A014 /* TextInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88F76801CE5341700D5A014 /* TextInput.swift */; };
C88F76841CE5341700D5A014 /* TextInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88F76801CE5341700D5A014 /* TextInput.swift */; };
C88F76811CE5341700D5A014 /* RxTextInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88F76801CE5341700D5A014 /* RxTextInput.swift */; };
C88F76821CE5341700D5A014 /* RxTextInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88F76801CE5341700D5A014 /* RxTextInput.swift */; };
C88F76831CE5341700D5A014 /* RxTextInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88F76801CE5341700D5A014 /* RxTextInput.swift */; };
C88F76841CE5341700D5A014 /* RxTextInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88F76801CE5341700D5A014 /* RxTextInput.swift */; };
C8941BDF1BD5695C00A0E874 /* BlockingObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8941BDE1BD5695C00A0E874 /* BlockingObservable.swift */; };
C8941BE01BD5695C00A0E874 /* BlockingObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8941BDE1BD5695C00A0E874 /* BlockingObservable.swift */; };
C8941BE11BD5695C00A0E874 /* BlockingObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8941BDE1BD5695C00A0E874 /* BlockingObservable.swift */; };
@ -809,9 +802,6 @@
C8E7B36A1C30C6B800B34368 /* TestableObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8E7B3681C30C6B800B34368 /* TestableObservable.swift */; };
C8E7B36B1C30C6B800B34368 /* TestableObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8E7B3681C30C6B800B34368 /* TestableObservable.swift */; };
C8E7B36C1C30C6B800B34368 /* TestableObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8E7B3681C30C6B800B34368 /* TestableObservable.swift */; };
C8E9E42B1D43B26C0049644E /* Observable+DebugTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8E9E42A1D43B26C0049644E /* Observable+DebugTest.swift */; };
C8E9E42C1D43B26C0049644E /* Observable+DebugTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8E9E42A1D43B26C0049644E /* Observable+DebugTest.swift */; };
C8E9E42D1D43B26C0049644E /* Observable+DebugTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8E9E42A1D43B26C0049644E /* Observable+DebugTest.swift */; };
C8F0BF921BBBFB8B001B112F /* Observable+Creation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C981B8A72BE0088E94D /* Observable+Creation.swift */; };
C8F0BF931BBBFB8B001B112F /* ConnectableObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C4D1B8A72BE0088E94D /* ConnectableObservableType.swift */; };
C8F0BF941BBBFB8B001B112F /* Just.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8C3DA021B9390C4004D233E /* Just.swift */; };
@ -835,7 +825,7 @@
C8F0BFA61BBBFB8B001B112F /* ReplaySubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093CC01B8A72BE0088E94D /* ReplaySubject.swift */; };
C8F0BFA71BBBFB8B001B112F /* Zip+CollectionType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8C3D9FD1B935EDF004D233E /* Zip+CollectionType.swift */; };
C8F0BFA81BBBFB8B001B112F /* Observable+Time.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C9D1B8A72BE0088E94D /* Observable+Time.swift */; };
C8F0BFA91BBBFB8B001B112F /* ObservableType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C671B8A72BE0088E94D /* ObservableType+Extensions.swift */; };
C8F0BFA91BBBFB8B001B112F /* Observable+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C671B8A72BE0088E94D /* Observable+Extensions.swift */; };
C8F0BFAA1BBBFB8B001B112F /* Throttle.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C901B8A72BE0088E94D /* Throttle.swift */; };
C8F0BFAC1BBBFB8B001B112F /* Catch.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C6E1B8A72BE0088E94D /* Catch.swift */; };
C8F0BFAD1BBBFB8B001B112F /* CombineLatest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C711B8A72BE0088E94D /* CombineLatest.swift */; };
@ -906,6 +896,7 @@
C8F0BFF21BBBFB8B001B112F /* ObserverType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093CAB1B8A72BE0088E94D /* ObserverType.swift */; };
C8F0BFF31BBBFB8B001B112F /* SubscribeOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C8B1B8A72BE0088E94D /* SubscribeOn.swift */; };
C8F0BFF41BBBFB8B001B112F /* Observable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C681B8A72BE0088E94D /* Observable.swift */; };
C8F0BFF51BBBFB8B001B112F /* NAryDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C5A1B8A72BE0088E94D /* NAryDisposable.swift */; };
C8F0BFF61BBBFB8B001B112F /* SerialDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C5F1B8A72BE0088E94D /* SerialDisposable.swift */; };
C8F0BFF71BBBFB8B001B112F /* Never.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8C3DA0B1B93959F004D233E /* Never.swift */; };
C8F0BFF91BBBFB8B001B112F /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C641B8A72BE0088E94D /* Event.swift */; };
@ -996,6 +987,10 @@
CB30D9EA1BF0E3500084C1C0 /* SingleAsync.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB30D9E81BF0E3500084C1C0 /* SingleAsync.swift */; };
CB30D9EB1BF0E3500084C1C0 /* SingleAsync.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB30D9E81BF0E3500084C1C0 /* SingleAsync.swift */; };
CB30D9EC1BF0E3500084C1C0 /* SingleAsync.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB30D9E81BF0E3500084C1C0 /* SingleAsync.swift */; };
CB832B331D19654700C27230 /* NSProgressIndicator+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB832B311D1964E300C27230 /* NSProgressIndicator+Rx.swift */; };
CB832B371D19669100C27230 /* RxTextFieldDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB832B361D19669100C27230 /* RxTextFieldDelegateProxy.swift */; };
CB832B391D19673900C27230 /* NSTextView+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB832B381D19673900C27230 /* NSTextView+Rx.swift */; };
CB832B3B1D1967A900C27230 /* RxTextViewDelegateProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB832B3A1D1967A900C27230 /* RxTextViewDelegateProxy.swift */; };
CB883B3B1BE24355000AC2EE /* Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB883B3A1BE24355000AC2EE /* Window.swift */; };
CB883B3C1BE24355000AC2EE /* Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB883B3A1BE24355000AC2EE /* Window.swift */; };
CB883B3D1BE24355000AC2EE /* Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB883B3A1BE24355000AC2EE /* Window.swift */; };
@ -1016,10 +1011,6 @@
CBEE77201BD649A000AD584C /* ToArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBEE771E1BD649A000AD584C /* ToArray.swift */; };
CBEE77211BD649A000AD584C /* ToArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBEE771E1BD649A000AD584C /* ToArray.swift */; };
CBEE77221BD649A000AD584C /* ToArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBEE771E1BD649A000AD584C /* ToArray.swift */; };
CDDEF16A1D4FB40000CA8546 /* Disposables.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDDEF1691D4FB40000CA8546 /* Disposables.swift */; };
CDDEF16B1D4FB40000CA8546 /* Disposables.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDDEF1691D4FB40000CA8546 /* Disposables.swift */; };
CDDEF16C1D4FB40000CA8546 /* Disposables.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDDEF1691D4FB40000CA8546 /* Disposables.swift */; };
CDDEF16D1D4FB40000CA8546 /* Disposables.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDDEF1691D4FB40000CA8546 /* Disposables.swift */; };
D203C4F31BB9C4CA00D02D00 /* RxCollectionViewReactiveArrayDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88253F11B8A752B00B02D69 /* RxCollectionViewReactiveArrayDataSource.swift */; };
D203C4F41BB9C52400D02D00 /* RxTableViewReactiveArrayDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88253F21B8A752B00B02D69 /* RxTableViewReactiveArrayDataSource.swift */; };
D203C4F51BB9C52900D02D00 /* ItemEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = C88253F41B8A752B00B02D69 /* ItemEvents.swift */; };
@ -1091,7 +1082,7 @@
D2EBEAE01BB9B697003A27DC /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C641B8A72BE0088E94D /* Event.swift */; };
D2EBEAE11BB9B697003A27DC /* ImmediateSchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C651B8A72BE0088E94D /* ImmediateSchedulerType.swift */; };
D2EBEAE21BB9B697003A27DC /* Observable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C681B8A72BE0088E94D /* Observable.swift */; };
D2EBEAE31BB9B697003A27DC /* ObservableType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C671B8A72BE0088E94D /* ObservableType+Extensions.swift */; };
D2EBEAE31BB9B697003A27DC /* Observable+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C671B8A72BE0088E94D /* Observable+Extensions.swift */; };
D2EBEAE41BB9B697003A27DC /* ObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C9E1B8A72BE0088E94D /* ObservableType.swift */; };
D2EBEAE51BB9B697003A27DC /* AnyObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093CA01B8A72BE0088E94D /* AnyObserver.swift */; };
D2EBEAE61BB9B697003A27DC /* ObserverType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093CAB1B8A72BE0088E94D /* ObserverType.swift */; };
@ -1108,6 +1099,7 @@
D2EBEAF21BB9B6AE003A27DC /* CompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C571B8A72BE0088E94D /* CompositeDisposable.swift */; };
D2EBEAF31BB9B6AE003A27DC /* DisposeBag.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C581B8A72BE0088E94D /* DisposeBag.swift */; };
D2EBEAF41BB9B6AE003A27DC /* DisposeBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C591B8A72BE0088E94D /* DisposeBase.swift */; };
D2EBEAF51BB9B6AE003A27DC /* NAryDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C5A1B8A72BE0088E94D /* NAryDisposable.swift */; };
D2EBEAF61BB9B6B2003A27DC /* NopDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C5C1B8A72BE0088E94D /* NopDisposable.swift */; };
D2EBEAF71BB9B6B2003A27DC /* ScheduledDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C5D1B8A72BE0088E94D /* ScheduledDisposable.swift */; };
D2EBEAF91BB9B6B2003A27DC /* SerialDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C5F1B8A72BE0088E94D /* SerialDisposable.swift */; };
@ -1416,9 +1408,9 @@
84C225A21C33F00B008724EC /* RxTextStorageDelegateProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxTextStorageDelegateProxy.swift; sourceTree = "<group>"; };
84E4D3901C9AFCD500ADFDC9 /* UISearchController+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UISearchController+Rx.swift"; sourceTree = "<group>"; };
84E4D3951C9B011000ADFDC9 /* UISearchController+RxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UISearchController+RxTests.swift"; sourceTree = "<group>"; };
88718CFD1CE5D80000D88D60 /* UITabBar+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = "UITabBar+Rx.swift"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
88718CFD1CE5D80000D88D60 /* UITabBar+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITabBar+Rx.swift"; sourceTree = "<group>"; };
88718D001CE5DE2500D88D60 /* UITabBar+RxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITabBar+RxTests.swift"; sourceTree = "<group>"; };
88D98F2D1CE7549A00D50457 /* RxTabBarDelegateProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = RxTabBarDelegateProxy.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
88D98F2D1CE7549A00D50457 /* RxTabBarDelegateProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxTabBarDelegateProxy.swift; sourceTree = "<group>"; };
914FCD661CCDB82E0058B304 /* UIPageControl+RxTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIPageControl+RxTest.swift"; sourceTree = "<group>"; };
91BE429B1CBF7EC000F6B062 /* UIPageControl+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIPageControl+Rx.swift"; sourceTree = "<group>"; };
9BA1CBD11C0F7C0A0044B50A /* UIActivityIndicatorView+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIActivityIndicatorView+Rx.swift"; sourceTree = "<group>"; };
@ -1444,6 +1436,8 @@
C8093C571B8A72BE0088E94D /* CompositeDisposable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CompositeDisposable.swift; sourceTree = "<group>"; };
C8093C581B8A72BE0088E94D /* DisposeBag.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DisposeBag.swift; sourceTree = "<group>"; };
C8093C591B8A72BE0088E94D /* DisposeBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DisposeBase.swift; sourceTree = "<group>"; };
C8093C5A1B8A72BE0088E94D /* NAryDisposable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NAryDisposable.swift; sourceTree = "<group>"; };
C8093C5B1B8A72BE0088E94D /* NAryDisposable.tt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NAryDisposable.tt; sourceTree = "<group>"; };
C8093C5C1B8A72BE0088E94D /* NopDisposable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NopDisposable.swift; sourceTree = "<group>"; };
C8093C5D1B8A72BE0088E94D /* ScheduledDisposable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScheduledDisposable.swift; sourceTree = "<group>"; };
C8093C5F1B8A72BE0088E94D /* SerialDisposable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SerialDisposable.swift; sourceTree = "<group>"; };
@ -1453,7 +1447,7 @@
C8093C641B8A72BE0088E94D /* Event.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Event.swift; sourceTree = "<group>"; };
C8093C651B8A72BE0088E94D /* ImmediateSchedulerType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImmediateSchedulerType.swift; sourceTree = "<group>"; };
C8093C661B8A72BE0088E94D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C8093C671B8A72BE0088E94D /* ObservableType+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = "ObservableType+Extensions.swift"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C8093C671B8A72BE0088E94D /* Observable+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Observable+Extensions.swift"; sourceTree = "<group>"; };
C8093C681B8A72BE0088E94D /* Observable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Observable.swift; sourceTree = "<group>"; };
C8093C6B1B8A72BE0088E94D /* Amb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Amb.swift; sourceTree = "<group>"; };
C8093C6E1B8A72BE0088E94D /* Catch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Catch.swift; sourceTree = "<group>"; };
@ -1461,7 +1455,7 @@
C8093C701B8A72BE0088E94D /* CombineLatest+arity.tt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "CombineLatest+arity.tt"; sourceTree = "<group>"; };
C8093C711B8A72BE0088E94D /* CombineLatest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CombineLatest.swift; sourceTree = "<group>"; };
C8093C721B8A72BE0088E94D /* Concat.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Concat.swift; sourceTree = "<group>"; };
C8093C741B8A72BE0088E94D /* ConnectableObservable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = ConnectableObservable.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C8093C741B8A72BE0088E94D /* ConnectableObservable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConnectableObservable.swift; sourceTree = "<group>"; };
C8093C751B8A72BE0088E94D /* Debug.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Debug.swift; sourceTree = "<group>"; };
C8093C761B8A72BE0088E94D /* Deferred.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Deferred.swift; sourceTree = "<group>"; };
C8093C771B8A72BE0088E94D /* DelaySubscription.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DelaySubscription.swift; sourceTree = "<group>"; };
@ -1509,7 +1503,7 @@
C8093CAF1B8A72BE0088E94D /* Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Rx.swift; sourceTree = "<group>"; };
C8093CB01B8A72BE0088E94D /* RxMutableBox.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxMutableBox.swift; sourceTree = "<group>"; };
C8093CB31B8A72BE0088E94D /* SchedulerType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SchedulerType.swift; sourceTree = "<group>"; };
C8093CB51B8A72BE0088E94D /* ConcurrentDispatchQueueScheduler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = ConcurrentDispatchQueueScheduler.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C8093CB51B8A72BE0088E94D /* ConcurrentDispatchQueueScheduler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConcurrentDispatchQueueScheduler.swift; sourceTree = "<group>"; };
C8093CB71B8A72BE0088E94D /* MainScheduler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainScheduler.swift; sourceTree = "<group>"; };
C8093CB81B8A72BE0088E94D /* OperationQueueScheduler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OperationQueueScheduler.swift; sourceTree = "<group>"; };
C8093CB91B8A72BE0088E94D /* RecursiveScheduler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecursiveScheduler.swift; sourceTree = "<group>"; };
@ -1527,7 +1521,7 @@
C8093E861B8A732E0088E94D /* _RXKVOObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _RXKVOObserver.h; sourceTree = "<group>"; };
C8093E871B8A732E0088E94D /* _RXKVOObserver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _RXKVOObserver.m; sourceTree = "<group>"; };
C8093E8A1B8A732E0088E94D /* CLLocationManager+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CLLocationManager+Rx.swift"; sourceTree = "<group>"; };
C8093E8B1B8A732E0088E94D /* DelegateProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = DelegateProxy.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C8093E8B1B8A732E0088E94D /* DelegateProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DelegateProxy.swift; sourceTree = "<group>"; };
C8093E8C1B8A732E0088E94D /* DelegateProxyType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DelegateProxyType.swift; sourceTree = "<group>"; };
C8093E8D1B8A732E0088E94D /* Logging.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Logging.swift; sourceTree = "<group>"; };
C8093E901B8A732E0088E94D /* ControlTarget.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ControlTarget.swift; sourceTree = "<group>"; };
@ -1548,7 +1542,7 @@
C8093ECB1B8A732E0088E94D /* RxCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RxCocoa.h; sourceTree = "<group>"; };
C8093F581B8A73A20088E94D /* ObservableConvertibleType+Blocking.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ObservableConvertibleType+Blocking.swift"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C8093F591B8A73A20088E94D /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
C80D338E1B91EF9E0014629D /* Observable+Bind.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = "Observable+Bind.swift"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C80D338E1B91EF9E0014629D /* Observable+Bind.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Observable+Bind.swift"; sourceTree = "<group>"; };
C80D33931B922FB00014629D /* ControlEvent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ControlEvent.swift; sourceTree = "<group>"; };
C80D33941B922FB00014629D /* ControlProperty.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = ControlProperty.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C80D342D1B9245A40014629D /* CombineLatest+CollectionType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = "CombineLatest+CollectionType.swift"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
@ -1560,7 +1554,6 @@
C80DDE921BCE69BA006A1832 /* ObservableConvertibleType+Driver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ObservableConvertibleType+Driver.swift"; sourceTree = "<group>"; };
C80DDEAB1BCE83B2006A1832 /* Driver+Operators+arity.tt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Driver+Operators+arity.tt"; sourceTree = "<group>"; };
C80DDEB01BCE8CA3006A1832 /* Driver+Operators+arity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Driver+Operators+arity.swift"; sourceTree = "<group>"; };
C80EEC331D42D06E00131C39 /* DispatchQueueConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DispatchQueueConfiguration.swift; sourceTree = "<group>"; };
C811C89C1C24D80100A2DDD4 /* DeallocObservable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeallocObservable.swift; sourceTree = "<group>"; };
C821DBA11BA4DCAB008F3809 /* Buffer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Buffer.swift; sourceTree = "<group>"; };
C83100631BF7D51600AAE3CD /* Sequence.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Sequence.swift; sourceTree = "<group>"; };
@ -1574,8 +1567,8 @@
C83508DC1C38706D0027C24C /* Control+RxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Control+RxTests.swift"; sourceTree = "<group>"; };
C83508DD1C38706D0027C24C /* ControlEventTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ControlEventTests.swift; sourceTree = "<group>"; };
C83508DE1C38706D0027C24C /* ControlPropertyTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ControlPropertyTests.swift; sourceTree = "<group>"; };
C83508DF1C38706D0027C24C /* DelegateProxyTest+Cocoa.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = "DelegateProxyTest+Cocoa.swift"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C83508E01C38706D0027C24C /* DelegateProxyTest+UIKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = "DelegateProxyTest+UIKit.swift"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C83508DF1C38706D0027C24C /* DelegateProxyTest+Cocoa.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DelegateProxyTest+Cocoa.swift"; sourceTree = "<group>"; };
C83508E01C38706D0027C24C /* DelegateProxyTest+UIKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DelegateProxyTest+UIKit.swift"; sourceTree = "<group>"; };
C83508E11C38706D0027C24C /* DelegateProxyTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DelegateProxyTest.swift; sourceTree = "<group>"; };
C83508E21C38706D0027C24C /* Driver+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Driver+Extensions.swift"; sourceTree = "<group>"; };
C83508E31C38706D0027C24C /* Driver+Test.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Driver+Test.swift"; sourceTree = "<group>"; };
@ -1640,7 +1633,6 @@
C83509231C38706E0027C24C /* XCTest+AllTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "XCTest+AllTests.swift"; sourceTree = "<group>"; };
C83509841C38740E0027C24C /* AllTests-tvOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AllTests-tvOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
C83509941C38742C0027C24C /* AllTests-OSX.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AllTests-OSX.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
C8379EF31D1DD326003EF8FC /* UIButton+RxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIButton+RxTests.swift"; sourceTree = "<group>"; };
C839365E1C70E02200A9A09E /* UIApplication+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIApplication+Rx.swift"; sourceTree = "<group>"; };
C83D73B31C1DBAEE003DC470 /* AnonymousInvocable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnonymousInvocable.swift; sourceTree = "<group>"; };
C83D73B41C1DBAEE003DC470 /* InvocableScheduledItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InvocableScheduledItem.swift; sourceTree = "<group>"; };
@ -1662,38 +1654,37 @@
C85BA04B1C3878740075D68E /* PerformanceTests.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PerformanceTests.app; sourceTree = BUILT_PRODUCTS_DIR; };
C86409FB1BA593F500D3C4E8 /* Range.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Range.swift; sourceTree = "<group>"; };
C8640A021BA5B12A00D3C4E8 /* Repeat.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Repeat.swift; sourceTree = "<group>"; };
C86B1E211D42BF5200130546 /* SchedulerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SchedulerTests.swift; sourceTree = "<group>"; };
C88253F11B8A752B00B02D69 /* RxCollectionViewReactiveArrayDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxCollectionViewReactiveArrayDataSource.swift; sourceTree = "<group>"; };
C88253F21B8A752B00B02D69 /* RxTableViewReactiveArrayDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxTableViewReactiveArrayDataSource.swift; sourceTree = "<group>"; };
C88253F41B8A752B00B02D69 /* ItemEvents.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemEvents.swift; sourceTree = "<group>"; };
C88253F71B8A752B00B02D69 /* RxCollectionViewDataSourceType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxCollectionViewDataSourceType.swift; sourceTree = "<group>"; };
C88253F81B8A752B00B02D69 /* RxTableViewDataSourceType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxTableViewDataSourceType.swift; sourceTree = "<group>"; };
C88253FC1B8A752B00B02D69 /* RxCollectionViewDataSourceProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = RxCollectionViewDataSourceProxy.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C88253FC1B8A752B00B02D69 /* RxCollectionViewDataSourceProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxCollectionViewDataSourceProxy.swift; sourceTree = "<group>"; };
C88253FD1B8A752B00B02D69 /* RxCollectionViewDelegateProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxCollectionViewDelegateProxy.swift; sourceTree = "<group>"; };
C88253FE1B8A752B00B02D69 /* RxScrollViewDelegateProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = RxScrollViewDelegateProxy.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C88253FF1B8A752B00B02D69 /* RxSearchBarDelegateProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = RxSearchBarDelegateProxy.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C88254001B8A752B00B02D69 /* RxTableViewDataSourceProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = RxTableViewDataSourceProxy.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C88253FE1B8A752B00B02D69 /* RxScrollViewDelegateProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxScrollViewDelegateProxy.swift; sourceTree = "<group>"; };
C88253FF1B8A752B00B02D69 /* RxSearchBarDelegateProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxSearchBarDelegateProxy.swift; sourceTree = "<group>"; };
C88254001B8A752B00B02D69 /* RxTableViewDataSourceProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxTableViewDataSourceProxy.swift; sourceTree = "<group>"; };
C88254011B8A752B00B02D69 /* RxTableViewDelegateProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxTableViewDelegateProxy.swift; sourceTree = "<group>"; };
C88254021B8A752B00B02D69 /* RxTextViewDelegateProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxTextViewDelegateProxy.swift; sourceTree = "<group>"; };
C88254051B8A752B00B02D69 /* UIBarButtonItem+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = "UIBarButtonItem+Rx.swift"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C88254061B8A752B00B02D69 /* UIButton+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIButton+Rx.swift"; sourceTree = "<group>"; };
C88254071B8A752B00B02D69 /* UICollectionView+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = "UICollectionView+Rx.swift"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C88254071B8A752B00B02D69 /* UICollectionView+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UICollectionView+Rx.swift"; sourceTree = "<group>"; };
C88254081B8A752B00B02D69 /* UIControl+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = "UIControl+Rx.swift"; sourceTree = "<group>"; };
C88254091B8A752B00B02D69 /* UIDatePicker+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIDatePicker+Rx.swift"; sourceTree = "<group>"; };
C882540A1B8A752B00B02D69 /* UIGestureRecognizer+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIGestureRecognizer+Rx.swift"; sourceTree = "<group>"; };
C882540B1B8A752B00B02D69 /* UIImageView+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImageView+Rx.swift"; sourceTree = "<group>"; };
C882540C1B8A752B00B02D69 /* UILabel+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UILabel+Rx.swift"; sourceTree = "<group>"; };
C882540D1B8A752B00B02D69 /* UIScrollView+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = "UIScrollView+Rx.swift"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C882540E1B8A752B00B02D69 /* UISearchBar+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = "UISearchBar+Rx.swift"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C882540D1B8A752B00B02D69 /* UIScrollView+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIScrollView+Rx.swift"; sourceTree = "<group>"; };
C882540E1B8A752B00B02D69 /* UISearchBar+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UISearchBar+Rx.swift"; sourceTree = "<group>"; };
C882540F1B8A752B00B02D69 /* UISegmentedControl+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UISegmentedControl+Rx.swift"; sourceTree = "<group>"; };
C88254101B8A752B00B02D69 /* UISlider+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UISlider+Rx.swift"; sourceTree = "<group>"; };
C88254111B8A752B00B02D69 /* UISwitch+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UISwitch+Rx.swift"; sourceTree = "<group>"; };
C88254121B8A752B00B02D69 /* UITableView+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = "UITableView+Rx.swift"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C88254121B8A752B00B02D69 /* UITableView+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITableView+Rx.swift"; sourceTree = "<group>"; };
C88254131B8A752B00B02D69 /* UITextField+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITextField+Rx.swift"; sourceTree = "<group>"; };
C88254141B8A752B00B02D69 /* UITextView+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = "UITextView+Rx.swift"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C88254141B8A752B00B02D69 /* UITextView+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITextView+Rx.swift"; sourceTree = "<group>"; };
C88BB8711B07E5ED0064D411 /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; };
C88E296A1BEB712E001CCB92 /* RunLoopLock.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RunLoopLock.swift; sourceTree = "<group>"; };
C88F76801CE5341700D5A014 /* TextInput.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TextInput.swift; sourceTree = "<group>"; };
C88F76801CE5341700D5A014 /* RxTextInput.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxTextInput.swift; sourceTree = "<group>"; };
C88FA50C1C25C44800CCFEA4 /* RxTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
C88FA51D1C25C4B500CCFEA4 /* RxTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
C88FA52E1C25C4C000CCFEA4 /* RxTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@ -1719,14 +1710,13 @@
C8C3DA051B9393AC004D233E /* Empty.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Empty.swift; sourceTree = "<group>"; };
C8C3DA081B93941E004D233E /* Error.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Error.swift; sourceTree = "<group>"; };
C8C3DA0B1B93959F004D233E /* Never.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Never.swift; sourceTree = "<group>"; };
C8C3DA0E1B939767004D233E /* CurrentThreadScheduler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = CurrentThreadScheduler.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C8C3DA0E1B939767004D233E /* CurrentThreadScheduler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CurrentThreadScheduler.swift; sourceTree = "<group>"; };
C8C3DA111B93A3EA004D233E /* AnonymousObservable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = AnonymousObservable.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
C8C4B4A71C17722400828BD5 /* _RXObjCRuntime.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _RXObjCRuntime.m; sourceTree = "<group>"; };
C8C4B4A81C17722400828BD5 /* _RXObjCRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _RXObjCRuntime.h; sourceTree = "<group>"; };
C8C4B4C01C17727000828BD5 /* MessageSentObserver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageSentObserver.swift; sourceTree = "<group>"; };
C8D132431C42D15E00B59FFF /* SectionedViewDataSourceType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SectionedViewDataSourceType.swift; sourceTree = "<group>"; };
C8D132521C42DA7F00B59FFF /* SectionedViewDataSourceMock.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SectionedViewDataSourceMock.swift; sourceTree = "<group>"; };
C8D2C1501D4F3CD6006E2431 /* Rx.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = Rx.playground; sourceTree = "<group>"; };
C8DB967D1BF7496C0084BD53 /* KVORepresentable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KVORepresentable.swift; sourceTree = "<group>"; };
C8DB96821BF754C80084BD53 /* NSObject+Rx+KVORepresentable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSObject+Rx+KVORepresentable.swift"; sourceTree = "<group>"; };
C8DB96871BF756F40084BD53 /* KVORepresentable+CoreGraphics.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "KVORepresentable+CoreGraphics.swift"; sourceTree = "<group>"; };
@ -1743,7 +1733,6 @@
C8E3A7301C2606A900643FE6 /* Event+Equatable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Event+Equatable.swift"; sourceTree = "<group>"; };
C8E3A7351C26088C00643FE6 /* Any+Equatable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Any+Equatable.swift"; sourceTree = "<group>"; };
C8E7B3681C30C6B800B34368 /* TestableObservable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestableObservable.swift; sourceTree = "<group>"; };
C8E9E42A1D43B26C0049644E /* Observable+DebugTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Observable+DebugTest.swift"; sourceTree = "<group>"; };
C8F0C0021BBBFB8B001B112F /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; };
C8F0C04B1BBBFBB9001B112F /* RxCocoa.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxCocoa.framework; sourceTree = BUILT_PRODUCTS_DIR; };
C8F0C0581BBBFBCE001B112F /* RxBlocking.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxBlocking.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@ -1757,12 +1746,15 @@
C8FD21AD1C67E14C00863EC3 /* UIBindingObserver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIBindingObserver.swift; sourceTree = "<group>"; };
CB255BD61BC46A9C00798A4C /* RetryWhen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RetryWhen.swift; sourceTree = "<group>"; };
CB30D9E81BF0E3500084C1C0 /* SingleAsync.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SingleAsync.swift; sourceTree = "<group>"; };
CB832B311D1964E300C27230 /* NSProgressIndicator+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSProgressIndicator+Rx.swift"; sourceTree = "<group>"; };
CB832B361D19669100C27230 /* RxTextFieldDelegateProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxTextFieldDelegateProxy.swift; sourceTree = "<group>"; };
CB832B381D19673900C27230 /* NSTextView+Rx.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSTextView+Rx.swift"; sourceTree = "<group>"; };
CB832B3A1D1967A900C27230 /* RxTextViewDelegateProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxTextViewDelegateProxy.swift; sourceTree = "<group>"; };
CB883B3A1BE24355000AC2EE /* Window.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Window.swift; sourceTree = "<group>"; };
CB883B3F1BE24C15000AC2EE /* RefCountDisposable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RefCountDisposable.swift; sourceTree = "<group>"; };
CB883B441BE256D4000AC2EE /* BooleanDisposable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BooleanDisposable.swift; sourceTree = "<group>"; };
CB883B491BE369AA000AC2EE /* AddRef.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AddRef.swift; sourceTree = "<group>"; };
CBEE771E1BD649A000AD584C /* ToArray.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ToArray.swift; sourceTree = "<group>"; };
CDDEF1691D4FB40000CA8546 /* Disposables.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Disposables.swift; sourceTree = "<group>"; };
D2138C751BB9BE9800339B5C /* RxCocoa.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxCocoa.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D2245A1A1BD5657300E7146F /* WithLatestFrom.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WithLatestFrom.swift; sourceTree = "<group>"; };
D22B6D251BC8504A00BCE0AB /* SkipWhile.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SkipWhile.swift; sourceTree = "<group>"; };
@ -1932,7 +1924,7 @@
C8093C641B8A72BE0088E94D /* Event.swift */,
C8093C651B8A72BE0088E94D /* ImmediateSchedulerType.swift */,
C8093C681B8A72BE0088E94D /* Observable.swift */,
C8093C671B8A72BE0088E94D /* ObservableType+Extensions.swift */,
C8093C671B8A72BE0088E94D /* Observable+Extensions.swift */,
C849BE2A1BAB5D070019AD27 /* ObservableConvertibleType.swift */,
C8093C9E1B8A72BE0088E94D /* ObservableType.swift */,
C8093CA01B8A72BE0088E94D /* AnyObserver.swift */,
@ -1988,13 +1980,14 @@
C8093C581B8A72BE0088E94D /* DisposeBag.swift */,
C8093C591B8A72BE0088E94D /* DisposeBase.swift */,
C84CC5661BDD08A500E06A64 /* SubscriptionDisposable.swift */,
C8093C5A1B8A72BE0088E94D /* NAryDisposable.swift */,
C8093C5B1B8A72BE0088E94D /* NAryDisposable.tt */,
C8093C5C1B8A72BE0088E94D /* NopDisposable.swift */,
CB883B3F1BE24C15000AC2EE /* RefCountDisposable.swift */,
C8093C5D1B8A72BE0088E94D /* ScheduledDisposable.swift */,
C8093C5F1B8A72BE0088E94D /* SerialDisposable.swift */,
C8093C601B8A72BE0088E94D /* SingleAssignmentDisposable.swift */,
C8093C611B8A72BE0088E94D /* StableCompositeDisposable.swift */,
CDDEF1691D4FB40000CA8546 /* Disposables.swift */,
);
path = Disposables;
sourceTree = "<group>";
@ -2168,7 +2161,7 @@
C8BCD3F31C14B6D1005F1280 /* NSLayoutConstraint+Rx.swift */,
C8D132431C42D15E00B59FFF /* SectionedViewDataSourceType.swift */,
D2F461001CD7ABE400527B4D /* Reactive.swift */,
C88F76801CE5341700D5A014 /* TextInput.swift */,
C88F76801CE5341700D5A014 /* RxTextInput.swift */,
);
path = Common;
sourceTree = "<group>";
@ -2209,11 +2202,14 @@
C8093EC51B8A732E0088E94D /* OSX */ = {
isa = PBXGroup;
children = (
CB832B351D19667900C27230 /* Proxies */,
C8093EC61B8A732E0088E94D /* NSButton+Rx.swift */,
C8093EC71B8A732E0088E94D /* NSControl+Rx.swift */,
C8093EC81B8A732E0088E94D /* NSImageView+Rx.swift */,
CB832B311D1964E300C27230 /* NSProgressIndicator+Rx.swift */,
C8093EC91B8A732E0088E94D /* NSSlider+Rx.swift */,
C8093ECA1B8A732E0088E94D /* NSTextField+Rx.swift */,
CB832B381D19673900C27230 /* NSTextView+Rx.swift */,
C8BCD3F11C14B62B005F1280 /* NSView+Rx.swift */,
);
path = OSX;
@ -2326,7 +2322,6 @@
844BC8B71CE5023200F5C7CB /* UIPickerView+RxTests.swift */,
914FCD661CCDB82E0058B304 /* UIPageControl+RxTest.swift */,
033C2EF41D081B2A0050C015 /* UIScrollView+RxTests.swift */,
C8379EF31D1DD326003EF8FC /* UIButton+RxTests.swift */,
);
path = RxCocoaTests;
sourceTree = "<group>";
@ -2383,7 +2378,6 @@
C835090C1C38706D0027C24C /* Observable+BlockingTest.swift */,
C835090D1C38706D0027C24C /* Observable+ConcurrencyTest.swift */,
C835090E1C38706D0027C24C /* Observable+CreationTest.swift */,
C8E9E42A1D43B26C0049644E /* Observable+DebugTest.swift */,
C83509131C38706D0027C24C /* Observable+MultipleTest.swift */,
C835090F1C38706D0027C24C /* Observable+MultipleTest+CombineLatest.swift */,
C83509101C38706D0027C24C /* Observable+MultipleTest+CombineLatest.tt */,
@ -2400,7 +2394,6 @@
C835091A1C38706D0027C24C /* SubjectConcurrencyTest.swift */,
C835091B1C38706D0027C24C /* VariableTest.swift */,
C835091C1C38706D0027C24C /* VirtualSchedulerTest.swift */,
C86B1E211D42BF5200130546 /* SchedulerTests.swift */,
);
path = Tests;
sourceTree = "<group>";
@ -2425,7 +2418,6 @@
C83D73B51C1DBAEE003DC470 /* InvocableType.swift */,
C83D73B61C1DBAEE003DC470 /* ScheduledItem.swift */,
C83D73B71C1DBAEE003DC470 /* ScheduledItemType.swift */,
C80EEC331D42D06E00131C39 /* DispatchQueueConfiguration.swift */,
);
path = Internal;
sourceTree = "<group>";
@ -2529,7 +2521,6 @@
C8A56ACD1AD7424700B4673B = {
isa = PBXGroup;
children = (
C8D2C1501D4F3CD6006E2431 /* Rx.playground */,
C8093C471B8A72BE0088E94D /* RxSwift */,
C8093F571B8A73A20088E94D /* RxBlocking */,
C8093E801B8A732E0088E94D /* RxCocoa */,
@ -2611,6 +2602,15 @@
path = Schedulers;
sourceTree = "<group>";
};
CB832B351D19667900C27230 /* Proxies */ = {
isa = PBXGroup;
children = (
CB832B361D19669100C27230 /* RxTextFieldDelegateProxy.swift */,
CB832B3A1D1967A900C27230 /* RxTextViewDelegateProxy.swift */,
);
path = Proxies;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
@ -3140,48 +3140,23 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0720;
ORGANIZATIONNAME = "Krunoslav Zaher";
TargetAttributes = {
C80938F51B8A71760088E94D = {
LastSwiftMigration = 0800;
};
C809396F1B8A71840088E94D = {
LastSwiftMigration = 0800;
};
C8093B4B1B8A71F00088E94D = {
LastSwiftMigration = 0800;
};
C8093BC91B8A71FC0088E94D = {
LastSwiftMigration = 0800;
};
C83508C21C386F6F0027C24C = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 0800;
};
C83509831C38740E0027C24C = {
CreatedOnToolsVersion = 7.2;
};
C83509931C38742C0027C24C = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 0800;
};
C85BA04A1C3878740075D68E = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 0800;
};
C88BB81A1B07E5ED0064D411 = {
LastSwiftMigration = 0800;
};
C88FA4FD1C25C44800CCFEA4 = {
LastSwiftMigration = 0800;
};
C88FA50E1C25C4B500CCFEA4 = {
LastSwiftMigration = 0800;
};
C8A56AD61AD7424700B4673B = {
CreatedOnToolsVersion = 6.3;
LastSwiftMigration = 0800;
};
D2138C741BB9BE9800339B5C = {
CreatedOnToolsVersion = 7.1;
@ -3264,6 +3239,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C83509271C38706E0027C24C /* Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -3414,7 +3390,7 @@
C882541F1B8A752B00B02D69 /* RxCollectionViewDelegateProxy.swift in Sources */,
46307D4E1CDE77D800E47A1C /* UIAlertAction+Rx.swift in Sources */,
C88254201B8A752B00B02D69 /* RxScrollViewDelegateProxy.swift in Sources */,
C88F76811CE5341700D5A014 /* TextInput.swift in Sources */,
C88F76811CE5341700D5A014 /* RxTextInput.swift in Sources */,
C882542E1B8A752B00B02D69 /* UILabel+Rx.swift in Sources */,
54D2138E1CE0824E0028D5B4 /* UINavigationItem+Rx.swift in Sources */,
91BE429C1CBF7EC000F6B062 /* UIPageControl+Rx.swift in Sources */,
@ -3482,7 +3458,7 @@
C8093EE41B8A732E0088E94D /* DelegateProxyType.swift in Sources */,
C8093F481B8A732E0088E94D /* NSControl+Rx.swift in Sources */,
C8093F4E1B8A732E0088E94D /* NSTextField+Rx.swift in Sources */,
C88F76821CE5341700D5A014 /* TextInput.swift in Sources */,
C88F76821CE5341700D5A014 /* RxTextInput.swift in Sources */,
C8DB967F1BF7496C0084BD53 /* KVORepresentable.swift in Sources */,
C8093EFE1B8A732E0088E94D /* RxTarget.swift in Sources */,
C8093ED21B8A732E0088E94D /* _RX.m in Sources */,
@ -3494,6 +3470,8 @@
C80D339B1B922FB00014629D /* ControlProperty.swift in Sources */,
C8BCD3F51C14B6D1005F1280 /* NSLayoutConstraint+Rx.swift in Sources */,
C8093EF01B8A732E0088E94D /* KVOObserver.swift in Sources */,
CB832B331D19654700C27230 /* NSProgressIndicator+Rx.swift in Sources */,
CB832B391D19673900C27230 /* NSTextView+Rx.swift in Sources */,
C8093EEE1B8A732E0088E94D /* KVOObservable.swift in Sources */,
C8F6A1461BF0B9B2007DF367 /* NSObject+Rx+RawRepresentable.swift in Sources */,
C8093EE01B8A732E0088E94D /* CLLocationManager+Rx.swift in Sources */,
@ -3510,11 +3488,13 @@
C80DDE941BCE69BA006A1832 /* ControlEvent+Driver.swift in Sources */,
C80DDEB21BCE8CA3006A1832 /* Driver+Operators+arity.swift in Sources */,
C811C89E1C24D80100A2DDD4 /* DeallocObservable.swift in Sources */,
CB832B3B1D1967A900C27230 /* RxTextViewDelegateProxy.swift in Sources */,
C8BCD3F21C14B62B005F1280 /* NSView+Rx.swift in Sources */,
C8093EE21B8A732E0088E94D /* DelegateProxy.swift in Sources */,
C8093EFA1B8A732E0088E94D /* RxCLLocationManagerDelegateProxy.swift in Sources */,
C8093EE61B8A732E0088E94D /* Logging.swift in Sources */,
C8093EF21B8A732E0088E94D /* NSNotificationCenter+Rx.swift in Sources */,
CB832B371D19669100C27230 /* RxTextFieldDelegateProxy.swift in Sources */,
C8093EF81B8A732E0088E94D /* NSURLSession+Rx.swift in Sources */,
C80DDE9C1BCE69BA006A1832 /* Driver+Operators.swift in Sources */,
C8093F4C1B8A732E0088E94D /* NSSlider+Rx.swift in Sources */,
@ -3562,7 +3542,6 @@
C83509531C38706E0027C24C /* Observable+AggregateTest.swift in Sources */,
C8B290891C94D64600E923D0 /* RxTest+Controls.swift in Sources */,
C83509291C38706E0027C24C /* PerformanceTools.swift in Sources */,
C8E9E42B1D43B26C0049644E /* Observable+DebugTest.swift in Sources */,
C835096A1C38706E0027C24C /* TestErrors.swift in Sources */,
1AF67DA61CED430100C310FA /* ReplaySubjectTest.swift in Sources */,
C83509561C38706E0027C24C /* Observable+ConcurrencyTest.swift in Sources */,
@ -3573,7 +3552,6 @@
C83509351C38706E0027C24C /* KVOObservableTests.swift in Sources */,
C83509421C38706E0027C24C /* MainThreadPrimitiveHotObservable.swift in Sources */,
C835093A1C38706E0027C24C /* RuntimeStateSnapshot.swift in Sources */,
C86B1E221D42BF5200130546 /* SchedulerTests.swift in Sources */,
C83509441C38706E0027C24C /* MySubject.swift in Sources */,
C835095F1C38706E0027C24C /* Observable+SubscriptionTest.swift in Sources */,
C8C217D71CB710200038A2E6 /* UICollectionView+RxTests.swift in Sources */,
@ -3595,7 +3573,6 @@
C835093E1C38706E0027C24C /* UIView+RxTests.swift in Sources */,
7EDBAEB41C89B1A6006CBE67 /* UITabBarItem+RxTests.swift in Sources */,
C83509411C38706E0027C24C /* BackgroundThreadPrimitiveHotObservable.swift in Sources */,
C8379EF41D1DD326003EF8FC /* UIButton+RxTests.swift in Sources */,
C83509581C38706E0027C24C /* Observable+MultipleTest+CombineLatest.swift in Sources */,
C83509651C38706E0027C24C /* VirtualSchedulerTest.swift in Sources */,
8476A0211C3D5DC60040BA22 /* UIImagePickerController+RxTests.swift in Sources */,
@ -3667,7 +3644,6 @@
C83509EC1C3875580027C24C /* MockDisposable.swift in Sources */,
1AF67DA31CED427D00C310FA /* PublishSubjectTest.swift in Sources */,
C8350A111C38756A0027C24C /* Observable+SingleTest.swift in Sources */,
C8E9E42C1D43B26C0049644E /* Observable+DebugTest.swift in Sources */,
C8350A2A1C3875B50027C24C /* RxMutableBox.swift in Sources */,
C8350A151C38756A0027C24C /* ObserverTests.swift in Sources */,
C83509B11C3874E20027C24C /* PerformanceTools.swift in Sources */,
@ -3705,7 +3681,6 @@
C83509EA1C3875580027C24C /* BackgroundThreadPrimitiveHotObservable.swift in Sources */,
C84CB1721C3876B800EB63CC /* UIView+RxTests.swift in Sources */,
C83509F81C38755D0027C24C /* HistoricalSchedulerTest.swift in Sources */,
C8379EF51D1DD326003EF8FC /* UIButton+RxTests.swift in Sources */,
C83509F21C38755D0027C24C /* AnonymousObservable+Test.swift in Sources */,
7FE849481C5D0D6B00845C0E /* UIRefreshControl+RxTests.swift in Sources */,
C83509D31C3875390027C24C /* RXObjCRuntime+Testing.m in Sources */,
@ -3715,7 +3690,6 @@
C83509AF1C3874DC0027C24C /* RxTest.swift in Sources */,
C83509F41C38755D0027C24C /* BagTest.swift in Sources */,
C8F27DC11CE68DA700D5FB4F /* UITextView+RxTests.swift in Sources */,
C86B1E231D42BF5200130546 /* SchedulerTests.swift in Sources */,
C860EC961C42E26100A664B3 /* SectionedViewDataSourceMock.swift in Sources */,
C8350A0F1C3875630027C24C /* Observable+MultipleTest+Zip.swift in Sources */,
);
@ -3737,7 +3711,6 @@
C8350A071C38755E0027C24C /* MainSchedulerTests.swift in Sources */,
C83509B81C38750D0027C24C /* ControlEventTests.swift in Sources */,
C83509CB1C3875230027C24C /* KVOObservableTests.swift in Sources */,
C8E9E42D1D43B26C0049644E /* Observable+DebugTest.swift in Sources */,
C83509AD1C3874D70027C24C /* Foundation+Extensions.swift in Sources */,
C83509C81C3875230027C24C /* DelegateProxyTest.swift in Sources */,
C8350A0D1C38755E0027C24C /* Observable+MultipleTest+CombineLatest.swift in Sources */,
@ -3749,7 +3722,6 @@
C83509A71C3874D10027C24C /* TestErrors.swift in Sources */,
C83509D61C3875420027C24C /* SentMessageTest.swift in Sources */,
C8350A021C38755E0027C24C /* BagTest.swift in Sources */,
C86B1E241D42BF5200130546 /* SchedulerTests.swift in Sources */,
C8350A081C38755E0027C24C /* Observable+AggregateTest.swift in Sources */,
C83509E81C3875580027C24C /* PrimitiveMockObserver.swift in Sources */,
C83509BE1C3875100027C24C /* DelegateProxyTest+Cocoa.swift in Sources */,
@ -3819,7 +3791,6 @@
C849BE2C1BAB5D070019AD27 /* ObservableConvertibleType.swift in Sources */,
C8C3DA0A1B93941E004D233E /* Error.swift in Sources */,
C8093D9C1B8A72BE0088E94D /* SchedulerServices+Emulation.swift in Sources */,
C80EEC351D42D06E00131C39 /* DispatchQueueConfiguration.swift in Sources */,
C80DA3391C30B20B00C588B9 /* VirtualTimeScheduler.swift in Sources */,
C8093D6A1B8A72BE0088E94D /* AnyObserver.swift in Sources */,
C8093D3C1B8A72BE0088E94D /* Skip.swift in Sources */,
@ -3842,7 +3813,7 @@
C8093DA41B8A72BE0088E94D /* ReplaySubject.swift in Sources */,
C8C3D9FF1B935EDF004D233E /* Zip+CollectionType.swift in Sources */,
C8093D641B8A72BE0088E94D /* Observable+Time.swift in Sources */,
C8093CFC1B8A72BE0088E94D /* ObservableType+Extensions.swift in Sources */,
C8093CFC1B8A72BE0088E94D /* Observable+Extensions.swift in Sources */,
C8093D4A1B8A72BE0088E94D /* Throttle.swift in Sources */,
C8B145011BD2D80100267DCE /* ImmediateScheduler.swift in Sources */,
C8093D061B8A72BE0088E94D /* Catch.swift in Sources */,
@ -3918,7 +3889,6 @@
C8093D9E1B8A72BE0088E94D /* SerialDispatchQueueScheduler.swift in Sources */,
C8093D341B8A72BE0088E94D /* RefCount.swift in Sources */,
C8093D0E1B8A72BE0088E94D /* Concat.swift in Sources */,
CDDEF16B1D4FB40000CA8546 /* Disposables.swift in Sources */,
C8093CCA1B8A72BE0088E94D /* Lock.swift in Sources */,
C8093D441B8A72BE0088E94D /* Take.swift in Sources */,
C84CC5591BDCF51200E06A64 /* SynchronizedSubscribeType.swift in Sources */,
@ -3943,6 +3913,7 @@
CBEE77201BD649A000AD584C /* ToArray.swift in Sources */,
C8093CFE1B8A72BE0088E94D /* Observable.swift in Sources */,
C84CC55E1BDD010800E06A64 /* SynchronizedUnsubscribeType.swift in Sources */,
C8093CE21B8A72BE0088E94D /* NAryDisposable.swift in Sources */,
C8093CEC1B8A72BE0088E94D /* SerialDisposable.swift in Sources */,
C8C3DA0D1B93959F004D233E /* Never.swift in Sources */,
C84CC5681BDD08A500E06A64 /* SubscriptionDisposable.swift in Sources */,
@ -4042,7 +4013,6 @@
C849BE2B1BAB5D070019AD27 /* ObservableConvertibleType.swift in Sources */,
C8C3DA091B93941E004D233E /* Error.swift in Sources */,
C8093D9B1B8A72BE0088E94D /* SchedulerServices+Emulation.swift in Sources */,
C80EEC341D42D06E00131C39 /* DispatchQueueConfiguration.swift in Sources */,
C8093D691B8A72BE0088E94D /* AnyObserver.swift in Sources */,
C8093D3B1B8A72BE0088E94D /* Skip.swift in Sources */,
C8B144FB1BD2D44500267DCE /* ConcurrentMainScheduler.swift in Sources */,
@ -4064,7 +4034,7 @@
C8093DA31B8A72BE0088E94D /* ReplaySubject.swift in Sources */,
C8C3D9FE1B935EDF004D233E /* Zip+CollectionType.swift in Sources */,
C8093D631B8A72BE0088E94D /* Observable+Time.swift in Sources */,
C8093CFB1B8A72BE0088E94D /* ObservableType+Extensions.swift in Sources */,
C8093CFB1B8A72BE0088E94D /* Observable+Extensions.swift in Sources */,
C8093D491B8A72BE0088E94D /* Throttle.swift in Sources */,
C8B145001BD2D80100267DCE /* ImmediateScheduler.swift in Sources */,
C8093D051B8A72BE0088E94D /* Catch.swift in Sources */,
@ -4141,7 +4111,6 @@
C8093D9D1B8A72BE0088E94D /* SerialDispatchQueueScheduler.swift in Sources */,
C8093D331B8A72BE0088E94D /* RefCount.swift in Sources */,
C8093D0D1B8A72BE0088E94D /* Concat.swift in Sources */,
CDDEF16A1D4FB40000CA8546 /* Disposables.swift in Sources */,
C8093CC91B8A72BE0088E94D /* Lock.swift in Sources */,
C8093D431B8A72BE0088E94D /* Take.swift in Sources */,
C84CC5581BDCF51200E06A64 /* SynchronizedSubscribeType.swift in Sources */,
@ -4166,6 +4135,7 @@
CBEE771F1BD649A000AD584C /* ToArray.swift in Sources */,
C8093CFD1B8A72BE0088E94D /* Observable.swift in Sources */,
C84CC55D1BDD010800E06A64 /* SynchronizedUnsubscribeType.swift in Sources */,
C8093CE11B8A72BE0088E94D /* NAryDisposable.swift in Sources */,
C8093CEB1B8A72BE0088E94D /* SerialDisposable.swift in Sources */,
C8C3DA0C1B93959F004D233E /* Never.swift in Sources */,
C84CC5671BDD08A500E06A64 /* SubscriptionDisposable.swift in Sources */,
@ -4189,7 +4159,6 @@
C89461751BC6C1210055219D /* ObservableConvertibleType.swift in Sources */,
C8F0BF981BBBFB8B001B112F /* Error.swift in Sources */,
C8F0BF991BBBFB8B001B112F /* SchedulerServices+Emulation.swift in Sources */,
C80EEC371D42D06E00131C39 /* DispatchQueueConfiguration.swift in Sources */,
C80DA33B1C30B20C00C588B9 /* VirtualTimeScheduler.swift in Sources */,
C8F0BF9A1BBBFB8B001B112F /* AnyObserver.swift in Sources */,
C8F0BF9B1BBBFB8B001B112F /* Skip.swift in Sources */,
@ -4212,7 +4181,7 @@
C8F0BFA61BBBFB8B001B112F /* ReplaySubject.swift in Sources */,
C8F0BFA71BBBFB8B001B112F /* Zip+CollectionType.swift in Sources */,
C8F0BFA81BBBFB8B001B112F /* Observable+Time.swift in Sources */,
C8F0BFA91BBBFB8B001B112F /* ObservableType+Extensions.swift in Sources */,
C8F0BFA91BBBFB8B001B112F /* Observable+Extensions.swift in Sources */,
C8F0BFAA1BBBFB8B001B112F /* Throttle.swift in Sources */,
C8B145031BD2D80100267DCE /* ImmediateScheduler.swift in Sources */,
C8F0BFAC1BBBFB8B001B112F /* Catch.swift in Sources */,
@ -4288,7 +4257,6 @@
C8F0BFE01BBBFB8B001B112F /* SerialDispatchQueueScheduler.swift in Sources */,
C8F0BFE11BBBFB8B001B112F /* RefCount.swift in Sources */,
C8F0BFE21BBBFB8B001B112F /* Concat.swift in Sources */,
CDDEF16D1D4FB40000CA8546 /* Disposables.swift in Sources */,
C8F0BFE31BBBFB8B001B112F /* Lock.swift in Sources */,
C8F0BFE41BBBFB8B001B112F /* Take.swift in Sources */,
C84CC55B1BDCF51200E06A64 /* SynchronizedSubscribeType.swift in Sources */,
@ -4313,6 +4281,7 @@
CBEE77221BD649A000AD584C /* ToArray.swift in Sources */,
C8F0BFF41BBBFB8B001B112F /* Observable.swift in Sources */,
C84CC5601BDD010800E06A64 /* SynchronizedUnsubscribeType.swift in Sources */,
C8F0BFF51BBBFB8B001B112F /* NAryDisposable.swift in Sources */,
C8F0BFF61BBBFB8B001B112F /* SerialDisposable.swift in Sources */,
C8F0BFF71BBBFB8B001B112F /* Never.swift in Sources */,
C84CC56A1BDD08A500E06A64 /* SubscriptionDisposable.swift in Sources */,
@ -4377,7 +4346,6 @@
C8F0C0261BBBFBB9001B112F /* _RXDelegateProxy.m in Sources */,
C8F0C0271BBBFBB9001B112F /* NSObject+Rx.swift in Sources */,
9BA1CBFE1C0F84C40044B50A /* UIActivityIndicatorView+Rx.swift in Sources */,
87379AE01D61C6F50047CA88 /* Reactive.swift in Sources */,
842A5A2E1C357F94003568D5 /* NSTextStorage+Rx.swift in Sources */,
C8F0C0281BBBFBB9001B112F /* RxTextViewDelegateProxy.swift in Sources */,
C8F0C0291BBBFBB9001B112F /* UIBarButtonItem+Rx.swift in Sources */,
@ -4402,7 +4370,7 @@
C8F0C0381BBBFBB9001B112F /* UITextField+Rx.swift in Sources */,
C8F0C0391BBBFBB9001B112F /* NSURLSession+Rx.swift in Sources */,
C8F0C03A1BBBFBB9001B112F /* ControlTarget.swift in Sources */,
C88F76841CE5341700D5A014 /* TextInput.swift in Sources */,
C88F76841CE5341700D5A014 /* RxTextInput.swift in Sources */,
C8F0C03B1BBBFBB9001B112F /* UISearchBar+Rx.swift in Sources */,
C8F0C03C1BBBFBB9001B112F /* ItemEvents.swift in Sources */,
7EDBAEBF1C89B9B7006CBE67 /* UITabBarItem+Rx.swift in Sources */,
@ -4467,7 +4435,7 @@
C80DDEA91BCE69BA006A1832 /* ObservableConvertibleType+Driver.swift in Sources */,
C80DDEA11BCE69BA006A1832 /* Driver+Subscription.swift in Sources */,
D2138C891BB9BEBE00339B5C /* DelegateProxyType.swift in Sources */,
C88F76831CE5341700D5A014 /* TextInput.swift in Sources */,
C88F76831CE5341700D5A014 /* RxTextInput.swift in Sources */,
C811C89F1C24D80100A2DDD4 /* DeallocObservable.swift in Sources */,
54D213921CE08D0C0028D5B4 /* UINavigationItem+Rx.swift in Sources */,
D2F461041CD7AC2100527B4D /* Reactive.swift in Sources */,
@ -4531,7 +4499,6 @@
C89461761BC6C1220055219D /* ObservableConvertibleType.swift in Sources */,
D2EBEAF71BB9B6B2003A27DC /* ScheduledDisposable.swift in Sources */,
D2EBEAE11BB9B697003A27DC /* ImmediateSchedulerType.swift in Sources */,
C80EEC361D42D06E00131C39 /* DispatchQueueConfiguration.swift in Sources */,
C80DA33A1C30B20B00C588B9 /* VirtualTimeScheduler.swift in Sources */,
D2EBEB0B1BB9B6C1003A27DC /* Empty.swift in Sources */,
D2EBEAF11BB9B6AE003A27DC /* BinaryDisposable.swift in Sources */,
@ -4607,6 +4574,7 @@
D2EBEAF61BB9B6B2003A27DC /* NopDisposable.swift in Sources */,
CB30D9EB1BF0E3500084C1C0 /* SingleAsync.swift in Sources */,
D2EBEAFF1BB9B6BA003A27DC /* Buffer.swift in Sources */,
D2EBEAF51BB9B6AE003A27DC /* NAryDisposable.swift in Sources */,
D2EBEB1D1BB9B6C1003A27DC /* Scan.swift in Sources */,
D2EBEB261BB9B6C1003A27DC /* Throttle.swift in Sources */,
D2EBEAE81BB9B697003A27DC /* Rx.swift in Sources */,
@ -4622,7 +4590,7 @@
D2EBEAE91BB9B697003A27DC /* RxMutableBox.swift in Sources */,
D2EBEAFC1BB9B6BA003A27DC /* Amb.swift in Sources */,
D2EBEB231BB9B6C1003A27DC /* Take.swift in Sources */,
D2EBEAE31BB9B697003A27DC /* ObservableType+Extensions.swift in Sources */,
D2EBEAE31BB9B697003A27DC /* Observable+Extensions.swift in Sources */,
B1D899911BF653410027B05C /* Timeout.swift in Sources */,
D2EBEB121BB9B6C1003A27DC /* Merge.swift in Sources */,
D2EBEAEF1BB9B6A4003A27DC /* Queue.swift in Sources */,
@ -4630,7 +4598,6 @@
D2EBEB2B1BB9B6CA003A27DC /* Observable+Aggregate.swift in Sources */,
D2EBEB291BB9B6C1003A27DC /* Zip+arity.swift in Sources */,
D2EBEB241BB9B6C1003A27DC /* TakeUntil.swift in Sources */,
CDDEF16C1D4FB40000CA8546 /* Disposables.swift in Sources */,
C84CC55A1BDCF51200E06A64 /* SynchronizedSubscribeType.swift in Sources */,
D2EBEB3B1BB9B6D8003A27DC /* OperationQueueScheduler.swift in Sources */,
D2EBEAE51BB9B697003A27DC /* AnyObserver.swift in Sources */,
@ -5245,10 +5212,8 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@ -5258,7 +5223,6 @@
ENABLE_BITCODE = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = "TRACE_RESOURCES=1";
@ -5270,12 +5234,11 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.9;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_SWIFT_FLAGS = "-D TRACE_RESOURCES";
SDKROOT = "";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
TVOS_DEPLOYMENT_TARGET = 9.0;
VALIDATE_PRODUCT = YES;
@ -5508,7 +5471,6 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(PLATFORM_DIR)/Developer/Library/Frameworks";
INFOPLIST_FILE = RxTests/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@ -5530,7 +5492,6 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(PLATFORM_DIR)/Developer/Library/Frameworks";
INFOPLIST_FILE = RxTests/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@ -5552,7 +5513,6 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = "$(PLATFORM_DIR)/Developer/Library/Frameworks";
INFOPLIST_FILE = RxTests/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@ -5643,10 +5603,8 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@ -5673,13 +5631,12 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.9;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_SWIFT_FLAGS = "-D TRACE_RESOURCES -D DEBUG";
SDKROOT = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
TVOS_DEPLOYMENT_TARGET = 9.0;
VERSIONING_SYSTEM = "apple-generic";
@ -5702,10 +5659,8 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@ -5715,7 +5670,6 @@
ENABLE_BITCODE = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
@ -5726,12 +5680,11 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.9;
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_SWIFT_FLAGS = "-D RELEASE";
SDKROOT = "";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
TVOS_DEPLOYMENT_TARGET = 9.0;
VALIDATE_PRODUCT = YES;

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,9 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Rx.playground">
</FileRef>
<FileRef
location = "group:Package.swift">
</FileRef>
@ -13,9 +10,6 @@
<FileRef
location = "group:README.md">
</FileRef>
<FileRef
location = "group:ISSUE_TEMPLATE.md">
</FileRef>
<FileRef
location = "group:CHANGELOG.md">
</FileRef>
@ -38,8 +32,33 @@
<Group
location = "group:scripts"
name = "scripts">
<Group
location = "group:automation-tests"
name = "automation-tests">
<FileRef
location = "group:01_githubSignUp.js">
</FileRef>
<FileRef
location = "group:02_searchWikipedia.js">
</FileRef>
<FileRef
location = "group:03_masterDetail.js">
</FileRef>
<FileRef
location = "group:04_controlsTests.js">
</FileRef>
<FileRef
location = "group:05_reactivePartialUpdates.js">
</FileRef>
<FileRef
location = "group:common.js">
</FileRef>
<FileRef
location = "group:main.js">
</FileRef>
</Group>
<FileRef
location = "group:all-tests.sh">
location = "group:automation-tests.sh">
</FileRef>
<FileRef
location = "group:common.sh">
@ -47,6 +66,9 @@
<FileRef
location = "group:/Users/kzaher/Projects/RxSwift/scripts/package-spm.swift">
</FileRef>
<FileRef
location = "group:pre-release-tests.sh">
</FileRef>
<FileRef
location = "group:test-linux.sh">
</FileRef>
@ -81,6 +103,9 @@
<FileRef
location = "group:HotAndColdObservables.md">
</FileRef>
<FileRef
location = "group:IssueTemplate.md">
</FileRef>
<FileRef
location = "group:Linux.md">
</FileRef>
@ -103,6 +128,9 @@
location = "group:Warnings.md">
</FileRef>
</Group>
<FileRef
location = "group:Rx.playground">
</FileRef>
<FileRef
location = "group:Rx.xcodeproj">
</FileRef>

View File

@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "RxBlocking"
s.version = "3.0.0.alpha.1"
s.version = "2.5.0"
s.summary = "RxSwift Blocking operatos"
s.description = <<-DESC
Set of blocking operators for RxSwift. These operators are mostly intended for unit/integration tests
@ -18,11 +18,11 @@ Waiting for observable sequence to complete before exiting command line applicat
s.requires_arc = true
s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.10'
s.osx.deployment_target = '10.9'
s.watchos.deployment_target = '2.0'
s.tvos.deployment_target = '9.0'
s.source_files = 'RxBlocking/**/*.swift'
s.dependency 'RxSwift', '~> 3.0.0.alpha.1'
s.dependency 'RxSwift', '~> 2.5'
end

View File

@ -22,7 +22,7 @@ extension BlockingObservable {
public func toArray() throws -> [E] {
var elements: [E] = Array<E>()
var error: Swift.Error?
var error: ErrorType?
let lock = RunLoopLock()
@ -30,17 +30,17 @@ extension BlockingObservable {
lock.dispatch {
d.disposable = self.source.subscribe { e in
if d.isDisposed {
if d.disposed {
return
}
switch e {
case .next(let element):
case .Next(let element):
elements.append(element)
case .error(let e):
case .Error(let e):
error = e
d.dispose()
lock.stop()
case .completed:
case .Completed:
d.dispose()
lock.stop()
}
@ -70,7 +70,7 @@ extension BlockingObservable {
public func first() throws -> E? {
var element: E?
var error: Swift.Error?
var error: ErrorType?
let d = SingleAssignmentDisposable()
@ -78,17 +78,17 @@ extension BlockingObservable {
lock.dispatch {
d.disposable = self.source.subscribe { e in
if d.isDisposed {
if d.disposed {
return
}
switch e {
case .next(let e):
case .Next(let e):
if element == nil {
element = e
}
break
case .error(let e):
case .Error(let e):
error = e
default:
break
@ -122,7 +122,7 @@ extension BlockingObservable {
public func last() throws -> E? {
var element: E?
var error: Swift.Error?
var error: ErrorType?
let d = SingleAssignmentDisposable()
@ -130,14 +130,14 @@ extension BlockingObservable {
lock.dispatch {
d.disposable = self.source.subscribe { e in
if d.isDisposed {
if d.disposed {
return
}
switch e {
case .next(let e):
case .Next(let e):
element = e
return
case .error(let e):
case .Error(let e):
error = e
default:
break
@ -180,10 +180,10 @@ extension BlockingObservable {
- parameter predicate: A function to test each source element for a condition.
- returns: Returns the only element of an sequence that satisfies the condition in the predicate, and reports an error if there is not exactly one element in the sequence.
*/
public func single(_ predicate: @escaping (E) throws -> Bool) throws -> E? {
public func single(predicate: (E) throws -> Bool) throws -> E? {
var element: E?
var error: Swift.Error?
var error: ErrorType?
let d = SingleAssignmentDisposable()
@ -191,11 +191,11 @@ extension BlockingObservable {
lock.dispatch {
d.disposable = self.source.subscribe { e in
if d.isDisposed {
if d.disposed {
return
}
switch e {
case .next(let e):
case .Next(let e):
do {
if try !predicate(e) {
return
@ -203,7 +203,7 @@ extension BlockingObservable {
if element == nil {
element = e
} else {
throw RxError.moreThanOneElement
throw RxError.MoreThanOneElement
}
} catch (let err) {
error = err
@ -211,11 +211,11 @@ extension BlockingObservable {
lock.stop()
}
return
case .error(let e):
case .Error(let e):
error = e
case .completed:
case .Completed:
if element == nil {
error = RxError.noElements
error = RxError.NoElements
}
}

Binary file not shown.

View File

@ -17,8 +17,8 @@ extension ObservableConvertibleType {
- returns: `BlockingObservable` version of `self`
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public func toBlocking() -> BlockingObservable<E> {
return BlockingObservable(source: self.asObservable())
}
}
}

View File

@ -29,7 +29,7 @@ typealias AtomicInt = Int32
#endif
class RunLoopLock {
let currentRunLoop: CFRunLoop
let currentRunLoop: CFRunLoopRef
var calledRun: AtomicInt = 0
var calledStop: AtomicInt = 0
@ -38,12 +38,12 @@ class RunLoopLock {
currentRunLoop = CFRunLoopGetCurrent()
}
func dispatch(_ action: @escaping () -> ()) {
CFRunLoopPerformBlock(currentRunLoop, CFRunLoopMode.defaultMode.rawValue) {
func dispatch(action: () -> ()) {
CFRunLoopPerformBlock(currentRunLoop, kCFRunLoopDefaultMode) {
if CurrentThreadScheduler.isScheduleRequired {
_ = CurrentThreadScheduler.instance.schedule(()) { _ in
CurrentThreadScheduler.instance.schedule(()) { _ in
action()
return Disposables.create()
return NopDisposable.instance
}
}
else {
@ -57,7 +57,7 @@ class RunLoopLock {
if AtomicIncrement(&calledStop) != 1 {
return
}
CFRunLoopPerformBlock(currentRunLoop, CFRunLoopMode.defaultMode.rawValue) {
CFRunLoopPerformBlock(currentRunLoop, kCFRunLoopDefaultMode) {
CFRunLoopStop(self.currentRunLoop)
}
CFRunLoopWakeUp(currentRunLoop)

View File

@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "RxCocoa"
s.version = "3.0.0.alpha.1"
s.version = "2.5.0"
s.summary = "RxSwift Cocoa extensions"
s.description = <<-DESC
* UI extensions
@ -15,7 +15,7 @@ Pod::Spec.new do |s|
s.requires_arc = true
s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.10'
s.osx.deployment_target = '10.9'
s.watchos.deployment_target = '2.0'
s.tvos.deployment_target = '9.0'
@ -25,5 +25,5 @@ Pod::Spec.new do |s|
s.watchos.source_files = 'RxCocoa/iOS/**/*.swift'
s.tvos.source_files = 'RxCocoa/iOS/**/*.swift'
s.dependency 'RxSwift', '~> 3.0.0.alpha.1'
s.dependency 'RxSwift', '~> 2.5'
end

View File

@ -12,15 +12,15 @@ import RxSwift
#endif
extension Reactive where Base: CLLocationManager {
extension CLLocationManager {
/**
Reactive wrapper for `delegate`.
For more information take a look at `DelegateProxyType` protocol documentation.
*/
public var delegate: DelegateProxy {
return RxCLLocationManagerDelegateProxy.proxyForObject(base)
public var rx_delegate: DelegateProxy {
return RxCLLocationManagerDelegateProxy.proxyForObject(self)
}
// MARK: Responding to Location Events
@ -28,8 +28,8 @@ extension Reactive where Base: CLLocationManager {
/**
Reactive wrapper for `delegate` message.
*/
public var didUpdateLocations: Observable<[CLLocation]> {
return delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didUpdateLocations:)))
public var rx_didUpdateLocations: Observable<[CLLocation]> {
return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didUpdateLocations:)))
.map { a in
return try castOrThrow([CLLocation].self, a[1])
}
@ -38,8 +38,8 @@ extension Reactive where Base: CLLocationManager {
/**
Reactive wrapper for `delegate` message.
*/
public var didFailWithError: Observable<NSError> {
return delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didFailWithError:)))
public var rx_didFailWithError: Observable<NSError> {
return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didFailWithError:)))
.map { a in
return try castOrThrow(NSError.self, a[1])
}
@ -49,8 +49,8 @@ extension Reactive where Base: CLLocationManager {
/**
Reactive wrapper for `delegate` message.
*/
public var didFinishDeferredUpdatesWithError: Observable<NSError?> {
return delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didFinishDeferredUpdatesWithError:)))
public var rx_didFinishDeferredUpdatesWithError: Observable<NSError?> {
return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didFinishDeferredUpdatesWithError:)))
.map { a in
return try castOptionalOrThrow(NSError.self, a[1])
}
@ -64,8 +64,8 @@ extension Reactive where Base: CLLocationManager {
/**
Reactive wrapper for `delegate` message.
*/
public var didPauseLocationUpdates: Observable<Void> {
return delegate.observe(#selector(CLLocationManagerDelegate.locationManagerDidPauseLocationUpdates(_:)))
public var rx_didPauseLocationUpdates: Observable<Void> {
return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManagerDidPauseLocationUpdates(_:)))
.map { _ in
return ()
}
@ -74,8 +74,8 @@ extension Reactive where Base: CLLocationManager {
/**
Reactive wrapper for `delegate` message.
*/
public var didResumeLocationUpdates: Observable<Void> {
return delegate.observe( #selector(CLLocationManagerDelegate.locationManagerDidResumeLocationUpdates(_:)))
public var rx_didResumeLocationUpdates: Observable<Void> {
return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManagerDidResumeLocationUpdates(_:)))
.map { _ in
return ()
}
@ -86,8 +86,8 @@ extension Reactive where Base: CLLocationManager {
/**
Reactive wrapper for `delegate` message.
*/
public var didUpdateHeading: Observable<CLHeading> {
return delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didUpdateHeading:)))
public var rx_didUpdateHeading: Observable<CLHeading> {
return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didUpdateHeading:)))
.map { a in
return try castOrThrow(CLHeading.self, a[1])
}
@ -98,8 +98,8 @@ extension Reactive where Base: CLLocationManager {
/**
Reactive wrapper for `delegate` message.
*/
public var didEnterRegion: Observable<CLRegion> {
return delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didEnterRegion:)))
public var rx_didEnterRegion: Observable<CLRegion> {
return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didEnterRegion:)))
.map { a in
return try castOrThrow(CLRegion.self, a[1])
}
@ -108,8 +108,8 @@ extension Reactive where Base: CLLocationManager {
/**
Reactive wrapper for `delegate` message.
*/
public var didExitRegion: Observable<CLRegion> {
return delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didExitRegion:)))
public var rx_didExitRegion: Observable<CLRegion> {
return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didExitRegion:)))
.map { a in
return try castOrThrow(CLRegion.self, a[1])
}
@ -123,11 +123,11 @@ extension Reactive where Base: CLLocationManager {
Reactive wrapper for `delegate` message.
*/
@available(OSX 10.10, *)
public var didDetermineStateForRegion: Observable<(state: CLRegionState, region: CLRegion)> {
return delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didDetermineState:for:)))
public var rx_didDetermineStateForRegion: Observable<(state: CLRegionState, region: CLRegion)> {
return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didDetermineState:forRegion:)))
.map { a in
let stateNumber = try castOrThrow(NSNumber.self, a[1])
let state = CLRegionState(rawValue: stateNumber.intValue) ?? CLRegionState.unknown
let state = CLRegionState(rawValue: stateNumber.integerValue) ?? CLRegionState.Unknown
let region = try castOrThrow(CLRegion.self, a[2])
return (state: state, region: region)
}
@ -136,8 +136,8 @@ extension Reactive where Base: CLLocationManager {
/**
Reactive wrapper for `delegate` message.
*/
public var monitoringDidFailForRegionWithError: Observable<(region: CLRegion?, error: NSError)> {
return delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:monitoringDidFailFor:withError:)))
public var rx_monitoringDidFailForRegionWithError: Observable<(region: CLRegion?, error: NSError)> {
return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:monitoringDidFailForRegion:withError:)))
.map { a in
let region = try castOptionalOrThrow(CLRegion.self, a[1])
let error = try castOrThrow(NSError.self, a[2])
@ -148,8 +148,8 @@ extension Reactive where Base: CLLocationManager {
/**
Reactive wrapper for `delegate` message.
*/
public var didStartMonitoringForRegion: Observable<CLRegion> {
return delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didStartMonitoringFor:)))
public var rx_didStartMonitoringForRegion: Observable<CLRegion> {
return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didStartMonitoringForRegion:)))
.map { a in
return try castOrThrow(CLRegion.self, a[1])
}
@ -164,8 +164,8 @@ extension Reactive where Base: CLLocationManager {
/**
Reactive wrapper for `delegate` message.
*/
public var didRangeBeaconsInRegion: Observable<(beacons: [CLBeacon], region: CLBeaconRegion)> {
return delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didRangeBeacons:in:)))
public var rx_didRangeBeaconsInRegion: Observable<(beacons: [CLBeacon], region: CLBeaconRegion)> {
return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didRangeBeacons:inRegion:)))
.map { a in
let beacons = try castOrThrow([CLBeacon].self, a[1])
let region = try castOrThrow(CLBeaconRegion.self, a[2])
@ -176,8 +176,8 @@ extension Reactive where Base: CLLocationManager {
/**
Reactive wrapper for `delegate` message.
*/
public var rangingBeaconsDidFailForRegionWithError: Observable<(region: CLBeaconRegion, error: NSError)> {
return delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:rangingBeaconsDidFailFor:withError:)))
public var rx_rangingBeaconsDidFailForRegionWithError: Observable<(region: CLBeaconRegion, error: NSError)> {
return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:rangingBeaconsDidFailForRegion:withError:)))
.map { a in
let region = try castOrThrow(CLBeaconRegion.self, a[1])
let error = try castOrThrow(NSError.self, a[2])
@ -191,8 +191,8 @@ extension Reactive where Base: CLLocationManager {
Reactive wrapper for `delegate` message.
*/
@available(iOS 8.0, *)
public var didVisit: Observable<CLVisit> {
return delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didVisit:)))
public var rx_didVisit: Observable<CLVisit> {
return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didVisit:)))
.map { a in
return try castOrThrow(CLVisit.self, a[1])
}
@ -205,11 +205,11 @@ extension Reactive where Base: CLLocationManager {
/**
Reactive wrapper for `delegate` message.
*/
public var didChangeAuthorizationStatus: Observable<CLAuthorizationStatus> {
return delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didChangeAuthorization:)))
public var rx_didChangeAuthorizationStatus: Observable<CLAuthorizationStatus> {
return rx_delegate.observe(#selector(CLLocationManagerDelegate.locationManager(_:didChangeAuthorizationStatus:)))
.map { a in
let number = try castOrThrow(NSNumber.self, a[1])
return CLAuthorizationStatus(rawValue: Int32(number.intValue)) ?? .notDetermined
return CLAuthorizationStatus(rawValue: Int32(number.integerValue)) ?? .NotDetermined
}
}

View File

@ -54,7 +54,7 @@ public struct ControlEvent<PropertyType> : ControlEventType {
- parameter events: Observable sequence that represents events.
- returns: Control event created with a observable sequence of events.
*/
public init<Ev: ObservableType>(events: Ev) where Ev.E == E {
public init<Ev: ObservableType where Ev.E == E>(events: Ev) {
_events = events.subscribeOn(ConcurrentMainScheduler.instance)
}
@ -64,14 +64,14 @@ public struct ControlEvent<PropertyType> : ControlEventType {
- parameter observer: Observer to subscribe to events.
- returns: Disposable object that can be used to unsubscribe the observer from receiving control events.
*/
public func subscribe<O : ObserverType>(_ observer: O) -> Disposable where O.E == E {
public func subscribe<O : ObserverType where O.E == E>(observer: O) -> Disposable {
return _events.subscribe(observer)
}
/**
- returns: `Observable` interface.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public func asObservable() -> Observable<E> {
return _events
}
@ -79,7 +79,7 @@ public struct ControlEvent<PropertyType> : ControlEventType {
/**
- returns: `ControlEvent` interface.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public func asControlEvent() -> ControlEvent<E> {
return self
}

View File

@ -59,7 +59,7 @@ public struct ControlProperty<PropertyType> : ControlPropertyType {
- returns: Control property created with a observable sequence of values and an observer that enables binding values
to property.
*/
public init<V: ObservableType, S: ObserverType>(values: V, valueSink: S) where E == V.E, E == S.E {
public init<V: ObservableType, S: ObserverType where E == V.E, E == S.E>(values: V, valueSink: S) {
_values = values.subscribeOn(ConcurrentMainScheduler.instance)
_valueSink = valueSink.asObserver()
}
@ -70,14 +70,14 @@ public struct ControlProperty<PropertyType> : ControlPropertyType {
- parameter observer: Observer to subscribe to property values.
- returns: Disposable object that can be used to unsubscribe the observer from receiving control property values.
*/
public func subscribe<O : ObserverType>(_ observer: O) -> Disposable where O.E == E {
public func subscribe<O : ObserverType where O.E == E>(observer: O) -> Disposable {
return _values.subscribe(observer)
}
/**
- returns: `Observable` interface.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public func asObservable() -> Observable<E> {
return _values
}
@ -85,7 +85,7 @@ public struct ControlProperty<PropertyType> : ControlPropertyType {
/**
- returns: `ControlProperty` interface.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public func asControlProperty() -> ControlProperty<E> {
return self
}
@ -97,13 +97,13 @@ public struct ControlProperty<PropertyType> : ControlPropertyType {
- In case error is received, DEBUG buids raise fatal error, RELEASE builds log event to standard output.
- In case sequence completes, nothing happens.
*/
public func on(_ event: Event<E>) {
public func on(event: Event<E>) {
switch event {
case .error(let error):
case .Error(let error):
bindingErrorToInterface(error)
case .next:
case .Next:
_valueSink.on(event)
case .completed:
case .Completed:
_valueSink.on(event)
}
}

View File

@ -17,7 +17,7 @@ extension ControlEvent {
`ControlEvent` already can't fail, so no special case needs to be handled.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public func asDriver() -> Driver<E> {
return self.asDriver { (error) -> Driver<E> in
#if DEBUG
@ -27,4 +27,4 @@ extension ControlEvent {
#endif
}
}
}
}

View File

@ -17,7 +17,7 @@ extension ControlProperty {
`ControlProperty` already can't fail, so no special case needs to be handled.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public func asDriver() -> Driver<E> {
return self.asDriver { (error) -> Driver<E> in
#if DEBUG
@ -27,4 +27,4 @@ extension ControlProperty {
#endif
}
}
}
}

View File

@ -23,9 +23,9 @@ extension Driver {
- parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public static func zip<O1: DriverConvertibleType, O2: DriverConvertibleType>
(_ source1: O1, _ source2: O2, resultSelector: @escaping (O1.E, O2.E) throws -> E)
(source1: O1, _ source2: O2, resultSelector: (O1.E, O2.E) throws -> E)
-> Driver<E> {
let source = Observable.zip(
source1.asDriver().asObservable(), source2.asDriver().asObservable(),
@ -43,9 +43,9 @@ extension Driver {
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public static func combineLatest<O1: DriverConvertibleType, O2: DriverConvertibleType>
(_ source1: O1, _ source2: O2, resultSelector: @escaping (O1.E, O2.E) throws -> E)
(source1: O1, _ source2: O2, resultSelector: (O1.E, O2.E) throws -> E)
-> Driver<E> {
let source = Observable.combineLatest(
source1.asDriver().asObservable(), source2.asDriver().asObservable(),
@ -67,9 +67,9 @@ extension Driver {
- parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public static func zip<O1: DriverConvertibleType, O2: DriverConvertibleType, O3: DriverConvertibleType>
(_ source1: O1, _ source2: O2, _ source3: O3, resultSelector: @escaping (O1.E, O2.E, O3.E) throws -> E)
(source1: O1, _ source2: O2, _ source3: O3, resultSelector: (O1.E, O2.E, O3.E) throws -> E)
-> Driver<E> {
let source = Observable.zip(
source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(),
@ -87,9 +87,9 @@ extension Driver {
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public static func combineLatest<O1: DriverConvertibleType, O2: DriverConvertibleType, O3: DriverConvertibleType>
(_ source1: O1, _ source2: O2, _ source3: O3, resultSelector: @escaping (O1.E, O2.E, O3.E) throws -> E)
(source1: O1, _ source2: O2, _ source3: O3, resultSelector: (O1.E, O2.E, O3.E) throws -> E)
-> Driver<E> {
let source = Observable.combineLatest(
source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(),
@ -111,9 +111,9 @@ extension Driver {
- parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public static func zip<O1: DriverConvertibleType, O2: DriverConvertibleType, O3: DriverConvertibleType, O4: DriverConvertibleType>
(_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E) throws -> E)
(source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: (O1.E, O2.E, O3.E, O4.E) throws -> E)
-> Driver<E> {
let source = Observable.zip(
source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(),
@ -131,9 +131,9 @@ extension Driver {
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public static func combineLatest<O1: DriverConvertibleType, O2: DriverConvertibleType, O3: DriverConvertibleType, O4: DriverConvertibleType>
(_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E) throws -> E)
(source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: (O1.E, O2.E, O3.E, O4.E) throws -> E)
-> Driver<E> {
let source = Observable.combineLatest(
source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(),
@ -155,9 +155,9 @@ extension Driver {
- parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public static func zip<O1: DriverConvertibleType, O2: DriverConvertibleType, O3: DriverConvertibleType, O4: DriverConvertibleType, O5: DriverConvertibleType>
(_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E)
(source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E)
-> Driver<E> {
let source = Observable.zip(
source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(), source5.asDriver().asObservable(),
@ -175,9 +175,9 @@ extension Driver {
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public static func combineLatest<O1: DriverConvertibleType, O2: DriverConvertibleType, O3: DriverConvertibleType, O4: DriverConvertibleType, O5: DriverConvertibleType>
(_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E)
(source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E)
-> Driver<E> {
let source = Observable.combineLatest(
source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(), source5.asDriver().asObservable(),
@ -199,9 +199,9 @@ extension Driver {
- parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public static func zip<O1: DriverConvertibleType, O2: DriverConvertibleType, O3: DriverConvertibleType, O4: DriverConvertibleType, O5: DriverConvertibleType, O6: DriverConvertibleType>
(_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E) throws -> E)
(source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E) throws -> E)
-> Driver<E> {
let source = Observable.zip(
source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(), source5.asDriver().asObservable(), source6.asDriver().asObservable(),
@ -219,9 +219,9 @@ extension Driver {
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public static func combineLatest<O1: DriverConvertibleType, O2: DriverConvertibleType, O3: DriverConvertibleType, O4: DriverConvertibleType, O5: DriverConvertibleType, O6: DriverConvertibleType>
(_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E) throws -> E)
(source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E) throws -> E)
-> Driver<E> {
let source = Observable.combineLatest(
source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(), source5.asDriver().asObservable(), source6.asDriver().asObservable(),
@ -243,9 +243,9 @@ extension Driver {
- parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public static func zip<O1: DriverConvertibleType, O2: DriverConvertibleType, O3: DriverConvertibleType, O4: DriverConvertibleType, O5: DriverConvertibleType, O6: DriverConvertibleType, O7: DriverConvertibleType>
(_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E) throws -> E)
(source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E) throws -> E)
-> Driver<E> {
let source = Observable.zip(
source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(), source5.asDriver().asObservable(), source6.asDriver().asObservable(), source7.asDriver().asObservable(),
@ -263,9 +263,9 @@ extension Driver {
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public static func combineLatest<O1: DriverConvertibleType, O2: DriverConvertibleType, O3: DriverConvertibleType, O4: DriverConvertibleType, O5: DriverConvertibleType, O6: DriverConvertibleType, O7: DriverConvertibleType>
(_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E) throws -> E)
(source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E) throws -> E)
-> Driver<E> {
let source = Observable.combineLatest(
source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(), source5.asDriver().asObservable(), source6.asDriver().asObservable(), source7.asDriver().asObservable(),
@ -287,9 +287,9 @@ extension Driver {
- parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public static func zip<O1: DriverConvertibleType, O2: DriverConvertibleType, O3: DriverConvertibleType, O4: DriverConvertibleType, O5: DriverConvertibleType, O6: DriverConvertibleType, O7: DriverConvertibleType, O8: DriverConvertibleType>
(_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E) throws -> E)
(source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E) throws -> E)
-> Driver<E> {
let source = Observable.zip(
source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(), source5.asDriver().asObservable(), source6.asDriver().asObservable(), source7.asDriver().asObservable(), source8.asDriver().asObservable(),
@ -307,9 +307,9 @@ extension Driver {
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public static func combineLatest<O1: DriverConvertibleType, O2: DriverConvertibleType, O3: DriverConvertibleType, O4: DriverConvertibleType, O5: DriverConvertibleType, O6: DriverConvertibleType, O7: DriverConvertibleType, O8: DriverConvertibleType>
(_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E) throws -> E)
(source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E) throws -> E)
-> Driver<E> {
let source = Observable.combineLatest(
source1.asDriver().asObservable(), source2.asDriver().asObservable(), source3.asDriver().asObservable(), source4.asDriver().asObservable(), source5.asDriver().asObservable(), source6.asDriver().asObservable(), source7.asDriver().asObservable(), source8.asDriver().asObservable(),
@ -320,4 +320,3 @@ extension Driver {
}
}

View File

@ -22,12 +22,12 @@ extension Driver {
- parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public static func zip<<%= (Array(1...i).map { "O\($0): DriverConvertibleType" }).joined(separator: ", ") %>>
(<%= (Array(1...i).map { "_ source\($0): O\($0)" }).joined(separator: ", ") %>, resultSelector: @escaping (<%= (Array(1...i).map { "O\($0).E" }).joined(separator: ", ") %>) throws -> E)
@warn_unused_result(message="http://git.io/rxs.uo")
public static func zip<<%= (Array(1...i).map { "O\($0): DriverConvertibleType" }).joinWithSeparator(", ") %>>
(<%= (Array(1...i).map { "source\($0): O\($0)" }).joinWithSeparator(", _ ") %>, resultSelector: (<%= (Array(1...i).map { "O\($0).E" }).joinWithSeparator(", ") %>) throws -> E)
-> Driver<E> {
let source = Observable.zip(
<%= (Array(1...i).map { "source\($0).asDriver().asObservable()" }).joined(separator: ", ") %>,
<%= (Array(1...i).map { "source\($0).asDriver().asObservable()" }).joinWithSeparator(", ") %>,
resultSelector: resultSelector
)
@ -42,12 +42,12 @@ extension Driver {
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public static func combineLatest<<%= (Array(1...i).map { "O\($0): DriverConvertibleType" }).joined(separator: ", ") %>>
(<%= (Array(1...i).map { "_ source\($0): O\($0)" }).joined(separator: ", ") %>, resultSelector: @escaping (<%= (Array(1...i).map { "O\($0).E" }).joined(separator: ", ") %>) throws -> E)
@warn_unused_result(message="http://git.io/rxs.uo")
public static func combineLatest<<%= (Array(1...i).map { "O\($0): DriverConvertibleType" }).joinWithSeparator(", ") %>>
(<%= (Array(1...i).map { "source\($0): O\($0)" }).joinWithSeparator(", _ ") %>, resultSelector: (<%= (Array(1...i).map { "O\($0).E" }).joinWithSeparator(", ") %>) throws -> E)
-> Driver<E> {
let source = Observable.combineLatest(
<%= (Array(1...i).map { "source\($0).asDriver().asObservable()" }).joined(separator: ", ") %>,
<%= (Array(1...i).map { "source\($0).asDriver().asObservable()" }).joinWithSeparator(", ") %>,
resultSelector: resultSelector
)
@ -55,4 +55,4 @@ extension Driver {
}
}
<% } %>
<% } %>

View File

@ -20,8 +20,8 @@ extension DriverConvertibleType {
- parameter selector: A transform function to apply to each source element.
- returns: An observable sequence whose elements are the result of invoking the transform function on each element of source.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func map<R>(_ selector: @escaping (E) -> R) -> Driver<R> {
@warn_unused_result(message="http://git.io/rxs.uo")
public func map<R>(selector: E -> R) -> Driver<R> {
let source = self
.asObservable()
.map(selector)
@ -37,8 +37,8 @@ extension DriverConvertibleType {
- parameter predicate: A function to test each source element for a condition.
- returns: An observable sequence that contains elements from the input sequence that satisfy the condition.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func filter(_ predicate: @escaping (E) -> Bool) -> Driver<E> {
@warn_unused_result(message="http://git.io/rxs.uo")
public func filter(predicate: (E) -> Bool) -> Driver<E> {
let source = self
.asObservable()
.filter(predicate)
@ -58,7 +58,7 @@ extension DriverConvertibleType where E : DriverConvertibleType {
- returns: The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public func switchLatest() -> Driver<E.E> {
let source: Observable<E.E> = self
.asObservable()
@ -80,8 +80,8 @@ extension DriverConvertibleType {
- returns: An observable sequence whose elements are the result of invoking the transform function on each element of source producing an
Observable of Observable sequences and that at any point in time produces the elements of the most recent inner observable sequence that has been received.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func flatMapLatest<R>(_ selector: @escaping (E) -> Driver<R>)
@warn_unused_result(message="http://git.io/rxs.uo")
public func flatMapLatest<R>(selector: (E) -> Driver<R>)
-> Driver<R> {
let source: Observable<R> = self
.asObservable()
@ -100,8 +100,8 @@ extension DriverConvertibleType {
- parameter selector: A transform function to apply to element that was observed while no observable is executing in parallel.
- returns: An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence that was received while no other sequence was being calculated.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func flatMapFirst<R>(_ selector: @escaping (E) -> Driver<R>)
@warn_unused_result(message="http://git.io/rxs.uo")
public func flatMapFirst<R>(selector: (E) -> Driver<R>)
-> Driver<R> {
let source: Observable<R> = self
.asObservable()
@ -119,12 +119,11 @@ extension DriverConvertibleType {
- parameter eventHandler: Action to invoke for each event in the observable sequence.
- returns: The source sequence with the side-effecting behavior applied.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@available(*, deprecated, renamed: "do(onNext:onError:onCompleted:)")
public func doOn(_ eventHandler: @escaping (Event<E>) -> Void)
@warn_unused_result(message="http://git.io/rxs.uo")
public func doOn(eventHandler: (Event<E>) -> Void)
-> Driver<E> {
let source = self.asObservable()
.doOn(eventHandler)
.doOn(eventHandler)
return Driver(source)
}
@ -137,9 +136,8 @@ extension DriverConvertibleType {
- parameter onCompleted: Action to invoke upon graceful termination of the observable sequence.
- returns: The source sequence with the side-effecting behavior applied.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@available(*, deprecated, renamed: "do(onNext:onError:onCompleted:)")
public func doOn(onNext: ((E) -> Void)? = nil, onError: ((Swift.Error) -> Void)? = nil, onCompleted: (() -> Void)? = nil)
@warn_unused_result(message="http://git.io/rxs.uo")
public func doOn(onNext onNext: (E -> Void)? = nil, onError: (ErrorType -> Void)? = nil, onCompleted: (() -> Void)? = nil)
-> Driver<E> {
let source = self.asObservable()
.doOn(onNext: onNext, onError: onError, onCompleted: onCompleted)
@ -153,11 +151,10 @@ extension DriverConvertibleType {
- parameter onNext: Action to invoke for each element in the observable sequence.
- returns: The source sequence with the side-effecting behavior applied.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@available(*, deprecated, renamed: "do(onNext:)")
public func doOnNext(_ onNext: @escaping (E) -> Void)
@warn_unused_result(message="http://git.io/rxs.uo")
public func doOnNext(onNext: (E -> Void))
-> Driver<E> {
return self.do(onNext: onNext)
return self.doOn(onNext: onNext)
}
/**
@ -166,30 +163,10 @@ extension DriverConvertibleType {
- parameter onCompleted: Action to invoke upon graceful termination of the observable sequence.
- returns: The source sequence with the side-effecting behavior applied.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@available(*, deprecated, renamed: "do(onCompleted:)")
public func doOnCompleted(_ onCompleted: @escaping () -> Void)
@warn_unused_result(message="http://git.io/rxs.uo")
public func doOnCompleted(onCompleted: (() -> Void))
-> Driver<E> {
return self.do(onCompleted: onCompleted)
}
/**
Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence.
- parameter onNext: Action to invoke for each element in the observable sequence.
- parameter onError: Action to invoke upon errored termination of the observable sequence. This callback will never be invoked since driver can't error out.
- parameter onCompleted: Action to invoke upon graceful termination of the observable sequence.
- parameter onSubscribe: Action to invoke before subscribing to source observable sequence.
- parameter onDispose: Action to invoke after subscription to source observable has been disposed for any reason. It can be either because sequence terminates for some reason or observer subscription being disposed.
- returns: The source sequence with the side-effecting behavior applied.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func `do`(onNext: ((E) -> Void)? = nil, onError: ((Swift.Error) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onSubscribe: (() -> ())? = nil, onDispose: (() -> ())? = nil)
-> Driver<E> {
let source = self.asObservable()
.do(onNext: onNext, onError: onError, onCompleted: onCompleted, onSubscribe: onSubscribe, onDispose: onDispose)
return Driver(source)
return self.doOn(onCompleted: onCompleted)
}
}
@ -202,8 +179,8 @@ extension DriverConvertibleType {
- parameter identifier: Identifier that is printed together with event description to standard output.
- returns: An observable sequence whose events are printed to standard output.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func debug(_ identifier: String? = nil, file: String = #file, line: UInt = #line, function: String = #function) -> Driver<E> {
@warn_unused_result(message="http://git.io/rxs.uo")
public func debug(identifier: String? = nil, file: String = #file, line: UInt = #line, function: String = #function) -> Driver<E> {
let source = self.asObservable()
.debug(identifier, file: file, line: line, function: function)
return Driver(source)
@ -218,7 +195,7 @@ extension DriverConvertibleType where E: Equatable {
- returns: An observable sequence only containing the distinct contiguous elements, based on equality operator, from the source sequence.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public func distinctUntilChanged()
-> Driver<E> {
let source = self.asObservable()
@ -236,8 +213,8 @@ extension DriverConvertibleType {
- parameter keySelector: A function to compute the comparison key for each element.
- returns: An observable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func distinctUntilChanged<K: Equatable>(_ keySelector: @escaping (E) -> K) -> Driver<E> {
@warn_unused_result(message="http://git.io/rxs.uo")
public func distinctUntilChanged<K: Equatable>(keySelector: (E) -> K) -> Driver<E> {
let source = self.asObservable()
.distinctUntilChanged(keySelector, comparer: { $0 == $1 })
return Driver(source)
@ -249,8 +226,8 @@ extension DriverConvertibleType {
- parameter comparer: Equality comparer for computed key values.
- returns: An observable sequence only containing the distinct contiguous elements, based on `comparer`, from the source sequence.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func distinctUntilChanged(_ comparer: @escaping (E, E) -> Bool) -> Driver<E> {
@warn_unused_result(message="http://git.io/rxs.uo")
public func distinctUntilChanged(comparer: (lhs: E, rhs: E) -> Bool) -> Driver<E> {
let source = self.asObservable()
.distinctUntilChanged({ $0 }, comparer: comparer)
return Driver(source)
@ -263,8 +240,8 @@ extension DriverConvertibleType {
- parameter comparer: Equality comparer for computed key values.
- returns: An observable sequence only containing the distinct contiguous elements, based on a computed key value and the comparer, from the source sequence.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func distinctUntilChanged<K>(_ keySelector: @escaping (E) -> K, comparer: @escaping (K, K) -> Bool) -> Driver<E> {
@warn_unused_result(message="http://git.io/rxs.uo")
public func distinctUntilChanged<K>(keySelector: (E) -> K, comparer: (lhs: K, rhs: K) -> Bool) -> Driver<E> {
let source = self.asObservable()
.distinctUntilChanged(keySelector, comparer: comparer)
return Driver(source)
@ -281,8 +258,8 @@ extension DriverConvertibleType {
- parameter selector: A transform function to apply to each element.
- returns: An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func flatMap<R>(_ selector: @escaping (E) -> Driver<R>) -> Driver<R> {
@warn_unused_result(message="http://git.io/rxs.uo")
public func flatMap<R>(selector: (E) -> Driver<R>) -> Driver<R> {
let source = self.asObservable()
.flatMap(selector)
@ -299,7 +276,7 @@ extension DriverConvertibleType where E : DriverConvertibleType {
- parameter maxConcurrent: Maximum number of inner observable sequences being subscribed to concurrently.
- returns: The observable sequence that merges the elements of the observable sequences.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public func merge() -> Driver<E.E> {
let source = self.asObservable()
.map { $0.asDriver() }
@ -312,8 +289,8 @@ extension DriverConvertibleType where E : DriverConvertibleType {
- returns: The observable sequence that merges the elements of the inner sequences.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func merge(maxConcurrent: Int)
@warn_unused_result(message="http://git.io/rxs.uo")
public func merge(maxConcurrent maxConcurrent: Int)
-> Driver<E.E> {
let source = self.asObservable()
.map { $0.asDriver() }
@ -333,8 +310,8 @@ extension DriverConvertibleType {
- parameter dueTime: Throttling duration for each element.
- returns: The throttled sequence.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func throttle(_ dueTime: RxTimeInterval)
@warn_unused_result(message="http://git.io/rxs.uo")
public func throttle(dueTime: RxTimeInterval)
-> Driver<E> {
let source = self.asObservable()
.throttle(dueTime, scheduler: driverObserveOnScheduler)
@ -350,8 +327,8 @@ extension DriverConvertibleType {
- parameter dueTime: Throttling duration for each element.
- returns: The throttled sequence.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func debounce(_ dueTime: RxTimeInterval)
@warn_unused_result(message="http://git.io/rxs.uo")
public func debounce(dueTime: RxTimeInterval)
-> Driver<E> {
let source = self.asObservable()
.debounce(dueTime, scheduler: driverObserveOnScheduler)
@ -371,8 +348,8 @@ extension DriverConvertibleType {
- parameter accumulator: An accumulator function to be invoked on each element.
- returns: An observable sequence containing the accumulated values.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func scan<A>(_ seed: A, accumulator: @escaping (A, E) -> A)
@warn_unused_result(message="http://git.io/rxs.uo")
public func scan<A>(seed: A, accumulator: (A, E) -> A)
-> Driver<A> {
let source = self.asObservable()
.scan(seed, accumulator: accumulator)
@ -381,29 +358,29 @@ extension DriverConvertibleType {
}
// MARK: concat
extension Sequence where Iterator.Element : DriverConvertibleType {
extension SequenceType where Generator.Element : DriverConvertibleType {
/**
Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully.
- returns: An observable sequence that contains the elements of each given sequence, in sequential order.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public func concat()
-> Driver<Iterator.Element.E> {
-> Driver<Generator.Element.E> {
let source = self.lazy.map { $0.asDriver().asObservable() }.concat()
return Driver<Iterator.Element.E>(source)
return Driver<Generator.Element.E>(source)
}
}
extension Collection where Iterator.Element : DriverConvertibleType {
extension CollectionType where Generator.Element : DriverConvertibleType {
/**
Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully.
- returns: An observable sequence that contains the elements of each given sequence, in sequential order.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public func concat()
-> Driver<Generator.Element.E> {
let source = self.map { $0.asDriver().asObservable() }.concat()
@ -412,7 +389,7 @@ extension Collection where Iterator.Element : DriverConvertibleType {
}
// MARK: zip
extension Collection where Iterator.Element : DriverConvertibleType {
extension CollectionType where Generator.Element : DriverConvertibleType {
/**
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
@ -420,15 +397,15 @@ extension Collection where Iterator.Element : DriverConvertibleType {
- parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func zip<R>(_ resultSelector: @escaping ([Generator.Element.E]) throws -> R) -> Driver<R> {
@warn_unused_result(message="http://git.io/rxs.uo")
public func zip<R>(resultSelector: [Generator.Element.E] throws -> R) -> Driver<R> {
let source = self.map { $0.asDriver().asObservable() }.zip(resultSelector)
return Driver<R>(source)
}
}
// MARK: combineLatest
extension Collection where Iterator.Element : DriverConvertibleType {
extension CollectionType where Generator.Element : DriverConvertibleType {
/**
Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
@ -436,8 +413,8 @@ extension Collection where Iterator.Element : DriverConvertibleType {
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func combineLatest<R>(_ resultSelector: @escaping ([Generator.Element.E]) throws -> R) -> Driver<R> {
@warn_unused_result(message="http://git.io/rxs.uo")
public func combineLatest<R>(resultSelector: [Generator.Element.E] throws -> R) -> Driver<R> {
let source = self.map { $0.asDriver().asObservable() }.combineLatest(resultSelector)
return Driver<R>(source)
}
@ -453,7 +430,7 @@ extension DriverConvertibleType {
- parameter resultSelector: Function to invoke for each element from the self combined with the latest element from the second source, if any.
- returns: An observable sequence containing the result of combining each element of the self with the latest element from the second source, if any, using the specified result selector function.
*/
public func withLatestFrom<SecondO: DriverConvertibleType, ResultType>(_ second: SecondO, resultSelector: @escaping (E, SecondO.E) -> ResultType) -> Driver<ResultType> {
public func withLatestFrom<SecondO: DriverConvertibleType, ResultType>(second: SecondO, resultSelector: (E, SecondO.E) -> ResultType) -> Driver<ResultType> {
let source = self.asObservable()
.withLatestFrom(second.asDriver(), resultSelector: resultSelector)
@ -466,7 +443,7 @@ extension DriverConvertibleType {
- parameter second: Second observable source.
- returns: An observable sequence containing the result of combining each element of the self with the latest element from the second source, if any, using the specified result selector function.
*/
public func withLatestFrom<SecondO: DriverConvertibleType>(_ second: SecondO) -> Driver<SecondO.E> {
public func withLatestFrom<SecondO: DriverConvertibleType>(second: SecondO) -> Driver<SecondO.E> {
let source = self.asObservable()
.withLatestFrom(second.asDriver())
@ -485,8 +462,8 @@ extension DriverConvertibleType {
- parameter count: The number of elements to skip before returning the remaining elements.
- returns: An observable sequence that contains the elements that occur after the specified index in the input sequence.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func skip(_ count: Int)
@warn_unused_result(message="http://git.io/rxs.uo")
public func skip(count: Int)
-> Driver<E> {
let source = self.asObservable()
.skip(count)
@ -505,12 +482,12 @@ extension DriverConvertibleType {
- parameter element: Element to prepend to the specified sequence.
- returns: The source sequence prepended with the specified values.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func startWith(_ element: E)
@warn_unused_result(message="http://git.io/rxs.uo")
public func startWith(element: E)
-> Driver<E> {
let source = self.asObservable()
.startWith(element)
return Driver(source)
}
}
}

View File

@ -24,9 +24,9 @@ extension DriverConvertibleType {
- parameter observer: Observer that receives events.
- returns: Disposable object that can be used to unsubscribe the observer from the subject.
*/
// @warn_unused_result(message:"http://git.io/rxs.ud")
public func drive<O: ObserverType>(_ observer: O) -> Disposable where O.E == E {
MainScheduler.ensureExecutingOnScheduler(errorMessage: driverErrorMessage)
@warn_unused_result(message="http://git.io/rxs.ud")
public func drive<O: ObserverType where O.E == E>(observer: O) -> Disposable {
MainScheduler.ensureExecutingOnScheduler(driverErrorMessage)
return self.asObservable().subscribe(observer)
}
@ -37,9 +37,9 @@ extension DriverConvertibleType {
- parameter variable: Target variable for sequence elements.
- returns: Disposable object that can be used to unsubscribe the observer from the variable.
*/
// @warn_unused_result(message:"http://git.io/rxs.ud")
public func drive(_ variable: Variable<E>) -> Disposable {
MainScheduler.ensureExecutingOnScheduler(errorMessage: driverErrorMessage)
@warn_unused_result(message="http://git.io/rxs.ud")
public func drive(variable: Variable<E>) -> Disposable {
MainScheduler.ensureExecutingOnScheduler(driverErrorMessage)
return drive(onNext: { e in
variable.value = e
})
@ -52,9 +52,9 @@ extension DriverConvertibleType {
- parameter with: Function used to bind elements from `self`.
- returns: Object representing subscription.
*/
// @warn_unused_result(message:"http://git.io/rxs.ud")
public func drive<R>(_ transformation: (Observable<E>) -> R) -> R {
MainScheduler.ensureExecutingOnScheduler(errorMessage: driverErrorMessage)
@warn_unused_result(message="http://git.io/rxs.ud")
public func drive<R>(transformation: Observable<E> -> R) -> R {
MainScheduler.ensureExecutingOnScheduler(driverErrorMessage)
return transformation(self.asObservable())
}
@ -72,9 +72,9 @@ extension DriverConvertibleType {
- parameter curriedArgument: Final argument passed to `binder` to finish binding process.
- returns: Object representing subscription.
*/
// @warn_unused_result(message:"http://git.io/rxs.ud")
public func drive<R1, R2>(_ with: (Observable<E>) -> (R1) -> R2, curriedArgument: R1) -> R2 {
MainScheduler.ensureExecutingOnScheduler(errorMessage: driverErrorMessage)
@warn_unused_result(message="http://git.io/rxs.ud")
public func drive<R1, R2>(with: Observable<E> -> R1 -> R2, curriedArgument: R1) -> R2 {
MainScheduler.ensureExecutingOnScheduler(driverErrorMessage)
return with(self.asObservable())(curriedArgument)
}
@ -91,9 +91,9 @@ extension DriverConvertibleType {
gracefully completed, errored, or if the generation is cancelled by disposing subscription)
- returns: Subscription object used to unsubscribe from the observable sequence.
*/
// @warn_unused_result(message:"http://git.io/rxs.ud")
public func drive(onNext: ((E) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onDisposed: (() -> Void)? = nil) -> Disposable {
MainScheduler.ensureExecutingOnScheduler(errorMessage: driverErrorMessage)
@warn_unused_result(message="http://git.io/rxs.ud")
public func drive(onNext onNext: ((E) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onDisposed: (() -> Void)? = nil) -> Disposable {
MainScheduler.ensureExecutingOnScheduler(driverErrorMessage)
return self.asObservable().subscribe(onNext: onNext, onCompleted: onCompleted, onDisposed: onDisposed)
}
@ -104,11 +104,10 @@ extension DriverConvertibleType {
- parameter onNext: Action to invoke for each element in the observable sequence.
- returns: Subscription object used to unsubscribe from the observable sequence.
*/
// @warn_unused_result(message:"http://git.io/rxs.ud")
@available(*, deprecated, renamed: "drive(onNext:)")
public func driveNext(_ onNext: @escaping (E) -> Void) -> Disposable {
MainScheduler.ensureExecutingOnScheduler(errorMessage: driverErrorMessage)
return self.asObservable().subscribe(onNext: onNext)
@warn_unused_result(message="http://git.io/rxs.ud")
public func driveNext(onNext: E -> Void) -> Disposable {
MainScheduler.ensureExecutingOnScheduler(driverErrorMessage)
return self.asObservable().subscribeNext(onNext)
}
}

View File

@ -19,12 +19,12 @@ public protocol DriverConvertibleType : ObservableConvertibleType {
/**
Converts self to `Driver`.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
func asDriver() -> Driver<E>
}
extension DriverConvertibleType {
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public func asObservable() -> Observable<E> {
return asDriver().asObservable()
}
@ -75,7 +75,7 @@ public struct Driver<Element> : DriverConvertibleType {
/**
- returns: Built observable sequence.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public func asObservable() -> Observable<E> {
return _source
}
@ -83,7 +83,7 @@ public struct Driver<Element> : DriverConvertibleType {
/**
- returns: `self`
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public func asDriver() -> Driver<E> {
return self
}
@ -97,9 +97,9 @@ extension Driver {
- returns: An observable sequence with no elements.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public static func empty() -> Driver<E> {
return Driver(Observable.empty().subscribeOn(driverSubscribeOnScheduler))
return Driver(raw: Observable.empty().subscribeOn(driverSubscribeOnScheduler))
}
/**
@ -107,9 +107,9 @@ extension Driver {
- returns: An observable sequence whose observers will never get called.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public static func never() -> Driver<E> {
return Driver(Observable.never().subscribeOn(driverSubscribeOnScheduler))
return Driver(raw: Observable.never().subscribeOn(driverSubscribeOnScheduler))
}
/**
@ -118,9 +118,9 @@ extension Driver {
- parameter element: Single element in the resulting observable sequence.
- returns: An observable sequence containing the single specified element.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public static func just(_ element: E) -> Driver<E> {
return Driver(Observable.just(element).subscribeOn(driverSubscribeOnScheduler))
@warn_unused_result(message="http://git.io/rxs.uo")
public static func just(element: E) -> Driver<E> {
return Driver(raw: Observable.just(element).subscribeOn(driverSubscribeOnScheduler))
}
/**
@ -129,8 +129,8 @@ extension Driver {
- parameter observableFactory: Observable factory function to invoke for each observer that subscribes to the resulting sequence.
- returns: An observable sequence whose observers trigger an invocation of the given observable factory function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public static func deferred(_ observableFactory: @escaping () -> Driver<E>)
@warn_unused_result(message="http://git.io/rxs.uo")
public static func deferred(observableFactory: () -> Driver<E>)
-> Driver<E> {
return Driver(Observable.deferred { observableFactory().asObservable() })
}
@ -143,14 +143,14 @@ extension Driver {
- parameter elements: Elements to generate.
- returns: The observable sequence whose elements are pulled from the given arguments.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public static func of(_ elements: E ...) -> Driver<E> {
let source = Observable.from(elements, scheduler: driverSubscribeOnScheduler)
@warn_unused_result(message="http://git.io/rxs.uo")
public static func of(elements: E ...) -> Driver<E> {
let source = elements.toObservable(driverSubscribeOnScheduler)
return Driver(raw: source)
}
}
extension Driver where Element : SignedInteger {
extension Driver where Element : SignedIntegerType {
/**
Returns an observable sequence that produces a value after each period, using the specified scheduler to run timers and to send out observer messages.
@ -159,8 +159,8 @@ extension Driver where Element : SignedInteger {
- parameter period: Period for producing the values in the resulting sequence.
- returns: An observable sequence that produces a value after each period.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public static func interval(_ period: RxTimeInterval)
@warn_unused_result(message="http://git.io/rxs.uo")
public static func interval(period: RxTimeInterval)
-> Driver<E> {
return Driver(Observable.interval(period, scheduler: driverObserveOnScheduler))
}
@ -168,7 +168,7 @@ extension Driver where Element : SignedInteger {
// MARK: timer
extension Driver where Element: SignedInteger {
extension Driver where Element: SignedIntegerType {
/**
Returns an observable sequence that periodically produces a value after the specified initial relative due time has elapsed, using the specified scheduler to run timers.
@ -178,8 +178,8 @@ extension Driver where Element: SignedInteger {
- parameter period: Period to produce subsequent values.
- returns: An observable sequence that produces a value after due time has elapsed and then each period.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public static func timer(_ dueTime: RxTimeInterval, period: RxTimeInterval)
@warn_unused_result(message="http://git.io/rxs.uo")
public static func timer(dueTime: RxTimeInterval, period: RxTimeInterval)
-> Driver<E> {
return Driver(Observable.timer(dueTime, period: period, scheduler: driverObserveOnScheduler))
}
@ -191,7 +191,7 @@ extension Driver where Element: SignedInteger {
**This shouldn't be used in normal release builds.**
*/
public func driveOnScheduler(_ scheduler: SchedulerType, action: () -> ()) {
public func driveOnScheduler(scheduler: SchedulerType, action: () -> ()) {
let originalObserveOnScheduler = driverObserveOnScheduler
let originalSubscribeOnScheduler = driverSubscribeOnScheduler
@ -209,7 +209,7 @@ public func driveOnScheduler(_ scheduler: SchedulerType, action: () -> ()) {
driverSubscribeOnScheduler = originalSubscribeOnScheduler
}
func _forceCompilerToStopDoingInsaneOptimizationsThatBreakCode(_ scheduler: SchedulerType) {
func _forceCompilerToStopDoingInsaneOptimizationsThatBreakCode(scheduler: SchedulerType) {
let a: Int32 = 1
let b = 314 + Int32(arc4random() & 1)
if a == b {

View File

@ -18,8 +18,8 @@ extension ObservableConvertibleType {
- parameter onErrorJustReturn: Element to return in case of error and after that complete the sequence.
- returns: Driving observable sequence.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func asDriver(onErrorJustReturn: E) -> Driver<E> {
@warn_unused_result(message="http://git.io/rxs.uo")
public func asDriver(onErrorJustReturn onErrorJustReturn: E) -> Driver<E> {
let source = self
.asObservable()
.observeOn(driverObserveOnScheduler)
@ -33,8 +33,8 @@ extension ObservableConvertibleType {
- parameter onErrorDriveWith: Driver that continues to drive the sequence in case of error.
- returns: Driving observable sequence.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func asDriver(onErrorDriveWith: Driver<E>) -> Driver<E> {
@warn_unused_result(message="http://git.io/rxs.uo")
public func asDriver(onErrorDriveWith onErrorDriveWith: Driver<E>) -> Driver<E> {
let source = self
.asObservable()
.observeOn(driverObserveOnScheduler)
@ -50,14 +50,14 @@ extension ObservableConvertibleType {
- parameter onErrorRecover: Calculates driver that continues to drive the sequence in case of error.
- returns: Driving observable sequence.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func asDriver(onErrorRecover: @escaping (_ error: Swift.Error) -> Driver<E>) -> Driver<E> {
@warn_unused_result(message="http://git.io/rxs.uo")
public func asDriver(onErrorRecover onErrorRecover: (error: ErrorType) -> Driver<E>) -> Driver<E> {
let source = self
.asObservable()
.observeOn(driverObserveOnScheduler)
.catchError { error in
onErrorRecover(error).asObservable()
onErrorRecover(error: error).asObservable()
}
return Driver(source)
}
}
}

View File

@ -17,10 +17,10 @@ extension Variable {
- returns: Driving observable sequence.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@warn_unused_result(message="http://git.io/rxs.uo")
public func asDriver() -> Driver<E> {
let source = self.asObservable()
.observeOn(driverObserveOnScheduler)
return Driver(source)
}
}
}

View File

@ -18,7 +18,7 @@ Observer that enforces interface binding rules:
`UIBindingObserver` doesn't retain target interface and in case owned interface element is released, element isn't bound.
*/
public class UIBindingObserver<UIElementType, Value> : ObserverType where UIElementType: AnyObject {
public class UIBindingObserver<UIElementType, Value where UIElementType: AnyObject> : ObserverType {
public typealias E = Value
weak var UIElement: UIElementType?
@ -28,7 +28,7 @@ public class UIBindingObserver<UIElementType, Value> : ObserverType where UIElem
/**
Initializes `ViewBindingObserver` using
*/
public init(UIElement: UIElementType, binding: @escaping (UIElementType, Value) -> Void) {
public init(UIElement: UIElementType, binding: (UIElementType, Value) -> Void) {
self.UIElement = UIElement
self.binding = binding
}
@ -36,17 +36,17 @@ public class UIBindingObserver<UIElementType, Value> : ObserverType where UIElem
/**
Binds next element to owner view as described in `binding`.
*/
public func on(_ event: Event<Value>) {
MainScheduler.ensureExecutingOnScheduler(errorMessage: "Element can be bound to user interface only on MainThread.")
public func on(event: Event<Value>) {
MainScheduler.ensureExecutingOnScheduler("Element can be bound to user interface only on MainThread.")
switch event {
case .next(let element):
case .Next(let element):
if let view = self.UIElement {
binding(view, element)
}
case .error(let error):
case .Error(let error):
bindingErrorToInterface(error)
case .completed:
case .Completed:
break
}
}

View File

@ -19,7 +19,7 @@ Base class for `DelegateProxyType` protocol.
This implementation is not thread safe and can be used only from one thread (Main thread).
*/
open class DelegateProxy : _RXDelegateProxy {
public class DelegateProxy : _RXDelegateProxy {
private var subjectsForSelector = [Selector: PublishSubject<[AnyObject]>]()
@ -66,15 +66,15 @@ open class DelegateProxy : _RXDelegateProxy {
let internalSubject = PublishSubject<CGPoint>
public func requiredDelegateMethod(scrollView: UIScrollView, arg1: CGPoint) -> Bool {
internalSubject.on(.next(arg1))
internalSubject.on(.Next(arg1))
return self._forwardToDelegate?.requiredDelegateMethod?(scrollView, arg1: arg1) ?? defaultReturnValue
}
....
// reactive property implementation in a real class (`UIScrollView`)
public var property: Observable<CGPoint> {
let proxy = RxScrollViewDelegateProxy.proxyForObject(base)
public var rx_property: Observable<CGPoint> {
let proxy = RxScrollViewDelegateProxy.proxyForObject(self)
return proxy.internalSubject.asObservable()
}
@ -85,12 +85,12 @@ open class DelegateProxy : _RXDelegateProxy {
- parameter selector: Selector used to filter observed invocations of delegate methods.
- returns: Observable sequence of arguments passed to `selector` method.
*/
public func observe(_ selector: Selector) -> Observable<[AnyObject]> {
if hasWiredImplementation(for: selector) {
public func observe(selector: Selector) -> Observable<[AnyObject]> {
if hasWiredImplementationForSelector(selector) {
print("Delegate proxy is already implementing `\(selector)`, a more performant way of registering might exist.")
}
if !self.responds(to: selector) {
if !self.respondsToSelector(selector) {
rxFatalError("This class doesn't respond to selector \(selector)")
}
@ -108,8 +108,8 @@ open class DelegateProxy : _RXDelegateProxy {
// proxy
open override func interceptedSelector(_ selector: Selector, withArguments arguments: [Any]) {
subjectsForSelector[selector]?.on(.next(arguments as [AnyObject]))
public override func interceptedSelector(selector: Selector, withArguments arguments: [AnyObject]!) {
subjectsForSelector[selector]?.on(.Next(arguments))
}
/**
@ -117,7 +117,7 @@ open class DelegateProxy : _RXDelegateProxy {
- returns: Associated object tag.
*/
public class func delegateAssociatedObjectTag() -> UnsafeRawPointer {
public class func delegateAssociatedObjectTag() -> UnsafePointer<Void> {
return _pointer(&delegateAssociatedTag)
}
@ -126,7 +126,7 @@ open class DelegateProxy : _RXDelegateProxy {
- returns: Initialized instance of `self`.
*/
public class func createProxyForObject(_ object: AnyObject) -> AnyObject {
public class func createProxyForObject(object: AnyObject) -> AnyObject {
return self.init(parentObject: object)
}
@ -136,9 +136,9 @@ open class DelegateProxy : _RXDelegateProxy {
- parameter object: Object that can have assigned delegate proxy.
- returns: Assigned delegate proxy or `nil` if no delegate proxy is assigned.
*/
public class func assignedProxyFor(_ object: AnyObject) -> AnyObject? {
let maybeDelegate = objc_getAssociatedObject(object, self.delegateAssociatedObjectTag())
return castOptionalOrFatalError(maybeDelegate.map { $0 as AnyObject })
public class func assignedProxyFor(object: AnyObject) -> AnyObject? {
let maybeDelegate: AnyObject? = objc_getAssociatedObject(object, self.delegateAssociatedObjectTag())
return castOptionalOrFatalError(maybeDelegate)
}
/**
@ -147,8 +147,8 @@ open class DelegateProxy : _RXDelegateProxy {
- parameter object: Object that can have assigned delegate proxy.
- parameter proxy: Delegate proxy object to assign to `object`.
*/
public class func assignProxy(_ proxy: AnyObject, toObject object: AnyObject) {
precondition(proxy.isKind(of: self.classForCoder()))
public class func assignProxy(proxy: AnyObject, toObject object: AnyObject) {
precondition(proxy.isKindOfClass(self.classForCoder()))
objc_setAssociatedObject(object, self.delegateAssociatedObjectTag(), proxy, .OBJC_ASSOCIATION_RETAIN)
}
@ -160,8 +160,8 @@ open class DelegateProxy : _RXDelegateProxy {
- parameter forwardToDelegate: Reference of delegate that receives all messages through `self`.
- parameter retainDelegate: Should `self` retain `forwardToDelegate`.
*/
public func setForwardToDelegate(_ delegate: AnyObject?, retainDelegate: Bool) {
self._setForward(toDelegate: delegate, retainDelegate: retainDelegate)
public func setForwardToDelegate(delegate: AnyObject?, retainDelegate: Bool) {
self._setForwardToDelegate(delegate, retainDelegate: retainDelegate)
}
/**
@ -176,7 +176,7 @@ open class DelegateProxy : _RXDelegateProxy {
deinit {
for v in subjectsForSelector.values {
v.on(.completed)
v.on(.Completed)
}
#if TRACE_RESOURCES
OSAtomicDecrement32(&resourceCount)
@ -185,7 +185,7 @@ open class DelegateProxy : _RXDelegateProxy {
// MARK: Pointer
class func _pointer(_ p: UnsafeRawPointer) -> UnsafeRawPointer {
class func _pointer(p: UnsafePointer<Void>) -> UnsafePointer<Void> {
return p
}
}
}

View File

@ -69,8 +69,8 @@ every view has a corresponding delegate virtual factory method.
In case of UITableView / UIScrollView, there is
extension UIScrollView {
public func createRxDelegateProxy() -> RxScrollViewDelegateProxy {
return RxScrollViewDelegateProxy(parentObject: base)
public func rx_createDelegateProxy() -> RxScrollViewDelegateProxy {
return RxScrollViewDelegateProxy(parentObject: self)
}
....
@ -78,7 +78,7 @@ In case of UITableView / UIScrollView, there is
and override in UITableView
extension UITableView {
public override func createRxDelegateProxy() -> RxScrollViewDelegateProxy {
public override func rx_createDelegateProxy() -> RxScrollViewDelegateProxy {
....
@ -87,7 +87,7 @@ public protocol DelegateProxyType : AnyObject {
/**
Creates new proxy for target object.
*/
static func createProxyForObject(_ object: AnyObject) -> AnyObject
static func createProxyForObject(object: AnyObject) -> AnyObject
/**
Returns assigned proxy for object.
@ -95,7 +95,7 @@ public protocol DelegateProxyType : AnyObject {
- parameter object: Object that can have assigned delegate proxy.
- returns: Assigned delegate proxy or `nil` if no delegate proxy is assigned.
*/
static func assignedProxyFor(_ object: AnyObject) -> AnyObject?
static func assignedProxyFor(object: AnyObject) -> AnyObject?
/**
Assigns proxy to object.
@ -103,7 +103,7 @@ public protocol DelegateProxyType : AnyObject {
- parameter object: Object that can have assigned delegate proxy.
- parameter proxy: Delegate proxy object to assign to `object`.
*/
static func assignProxy(_ proxy: AnyObject, toObject object: AnyObject)
static func assignProxy(proxy: AnyObject, toObject object: AnyObject)
/**
Returns designated delegate property for object.
@ -115,7 +115,7 @@ public protocol DelegateProxyType : AnyObject {
- parameter object: Object that has delegate property.
- returns: Value of delegate property.
*/
static func currentDelegateFor(_ object: AnyObject) -> AnyObject?
static func currentDelegateFor(object: AnyObject) -> AnyObject?
/**
Sets designated delegate property for object.
@ -127,7 +127,7 @@ public protocol DelegateProxyType : AnyObject {
- parameter toObject: Object that has delegate property.
- parameter delegate: Delegate value.
*/
static func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject)
static func setCurrentDelegate(delegate: AnyObject?, toObject object: AnyObject)
/**
Returns reference of normal delegate that receives all forwarded messages
@ -144,11 +144,11 @@ public protocol DelegateProxyType : AnyObject {
- parameter forwardToDelegate: Reference of delegate that receives all messages through `self`.
- parameter retainDelegate: Should `self` retain `forwardToDelegate`.
*/
func setForwardToDelegate(_ forwardToDelegate: AnyObject?, retainDelegate: Bool)
func setForwardToDelegate(forwardToDelegate: AnyObject?, retainDelegate: Bool)
}
@available(*, deprecated:2.5, renamed:"DelegateProxyType.proxyForObject", message:"You can just use normal static protocol extension. E.g. `RxScrollViewDelegateProxy.proxyForObject`")
public func proxyForObject<P: DelegateProxyType>(_ type: P.Type, _ object: AnyObject) -> P {
@available(*, deprecated=2.5, renamed="DelegateProxyType.proxyForObject", message="You can just use normal static protocol extension. E.g. `RxScrollViewDelegateProxy.proxyForObject`")
public func proxyForObject<P: DelegateProxyType>(type: P.Type, _ object: AnyObject) -> P {
return P.proxyForObject(object)
}
@ -160,38 +160,37 @@ extension DelegateProxyType {
- returns: Installed instance of delegate proxy.
extension Reactive where Base: UISearchBar {
extension UISearchBar {
public var delegate: DelegateProxy {
return RxSearchBarDelegateProxy.proxyForObject(base)
public var rx_delegate: DelegateProxy {
return RxSearchBarDelegateProxy.proxyForObject(self)
}
public var text: ControlProperty<String> {
let source: Observable<String> = self.delegate.observe(#selector(UISearchBarDelegate.searchBar(_:textDidChange:)))
public var rx_text: ControlProperty<String> {
let source: Observable<String> = self.rx_delegate.observe(#selector(UISearchBarDelegate.searchBar(_:textDidChange:)))
...
}
}
*/
public static func proxyForObject(_ object: AnyObject) -> Self {
public static func proxyForObject(object: AnyObject) -> Self {
MainScheduler.ensureExecutingOnScheduler()
let maybeProxy = Self.assignedProxyFor(object) as? Self
let proxy: Self
if let existingProxy = maybeProxy {
proxy = existingProxy
}
else {
if maybeProxy == nil {
proxy = Self.createProxyForObject(object) as! Self
Self.assignProxy(proxy, toObject: object)
assert(Self.assignedProxyFor(object) === proxy)
}
else {
proxy = maybeProxy!
}
let currentDelegate: AnyObject? = Self.currentDelegateFor(object)
if currentDelegate !== proxy {
proxy.setForwardToDelegate(currentDelegate, retainDelegate: false)
assert(proxy.forwardToDelegate() === currentDelegate)
Self.setCurrentDelegate(proxy, toObject: object)
assert(Self.currentDelegateFor(object) === proxy)
assert(proxy.forwardToDelegate() === currentDelegate)
@ -209,7 +208,7 @@ extension DelegateProxyType {
- parameter onProxyForObject: Object that has `delegate` property.
- returns: Disposable object that can be used to clear forward delegate.
*/
public static func installForwardDelegate(_ forwardDelegate: AnyObject, retainDelegate: Bool, onProxyForObject object: AnyObject) -> Disposable {
public static func installForwardDelegate(forwardDelegate: AnyObject, retainDelegate: Bool, onProxyForObject object: AnyObject) -> Disposable {
weak var weakForwardDelegate: AnyObject? = forwardDelegate
let proxy = Self.proxyForObject(object)
@ -227,9 +226,9 @@ extension DelegateProxyType {
Self.setCurrentDelegate(nil, toObject: object)
Self.setCurrentDelegate(proxy, toObject: object)
assert(proxy.forwardToDelegate() === forwardDelegate, "Setting of delegate failed:\ncurrent:\n\(proxy.forwardToDelegate())\nexpected:\n\(forwardDelegate)")
assert(proxy.forwardToDelegate() === forwardDelegate, "Setting of delegate failed")
return Disposables.create {
return AnonymousDisposable {
MainScheduler.ensureExecutingOnScheduler()
let delegate: AnyObject? = weakForwardDelegate
@ -242,17 +241,13 @@ extension DelegateProxyType {
}
extension ObservableType {
func subscribeProxyDataSource<P: DelegateProxyType>(ofObject object: AnyObject, dataSource: AnyObject, retainDataSource: Bool, binding: @escaping (P, Event<E>) -> Void)
func subscribeProxyDataSourceForObject<P: DelegateProxyType>(object: AnyObject, dataSource: AnyObject, retainDataSource: Bool, binding: (P, Event<E>) -> Void)
-> Disposable {
let proxy = P.proxyForObject(object)
let disposable = P.installForwardDelegate(dataSource, retainDelegate: retainDataSource, onProxyForObject: object)
let subscription = self.asObservable()
.catchError { error in
bindingErrorToInterface(error)
return Observable.empty()
}
// source can never end, otherwise it would release the subscriber, and deallocate the data source
// source can never end, otherwise it would release the subscriber
.concat(Observable.never())
.subscribe { [weak object] (event: Event<E>) in
MainScheduler.ensureExecutingOnScheduler()
@ -264,16 +259,16 @@ extension ObservableType {
binding(proxy, event)
switch event {
case .error(let error):
case .Error(let error):
bindingErrorToInterface(error)
disposable.dispose()
case .completed:
case .Completed:
disposable.dispose()
default:
break
}
}
return Disposables.create(subscription, disposable)
return StableCompositeDisposable.create(subscription, disposable)
}
}

View File

@ -15,7 +15,7 @@ extension Int : KVORepresentable {
Constructs `Self` using KVO value.
*/
public init?(KVOValue: KVOType) {
self.init(KVOValue.int32Value)
self.init(KVOValue.integerValue)
}
}
@ -26,7 +26,7 @@ extension Int32 : KVORepresentable {
Constructs `Self` using KVO value.
*/
public init?(KVOValue: KVOType) {
self.init(KVOValue.int32Value)
self.init(KVOValue.intValue)
}
}
@ -37,7 +37,7 @@ extension Int64 : KVORepresentable {
Constructs `Self` using KVO value.
*/
public init?(KVOValue: KVOType) {
self.init(KVOValue.int64Value)
self.init(KVOValue.longLongValue)
}
}
@ -48,7 +48,7 @@ extension UInt : KVORepresentable {
Constructs `Self` using KVO value.
*/
public init?(KVOValue: KVOType) {
self.init(KVOValue.uintValue)
self.init(KVOValue.unsignedLongValue)
}
}
@ -59,7 +59,7 @@ extension UInt32 : KVORepresentable {
Constructs `Self` using KVO value.
*/
public init?(KVOValue: KVOType) {
self.init(KVOValue.uint32Value)
self.init(KVOValue.unsignedIntValue)
}
}
@ -70,7 +70,7 @@ extension UInt64 : KVORepresentable {
Constructs `Self` using KVO value.
*/
public init?(KVOValue: KVOType) {
self.init(KVOValue.uint64Value)
self.init(KVOValue.unsignedLongLongValue)
}
}
@ -90,4 +90,4 @@ extension RawRepresentable where RawValue: KVORepresentable {
self.init(rawValue: rawValue)
}
}
}

View File

@ -12,7 +12,7 @@ import Foundation
Simple logging settings for RxCocoa library.
*/
public struct Logging {
public typealias LogURLRequest = (URLRequest) -> Bool
public typealias LogURLRequest = (NSURLRequest) -> Bool
/**
Log URL requests to standard output in curl format.
@ -24,4 +24,4 @@ public struct Logging {
return false
#endif
}
}
}

View File

@ -19,12 +19,12 @@ import RxSwift
#endif
#if os(iOS) || os(OSX) || os(tvOS)
extension Reactive where Base: NSLayoutConstraint {
extension NSLayoutConstraint {
/**
Bindable sink for `constant` property.
*/
public var constant: AnyObserver<CGFloat> {
return UIBindingObserver(UIElement: self.base) { constraint, constant in
public var rx_constant: AnyObserver<CGFloat> {
return UIBindingObserver(UIElement: self) { constraint, constant in
constraint.constant = constant
}.asObserver()
}
@ -33,9 +33,9 @@ extension Reactive where Base: NSLayoutConstraint {
Bindable sink for `active` property.
*/
@available(iOS 8, OSX 10.10, *)
public var active: AnyObserver<Bool> {
return UIBindingObserver(UIElement: self.base) { constraint, value in
constraint.isActive = value
public var rx_active: AnyObserver<Bool> {
return UIBindingObserver(UIElement: self) { constraint, value in
constraint.active = value
}.asObserver()
}
}

View File

@ -22,8 +22,8 @@ extension ObservableType {
- parameter observer: Observer that receives events.
- returns: Disposable object that can be used to unsubscribe the observer.
*/
// @warn_unused_result(message: "http://git.io/rxs.ud")
public func bindTo<O: ObserverType>(_ observer: O) -> Disposable where O.E == E {
@warn_unused_result(message="http://git.io/rxs.ud")
public func bindTo<O: ObserverType where O.E == E>(observer: O) -> Disposable {
return self.subscribe(observer)
}
@ -36,20 +36,20 @@ extension ObservableType {
- parameter variable: Target variable for sequence elements.
- returns: Disposable object that can be used to unsubscribe the observer.
*/
// @warn_unused_result(message: "http://git.io/rxs.ud")
public func bindTo(_ variable: Variable<E>) -> Disposable {
@warn_unused_result(message="http://git.io/rxs.ud")
public func bindTo(variable: Variable<E>) -> Disposable {
return subscribe { e in
switch e {
case let .next(element):
case let .Next(element):
variable.value = element
case let .error(error):
case let .Error(error):
let error = "Binding error to variable: \(error)"
#if DEBUG
rxFatalError(error)
#else
print(error)
#endif
case .completed:
case .Completed:
break
}
}
@ -61,8 +61,8 @@ extension ObservableType {
- parameter binder: Function used to bind elements from `self`.
- returns: Object representing subscription.
*/
// @warn_unused_result(message: "http://git.io/rxs.ud")
public func bindTo<R>(_ binder: (Self) -> R) -> R {
@warn_unused_result(message="http://git.io/rxs.ud")
public func bindTo<R>(binder: Self -> R) -> R {
return binder(self)
}
@ -78,8 +78,8 @@ extension ObservableType {
- parameter curriedArgument: Final argument passed to `binder` to finish binding process.
- returns: Object representing subscription.
*/
// @warn_unused_result(message: "http://git.io/rxs.ud")
public func bindTo<R1, R2>(_ binder: (Self) -> (R1) -> R2, curriedArgument: R1) -> R2 {
@warn_unused_result(message="http://git.io/rxs.ud")
public func bindTo<R1, R2>(binder: Self -> R1 -> R2, curriedArgument: R1) -> R2 {
return binder(self)(curriedArgument)
}
@ -93,8 +93,8 @@ extension ObservableType {
- parameter onNext: Action to invoke for each element in the observable sequence.
- returns: Subscription object used to unsubscribe from the observable sequence.
*/
// @warn_unused_result(message: "http://git.io/rxs.ud")
public func bindNext(_ onNext: @escaping (E) -> Void) -> Disposable {
@warn_unused_result(message="http://git.io/rxs.ud")
public func bindNext(onNext: E -> Void) -> Disposable {
return subscribe(onNext: onNext, onError: { error in
let error = "Binding error: \(error)"
#if DEBUG

View File

@ -45,9 +45,9 @@ class ControlTarget: RxTarget {
super.init()
control.addTarget(self, action: selector, for: controlEvents)
control.addTarget(self, action: selector, forControlEvents: controlEvents)
let method = self.method(for: selector)
let method = self.methodForSelector(selector)
if method == nil {
rxFatalError("Can't find method")
}
@ -64,15 +64,15 @@ class ControlTarget: RxTarget {
control.target = self
control.action = selector
let method = self.method(for: selector)
let method = self.methodForSelector(selector)
if method == nil {
rxFatalError("Can't find method")
}
}
#endif
func eventHandler(_ sender: Control!) {
if let callback = self.callback, let control = self.control {
func eventHandler(sender: Control!) {
if let callback = self.callback, control = self.control {
callback(control)
}
}
@ -80,7 +80,7 @@ class ControlTarget: RxTarget {
override func dispose() {
super.dispose()
#if os(iOS) || os(tvOS)
self.control?.removeTarget(self, action: self.selector, for: self.controlEvents)
self.control?.removeTarget(self, action: self.selector, forControlEvents: self.controlEvents)
#elseif os(OSX)
self.control?.target = nil
self.control?.action = nil

View File

@ -12,13 +12,13 @@ import RxSwift
#endif
class DeallocObservable {
let _subject = ReplaySubject<Void>.create(bufferSize:1)
let _subject = ReplaySubject<Void>.create(bufferSize: 1)
init() {
}
deinit {
_subject.on(.next(()))
_subject.on(.completed)
_subject.on(.Next(()))
_subject.on(.Completed)
}
}

View File

@ -33,29 +33,29 @@ class KVOObservable<Element>
}
}
func subscribe<O : ObserverType>(_ observer: O) -> Disposable where O.E == Element? {
func subscribe<O : ObserverType where O.E == Element?>(observer: O) -> Disposable {
let observer = KVOObserver(parent: self) { (value) in
if value as? NSNull != nil {
observer.on(.next(nil))
observer.on(.Next(nil))
return
}
observer.on(.next(value as? Element))
observer.on(.Next(value as? Element))
}
return Disposables.create(with: observer.dispose)
return AnonymousDisposable(observer.dispose)
}
}
#if !DISABLE_SWIZZLING
func observeWeaklyKeyPathFor(_ target: NSObject, keyPath: String, options: NSKeyValueObservingOptions) -> Observable<AnyObject?> {
let components = keyPath.components(separatedBy: ".").filter { $0 != "self" }
func observeWeaklyKeyPathFor(target: NSObject, keyPath: String, options: NSKeyValueObservingOptions) -> Observable<AnyObject?> {
let components = keyPath.componentsSeparatedByString(".").filter { $0 != "self" }
let observable = observeWeaklyKeyPathFor(target, keyPathSections: components, options: options)
.finishWithNilWhenDealloc(target)
if !options.intersection(.initial).isEmpty {
if !options.intersect(.Initial).isEmpty {
return observable
}
else {
@ -68,14 +68,14 @@ func observeWeaklyKeyPathFor(_ target: NSObject, keyPath: String, options: NSKey
// Identifiers can't contain `,`, so the only place where `,` can appear
// is as a delimiter.
// This means there is `W` as element in an array of property attributes.
func isWeakProperty(_ properyRuntimeInfo: String) -> Bool {
return properyRuntimeInfo.range(of: ",W,") != nil
func isWeakProperty(properyRuntimeInfo: String) -> Bool {
return properyRuntimeInfo.rangeOfString(",W,") != nil
}
extension ObservableType where E == AnyObject? {
func finishWithNilWhenDealloc(_ target: NSObject)
func finishWithNilWhenDealloc(target: NSObject)
-> Observable<AnyObject?> {
let deallocating = target.rx.deallocating
let deallocating = target.rx_deallocating
return deallocating
.map { _ in
@ -87,7 +87,7 @@ extension ObservableType where E == AnyObject? {
}
func observeWeaklyKeyPathFor(
_ target: NSObject,
target: NSObject,
keyPathSections: [String],
options: NSKeyValueObservingOptions
) -> Observable<AnyObject?> {
@ -99,13 +99,13 @@ func observeWeaklyKeyPathFor(
let property = class_getProperty(object_getClass(target), propertyName)
if property == nil {
return Observable.error(RxCocoaError.invalidPropertyName(object: target, propertyName: propertyName))
return Observable.error(RxCocoaError.InvalidPropertyName(object: target, propertyName: propertyName))
}
let propertyAttributes = property_getAttributes(property)
// should dealloc hook be in place if week property, or just create strong reference because it doesn't matter
let isWeak = isWeakProperty(propertyAttributes.map(String.init) ?? "")
let propertyObservable = KVOObservable(object: target, keyPath: propertyName, options: options.union(.initial), retainTarget: false) as KVOObservable<AnyObject>
let isWeak = isWeakProperty(String.fromCString(propertyAttributes) ?? "")
let propertyObservable = KVOObservable(object: target, keyPath: propertyName, options: options.union(.Initial), retainTarget: false) as KVOObservable<AnyObject>
// KVO recursion for value changes
return propertyObservable
@ -118,7 +118,7 @@ func observeWeaklyKeyPathFor(
let strongTarget: AnyObject? = weakTarget
if nextObject == nil {
return Observable.error(RxCocoaError.invalidObjectOnKeyPath(object: nextTarget!, sourceObject: strongTarget ?? NSNull(), propertyName: propertyName))
return Observable.error(RxCocoaError.InvalidObjectOnKeyPath(object: nextTarget!, sourceObject: strongTarget ?? NSNull(), propertyName: propertyName))
}
// if target is alive, then send change

View File

@ -20,7 +20,7 @@ protocol KVOObservableProtocol {
class KVOObserver : _RXKVOObserver
, Disposable {
typealias Callback = @escaping (Any?) -> Void
typealias Callback = (AnyObject?) -> Void
var retainSelf: KVOObserver? = nil
@ -43,4 +43,4 @@ class KVOObserver : _RXKVOObserver
OSAtomicDecrement32(&resourceCount)
#endif
}
}
}

View File

@ -29,8 +29,8 @@ import Foundation
init() {
}
@objc func messageSent(withParameters parameters: [Any]) -> Void {
_subject.on(.next())
@objc func messageSentWithParameters(parameters: [AnyObject]) -> Void {
_subject.on(.Next())
}
func asObservable() -> Observable<()> {
@ -38,7 +38,7 @@ import Foundation
}
deinit {
_subject.on(.completed)
_subject.on(.Completed)
}
}
@ -58,8 +58,8 @@ import Foundation
init() {
}
@objc func messageSent(withParameters parameters: [Any]) -> Void {
_subject.on(.next(parameters as [AnyObject]))
@objc func messageSentWithParameters(parameters: [AnyObject]) -> Void {
_subject.on(.Next(parameters))
}
func asObservable() -> Observable<[AnyObject]> {
@ -67,7 +67,7 @@ import Foundation
}
deinit {
_subject.on(.completed)
_subject.on(.Completed)
}
}

View File

@ -11,7 +11,7 @@ import Foundation
import RxSwift
#endif
extension Reactive where Base: NotificationCenter {
extension NSNotificationCenter {
/**
Transforms notifications posted to notification center to observable sequence of notifications.
@ -19,16 +19,16 @@ extension Reactive where Base: NotificationCenter {
- parameter object: Optional object used to filter notifications.
- returns: Observable sequence of posted notifications.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func notification(_ name: Notification.Name, object: AnyObject? = nil) -> Observable<Notification> {
@warn_unused_result(message="http://git.io/rxs.uo")
public func rx_notification(name: String?, object: AnyObject? = nil) -> Observable<NSNotification> {
return Observable.create { [weak object] observer in
let nsObserver = self.base.addObserver(forName: name, object: object, queue: nil) { notification in
observer.on(.next(notification))
let nsObserver = self.addObserverForName(name, object: object, queue: nil) { notification in
observer.on(.Next(notification))
}
return Disposables.create {
self.base.removeObserver(nsObserver)
return AnonymousDisposable {
self.removeObserver(nsObserver)
}
}
}
}
}

View File

@ -11,34 +11,34 @@ import Foundation
import RxSwift
#endif
extension Reactive where Base: NSObject {
extension NSObject {
/**
Specialization of generic `observe` method.
Specialization of generic `rx_observe` method.
This is a special overload because to observe values of some type (for example `Int`), first values of KVO type
need to be observed (`NSNumber`), and then converted to result type.
For more information take a look at `observe` method.
For more information take a look at `rx_observe` method.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func observe<E: KVORepresentable>(_ type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.new, .initial], retainSelf: Bool = true) -> Observable<E?> {
return observe(E.KVOType.self, keyPath, options: options, retainSelf: retainSelf)
@warn_unused_result(message="http://git.io/rxs.uo")
public func rx_observe<E: KVORepresentable>(type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.New, .Initial], retainSelf: Bool = true) -> Observable<E?> {
return rx_observe(E.KVOType.self, keyPath, options: options, retainSelf: retainSelf)
.map(E.init)
}
}
#if !DISABLE_SWIZZLING
// KVO
extension Reactive where Base: NSObject {
extension NSObject {
/**
Specialization of generic `observeWeakly` method.
Specialization of generic `rx_observeWeakly` method.
For more information take a look at `observeWeakly` method.
For more information take a look at `rx_observeWeakly` method.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func observeWeakly<E: KVORepresentable>(_ type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.new, .initial]) -> Observable<E?> {
return observeWeakly(E.KVOType.self, keyPath, options: options)
@warn_unused_result(message="http://git.io/rxs.uo")
public func rx_observeWeakly<E: KVORepresentable>(type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.New, .Initial]) -> Observable<E?> {
return rx_observeWeakly(E.KVOType.self, keyPath, options: options)
.map(E.init)
}
}

View File

@ -11,40 +11,40 @@ import Foundation
import RxSwift
#endif
extension Reactive where Base: NSObject {
extension NSObject {
/**
Specialization of generic `observe` method.
Specialization of generic `rx_observe` method.
This specialization first observes `KVORepresentable` value and then converts it to `RawRepresentable` value.
It is useful for observing bridged ObjC enum values.
For more information take a look at `observe` method.
For more information take a look at `rx_observe` method.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func observe<E: RawRepresentable>(_ type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.new, .initial], retainSelf: Bool = true) -> Observable<E?> where E.RawValue: KVORepresentable {
return observe(E.RawValue.KVOType.self, keyPath, options: options, retainSelf: retainSelf)
@warn_unused_result(message="http://git.io/rxs.uo")
public func rx_observe<E: RawRepresentable where E.RawValue: KVORepresentable>(type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.New, .Initial], retainSelf: Bool = true) -> Observable<E?> {
return rx_observe(E.RawValue.KVOType.self, keyPath, options: options, retainSelf: retainSelf)
.map(E.init)
}
}
#if !DISABLE_SWIZZLING
// observeWeakly + RawRepresentable
extension Reactive where Base: NSObject {
// rx_observeWeakly + RawRepresentable
extension NSObject {
/**
Specialization of generic `observeWeakly` method.
Specialization of generic `rx_observeWeakly` method.
This specialization first observes `KVORepresentable` value and then converts it to `RawRepresentable` value.
It is useful for observing bridged ObjC enum values.
For more information take a look at `observeWeakly` method.
For more information take a look at `rx_observeWeakly` method.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func observeWeakly<E: RawRepresentable>(_ type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.new, .initial]) -> Observable<E?> where E.RawValue: KVORepresentable {
return observeWeakly(E.RawValue.KVOType.self, keyPath, options: options)
@warn_unused_result(message="http://git.io/rxs.uo")
public func rx_observeWeakly<E: RawRepresentable where E.RawValue: KVORepresentable>(type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.New, .Initial]) -> Observable<E?> {
return rx_observeWeakly(E.RawValue.KVOType.self, keyPath, options: options)
.map(E.init)
}
}

View File

@ -38,39 +38,39 @@ Both approaches can fail in certain scenarios:
Second approach is chosen. It can fail in case there are multiple libraries dynamically trying
to replace dealloc method. In case that isn't the case, it should be ok.
*/
extension Reactive where Base: NSObject {
extension NSObject {
/**
Observes values on `keyPath` starting from `self` with `options` and retains `self` if `retainSelf` is set.
`observe` is just a simple and performant wrapper around KVO mechanism.
`rx_observe` is just a simple and performant wrapper around KVO mechanism.
* it can be used to observe paths starting from `self` or from ancestors in ownership graph (`retainSelf = false`)
* it can be used to observe paths starting from descendants in ownership graph (`retainSelf = true`)
* the paths have to consist only of `strong` properties, otherwise you are risking crashing the system by not unregistering KVO observer before dealloc.
If support for weak properties is needed or observing arbitrary or unknown relationships in the
ownership tree, `observeWeakly` is the preferred option.
ownership tree, `rx_observeWeakly` is the preferred option.
- parameter keyPath: Key path of property names to observe.
- parameter options: KVO mechanism notification options.
- parameter retainSelf: Retains self during observation if set `true`.
- returns: Observable sequence of objects on `keyPath`.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func observe<E>(_ type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.new, .initial], retainSelf: Bool = true) -> Observable<E?> {
return KVOObservable(object: base, keyPath: keyPath, options: options, retainTarget: retainSelf).asObservable()
@warn_unused_result(message="http://git.io/rxs.uo")
public func rx_observe<E>(type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.New, .Initial], retainSelf: Bool = true) -> Observable<E?> {
return KVOObservable(object: self, keyPath: keyPath, options: options, retainTarget: retainSelf).asObservable()
}
}
#if !DISABLE_SWIZZLING
// KVO
extension Reactive where Base: NSObject {
extension NSObject {
/**
Observes values on `keyPath` starting from `self` with `options` and doesn't retain `self`.
It can be used in all cases where `observe` can be used and additionally
It can be used in all cases where `rx_observe` can be used and additionally
* because it won't retain observed target, it can be used to observe arbitrary object graph whose ownership relation is unknown
* it can be used to observe `weak` properties
@ -81,9 +81,9 @@ extension Reactive where Base: NSObject {
- parameter options: KVO mechanism notification options.
- returns: Observable sequence of objects on `keyPath`.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func observeWeakly<E>(_ type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.new, .initial]) -> Observable<E?> {
return observeWeaklyKeyPathFor(base, keyPath: keyPath, options: options)
@warn_unused_result(message="http://git.io/rxs.uo")
public func rx_observeWeakly<E>(type: E.Type, _ keyPath: String, options: NSKeyValueObservingOptions = [.New, .Initial]) -> Observable<E?> {
return observeWeaklyKeyPathFor(self, keyPath: keyPath, options: options)
.map { n in
return n as? E
}
@ -92,7 +92,7 @@ extension Reactive where Base: NSObject {
#endif
// Dealloc
extension Reactive where Base: AnyObject {
extension NSObject {
/**
Observable sequence of object deallocated events.
@ -101,15 +101,15 @@ extension Reactive where Base: AnyObject {
- returns: Observable sequence of object deallocated events.
*/
public var deallocated: Observable<Void> {
return synchronized {
if let deallocObservable = objc_getAssociatedObject(base, &deallocatedSubjectContext) as? DeallocObservable {
public var rx_deallocated: Observable<Void> {
return rx_synchronized {
if let deallocObservable = objc_getAssociatedObject(self, &deallocatedSubjectContext) as? DeallocObservable {
return deallocObservable._subject
}
let deallocObservable = DeallocObservable()
objc_setAssociatedObject(base, &deallocatedSubjectContext, deallocObservable, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
objc_setAssociatedObject(self, &deallocatedSubjectContext, deallocObservable, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
return deallocObservable._subject
}
}
@ -125,24 +125,24 @@ extension Reactive where Base: AnyObject {
- returns: Observable sequence of object deallocating events.
*/
public func sentMessage(_ selector: Selector) -> Observable<[AnyObject]> {
return synchronized {
public func rx_sentMessage(selector: Selector) -> Observable<[AnyObject]> {
return rx_synchronized {
// in case of dealloc selector replay subject behavior needs to be used
if selector == deallocSelector {
return deallocating.map { _ in [] }
return rx_deallocating.map { _ in [] }
}
let rxSelector = RX_selector(selector)
let selectorReference = RX_reference_from_selector(rxSelector)
let subject: MessageSentObservable
if let existingSubject = objc_getAssociatedObject(base, selectorReference) as? MessageSentObservable {
if let existingSubject = objc_getAssociatedObject(self, selectorReference) as? MessageSentObservable {
subject = existingSubject
}
else {
subject = MessageSentObservable()
objc_setAssociatedObject(
base,
self,
selectorReference,
subject,
.OBJC_ASSOCIATION_RETAIN_NONATOMIC
@ -150,16 +150,17 @@ extension Reactive where Base: AnyObject {
}
if subject.isActive {
return subject.asObservable().map { $0 }
return subject.asObservable()
}
var error: NSError?
guard let targetImplementation = RX_ensure_observing(base, selector, &error) else {
return Observable.error(error?.rxCocoaErrorForTarget(base) ?? RxCocoaError.unknown)
let targetImplementation = RX_ensure_observing(self, selector, &error)
if targetImplementation == nil {
return Observable.error(error?.rxCocoaErrorForTarget(self) ?? RxCocoaError.Unknown)
}
subject.targetImplementation = targetImplementation
return subject.asObservable().map { $0 }
return subject.asObservable()
}
}
@ -173,17 +174,17 @@ extension Reactive where Base: AnyObject {
- returns: Observable sequence of object deallocating events.
*/
public var deallocating: Observable<()> {
return synchronized {
public var rx_deallocating: Observable<()> {
return rx_synchronized {
let subject: DeallocatingObservable
if let existingSubject = objc_getAssociatedObject(base, rxDeallocatingSelectorReference) as? DeallocatingObservable {
if let existingSubject = objc_getAssociatedObject(self, rxDeallocatingSelectorReference) as? DeallocatingObservable {
subject = existingSubject
}
else {
subject = DeallocatingObservable()
objc_setAssociatedObject(
base,
self,
rxDeallocatingSelectorReference,
subject,
.OBJC_ASSOCIATION_RETAIN_NONATOMIC
@ -195,12 +196,12 @@ extension Reactive where Base: AnyObject {
}
var error: NSError?
let targetImplementation = RX_ensure_observing(base, deallocSelector, &error)
let targetImplementation = RX_ensure_observing(self, deallocSelector, &error)
if targetImplementation == nil {
return Observable.error(error?.rxCocoaErrorForTarget(base) ?? RxCocoaError.unknown)
return Observable.error(error?.rxCocoaErrorForTarget(self) ?? RxCocoaError.Unknown)
}
subject.targetImplementation = targetImplementation!
subject.targetImplementation = targetImplementation
return subject.asObservable()
}
}
@ -211,29 +212,29 @@ let deallocSelector = NSSelectorFromString("dealloc")
let rxDeallocatingSelector = RX_selector(deallocSelector)
let rxDeallocatingSelectorReference = RX_reference_from_selector(rxDeallocatingSelector)
extension Reactive where Base: AnyObject {
func synchronized<T>( _ action: () -> T) -> T {
objc_sync_enter(self.base)
extension NSObject {
func rx_synchronized<T>(@noescape action: () -> T) -> T {
objc_sync_enter(self)
let result = action()
objc_sync_exit(self.base)
objc_sync_exit(self)
return result
}
}
extension Reactive where Base: AnyObject {
extension NSObject {
/**
Helper to make sure that `Observable` returned from `createCachedObservable` is only created once.
This is important because there is only one `target` and `action` properties on `NSControl` or `UIBarButtonItem`.
*/
func lazyInstanceObservable<T: AnyObject>(_ key: UnsafeRawPointer, createCachedObservable: () -> T) -> T {
if let value = objc_getAssociatedObject(base, key) {
func rx_lazyInstanceObservable<T: AnyObject>(key: UnsafePointer<Void>, createCachedObservable: () -> T) -> T {
if let value = objc_getAssociatedObject(self, key) {
return value as! T
}
let observable = createCachedObservable()
objc_setAssociatedObject(base, key, observable, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
objc_setAssociatedObject(self, key, observable, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN_NONATOMIC)
return observable
}
}
}

View File

@ -15,24 +15,24 @@ import RxSwift
RxCocoa URL errors.
*/
public enum RxCocoaURLError
: Swift.Error
: ErrorType
, CustomDebugStringConvertible {
/**
Unknown error occurred.
*/
case unknown
case Unknown
/**
Response is not NSHTTPURLResponse
*/
case nonHTTPResponse(response: URLResponse)
case NonHTTPResponse(response: NSURLResponse)
/**
Response is not successful. (not in `200 ..< 300` range)
*/
case httpRequestFailed(response: HTTPURLResponse, data: Data?)
case HTTPRequestFailed(response: NSHTTPURLResponse, data: NSData?)
/**
Deserialization error.
*/
case deserializationError(error: Swift.Error)
case DeserializationError(error: ErrorType)
}
public extension RxCocoaURLError {
@ -41,40 +41,40 @@ public extension RxCocoaURLError {
*/
public var debugDescription: String {
switch self {
case .unknown:
case .Unknown:
return "Unknown error has occurred."
case let .nonHTTPResponse(response):
case let .NonHTTPResponse(response):
return "Response is not NSHTTPURLResponse `\(response)`."
case let .httpRequestFailed(response, _):
case let .HTTPRequestFailed(response, _):
return "HTTP request failed with `\(response.statusCode)`."
case let .deserializationError(error):
case let .DeserializationError(error):
return "Error during deserialization of the response: \(error)"
}
}
}
func escapeTerminalString(_ value: String) -> String {
return value.replacingOccurrences(of: "\"", with: "\\\"", options:[], range: nil)
func escapeTerminalString(value: String) -> String {
return value.stringByReplacingOccurrencesOfString("\"", withString: "\\\"", options:[], range: nil)
}
func convertURLRequestToCurlCommand(_ request: URLRequest) -> String {
let method = request.httpMethod ?? "GET"
func convertURLRequestToCurlCommand(request: NSURLRequest) -> String {
let method = request.HTTPMethod ?? "GET"
var returnValue = "curl -X \(method) "
if request.httpMethod == "POST" && request.httpBody != nil {
let maybeBody = NSString(data: request.httpBody!, encoding: String.Encoding.utf8.rawValue) as? String
if request.HTTPMethod == "POST" && request.HTTPBody != nil {
let maybeBody = NSString(data: request.HTTPBody!, encoding: NSUTF8StringEncoding) as? String
if let body = maybeBody {
returnValue += "-d \"\(escapeTerminalString(body))\" "
}
}
for (key, value) in request.allHTTPHeaderFields ?? [:] {
let escapedKey = escapeTerminalString(key as String)
let escapedValue = escapeTerminalString(value as String)
let escapedKey = escapeTerminalString((key as String) ?? "")
let escapedValue = escapeTerminalString((value as String) ?? "")
returnValue += "\n -H \"\(escapedKey): \(escapedValue)\" "
}
let URLString = request.url?.absoluteString ?? "<unknown url>"
let URLString = request.URL?.absoluteString ?? "<unknown url>"
returnValue += "\n\"\(escapeTerminalString(URLString))\""
@ -83,10 +83,10 @@ func convertURLRequestToCurlCommand(_ request: URLRequest) -> String {
return returnValue
}
func convertResponseToString(_ data: Data!, _ response: URLResponse!, _ error: NSError!, _ interval: TimeInterval) -> String {
func convertResponseToString(data: NSData!, _ response: NSURLResponse!, _ error: NSError!, _ interval: NSTimeInterval) -> String {
let ms = Int(interval * 1000)
if let response = response as? HTTPURLResponse {
if let response = response as? NSHTTPURLResponse {
if 200 ..< 300 ~= response.statusCode {
return "Success (\(ms)ms): Status \(response.statusCode)"
}
@ -105,7 +105,7 @@ func convertResponseToString(_ data: Data!, _ response: URLResponse!, _ error: N
return "<Unhandled response from server>"
}
extension Reactive where Base: URLSession {
extension NSURLSession {
/**
Observable sequence of responses for URL request.
@ -118,44 +118,44 @@ extension Reactive where Base: URLSession {
- parameter request: URL request.
- returns: Observable sequence of URL responses.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func response(_ request: URLRequest) -> Observable<(Data, HTTPURLResponse)> {
@warn_unused_result(message="http://git.io/rxs.uo")
public func rx_response(request: NSURLRequest) -> Observable<(NSData, NSHTTPURLResponse)> {
return Observable.create { observer in
// smart compiler should be able to optimize this out
var d: Date?
var d: NSDate?
if Logging.URLRequests(request) {
d = Date()
d = NSDate()
}
let task = self.base.dataTask(with: request) { (data, response, error) in
let task = self.dataTaskWithRequest(request) { (data, response, error) in
if Logging.URLRequests(request) {
let interval = Date().timeIntervalSince(d ?? Date())
let interval = NSDate().timeIntervalSinceDate(d ?? NSDate())
print(convertURLRequestToCurlCommand(request))
print(convertResponseToString(data, response, error as NSError!, interval))
print(convertResponseToString(data, response, error, interval))
}
guard let response = response, let data = data else {
observer.on(.error(error ?? RxCocoaURLError.unknown))
guard let response = response, data = data else {
observer.on(.Error(error ?? RxCocoaURLError.Unknown))
return
}
guard let httpResponse = response as? HTTPURLResponse else {
observer.on(.error(RxCocoaURLError.nonHTTPResponse(response: response)))
guard let httpResponse = response as? NSHTTPURLResponse else {
observer.on(.Error(RxCocoaURLError.NonHTTPResponse(response: response)))
return
}
observer.on(.next(data, httpResponse))
observer.on(.completed)
observer.on(.Next(data, httpResponse))
observer.on(.Completed)
}
let t = task
t.resume()
return Disposables.create(with: task.cancel)
return AnonymousDisposable(task.cancel)
}
}
@ -174,14 +174,14 @@ extension Reactive where Base: URLSession {
- parameter request: URL request.
- returns: Observable sequence of response data.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func data(_ request: URLRequest) -> Observable<Data> {
return response(request).map { (data, response) -> Data in
@warn_unused_result(message="http://git.io/rxs.uo")
public func rx_data(request: NSURLRequest) -> Observable<NSData> {
return rx_response(request).map { (data, response) -> NSData in
if 200 ..< 300 ~= response.statusCode {
return data
}
else {
throw RxCocoaURLError.httpRequestFailed(response: response, data: data)
throw RxCocoaURLError.HTTPRequestFailed(response: response, data: data)
}
}
}
@ -203,13 +203,13 @@ extension Reactive where Base: URLSession {
- parameter request: URL request.
- returns: Observable sequence of response JSON.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func JSON(_ request: URLRequest) -> Observable<AnyObject> {
return data(request).map { (data) -> AnyObject in
@warn_unused_result(message="http://git.io/rxs.uo")
public func rx_JSON(request: NSURLRequest) -> Observable<AnyObject> {
return rx_data(request).map { (data) -> AnyObject in
do {
return try JSONSerialization.jsonObject(with: data, options: []) as AnyObject
return try NSJSONSerialization.JSONObjectWithData(data, options: [])
} catch let error {
throw RxCocoaURLError.deserializationError(error: error)
throw RxCocoaURLError.DeserializationError(error: error)
}
}
}
@ -231,8 +231,8 @@ extension Reactive where Base: URLSession {
- parameter URL: URL of `NSURLRequest` request.
- returns: Observable sequence of response JSON.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func JSON(_ URL: Foundation.URL) -> Observable<AnyObject> {
return JSON(URLRequest(url: URL))
@warn_unused_result(message="http://git.io/rxs.uo")
public func rx_JSON(URL: NSURL) -> Observable<AnyObject> {
return rx_JSON(NSURLRequest(URL: URL))
}
}

View File

@ -15,12 +15,12 @@ class RxCLLocationManagerDelegateProxy : DelegateProxy
, CLLocationManagerDelegate
, DelegateProxyType {
class func currentDelegateFor(_ object: AnyObject) -> AnyObject? {
class func currentDelegateFor(object: AnyObject) -> AnyObject? {
let locationManager: CLLocationManager = castOrFatalError(object)
return locationManager.delegate
}
class func setCurrentDelegate(_ delegate: AnyObject?, toObject object: AnyObject) {
class func setCurrentDelegate(delegate: AnyObject?, toObject object: AnyObject) {
let locationManager: CLLocationManager = castOrFatalError(object)
locationManager.delegate = castOptionalOrFatalError(delegate)
}

View File

@ -7,52 +7,27 @@
//
/**
Use `Reactive` proxy as customization point for constrained protocol extensions.
We can use `Reactive` protocol as customization point for constrained protocol extensions.
General pattern would be:
General pattern would be:
// 1. Extend Reactive protocol with constrain on Self
// Read as: Reactive Extension where Self is a SomeType
extension Reactive where Self: SomeType {
// 2. Put any specific reactive extension for SomeType here
}
With this approach we can have more specialized methods and properties using
`Self` and not just specialized on common base type.
// 1. Conform SomeType to Reactive protocol
extension SomeType: Reactive {}
*/
public struct Reactive<Base> {
/**
Base object to extend.
*/
public let base: Base
/**
Creates extensions with base object.
- parameter base: Base object.
*/
public init(_ base: Base) {
self.base = base
// 2. Extend Reactive protocol with constrain on Self
// Read as: Reactive Extension where Self is a SomeType
extension Reactive where Self: SomeType {
// 3. Put any specific reactive extension for SomeType here
}
}
/**
A type that has reactive extensions.
*/
public protocol ReactiveCompatible {
associatedtype CompatibleType
var rx: Reactive<CompatibleType> { get }
}
public extension ReactiveCompatible {
public var rx: Reactive<Self> {
return Reactive(self)
}
}
With this approach we can have more specialized methods and properties using
`Self` and not just specialized on common base type.
/**
Extend NSObject with `rx` proxy.
See UIGestureRecognizer+Rx.swift as an example
*/
extension NSObject: ReactiveCompatible { }
public protocol Reactive {
}

View File

@ -18,36 +18,36 @@ import RxSwift
RxCocoa errors.
*/
public enum RxCocoaError
: Swift.Error
: ErrorType
, CustomDebugStringConvertible {
/**
Unknown error has occurred.
*/
case unknown
case Unknown
/**
Invalid operation was attempted.
*/
case invalidOperation(object: AnyObject)
case InvalidOperation(object: AnyObject)
/**
Items are not yet bound to user interface but have been requested.
*/
case itemsNotYetBound(object: AnyObject)
case ItemsNotYetBound(object: AnyObject)
/**
Invalid KVO Path.
*/
case invalidPropertyName(object: AnyObject, propertyName: String)
case InvalidPropertyName(object: AnyObject, propertyName: String)
/**
Invalid object on key path.
*/
case invalidObjectOnKeyPath(object: AnyObject, sourceObject: AnyObject, propertyName: String)
case InvalidObjectOnKeyPath(object: AnyObject, sourceObject: AnyObject, propertyName: String)
/**
Error during swizzling.
*/
case errorDuringSwizzling
case ErrorDuringSwizzling
/*
Casting error.
*/
case castingError(object: AnyObject, targetType: Any.Type)
case CastingError(object: AnyObject, targetType: Any.Type)
}
#if !DISABLE_SWIZZLING
@ -58,31 +58,31 @@ public enum RxCocoaInterceptionMechanism {
/**
Unknown message interception mechanism.
*/
case unknown
case Unknown
/**
Key value observing interception mechanism.
*/
case kvo
case KVO
}
/**
RxCocoa ObjC runtime modification errors.
*/
public enum RxCocoaObjCRuntimeError
: Swift.Error
: ErrorType
, CustomDebugStringConvertible {
/**
Unknown error has occurred.
*/
case unknown(target: AnyObject)
case Unknown(target: AnyObject)
/**
If the object is reporting a different class then it's real class, that means that there is probably
already some interception mechanism in place or something weird is happening.
The most common case when this would happen is when using a combination of KVO (`observe`) and `sentMessage`.
The most common case when this would happen is when using a combination of KVO (`rx_observe`) and `rx_sentMessage`.
This error is easily resolved by just using `sentMessage` observing before `observe`.
This error is easily resolved by just using `rx_sentMessage` observing before `rx_observe`.
The reason why the other way around could create issues is because KVO will unregister it's interceptor
class and restore original class. Unfortunately that will happen no matter was there another interceptor
@ -90,7 +90,7 @@ public enum RxCocoaObjCRuntimeError
Failure scenario:
* KVO sets class to be `__KVO__OriginalClass` (subclass of `OriginalClass`)
* `sentMessage` sets object class to be `_RX_namespace___KVO__OriginalClass` (subclass of `__KVO__OriginalClass`)
* `rx_sentMessage` sets object class to be `_RX_namespace___KVO__OriginalClass` (subclass of `__KVO__OriginalClass`)
* then unobserving with KVO will restore class to be `OriginalClass` -> failure point (possibly a bug in KVO)
The reason why changing order of observing works is because any interception method on unregistration
@ -101,12 +101,12 @@ public enum RxCocoaObjCRuntimeError
it's highly unlikely it would have any benefit in real world use cases, and it's even more
dangerous.
*/
case objectMessagesAlreadyBeingIntercepted(target: AnyObject, interceptionMechanism: RxCocoaInterceptionMechanism)
case ObjectMessagesAlreadyBeingIntercepted(target: AnyObject, interceptionMechanism: RxCocoaInterceptionMechanism)
/**
Trying to observe messages for selector that isn't implemented.
*/
case selectorNotImplemented(target: AnyObject)
case SelectorNotImplemented(target: AnyObject)
/**
Core Foundation classes are usually toll free bridged. Those classes crash the program in case
@ -115,7 +115,7 @@ public enum RxCocoaObjCRuntimeError
There is a possibility to just swizzle methods on original object, but since those won't be usual use
cases for this library, then an error will just be reported for now.
*/
case cantInterceptCoreFoundationTollFreeBridgedObjects(target: AnyObject)
case CantInterceptCoreFoundationTollFreeBridgedObjects(target: AnyObject)
/**
Two libraries have simultaneously tried to modify ObjC runtime and that was detected. This can only
@ -124,17 +124,17 @@ public enum RxCocoaObjCRuntimeError
To synchronize other libraries intercepting messages for an object, use `synchronized` on target object and
it's meta-class.
*/
case threadingCollisionWithOtherInterceptionMechanism(target: AnyObject)
case ThreadingCollisionWithOtherInterceptionMechanism(target: AnyObject)
/**
For some reason saving original method implementation under RX namespace failed.
*/
case savingOriginalForwardingMethodFailed(target: AnyObject)
case SavingOriginalForwardingMethodFailed(target: AnyObject)
/**
Intercepting a sent message by replacing a method implementation with `_objc_msgForward` failed for some reason.
*/
case replacingMethodWithForwardingImplementation(target: AnyObject)
case ReplacingMethodWithForwardingImplementation(target: AnyObject)
/**
Attempt to intercept one of the performance sensitive methods:
@ -143,7 +143,7 @@ public enum RxCocoaObjCRuntimeError
* methodSignatureForSelector:
* forwardingTargetForSelector:
*/
case observingPerformanceSensitiveMessages(target: AnyObject)
case ObservingPerformanceSensitiveMessages(target: AnyObject)
/**
Message implementation has unsupported return type (for example large struct). The reason why this is a error
@ -152,7 +152,7 @@ public enum RxCocoaObjCRuntimeError
The unsupported cases should be fairly uncommon.
*/
case observingMessagesWithUnsupportedReturnType(target: AnyObject)
case ObservingMessagesWithUnsupportedReturnType(target: AnyObject)
}
#endif
@ -165,19 +165,19 @@ public extension RxCocoaError {
*/
public var debugDescription: String {
switch self {
case .unknown:
case .Unknown:
return "Unknown error occurred."
case let .invalidOperation(object):
case let .InvalidOperation(object):
return "Invalid operation was attempted on `\(object)`."
case let .itemsNotYetBound(object):
case let .ItemsNotYetBound(object):
return "Data source is set, but items are not yet bound to user interface for `\(object)`."
case let .invalidPropertyName(object, propertyName):
case let .InvalidPropertyName(object, propertyName):
return "Object `\(object)` dosn't have a property named `\(propertyName)`."
case let .invalidObjectOnKeyPath(object, sourceObject, propertyName):
case let .InvalidObjectOnKeyPath(object, sourceObject, propertyName):
return "Unobservable object `\(object)` was observed as `\(propertyName)` of `\(sourceObject)`."
case .errorDuringSwizzling:
case .ErrorDuringSwizzling:
return "Error during swizzling."
case .castingError(let object, let targetType):
case .CastingError(let object, let targetType):
return "Error casting `\(object)` to `\(targetType)`"
}
}
@ -191,25 +191,25 @@ public extension RxCocoaObjCRuntimeError {
*/
public var debugDescription: String {
switch self {
case let .unknown(target):
case let .Unknown(target):
return "Unknown error occurred.\nTarget: `\(target)`"
case let .objectMessagesAlreadyBeingIntercepted(target, interceptionMechanism):
let interceptionMechanismDescription = interceptionMechanism == .kvo ? "KVO" : "other interception mechanism"
case let ObjectMessagesAlreadyBeingIntercepted(target, interceptionMechanism):
let interceptionMechanismDescription = interceptionMechanism == .KVO ? "KVO" : "other interception mechanism"
return "Collision between RxCocoa interception mechanism and \(interceptionMechanismDescription)."
+ " To resolve this conflict please use this interception mechanism first.\nTarget: \(target)"
case let .selectorNotImplemented(target):
case let SelectorNotImplemented(target):
return "Trying to observe messages for selector that isn't implemented.\nTarget: \(target)"
case let .cantInterceptCoreFoundationTollFreeBridgedObjects(target):
case let CantInterceptCoreFoundationTollFreeBridgedObjects(target):
return "Interception of messages sent to Core Foundation isn't supported.\nTarget: \(target)"
case let .threadingCollisionWithOtherInterceptionMechanism(target):
case let ThreadingCollisionWithOtherInterceptionMechanism(target):
return "Detected a conflict while modifying ObjC runtime.\nTarget: \(target)"
case let .savingOriginalForwardingMethodFailed(target):
case let SavingOriginalForwardingMethodFailed(target):
return "Saving original method implementation failed.\nTarget: \(target)"
case let .replacingMethodWithForwardingImplementation(target):
case let ReplacingMethodWithForwardingImplementation(target):
return "Intercepting a sent message by replacing a method implementation with `_objc_msgForward` failed for some reason.\nTarget: \(target)"
case let .observingPerformanceSensitiveMessages(target):
case let ObservingPerformanceSensitiveMessages(target):
return "Attempt to intercept one of the performance sensitive methods. \nTarget: \(target)"
case let .observingMessagesWithUnsupportedReturnType(target):
case let ObservingMessagesWithUnsupportedReturnType(target):
return "Attempt to intercept a method with unsupported return type. \nTarget: \(target)"
}
}
@ -219,7 +219,7 @@ public extension RxCocoaObjCRuntimeError {
// MARK: Error binding policies
func bindingErrorToInterface(_ error: Swift.Error) {
func bindingErrorToInterface(error: ErrorType) {
let error = "Binding error to UI: \(error)"
#if DEBUG
rxFatalError(error)
@ -230,18 +230,18 @@ func bindingErrorToInterface(_ error: Swift.Error) {
// MARK: Abstract methods
func rxAbstractMethodWithMessage(_ message: String) -> Swift.Never {
@noreturn func rxAbstractMethodWithMessage(message: String) {
rxFatalError(message)
}
func rxAbstractMethod() -> Swift.Never {
@noreturn func rxAbstractMethod() {
rxFatalError("Abstract method")
}
// MARK: casts or fatal error
// workaround for Swift compiler bug, cheers compiler team :)
func castOptionalOrFatalError<T>(_ value: AnyObject?) -> T? {
func castOptionalOrFatalError<T>(value: AnyObject?) -> T? {
if value == nil {
return nil
}
@ -249,27 +249,27 @@ func castOptionalOrFatalError<T>(_ value: AnyObject?) -> T? {
return v
}
func castOrThrow<T>(_ resultType: T.Type, _ object: AnyObject) throws -> T {
func castOrThrow<T>(resultType: T.Type, _ object: AnyObject) throws -> T {
guard let returnValue = object as? T else {
throw RxCocoaError.castingError(object: object, targetType: resultType)
throw RxCocoaError.CastingError(object: object, targetType: resultType)
}
return returnValue
}
func castOptionalOrThrow<T>(_ resultType: T.Type, _ object: AnyObject) throws -> T? {
func castOptionalOrThrow<T>(resultType: T.Type, _ object: AnyObject) throws -> T? {
if NSNull().isEqual(object) {
return nil
}
guard let returnValue = object as? T else {
throw RxCocoaError.castingError(object: object, targetType: resultType)
throw RxCocoaError.CastingError(object: object, targetType: resultType)
}
return returnValue
}
func castOrFatalError<T>(_ value: AnyObject!, message: String) -> T {
func castOrFatalError<T>(value: AnyObject!, message: String) -> T {
let maybeResult: T? = value as? T
guard let result = maybeResult else {
rxFatalError(message)
@ -278,7 +278,7 @@ func castOrFatalError<T>(_ value: AnyObject!, message: String) -> T {
return result
}
func castOrFatalError<T>(_ value: Any!) -> T {
func castOrFatalError<T>(value: Any!) -> T {
let maybeResult: T? = value as? T
guard let result = maybeResult else {
rxFatalError("Failure converting from \(value) to \(T.self)")
@ -296,37 +296,35 @@ let delegateNotSet = "Delegate not set"
// MARK: Conversions `NSError` > `RxCocoaObjCRuntimeError`
extension Error {
func rxCocoaErrorForTarget(_ target: AnyObject) -> RxCocoaObjCRuntimeError {
let error = self as NSError
if error.domain == RXObjCRuntimeErrorDomain {
let errorCode = RXObjCRuntimeError(rawValue: error.code) ?? .unknown
extension NSError {
func rxCocoaErrorForTarget(target: AnyObject) -> RxCocoaObjCRuntimeError {
if domain == RXObjCRuntimeErrorDomain {
let errorCode = RXObjCRuntimeError(rawValue: self.code) ?? .Unknown
switch errorCode {
case .unknown:
return .unknown(target: target)
case .objectMessagesAlreadyBeingIntercepted:
let isKVO = (error.userInfo[RXObjCRuntimeErrorIsKVOKey] as? NSNumber)?.boolValue ?? false
return .objectMessagesAlreadyBeingIntercepted(target: target, interceptionMechanism: isKVO ? .kvo : .unknown)
case .selectorNotImplemented:
return .selectorNotImplemented(target: target)
case .cantInterceptCoreFoundationTollFreeBridgedObjects:
return .cantInterceptCoreFoundationTollFreeBridgedObjects(target: target)
case .threadingCollisionWithOtherInterceptionMechanism:
return .threadingCollisionWithOtherInterceptionMechanism(target: target)
case .savingOriginalForwardingMethodFailed:
return .savingOriginalForwardingMethodFailed(target: target)
case .replacingMethodWithForwardingImplementation:
return .replacingMethodWithForwardingImplementation(target: target)
case .observingPerformanceSensitiveMessages:
return .observingPerformanceSensitiveMessages(target: target)
case .observingMessagesWithUnsupportedReturnType:
return .observingMessagesWithUnsupportedReturnType(target: target)
case .Unknown:
return .Unknown(target: target)
case .ObjectMessagesAlreadyBeingIntercepted:
let isKVO = (self.userInfo[RXObjCRuntimeErrorIsKVOKey] as? NSNumber)?.boolValue ?? false
return .ObjectMessagesAlreadyBeingIntercepted(target: target, interceptionMechanism: isKVO ? .KVO : .Unknown)
case .SelectorNotImplemented:
return .SelectorNotImplemented(target: target)
case .CantInterceptCoreFoundationTollFreeBridgedObjects:
return .CantInterceptCoreFoundationTollFreeBridgedObjects(target: target)
case .ThreadingCollisionWithOtherInterceptionMechanism:
return .ThreadingCollisionWithOtherInterceptionMechanism(target: target)
case .SavingOriginalForwardingMethodFailed:
return .SavingOriginalForwardingMethodFailed(target: target)
case .ReplacingMethodWithForwardingImplementation:
return .ReplacingMethodWithForwardingImplementation(target: target)
case .ObservingPerformanceSensitiveMessages:
return .ObservingPerformanceSensitiveMessages(target: target)
case .ObservingMessagesWithUnsupportedReturnType:
return .ObservingMessagesWithUnsupportedReturnType(target: target)
}
}
return RxCocoaObjCRuntimeError.unknown(target: target)
return RxCocoaObjCRuntimeError.Unknown(target: target)
}
}
@ -337,7 +335,7 @@ extension Error {
#if !RX_NO_MODULE
func rxFatalError(_ lastMessage: String) -> Never {
@noreturn func rxFatalError(lastMessage: String) {
// The temptation to comment this line is great, but please don't, it's for your own good. The choice is yours.
fatalError(lastMessage)
}

View File

@ -41,4 +41,4 @@ class RxTarget : NSObject
OSAtomicDecrement32(&resourceCount)
}
#endif
}
}

View File

@ -0,0 +1,39 @@
//
// RxTextInput.swift
// Rx
//
// Created by Krunoslav Zaher on 5/12/16.
// Copyright © 2016 Krunoslav Zaher. All rights reserved.
//
import Foundation
#if os(iOS) || os(tvOS)
import UIKit
/**
Represents text input with reactive extensions.
*/
public protocol RxTextInput : UITextInput {
/**
Reactive wrapper for `text` property.
*/
var rx_text: ControlProperty<String> { get }
}
#endif
#if os(OSX)
import Cocoa
/**
Represents text input with reactive extensions.
*/
public protocol RxTextInput : NSTextInput {
/**
Reactive wrapper for `text` property.
*/
var rx_text: ControlProperty<String> { get }
}
#endif

View File

@ -20,20 +20,5 @@ public protocol SectionedViewDataSourceType {
- parameter indexPath: Model index path
- returns: Model at index path.
*/
func model(_ indexPath: IndexPath) throws -> Any
}
extension SectionedViewDataSourceType {
/**
Returns model at index path.
In case data source doesn't contain any sections when this method is being called, `RxCocoaError.ItemsNotYetBound(object: self)` is thrown.
- parameter indexPath: Model index path
- returns: Model at index path.
*/
@available(*, deprecated, renamed: "model(_:)")
func model(_ indexPath: IndexPath) throws -> Any {
return try self.model(indexPath)
}
}
func modelAtIndexPath(indexPath: NSIndexPath) throws -> Any
}

View File

@ -1,147 +0,0 @@
//
// TextInput.swift
// Rx
//
// Created by Krunoslav Zaher on 5/12/16.
// Copyright © 2016 Krunoslav Zaher. All rights reserved.
//
import Foundation
#if os(iOS) || os(tvOS)
import UIKit
/**
Represents text input with reactive extensions.
*/
public struct TextInput<Base: UITextInput> {
/**
Base text input to extend.
*/
public let base: Base
/**
Reactive wrapper for `text` property.
*/
public let text: ControlProperty<String>
/**
Initializes new text input.
- parameter base: Base object.
- parameter text: Textual control property.
*/
public init(base: Base, text: ControlProperty<String>) {
self.base = base
self.text = text
}
}
extension Reactive where Base: UITextField {
/**
Reactive text input.
*/
public var textInput: TextInput<UITextField> {
return TextInput(base: base, text: self.text)
}
}
extension Reactive where Base: UITextView {
/**
Reactive text input.
*/
public var textInput: TextInput<UITextView> {
return TextInput(base: base, text: self.text)
}
}
/**
Represents text input with reactive extensions.
*/
@available(*, deprecated, renamed: "TextInput")
public protocol RxTextInput : UITextInput {
@available(*, deprecated, renamed: "rx.textInput.text")
var rx_text: ControlProperty<String> { get }
}
extension UITextField : RxTextInput {
@available(*, deprecated, renamed: "rx.textInput.text")
public var rx_text: ControlProperty<String> {
return self.rx.text
}
}
extension UITextView : RxTextInput {
@available(*, deprecated, renamed: "rx.textInput.text")
public var rx_text: ControlProperty<String> {
return self.rx.text
}
}
#endif
#if os(OSX)
import Cocoa
/**
Represents text input with reactive extensions.
*/
public struct TextInput<Base: NSTextInput> {
/**
Base text input to extend.
*/
public let base: Base
/**
Reactive wrapper for `text` property.
*/
public let text: ControlProperty<String>
/**
Initializes new text input.
- parameter base: Base object.
- parameter text: Textual control property.
*/
public init(base: Base, text: ControlProperty<String>) {
self.base = base
self.text = text
}
}
extension Reactive where Base: NSTextField {
/**
Reactive text input.
*/
public var textInput: TextInput<NSTextField> {
return TextInput(base: base, text: self.text)
}
}
/**
Represents text input with reactive extensions.
*/
@available(*, deprecated, renamed: "TextInput")
public protocol RxTextInput : NSTextInput {
/**
Reactive wrapper for `text` property.
*/
@available(*, deprecated, renamed: "rx.textInput.text")
var rx_text: ControlProperty<String> { get }
}
extension NSTextField : RxTextInput {
/**
Reactive wrapper for `text` property.
*/
@available(*, deprecated, renamed: "rx.textInput.text")
public var rx_text: ControlProperty<String> {
return self.rx.text
}
}
#endif

View File

@ -32,12 +32,6 @@
#define CLASS_VALUE(x) [NSValue valueWithNonretainedObject:(x)]
#define IMP_VALUE(x) [NSValue valueWithPointer:(x)]
/**
Checks that the local `error` instance exists before assigning it's value by reference.
This macro exists to work around static analysis warnings `NSError` is always assumed to be `nullable`, even though we explictly define the method parameter as `nonnull`. See http://www.openradar.me/21766176 for more details.
*/
#define RX_SAFE_ERROR(errorValue) if (error != nil) { *error = (errorValue); }
// Inspired by http://p99.gforge.inria.fr
// https://gcc.gnu.org/onlinedocs/gcc-2.95.3/cpp_1.html#SEC26

View File

@ -8,18 +8,14 @@
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface _RXDelegateProxy : NSObject
@property (nonatomic, weak, readonly) id _forwardToDelegate;
@property (nonatomic, assign, readonly) id _forwardToDelegate;
-(void)_setForwardToDelegate:(id __nullable)forwardToDelegate retainDelegate:(BOOL)retainDelegate;
-(void)_setForwardToDelegate:(id)forwardToDelegate retainDelegate:(BOOL)retainDelegate;
-(BOOL)hasWiredImplementationForSelector:(SEL)selector;
-(void)interceptedSelector:(SEL)selector withArguments:(NSArray*)arguments;
@end
NS_ASSUME_NONNULL_END

View File

@ -10,9 +10,7 @@
#import "_RX.h"
#import "_RXObjCRuntime.h"
@interface _RXDelegateProxy () {
id __weak __forwardToDelegate;
}
@interface _RXDelegateProxy ()
@property (nonatomic, strong) id strongForwardDelegate;
@ -60,7 +58,7 @@ static NSMutableDictionary *forwardableSelectorsPerClass = nil;
#define CLASS_HIERARCHY_MAX_DEPTH 100
NSInteger classHierarchyDepth = 0;
Class targetClass = NULL;
Class targetClass = self;
for (classHierarchyDepth = 0, targetClass = self;
classHierarchyDepth < CLASS_HIERARCHY_MAX_DEPTH && targetClass != nil;
@ -92,11 +90,7 @@ static NSMutableDictionary *forwardableSelectorsPerClass = nil;
}
-(id)_forwardToDelegate {
return __forwardToDelegate;
}
-(void)_setForwardToDelegate:(id __nullable)forwardToDelegate retainDelegate:(BOOL)retainDelegate {
-(void)_setForwardToDelegate:(id)forwardToDelegate retainDelegate:(BOOL)retainDelegate {
__forwardToDelegate = forwardToDelegate;
if (retainDelegate) {
self.strongForwardDelegate = forwardToDelegate;

View File

@ -14,6 +14,8 @@
################################################################################
*/
typedef void (^KVOCallback)(id);
// Exists because if written in Swift, reading unowned is disabled during dealloc process
@interface _RXKVOObserver : NSObject
@ -21,7 +23,7 @@
retainTarget:(BOOL)retainTarget
keyPath:(NSString*)keyPath
options:(NSKeyValueObservingOptions)options
callback:(void (^)(id))callback;
callback:(KVOCallback)callback;
-(void)dispose;

View File

@ -13,7 +13,7 @@
@property (nonatomic, unsafe_unretained) id target;
@property (nonatomic, strong ) id retainedTarget;
@property (nonatomic, copy ) NSString *keyPath;
@property (nonatomic, copy ) void (^callback)(id);
@property (nonatomic, copy ) KVOCallback callback;
@end

View File

@ -596,9 +596,9 @@ static NSMutableDictionary<NSString *, RXInterceptWithOptimizedObserver> *optimi
-(IMP __nullable)ensurePrepared:(id __nonnull)target forObserving:(SEL __nonnull)selector error:(NSError** __nonnull)error {
Method instanceMethod = class_getInstanceMethod([target class], selector);
if (instanceMethod == nil) {
RX_SAFE_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorSelectorNotImplemented
userInfo:nil]);
*error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorSelectorNotImplemented
userInfo:nil];
return nil;
}
@ -606,18 +606,18 @@ static NSMutableDictionary<NSString *, RXInterceptWithOptimizedObserver> *optimi
|| selector == @selector(forwardingTargetForSelector:)
|| selector == @selector(methodSignatureForSelector:)
|| selector == @selector(respondsToSelector:)) {
RX_SAFE_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorObservingPerformanceSensitiveMessages
userInfo:nil]);
*error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorObservingPerformanceSensitiveMessages
userInfo:nil];
return nil;
}
// For `dealloc` message, original implementation will be swizzled.
// This is a special case because observing `dealloc` message is performed when `observeWeakly` is used.
// This is a special case because observing `dealloc` message is performed when `rx_observeWeakly` is used.
//
// Some toll free bridged classes don't handle `object_setClass` well and cause crashes.
//
// To make `deallocating` as robust as possible, original implementation will be replaced.
// To make `rx_deallocating` as robust as possible, original implementation will be replaced.
if (selector == deallocSelector) {
Class __nonnull deallocSwizzingTarget = [target class];
IMP interceptorIMPForSelector = [self interceptorImplementationForSelector:selector forClass:deallocSwizzingTarget];
@ -644,9 +644,9 @@ static NSMutableDictionary<NSString *, RXInterceptWithOptimizedObserver> *optimi
RXInterceptWithOptimizedObserver optimizedIntercept = optimizedObserversByMethodEncoding[methodEncoding];
if (!RX_method_has_supported_return_type(instanceMethod)) {
RX_SAFE_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorObservingMessagesWithUnsupportedReturnType
userInfo:nil]);
*error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorObservingMessagesWithUnsupportedReturnType
userInfo:nil];
return nil;
}
@ -686,9 +686,10 @@ static NSMutableDictionary<NSString *, RXInterceptWithOptimizedObserver> *optimi
}
}
RX_SAFE_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorUnknown
userInfo:nil]);
*error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorUnknown
userInfo:nil];
return nil;
}
@ -710,9 +711,9 @@ static NSMutableDictionary<NSString *, RXInterceptWithOptimizedObserver> *optimi
BOOL isThisTollFreeFoundationClass = CFGetTypeID((CFTypeRef)target) != defaultTypeID;
if (isThisTollFreeFoundationClass) {
RX_SAFE_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorCantInterceptCoreFoundationTollFreeBridgedObjects
userInfo:nil]);
*error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorCantInterceptCoreFoundationTollFreeBridgedObjects
userInfo:nil];
return nil;
}
@ -720,9 +721,9 @@ static NSMutableDictionary<NSString *, RXInterceptWithOptimizedObserver> *optimi
If the object is reporting a different class then what it's real class, that means that there is probably
already some interception mechanism in place or something weird is happening.
Most common case when this would happen is when using KVO (`observe`) and `sentMessage`.
Most common case when this would happen is when using KVO (`rx_observe`) and `rx_sentMessage`.
This error is easily resolved by just using `sentMessage` observing before `observe`.
This error is easily resolved by just using `rx_sentMessage` observing before `rx_observe`.
The reason why other way around could create issues is because KVO will unregister it's interceptor
class and restore original class. Unfortunately that will happen no matter was there another interceptor
@ -730,7 +731,7 @@ static NSMutableDictionary<NSString *, RXInterceptWithOptimizedObserver> *optimi
Failure scenario:
* KVO sets class to be `__KVO__OriginalClass` (subclass of `OriginalClass`)
* `sentMessage` sets object class to be `_RX_namespace___KVO__OriginalClass` (subclass of `__KVO__OriginalClass`)
* `rx_sentMessage` sets object class to be `_RX_namespace___KVO__OriginalClass` (subclass of `__KVO__OriginalClass`)
* then unobserving with KVO will restore class to be `OriginalClass` -> failure point
The reason why changing order of observing works is because any interception method should return
@ -744,11 +745,11 @@ static NSMutableDictionary<NSString *, RXInterceptWithOptimizedObserver> *optimi
if ([target class] != object_getClass(target)) {
BOOL isKVO = [target respondsToSelector:NSSelectorFromString(@"_isKVOA")];
RX_SAFE_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorObjectMessagesAlreadyBeingIntercepted
userInfo:@{
RXObjCRuntimeErrorIsKVOKey : @(isKVO)
}]);
*error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorObjectMessagesAlreadyBeingIntercepted
userInfo:@{
RXObjCRuntimeErrorIsKVOKey: @(isKVO)
}];
return nil;
}
@ -760,9 +761,9 @@ static NSMutableDictionary<NSString *, RXInterceptWithOptimizedObserver> *optimi
Class previousClass = object_setClass(target, dynamicFakeSubclass);
if (previousClass != wannaBeClass) {
RX_SAFE_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorThreadingCollisionWithOtherInterceptionMechanism
userInfo:nil]);
*error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorThreadingCollisionWithOtherInterceptionMechanism
userInfo:nil];
THREADING_HAZARD(wannaBeClass);
return nil;
}
@ -815,25 +816,25 @@ static NSMutableDictionary<NSString *, RXInterceptWithOptimizedObserver> *optimi
IMP implementation = method_getImplementation(instanceMethod);
if (implementation == nil) {
RX_SAFE_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorSelectorNotImplemented
userInfo:nil]);
*error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorSelectorNotImplemented
userInfo:nil];
return NO;
}
if (!class_addMethod(swizzlingImplementorClass, rxSelector, implementation, methodEncoding)) {
RX_SAFE_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorSavingOriginalForwardingMethodFailed
userInfo:nil]);
*error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorSavingOriginalForwardingMethodFailed
userInfo:nil];
return NO;
}
if (!class_addMethod(swizzlingImplementorClass, selector, _objc_msgForward, methodEncoding)) {
if (implementation != method_setImplementation(instanceMethod, _objc_msgForward)) {
RX_SAFE_ERROR([NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorReplacingMethodWithForwardingImplementation
userInfo:nil]);
*error = [NSError errorWithDomain:RXObjCRuntimeErrorDomain
code:RXObjCRuntimeErrorReplacingMethodWithForwardingImplementation
userInfo:nil];
THREADING_HAZARD(swizzlingImplementorClass);
return NO;
}
@ -1017,4 +1018,4 @@ NSInteger RX_number_of_swizzled_methods() {
#endif
#endif
#endif

Binary file not shown.

View File

@ -12,21 +12,21 @@ import RxSwift
#endif
import Cocoa
extension Reactive where Base: NSButton {
extension NSButton {
/**
Reactive wrapper for control event.
*/
public var tap: ControlEvent<Void> {
return controlEvent
public var rx_tap: ControlEvent<Void> {
return rx_controlEvent
}
/**
Reactive wrapper for `state` property`.
*/
public var state: ControlProperty<Int> {
return Reactive<NSButton>.value(
base,
public var rx_state: ControlProperty<Int> {
return NSButton.rx_value(
self,
getter: { control in
return control.state
}, setter: { control, state in
@ -34,4 +34,4 @@ extension Reactive where Base: NSButton {
}
)
}
}
}

View File

@ -15,29 +15,29 @@ import RxSwift
var rx_value_key: UInt8 = 0
var rx_control_events_key: UInt8 = 0
extension Reactive where Base: NSControl {
extension NSControl {
/**
Reactive wrapper for control event.
*/
public var controlEvent: ControlEvent<Void> {
public var rx_controlEvent: ControlEvent<Void> {
MainScheduler.ensureExecutingOnScheduler()
let source = lazyInstanceObservable(&rx_control_events_key) { () -> Observable<Void> in
Observable.create { [weak control = self.base] observer in
let source = rx_lazyInstanceObservable(&rx_control_events_key) { () -> Observable<Void> in
Observable.create { [weak self] observer in
MainScheduler.ensureExecutingOnScheduler()
guard let control = control else {
observer.on(.completed)
return Disposables.create()
guard let control = self else {
observer.on(.Completed)
return NopDisposable.instance
}
let observer = ControlTarget(control: control) { control in
observer.on(.next())
observer.on(.Next())
}
return observer
}.takeUntil(self.deallocated)
}.takeUntil(self.rx_deallocated)
}
return ControlEvent(events: source)
@ -47,28 +47,28 @@ extension Reactive where Base: NSControl {
You might be wondering why the ugly `as!` casts etc, well, for some reason if
Swift compiler knows C is UIControl type and optimizations are turned on, it will crash.
*/
static func value<C: AnyObject, T: Equatable>(_ control: C, getter: @escaping (C) -> T, setter: @escaping (C, T) -> Void) -> ControlProperty<T> {
static func rx_value<C: AnyObject, T: Equatable>(control: C, getter: (C) -> T, setter: (C, T) -> Void) -> ControlProperty<T> {
MainScheduler.ensureExecutingOnScheduler()
let source = (control as! NSObject).rx.lazyInstanceObservable(&rx_value_key) { () -> Observable<T> in
let source = (control as! NSObject).rx_lazyInstanceObservable(&rx_value_key) { () -> Observable<T> in
return Observable.create { [weak weakControl = control] (observer: AnyObserver<T>) in
guard let control = weakControl else {
observer.on(.completed)
return Disposables.create()
observer.on(.Completed)
return NopDisposable.instance
}
observer.on(.next(getter(control)))
observer.on(.Next(getter(control)))
let observer = ControlTarget(control: control as! NSControl) { _ in
if let control = weakControl {
observer.on(.next(getter(control)))
observer.on(.Next(getter(control)))
}
}
return observer
}
.distinctUntilChanged()
.takeUntil((control as! NSObject).rx.deallocated)
.takeUntil((control as! NSObject).rx_deallocated)
}
let bindingObserver = UIBindingObserver(UIElement: control, binding: setter)
@ -79,9 +79,9 @@ extension Reactive where Base: NSControl {
/**
Bindable sink for `enabled` property.
*/
public var enabled: AnyObserver<Bool> {
return UIBindingObserver(UIElement: self.base) { (owner, value) in
owner.isEnabled = value
public var rx_enabled: AnyObserver<Bool> {
return UIBindingObserver(UIElement: self) { (owner, value) in
owner.enabled = value
}.asObserver()
}
}
}

View File

@ -12,13 +12,13 @@ import RxSwift
#endif
import Cocoa
extension Reactive where Base: NSImageView {
extension NSImageView {
/**
Bindable sink for `image` property.
*/
public var image: AnyObserver<NSImage?> {
return image(transitionType: nil)
public var rx_image: AnyObserver<NSImage?> {
return self.rx_imageAnimated(nil)
}
/**
@ -26,39 +26,15 @@ extension Reactive where Base: NSImageView {
- parameter transitionType: Optional transition type while setting the image (kCATransitionFade, kCATransitionMoveIn, ...)
*/
@available(*, deprecated, renamed: "image(transitionType:)")
public func imageAnimated(_ transitionType: String?) -> AnyObserver<NSImage?> {
return UIBindingObserver(UIElement: self.base) { control, value in
public func rx_imageAnimated(transitionType: String?) -> AnyObserver<NSImage?> {
return UIBindingObserver(UIElement: self) { control, value in
if let transitionType = transitionType {
if value != nil {
let transition = CATransition()
transition.duration = 0.25
transition.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
transition.type = transitionType
control.layer?.add(transition, forKey: kCATransition)
}
}
else {
control.layer?.removeAllAnimations()
}
control.image = value
}.asObserver()
}
/**
Bindable sink for `image` property.
- parameter transitionType: Optional transition type while setting the image (kCATransitionFade, kCATransitionMoveIn, ...)
*/
public func image(transitionType: String? = nil) -> AnyObserver<NSImage?> {
return UIBindingObserver(UIElement: self.base) { control, value in
if let transitionType = transitionType {
if value != nil {
let transition = CATransition()
transition.duration = 0.25
transition.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
transition.type = transitionType
control.layer?.add(transition, forKey: kCATransition)
control.layer?.addAnimation(transition, forKey: kCATransition)
}
}
else {
@ -67,4 +43,5 @@ extension Reactive where Base: NSImageView {
control.image = value
}.asObserver()
}
}

View File

@ -0,0 +1,27 @@
//
// NSProgressIndicator+Rx.swift
// Rx
//
// Created by Junior B. on 21/06/16.
// Copyright © 2016 Krunoslav Zaher. All rights reserved.
//
import Foundation
import Cocoa
#if !RX_NO_MODULE
import RxSwift
#endif
extension NSProgressIndicator {
/**
Bindable sink for `progress` property
*/
public var rx_progress: AnyObserver<Double> {
return UIBindingObserver(UIElement: self) { progressView, progress in
progressView.doubleValue = progress
}.asObserver()
}
}

Some files were not shown because too many files have changed in this diff Show More