From 2b0e7726676e4fd47489b58b1d809491903c3b8b Mon Sep 17 00:00:00 2001 From: Ruud Puts Date: Sat, 24 Nov 2018 20:27:07 +0100 Subject: [PATCH] Support for Swift 4 --- Example/Podfile.lock | 29 +- .../Pods/Local Podspecs/RxResult.podspec.json | 8 +- .../Pods/Local Podspecs/RxSwift.podspec.json | 23 - Example/Pods/Manifest.lock | 29 +- Example/Pods/Pods.xcodeproj/project.pbxproj | 2272 ++++++++++------- Example/Pods/Result/README.md | 55 +- Example/Pods/Result/Result/AnyError.swift | 46 + Example/Pods/Result/Result/NoError.swift | 10 + Example/Pods/Result/Result/Result.swift | 148 +- .../Pods/Result/Result/ResultProtocol.swift | 174 +- Example/Pods/RxAtomic/LICENSE.md | 9 + Example/Pods/RxAtomic/README.md | 217 ++ Example/Pods/RxAtomic/RxAtomic/RxAtomic.c | 7 + .../Pods/RxAtomic/RxAtomic/include/RxAtomic.h | 48 + Example/Pods/RxSwift/Platform/AtomicInt.swift | 33 + .../RxSwift/Platform/DataStructures/Bag.swift | 183 ++ .../DataStructures/InfiniteSequence.swift | 8 +- .../DataStructures/PriorityQueue.swift | 51 +- .../DataStructures/Queue.swift | 62 +- .../RxSwift/Platform/DeprecationWarner.swift | 43 + .../Platform/DispatchQueue+Extensions.swift | 21 + .../Platform/Platform.Darwin.swift | 30 +- .../RxSwift/Platform/Platform.Linux.swift | 37 + .../Pods/RxSwift/Platform/RecursiveLock.swift | 34 + Example/Pods/RxSwift/README.md | 112 +- .../Pods/RxSwift/RxSwift/AnyObserver.swift | 77 +- Example/Pods/RxSwift/RxSwift/Cancelable.swift | 21 +- .../RxSwift/Concurrency/AsyncLock.swift | 8 +- .../RxSwift/RxSwift/Concurrency/Lock.swift | 91 +- .../RxSwift/Concurrency/LockOwnerType.swift | 6 +- .../Concurrency/SynchronizedDisposeType.swift | 6 +- .../Concurrency/SynchronizedOnType.swift | 4 +- .../SynchronizedSubscribeType.swift | 20 - .../SynchronizedUnsubscribeType.swift | 4 +- .../RxSwift/ConnectableObservableType.swift | 6 +- .../RxSwift/RxSwift/DataStructures/Bag.swift | 336 --- Example/Pods/RxSwift/RxSwift/Deprecated.swift | 228 ++ Example/Pods/RxSwift/RxSwift/Disposable.swift | 8 +- .../Disposables/AnonymousDisposable.swift | 59 +- .../Disposables/BinaryDisposable.swift | 42 +- .../Disposables/BooleanDisposable.swift | 26 +- .../Disposables/CompositeDisposable.swift | 104 +- .../RxSwift/Disposables/Disposables.swift | 54 +- .../RxSwift/Disposables/DisposeBag.swift | 76 +- .../RxSwift/Disposables/DisposeBase.swift | 12 +- .../RxSwift/Disposables/NopDisposable.swift | 35 +- .../Disposables/RefCountDisposable.swift | 24 +- .../Disposables/ScheduledDisposable.swift | 20 +- .../Disposables/SerialDisposable.swift | 22 +- .../SingleAssignmentDisposable.swift | 50 +- .../StableCompositeDisposable.swift | 16 - .../Disposables/SubscriptionDisposable.swift | 4 +- Example/Pods/RxSwift/RxSwift/Errors.swift | 46 +- Example/Pods/RxSwift/RxSwift/Event.swift | 66 +- .../RxSwift/RxSwift/Extensions/Bag+Rx.swift | 50 + .../RxSwift/Extensions/String+Rx.swift | 8 +- .../RxSwift/RxSwift/GroupedObservable.swift | 37 + .../RxSwift/ImmediateSchedulerType.swift | 8 +- Example/Pods/RxSwift/RxSwift/Observable.swift | 30 +- .../RxSwift/ObservableConvertibleType.swift | 22 +- .../RxSwift/ObservableType+Extensions.swift | 250 +- .../Pods/RxSwift/RxSwift/ObservableType.swift | 19 +- .../{Implementations => }/AddRef.swift | 10 +- .../{Implementations => }/Amb.swift | 61 +- .../RxSwift/RxSwift/Observables/AsMaybe.swift | 49 + .../RxSwift/Observables/AsSingle.swift | 52 + .../{Implementations => }/Buffer.swift | 28 +- .../{Implementations => }/Catch.swift | 85 +- ...e.swift => CombineLatest+Collection.swift} | 44 +- .../CombineLatest+arity.swift | 177 +- .../{Implementations => }/CombineLatest.swift | 14 +- .../RxSwift/RxSwift/Observables/Concat.swift | 131 + ...AnonymousObservable.swift => Create.swift} | 38 +- .../Debunce.swift => Debounce.swift} | 27 +- .../{Implementations => }/Debug.swift | 44 +- .../RxSwift/Observables/DefaultIfEmpty.swift | 66 + .../{Implementations => }/Deferred.swift | 19 +- .../{Implementations => }/Delay.swift | 47 +- .../DelaySubscription.swift | 26 +- .../RxSwift/Observables/Dematerialize.swift | 51 + .../Observables/DistinctUntilChanged.swift | 125 + .../Pods/RxSwift/RxSwift/Observables/Do.swift | 93 + .../{Implementations => }/ElementAt.swift | 24 +- .../RxSwift/RxSwift/Observables/Empty.swift | 27 + .../RxSwift/Observables/Enumerated.swift | 62 + .../RxSwift/RxSwift/Observables/Error.swift | 33 + .../{Implementations => }/Filter.swift | 40 +- .../RxSwift/RxSwift/Observables/First.swift | 42 + .../{Implementations => }/Generate.swift | 24 +- .../RxSwift/RxSwift/Observables/GroupBy.swift | 134 + .../Observables/Implementations/Concat.swift | 63 - .../ConnectableObservable.swift | 96 - .../DistinctUntilChanged.swift | 70 - .../Observables/Implementations/Do.swift | 63 - .../Observables/Implementations/Empty.swift | 16 - .../Observables/Implementations/Error.swift | 22 - .../Observables/Implementations/Map.swift | 140 - .../Observables/Implementations/Merge.swift | 424 --- .../Implementations/Multicast.swift | 71 - .../Observables/Implementations/Never.swift | 15 - .../Implementations/ObserveOn.swift | 129 - .../ObserveOnSerialDispatchQueue.swift | 82 - .../Implementations/RefCount.swift | 84 - .../Observables/Implementations/Scan.swift | 64 - .../Implementations/Sequence.swift | 49 - .../Implementations/ShareReplay1.swift | 101 - .../ShareReplay1WhileConnected.swift | 92 - .../Implementations/SkipWhile.swift | 115 - .../Implementations/TakeWhile.swift | 132 - .../Observables/Implementations/Timer.swift | 72 - .../{Implementations => }/Just.swift | 36 +- .../RxSwift/RxSwift/Observables/Map.swift | 108 + .../RxSwift/Observables/Materialize.swift | 44 + .../RxSwift/RxSwift/Observables/Merge.swift | 598 +++++ .../RxSwift/Observables/Multicast.swift | 408 +++ .../RxSwift/RxSwift/Observables/Never.swift | 27 + .../Observables/Observable+Aggregate.swift | 64 - .../Observables/Observable+Binding.swift | 190 -- .../Observables/Observable+Concurrency.swift | 62 - .../Observables/Observable+Creation.swift | 237 -- .../Observables/Observable+Debug.swift | 28 - .../Observables/Observable+Multiple.swift | 440 ---- .../Observables/Observable+Single.swift | 294 --- ...Observable+StandardSequenceOperators.swift | 323 --- .../RxSwift/Observables/Observable+Time.swift | 293 --- .../RxSwift/Observables/ObserveOn.swift | 231 ++ .../RxSwift/Observables/Optional.swift | 95 + .../{Implementations => }/Producer.swift | 33 +- .../{Implementations => }/Range.swift | 22 +- .../{Implementations => }/Reduce.swift | 43 +- .../{Implementations => }/Repeat.swift | 21 +- .../{Implementations => }/RetryWhen.swift | 62 +- .../{Implementations => }/Sample.swift | 41 +- .../RxSwift/RxSwift/Observables/Scan.swift | 101 + .../RxSwift/Observables/Sequence.swift | 89 + .../Observables/ShareReplayScope.swift | 458 ++++ .../{Implementations => }/SingleAsync.swift | 53 +- .../{Implementations => }/Sink.swift | 24 +- .../{Implementations => }/Skip.swift | 47 +- .../{Implementations => }/SkipUntil.swift | 44 +- .../RxSwift/Observables/SkipWhile.swift | 77 + .../{Implementations => }/StartWith.swift | 20 +- .../{Implementations => }/SubscribeOn.swift | 27 +- .../{Implementations => }/Switch.swift | 92 +- .../RxSwift/Observables/SwitchIfEmpty.swift | 104 + .../{Implementations => }/Take.swift | 54 +- .../{Implementations => }/TakeLast.swift | 31 +- .../{Implementations => }/TakeUntil.swift | 41 +- .../RxSwift/Observables/TakeWhile.swift | 85 + .../{Implementations => }/Throttle.swift | 30 +- .../{Implementations => }/Timeout.swift | 46 +- .../RxSwift/RxSwift/Observables/Timer.swift | 111 + .../{Implementations => }/ToArray.swift | 24 +- .../{Implementations => }/Using.swift | 24 +- .../{Implementations => }/Window.swift | 28 +- .../WithLatestFrom.swift | 49 +- ...lectionType.swift => Zip+Collection.swift} | 50 +- .../{Implementations => }/Zip+arity.swift | 247 +- .../{Implementations => }/Zip.swift | 14 +- .../Pods/RxSwift/RxSwift/ObserverType.swift | 50 +- .../RxSwift/Observers/AnonymousObserver.swift | 10 +- .../RxSwift/Observers/ObserverBase.swift | 19 +- .../RxSwift/Observers/TailRecursiveSink.swift | 13 +- .../RxSwift/Platform/Platform.Linux.swift | 222 -- Example/Pods/RxSwift/RxSwift/Reactive.swift | 62 +- Example/Pods/RxSwift/RxSwift/Rx.swift | 130 +- .../Pods/RxSwift/RxSwift/RxMutableBox.swift | 24 +- .../Pods/RxSwift/RxSwift/SchedulerType.swift | 21 +- .../ConcurrentDispatchQueueScheduler.swift | 39 +- .../Schedulers/ConcurrentMainScheduler.swift | 18 +- .../Schedulers/CurrentThreadScheduler.swift | 122 +- .../DispatchQueueSchedulerQOS.swift | 54 - .../Schedulers/HistoricalScheduler.swift | 9 +- .../HistoricalSchedulerTimeConverter.swift | 50 +- .../Schedulers/ImmediateScheduler.swift | 39 - .../Internal/AnonymousInvocable.swift | 21 - .../Internal/DispatchQueueConfiguration.swift | 11 +- .../Internal/InvocableScheduledItem.swift | 4 +- .../Schedulers/Internal/InvocableType.swift | 4 +- .../Schedulers/Internal/ScheduledItem.swift | 4 +- .../Internal/ScheduledItemType.swift | 4 +- .../RxSwift/Schedulers/MainScheduler.swift | 38 +- .../Schedulers/OperationQueueScheduler.swift | 49 +- .../Schedulers/RecursiveScheduler.swift | 153 +- .../SchedulerServices+Emulation.swift | 12 +- .../SerialDispatchQueueScheduler.swift | 28 +- .../Schedulers/VirtualTimeConverterType.swift | 58 +- .../Schedulers/VirtualTimeScheduler.swift | 67 +- .../RxSwift/Subjects/AsyncSubject.swift | 155 ++ .../RxSwift/Subjects/BehaviorSubject.swift | 135 +- .../RxSwift/Subjects/PublishSubject.swift | 105 +- .../RxSwift/Subjects/ReplaySubject.swift | 166 +- .../RxSwift/Subjects/SubjectType.swift | 26 +- .../RxSwift/RxSwift/Subjects/Variable.swift | 69 - .../RxSwift/SwiftSupport/SwiftSupport.swift | 18 + .../RxSwift/Traits/Completable+AndThen.swift | 132 + .../RxSwift/RxSwift/Traits/Completable.swift | 259 ++ .../Pods/RxSwift/RxSwift/Traits/Maybe.swift | 293 +++ .../ObservableType+PrimitiveSequence.swift | 43 + .../Traits/PrimitiveSequence+Zip+arity.swift | 521 ++++ .../RxSwift/Traits/PrimitiveSequence.swift | 267 ++ .../Pods/RxSwift/RxSwift/Traits/Single.swift | 337 +++ .../Pods-RxResult/Pods-RxResult-dummy.m | 5 - .../Pods-RxResult/Pods-RxResult-frameworks.sh | 95 - .../Pods-RxResult/Pods-RxResult-umbrella.h | 6 - .../Pods-RxResult.debug.xcconfig | 11 - .../Pods-RxResult/Pods-RxResult.modulemap | 6 - .../Pods-RxResult.release.xcconfig | 11 - .../Info.plist | 0 ...xResult_Example-acknowledgements.markdown} | 12 + ...s-RxResult_Example-acknowledgements.plist} | 20 +- .../Pods-RxResult_Example-dummy.m | 5 + .../Pods-RxResult_Example-frameworks.sh | 159 ++ .../Pods-RxResult_Example-resources.sh} | 56 +- .../Pods-RxResult_Example-umbrella.h | 16 + .../Pods-RxResult_Example.debug.xcconfig | 11 + .../Pods-RxResult_Example.modulemap | 6 + .../Pods-RxResult_Example.release.xcconfig | 11 + .../Target Support Files/Result/Info.plist | 2 +- .../Result/Result-prefix.pch | 8 + .../Result/Result-umbrella.h | 10 + .../Result/Result.xcconfig | 9 +- .../Target Support Files/RxAtomic/Info.plist | 26 + .../RxAtomic/RxAtomic-dummy.m | 5 + .../RxAtomic/RxAtomic-prefix.pch | 12 + .../RxAtomic/RxAtomic-umbrella.h | 17 + .../RxAtomic/RxAtomic.modulemap | 6 + .../RxAtomic/RxAtomic.xcconfig | 8 + .../Target Support Files/RxResult/Info.plist | 2 +- .../RxResult/RxResult-prefix.pch | 8 + .../RxResult/RxResult-umbrella.h | 10 + .../RxResult/RxResult.xcconfig | 10 +- .../Target Support Files/RxSwift/Info.plist | 2 +- .../RxSwift/RxSwift-prefix.pch | 8 + .../RxSwift/RxSwift-umbrella.h | 10 + .../RxSwift/RxSwift.xcconfig | 9 +- Example/RxResult.xcodeproj/project.pbxproj | 70 +- .../xcschemes/RxResult-Example.xcscheme | 10 +- .../xcshareddata/IDEWorkspaceChecks.plist | 8 + Example/RxResult/AppDelegate.swift | 2 +- RxResult.podspec | 4 +- RxResult/Classes/Observable+Result.swift | 20 +- 242 files changed, 11234 insertions(+), 8060 deletions(-) delete mode 100644 Example/Pods/Local Podspecs/RxSwift.podspec.json create mode 100644 Example/Pods/Result/Result/AnyError.swift create mode 100644 Example/Pods/Result/Result/NoError.swift create mode 100644 Example/Pods/RxAtomic/LICENSE.md create mode 100644 Example/Pods/RxAtomic/README.md create mode 100644 Example/Pods/RxAtomic/RxAtomic/RxAtomic.c create mode 100644 Example/Pods/RxAtomic/RxAtomic/include/RxAtomic.h create mode 100644 Example/Pods/RxSwift/Platform/AtomicInt.swift create mode 100644 Example/Pods/RxSwift/Platform/DataStructures/Bag.swift rename Example/Pods/RxSwift/{RxSwift => Platform}/DataStructures/InfiniteSequence.swift (83%) rename Example/Pods/RxSwift/{RxSwift => Platform}/DataStructures/PriorityQueue.swift (71%) rename Example/Pods/RxSwift/{RxSwift => Platform}/DataStructures/Queue.swift (78%) create mode 100644 Example/Pods/RxSwift/Platform/DeprecationWarner.swift create mode 100644 Example/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift rename Example/Pods/RxSwift/{RxSwift => }/Platform/Platform.Darwin.swift (51%) create mode 100644 Example/Pods/RxSwift/Platform/Platform.Linux.swift create mode 100644 Example/Pods/RxSwift/Platform/RecursiveLock.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedSubscribeType.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/DataStructures/Bag.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Deprecated.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Disposables/StableCompositeDisposable.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift create mode 100644 Example/Pods/RxSwift/RxSwift/GroupedObservable.swift rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/AddRef.swift (88%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Amb.swift (63%) create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/AsSingle.swift rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Buffer.swift (72%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Catch.swift (52%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations/CombineLatest+CollectionType.swift => CombineLatest+Collection.swift} (66%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/CombineLatest+arity.swift (79%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/CombineLatest.swift (90%) create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Concat.swift rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations/AnonymousObservable.swift => Create.swift} (50%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations/Debunce.swift => Debounce.swift} (74%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Debug.swift (50%) create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Deferred.swift (62%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Delay.swift (75%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/DelaySubscription.swift (57%) create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Do.swift rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/ElementAt.swift (69%) create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Empty.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Enumerated.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Error.swift rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Filter.swift (54%) create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/First.swift rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Generate.swift (66%) create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/GroupBy.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/Concat.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/ConnectableObservable.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/DistinctUntilChanged.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/Do.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/Empty.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/Error.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/Map.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/Merge.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/Multicast.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/Never.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOn.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOnSerialDispatchQueue.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/RefCount.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/Scan.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/Sequence.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1WhileConnected.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/SkipWhile.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/TakeWhile.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Implementations/Timer.swift rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Just.swift (54%) create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Map.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Materialize.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Merge.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Multicast.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Never.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Observable+Aggregate.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Observable+Binding.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Observable+Concurrency.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Observable+Creation.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Observable+Debug.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Observable+Multiple.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Observable+Single.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Observable+StandardSequenceOperators.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Observable+Time.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Optional.swift rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Producer.swift (71%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Range.swift (59%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Reduce.swift (50%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Repeat.swift (56%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/RetryWhen.swift (57%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Sample.swift (72%) create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Scan.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Sequence.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/SingleAsync.swift (52%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Sink.swift (68%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Skip.swift (62%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/SkipUntil.swift (68%) create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/StartWith.swift (52%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/SubscribeOn.swift (61%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Switch.swift (61%) create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Take.swift (65%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/TakeLast.swift (56%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/TakeUntil.swift (68%) create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Throttle.swift (77%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Timeout.swift (58%) create mode 100644 Example/Pods/RxSwift/RxSwift/Observables/Timer.swift rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/ToArray.swift (63%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Using.swift (63%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Window.swift (80%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/WithLatestFrom.swift (58%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations/Zip+CollectionType.swift => Zip+Collection.swift} (67%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Zip+arity.swift (77%) rename Example/Pods/RxSwift/RxSwift/Observables/{Implementations => }/Zip.swift (91%) delete mode 100644 Example/Pods/RxSwift/RxSwift/Platform/Platform.Linux.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Schedulers/DispatchQueueSchedulerQOS.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Schedulers/ImmediateScheduler.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Schedulers/Internal/AnonymousInvocable.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Subjects/AsyncSubject.swift delete mode 100644 Example/Pods/RxSwift/RxSwift/Subjects/Variable.swift create mode 100644 Example/Pods/RxSwift/RxSwift/SwiftSupport/SwiftSupport.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Traits/Completable+AndThen.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Traits/Completable.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Traits/Maybe.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Traits/ObservableType+PrimitiveSequence.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence+Zip+arity.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence.swift create mode 100644 Example/Pods/RxSwift/RxSwift/Traits/Single.swift delete mode 100644 Example/Pods/Target Support Files/Pods-RxResult/Pods-RxResult-dummy.m delete mode 100755 Example/Pods/Target Support Files/Pods-RxResult/Pods-RxResult-frameworks.sh delete mode 100644 Example/Pods/Target Support Files/Pods-RxResult/Pods-RxResult-umbrella.h delete mode 100644 Example/Pods/Target Support Files/Pods-RxResult/Pods-RxResult.debug.xcconfig delete mode 100644 Example/Pods/Target Support Files/Pods-RxResult/Pods-RxResult.modulemap delete mode 100644 Example/Pods/Target Support Files/Pods-RxResult/Pods-RxResult.release.xcconfig rename Example/Pods/Target Support Files/{Pods-RxResult => Pods-RxResult_Example}/Info.plist (100%) rename Example/Pods/Target Support Files/{Pods-RxResult/Pods-RxResult-acknowledgements.markdown => Pods-RxResult_Example/Pods-RxResult_Example-acknowledgements.markdown} (75%) rename Example/Pods/Target Support Files/{Pods-RxResult/Pods-RxResult-acknowledgements.plist => Pods-RxResult_Example/Pods-RxResult_Example-acknowledgements.plist} (77%) create mode 100644 Example/Pods/Target Support Files/Pods-RxResult_Example/Pods-RxResult_Example-dummy.m create mode 100755 Example/Pods/Target Support Files/Pods-RxResult_Example/Pods-RxResult_Example-frameworks.sh rename Example/Pods/Target Support Files/{Pods-RxResult/Pods-RxResult-resources.sh => Pods-RxResult_Example/Pods-RxResult_Example-resources.sh} (66%) create mode 100644 Example/Pods/Target Support Files/Pods-RxResult_Example/Pods-RxResult_Example-umbrella.h create mode 100644 Example/Pods/Target Support Files/Pods-RxResult_Example/Pods-RxResult_Example.debug.xcconfig create mode 100644 Example/Pods/Target Support Files/Pods-RxResult_Example/Pods-RxResult_Example.modulemap create mode 100644 Example/Pods/Target Support Files/Pods-RxResult_Example/Pods-RxResult_Example.release.xcconfig create mode 100644 Example/Pods/Target Support Files/RxAtomic/Info.plist create mode 100644 Example/Pods/Target Support Files/RxAtomic/RxAtomic-dummy.m create mode 100644 Example/Pods/Target Support Files/RxAtomic/RxAtomic-prefix.pch create mode 100644 Example/Pods/Target Support Files/RxAtomic/RxAtomic-umbrella.h create mode 100644 Example/Pods/Target Support Files/RxAtomic/RxAtomic.modulemap create mode 100644 Example/Pods/Target Support Files/RxAtomic/RxAtomic.xcconfig create mode 100644 Example/RxResult.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 2d2b25d..2894c22 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,22 +1,31 @@ PODS: - - Result (3.0.0) - - RxResult (1.0.2): - - Result - - RxSwift (= 3.0.0-beta.1) - - RxSwift (3.0.0-beta.1) + - Result (4.0.0) + - RxAtomic (4.4.0) + - RxResult (2.3): + - Result (~> 4.0) + - RxSwift (~> 4.0) + - RxSwift (4.4.0): + - RxAtomic (~> 4.4) DEPENDENCIES: - RxResult (from `../`) +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - Result + - RxAtomic + - RxSwift + EXTERNAL SOURCES: RxResult: :path: "../" SPEC CHECKSUMS: - Result: 1b3e431f37cbcd3ad89c6aa9ab0ae55515fae3b6 - RxResult: 54555008a738d38b88a772550f050506513189d5 - RxSwift: 0823e8d7969c23bfa9ddfb2afa4881e424a1a710 + Result: 7645bb3f50c2ce726dd0ff2fa7b6f42bbe6c3713 + RxAtomic: eacf60db868c96bfd63320e28619fe29c179656f + RxResult: 5da47e3df111a78dc97c7959f44e71b97176df4f + RxSwift: 5976ecd04fc2fefd648827c23de5e11157faa973 -PODFILE CHECKSUM: 02955c323288b4f1b7d5810ceae966ef43b84b07 +PODFILE CHECKSUM: 251a3f37222b3a575b94cf62e6297e95f479d297 -COCOAPODS: 1.1.0.rc.2 +COCOAPODS: 1.5.3 diff --git a/Example/Pods/Local Podspecs/RxResult.podspec.json b/Example/Pods/Local Podspecs/RxResult.podspec.json index 9a66eb8..864f0e6 100644 --- a/Example/Pods/Local Podspecs/RxResult.podspec.json +++ b/Example/Pods/Local Podspecs/RxResult.podspec.json @@ -1,6 +1,6 @@ { "name": "RxResult", - "version": "1.0.2", + "version": "2.3", "summary": "Result bindings for RxSwift", "description": "Result bindings for RxSwift. Adds doOnSuccess, doOnFailure, subscribeSuccess\nand subscribeFailure methods.", "homepage": "https://github.com/ivanbruel/RxResult", @@ -13,7 +13,7 @@ }, "source": { "git": "https://github.com/ivanbruel/RxResult.git", - "tag": "1.0.2" + "tag": "2.3" }, "social_media_url": "https://twitter.com/ivanbruel", "platforms": { @@ -22,10 +22,10 @@ "source_files": "RxResult/Classes/**/*", "dependencies": { "RxSwift": [ - "3.0.0-beta.1" + "~> 4.0" ], "Result": [ - + "~> 4.0" ] } } diff --git a/Example/Pods/Local Podspecs/RxSwift.podspec.json b/Example/Pods/Local Podspecs/RxSwift.podspec.json deleted file mode 100644 index 7eee94a..0000000 --- a/Example/Pods/Local Podspecs/RxSwift.podspec.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "RxSwift", - "version": "3.0.0-beta.1", - "summary": "RxSwift is a Swift implementation of Reactive Extensions", - "description": "This is a Swift port of [ReactiveX.io](https://github.com/ReactiveX)\n\nLike the original [Rx](https://github.com/Reactive-extensions/Rx.Net), its intention is to enable easy composition of asynchronous operations and event streams.\n\nIt tries to port as many concepts from the original Rx as possible, but some concepts were adapted for more pleasant and performant integration with iOS/OSX environment.\n\nProbably the best analogy for those who have never heard of Rx would be:\n\n```\ngit diff | grep bug | less # linux pipes - programs communicate by sending\n\t\t\t\t # sequences of bytes, words, lines, '\u0000' terminated strings...\n```\nwould become if written in RxSwift\n```\ngitDiff().grep(\"bug\").less // sequences of swift objects\n```", - "homepage": "https://github.com/ReactiveX/RxSwift", - "license": "MIT", - "authors": { - "Krunoslav Zaher": "krunoslav.zaher@gmail.com" - }, - "source": { - "git": "https://github.com/ReactiveX/RxSwift.git", - "tag": "3.0.0-beta.1" - }, - "requires_arc": true, - "platforms": { - "ios": "8.0", - "osx": "10.10", - "watchos": "2.0", - "tvos": "9.0" - }, - "source_files": "RxSwift/**/*.swift" -} diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 2d2b25d..2894c22 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,22 +1,31 @@ PODS: - - Result (3.0.0) - - RxResult (1.0.2): - - Result - - RxSwift (= 3.0.0-beta.1) - - RxSwift (3.0.0-beta.1) + - Result (4.0.0) + - RxAtomic (4.4.0) + - RxResult (2.3): + - Result (~> 4.0) + - RxSwift (~> 4.0) + - RxSwift (4.4.0): + - RxAtomic (~> 4.4) DEPENDENCIES: - RxResult (from `../`) +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - Result + - RxAtomic + - RxSwift + EXTERNAL SOURCES: RxResult: :path: "../" SPEC CHECKSUMS: - Result: 1b3e431f37cbcd3ad89c6aa9ab0ae55515fae3b6 - RxResult: 54555008a738d38b88a772550f050506513189d5 - RxSwift: 0823e8d7969c23bfa9ddfb2afa4881e424a1a710 + Result: 7645bb3f50c2ce726dd0ff2fa7b6f42bbe6c3713 + RxAtomic: eacf60db868c96bfd63320e28619fe29c179656f + RxResult: 5da47e3df111a78dc97c7959f44e71b97176df4f + RxSwift: 5976ecd04fc2fefd648827c23de5e11157faa973 -PODFILE CHECKSUM: 02955c323288b4f1b7d5810ceae966ef43b84b07 +PODFILE CHECKSUM: 251a3f37222b3a575b94cf62e6297e95f479d297 -COCOAPODS: 1.1.0.rc.2 +COCOAPODS: 1.5.3 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 4dc9849..033de45 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -7,851 +7,985 @@ objects = { /* Begin PBXBuildFile section */ - 0013DBB3057EC96B04484E12747B0CF5 /* Producer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2651FDBAD195D84DA038CF7939BE3F24 /* Producer.swift */; }; - 001BE20540E0FB303A6E717BC193298F /* ReplaySubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = B89FC84C67FE619AF59890805695705B /* ReplaySubject.swift */; }; - 00A9A4F322528A821277704AD26B01A5 /* MainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59F201C2F28F368A72C232E2F197A68B /* MainScheduler.swift */; }; - 00DF0AB722BD5164E5060E362485A23A /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9A70452AB47D71D4D8B7248E4878AF9 /* Error.swift */; }; - 05C7415FA9A3BFB0AACC7F960DA81A94 /* RxResult-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 65EBDFDCDBD0F93FD83FD03721F8DCAB /* RxResult-dummy.m */; }; - 074FBD3F1CA6496D31A0F61160610A93 /* RefCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 178F98CF2068C366C45AECC01305D207 /* RefCount.swift */; }; - 084A3CC81C1BE8E684A2B8A098C9AF34 /* TakeUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0188B3C0993FF92B9152F772D08024ED /* TakeUntil.swift */; }; - 097A796FA424C0B01587384C480CDA0E /* Amb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7605D3E0CA2319BBC0140814FE219634 /* Amb.swift */; }; - 0DA6513A18ED0B833CC78B40C0A7E539 /* ConnectableObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38A456294ED042B4CED97EB00CFEE132 /* ConnectableObservable.swift */; }; - 0E7D399D15655F0A183F577AEA4C6F1C /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BFCE68C0BDDE2038C646F4C8AF6C054 /* Timer.swift */; }; - 10C725DBFDCA89A816BF6F8BAB73CD25 /* CombineLatest+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9EB4BDBAF04BE69FD2A68904B046DB1 /* CombineLatest+arity.swift */; }; - 135FCE53FCE636AAEF92AF2A33D1A8E3 /* Do.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8EDC37D4EF532B15215A740EFCAA590 /* Do.swift */; }; - 16A2C4F4F72F5BA60DDB1A60B5B9FC56 /* BooleanDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F82808C1E63F1BC35C96EEB23B0D4449 /* BooleanDisposable.swift */; }; - 17372783670D60B8EC91D17386FCB4D5 /* Concat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50B7A9EA71A91A50B4FA973D99859594 /* Concat.swift */; }; - 1997D1992B7E820DC33A57CE4AFC27F5 /* Repeat.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3482ADFF53738F66D283AA3F2B304B7 /* Repeat.swift */; }; - 1ACC633D8892FDD58734D428BECD86C9 /* DisposeBag.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5D5177706E971AFC35FD3A3599DEC01 /* DisposeBag.swift */; }; - 1B794A91A52E44B85DFB7C1D48400093 /* Delay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0269F179D509C82C1DCCAFA19DB311B9 /* Delay.swift */; }; - 1B9235AEBDC726056C3D51E4A0A7C105 /* ImmediateSchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 009B4F4B99BE5CADED089E78463A331F /* ImmediateSchedulerType.swift */; }; - 1C11AFCC868156DE9AF98A5867D2BA7B /* PublishSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6ABFEF03460CF932785C6E40A130D498 /* PublishSubject.swift */; }; - 1CA4B17EF2C8BBBDD70CB2AB62E66957 /* Scan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7684F8A63D3C1974A91F034025C065EF /* Scan.swift */; }; - 1E95EBA43ECFB191413C122E69517619 /* Buffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 918AEE3D096F63A69DB65B47B18AE8E2 /* Buffer.swift */; }; - 219C24F87C7D811B03FDFA41D1970EFE /* Never.swift in Sources */ = {isa = PBXBuildFile; fileRef = 459886E646AA2B12959FA874220D6385 /* Never.swift */; }; - 2332503D70FAB4F9A3BDB376D29F1D85 /* HistoricalSchedulerTimeConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5055710C82EF5DC53DF23BBFFC7CF63 /* HistoricalSchedulerTimeConverter.swift */; }; - 27AB00F27451886345564EF019B9EA0E /* SynchronizedOnType.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD62F8FFF256E59711D9FDF3322EC7BF /* SynchronizedOnType.swift */; }; - 2BE3F0922ABC10606E372C867596FE4A /* Observable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B583E04E4BACC7A54C55A38DA6FACF9C /* Observable.swift */; }; - 2C74202BF5844FFE97AA3CFCED615AD1 /* SerialDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4DCF31BD6DE9F6836933A313FAD41DC /* SerialDisposable.swift */; }; - 2C78EF70DDCCBB23B5E18763D3F15119 /* PriorityQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 765E3B92A0143D283C35083C4980B393 /* PriorityQueue.swift */; }; - 2E9A6BBC623D557D1AD31A6E092FBEE8 /* Skip.swift in Sources */ = {isa = PBXBuildFile; fileRef = F613D42862255C3370C789BA2D2B71A1 /* Skip.swift */; }; - 2F1968DCC43DE46F233471E5DF9F1113 /* Disposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F6FCBA69A38BF4A876BDF299B667DAF /* Disposable.swift */; }; - 2FC8D8F026DA84BE5FC902DF01F14188 /* Platform.Darwin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B8A30DCEF1254A9F0D9DC9ED8548F94 /* Platform.Darwin.swift */; }; - 3211F3B812957C5A201746891A58970B /* SchedulerServices+Emulation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F74DFBF3B57CA3DDFC83B1D6E5271986 /* SchedulerServices+Emulation.swift */; }; - 3349028DEED77A8378F8F74A1F8D7ED9 /* Switch.swift in Sources */ = {isa = PBXBuildFile; fileRef = E72CA9F246917F67DF9F0413ADD81357 /* Switch.swift */; }; - 33D31A57020151DC36B92C87BD838EC4 /* Observable+Creation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C98BB709EA53D6CBA528C52C891F52DA /* Observable+Creation.swift */; }; - 34C2B67E363C502DACEF7B2ED1E323D4 /* Cancelable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9060A508AA54D1851F2E0844D06D8203 /* Cancelable.swift */; }; - 352E321273ED040B178E4A48BA34946C /* Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = F905F709E89C8A445A8E9F43603364AD /* Debug.swift */; }; - 377293886CACE70742B6AA0A04DCFC4C /* BehaviorSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09662510671391914DB9FC117A89701E /* BehaviorSubject.swift */; }; - 3A8971E83498246D7667B408EE8C56DC /* Observable+Concurrency.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5FB6224194FD71E2C6C16677F6D4580 /* Observable+Concurrency.swift */; }; - 3B8E7C458441C57044CA7F192D82276E /* CurrentThreadScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0283246BAE545F163D0AFD877AF2BEF /* CurrentThreadScheduler.swift */; }; - 3F56DF4EADB00CB6F578A37C47FD2056 /* Observable+Single.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65BB50645A6B7B133B26D748A0CDF318 /* Observable+Single.swift */; }; - 400F0CA62F6FAE58FBB3D77C6DD1CAA2 /* AnyObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE31381D986C6FE108F964B077607629 /* AnyObserver.swift */; }; - 4015EEBED6D65B16E0AEB3132F42568B /* Range.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5D8B1EB89C625313B20BAE589D9073F /* Range.swift */; }; - 443ABF09C61A634AB8FD249D51D882FA /* RxMutableBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF7568F6CBFF4A702A2A4E8E51CAC8B9 /* RxMutableBox.swift */; }; - 4511562714A68F326B9919F59DEFD59D /* Merge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2277A8B8A8C0853B95DE27FCE028A39A /* Merge.swift */; }; - 475808A387C4E6469FC8CE3218F2B916 /* InvocableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCB1A87A8EB172BDB8C40AD03077DF1F /* InvocableType.swift */; }; - 52BF64467BF9E65DAAA72C7268CDB39E /* Lock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B77163D1E8DECA77C7CFAC0D8C76FB4 /* Lock.swift */; }; - 5530FC28B405F0799BD0DCBB780EF35B /* Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5446E36E58520C2C9EE83EDF779A182 /* Sequence.swift */; }; - 56E779018CF671EA073661A43D687CD8 /* SkipUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 788F1963A5DEF05469A80074D0001BFC /* SkipUntil.swift */; }; - 5930C80AC1718C4BB2A505DCD849B958 /* WithLatestFrom.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE63F3BFF0EE7B9F4F664D2C43E36B56 /* WithLatestFrom.swift */; }; - 5E93B07F8A81160AAC6A0E3A29D8DB01 /* SingleAssignmentDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEAEEEFA2C36C9251ACFA3138152561C /* SingleAssignmentDisposable.swift */; }; - 5F5540814A34A3B703A069D75B5EAEC2 /* ConcurrentMainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23D3D3EC340F4759902BE5261D7257A /* ConcurrentMainScheduler.swift */; }; - 5F728739BD27AE74509FA4F30CCCF383 /* AnonymousDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8E693116B1A30C39EB1CB90ECEDB74F /* AnonymousDisposable.swift */; }; - 610E18C0DF001DADBE74A7B9BCDB7C3D /* CompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEB1C6D702BB79EC80804C016AC6FD19 /* CompositeDisposable.swift */; }; - 6560F5426738BB4D81BFBD3FE59BF91F /* AddRef.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAD84E174203DB40675DBEC9D73036E2 /* AddRef.swift */; }; - 68C83BC33126EE73BC143E7BB6698F93 /* Sink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53687E1EAF7A06D4BF971DB4C8F5DD77 /* Sink.swift */; }; - 68F5F675E2E0C3FF02449DB8816033A3 /* Zip+CollectionType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B7D01B1DC2ADFC09419E02EBD81FF15 /* Zip+CollectionType.swift */; }; - 6B4108C3AD59E04F274C924861E314C1 /* Using.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1554E36092DF01EAE8A424DFB92A12 /* Using.swift */; }; - 6B78E09A7DBEF1DF0747AED7B5B59393 /* SynchronizedDisposeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2998A104A9A8BE769826A7818A61DD0F /* SynchronizedDisposeType.swift */; }; - 6CA02589E759A3B346D500CC9015845F /* HistoricalScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 345BFA7A3D41E500394B650D1D5861E3 /* HistoricalScheduler.swift */; }; - 6D98462D3AD6C08C7F98E12EE0130FCC /* RetryWhen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74A67B5F7E7C00AFFC7331A1E528E129 /* RetryWhen.swift */; }; - 706A729B116B097C9CAEA0C1F9621437 /* SchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57B3A0A40F1FD4BAE3156834C2FB1E47 /* SchedulerType.swift */; }; - 70E1E10B0A4308A1E3C8F68C8E49115C /* RxSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E007CE5112E72655F543F6C2F94638E1 /* RxSwift-dummy.m */; }; - 71D784D5CDA60404E680C22343F3D2A1 /* Observable+Time.swift in Sources */ = {isa = PBXBuildFile; fileRef = E40D7230EE58DBBFA15F999C9D2A2538 /* Observable+Time.swift */; }; - 723241F347117A21291F5369F00E2CFA /* DispatchQueueSchedulerQOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE2A48699502C41E6EF3DCE49E1C0611 /* DispatchQueueSchedulerQOS.swift */; }; - 72D5B465FB2F7D61A47FD00EBC4F8DCF /* AnonymousObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6B8BDB86BE4DA79C6F296597AF5800A /* AnonymousObserver.swift */; }; - 74795735815E0A71A6F6056F1925513A /* SingleAsync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92172CE43C48615DE684A744A3A0C705 /* SingleAsync.swift */; }; - 7723386FF9094E2B0531309D01C61B19 /* OperationQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4788DE8D73585112154EA4A0198D7D40 /* OperationQueueScheduler.swift */; }; - 783FAA6133D921A74ED4153FAE751C77 /* ConnectableObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73424F00FBD100776D660F80B66AA6D6 /* ConnectableObservableType.swift */; }; - 7E951C0CA32B94424982FF11DD29853A /* CombineLatest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F38511300D46BD13A7CC20BCFD9D0FFE /* CombineLatest.swift */; }; - 7F7D584A14F1099EE2562D1C3313BBA2 /* TailRecursiveSink.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEAC84803288AC8D5968EB723B63B2ED /* TailRecursiveSink.swift */; }; - 80C4C0FD2269C735E500BE23DC69FBC2 /* RefCountDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 862FD768523C33117727B62F1A062F33 /* RefCountDisposable.swift */; }; - 8122CFC98ABF2CC73FE5CD10DDD6C17E /* Timeout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E886A0EE61D2FBD045FE8DA56630F12 /* Timeout.swift */; }; - 82EF6C488E5BF1D639FDD5F616DF86FE /* InvocableScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2047234706E3D10F3EDF14CF83D3869 /* InvocableScheduledItem.swift */; }; - 8376CC3E1A61BEC62094E2FB0EECD1B4 /* Variable.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE0C8D7154FE63321032D6D602FE566D /* Variable.swift */; }; - 8572544D95E7278D3B81FA59BA42715E /* DistinctUntilChanged.swift in Sources */ = {isa = PBXBuildFile; fileRef = D41AA1A1E560659288DED8E2D2EEEE98 /* DistinctUntilChanged.swift */; }; - 86632C43C9E0086CB1893495681A8DDD /* ScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 885AAE3027B2110CED8A1F95C7CA10EF /* ScheduledItem.swift */; }; - 8686DCF23F67D6157555A8AE77AA925A /* AsyncLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1438F80A6A1145E929FDC2209C598E22 /* AsyncLock.swift */; }; - 86DAE070315C40B977FBFD94326BA6AC /* SubscribeOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E68357BF4756106B05AAB53C5457B75 /* SubscribeOn.swift */; }; - 8742446BD699465C5498EC33895EBFB1 /* SynchronizedUnsubscribeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AB8E0D8A74C19DBC617DA1C8BB34C88 /* SynchronizedUnsubscribeType.swift */; }; - 88745A783FD7329AFD4B84FB3F84A168 /* Pods-RxResult-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F5E854AA9B894844F06605F68457DB2C /* Pods-RxResult-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 88A1548B249DB0C426D52EF276E8DF5B /* LockOwnerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9BAD8C9B2B83623E8B55B8DD5610383 /* LockOwnerType.swift */; }; - 8DA95CD12C67F634935594CE8A063D7B /* ObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DC1F66BEA4D84F4EB748088EB6F2497 /* ObservableType.swift */; }; - 8EAD35DBE26670B791B4E4140561D70B /* CombineLatest+CollectionType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 956578CC1E9A5931141C03361015B772 /* CombineLatest+CollectionType.swift */; }; - 91484EA04486F0C228EBE623BE8FEEEB /* ObservableConvertibleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55B968A09802805A11C73145F61A62A9 /* ObservableConvertibleType.swift */; }; - 91B99E6DD69AB768779F80048C8E26DF /* ImmediateScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 162C77CF207A3A243B08F6B61533BF45 /* ImmediateScheduler.swift */; }; - 9434FE82C0EDADCDC31753FF9F12ED75 /* DisposeBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A8948F8F926033395757CAEC52A75EE /* DisposeBase.swift */; }; - 951E34768763A533F80ACC40B4922801 /* Reduce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 370E4B7F1A3F04DA25B72A9BC4756DA3 /* Reduce.swift */; }; - 963222931DE446945228BACE4BD93D72 /* ScheduledDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C4F046A5D51FE9BAB4AE4EC12DA09A /* ScheduledDisposable.swift */; }; - 96657084DB3F297C08F9658F8F649253 /* Observable+Aggregate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFB992B452B93B0A565507C686C6F909 /* Observable+Aggregate.swift */; }; - 97388735972E2BFFFFFC657FB7A3071B /* TakeLast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8598322163047BB1D0B53A6C16C82676 /* TakeLast.swift */; }; - 97E36A661402D12D5A737D3EED4FFF0A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A77AB527859A907CFEA989AA802C55A1 /* Foundation.framework */; }; - 9870748D1B35944D269629117D5C1E8D /* Result-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 149A5621EAEEEBDA511FCB3C8235D535 /* Result-dummy.m */; }; - 98A24BBB697B086117BE466618F02390 /* Disposables.swift in Sources */ = {isa = PBXBuildFile; fileRef = 154F0826D608B9ED74C013F144A316EB /* Disposables.swift */; }; - 98A450BF913A4021EBE100AC5472FF6C /* SynchronizedSubscribeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52748332552B25402E196114C79B5AEB /* SynchronizedSubscribeType.swift */; }; - 9AFFF7F253095BF8B4A8F84EE738EFB3 /* Catch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3083C240E5B852D082CB115C61E83EBE /* Catch.swift */; }; - A029BED32D20F8EAAE25134D3B950125 /* VirtualTimeConverterType.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCA6A87FDF342E280A3E010318F65296 /* VirtualTimeConverterType.swift */; }; - A249EBEA7AFDB785DE6CF45C02B304D9 /* Observable+Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A3C6BF1749C858819E0FF92667ED60 /* Observable+Debug.swift */; }; - A48BC06B9C084DA458D803DD35376FEE /* ObserveOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9F94300690BD76C63D7698B82B6513E /* ObserveOn.swift */; }; - A6B1801A64855DA4ABBF5871AA3A76DA /* DispatchQueueConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45D0A85E1AA238C7FAA0E586FFDA5860 /* DispatchQueueConfiguration.swift */; }; - A6F06A2C9EC9F200595662F77755E12F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A77AB527859A907CFEA989AA802C55A1 /* Foundation.framework */; }; - A91626D9CB9A378CB78CC44F42E19F38 /* SubscriptionDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D83A895879C7DBFFBA76FFE35866E8C /* SubscriptionDisposable.swift */; }; - A98B10EDEBCA5F7D4A1909EFC6E6B3CB /* SerialDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DD43CE9B3F1756F2A9EE9042CA1F3AC /* SerialDispatchQueueScheduler.swift */; }; - AC6E6FE647D535EA8CC23954218CFFEE /* AnonymousInvocable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E7403B2A6F30DDE16D4EA07BB13C801 /* AnonymousInvocable.swift */; }; - AC82B0D737E0D58608ADFA36936F5BED /* RecursiveScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD7E1079B6EC3EB7C3015EB919C35086 /* RecursiveScheduler.swift */; }; - AF419B7832C2BCDDBE478A9494D2A1DD /* ShareReplay1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91E87CD15EA8103724B37C9C6156D37A /* ShareReplay1.swift */; }; - B03D7EF92D630D360FB2D9DDAFE063B3 /* Queue.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1A86E622511B7E1EC2FECC89689D94F /* Queue.swift */; }; - B067D9C0586D1C303AA2107FD0873CF7 /* Generate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 505E2A9C9DCC37620D8E19CB7E9E089A /* Generate.swift */; }; - B1572A5A6CB4A1A15DCB918912FD5D00 /* ObservableType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFDED496A850CCECCB3ACF2261FFADF8 /* ObservableType+Extensions.swift */; }; - B19B5B0EDDF415B0D74398F9523415C0 /* Just.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7EE88BD2F74C54AAC165960E13C8F17 /* Just.swift */; }; - B27108488925B317D1B71B8EFC4141E6 /* Observable+Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53916BF38207FC59058D640DAD559B1B /* Observable+Result.swift */; }; - B5413827E697CA7BF8D86909CEA57E34 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 375429D5A20C2E6113CF7A17FD67FBB9 /* RxSwift.framework */; }; - B7E5B43161892602B09597911367DB2E /* Take.swift in Sources */ = {isa = PBXBuildFile; fileRef = 588C9B897CCD7C4FDF0D22395050E1D7 /* Take.swift */; }; - BCE8DB83287D9164D1435F594FE4D454 /* DelaySubscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56DDB42528DB4FC74859456D2348F3C4 /* DelaySubscription.swift */; }; - BDC176355514081CB266EE06DF9B5BB8 /* AnonymousObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9298A84514EAF3DE7B196AE68842363C /* AnonymousObservable.swift */; }; - BE36DCDB5A5D805DB6CC6B8ED0D22FC7 /* VirtualTimeScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 028280AB9252B6D3BDFB3571454CA086 /* VirtualTimeScheduler.swift */; }; - BE92C2638C17BDCBCB15FAC88F012EF6 /* BinaryDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCD1D71C2F0E47EB3DDF13CA68C7DCD8 /* BinaryDisposable.swift */; }; - C15948C6BA443F1337D2A17AA900DE36 /* Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7BAFC3FB4F9603B10D3304BBAB03C57 /* Rx.swift */; }; - C2F6B0B3BDADB16EA5F15C5B1E5D7E19 /* ObserveOnSerialDispatchQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01BF5D615D977F1BF2EF5B1B89D54453 /* ObserveOnSerialDispatchQueue.swift */; }; - C35236527440F926A6F5CB8F19C188AD /* ObserverBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A007B873AEC13961C42D3FCB657EFA8 /* ObserverBase.swift */; }; - C537921C778C86A3E7E27B3A61E21223 /* ScheduledItemType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FB12A86730D4873DDA45F7CEF078DEB /* ScheduledItemType.swift */; }; - C60EAE60478B485C08BCD982959569D6 /* Result-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7653F648C5BBD3A6AB89303F00F3D2AD /* Result-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C676864ACDEEC03164A80DD470122121 /* RxSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = ACA3B6C8342D042C611A40C4483CCAFA /* RxSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C925DD1C1CFB7E0CD563456BEE748F2B /* InfiniteSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = D38C929FB013CEBF45A60225CB8D9CD4 /* InfiniteSequence.swift */; }; - CA2C50B148004823E38BDB7F86166C44 /* Reactive.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD8152F137FFAF7C0C933677FCD5BC8C /* Reactive.swift */; }; - CA6843651D1E771036849FA8715F02F4 /* Bag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4851007B43DA3F3CA54F37769BA493F0 /* Bag.swift */; }; - CD22C02CDE3ACD258B09D4654FDE7703 /* Throttle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A25467B97F47E9CEE714FEA1D087D81 /* Throttle.swift */; }; - D15D67215E9C09E50D81653CB1FF0986 /* Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DD185DD731DEBBEA2D0B1ABA9C849F9 /* Window.swift */; }; - D39127CC2ABC13C7BB659B0E00457BD4 /* Empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = A26AC01E8DB58719362AA5AD08B684EF /* Empty.swift */; }; - D53C8F0E3240A2523076BB0EB2B82B21 /* Deferred.swift in Sources */ = {isa = PBXBuildFile; fileRef = 804419D25273EEC710ABAEF0E3E46CC8 /* Deferred.swift */; }; - D568106645453D0A9856CE498CD5B6FD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A77AB527859A907CFEA989AA802C55A1 /* Foundation.framework */; }; - D6BF790F189818FFF24E985BA1394595 /* NopDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E226D4FA77164A07C5160BB563514095 /* NopDisposable.swift */; }; - D7955CA0C11057494C334920F0DA6141 /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5D7132D30E5611F25F5177B81DB1CCF /* Event.swift */; }; - DDA9B5599971EC0DD398A790A5AAEC93 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAF5199A0A3131A9A0CB196EF9EA2DE9 /* Result.swift */; }; - DF2293D8EB70741ACE12F26F682FD160 /* Pods-RxResult-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 20FB6B9398299C144DC7057F5738B946 /* Pods-RxResult-dummy.m */; }; - E020C4F1D654BA67A863CBF8B5A5E32C /* SubjectType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5741CB60B359955715E1CCFBA526534C /* SubjectType.swift */; }; - E1AEFF090A5EB9D193798E4AF5C91962 /* Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBB7EEBA27D33957A2BCE843FC556B13 /* Map.swift */; }; - E4ED7E8D9B68EF208927150433695BEC /* ObserverType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67549EF423FFA0C235108F34C59C5D5C /* ObserverType.swift */; }; - E8677578640256E39B0BCAC31721498E /* Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EA603E11B2B5E6D8734CCDECD434830 /* Zip+arity.swift */; }; - E86A2A9C2C96912D14AE670958605E8F /* String+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35CCB1ACF1E54E0602A0061EB4A7F190 /* String+Rx.swift */; }; - E8D5AEE7E30EBD2B4C9D86FBF0BB08FD /* ToArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02F36C5811D28E5B33A6DB2EDA401D2B /* ToArray.swift */; }; - E91E1FEA319A452EA2FEAE9ECA186155 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F074C2AA6DD3BCAE61E2A62848E60FB /* Errors.swift */; }; - E95301460FCE57DE3342BA9C5C9AB7F5 /* Observable+Multiple.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C5057E6D476892583C1E779C9E67121 /* Observable+Multiple.swift */; }; - E9D07C569398B9A979A3126B356C79F2 /* Multicast.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E67511993BCFF7E6509C1AEC7275A1 /* Multicast.swift */; }; - EB20C78D3006F5900F58DD2B6BE03643 /* Debunce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78F72E489B31599484C136E541C6251D /* Debunce.swift */; }; - EE262CEEAF5F4F7E09C7869ABC10B693 /* TakeWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2B72307C219612B0A3C83AD4F0E343 /* TakeWhile.swift */; }; - EFF200E81CD7EF35DC50B33A83B05222 /* Zip.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7BCF0C09DADBEA57142D3EC8DE6FC6F /* Zip.swift */; }; - F0287DAA9FFF8F36BFB4BD3FFB802569 /* ElementAt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A0A714DF3E1DC17028152AAF63FD517 /* ElementAt.swift */; }; - F0D703399B97746A13B83F100AD68EDD /* ConcurrentDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2369E15A25D9E1A7B84A0F1AFD8BAC73 /* ConcurrentDispatchQueueScheduler.swift */; }; - F2BA961215F3BAAB2828558C3B0EB87B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A77AB527859A907CFEA989AA802C55A1 /* Foundation.framework */; }; - F5915E58183DE766781B2A8E27C837B5 /* StableCompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04EDD75E75782619655D078DBA2BEEA6 /* StableCompositeDisposable.swift */; }; - F5966F0C24DB09A63022269CF3B3E76C /* SkipWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5741FEEE2B833E88E8EAFDEF10CFBD47 /* SkipWhile.swift */; }; - F699D3AE886D892ECD878F813C3DFF3C /* StartWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AC2C7C20763F3258104E71D07E9C2EA /* StartWith.swift */; }; - F7D2D2A47F1C7C8FE6FAA8400E93392F /* Observable+StandardSequenceOperators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2148BF5665686507C31E1452CE4B6332 /* Observable+StandardSequenceOperators.swift */; }; - FAAB616D9AD02B3145B021AF708816C6 /* Sample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51130DD280789FB06293AFADD1F27A23 /* Sample.swift */; }; - FB76BB351D3C1900914538DB14F794DF /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C46C1667F342BABD91F45D9201FFEBC4 /* Result.framework */; }; - FC367C728D9149D81D4A3FEED734B323 /* RxResult-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9EE389F260A3AA874F7B3CD4FBA0BABD /* RxResult-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FC5E0A40D5D0BE8EDEABA4C081EADE40 /* Platform.Linux.swift in Sources */ = {isa = PBXBuildFile; fileRef = E584DA10C55AFE2C04E07FE1FC371547 /* Platform.Linux.swift */; }; - FD7420E7087EEDC2DF4ECDCA325FAE94 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00CCCE707EF82E08936DA793F3A9DD56 /* Filter.swift */; }; - FD8ED4442E1681575B1ECA00AAF4AB0F /* Observable+Binding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02DDB4F1CCF8CE490E63334E6F4A526E /* Observable+Binding.swift */; }; - FDE3AD5AC2A8FFE275CB5DC8D5DB42D4 /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2B96DC1BBB416C607F4FD8D5627875F /* ResultProtocol.swift */; }; - FEA3406B49FAF134FC30155D2F46E79D /* ShareReplay1WhileConnected.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1ECDFB72AD82B581902C467FC85EA8E1 /* ShareReplay1WhileConnected.swift */; }; + 002B9B0DAFEAF7E2EBC58983395070F0 /* AsSingle.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB7D58BAE0C176CF6BC69C5840944EEB /* AsSingle.swift */; }; + 0052B6E4FA4066D340C33A0298C0F142 /* Using.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4674C87AF53E342375AED13E74ABD2FA /* Using.swift */; }; + 02BD8648AF004594F6797DE38573FE39 /* First.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAFFA5C911EB6F0DCC398AF9A2B4E854 /* First.swift */; }; + 02C8056BD91A180C57962982E1860132 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0D0B4303CBD1EE0E0C087EF45494DD8D /* Result.framework */; }; + 03B91B4B0420234FEBCE861A576F74F5 /* Lock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93A7B25E000C7FA707CE35046994AEA4 /* Lock.swift */; }; + 03C5153B6777CBCEAF377A4C93489A16 /* Merge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A16C4D8071A3871E6969808A9D17EDA /* Merge.swift */; }; + 0442297C1EFEF037AFB3B5FD8A497C67 /* Amb.swift in Sources */ = {isa = PBXBuildFile; fileRef = E99DB950F0511C4A29EEB64408E9AAC0 /* Amb.swift */; }; + 061AAFEDD246C77FD55799058FCDAC0F /* SchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38669B8E5DD951A7D96381AF7E4963EF /* SchedulerType.swift */; }; + 065BFC7E5B240E4241F308F44D82ED5D /* Range.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BC67C65FFE404854087E89D3EC3E386 /* Range.swift */; }; + 076BAA36915F8F033BB8DEB838F9F709 /* ObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00803B2F173226E48B6079BF4B592824 /* ObservableType.swift */; }; + 07C83D0D40AEBE79243C6E19A01BE527 /* ScheduledItemType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42982ED3848C31EA71473D0CACD53DB8 /* ScheduledItemType.swift */; }; + 0960C990C447BF74277D2DD16011B369 /* SynchronizedUnsubscribeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95285099D4AB4602933ADEB2A9A90949 /* SynchronizedUnsubscribeType.swift */; }; + 0A5533385BB719552FCF874D92FFB569 /* SkipUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37CBB258DED4029084744E880867A352 /* SkipUntil.swift */; }; + 0D988043A991120A86C475B12186F68B /* PrimitiveSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43DE96580B59466E06579CB9DEEAA081 /* PrimitiveSequence.swift */; }; + 0DDE70ADB8709F6E25332EA9A537DB88 /* Take.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0D11A5328CC6D839FC00A3F83A78138 /* Take.swift */; }; + 0EB3BE1AD1E8FDBE98DC9F8BFFD722C6 /* Observable+Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCD9DA15B63623788687FDECEA298557 /* Observable+Result.swift */; }; + 10D5745D28CB8DF90F0F258295DF0AEA /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81ABB8C11ABA6501402AB8DD30C8B647 /* Event.swift */; }; + 1229AF4C6EB5CAF62A85C3882476FC32 /* Platform.Darwin.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1E230B87AC538DE2E6F452498D1E839 /* Platform.Darwin.swift */; }; + 12FB92CF4C984299087B7C2FEBC96467 /* Zip+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A87A2A073ACBA2818A3E73DDF0DE3CB /* Zip+Collection.swift */; }; + 13814CBFE144E047FBEA3D0619054415 /* ReplaySubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 019C97A0A6B7FAABB8C5D9DF6BA9577C /* ReplaySubject.swift */; }; + 13B3BA7D8C593A9CD5F4F5BD3CFB9BB0 /* Skip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70B3ECBA03DB2497ED1403118F57A655 /* Skip.swift */; }; + 143ADC31EC9CECEC958EB5FB4408D751 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE4ABD736D3046B0BC37B4B9875893E2 /* RxSwift.framework */; }; + 15C81FC5E74C85840A1FD17A7938673F /* DistinctUntilChanged.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7412CCC3C005878E201AA9D9FC4D56C8 /* DistinctUntilChanged.swift */; }; + 1A5FB6355CFDCFD9640FEE03756017FF /* SingleAssignmentDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72C33EA10D7486AF65D0FEAA1F313056 /* SingleAssignmentDisposable.swift */; }; + 1E17BA1223FB58356AC5524F3D123967 /* CombineLatest.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE6756B1803F59972268322F6382D525 /* CombineLatest.swift */; }; + 22DFF8AF88CDEE64C8FF3B3961DFE046 /* BehaviorSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 612A0C2B42B2489A309660F7E1A4B578 /* BehaviorSubject.swift */; }; + 2623CCF1A94A3BD22FA9F12A28B408D8 /* AnonymousDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD829265C7B3DA59108B375E1B440462 /* AnonymousDisposable.swift */; }; + 26EB971E4356F176AABCFE178B55600F /* Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E57B2D71CF6C6D2F64C002E63C56702 /* Sequence.swift */; }; + 2C9249F0C2D17F71C2CC5EA604116477 /* Materialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0979CC8895FC10B58F7E1631842739EF /* Materialize.swift */; }; + 2CB8AC02968E19B9F4913441D9B7B091 /* RxResult-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A20387FD302494D6C943CEE79717E332 /* RxResult-dummy.m */; }; + 2F7951A49CCB81EF4FD5D37423BAA697 /* LockOwnerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AD2B77EC478C217F678E4F809AC45CC /* LockOwnerType.swift */; }; + 3009C8D6DAE2771E4D4D49AC4DC18787 /* SubscriptionDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE2B9596E12C222506D49775677241DD /* SubscriptionDisposable.swift */; }; + 317B73BB3A9FF3FEB7B6EDAAFE5B40D9 /* OperationQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6606E3E3C4F1EE8A991DB7820A8A40AB /* OperationQueueScheduler.swift */; }; + 322656FEBE57801F79DCB15A40FB4048 /* Generate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D884A74D8FB3F5803B255B5FAB64464 /* Generate.swift */; }; + 323DDFF17102A05D93E894FE6259D8E6 /* RxAtomic.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E16C356ED6D15B61A0C5D35CA9AD98F /* RxAtomic.framework */; }; + 3252B25FFDC78249800EB329E61C0B5D /* AsyncLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9DF934A5200023362A211FAE7E260C2 /* AsyncLock.swift */; }; + 32A52F423E72DE7BADDE8E1629830948 /* Platform.Linux.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CFBF6B5CE902DD6F0011AE2884C4CA1 /* Platform.Linux.swift */; }; + 344191598262E1B1DA87C027AD73DCAC /* MainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76CC2DE1DC4F087006BE9BDCA3E2D6FB /* MainScheduler.swift */; }; + 35D05E4D6DAAF16670AD5C4271730512 /* PriorityQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2924DFB40DFCBCCCDE2B92B55EE19E5 /* PriorityQueue.swift */; }; + 3843044BF96532A7B6577835C7BC4DF6 /* AnyError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7123DC2F4357D851ED1D6BA9B9F9DEB2 /* AnyError.swift */; }; + 385B561B1FC68C783307BB2EDFBDAE7C /* ElementAt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FBE7B3B661D81B721E7F397D8D173DD /* ElementAt.swift */; }; + 3A092B17698A9BED08D736651D98D02E /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4B13FA2B835641D1F22607501C2CAD7 /* Filter.swift */; }; + 3B0032BFA220ACEF07FFE0E64DDD8A9F /* Result-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 933680120FA69614F5A779D5E1566E75 /* Result-dummy.m */; }; + 3CBEC2D57468CF481BEED1A2AD10516E /* AtomicInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2244A7A0354BD4D845E06298ADEF540B /* AtomicInt.swift */; }; + 3CF268A6B9CD9C42415D3944838FE0E6 /* Timeout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 881C8A46BB71E24BB610E188593A1BC0 /* Timeout.swift */; }; + 40D19C71957A9E154F9C820C2270BD45 /* RecursiveScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15366E7B3FD67CE64B4C5BE80A4FF3A4 /* RecursiveScheduler.swift */; }; + 41BC93F6FE5C62FD4BEC4435065E87ED /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6581391B0214E74D4083EDE299EF4187 /* Foundation.framework */; }; + 42CFA57913D9E49150810864E09E45F7 /* RxAtomic-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B21A3868A1CFA3F819E021171131F01 /* RxAtomic-dummy.m */; }; + 450CD097CC31F6C3A1F2D7BB07955D61 /* HistoricalScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC4D5C5643338C7A7BBBE945B73FA9CC /* HistoricalScheduler.swift */; }; + 45CF69293E85D5709A82376383003DA9 /* VirtualTimeScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F8BE3C3923660E56901AE417770CAFF /* VirtualTimeScheduler.swift */; }; + 460BB59D97F3F29A269B1A7082FCB333 /* Dematerialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = A95C3F2CFF27725D0A605CD5AC5E4CEB /* Dematerialize.swift */; }; + 49DE49188D41E229CF9028D561FF7A3B /* SynchronizedOnType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CCDE1EC41186F7B383B350597209F91 /* SynchronizedOnType.swift */; }; + 4A50295EA04F59FE6746E12492D4610D /* RxAtomic.h in Headers */ = {isa = PBXBuildFile; fileRef = 5906D0B6CA038228A41C0BFAD6A24DCF /* RxAtomic.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4DD78A63B058EA42F2CDF9D9E9D9F797 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = C858B5D0235B6FAC2D333716CA25A649 /* Result.swift */; }; + 50AEB9D245A6BB5B0F43C05C178DD470 /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD277734C6AD1B5355A77B1BB135A200 /* ResultProtocol.swift */; }; + 51F5F83142F67F2461849B406E38F5F5 /* TakeWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED7C7F2A8B851863EF0F841DB30B8719 /* TakeWhile.swift */; }; + 52FEC7FC122B2AA9E30A0860CC0917A5 /* PrimitiveSequence+Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = E760F0A5F264B1FBE3F4B44819422A9E /* PrimitiveSequence+Zip+arity.swift */; }; + 544A284D9C3EBA85316F80E699D09617 /* RecursiveLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = B291777EBD4BE8DBEE203C425827CA0E /* RecursiveLock.swift */; }; + 546A96F3D4C3BFF002717ACCF35775D0 /* Maybe.swift in Sources */ = {isa = PBXBuildFile; fileRef = E534D389CE526495C5C84B7950308A42 /* Maybe.swift */; }; + 5B049176EFD30753ECCDF8DCEF378182 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6581391B0214E74D4083EDE299EF4187 /* Foundation.framework */; }; + 5B60088D43E2346D52D2F6ACC2BC6D32 /* SubjectType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F119B202E5BD92DF44C3FE10422571AC /* SubjectType.swift */; }; + 5B65E0ED4195C6240828102C8ED08D92 /* SkipWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48C639E72D7AED0A3FA42CA1A198F9D9 /* SkipWhile.swift */; }; + 5C52783FA4DB6ADF0FB650D7E579CFA1 /* RxSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E33B859A09FF036C171B0C322371DF4C /* RxSwift-dummy.m */; }; + 5E189CEBCE99863D7AAB802F2ABCB75F /* SwitchIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97C31F41084FC37766858280C7C45EC1 /* SwitchIfEmpty.swift */; }; + 5E3A7DFEE99E013AA61DE75E3332AC1E /* SynchronizedDisposeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7BDCF16A43F70832A95EEE9E8B851F0 /* SynchronizedDisposeType.swift */; }; + 5EFCC71C031A35D8B0C1EF4E48DD76ED /* SerialDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C9F0943227D2DD623317F8689B1337E /* SerialDispatchQueueScheduler.swift */; }; + 5FFD0410433AC7C7AAE87B0C8C0326D1 /* InvocableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80BFAD48A14845CF73D5588280A1E59E /* InvocableType.swift */; }; + 60340CEE6DB8D1F8219F261A4C6AE80C /* Reactive.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26A9DEBFA59D6AF379FAA50DFE7BEC84 /* Reactive.swift */; }; + 61043041F54D55717F7A3AD448FD5867 /* RxSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 482C8C23D74CBB544127FC3B5653BD61 /* RxSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 611CEBF5F7ABBE3058A4AC5B0771FBDA /* Throttle.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8379F73654012C3964785EEEA536F23 /* Throttle.swift */; }; + 62947FEC928C8F7F0C9D0F017FB977C7 /* Queue.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA90F9DD2E20B77FC8C0A693C0583F8B /* Queue.swift */; }; + 62D63D080E682D2F87DF814C1E2A774B /* Never.swift in Sources */ = {isa = PBXBuildFile; fileRef = C767D4D244BEF78CC2D1081A23C98F8F /* Never.swift */; }; + 668C7AC1B436D19103B441C730FF20E4 /* Observable.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAA4E2F661CEAB6C2709E6ED7159E721 /* Observable.swift */; }; + 670ACA399880A4931B3102033EB46CD4 /* ObserverBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = F192565C9213F1BF68CCACD66F55FFC3 /* ObserverBase.swift */; }; + 68177C5E01A5233FE8230020F9221A53 /* BooleanDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5129E964CDEF27E074D7C5F78F981B7 /* BooleanDisposable.swift */; }; + 690C585F8226F6EEDB2E62AFBB931226 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D5F95941FF3FC80452D606C68B2918E /* Error.swift */; }; + 69DB9D444289CAA3F3749955A4C47632 /* ObservableType+PrimitiveSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67186E1ED8AB844CB21CC3731356D582 /* ObservableType+PrimitiveSequence.swift */; }; + 6AB3A6340E36EBC3E52EEE674A1A8D98 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6581391B0214E74D4083EDE299EF4187 /* Foundation.framework */; }; + 6AE562FF43A8508285D997FCBE46EBAF /* Enumerated.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDD419C1B6468C7864ACF3F968562882 /* Enumerated.swift */; }; + 6E82B10CC100DCDEEF77616C3696D7C1 /* RxAtomic.c in Sources */ = {isa = PBXBuildFile; fileRef = D21189D18C8C3D02ED294A044FCE7B4D /* RxAtomic.c */; }; + 70EF5D2B1E06F252EFE43C9B263DBCD7 /* GroupedObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37AC094506E2E5EB0B75AFED1C93FB58 /* GroupedObservable.swift */; }; + 72884B16BAA217679004A1DF99E9A215 /* Multicast.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC0433D8203F7B758F2EBA5942951575 /* Multicast.swift */; }; + 7375C2B233ACADE9E105D8C676697012 /* DefaultIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E316ADFC21B96C23125559597C7FEBD /* DefaultIfEmpty.swift */; }; + 73CC14FC385DD446E1FD49148E4AD7D3 /* RxResult-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EC81891DE9349D497444845CF823F64 /* RxResult-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 74BF3079EDF168CB185A6C8A0A7C49DE /* RxAtomic-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F4AD4C1BD3CD284D8751BAD97C0FCCD2 /* RxAtomic-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7580E216DF69DA4B747AC36BDF3EDD6B /* Zip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97E07657553CD0BE45E87BF86519EFEE /* Zip.swift */; }; + 77883163ED760770C9B0B93C8ACEF8EE /* InfiniteSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 839588E869A36C503D722A75FA1F6D1E /* InfiniteSequence.swift */; }; + 7FFF525B7C210CED0A79E3BB9FED4049 /* Completable+AndThen.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED1A12E5026F5C16EEAA4B0E6D56FBE0 /* Completable+AndThen.swift */; }; + 809A5BAE4AEEC3FE63019E53D82F2FF9 /* StartWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC2CCAE0CB636FC4EE59C55E9B004B42 /* StartWith.swift */; }; + 82FF4951B3158E12ADE51F5FA8598AB0 /* PublishSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 505B10CD82C5601D4EDA7269FF0AB586 /* PublishSubject.swift */; }; + 8552BEABDAC6FE50EDEDA2B5307A5006 /* Empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9274B22C8C215C4B5F67011C897DD02A /* Empty.swift */; }; + 88710E04FB717A181FBDDAF582A34BE4 /* Create.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7445C85F19DB685FA44D8011DA942B96 /* Create.swift */; }; + 88829B07114713529AB3189A6DC8D7C9 /* ConcurrentDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = B80D0A2AC1D95C88A780C2266EFFC70F /* ConcurrentDispatchQueueScheduler.swift */; }; + 8938B07F56FEF66A335D139F8874E624 /* Catch.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD6D1988FD68604109F8EC0ADF9FC6A5 /* Catch.swift */; }; + 8B9607993EC4A716DC777FB7B7222C3A /* AsMaybe.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA2890BB1F99CDBD9F670E01A18860F5 /* AsMaybe.swift */; }; + 8DCA89B3D3E34BD10991330E4BD368F0 /* Result-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7465A4E61B6F2615CCB33E3CB8C0DC94 /* Result-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 93149585E3AE31FCF70A4A66A506B8C5 /* Disposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FE9404B33D35922BDDCB80F93117AB2 /* Disposable.swift */; }; + 93C03DFF9AF9833EC13B6F58DF9E7F47 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6581391B0214E74D4083EDE299EF4187 /* Foundation.framework */; }; + 95CB394B7BF858F0C40BD6116C7D5B5F /* RxAtomic.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E16C356ED6D15B61A0C5D35CA9AD98F /* RxAtomic.framework */; }; + 960504296CD45B2B7DD3FB5B90673E80 /* Optional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E1F669A274C69CE25AECC6F6E15D784 /* Optional.swift */; }; + 9611DB9468A200A15D332A0165B7F1AB /* DisposeBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B07BDFAC3D5DE7E7899B9E960393CFA /* DisposeBase.swift */; }; + 97490338AF3711C6B02E41AD497BC50A /* Disposables.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF2D449D2FAABC2E6FC881660CB3B1DF /* Disposables.swift */; }; + 98D839FCBF5035A8C19B6E89D00D3476 /* TakeUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EB4DA9271CF2376290A9D891C597136 /* TakeUntil.swift */; }; + 99D18FFA2F8515E8637BD6D46442B4BE /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED347F517A27865D21F7E1F852AFEBE2 /* Timer.swift */; }; + 9A52D6C592AF30D60FE2DD187D6622E2 /* NoError.swift in Sources */ = {isa = PBXBuildFile; fileRef = F947650616D9D818479C883CC69BBAF7 /* NoError.swift */; }; + 9B11B21BE0E64517A509FF3A0336B270 /* GroupBy.swift in Sources */ = {isa = PBXBuildFile; fileRef = C30E65CA3BDD62BA5944DEDD4480D7C6 /* GroupBy.swift */; }; + 9FD618D904BEDDDA8EE7EC64071FC489 /* DelaySubscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCA1532C524F898A734D95000C0C5DEE /* DelaySubscription.swift */; }; + A0CF13F79750A237BC234C08A07654BB /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DFFD90291ABD7E1077204B1CE4FD348 /* Errors.swift */; }; + A16839FCA733C04C0DAA9EDAF5A2EFC6 /* Reduce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A4078A9FFDA2DE0903A195660EB79D5 /* Reduce.swift */; }; + A3AC4C24C7E08FAE201C5E693CEFC6D9 /* SubscribeOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = B79553020AC6198AB1EA6DB686C320FE /* SubscribeOn.swift */; }; + A617DEDC65D9AEB8846316C140490C13 /* Pods-RxResult_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C95EEDF52C3FB5AC77A9932DB17F5A96 /* Pods-RxResult_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A67D1195B41F296171F3D756F6335DD2 /* Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 527E5EF47706E706F3BB4F9E3516EED8 /* Deprecated.swift */; }; + A8115B27E4ECFE99AD38A8359596943D /* ConnectableObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EB5CA76DB145E63373725CACCA2430C /* ConnectableObservableType.swift */; }; + A8683C6144CE48959005EC5C86220C49 /* CombineLatest+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2011BA4ED888EF18F9A0A5091D875EF3 /* CombineLatest+Collection.swift */; }; + A99DBD4F7C687A0177F26DBE21D97E1E /* DispatchQueueConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DCC0FA257BF758C4FFC2693352FCD14 /* DispatchQueueConfiguration.swift */; }; + AB4FB56CFE89E49B9E7317B3AF72571C /* TailRecursiveSink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40A353A0280B78C4F68046879EF3E8F4 /* TailRecursiveSink.swift */; }; + ACABE22FD720F22A62FBAAE8576B4ABB /* ScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 062DD821CBD536FEABF99C41D22E5282 /* ScheduledItem.swift */; }; + ACBD11D9685C84250DCD1875DF022678 /* Completable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0D1626175EAD19E29C3FAF07A4F8E5C /* Completable.swift */; }; + AEEE25889332A034D1A4BD2DC07E66BB /* Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA3A09778D58BAD08C5350EA159E3159 /* Window.swift */; }; + B05B5151D2E5A297F21846DB449CA38B /* RxMutableBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76C016991D92232BCBFD63EF1655F657 /* RxMutableBox.swift */; }; + B0B24158E8321860038B8B4836910DAD /* AnyObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3FE83F53BE0301C33B2832955413610 /* AnyObserver.swift */; }; + B30F216CDCC013FED89185F65F021265 /* Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96DE0D550E91048F7BB10BCDDC3E8205 /* Rx.swift */; }; + B658888418A6CD5C0EC7A8AE5555D127 /* Just.swift in Sources */ = {isa = PBXBuildFile; fileRef = F784F3575C8CC323BF131AFD6FC01A51 /* Just.swift */; }; + B772F6BDA9C5AA78FF7B80B83ADD8027 /* ScheduledDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BB91A75FF0C7E33DA156C72A3085085 /* ScheduledDisposable.swift */; }; + B88C382D964E6EFBA54037A889498F0B /* Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9868C60D439711830942D1745CC4D34 /* Zip+arity.swift */; }; + B89CE98A884BAF109B0FA9DDC95B64CB /* Sample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 334D51571026B0FE46DB6B4E0850F78A /* Sample.swift */; }; + B8E9D1D474CD1E51502A4A07E827BBE1 /* SerialDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95A581B38B0D5C8D0E4B0914FFF1F728 /* SerialDisposable.swift */; }; + B99D564F42232760AA8C23A02BEDD25C /* Producer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F51D0CF06E95D94F2327A143E0A6B780 /* Producer.swift */; }; + BA4E0EB3CC674E862E07D9EAC013470B /* Buffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 741256C888889A6199BFD0A938A2136C /* Buffer.swift */; }; + BEBDFB2D28DBD368FC8FB64615969586 /* CompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 517E28F21ED7941E3C0EAEEB15711E5C /* CompositeDisposable.swift */; }; + C02C3A388DD43E274205635DAC67C4E3 /* ImmediateSchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE2FFE8385DA2E6E7BF1493A278EBF9E /* ImmediateSchedulerType.swift */; }; + C03E61E9C31BA9FCBF83B14D1CA25C82 /* DeprecationWarner.swift in Sources */ = {isa = PBXBuildFile; fileRef = C813C792280269EC0380B08E4A72F764 /* DeprecationWarner.swift */; }; + C19A66C56A68137010C556E21CCDF819 /* ObservableType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C4D65D936ED9F693B5E31FBED39BD64 /* ObservableType+Extensions.swift */; }; + C25B36B4767499223ED427C3DAB29043 /* Sink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31C4EF40AC8A06EF853171BEB4F953A2 /* Sink.swift */; }; + C28384E6585283609A1DEAF3070670F7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6581391B0214E74D4083EDE299EF4187 /* Foundation.framework */; }; + C2909E6E19BDA3A92F391270C0CA1039 /* Bag.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFA2DA7DA94AEDBF3687AEBC9141B1DE /* Bag.swift */; }; + C29A648D13CC178E34204BD6B94B6F4F /* Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8988CD562F405CCF2D83009D2F3E7762 /* Map.swift */; }; + C35D892AEC97BC1DA53DC7C60D2BF1C1 /* SwiftSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 723939E8C97BB831F53F5D1B7AA1DAE8 /* SwiftSupport.swift */; }; + C4280A500DFE2089C10C04502CB7C02D /* Concat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BBBD515F079A1C1D19507813E3A2A03 /* Concat.swift */; }; + C6F024125BD590C8B25E230C033CAEB9 /* Cancelable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9082FD8D5F314842072C166A5A1E50BC /* Cancelable.swift */; }; + CA1764228E349192321886A8A1A29882 /* DispatchQueue+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43B7779BC302F3CBE43EFEDB6022828C /* DispatchQueue+Extensions.swift */; }; + CDCB94BDC5BFF9666E2A6DB7C1F4B55A /* WithLatestFrom.swift in Sources */ = {isa = PBXBuildFile; fileRef = D95220577BD6FFD0DBCCABC4E4FD8585 /* WithLatestFrom.swift */; }; + CDE01EE264794098DFE23C1EA288B449 /* DisposeBag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 878AF8BE025199E1F99E389A10A32F09 /* DisposeBag.swift */; }; + D0949A431AAF483BAE808D079686EA32 /* CombineLatest+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E25377D8C1D4415C277EE2C33D729B /* CombineLatest+arity.swift */; }; + D12748E5CF2DC2C8EC77A619E928AF43 /* AsyncSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 620C9C2A150EC931B390E37F0B423EA7 /* AsyncSubject.swift */; }; + D1B5407EDFFC2D4AA1FE7D02F33B6699 /* RetryWhen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3182C1194C406B7DB4EB9E486EA75638 /* RetryWhen.swift */; }; + D2F1707E5DE96DD2BBF0BF7306EC9FE8 /* Debounce.swift in Sources */ = {isa = PBXBuildFile; fileRef = A247C28A2CFF143503E5E882E59A0642 /* Debounce.swift */; }; + D31CF38FA7B3307D4E99B9E6D282067B /* Scan.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2B853DC84F2400670AAB180B8DF6FF7 /* Scan.swift */; }; + D3D32DFDB678035768F17D880BAC4D55 /* InvocableScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A42B3F13FCB3C01316D3BB1EF8C83C5D /* InvocableScheduledItem.swift */; }; + D4C0182B2629F0857A63C1CE2AE0421D /* NopDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E57F5FCA43EA42A112F08056CD038EEA /* NopDisposable.swift */; }; + D583B5476715748949AAFBE012F49D9B /* Deferred.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48377FD29361E617C5FB778CEC812B84 /* Deferred.swift */; }; + D76923A51822D005671F3553748E0BC3 /* String+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BB74AAD104CFD70316CCD72FD8195A1 /* String+Rx.swift */; }; + D8D5235BCC99126843CAE2FF4757904C /* SchedulerServices+Emulation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C247601C59CEBD78F554D4A30EF4306C /* SchedulerServices+Emulation.swift */; }; + DAD0868A9340069211B47BC4D647A835 /* Delay.swift in Sources */ = {isa = PBXBuildFile; fileRef = B185B1799CB0E312D279CD1014866497 /* Delay.swift */; }; + DAEF3B67BC4A8DE036AD51D014B96059 /* Switch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 448FD49F5B75C7861741FE972308DBF7 /* Switch.swift */; }; + DD210886C593281DB9091FF9B730A496 /* Repeat.swift in Sources */ = {isa = PBXBuildFile; fileRef = F773ACFD895037DFA6DDC15D0D7BA433 /* Repeat.swift */; }; + DD7E735114FEBB775163DE7F5C41AF7B /* HistoricalSchedulerTimeConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F8571D9589579D9DB2A441750370AFD /* HistoricalSchedulerTimeConverter.swift */; }; + DF274CB62748178C4CAF7394D5C1E852 /* Do.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D069432D3CEDE2E4112665B2D177B05 /* Do.swift */; }; + E1DC4AFA2E963FE7209A7CD8CDDE40D9 /* Bag+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18808FF1CABB68BC035E288E5F82AA7C /* Bag+Rx.swift */; }; + E3530CC4C206D8EFED0F3F63BE087E33 /* TakeLast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BCF1340DEBFB49A6D9C87ACE3A6F6E4 /* TakeLast.swift */; }; + E5912C36FD1F275B8EF378A549486085 /* BinaryDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 055D31CE12CF6C4C1CF74BC56125057E /* BinaryDisposable.swift */; }; + E6302B831B2EBDCBD0DD12BD73B56C04 /* VirtualTimeConverterType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57CAB004648FDF4F02CC1788549A1E21 /* VirtualTimeConverterType.swift */; }; + E714BF48DB538F74A105A182A3E525CA /* ObserveOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21C967A6F86A92B8D692C6C03665911B /* ObserveOn.swift */; }; + EC9687F2007CED4EF15FF683052A74EB /* Single.swift in Sources */ = {isa = PBXBuildFile; fileRef = E267F2B80753E97AB5D27937B96AA0CE /* Single.swift */; }; + EE4CD454DEC3BA0A6522001A042FA8BA /* ShareReplayScope.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03A8D5F211E0B4EFA826DC8F8BCBD832 /* ShareReplayScope.swift */; }; + F24CF11336E2E03CA50F24843D268382 /* ObservableConvertibleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61A66D70CD967CAF7BBD13E2EF924C16 /* ObservableConvertibleType.swift */; }; + F3517A420CDE2827D2261ED6D3BD98EB /* AddRef.swift in Sources */ = {isa = PBXBuildFile; fileRef = 267B6D8AE4FF9499847C32237A2356FE /* AddRef.swift */; }; + F6A4487D9D4B0668FD0AB4A0AFF4D6C6 /* ObserverType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0D6494F39D6C1C1F688BC8D002ED954 /* ObserverType.swift */; }; + F70AE092EE0EF949F18F5F9B12ABE79A /* CurrentThreadScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 055750ABC6F38ACF83F20D8854053F22 /* CurrentThreadScheduler.swift */; }; + F7C4637543580BC0090130F813E71D3A /* ConcurrentMainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9994D021AC01FEA8B93F659579CDB42F /* ConcurrentMainScheduler.swift */; }; + F8CD8E90F6C457AE300686FA933CD23D /* AnonymousObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = F536C1B5A5C60B9E8B29E657B761F795 /* AnonymousObserver.swift */; }; + FAC7C4156E05A62766B845DCFBFFE85D /* RefCountDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFE778B0AE711C80492D88CC4C3E2BF5 /* RefCountDisposable.swift */; }; + FB500D84B424405CE24E9077CE995277 /* ToArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8350B3D49B7F81AC1BBC179F9B0D7635 /* ToArray.swift */; }; + FC7EDF0454FF17D508B09416D07BABFF /* Pods-RxResult_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 89E051761987034D173E8C9C4B8F5EFC /* Pods-RxResult_Example-dummy.m */; }; + FCF99C4FAE4D99F899B030C232D6004B /* SingleAsync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82E3D8CC9789B1D38D59F7DB7AB6EC77 /* SingleAsync.swift */; }; + FFAA3F634F75981F8614EB10EFCD2BF0 /* Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = 598EA596269E033F629C52A79B3ECE7E /* Debug.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 640764CBFC5AEDF50EDEB8E9AF759B36 /* PBXContainerItemProxy */ = { + 2B633930E9B1EF21F7BCA2CD2D29B8DE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 9E8EAB519BE57079A7CA154D82119D2C; - remoteInfo = RxResult; + remoteGlobalIDString = 2EADD5409F0441361CA3B73DFD9FE91D; + remoteInfo = RxSwift; + }; + 4ECCE610131A0F279C013483747612D0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 8E75A6C1C04A259F3C0A8DA18004A41C; + remoteInfo = RxAtomic; }; - 6AB24C17F7998362927FCC76EEF0CBCC /* PBXContainerItemProxy */ = { + 578F3A1F07A9E029011C395463983E5A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 2A9D7A592F09FF96E9DBE83DD9826AAB; + remoteGlobalIDString = 2EADD5409F0441361CA3B73DFD9FE91D; remoteInfo = RxSwift; }; - 86171A4658AE1C7EE27F41C7B5EBB88B /* PBXContainerItemProxy */ = { + 93677621185036542494747A93A14C5C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 12354131C339D0FE52F4BA654C3ECFEF; + remoteInfo = RxResult; + }; + 9496EF2BEF95A68255D931BDF60A713D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = EAB22F772776C387CE1B75FEB0A7D252; + remoteGlobalIDString = 28FF03E1697E60C736C1E5E368AF8EEC; remoteInfo = Result; }; - ABEFF94EEB0144E6BA52F6A8CE02A9BA /* PBXContainerItemProxy */ = { + B3A1A2D4A7E6A237836550CA1D68ED5D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = EAB22F772776C387CE1B75FEB0A7D252; + remoteGlobalIDString = 8E75A6C1C04A259F3C0A8DA18004A41C; + remoteInfo = RxAtomic; + }; + C4E07B5C14EF42D0A3AAA62E44B95796 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 28FF03E1697E60C736C1E5E368AF8EEC; remoteInfo = Result; }; - C8B7771957B926FBDF3C07A2FD080491 /* PBXContainerItemProxy */ = { + CD8BB9B1E75802FB6F549B43FA691739 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 2A9D7A592F09FF96E9DBE83DD9826AAB; - remoteInfo = RxSwift; + remoteGlobalIDString = 8E75A6C1C04A259F3C0A8DA18004A41C; + remoteInfo = RxAtomic; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 009B4F4B99BE5CADED089E78463A331F /* ImmediateSchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmediateSchedulerType.swift; path = RxSwift/ImmediateSchedulerType.swift; sourceTree = ""; }; - 00CCCE707EF82E08936DA793F3A9DD56 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = RxSwift/Observables/Implementations/Filter.swift; sourceTree = ""; }; - 0188B3C0993FF92B9152F772D08024ED /* TakeUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeUntil.swift; path = RxSwift/Observables/Implementations/TakeUntil.swift; sourceTree = ""; }; - 01BF5D615D977F1BF2EF5B1B89D54453 /* ObserveOnSerialDispatchQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserveOnSerialDispatchQueue.swift; path = RxSwift/Observables/Implementations/ObserveOnSerialDispatchQueue.swift; sourceTree = ""; }; - 0269F179D509C82C1DCCAFA19DB311B9 /* Delay.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Delay.swift; path = RxSwift/Observables/Implementations/Delay.swift; sourceTree = ""; }; - 028280AB9252B6D3BDFB3571454CA086 /* VirtualTimeScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeScheduler.swift; path = RxSwift/Schedulers/VirtualTimeScheduler.swift; sourceTree = ""; }; - 02DDB4F1CCF8CE490E63334E6F4A526E /* Observable+Binding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Binding.swift"; path = "RxSwift/Observables/Observable+Binding.swift"; sourceTree = ""; }; - 02F36C5811D28E5B33A6DB2EDA401D2B /* ToArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToArray.swift; path = RxSwift/Observables/Implementations/ToArray.swift; sourceTree = ""; }; - 04EDD75E75782619655D078DBA2BEEA6 /* StableCompositeDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StableCompositeDisposable.swift; path = RxSwift/Disposables/StableCompositeDisposable.swift; sourceTree = ""; }; - 09662510671391914DB9FC117A89701E /* BehaviorSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BehaviorSubject.swift; path = RxSwift/Subjects/BehaviorSubject.swift; sourceTree = ""; }; - 0AB8E0D8A74C19DBC617DA1C8BB34C88 /* SynchronizedUnsubscribeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedUnsubscribeType.swift; path = RxSwift/Concurrency/SynchronizedUnsubscribeType.swift; sourceTree = ""; }; - 0AC2C7C20763F3258104E71D07E9C2EA /* StartWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StartWith.swift; path = RxSwift/Observables/Implementations/StartWith.swift; sourceTree = ""; }; - 0B77163D1E8DECA77C7CFAC0D8C76FB4 /* Lock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Lock.swift; path = RxSwift/Concurrency/Lock.swift; sourceTree = ""; }; - 0E68357BF4756106B05AAB53C5457B75 /* SubscribeOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscribeOn.swift; path = RxSwift/Observables/Implementations/SubscribeOn.swift; sourceTree = ""; }; - 0E886A0EE61D2FBD045FE8DA56630F12 /* Timeout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeout.swift; path = RxSwift/Observables/Implementations/Timeout.swift; sourceTree = ""; }; - 13A8D9ADDEE4856CA9A6957C4E070EC9 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 13F674175694A9AE412E88653027A119 /* RxSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-prefix.pch"; sourceTree = ""; }; - 1438F80A6A1145E929FDC2209C598E22 /* AsyncLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncLock.swift; path = RxSwift/Concurrency/AsyncLock.swift; sourceTree = ""; }; - 149A5621EAEEEBDA511FCB3C8235D535 /* Result-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Result-dummy.m"; sourceTree = ""; }; - 154F0826D608B9ED74C013F144A316EB /* Disposables.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposables.swift; path = RxSwift/Disposables/Disposables.swift; sourceTree = ""; }; - 162C77CF207A3A243B08F6B61533BF45 /* ImmediateScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmediateScheduler.swift; path = RxSwift/Schedulers/ImmediateScheduler.swift; sourceTree = ""; }; - 1782F02ABE8D371FAF8B78BB8B7E1FF2 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 178F98CF2068C366C45AECC01305D207 /* RefCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RefCount.swift; path = RxSwift/Observables/Implementations/RefCount.swift; sourceTree = ""; }; - 17D0C5F47B831D2CA27D2D2701BB7FAE /* RxResult.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxResult.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 1B88F8A4B97E07A2D4F8F081BA782274 /* Result-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-prefix.pch"; sourceTree = ""; }; - 1DD185DD731DEBBEA2D0B1ABA9C849F9 /* Window.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Window.swift; path = RxSwift/Observables/Implementations/Window.swift; sourceTree = ""; }; - 1E7403B2A6F30DDE16D4EA07BB13C801 /* AnonymousInvocable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousInvocable.swift; path = RxSwift/Schedulers/Internal/AnonymousInvocable.swift; sourceTree = ""; }; - 1ECDFB72AD82B581902C467FC85EA8E1 /* ShareReplay1WhileConnected.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareReplay1WhileConnected.swift; path = RxSwift/Observables/Implementations/ShareReplay1WhileConnected.swift; sourceTree = ""; }; - 1F6FCBA69A38BF4A876BDF299B667DAF /* Disposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposable.swift; path = RxSwift/Disposable.swift; sourceTree = ""; }; - 20FB6B9398299C144DC7057F5738B946 /* Pods-RxResult-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-RxResult-dummy.m"; sourceTree = ""; }; - 2148BF5665686507C31E1452CE4B6332 /* Observable+StandardSequenceOperators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+StandardSequenceOperators.swift"; path = "RxSwift/Observables/Observable+StandardSequenceOperators.swift"; sourceTree = ""; }; - 2277A8B8A8C0853B95DE27FCE028A39A /* Merge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Merge.swift; path = RxSwift/Observables/Implementations/Merge.swift; sourceTree = ""; }; - 2369E15A25D9E1A7B84A0F1AFD8BAC73 /* ConcurrentDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentDispatchQueueScheduler.swift; path = RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift; sourceTree = ""; }; - 2651FDBAD195D84DA038CF7939BE3F24 /* Producer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Producer.swift; path = RxSwift/Observables/Implementations/Producer.swift; sourceTree = ""; }; - 2998A104A9A8BE769826A7818A61DD0F /* SynchronizedDisposeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedDisposeType.swift; path = RxSwift/Concurrency/SynchronizedDisposeType.swift; sourceTree = ""; }; - 2B21D2D781560258A552780FBB3C869A /* RxSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxSwift.xcconfig; sourceTree = ""; }; - 3083C240E5B852D082CB115C61E83EBE /* Catch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catch.swift; path = RxSwift/Observables/Implementations/Catch.swift; sourceTree = ""; }; - 33A29040C488129DB1AC189DFE8E1BB0 /* RxResult.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxResult.xcconfig; sourceTree = ""; }; - 345BFA7A3D41E500394B650D1D5861E3 /* HistoricalScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalScheduler.swift; path = RxSwift/Schedulers/HistoricalScheduler.swift; sourceTree = ""; }; - 35CCB1ACF1E54E0602A0061EB4A7F190 /* String+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Rx.swift"; path = "RxSwift/Extensions/String+Rx.swift"; sourceTree = ""; }; - 370E4B7F1A3F04DA25B72A9BC4756DA3 /* Reduce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reduce.swift; path = RxSwift/Observables/Implementations/Reduce.swift; sourceTree = ""; }; - 375429D5A20C2E6113CF7A17FD67FBB9 /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 38A456294ED042B4CED97EB00CFEE132 /* ConnectableObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectableObservable.swift; path = RxSwift/Observables/Implementations/ConnectableObservable.swift; sourceTree = ""; }; - 3EE507664AF3C982390D66BB417A47CD /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 459886E646AA2B12959FA874220D6385 /* Never.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Never.swift; path = RxSwift/Observables/Implementations/Never.swift; sourceTree = ""; }; - 45D0A85E1AA238C7FAA0E586FFDA5860 /* DispatchQueueConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DispatchQueueConfiguration.swift; path = RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift; sourceTree = ""; }; - 4788DE8D73585112154EA4A0198D7D40 /* OperationQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OperationQueueScheduler.swift; path = RxSwift/Schedulers/OperationQueueScheduler.swift; sourceTree = ""; }; - 4851007B43DA3F3CA54F37769BA493F0 /* Bag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bag.swift; path = RxSwift/DataStructures/Bag.swift; sourceTree = ""; }; - 4A25467B97F47E9CEE714FEA1D087D81 /* Throttle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Throttle.swift; path = RxSwift/Observables/Implementations/Throttle.swift; sourceTree = ""; }; - 4B2B72307C219612B0A3C83AD4F0E343 /* TakeWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeWhile.swift; path = RxSwift/Observables/Implementations/TakeWhile.swift; sourceTree = ""; }; - 4C5057E6D476892583C1E779C9E67121 /* Observable+Multiple.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Multiple.swift"; path = "RxSwift/Observables/Observable+Multiple.swift"; sourceTree = ""; }; - 505E2A9C9DCC37620D8E19CB7E9E089A /* Generate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generate.swift; path = RxSwift/Observables/Implementations/Generate.swift; sourceTree = ""; }; - 50B7A9EA71A91A50B4FA973D99859594 /* Concat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Concat.swift; path = RxSwift/Observables/Implementations/Concat.swift; sourceTree = ""; }; - 51130DD280789FB06293AFADD1F27A23 /* Sample.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sample.swift; path = RxSwift/Observables/Implementations/Sample.swift; sourceTree = ""; }; - 52748332552B25402E196114C79B5AEB /* SynchronizedSubscribeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedSubscribeType.swift; path = RxSwift/Concurrency/SynchronizedSubscribeType.swift; sourceTree = ""; }; - 53687E1EAF7A06D4BF971DB4C8F5DD77 /* Sink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sink.swift; path = RxSwift/Observables/Implementations/Sink.swift; sourceTree = ""; }; - 53916BF38207FC59058D640DAD559B1B /* Observable+Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Observable+Result.swift"; sourceTree = ""; }; - 55B968A09802805A11C73145F61A62A9 /* ObservableConvertibleType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableConvertibleType.swift; path = RxSwift/ObservableConvertibleType.swift; sourceTree = ""; }; - 56DDB42528DB4FC74859456D2348F3C4 /* DelaySubscription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DelaySubscription.swift; path = RxSwift/Observables/Implementations/DelaySubscription.swift; sourceTree = ""; }; - 5741CB60B359955715E1CCFBA526534C /* SubjectType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubjectType.swift; path = RxSwift/Subjects/SubjectType.swift; sourceTree = ""; }; - 5741FEEE2B833E88E8EAFDEF10CFBD47 /* SkipWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipWhile.swift; path = RxSwift/Observables/Implementations/SkipWhile.swift; sourceTree = ""; }; - 57B3A0A40F1FD4BAE3156834C2FB1E47 /* SchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SchedulerType.swift; path = RxSwift/SchedulerType.swift; sourceTree = ""; }; - 588C9B897CCD7C4FDF0D22395050E1D7 /* Take.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Take.swift; path = RxSwift/Observables/Implementations/Take.swift; sourceTree = ""; }; - 59F201C2F28F368A72C232E2F197A68B /* MainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MainScheduler.swift; path = RxSwift/Schedulers/MainScheduler.swift; sourceTree = ""; }; - 5A0A714DF3E1DC17028152AAF63FD517 /* ElementAt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ElementAt.swift; path = RxSwift/Observables/Implementations/ElementAt.swift; sourceTree = ""; }; - 5AC201AD067BAA36F8CAA5DEDE6342DA /* Pods-RxResult-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-RxResult-frameworks.sh"; sourceTree = ""; }; - 5D83A895879C7DBFFBA76FFE35866E8C /* SubscriptionDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscriptionDisposable.swift; path = RxSwift/Disposables/SubscriptionDisposable.swift; sourceTree = ""; }; - 5DD43CE9B3F1756F2A9EE9042CA1F3AC /* SerialDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDispatchQueueScheduler.swift; path = RxSwift/Schedulers/SerialDispatchQueueScheduler.swift; sourceTree = ""; }; - 5FB12A86730D4873DDA45F7CEF078DEB /* ScheduledItemType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItemType.swift; path = RxSwift/Schedulers/Internal/ScheduledItemType.swift; sourceTree = ""; }; - 65BB50645A6B7B133B26D748A0CDF318 /* Observable+Single.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Single.swift"; path = "RxSwift/Observables/Observable+Single.swift"; sourceTree = ""; }; - 65EBDFDCDBD0F93FD83FD03721F8DCAB /* RxResult-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxResult-dummy.m"; sourceTree = ""; }; - 67549EF423FFA0C235108F34C59C5D5C /* ObserverType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverType.swift; path = RxSwift/ObserverType.swift; sourceTree = ""; }; - 6A8948F8F926033395757CAEC52A75EE /* DisposeBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBase.swift; path = RxSwift/Disposables/DisposeBase.swift; sourceTree = ""; }; - 6ABFEF03460CF932785C6E40A130D498 /* PublishSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PublishSubject.swift; path = RxSwift/Subjects/PublishSubject.swift; sourceTree = ""; }; - 6DC1F66BEA4D84F4EB748088EB6F2497 /* ObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableType.swift; path = RxSwift/ObservableType.swift; sourceTree = ""; }; - 73424F00FBD100776D660F80B66AA6D6 /* ConnectableObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectableObservableType.swift; path = RxSwift/ConnectableObservableType.swift; sourceTree = ""; }; - 74A67B5F7E7C00AFFC7331A1E528E129 /* RetryWhen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RetryWhen.swift; path = RxSwift/Observables/Implementations/RetryWhen.swift; sourceTree = ""; }; - 7605D3E0CA2319BBC0140814FE219634 /* Amb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Amb.swift; path = RxSwift/Observables/Implementations/Amb.swift; sourceTree = ""; }; - 7653F648C5BBD3A6AB89303F00F3D2AD /* Result-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-umbrella.h"; sourceTree = ""; }; - 765E3B92A0143D283C35083C4980B393 /* PriorityQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PriorityQueue.swift; path = RxSwift/DataStructures/PriorityQueue.swift; sourceTree = ""; }; - 7684F8A63D3C1974A91F034025C065EF /* Scan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scan.swift; path = RxSwift/Observables/Implementations/Scan.swift; sourceTree = ""; }; - 788F1963A5DEF05469A80074D0001BFC /* SkipUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipUntil.swift; path = RxSwift/Observables/Implementations/SkipUntil.swift; sourceTree = ""; }; - 78F72E489B31599484C136E541C6251D /* Debunce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debunce.swift; path = RxSwift/Observables/Implementations/Debunce.swift; sourceTree = ""; }; - 7A007B873AEC13961C42D3FCB657EFA8 /* ObserverBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverBase.swift; path = RxSwift/Observers/ObserverBase.swift; sourceTree = ""; }; - 7B1554E36092DF01EAE8A424DFB92A12 /* Using.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Using.swift; path = RxSwift/Observables/Implementations/Using.swift; sourceTree = ""; }; - 7F074C2AA6DD3BCAE61E2A62848E60FB /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = RxSwift/Errors.swift; sourceTree = ""; }; - 804419D25273EEC710ABAEF0E3E46CC8 /* Deferred.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deferred.swift; path = RxSwift/Observables/Implementations/Deferred.swift; sourceTree = ""; }; - 843642B4E5DC75C8E159942EECB4E9A6 /* RxResult.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = RxResult.modulemap; sourceTree = ""; }; - 8598322163047BB1D0B53A6C16C82676 /* TakeLast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeLast.swift; path = RxSwift/Observables/Implementations/TakeLast.swift; sourceTree = ""; }; - 862FD768523C33117727B62F1A062F33 /* RefCountDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RefCountDisposable.swift; path = RxSwift/Disposables/RefCountDisposable.swift; sourceTree = ""; }; - 885AAE3027B2110CED8A1F95C7CA10EF /* ScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItem.swift; path = RxSwift/Schedulers/Internal/ScheduledItem.swift; sourceTree = ""; }; - 8B538014A11812FE58AB4064A18DACB3 /* Pods-RxResult.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RxResult.release.xcconfig"; sourceTree = ""; }; - 8B7D01B1DC2ADFC09419E02EBD81FF15 /* Zip+CollectionType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+CollectionType.swift"; path = "RxSwift/Observables/Implementations/Zip+CollectionType.swift"; sourceTree = ""; }; - 8B8A30DCEF1254A9F0D9DC9ED8548F94 /* Platform.Darwin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Darwin.swift; path = RxSwift/Platform/Platform.Darwin.swift; sourceTree = ""; }; - 9060A508AA54D1851F2E0844D06D8203 /* Cancelable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancelable.swift; path = RxSwift/Cancelable.swift; sourceTree = ""; }; - 918AEE3D096F63A69DB65B47B18AE8E2 /* Buffer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Buffer.swift; path = RxSwift/Observables/Implementations/Buffer.swift; sourceTree = ""; }; - 91E87CD15EA8103724B37C9C6156D37A /* ShareReplay1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareReplay1.swift; path = RxSwift/Observables/Implementations/ShareReplay1.swift; sourceTree = ""; }; - 92172CE43C48615DE684A744A3A0C705 /* SingleAsync.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAsync.swift; path = RxSwift/Observables/Implementations/SingleAsync.swift; sourceTree = ""; }; - 9298A84514EAF3DE7B196AE68842363C /* AnonymousObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousObservable.swift; path = RxSwift/Observables/Implementations/AnonymousObservable.swift; sourceTree = ""; }; + 00803B2F173226E48B6079BF4B592824 /* ObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableType.swift; path = RxSwift/ObservableType.swift; sourceTree = ""; }; + 019C97A0A6B7FAABB8C5D9DF6BA9577C /* ReplaySubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ReplaySubject.swift; path = RxSwift/Subjects/ReplaySubject.swift; sourceTree = ""; }; + 03A8D5F211E0B4EFA826DC8F8BCBD832 /* ShareReplayScope.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareReplayScope.swift; path = RxSwift/Observables/ShareReplayScope.swift; sourceTree = ""; }; + 055750ABC6F38ACF83F20D8854053F22 /* CurrentThreadScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CurrentThreadScheduler.swift; path = RxSwift/Schedulers/CurrentThreadScheduler.swift; sourceTree = ""; }; + 055D31CE12CF6C4C1CF74BC56125057E /* BinaryDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryDisposable.swift; path = RxSwift/Disposables/BinaryDisposable.swift; sourceTree = ""; }; + 062DD821CBD536FEABF99C41D22E5282 /* ScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItem.swift; path = RxSwift/Schedulers/Internal/ScheduledItem.swift; sourceTree = ""; }; + 091BCBEFF05F022B05226D9A511FB9D9 /* RxSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-prefix.pch"; sourceTree = ""; }; + 0979CC8895FC10B58F7E1631842739EF /* Materialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Materialize.swift; path = RxSwift/Observables/Materialize.swift; sourceTree = ""; }; + 0BBBD515F079A1C1D19507813E3A2A03 /* Concat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Concat.swift; path = RxSwift/Observables/Concat.swift; sourceTree = ""; }; + 0BC67C65FFE404854087E89D3EC3E386 /* Range.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Range.swift; path = RxSwift/Observables/Range.swift; sourceTree = ""; }; + 0D0B4303CBD1EE0E0C087EF45494DD8D /* Result.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 0E1F669A274C69CE25AECC6F6E15D784 /* Optional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Optional.swift; path = RxSwift/Observables/Optional.swift; sourceTree = ""; }; + 0FEC5F36D39E3A84C964B201659BDF0B /* Result.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 12E25377D8C1D4415C277EE2C33D729B /* CombineLatest+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+arity.swift"; path = "RxSwift/Observables/CombineLatest+arity.swift"; sourceTree = ""; }; + 134DA48EFBC50631AF289C353C63F8A3 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 15366E7B3FD67CE64B4C5BE80A4FF3A4 /* RecursiveScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveScheduler.swift; path = RxSwift/Schedulers/RecursiveScheduler.swift; sourceTree = ""; }; + 18808FF1CABB68BC035E288E5F82AA7C /* Bag+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bag+Rx.swift"; path = "RxSwift/Extensions/Bag+Rx.swift"; sourceTree = ""; }; + 1AC29AA583F9C77301468FB2C1964D68 /* Pods-RxResult_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RxResult_Example.debug.xcconfig"; sourceTree = ""; }; + 1B07BDFAC3D5DE7E7899B9E960393CFA /* DisposeBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBase.swift; path = RxSwift/Disposables/DisposeBase.swift; sourceTree = ""; }; + 1DCC0FA257BF758C4FFC2693352FCD14 /* DispatchQueueConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DispatchQueueConfiguration.swift; path = RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift; sourceTree = ""; }; + 1F6C7D867485AFB1A6DA912607A664F6 /* Result-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-prefix.pch"; sourceTree = ""; }; + 2011BA4ED888EF18F9A0A5091D875EF3 /* CombineLatest+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+Collection.swift"; path = "RxSwift/Observables/CombineLatest+Collection.swift"; sourceTree = ""; }; + 2077AF85859EF6C2950FA122BD2807DC /* Pods-RxResult_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-RxResult_Example.modulemap"; sourceTree = ""; }; + 21C967A6F86A92B8D692C6C03665911B /* ObserveOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserveOn.swift; path = RxSwift/Observables/ObserveOn.swift; sourceTree = ""; }; + 2244A7A0354BD4D845E06298ADEF540B /* AtomicInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AtomicInt.swift; path = Platform/AtomicInt.swift; sourceTree = ""; }; + 248987A98A99984D68F08511C8BEB203 /* Pods-RxResult_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RxResult_Example-acknowledgements.plist"; sourceTree = ""; }; + 267B6D8AE4FF9499847C32237A2356FE /* AddRef.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AddRef.swift; path = RxSwift/Observables/AddRef.swift; sourceTree = ""; }; + 26A9DEBFA59D6AF379FAA50DFE7BEC84 /* Reactive.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reactive.swift; path = RxSwift/Reactive.swift; sourceTree = ""; }; + 2916F75C02DA1F6CB2ED009456C505DB /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 2A16C4D8071A3871E6969808A9D17EDA /* Merge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Merge.swift; path = RxSwift/Observables/Merge.swift; sourceTree = ""; }; + 2AD2B77EC478C217F678E4F809AC45CC /* LockOwnerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LockOwnerType.swift; path = RxSwift/Concurrency/LockOwnerType.swift; sourceTree = ""; }; + 2D884A74D8FB3F5803B255B5FAB64464 /* Generate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generate.swift; path = RxSwift/Observables/Generate.swift; sourceTree = ""; }; + 2EC81891DE9349D497444845CF823F64 /* RxResult-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxResult-umbrella.h"; sourceTree = ""; }; + 2FEA7D8669C18FB743B8F45E50B39CDA /* RxAtomic.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxAtomic.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 3059598BFFD3ADF442CD414BA8231510 /* RxAtomic.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxAtomic.xcconfig; sourceTree = ""; }; + 3182C1194C406B7DB4EB9E486EA75638 /* RetryWhen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RetryWhen.swift; path = RxSwift/Observables/RetryWhen.swift; sourceTree = ""; }; + 31C4EF40AC8A06EF853171BEB4F953A2 /* Sink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sink.swift; path = RxSwift/Observables/Sink.swift; sourceTree = ""; }; + 3301D2743E5C76B977A12C97CDA10D64 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 334D51571026B0FE46DB6B4E0850F78A /* Sample.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sample.swift; path = RxSwift/Observables/Sample.swift; sourceTree = ""; }; + 377EB9DADDEA80763136C5EEBBD73532 /* RxAtomic-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxAtomic-prefix.pch"; sourceTree = ""; }; + 37AC094506E2E5EB0B75AFED1C93FB58 /* GroupedObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupedObservable.swift; path = RxSwift/GroupedObservable.swift; sourceTree = ""; }; + 37CBB258DED4029084744E880867A352 /* SkipUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipUntil.swift; path = RxSwift/Observables/SkipUntil.swift; sourceTree = ""; }; + 38669B8E5DD951A7D96381AF7E4963EF /* SchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SchedulerType.swift; path = RxSwift/SchedulerType.swift; sourceTree = ""; }; + 3BB74AAD104CFD70316CCD72FD8195A1 /* String+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Rx.swift"; path = "RxSwift/Extensions/String+Rx.swift"; sourceTree = ""; }; + 3C9F0943227D2DD623317F8689B1337E /* SerialDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDispatchQueueScheduler.swift; path = RxSwift/Schedulers/SerialDispatchQueueScheduler.swift; sourceTree = ""; }; + 3CCDE1EC41186F7B383B350597209F91 /* SynchronizedOnType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedOnType.swift; path = RxSwift/Concurrency/SynchronizedOnType.swift; sourceTree = ""; }; + 3DFFD90291ABD7E1077204B1CE4FD348 /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = RxSwift/Errors.swift; sourceTree = ""; }; + 40A353A0280B78C4F68046879EF3E8F4 /* TailRecursiveSink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TailRecursiveSink.swift; path = RxSwift/Observers/TailRecursiveSink.swift; sourceTree = ""; }; + 42982ED3848C31EA71473D0CACD53DB8 /* ScheduledItemType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItemType.swift; path = RxSwift/Schedulers/Internal/ScheduledItemType.swift; sourceTree = ""; }; + 43B7779BC302F3CBE43EFEDB6022828C /* DispatchQueue+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Extensions.swift"; path = "Platform/DispatchQueue+Extensions.swift"; sourceTree = ""; }; + 43DE96580B59466E06579CB9DEEAA081 /* PrimitiveSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PrimitiveSequence.swift; path = RxSwift/Traits/PrimitiveSequence.swift; sourceTree = ""; }; + 448FD49F5B75C7861741FE972308DBF7 /* Switch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Switch.swift; path = RxSwift/Observables/Switch.swift; sourceTree = ""; }; + 4674C87AF53E342375AED13E74ABD2FA /* Using.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Using.swift; path = RxSwift/Observables/Using.swift; sourceTree = ""; }; + 47536CCBB57625B0725031FE8EF82A52 /* RxSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxSwift.xcconfig; sourceTree = ""; }; + 482C8C23D74CBB544127FC3B5653BD61 /* RxSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-umbrella.h"; sourceTree = ""; }; + 48377FD29361E617C5FB778CEC812B84 /* Deferred.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deferred.swift; path = RxSwift/Observables/Deferred.swift; sourceTree = ""; }; + 48C639E72D7AED0A3FA42CA1A198F9D9 /* SkipWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipWhile.swift; path = RxSwift/Observables/SkipWhile.swift; sourceTree = ""; }; + 4D3AE8434B5DF31AB32E6F94EE0EE31A /* RxResult-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxResult-prefix.pch"; sourceTree = ""; }; + 4EB4DA9271CF2376290A9D891C597136 /* TakeUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeUntil.swift; path = RxSwift/Observables/TakeUntil.swift; sourceTree = ""; }; + 505B10CD82C5601D4EDA7269FF0AB586 /* PublishSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PublishSubject.swift; path = RxSwift/Subjects/PublishSubject.swift; sourceTree = ""; }; + 517E28F21ED7941E3C0EAEEB15711E5C /* CompositeDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompositeDisposable.swift; path = RxSwift/Disposables/CompositeDisposable.swift; sourceTree = ""; }; + 527E5EF47706E706F3BB4F9E3516EED8 /* Deprecated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecated.swift; path = RxSwift/Deprecated.swift; sourceTree = ""; }; + 57CAB004648FDF4F02CC1788549A1E21 /* VirtualTimeConverterType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeConverterType.swift; path = RxSwift/Schedulers/VirtualTimeConverterType.swift; sourceTree = ""; }; + 5906D0B6CA038228A41C0BFAD6A24DCF /* RxAtomic.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = RxAtomic.h; path = RxAtomic/include/RxAtomic.h; sourceTree = ""; }; + 598EA596269E033F629C52A79B3ECE7E /* Debug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debug.swift; path = RxSwift/Observables/Debug.swift; sourceTree = ""; }; + 5E16C356ED6D15B61A0C5D35CA9AD98F /* RxAtomic.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxAtomic.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 5E57B2D71CF6C6D2F64C002E63C56702 /* Sequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sequence.swift; path = RxSwift/Observables/Sequence.swift; sourceTree = ""; }; + 612A0C2B42B2489A309660F7E1A4B578 /* BehaviorSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BehaviorSubject.swift; path = RxSwift/Subjects/BehaviorSubject.swift; sourceTree = ""; }; + 61A66D70CD967CAF7BBD13E2EF924C16 /* ObservableConvertibleType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableConvertibleType.swift; path = RxSwift/ObservableConvertibleType.swift; sourceTree = ""; }; + 620C9C2A150EC931B390E37F0B423EA7 /* AsyncSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncSubject.swift; path = RxSwift/Subjects/AsyncSubject.swift; sourceTree = ""; }; + 6260D6A61C935F469F5846457CAE082E /* Pods-RxResult_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-RxResult_Example-resources.sh"; sourceTree = ""; }; + 6581391B0214E74D4083EDE299EF4187 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 6606E3E3C4F1EE8A991DB7820A8A40AB /* OperationQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OperationQueueScheduler.swift; path = RxSwift/Schedulers/OperationQueueScheduler.swift; sourceTree = ""; }; + 668BF09242589F2519AB0D0A0B2BE877 /* RxResult.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = RxResult.modulemap; sourceTree = ""; }; + 67186E1ED8AB844CB21CC3731356D582 /* ObservableType+PrimitiveSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableType+PrimitiveSequence.swift"; path = "RxSwift/Traits/ObservableType+PrimitiveSequence.swift"; sourceTree = ""; }; + 6BCF1340DEBFB49A6D9C87ACE3A6F6E4 /* TakeLast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeLast.swift; path = RxSwift/Observables/TakeLast.swift; sourceTree = ""; }; + 6FBE7B3B661D81B721E7F397D8D173DD /* ElementAt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ElementAt.swift; path = RxSwift/Observables/ElementAt.swift; sourceTree = ""; }; + 6FD8D82CACDB4A491DF8CC9E53E3A521 /* Result.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Result.modulemap; sourceTree = ""; }; + 70B3ECBA03DB2497ED1403118F57A655 /* Skip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Skip.swift; path = RxSwift/Observables/Skip.swift; sourceTree = ""; }; + 7123DC2F4357D851ED1D6BA9B9F9DEB2 /* AnyError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyError.swift; path = Result/AnyError.swift; sourceTree = ""; }; + 723939E8C97BB831F53F5D1B7AA1DAE8 /* SwiftSupport.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftSupport.swift; path = RxSwift/SwiftSupport/SwiftSupport.swift; sourceTree = ""; }; + 7241E57B437516ACA5248AC7A22C3A11 /* Pods_RxResult_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RxResult_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 72C33EA10D7486AF65D0FEAA1F313056 /* SingleAssignmentDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAssignmentDisposable.swift; path = RxSwift/Disposables/SingleAssignmentDisposable.swift; sourceTree = ""; }; + 741256C888889A6199BFD0A938A2136C /* Buffer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Buffer.swift; path = RxSwift/Observables/Buffer.swift; sourceTree = ""; }; + 7412CCC3C005878E201AA9D9FC4D56C8 /* DistinctUntilChanged.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DistinctUntilChanged.swift; path = RxSwift/Observables/DistinctUntilChanged.swift; sourceTree = ""; }; + 7445C85F19DB685FA44D8011DA942B96 /* Create.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Create.swift; path = RxSwift/Observables/Create.swift; sourceTree = ""; }; + 7465A4E61B6F2615CCB33E3CB8C0DC94 /* Result-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-umbrella.h"; sourceTree = ""; }; + 76C016991D92232BCBFD63EF1655F657 /* RxMutableBox.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxMutableBox.swift; path = RxSwift/RxMutableBox.swift; sourceTree = ""; }; + 76CC2DE1DC4F087006BE9BDCA3E2D6FB /* MainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MainScheduler.swift; path = RxSwift/Schedulers/MainScheduler.swift; sourceTree = ""; }; + 77AD7E6AF29F9FA723925BE7B23446A1 /* RxResult.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxResult.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 79C53BDDF6540F19B75C893AC5E0813B /* RxSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = RxSwift.modulemap; sourceTree = ""; }; + 7A4078A9FFDA2DE0903A195660EB79D5 /* Reduce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reduce.swift; path = RxSwift/Observables/Reduce.swift; sourceTree = ""; }; + 7C4D65D936ED9F693B5E31FBED39BD64 /* ObservableType+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableType+Extensions.swift"; path = "RxSwift/ObservableType+Extensions.swift"; sourceTree = ""; }; + 7D069432D3CEDE2E4112665B2D177B05 /* Do.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Do.swift; path = RxSwift/Observables/Do.swift; sourceTree = ""; }; + 7D5F95941FF3FC80452D606C68B2918E /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = RxSwift/Observables/Error.swift; sourceTree = ""; }; + 7E316ADFC21B96C23125559597C7FEBD /* DefaultIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DefaultIfEmpty.swift; path = RxSwift/Observables/DefaultIfEmpty.swift; sourceTree = ""; }; + 7F8571D9589579D9DB2A441750370AFD /* HistoricalSchedulerTimeConverter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalSchedulerTimeConverter.swift; path = RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift; sourceTree = ""; }; + 7F8BE3C3923660E56901AE417770CAFF /* VirtualTimeScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeScheduler.swift; path = RxSwift/Schedulers/VirtualTimeScheduler.swift; sourceTree = ""; }; + 80BFAD48A14845CF73D5588280A1E59E /* InvocableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableType.swift; path = RxSwift/Schedulers/Internal/InvocableType.swift; sourceTree = ""; }; + 81ABB8C11ABA6501402AB8DD30C8B647 /* Event.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Event.swift; path = RxSwift/Event.swift; sourceTree = ""; }; + 82E3D8CC9789B1D38D59F7DB7AB6EC77 /* SingleAsync.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAsync.swift; path = RxSwift/Observables/SingleAsync.swift; sourceTree = ""; }; + 8350B3D49B7F81AC1BBC179F9B0D7635 /* ToArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToArray.swift; path = RxSwift/Observables/ToArray.swift; sourceTree = ""; }; + 839588E869A36C503D722A75FA1F6D1E /* InfiniteSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InfiniteSequence.swift; path = Platform/DataStructures/InfiniteSequence.swift; sourceTree = ""; }; + 878AF8BE025199E1F99E389A10A32F09 /* DisposeBag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBag.swift; path = RxSwift/Disposables/DisposeBag.swift; sourceTree = ""; }; + 881C8A46BB71E24BB610E188593A1BC0 /* Timeout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeout.swift; path = RxSwift/Observables/Timeout.swift; sourceTree = ""; }; + 8988CD562F405CCF2D83009D2F3E7762 /* Map.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Map.swift; path = RxSwift/Observables/Map.swift; sourceTree = ""; }; + 89E051761987034D173E8C9C4B8F5EFC /* Pods-RxResult_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-RxResult_Example-dummy.m"; sourceTree = ""; }; + 8A3B2A49BA13692D0A7D0D15C2B5F825 /* Pods-RxResult_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RxResult_Example.release.xcconfig"; sourceTree = ""; }; + 8A87A2A073ACBA2818A3E73DDF0DE3CB /* Zip+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+Collection.swift"; path = "RxSwift/Observables/Zip+Collection.swift"; sourceTree = ""; }; + 8B21A3868A1CFA3F819E021171131F01 /* RxAtomic-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxAtomic-dummy.m"; sourceTree = ""; }; + 8BB91A75FF0C7E33DA156C72A3085085 /* ScheduledDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledDisposable.swift; path = RxSwift/Disposables/ScheduledDisposable.swift; sourceTree = ""; }; + 8CFBF6B5CE902DD6F0011AE2884C4CA1 /* Platform.Linux.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Linux.swift; path = Platform/Platform.Linux.swift; sourceTree = ""; }; + 8FE9404B33D35922BDDCB80F93117AB2 /* Disposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposable.swift; path = RxSwift/Disposable.swift; sourceTree = ""; }; + 9082FD8D5F314842072C166A5A1E50BC /* Cancelable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancelable.swift; path = RxSwift/Cancelable.swift; sourceTree = ""; }; + 9274B22C8C215C4B5F67011C897DD02A /* Empty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Empty.swift; path = RxSwift/Observables/Empty.swift; sourceTree = ""; }; + 933680120FA69614F5A779D5E1566E75 /* Result-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Result-dummy.m"; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 956578CC1E9A5931141C03361015B772 /* CombineLatest+CollectionType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+CollectionType.swift"; path = "RxSwift/Observables/Implementations/CombineLatest+CollectionType.swift"; sourceTree = ""; }; - 9BFCE68C0BDDE2038C646F4C8AF6C054 /* Timer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timer.swift; path = RxSwift/Observables/Implementations/Timer.swift; sourceTree = ""; }; - 9D1A55167BFAAF522C92462EADC029CE /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 9EA603E11B2B5E6D8734CCDECD434830 /* Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+arity.swift"; path = "RxSwift/Observables/Implementations/Zip+arity.swift"; sourceTree = ""; }; - 9EE389F260A3AA874F7B3CD4FBA0BABD /* RxResult-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxResult-umbrella.h"; sourceTree = ""; }; - A2047234706E3D10F3EDF14CF83D3869 /* InvocableScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableScheduledItem.swift; path = RxSwift/Schedulers/Internal/InvocableScheduledItem.swift; sourceTree = ""; }; - A26AC01E8DB58719362AA5AD08B684EF /* Empty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Empty.swift; path = RxSwift/Observables/Implementations/Empty.swift; sourceTree = ""; }; - A2F47BCD0CC942E353F96BDDDE6E32E8 /* Pods_RxResult.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RxResult.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A4A198BACA7979F7EDEC4AF71FCBC10E /* Pods-RxResult-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RxResult-acknowledgements.plist"; sourceTree = ""; }; - A5055710C82EF5DC53DF23BBFFC7CF63 /* HistoricalSchedulerTimeConverter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalSchedulerTimeConverter.swift; path = RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift; sourceTree = ""; }; - A5C4F046A5D51FE9BAB4AE4EC12DA09A /* ScheduledDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledDisposable.swift; path = RxSwift/Disposables/ScheduledDisposable.swift; sourceTree = ""; }; - A77AB527859A907CFEA989AA802C55A1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - A7BCF0C09DADBEA57142D3EC8DE6FC6F /* Zip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Zip.swift; path = RxSwift/Observables/Implementations/Zip.swift; sourceTree = ""; }; - A8EDC37D4EF532B15215A740EFCAA590 /* Do.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Do.swift; path = RxSwift/Observables/Implementations/Do.swift; sourceTree = ""; }; - A9BAD8C9B2B83623E8B55B8DD5610383 /* LockOwnerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LockOwnerType.swift; path = RxSwift/Concurrency/LockOwnerType.swift; sourceTree = ""; }; - AABD914DD68B12B2969BE3B86887136C /* Result.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Result.xcconfig; sourceTree = ""; }; - ABB6080E642AB5BBD25BD8037D680C10 /* Pods-RxResult.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-RxResult.modulemap"; sourceTree = ""; }; - ACA3B6C8342D042C611A40C4483CCAFA /* RxSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-umbrella.h"; sourceTree = ""; }; - B1A3C6BF1749C858819E0FF92667ED60 /* Observable+Debug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Debug.swift"; path = "RxSwift/Observables/Observable+Debug.swift"; sourceTree = ""; }; - B56532F1E2E2151258670C5600BD0437 /* Pods-RxResult-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-RxResult-acknowledgements.markdown"; sourceTree = ""; }; - B583E04E4BACC7A54C55A38DA6FACF9C /* Observable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Observable.swift; path = RxSwift/Observable.swift; sourceTree = ""; }; - B6B8BDB86BE4DA79C6F296597AF5800A /* AnonymousObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousObserver.swift; path = RxSwift/Observers/AnonymousObserver.swift; sourceTree = ""; }; - B89FC84C67FE619AF59890805695705B /* ReplaySubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ReplaySubject.swift; path = RxSwift/Subjects/ReplaySubject.swift; sourceTree = ""; }; - BCA6A87FDF342E280A3E010318F65296 /* VirtualTimeConverterType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeConverterType.swift; path = RxSwift/Schedulers/VirtualTimeConverterType.swift; sourceTree = ""; }; - BD8152F137FFAF7C0C933677FCD5BC8C /* Reactive.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reactive.swift; path = RxSwift/Reactive.swift; sourceTree = ""; }; - BE63F3BFF0EE7B9F4F664D2C43E36B56 /* WithLatestFrom.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WithLatestFrom.swift; path = RxSwift/Observables/Implementations/WithLatestFrom.swift; sourceTree = ""; }; - C1A86E622511B7E1EC2FECC89689D94F /* Queue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Queue.swift; path = RxSwift/DataStructures/Queue.swift; sourceTree = ""; }; - C2B96DC1BBB416C607F4FD8D5627875F /* ResultProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResultProtocol.swift; path = Result/ResultProtocol.swift; sourceTree = ""; }; - C46C1667F342BABD91F45D9201FFEBC4 /* Result.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - C4DCF31BD6DE9F6836933A313FAD41DC /* SerialDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDisposable.swift; path = RxSwift/Disposables/SerialDisposable.swift; sourceTree = ""; }; - C5446E36E58520C2C9EE83EDF779A182 /* Sequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sequence.swift; path = RxSwift/Observables/Implementations/Sequence.swift; sourceTree = ""; }; - C5D7132D30E5611F25F5177B81DB1CCF /* Event.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Event.swift; path = RxSwift/Event.swift; sourceTree = ""; }; - C5D8B1EB89C625313B20BAE589D9073F /* Range.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Range.swift; path = RxSwift/Observables/Implementations/Range.swift; sourceTree = ""; }; - C5FB6224194FD71E2C6C16677F6D4580 /* Observable+Concurrency.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Concurrency.swift"; path = "RxSwift/Observables/Observable+Concurrency.swift"; sourceTree = ""; }; - C98BB709EA53D6CBA528C52C891F52DA /* Observable+Creation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Creation.swift"; path = "RxSwift/Observables/Observable+Creation.swift"; sourceTree = ""; }; - C9A70452AB47D71D4D8B7248E4878AF9 /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = RxSwift/Observables/Implementations/Error.swift; sourceTree = ""; }; - CA786F81ADB9BD3D13BFF6E1BE1EFD36 /* RxSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = RxSwift.modulemap; sourceTree = ""; }; - CD62F8FFF256E59711D9FDF3322EC7BF /* SynchronizedOnType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedOnType.swift; path = RxSwift/Concurrency/SynchronizedOnType.swift; sourceTree = ""; }; - CEAC84803288AC8D5968EB723B63B2ED /* TailRecursiveSink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TailRecursiveSink.swift; path = RxSwift/Observers/TailRecursiveSink.swift; sourceTree = ""; }; - CEB1C6D702BB79EC80804C016AC6FD19 /* CompositeDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompositeDisposable.swift; path = RxSwift/Disposables/CompositeDisposable.swift; sourceTree = ""; }; - CF7568F6CBFF4A702A2A4E8E51CAC8B9 /* RxMutableBox.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxMutableBox.swift; path = RxSwift/RxMutableBox.swift; sourceTree = ""; }; - D0283246BAE545F163D0AFD877AF2BEF /* CurrentThreadScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CurrentThreadScheduler.swift; path = RxSwift/Schedulers/CurrentThreadScheduler.swift; sourceTree = ""; }; - D38C929FB013CEBF45A60225CB8D9CD4 /* InfiniteSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InfiniteSequence.swift; path = RxSwift/DataStructures/InfiniteSequence.swift; sourceTree = ""; }; - D3EC748953CF3E1F709D95C23623D4E7 /* Result.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D41AA1A1E560659288DED8E2D2EEEE98 /* DistinctUntilChanged.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DistinctUntilChanged.swift; path = RxSwift/Observables/Implementations/DistinctUntilChanged.swift; sourceTree = ""; }; - D5E67511993BCFF7E6509C1AEC7275A1 /* Multicast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multicast.swift; path = RxSwift/Observables/Implementations/Multicast.swift; sourceTree = ""; }; - D8E693116B1A30C39EB1CB90ECEDB74F /* AnonymousDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousDisposable.swift; path = RxSwift/Disposables/AnonymousDisposable.swift; sourceTree = ""; }; - DABDCC3D83E2BEA038A7EAF0C402076E /* Pods-RxResult-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-RxResult-resources.sh"; sourceTree = ""; }; - DAD84E174203DB40675DBEC9D73036E2 /* AddRef.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AddRef.swift; path = RxSwift/Observables/Implementations/AddRef.swift; sourceTree = ""; }; - DBB7EEBA27D33957A2BCE843FC556B13 /* Map.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Map.swift; path = RxSwift/Observables/Implementations/Map.swift; sourceTree = ""; }; - DCB1A87A8EB172BDB8C40AD03077DF1F /* InvocableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableType.swift; path = RxSwift/Schedulers/Internal/InvocableType.swift; sourceTree = ""; }; - E007CE5112E72655F543F6C2F94638E1 /* RxSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxSwift-dummy.m"; sourceTree = ""; }; - E226D4FA77164A07C5160BB563514095 /* NopDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NopDisposable.swift; path = RxSwift/Disposables/NopDisposable.swift; sourceTree = ""; }; - E23D3D3EC340F4759902BE5261D7257A /* ConcurrentMainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentMainScheduler.swift; path = RxSwift/Schedulers/ConcurrentMainScheduler.swift; sourceTree = ""; }; - E40D7230EE58DBBFA15F999C9D2A2538 /* Observable+Time.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Time.swift"; path = "RxSwift/Observables/Observable+Time.swift"; sourceTree = ""; }; - E584DA10C55AFE2C04E07FE1FC371547 /* Platform.Linux.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Linux.swift; path = RxSwift/Platform/Platform.Linux.swift; sourceTree = ""; }; - E6CE446E0286FCF4CAA3A13AC7BD3DEA /* Pods-RxResult.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RxResult.debug.xcconfig"; sourceTree = ""; }; - E70F2935FBE2B63CB6B2B89D16FF8360 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E72CA9F246917F67DF9F0413ADD81357 /* Switch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Switch.swift; path = RxSwift/Observables/Implementations/Switch.swift; sourceTree = ""; }; - E7BAFC3FB4F9603B10D3304BBAB03C57 /* Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rx.swift; path = RxSwift/Rx.swift; sourceTree = ""; }; - EAF5199A0A3131A9A0CB196EF9EA2DE9 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Result/Result.swift; sourceTree = ""; }; - EE2A48699502C41E6EF3DCE49E1C0611 /* DispatchQueueSchedulerQOS.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DispatchQueueSchedulerQOS.swift; path = RxSwift/Schedulers/DispatchQueueSchedulerQOS.swift; sourceTree = ""; }; - EFB992B452B93B0A565507C686C6F909 /* Observable+Aggregate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Aggregate.swift"; path = "RxSwift/Observables/Observable+Aggregate.swift"; sourceTree = ""; }; - EFDED496A850CCECCB3ACF2261FFADF8 /* ObservableType+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableType+Extensions.swift"; path = "RxSwift/ObservableType+Extensions.swift"; sourceTree = ""; }; - F331D39FC929825D3CBA4A0227280DF6 /* Result.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Result.modulemap; sourceTree = ""; }; - F3482ADFF53738F66D283AA3F2B304B7 /* Repeat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Repeat.swift; path = RxSwift/Observables/Implementations/Repeat.swift; sourceTree = ""; }; - F38511300D46BD13A7CC20BCFD9D0FFE /* CombineLatest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CombineLatest.swift; path = RxSwift/Observables/Implementations/CombineLatest.swift; sourceTree = ""; }; - F43DEE10276E93320A01DCC007019B22 /* RxResult-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxResult-prefix.pch"; sourceTree = ""; }; - F5D5177706E971AFC35FD3A3599DEC01 /* DisposeBag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBag.swift; path = RxSwift/Disposables/DisposeBag.swift; sourceTree = ""; }; - F5E854AA9B894844F06605F68457DB2C /* Pods-RxResult-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-RxResult-umbrella.h"; sourceTree = ""; }; - F613D42862255C3370C789BA2D2B71A1 /* Skip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Skip.swift; path = RxSwift/Observables/Implementations/Skip.swift; sourceTree = ""; }; - F74DFBF3B57CA3DDFC83B1D6E5271986 /* SchedulerServices+Emulation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "SchedulerServices+Emulation.swift"; path = "RxSwift/Schedulers/SchedulerServices+Emulation.swift"; sourceTree = ""; }; - F7EE88BD2F74C54AAC165960E13C8F17 /* Just.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Just.swift; path = RxSwift/Observables/Implementations/Just.swift; sourceTree = ""; }; - F82808C1E63F1BC35C96EEB23B0D4449 /* BooleanDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BooleanDisposable.swift; path = RxSwift/Disposables/BooleanDisposable.swift; sourceTree = ""; }; - F905F709E89C8A445A8E9F43603364AD /* Debug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debug.swift; path = RxSwift/Observables/Implementations/Debug.swift; sourceTree = ""; }; - F9EB4BDBAF04BE69FD2A68904B046DB1 /* CombineLatest+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+arity.swift"; path = "RxSwift/Observables/Implementations/CombineLatest+arity.swift"; sourceTree = ""; }; - F9F94300690BD76C63D7698B82B6513E /* ObserveOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserveOn.swift; path = RxSwift/Observables/Implementations/ObserveOn.swift; sourceTree = ""; }; - FCD1D71C2F0E47EB3DDF13CA68C7DCD8 /* BinaryDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryDisposable.swift; path = RxSwift/Disposables/BinaryDisposable.swift; sourceTree = ""; }; - FD7E1079B6EC3EB7C3015EB919C35086 /* RecursiveScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveScheduler.swift; path = RxSwift/Schedulers/RecursiveScheduler.swift; sourceTree = ""; }; - FE0C8D7154FE63321032D6D602FE566D /* Variable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Variable.swift; path = RxSwift/Subjects/Variable.swift; sourceTree = ""; }; - FE31381D986C6FE108F964B077607629 /* AnyObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyObserver.swift; path = RxSwift/AnyObserver.swift; sourceTree = ""; }; - FEAEEEFA2C36C9251ACFA3138152561C /* SingleAssignmentDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAssignmentDisposable.swift; path = RxSwift/Disposables/SingleAssignmentDisposable.swift; sourceTree = ""; }; + 93A7B25E000C7FA707CE35046994AEA4 /* Lock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Lock.swift; path = RxSwift/Concurrency/Lock.swift; sourceTree = ""; }; + 95285099D4AB4602933ADEB2A9A90949 /* SynchronizedUnsubscribeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedUnsubscribeType.swift; path = RxSwift/Concurrency/SynchronizedUnsubscribeType.swift; sourceTree = ""; }; + 95A581B38B0D5C8D0E4B0914FFF1F728 /* SerialDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDisposable.swift; path = RxSwift/Disposables/SerialDisposable.swift; sourceTree = ""; }; + 96DE0D550E91048F7BB10BCDDC3E8205 /* Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rx.swift; path = RxSwift/Rx.swift; sourceTree = ""; }; + 97C31F41084FC37766858280C7C45EC1 /* SwitchIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwitchIfEmpty.swift; path = RxSwift/Observables/SwitchIfEmpty.swift; sourceTree = ""; }; + 97E07657553CD0BE45E87BF86519EFEE /* Zip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Zip.swift; path = RxSwift/Observables/Zip.swift; sourceTree = ""; }; + 9994D021AC01FEA8B93F659579CDB42F /* ConcurrentMainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentMainScheduler.swift; path = RxSwift/Schedulers/ConcurrentMainScheduler.swift; sourceTree = ""; }; + 9A407CD5060DDAA6E98DB4DA63D4B7A5 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9AAE18CCC50DA37847B5CF56E90EA85D /* Result.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Result.xcconfig; sourceTree = ""; }; + 9CC7583778A0682BA0EA85DD6006EBD6 /* RxResult.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; path = RxResult.podspec; sourceTree = ""; }; + 9EB5CA76DB145E63373725CACCA2430C /* ConnectableObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectableObservableType.swift; path = RxSwift/ConnectableObservableType.swift; sourceTree = ""; }; + A1A160F5B65075AA65F59903995E5329 /* Pods-RxResult_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-RxResult_Example-frameworks.sh"; sourceTree = ""; }; + A20387FD302494D6C943CEE79717E332 /* RxResult-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxResult-dummy.m"; sourceTree = ""; }; + A247C28A2CFF143503E5E882E59A0642 /* Debounce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debounce.swift; path = RxSwift/Observables/Debounce.swift; sourceTree = ""; }; + A2924DFB40DFCBCCCDE2B92B55EE19E5 /* PriorityQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PriorityQueue.swift; path = Platform/DataStructures/PriorityQueue.swift; sourceTree = ""; }; + A42B3F13FCB3C01316D3BB1EF8C83C5D /* InvocableScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableScheduledItem.swift; path = RxSwift/Schedulers/Internal/InvocableScheduledItem.swift; sourceTree = ""; }; + A5129E964CDEF27E074D7C5F78F981B7 /* BooleanDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BooleanDisposable.swift; path = RxSwift/Disposables/BooleanDisposable.swift; sourceTree = ""; }; + A8379F73654012C3964785EEEA536F23 /* Throttle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Throttle.swift; path = RxSwift/Observables/Throttle.swift; sourceTree = ""; }; + A95C3F2CFF27725D0A605CD5AC5E4CEB /* Dematerialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Dematerialize.swift; path = RxSwift/Observables/Dematerialize.swift; sourceTree = ""; }; + AA2890BB1F99CDBD9F670E01A18860F5 /* AsMaybe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsMaybe.swift; path = RxSwift/Observables/AsMaybe.swift; sourceTree = ""; }; + AD6D1988FD68604109F8EC0ADF9FC6A5 /* Catch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catch.swift; path = RxSwift/Observables/Catch.swift; sourceTree = ""; }; + B0D11A5328CC6D839FC00A3F83A78138 /* Take.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Take.swift; path = RxSwift/Observables/Take.swift; sourceTree = ""; }; + B185B1799CB0E312D279CD1014866497 /* Delay.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Delay.swift; path = RxSwift/Observables/Delay.swift; sourceTree = ""; }; + B291777EBD4BE8DBEE203C425827CA0E /* RecursiveLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveLock.swift; path = Platform/RecursiveLock.swift; sourceTree = ""; }; + B3FE83F53BE0301C33B2832955413610 /* AnyObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyObserver.swift; path = RxSwift/AnyObserver.swift; sourceTree = ""; }; + B79553020AC6198AB1EA6DB686C320FE /* SubscribeOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscribeOn.swift; path = RxSwift/Observables/SubscribeOn.swift; sourceTree = ""; }; + B80D0A2AC1D95C88A780C2266EFFC70F /* ConcurrentDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentDispatchQueueScheduler.swift; path = RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift; sourceTree = ""; }; + BAFFA5C911EB6F0DCC398AF9A2B4E854 /* First.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = First.swift; path = RxSwift/Observables/First.swift; sourceTree = ""; }; + BD277734C6AD1B5355A77B1BB135A200 /* ResultProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResultProtocol.swift; path = Result/ResultProtocol.swift; sourceTree = ""; }; + BD779EED5DD01AC79749667BE808366C /* RxResult.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxResult.xcconfig; sourceTree = ""; }; + BDD419C1B6468C7864ACF3F968562882 /* Enumerated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Enumerated.swift; path = RxSwift/Observables/Enumerated.swift; sourceTree = ""; }; + BFA2DA7DA94AEDBF3687AEBC9141B1DE /* Bag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bag.swift; path = Platform/DataStructures/Bag.swift; sourceTree = ""; }; + C03443B6620DD6867DFCE87F62468F05 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + C0D1626175EAD19E29C3FAF07A4F8E5C /* Completable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Completable.swift; path = RxSwift/Traits/Completable.swift; sourceTree = ""; }; + C1E230B87AC538DE2E6F452498D1E839 /* Platform.Darwin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Darwin.swift; path = Platform/Platform.Darwin.swift; sourceTree = ""; }; + C2268DD2199E6F05F178FB8705144B7C /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + C247601C59CEBD78F554D4A30EF4306C /* SchedulerServices+Emulation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "SchedulerServices+Emulation.swift"; path = "RxSwift/Schedulers/SchedulerServices+Emulation.swift"; sourceTree = ""; }; + C30E65CA3BDD62BA5944DEDD4480D7C6 /* GroupBy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupBy.swift; path = RxSwift/Observables/GroupBy.swift; sourceTree = ""; }; + C406C094EF952AFA6102909BD4580931 /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C767D4D244BEF78CC2D1081A23C98F8F /* Never.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Never.swift; path = RxSwift/Observables/Never.swift; sourceTree = ""; }; + C813C792280269EC0380B08E4A72F764 /* DeprecationWarner.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DeprecationWarner.swift; path = Platform/DeprecationWarner.swift; sourceTree = ""; }; + C858B5D0235B6FAC2D333716CA25A649 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Result/Result.swift; sourceTree = ""; }; + C95EEDF52C3FB5AC77A9932DB17F5A96 /* Pods-RxResult_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-RxResult_Example-umbrella.h"; sourceTree = ""; }; + C9DF934A5200023362A211FAE7E260C2 /* AsyncLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncLock.swift; path = RxSwift/Concurrency/AsyncLock.swift; sourceTree = ""; }; + CA90F9DD2E20B77FC8C0A693C0583F8B /* Queue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Queue.swift; path = Platform/DataStructures/Queue.swift; sourceTree = ""; }; + CC0433D8203F7B758F2EBA5942951575 /* Multicast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multicast.swift; path = RxSwift/Observables/Multicast.swift; sourceTree = ""; }; + CC4D5C5643338C7A7BBBE945B73FA9CC /* HistoricalScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalScheduler.swift; path = RxSwift/Schedulers/HistoricalScheduler.swift; sourceTree = ""; }; + CD829265C7B3DA59108B375E1B440462 /* AnonymousDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousDisposable.swift; path = RxSwift/Disposables/AnonymousDisposable.swift; sourceTree = ""; }; + CE2FFE8385DA2E6E7BF1493A278EBF9E /* ImmediateSchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmediateSchedulerType.swift; path = RxSwift/ImmediateSchedulerType.swift; sourceTree = ""; }; + CE4ABD736D3046B0BC37B4B9875893E2 /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + CE6756B1803F59972268322F6382D525 /* CombineLatest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CombineLatest.swift; path = RxSwift/Observables/CombineLatest.swift; sourceTree = ""; }; + D21189D18C8C3D02ED294A044FCE7B4D /* RxAtomic.c */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.c; name = RxAtomic.c; path = RxAtomic/RxAtomic.c; sourceTree = ""; }; + D4B13FA2B835641D1F22607501C2CAD7 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = RxSwift/Observables/Filter.swift; sourceTree = ""; }; + D7BDCF16A43F70832A95EEE9E8B851F0 /* SynchronizedDisposeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedDisposeType.swift; path = RxSwift/Concurrency/SynchronizedDisposeType.swift; sourceTree = ""; }; + D95220577BD6FFD0DBCCABC4E4FD8585 /* WithLatestFrom.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WithLatestFrom.swift; path = RxSwift/Observables/WithLatestFrom.swift; sourceTree = ""; }; + D9868C60D439711830942D1745CC4D34 /* Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+arity.swift"; path = "RxSwift/Observables/Zip+arity.swift"; sourceTree = ""; }; + DA3A09778D58BAD08C5350EA159E3159 /* Window.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Window.swift; path = RxSwift/Observables/Window.swift; sourceTree = ""; }; + DC2CCAE0CB636FC4EE59C55E9B004B42 /* StartWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StartWith.swift; path = RxSwift/Observables/StartWith.swift; sourceTree = ""; }; + DCA1532C524F898A734D95000C0C5DEE /* DelaySubscription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DelaySubscription.swift; path = RxSwift/Observables/DelaySubscription.swift; sourceTree = ""; }; + DE2B9596E12C222506D49775677241DD /* SubscriptionDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscriptionDisposable.swift; path = RxSwift/Disposables/SubscriptionDisposable.swift; sourceTree = ""; }; + DF2D449D2FAABC2E6FC881660CB3B1DF /* Disposables.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposables.swift; path = RxSwift/Disposables/Disposables.swift; sourceTree = ""; }; + DFE778B0AE711C80492D88CC4C3E2BF5 /* RefCountDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RefCountDisposable.swift; path = RxSwift/Disposables/RefCountDisposable.swift; sourceTree = ""; }; + E267F2B80753E97AB5D27937B96AA0CE /* Single.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Single.swift; path = RxSwift/Traits/Single.swift; sourceTree = ""; }; + E2B853DC84F2400670AAB180B8DF6FF7 /* Scan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scan.swift; path = RxSwift/Observables/Scan.swift; sourceTree = ""; }; + E33B859A09FF036C171B0C322371DF4C /* RxSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxSwift-dummy.m"; sourceTree = ""; }; + E534D389CE526495C5C84B7950308A42 /* Maybe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Maybe.swift; path = RxSwift/Traits/Maybe.swift; sourceTree = ""; }; + E57F5FCA43EA42A112F08056CD038EEA /* NopDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NopDisposable.swift; path = RxSwift/Disposables/NopDisposable.swift; sourceTree = ""; }; + E760F0A5F264B1FBE3F4B44819422A9E /* PrimitiveSequence+Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "PrimitiveSequence+Zip+arity.swift"; path = "RxSwift/Traits/PrimitiveSequence+Zip+arity.swift"; sourceTree = ""; }; + E829770B533C1B6ECEDEAF125180B59E /* Pods-RxResult_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-RxResult_Example-acknowledgements.markdown"; sourceTree = ""; }; + E99DB950F0511C4A29EEB64408E9AAC0 /* Amb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Amb.swift; path = RxSwift/Observables/Amb.swift; sourceTree = ""; }; + EB7D58BAE0C176CF6BC69C5840944EEB /* AsSingle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsSingle.swift; path = RxSwift/Observables/AsSingle.swift; sourceTree = ""; }; + ED1A12E5026F5C16EEAA4B0E6D56FBE0 /* Completable+AndThen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Completable+AndThen.swift"; path = "RxSwift/Traits/Completable+AndThen.swift"; sourceTree = ""; }; + ED347F517A27865D21F7E1F852AFEBE2 /* Timer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timer.swift; path = RxSwift/Observables/Timer.swift; sourceTree = ""; }; + ED7C7F2A8B851863EF0F841DB30B8719 /* TakeWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeWhile.swift; path = RxSwift/Observables/TakeWhile.swift; sourceTree = ""; }; + F05C82D5C492A491F9C6327650E2D4BD /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + F0D6494F39D6C1C1F688BC8D002ED954 /* ObserverType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverType.swift; path = RxSwift/ObserverType.swift; sourceTree = ""; }; + F119B202E5BD92DF44C3FE10422571AC /* SubjectType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubjectType.swift; path = RxSwift/Subjects/SubjectType.swift; sourceTree = ""; }; + F192565C9213F1BF68CCACD66F55FFC3 /* ObserverBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverBase.swift; path = RxSwift/Observers/ObserverBase.swift; sourceTree = ""; }; + F4AD4C1BD3CD284D8751BAD97C0FCCD2 /* RxAtomic-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxAtomic-umbrella.h"; sourceTree = ""; }; + F51D0CF06E95D94F2327A143E0A6B780 /* Producer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Producer.swift; path = RxSwift/Observables/Producer.swift; sourceTree = ""; }; + F536C1B5A5C60B9E8B29E657B761F795 /* AnonymousObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousObserver.swift; path = RxSwift/Observers/AnonymousObserver.swift; sourceTree = ""; }; + F773ACFD895037DFA6DDC15D0D7BA433 /* Repeat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Repeat.swift; path = RxSwift/Observables/Repeat.swift; sourceTree = ""; }; + F784F3575C8CC323BF131AFD6FC01A51 /* Just.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Just.swift; path = RxSwift/Observables/Just.swift; sourceTree = ""; }; + F947650616D9D818479C883CC69BBAF7 /* NoError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NoError.swift; path = Result/NoError.swift; sourceTree = ""; }; + FA955E6A5CBC467CA16DD19B7B2D9C89 /* RxAtomic.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = RxAtomic.modulemap; sourceTree = ""; }; + FAA4E2F661CEAB6C2709E6ED7159E721 /* Observable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Observable.swift; path = RxSwift/Observable.swift; sourceTree = ""; }; + FCD9DA15B63623788687FDECEA298557 /* Observable+Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Result.swift"; path = "RxResult/Classes/Observable+Result.swift"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 1DD9650F2DF21F56880FDEC8317A9F44 /* Frameworks */ = { + 54E6A9964557B0E0EEB455D51266C3A8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 93C03DFF9AF9833EC13B6F58DF9E7F47 /* Foundation.framework in Frameworks */, + 02C8056BD91A180C57962982E1860132 /* Result.framework in Frameworks */, + 95CB394B7BF858F0C40BD6116C7D5B5F /* RxAtomic.framework in Frameworks */, + 143ADC31EC9CECEC958EB5FB4408D751 /* RxSwift.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A336BAD815CB7D98877DEB686F51DE0A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D568106645453D0A9856CE498CD5B6FD /* Foundation.framework in Frameworks */, - FB76BB351D3C1900914538DB14F794DF /* Result.framework in Frameworks */, - B5413827E697CA7BF8D86909CEA57E34 /* RxSwift.framework in Frameworks */, + 5B049176EFD30753ECCDF8DCEF378182 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 476E948CADB9BE8E5417EB944C60BB21 /* Frameworks */ = { + BBDBF99179D1159C2C95BB0A645D45C8 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 97E36A661402D12D5A737D3EED4FFF0A /* Foundation.framework in Frameworks */, + 41BC93F6FE5C62FD4BEC4435065E87ED /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 53FE751B2AE2B2939BB51E7912A5B286 /* Frameworks */ = { + FB53236B6DBE94BE759F6124C338493A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A6F06A2C9EC9F200595662F77755E12F /* Foundation.framework in Frameworks */, + 6AB3A6340E36EBC3E52EEE674A1A8D98 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7FB4E8B7BDA30E8AD81F78CC811DADF9 /* Frameworks */ = { + FD4DF4E3BA7FF483C4E200062A7CB079 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - F2BA961215F3BAAB2828558C3B0EB87B /* Foundation.framework in Frameworks */, + C28384E6585283609A1DEAF3070670F7 /* Foundation.framework in Frameworks */, + 323DDFF17102A05D93E894FE6259D8E6 /* RxAtomic.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 057D5E8DF1C9A6F74530261DC421BEED /* Pods-RxResult */ = { + 204168CBDED47C77973A929C323E593A /* Development Pods */ = { isa = PBXGroup; children = ( - 1782F02ABE8D371FAF8B78BB8B7E1FF2 /* Info.plist */, - ABB6080E642AB5BBD25BD8037D680C10 /* Pods-RxResult.modulemap */, - B56532F1E2E2151258670C5600BD0437 /* Pods-RxResult-acknowledgements.markdown */, - A4A198BACA7979F7EDEC4AF71FCBC10E /* Pods-RxResult-acknowledgements.plist */, - 20FB6B9398299C144DC7057F5738B946 /* Pods-RxResult-dummy.m */, - 5AC201AD067BAA36F8CAA5DEDE6342DA /* Pods-RxResult-frameworks.sh */, - DABDCC3D83E2BEA038A7EAF0C402076E /* Pods-RxResult-resources.sh */, - F5E854AA9B894844F06605F68457DB2C /* Pods-RxResult-umbrella.h */, - E6CE446E0286FCF4CAA3A13AC7BD3DEA /* Pods-RxResult.debug.xcconfig */, - 8B538014A11812FE58AB4064A18DACB3 /* Pods-RxResult.release.xcconfig */, + 840D4FFD94FB451CB436ED455A10CD02 /* RxResult */, ); - name = "Pods-RxResult"; - path = "Target Support Files/Pods-RxResult"; + name = "Development Pods"; sourceTree = ""; }; - 06FBC9BEA7A1F99F9317A9A162B6AE7B /* Support Files */ = { + 2BFA3EDF55CA85E0DFDC05EE3A97CDBE /* Products */ = { isa = PBXGroup; children = ( - 13A8D9ADDEE4856CA9A6957C4E070EC9 /* Info.plist */, - F331D39FC929825D3CBA4A0227280DF6 /* Result.modulemap */, - AABD914DD68B12B2969BE3B86887136C /* Result.xcconfig */, - 149A5621EAEEEBDA511FCB3C8235D535 /* Result-dummy.m */, - 1B88F8A4B97E07A2D4F8F081BA782274 /* Result-prefix.pch */, - 7653F648C5BBD3A6AB89303F00F3D2AD /* Result-umbrella.h */, + 7241E57B437516ACA5248AC7A22C3A11 /* Pods_RxResult_Example.framework */, + 0FEC5F36D39E3A84C964B201659BDF0B /* Result.framework */, + 2FEA7D8669C18FB743B8F45E50B39CDA /* RxAtomic.framework */, + 77AD7E6AF29F9FA723925BE7B23446A1 /* RxResult.framework */, + C406C094EF952AFA6102909BD4580931 /* RxSwift.framework */, ); - name = "Support Files"; - path = "../Target Support Files/Result"; + name = Products; sourceTree = ""; }; - 29551A360E93FEB539749C69B2A38DE5 /* Result */ = { + 3D47CB0BDC8557621B9105CEFE56F558 /* Frameworks */ = { isa = PBXGroup; children = ( - EAF5199A0A3131A9A0CB196EF9EA2DE9 /* Result.swift */, - C2B96DC1BBB416C607F4FD8D5627875F /* ResultProtocol.swift */, - 06FBC9BEA7A1F99F9317A9A162B6AE7B /* Support Files */, + 0D0B4303CBD1EE0E0C087EF45494DD8D /* Result.framework */, + 5E16C356ED6D15B61A0C5D35CA9AD98F /* RxAtomic.framework */, + CE4ABD736D3046B0BC37B4B9875893E2 /* RxSwift.framework */, + 840353258BEF2107313489207904285A /* iOS */, ); - path = Result; + name = Frameworks; sourceTree = ""; }; - 4E281E757FDC5CF5FB3EA1613DDD95F8 /* RxResult */ = { + 3FF4C30E3501354962E54071403D4581 /* Result */ = { isa = PBXGroup; children = ( - B928A894572EB3F4D2A295DAD014CF92 /* Classes */, + 7123DC2F4357D851ED1D6BA9B9F9DEB2 /* AnyError.swift */, + F947650616D9D818479C883CC69BBAF7 /* NoError.swift */, + C858B5D0235B6FAC2D333716CA25A649 /* Result.swift */, + BD277734C6AD1B5355A77B1BB135A200 /* ResultProtocol.swift */, + 797760926B4546FFA13C546B5176153B /* Support Files */, ); - path = RxResult; + path = Result; sourceTree = ""; }; - 509F384732167A5E559DFF83A2759C5C /* Support Files */ = { + 5385EACF58089276E0E78D204C1B42D6 /* Support Files */ = { isa = PBXGroup; children = ( - 9D1A55167BFAAF522C92462EADC029CE /* Info.plist */, - 843642B4E5DC75C8E159942EECB4E9A6 /* RxResult.modulemap */, - 33A29040C488129DB1AC189DFE8E1BB0 /* RxResult.xcconfig */, - 65EBDFDCDBD0F93FD83FD03721F8DCAB /* RxResult-dummy.m */, - F43DEE10276E93320A01DCC007019B22 /* RxResult-prefix.pch */, - 9EE389F260A3AA874F7B3CD4FBA0BABD /* RxResult-umbrella.h */, + 9A407CD5060DDAA6E98DB4DA63D4B7A5 /* Info.plist */, + 668BF09242589F2519AB0D0A0B2BE877 /* RxResult.modulemap */, + BD779EED5DD01AC79749667BE808366C /* RxResult.xcconfig */, + A20387FD302494D6C943CEE79717E332 /* RxResult-dummy.m */, + 4D3AE8434B5DF31AB32E6F94EE0EE31A /* RxResult-prefix.pch */, + 2EC81891DE9349D497444845CF823F64 /* RxResult-umbrella.h */, ); name = "Support Files"; path = "Example/Pods/Target Support Files/RxResult"; sourceTree = ""; }; - 7C8862118BE9ACF8E679F142AE271973 /* Products */ = { + 5B6B1E97C9AAA3973A9BCDC1DC251577 /* Pod */ = { isa = PBXGroup; children = ( - A2F47BCD0CC942E353F96BDDDE6E32E8 /* Pods_RxResult.framework */, - D3EC748953CF3E1F709D95C23623D4E7 /* Result.framework */, - 17D0C5F47B831D2CA27D2D2701BB7FAE /* RxResult.framework */, - 3EE507664AF3C982390D66BB417A47CD /* RxSwift.framework */, + C2268DD2199E6F05F178FB8705144B7C /* LICENSE */, + F05C82D5C492A491F9C6327650E2D4BD /* README.md */, + 9CC7583778A0682BA0EA85DD6006EBD6 /* RxResult.podspec */, ); - name = Products; + name = Pod; sourceTree = ""; }; - 7DB346D0F39D3F0E887471402A8071AB = { + 705CCA2FEA53139954164E3FC5C2DA07 /* Pods */ = { isa = PBXGroup; children = ( - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, - 9EC59DC7EF890C158CC68B8D8DEB299C /* Development Pods */, - F686372BB1E783BB949BBF39FE9DCA32 /* Frameworks */, - FD4FB5724DC045D5E000C1F565B136EB /* Pods */, - 7C8862118BE9ACF8E679F142AE271973 /* Products */, - C5F9268CB5EC105E5AB5668ED6C50349 /* Targets Support Files */, + 3FF4C30E3501354962E54071403D4581 /* Result */, + DAA620552944AB9DCE7DD0F1168B7FD0 /* RxAtomic */, + 79485ED5201313CBB9B332956DF34BB4 /* RxSwift */, ); + name = Pods; sourceTree = ""; }; - 8FBABDAD845D445C368D084B6003D171 /* iOS */ = { + 79485ED5201313CBB9B332956DF34BB4 /* RxSwift */ = { isa = PBXGroup; children = ( - A77AB527859A907CFEA989AA802C55A1 /* Foundation.framework */, + 267B6D8AE4FF9499847C32237A2356FE /* AddRef.swift */, + E99DB950F0511C4A29EEB64408E9AAC0 /* Amb.swift */, + CD829265C7B3DA59108B375E1B440462 /* AnonymousDisposable.swift */, + F536C1B5A5C60B9E8B29E657B761F795 /* AnonymousObserver.swift */, + B3FE83F53BE0301C33B2832955413610 /* AnyObserver.swift */, + AA2890BB1F99CDBD9F670E01A18860F5 /* AsMaybe.swift */, + EB7D58BAE0C176CF6BC69C5840944EEB /* AsSingle.swift */, + C9DF934A5200023362A211FAE7E260C2 /* AsyncLock.swift */, + 620C9C2A150EC931B390E37F0B423EA7 /* AsyncSubject.swift */, + 2244A7A0354BD4D845E06298ADEF540B /* AtomicInt.swift */, + BFA2DA7DA94AEDBF3687AEBC9141B1DE /* Bag.swift */, + 18808FF1CABB68BC035E288E5F82AA7C /* Bag+Rx.swift */, + 612A0C2B42B2489A309660F7E1A4B578 /* BehaviorSubject.swift */, + 055D31CE12CF6C4C1CF74BC56125057E /* BinaryDisposable.swift */, + A5129E964CDEF27E074D7C5F78F981B7 /* BooleanDisposable.swift */, + 741256C888889A6199BFD0A938A2136C /* Buffer.swift */, + 9082FD8D5F314842072C166A5A1E50BC /* Cancelable.swift */, + AD6D1988FD68604109F8EC0ADF9FC6A5 /* Catch.swift */, + CE6756B1803F59972268322F6382D525 /* CombineLatest.swift */, + 12E25377D8C1D4415C277EE2C33D729B /* CombineLatest+arity.swift */, + 2011BA4ED888EF18F9A0A5091D875EF3 /* CombineLatest+Collection.swift */, + C0D1626175EAD19E29C3FAF07A4F8E5C /* Completable.swift */, + ED1A12E5026F5C16EEAA4B0E6D56FBE0 /* Completable+AndThen.swift */, + 517E28F21ED7941E3C0EAEEB15711E5C /* CompositeDisposable.swift */, + 0BBBD515F079A1C1D19507813E3A2A03 /* Concat.swift */, + B80D0A2AC1D95C88A780C2266EFFC70F /* ConcurrentDispatchQueueScheduler.swift */, + 9994D021AC01FEA8B93F659579CDB42F /* ConcurrentMainScheduler.swift */, + 9EB5CA76DB145E63373725CACCA2430C /* ConnectableObservableType.swift */, + 7445C85F19DB685FA44D8011DA942B96 /* Create.swift */, + 055750ABC6F38ACF83F20D8854053F22 /* CurrentThreadScheduler.swift */, + A247C28A2CFF143503E5E882E59A0642 /* Debounce.swift */, + 598EA596269E033F629C52A79B3ECE7E /* Debug.swift */, + 7E316ADFC21B96C23125559597C7FEBD /* DefaultIfEmpty.swift */, + 48377FD29361E617C5FB778CEC812B84 /* Deferred.swift */, + B185B1799CB0E312D279CD1014866497 /* Delay.swift */, + DCA1532C524F898A734D95000C0C5DEE /* DelaySubscription.swift */, + A95C3F2CFF27725D0A605CD5AC5E4CEB /* Dematerialize.swift */, + 527E5EF47706E706F3BB4F9E3516EED8 /* Deprecated.swift */, + C813C792280269EC0380B08E4A72F764 /* DeprecationWarner.swift */, + 43B7779BC302F3CBE43EFEDB6022828C /* DispatchQueue+Extensions.swift */, + 1DCC0FA257BF758C4FFC2693352FCD14 /* DispatchQueueConfiguration.swift */, + 8FE9404B33D35922BDDCB80F93117AB2 /* Disposable.swift */, + DF2D449D2FAABC2E6FC881660CB3B1DF /* Disposables.swift */, + 878AF8BE025199E1F99E389A10A32F09 /* DisposeBag.swift */, + 1B07BDFAC3D5DE7E7899B9E960393CFA /* DisposeBase.swift */, + 7412CCC3C005878E201AA9D9FC4D56C8 /* DistinctUntilChanged.swift */, + 7D069432D3CEDE2E4112665B2D177B05 /* Do.swift */, + 6FBE7B3B661D81B721E7F397D8D173DD /* ElementAt.swift */, + 9274B22C8C215C4B5F67011C897DD02A /* Empty.swift */, + BDD419C1B6468C7864ACF3F968562882 /* Enumerated.swift */, + 7D5F95941FF3FC80452D606C68B2918E /* Error.swift */, + 3DFFD90291ABD7E1077204B1CE4FD348 /* Errors.swift */, + 81ABB8C11ABA6501402AB8DD30C8B647 /* Event.swift */, + D4B13FA2B835641D1F22607501C2CAD7 /* Filter.swift */, + BAFFA5C911EB6F0DCC398AF9A2B4E854 /* First.swift */, + 2D884A74D8FB3F5803B255B5FAB64464 /* Generate.swift */, + C30E65CA3BDD62BA5944DEDD4480D7C6 /* GroupBy.swift */, + 37AC094506E2E5EB0B75AFED1C93FB58 /* GroupedObservable.swift */, + CC4D5C5643338C7A7BBBE945B73FA9CC /* HistoricalScheduler.swift */, + 7F8571D9589579D9DB2A441750370AFD /* HistoricalSchedulerTimeConverter.swift */, + CE2FFE8385DA2E6E7BF1493A278EBF9E /* ImmediateSchedulerType.swift */, + 839588E869A36C503D722A75FA1F6D1E /* InfiniteSequence.swift */, + A42B3F13FCB3C01316D3BB1EF8C83C5D /* InvocableScheduledItem.swift */, + 80BFAD48A14845CF73D5588280A1E59E /* InvocableType.swift */, + F784F3575C8CC323BF131AFD6FC01A51 /* Just.swift */, + 93A7B25E000C7FA707CE35046994AEA4 /* Lock.swift */, + 2AD2B77EC478C217F678E4F809AC45CC /* LockOwnerType.swift */, + 76CC2DE1DC4F087006BE9BDCA3E2D6FB /* MainScheduler.swift */, + 8988CD562F405CCF2D83009D2F3E7762 /* Map.swift */, + 0979CC8895FC10B58F7E1631842739EF /* Materialize.swift */, + E534D389CE526495C5C84B7950308A42 /* Maybe.swift */, + 2A16C4D8071A3871E6969808A9D17EDA /* Merge.swift */, + CC0433D8203F7B758F2EBA5942951575 /* Multicast.swift */, + C767D4D244BEF78CC2D1081A23C98F8F /* Never.swift */, + E57F5FCA43EA42A112F08056CD038EEA /* NopDisposable.swift */, + FAA4E2F661CEAB6C2709E6ED7159E721 /* Observable.swift */, + 61A66D70CD967CAF7BBD13E2EF924C16 /* ObservableConvertibleType.swift */, + 00803B2F173226E48B6079BF4B592824 /* ObservableType.swift */, + 7C4D65D936ED9F693B5E31FBED39BD64 /* ObservableType+Extensions.swift */, + 67186E1ED8AB844CB21CC3731356D582 /* ObservableType+PrimitiveSequence.swift */, + 21C967A6F86A92B8D692C6C03665911B /* ObserveOn.swift */, + F192565C9213F1BF68CCACD66F55FFC3 /* ObserverBase.swift */, + F0D6494F39D6C1C1F688BC8D002ED954 /* ObserverType.swift */, + 6606E3E3C4F1EE8A991DB7820A8A40AB /* OperationQueueScheduler.swift */, + 0E1F669A274C69CE25AECC6F6E15D784 /* Optional.swift */, + C1E230B87AC538DE2E6F452498D1E839 /* Platform.Darwin.swift */, + 8CFBF6B5CE902DD6F0011AE2884C4CA1 /* Platform.Linux.swift */, + 43DE96580B59466E06579CB9DEEAA081 /* PrimitiveSequence.swift */, + E760F0A5F264B1FBE3F4B44819422A9E /* PrimitiveSequence+Zip+arity.swift */, + A2924DFB40DFCBCCCDE2B92B55EE19E5 /* PriorityQueue.swift */, + F51D0CF06E95D94F2327A143E0A6B780 /* Producer.swift */, + 505B10CD82C5601D4EDA7269FF0AB586 /* PublishSubject.swift */, + CA90F9DD2E20B77FC8C0A693C0583F8B /* Queue.swift */, + 0BC67C65FFE404854087E89D3EC3E386 /* Range.swift */, + 26A9DEBFA59D6AF379FAA50DFE7BEC84 /* Reactive.swift */, + B291777EBD4BE8DBEE203C425827CA0E /* RecursiveLock.swift */, + 15366E7B3FD67CE64B4C5BE80A4FF3A4 /* RecursiveScheduler.swift */, + 7A4078A9FFDA2DE0903A195660EB79D5 /* Reduce.swift */, + DFE778B0AE711C80492D88CC4C3E2BF5 /* RefCountDisposable.swift */, + F773ACFD895037DFA6DDC15D0D7BA433 /* Repeat.swift */, + 019C97A0A6B7FAABB8C5D9DF6BA9577C /* ReplaySubject.swift */, + 3182C1194C406B7DB4EB9E486EA75638 /* RetryWhen.swift */, + 96DE0D550E91048F7BB10BCDDC3E8205 /* Rx.swift */, + 76C016991D92232BCBFD63EF1655F657 /* RxMutableBox.swift */, + 334D51571026B0FE46DB6B4E0850F78A /* Sample.swift */, + E2B853DC84F2400670AAB180B8DF6FF7 /* Scan.swift */, + 8BB91A75FF0C7E33DA156C72A3085085 /* ScheduledDisposable.swift */, + 062DD821CBD536FEABF99C41D22E5282 /* ScheduledItem.swift */, + 42982ED3848C31EA71473D0CACD53DB8 /* ScheduledItemType.swift */, + C247601C59CEBD78F554D4A30EF4306C /* SchedulerServices+Emulation.swift */, + 38669B8E5DD951A7D96381AF7E4963EF /* SchedulerType.swift */, + 5E57B2D71CF6C6D2F64C002E63C56702 /* Sequence.swift */, + 3C9F0943227D2DD623317F8689B1337E /* SerialDispatchQueueScheduler.swift */, + 95A581B38B0D5C8D0E4B0914FFF1F728 /* SerialDisposable.swift */, + 03A8D5F211E0B4EFA826DC8F8BCBD832 /* ShareReplayScope.swift */, + E267F2B80753E97AB5D27937B96AA0CE /* Single.swift */, + 72C33EA10D7486AF65D0FEAA1F313056 /* SingleAssignmentDisposable.swift */, + 82E3D8CC9789B1D38D59F7DB7AB6EC77 /* SingleAsync.swift */, + 31C4EF40AC8A06EF853171BEB4F953A2 /* Sink.swift */, + 70B3ECBA03DB2497ED1403118F57A655 /* Skip.swift */, + 37CBB258DED4029084744E880867A352 /* SkipUntil.swift */, + 48C639E72D7AED0A3FA42CA1A198F9D9 /* SkipWhile.swift */, + DC2CCAE0CB636FC4EE59C55E9B004B42 /* StartWith.swift */, + 3BB74AAD104CFD70316CCD72FD8195A1 /* String+Rx.swift */, + F119B202E5BD92DF44C3FE10422571AC /* SubjectType.swift */, + B79553020AC6198AB1EA6DB686C320FE /* SubscribeOn.swift */, + DE2B9596E12C222506D49775677241DD /* SubscriptionDisposable.swift */, + 723939E8C97BB831F53F5D1B7AA1DAE8 /* SwiftSupport.swift */, + 448FD49F5B75C7861741FE972308DBF7 /* Switch.swift */, + 97C31F41084FC37766858280C7C45EC1 /* SwitchIfEmpty.swift */, + D7BDCF16A43F70832A95EEE9E8B851F0 /* SynchronizedDisposeType.swift */, + 3CCDE1EC41186F7B383B350597209F91 /* SynchronizedOnType.swift */, + 95285099D4AB4602933ADEB2A9A90949 /* SynchronizedUnsubscribeType.swift */, + 40A353A0280B78C4F68046879EF3E8F4 /* TailRecursiveSink.swift */, + B0D11A5328CC6D839FC00A3F83A78138 /* Take.swift */, + 6BCF1340DEBFB49A6D9C87ACE3A6F6E4 /* TakeLast.swift */, + 4EB4DA9271CF2376290A9D891C597136 /* TakeUntil.swift */, + ED7C7F2A8B851863EF0F841DB30B8719 /* TakeWhile.swift */, + A8379F73654012C3964785EEEA536F23 /* Throttle.swift */, + 881C8A46BB71E24BB610E188593A1BC0 /* Timeout.swift */, + ED347F517A27865D21F7E1F852AFEBE2 /* Timer.swift */, + 8350B3D49B7F81AC1BBC179F9B0D7635 /* ToArray.swift */, + 4674C87AF53E342375AED13E74ABD2FA /* Using.swift */, + 57CAB004648FDF4F02CC1788549A1E21 /* VirtualTimeConverterType.swift */, + 7F8BE3C3923660E56901AE417770CAFF /* VirtualTimeScheduler.swift */, + DA3A09778D58BAD08C5350EA159E3159 /* Window.swift */, + D95220577BD6FFD0DBCCABC4E4FD8585 /* WithLatestFrom.swift */, + 97E07657553CD0BE45E87BF86519EFEE /* Zip.swift */, + D9868C60D439711830942D1745CC4D34 /* Zip+arity.swift */, + 8A87A2A073ACBA2818A3E73DDF0DE3CB /* Zip+Collection.swift */, + 8A70FA40778D1825EE2052C2AD36A89A /* Support Files */, ); - name = iOS; + path = RxSwift; sourceTree = ""; }; - 9EC59DC7EF890C158CC68B8D8DEB299C /* Development Pods */ = { + 797760926B4546FFA13C546B5176153B /* Support Files */ = { isa = PBXGroup; children = ( - DE5EECF6FA79033C9109E1CD1BCD9E12 /* RxResult */, + 3301D2743E5C76B977A12C97CDA10D64 /* Info.plist */, + 6FD8D82CACDB4A491DF8CC9E53E3A521 /* Result.modulemap */, + 9AAE18CCC50DA37847B5CF56E90EA85D /* Result.xcconfig */, + 933680120FA69614F5A779D5E1566E75 /* Result-dummy.m */, + 1F6C7D867485AFB1A6DA912607A664F6 /* Result-prefix.pch */, + 7465A4E61B6F2615CCB33E3CB8C0DC94 /* Result-umbrella.h */, ); - name = "Development Pods"; + name = "Support Files"; + path = "../Target Support Files/Result"; sourceTree = ""; }; - B928A894572EB3F4D2A295DAD014CF92 /* Classes */ = { + 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( - 53916BF38207FC59058D640DAD559B1B /* Observable+Result.swift */, + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, + 204168CBDED47C77973A929C323E593A /* Development Pods */, + 3D47CB0BDC8557621B9105CEFE56F558 /* Frameworks */, + 705CCA2FEA53139954164E3FC5C2DA07 /* Pods */, + 2BFA3EDF55CA85E0DFDC05EE3A97CDBE /* Products */, + A520D6D033BFE341388DA151682F69BA /* Targets Support Files */, ); - path = Classes; sourceTree = ""; }; - C2CD66D89A004BF41F717AC84E71EEFD /* RxSwift */ = { + 840353258BEF2107313489207904285A /* iOS */ = { isa = PBXGroup; children = ( - DAD84E174203DB40675DBEC9D73036E2 /* AddRef.swift */, - 7605D3E0CA2319BBC0140814FE219634 /* Amb.swift */, - D8E693116B1A30C39EB1CB90ECEDB74F /* AnonymousDisposable.swift */, - 1E7403B2A6F30DDE16D4EA07BB13C801 /* AnonymousInvocable.swift */, - 9298A84514EAF3DE7B196AE68842363C /* AnonymousObservable.swift */, - B6B8BDB86BE4DA79C6F296597AF5800A /* AnonymousObserver.swift */, - FE31381D986C6FE108F964B077607629 /* AnyObserver.swift */, - 1438F80A6A1145E929FDC2209C598E22 /* AsyncLock.swift */, - 4851007B43DA3F3CA54F37769BA493F0 /* Bag.swift */, - 09662510671391914DB9FC117A89701E /* BehaviorSubject.swift */, - FCD1D71C2F0E47EB3DDF13CA68C7DCD8 /* BinaryDisposable.swift */, - F82808C1E63F1BC35C96EEB23B0D4449 /* BooleanDisposable.swift */, - 918AEE3D096F63A69DB65B47B18AE8E2 /* Buffer.swift */, - 9060A508AA54D1851F2E0844D06D8203 /* Cancelable.swift */, - 3083C240E5B852D082CB115C61E83EBE /* Catch.swift */, - F38511300D46BD13A7CC20BCFD9D0FFE /* CombineLatest.swift */, - F9EB4BDBAF04BE69FD2A68904B046DB1 /* CombineLatest+arity.swift */, - 956578CC1E9A5931141C03361015B772 /* CombineLatest+CollectionType.swift */, - CEB1C6D702BB79EC80804C016AC6FD19 /* CompositeDisposable.swift */, - 50B7A9EA71A91A50B4FA973D99859594 /* Concat.swift */, - 2369E15A25D9E1A7B84A0F1AFD8BAC73 /* ConcurrentDispatchQueueScheduler.swift */, - E23D3D3EC340F4759902BE5261D7257A /* ConcurrentMainScheduler.swift */, - 38A456294ED042B4CED97EB00CFEE132 /* ConnectableObservable.swift */, - 73424F00FBD100776D660F80B66AA6D6 /* ConnectableObservableType.swift */, - D0283246BAE545F163D0AFD877AF2BEF /* CurrentThreadScheduler.swift */, - F905F709E89C8A445A8E9F43603364AD /* Debug.swift */, - 78F72E489B31599484C136E541C6251D /* Debunce.swift */, - 804419D25273EEC710ABAEF0E3E46CC8 /* Deferred.swift */, - 0269F179D509C82C1DCCAFA19DB311B9 /* Delay.swift */, - 56DDB42528DB4FC74859456D2348F3C4 /* DelaySubscription.swift */, - 45D0A85E1AA238C7FAA0E586FFDA5860 /* DispatchQueueConfiguration.swift */, - EE2A48699502C41E6EF3DCE49E1C0611 /* DispatchQueueSchedulerQOS.swift */, - 1F6FCBA69A38BF4A876BDF299B667DAF /* Disposable.swift */, - 154F0826D608B9ED74C013F144A316EB /* Disposables.swift */, - F5D5177706E971AFC35FD3A3599DEC01 /* DisposeBag.swift */, - 6A8948F8F926033395757CAEC52A75EE /* DisposeBase.swift */, - D41AA1A1E560659288DED8E2D2EEEE98 /* DistinctUntilChanged.swift */, - A8EDC37D4EF532B15215A740EFCAA590 /* Do.swift */, - 5A0A714DF3E1DC17028152AAF63FD517 /* ElementAt.swift */, - A26AC01E8DB58719362AA5AD08B684EF /* Empty.swift */, - C9A70452AB47D71D4D8B7248E4878AF9 /* Error.swift */, - 7F074C2AA6DD3BCAE61E2A62848E60FB /* Errors.swift */, - C5D7132D30E5611F25F5177B81DB1CCF /* Event.swift */, - 00CCCE707EF82E08936DA793F3A9DD56 /* Filter.swift */, - 505E2A9C9DCC37620D8E19CB7E9E089A /* Generate.swift */, - 345BFA7A3D41E500394B650D1D5861E3 /* HistoricalScheduler.swift */, - A5055710C82EF5DC53DF23BBFFC7CF63 /* HistoricalSchedulerTimeConverter.swift */, - 162C77CF207A3A243B08F6B61533BF45 /* ImmediateScheduler.swift */, - 009B4F4B99BE5CADED089E78463A331F /* ImmediateSchedulerType.swift */, - D38C929FB013CEBF45A60225CB8D9CD4 /* InfiniteSequence.swift */, - A2047234706E3D10F3EDF14CF83D3869 /* InvocableScheduledItem.swift */, - DCB1A87A8EB172BDB8C40AD03077DF1F /* InvocableType.swift */, - F7EE88BD2F74C54AAC165960E13C8F17 /* Just.swift */, - 0B77163D1E8DECA77C7CFAC0D8C76FB4 /* Lock.swift */, - A9BAD8C9B2B83623E8B55B8DD5610383 /* LockOwnerType.swift */, - 59F201C2F28F368A72C232E2F197A68B /* MainScheduler.swift */, - DBB7EEBA27D33957A2BCE843FC556B13 /* Map.swift */, - 2277A8B8A8C0853B95DE27FCE028A39A /* Merge.swift */, - D5E67511993BCFF7E6509C1AEC7275A1 /* Multicast.swift */, - 459886E646AA2B12959FA874220D6385 /* Never.swift */, - E226D4FA77164A07C5160BB563514095 /* NopDisposable.swift */, - B583E04E4BACC7A54C55A38DA6FACF9C /* Observable.swift */, - EFB992B452B93B0A565507C686C6F909 /* Observable+Aggregate.swift */, - 02DDB4F1CCF8CE490E63334E6F4A526E /* Observable+Binding.swift */, - C5FB6224194FD71E2C6C16677F6D4580 /* Observable+Concurrency.swift */, - C98BB709EA53D6CBA528C52C891F52DA /* Observable+Creation.swift */, - B1A3C6BF1749C858819E0FF92667ED60 /* Observable+Debug.swift */, - 4C5057E6D476892583C1E779C9E67121 /* Observable+Multiple.swift */, - 65BB50645A6B7B133B26D748A0CDF318 /* Observable+Single.swift */, - 2148BF5665686507C31E1452CE4B6332 /* Observable+StandardSequenceOperators.swift */, - E40D7230EE58DBBFA15F999C9D2A2538 /* Observable+Time.swift */, - 55B968A09802805A11C73145F61A62A9 /* ObservableConvertibleType.swift */, - 6DC1F66BEA4D84F4EB748088EB6F2497 /* ObservableType.swift */, - EFDED496A850CCECCB3ACF2261FFADF8 /* ObservableType+Extensions.swift */, - F9F94300690BD76C63D7698B82B6513E /* ObserveOn.swift */, - 01BF5D615D977F1BF2EF5B1B89D54453 /* ObserveOnSerialDispatchQueue.swift */, - 7A007B873AEC13961C42D3FCB657EFA8 /* ObserverBase.swift */, - 67549EF423FFA0C235108F34C59C5D5C /* ObserverType.swift */, - 4788DE8D73585112154EA4A0198D7D40 /* OperationQueueScheduler.swift */, - 8B8A30DCEF1254A9F0D9DC9ED8548F94 /* Platform.Darwin.swift */, - E584DA10C55AFE2C04E07FE1FC371547 /* Platform.Linux.swift */, - 765E3B92A0143D283C35083C4980B393 /* PriorityQueue.swift */, - 2651FDBAD195D84DA038CF7939BE3F24 /* Producer.swift */, - 6ABFEF03460CF932785C6E40A130D498 /* PublishSubject.swift */, - C1A86E622511B7E1EC2FECC89689D94F /* Queue.swift */, - C5D8B1EB89C625313B20BAE589D9073F /* Range.swift */, - BD8152F137FFAF7C0C933677FCD5BC8C /* Reactive.swift */, - FD7E1079B6EC3EB7C3015EB919C35086 /* RecursiveScheduler.swift */, - 370E4B7F1A3F04DA25B72A9BC4756DA3 /* Reduce.swift */, - 178F98CF2068C366C45AECC01305D207 /* RefCount.swift */, - 862FD768523C33117727B62F1A062F33 /* RefCountDisposable.swift */, - F3482ADFF53738F66D283AA3F2B304B7 /* Repeat.swift */, - B89FC84C67FE619AF59890805695705B /* ReplaySubject.swift */, - 74A67B5F7E7C00AFFC7331A1E528E129 /* RetryWhen.swift */, - E7BAFC3FB4F9603B10D3304BBAB03C57 /* Rx.swift */, - CF7568F6CBFF4A702A2A4E8E51CAC8B9 /* RxMutableBox.swift */, - 51130DD280789FB06293AFADD1F27A23 /* Sample.swift */, - 7684F8A63D3C1974A91F034025C065EF /* Scan.swift */, - A5C4F046A5D51FE9BAB4AE4EC12DA09A /* ScheduledDisposable.swift */, - 885AAE3027B2110CED8A1F95C7CA10EF /* ScheduledItem.swift */, - 5FB12A86730D4873DDA45F7CEF078DEB /* ScheduledItemType.swift */, - F74DFBF3B57CA3DDFC83B1D6E5271986 /* SchedulerServices+Emulation.swift */, - 57B3A0A40F1FD4BAE3156834C2FB1E47 /* SchedulerType.swift */, - C5446E36E58520C2C9EE83EDF779A182 /* Sequence.swift */, - 5DD43CE9B3F1756F2A9EE9042CA1F3AC /* SerialDispatchQueueScheduler.swift */, - C4DCF31BD6DE9F6836933A313FAD41DC /* SerialDisposable.swift */, - 91E87CD15EA8103724B37C9C6156D37A /* ShareReplay1.swift */, - 1ECDFB72AD82B581902C467FC85EA8E1 /* ShareReplay1WhileConnected.swift */, - FEAEEEFA2C36C9251ACFA3138152561C /* SingleAssignmentDisposable.swift */, - 92172CE43C48615DE684A744A3A0C705 /* SingleAsync.swift */, - 53687E1EAF7A06D4BF971DB4C8F5DD77 /* Sink.swift */, - F613D42862255C3370C789BA2D2B71A1 /* Skip.swift */, - 788F1963A5DEF05469A80074D0001BFC /* SkipUntil.swift */, - 5741FEEE2B833E88E8EAFDEF10CFBD47 /* SkipWhile.swift */, - 04EDD75E75782619655D078DBA2BEEA6 /* StableCompositeDisposable.swift */, - 0AC2C7C20763F3258104E71D07E9C2EA /* StartWith.swift */, - 35CCB1ACF1E54E0602A0061EB4A7F190 /* String+Rx.swift */, - 5741CB60B359955715E1CCFBA526534C /* SubjectType.swift */, - 0E68357BF4756106B05AAB53C5457B75 /* SubscribeOn.swift */, - 5D83A895879C7DBFFBA76FFE35866E8C /* SubscriptionDisposable.swift */, - E72CA9F246917F67DF9F0413ADD81357 /* Switch.swift */, - 2998A104A9A8BE769826A7818A61DD0F /* SynchronizedDisposeType.swift */, - CD62F8FFF256E59711D9FDF3322EC7BF /* SynchronizedOnType.swift */, - 52748332552B25402E196114C79B5AEB /* SynchronizedSubscribeType.swift */, - 0AB8E0D8A74C19DBC617DA1C8BB34C88 /* SynchronizedUnsubscribeType.swift */, - CEAC84803288AC8D5968EB723B63B2ED /* TailRecursiveSink.swift */, - 588C9B897CCD7C4FDF0D22395050E1D7 /* Take.swift */, - 8598322163047BB1D0B53A6C16C82676 /* TakeLast.swift */, - 0188B3C0993FF92B9152F772D08024ED /* TakeUntil.swift */, - 4B2B72307C219612B0A3C83AD4F0E343 /* TakeWhile.swift */, - 4A25467B97F47E9CEE714FEA1D087D81 /* Throttle.swift */, - 0E886A0EE61D2FBD045FE8DA56630F12 /* Timeout.swift */, - 9BFCE68C0BDDE2038C646F4C8AF6C054 /* Timer.swift */, - 02F36C5811D28E5B33A6DB2EDA401D2B /* ToArray.swift */, - 7B1554E36092DF01EAE8A424DFB92A12 /* Using.swift */, - FE0C8D7154FE63321032D6D602FE566D /* Variable.swift */, - BCA6A87FDF342E280A3E010318F65296 /* VirtualTimeConverterType.swift */, - 028280AB9252B6D3BDFB3571454CA086 /* VirtualTimeScheduler.swift */, - 1DD185DD731DEBBEA2D0B1ABA9C849F9 /* Window.swift */, - BE63F3BFF0EE7B9F4F664D2C43E36B56 /* WithLatestFrom.swift */, - A7BCF0C09DADBEA57142D3EC8DE6FC6F /* Zip.swift */, - 9EA603E11B2B5E6D8734CCDECD434830 /* Zip+arity.swift */, - 8B7D01B1DC2ADFC09419E02EBD81FF15 /* Zip+CollectionType.swift */, - ED3FEDC6F9F2A0CC8C193F395BA4123A /* Support Files */, + 6581391B0214E74D4083EDE299EF4187 /* Foundation.framework */, ); - path = RxSwift; + name = iOS; sourceTree = ""; }; - C5F9268CB5EC105E5AB5668ED6C50349 /* Targets Support Files */ = { + 840D4FFD94FB451CB436ED455A10CD02 /* RxResult */ = { isa = PBXGroup; children = ( - 057D5E8DF1C9A6F74530261DC421BEED /* Pods-RxResult */, + FCD9DA15B63623788687FDECEA298557 /* Observable+Result.swift */, + 5B6B1E97C9AAA3973A9BCDC1DC251577 /* Pod */, + 5385EACF58089276E0E78D204C1B42D6 /* Support Files */, ); - name = "Targets Support Files"; + name = RxResult; + path = ../..; sourceTree = ""; }; - DE5EECF6FA79033C9109E1CD1BCD9E12 /* RxResult */ = { + 8A70FA40778D1825EE2052C2AD36A89A /* Support Files */ = { isa = PBXGroup; children = ( - 4E281E757FDC5CF5FB3EA1613DDD95F8 /* RxResult */, - 509F384732167A5E559DFF83A2759C5C /* Support Files */, + C03443B6620DD6867DFCE87F62468F05 /* Info.plist */, + 79C53BDDF6540F19B75C893AC5E0813B /* RxSwift.modulemap */, + 47536CCBB57625B0725031FE8EF82A52 /* RxSwift.xcconfig */, + E33B859A09FF036C171B0C322371DF4C /* RxSwift-dummy.m */, + 091BCBEFF05F022B05226D9A511FB9D9 /* RxSwift-prefix.pch */, + 482C8C23D74CBB544127FC3B5653BD61 /* RxSwift-umbrella.h */, ); - name = RxResult; - path = ../..; + name = "Support Files"; + path = "../Target Support Files/RxSwift"; sourceTree = ""; }; - ED3FEDC6F9F2A0CC8C193F395BA4123A /* Support Files */ = { + 9945120FB104568A926A7938AF68E98A /* Pods-RxResult_Example */ = { isa = PBXGroup; children = ( - E70F2935FBE2B63CB6B2B89D16FF8360 /* Info.plist */, - CA786F81ADB9BD3D13BFF6E1BE1EFD36 /* RxSwift.modulemap */, - 2B21D2D781560258A552780FBB3C869A /* RxSwift.xcconfig */, - E007CE5112E72655F543F6C2F94638E1 /* RxSwift-dummy.m */, - 13F674175694A9AE412E88653027A119 /* RxSwift-prefix.pch */, - ACA3B6C8342D042C611A40C4483CCAFA /* RxSwift-umbrella.h */, + 134DA48EFBC50631AF289C353C63F8A3 /* Info.plist */, + 2077AF85859EF6C2950FA122BD2807DC /* Pods-RxResult_Example.modulemap */, + E829770B533C1B6ECEDEAF125180B59E /* Pods-RxResult_Example-acknowledgements.markdown */, + 248987A98A99984D68F08511C8BEB203 /* Pods-RxResult_Example-acknowledgements.plist */, + 89E051761987034D173E8C9C4B8F5EFC /* Pods-RxResult_Example-dummy.m */, + A1A160F5B65075AA65F59903995E5329 /* Pods-RxResult_Example-frameworks.sh */, + 6260D6A61C935F469F5846457CAE082E /* Pods-RxResult_Example-resources.sh */, + C95EEDF52C3FB5AC77A9932DB17F5A96 /* Pods-RxResult_Example-umbrella.h */, + 1AC29AA583F9C77301468FB2C1964D68 /* Pods-RxResult_Example.debug.xcconfig */, + 8A3B2A49BA13692D0A7D0D15C2B5F825 /* Pods-RxResult_Example.release.xcconfig */, + ); + name = "Pods-RxResult_Example"; + path = "Target Support Files/Pods-RxResult_Example"; + sourceTree = ""; + }; + A4363058B6DDBBBC7CA95FFDCDA4144B /* Support Files */ = { + isa = PBXGroup; + children = ( + 2916F75C02DA1F6CB2ED009456C505DB /* Info.plist */, + FA955E6A5CBC467CA16DD19B7B2D9C89 /* RxAtomic.modulemap */, + 3059598BFFD3ADF442CD414BA8231510 /* RxAtomic.xcconfig */, + 8B21A3868A1CFA3F819E021171131F01 /* RxAtomic-dummy.m */, + 377EB9DADDEA80763136C5EEBBD73532 /* RxAtomic-prefix.pch */, + F4AD4C1BD3CD284D8751BAD97C0FCCD2 /* RxAtomic-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/RxSwift"; + path = "../Target Support Files/RxAtomic"; sourceTree = ""; }; - F686372BB1E783BB949BBF39FE9DCA32 /* Frameworks */ = { + A520D6D033BFE341388DA151682F69BA /* Targets Support Files */ = { isa = PBXGroup; children = ( - C46C1667F342BABD91F45D9201FFEBC4 /* Result.framework */, - 375429D5A20C2E6113CF7A17FD67FBB9 /* RxSwift.framework */, - 8FBABDAD845D445C368D084B6003D171 /* iOS */, + 9945120FB104568A926A7938AF68E98A /* Pods-RxResult_Example */, ); - name = Frameworks; + name = "Targets Support Files"; sourceTree = ""; }; - FD4FB5724DC045D5E000C1F565B136EB /* Pods */ = { + DAA620552944AB9DCE7DD0F1168B7FD0 /* RxAtomic */ = { isa = PBXGroup; children = ( - 29551A360E93FEB539749C69B2A38DE5 /* Result */, - C2CD66D89A004BF41F717AC84E71EEFD /* RxSwift */, + D21189D18C8C3D02ED294A044FCE7B4D /* RxAtomic.c */, + 5906D0B6CA038228A41C0BFAD6A24DCF /* RxAtomic.h */, + A4363058B6DDBBBC7CA95FFDCDA4144B /* Support Files */, ); - name = Pods; + path = RxAtomic; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 21FB18B38E470C000728F4A408D2D758 /* Headers */ = { + 47D530BEDD8ED63F46347F6459BA8E9D /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - C60EAE60478B485C08BCD982959569D6 /* Result-umbrella.h in Headers */, + 61043041F54D55717F7A3AD448FD5867 /* RxSwift-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 430B33DC62B28493E601447DB539F72B /* Headers */ = { + 6B8CAB067183C37A069560466967EA2C /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - FC367C728D9149D81D4A3FEED734B323 /* RxResult-umbrella.h in Headers */, + 74BF3079EDF168CB185A6C8A0A7C49DE /* RxAtomic-umbrella.h in Headers */, + 4A50295EA04F59FE6746E12492D4610D /* RxAtomic.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 5CC7E823FD5822BA502B1742EA308FBC /* Headers */ = { + A1D9B40F4EAAA72D1EF72837F982DE2E /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - C676864ACDEEC03164A80DD470122121 /* RxSwift-umbrella.h in Headers */, + 8DCA89B3D3E34BD10991330E4BD368F0 /* Result-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - AB960D4270F3E7EF05AEF8D93DAC9C75 /* Headers */ = { + A3893DE7CCFAEB6D74387A08A901BEB5 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 88745A783FD7329AFD4B84FB3F84A168 /* Pods-RxResult-umbrella.h in Headers */, + A617DEDC65D9AEB8846316C140490C13 /* Pods-RxResult_Example-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FE6324669F57ED71C1974ED31A66915C /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 73CC14FC385DD446E1FD49148E4AD7D3 /* RxResult-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 2A9D7A592F09FF96E9DBE83DD9826AAB /* RxSwift */ = { + 12354131C339D0FE52F4BA654C3ECFEF /* RxResult */ = { isa = PBXNativeTarget; - buildConfigurationList = C837511020A9F0C9C816A9386658BAA2 /* Build configuration list for PBXNativeTarget "RxSwift" */; + buildConfigurationList = E250FA73BDEA1B0EC7E15C6918697313 /* Build configuration list for PBXNativeTarget "RxResult" */; buildPhases = ( - A864EE8329E34CEFD6B82E3B335F4FE2 /* Sources */, - 7FB4E8B7BDA30E8AD81F78CC811DADF9 /* Frameworks */, - 5CC7E823FD5822BA502B1742EA308FBC /* Headers */, + FE6324669F57ED71C1974ED31A66915C /* Headers */, + E2FAC5C3BDE1835F1406E2413B7EE5FC /* Sources */, + 54E6A9964557B0E0EEB455D51266C3A8 /* Frameworks */, + ADF8C8032024642EF27CA962E4B7A632 /* Resources */, ); buildRules = ( ); dependencies = ( + 1C9FD2FCA07AC328CC794AE1823986CE /* PBXTargetDependency */, + 246C23C6EC44007B0F85B5073317672D /* PBXTargetDependency */, + 63A000CB3154222BB0EFFAE53832CD07 /* PBXTargetDependency */, ); - name = RxSwift; - productName = RxSwift; - productReference = 3EE507664AF3C982390D66BB417A47CD /* RxSwift.framework */; + name = RxResult; + productName = RxResult; + productReference = 77AD7E6AF29F9FA723925BE7B23446A1 /* RxResult.framework */; productType = "com.apple.product-type.framework"; }; - 9E8EAB519BE57079A7CA154D82119D2C /* RxResult */ = { + 1644F91209290D2D12845F882AD5DBCB /* Pods-RxResult_Example */ = { isa = PBXNativeTarget; - buildConfigurationList = 7AB531ED96A621AC3D86266EBA5B7818 /* Build configuration list for PBXNativeTarget "RxResult" */; + buildConfigurationList = E407B6E61DE6244AFCFAAAB456736C56 /* Build configuration list for PBXNativeTarget "Pods-RxResult_Example" */; buildPhases = ( - 527362079EC357D4F7A39085BC0F0F77 /* Sources */, - 1DD9650F2DF21F56880FDEC8317A9F44 /* Frameworks */, - 430B33DC62B28493E601447DB539F72B /* Headers */, + A3893DE7CCFAEB6D74387A08A901BEB5 /* Headers */, + AF54805EC50842D3BD7F2D7623A974BB /* Sources */, + A336BAD815CB7D98877DEB686F51DE0A /* Frameworks */, + 377229CD990DA6164462359D88D7A59A /* Resources */, ); buildRules = ( ); dependencies = ( - 24508F3D20E062109AE7E807CB12417C /* PBXTargetDependency */, - 3CF08415167B0A547507337FFFE5A493 /* PBXTargetDependency */, + AF6AB4FDB844839A4405BB79C7F517B8 /* PBXTargetDependency */, + BCDD97D3E84F710330CA2E81901737D7 /* PBXTargetDependency */, + 71C6FA86204EA4DACC90D2BD69431646 /* PBXTargetDependency */, + D570556CD87B3C44199A93620025F195 /* PBXTargetDependency */, ); - name = RxResult; - productName = RxResult; - productReference = 17D0C5F47B831D2CA27D2D2701BB7FAE /* RxResult.framework */; + name = "Pods-RxResult_Example"; + productName = "Pods-RxResult_Example"; + productReference = 7241E57B437516ACA5248AC7A22C3A11 /* Pods_RxResult_Example.framework */; productType = "com.apple.product-type.framework"; }; - AA7545F6D1ECCD62E5DA89F36EFF8FED /* Pods-RxResult */ = { + 28FF03E1697E60C736C1E5E368AF8EEC /* Result */ = { isa = PBXNativeTarget; - buildConfigurationList = AF9999D9E17A8D7AD2B99D3B7CE7089B /* Build configuration list for PBXNativeTarget "Pods-RxResult" */; + buildConfigurationList = EA670D43EFF1DA5DA9A0BFE1F1E05DAE /* Build configuration list for PBXNativeTarget "Result" */; buildPhases = ( - DDCD98B84E740D1E063917EBD9735CDC /* Sources */, - 476E948CADB9BE8E5417EB944C60BB21 /* Frameworks */, - AB960D4270F3E7EF05AEF8D93DAC9C75 /* Headers */, + A1D9B40F4EAAA72D1EF72837F982DE2E /* Headers */, + 8C771B7D5ED605F31F7CAE06873A555F /* Sources */, + FB53236B6DBE94BE759F6124C338493A /* Frameworks */, + 5C362D3955DA7FE1E79F6794A9DB98C9 /* Resources */, ); buildRules = ( ); dependencies = ( - D622D37DF3CECFEE021FD1C5DBB397D5 /* PBXTargetDependency */, - 436FD6AC88FC22FCC419E87C9CF4DB11 /* PBXTargetDependency */, - E57431DE71EA95D243615DA9BA4EA188 /* PBXTargetDependency */, ); - name = "Pods-RxResult"; - productName = "Pods-RxResult"; - productReference = A2F47BCD0CC942E353F96BDDDE6E32E8 /* Pods_RxResult.framework */; + name = Result; + productName = Result; + productReference = 0FEC5F36D39E3A84C964B201659BDF0B /* Result.framework */; productType = "com.apple.product-type.framework"; }; - EAB22F772776C387CE1B75FEB0A7D252 /* Result */ = { + 2EADD5409F0441361CA3B73DFD9FE91D /* RxSwift */ = { isa = PBXNativeTarget; - buildConfigurationList = C49EB4BACD414C26AEAFB24D1C1BC5A0 /* Build configuration list for PBXNativeTarget "Result" */; + buildConfigurationList = B16734050DF63A61DB53EA7D08DAA447 /* Build configuration list for PBXNativeTarget "RxSwift" */; buildPhases = ( - F162BF56DADC06D7E91FFB1A8CF405B7 /* Sources */, - 53FE751B2AE2B2939BB51E7912A5B286 /* Frameworks */, - 21FB18B38E470C000728F4A408D2D758 /* Headers */, + 47D530BEDD8ED63F46347F6459BA8E9D /* Headers */, + 12EFC10AB5C2EA98F334550611A9DCBB /* Sources */, + FD4DF4E3BA7FF483C4E200062A7CB079 /* Frameworks */, + CCD9049C3F495B10EDA6AF106D660727 /* Resources */, ); buildRules = ( ); dependencies = ( + BEB92D633CF68CBD9326923743C231C1 /* PBXTargetDependency */, ); - name = Result; - productName = Result; - productReference = D3EC748953CF3E1F709D95C23623D4E7 /* Result.framework */; + name = RxSwift; + productName = RxSwift; + productReference = C406C094EF952AFA6102909BD4580931 /* RxSwift.framework */; + productType = "com.apple.product-type.framework"; + }; + 8E75A6C1C04A259F3C0A8DA18004A41C /* RxAtomic */ = { + isa = PBXNativeTarget; + buildConfigurationList = 18111C84204F0C92D51F7D738899D299 /* Build configuration list for PBXNativeTarget "RxAtomic" */; + buildPhases = ( + 6B8CAB067183C37A069560466967EA2C /* Headers */, + 9C56C0D29B7D10340B0BCA2C3EAFA3CC /* Sources */, + BBDBF99179D1159C2C95BB0A645D45C8 /* Frameworks */, + 64993B9A8797CCE497999C98D4925062 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = RxAtomic; + productName = RxAtomic; + productReference = 2FEA7D8669C18FB743B8F45E50B39CDA /* RxAtomic.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -860,8 +994,8 @@ D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0700; + LastSwiftUpdateCheck = 0930; + LastUpgradeCheck = 0930; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -871,627 +1005,809 @@ en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = 7C8862118BE9ACF8E679F142AE271973 /* Products */; + productRefGroup = 2BFA3EDF55CA85E0DFDC05EE3A97CDBE /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - AA7545F6D1ECCD62E5DA89F36EFF8FED /* Pods-RxResult */, - EAB22F772776C387CE1B75FEB0A7D252 /* Result */, - 9E8EAB519BE57079A7CA154D82119D2C /* RxResult */, - 2A9D7A592F09FF96E9DBE83DD9826AAB /* RxSwift */, + 1644F91209290D2D12845F882AD5DBCB /* Pods-RxResult_Example */, + 28FF03E1697E60C736C1E5E368AF8EEC /* Result */, + 8E75A6C1C04A259F3C0A8DA18004A41C /* RxAtomic */, + 12354131C339D0FE52F4BA654C3ECFEF /* RxResult */, + 2EADD5409F0441361CA3B73DFD9FE91D /* RxSwift */, ); }; /* End PBXProject section */ +/* Begin PBXResourcesBuildPhase section */ + 377229CD990DA6164462359D88D7A59A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5C362D3955DA7FE1E79F6794A9DB98C9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 64993B9A8797CCE497999C98D4925062 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + ADF8C8032024642EF27CA962E4B7A632 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CCD9049C3F495B10EDA6AF106D660727 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ - 527362079EC357D4F7A39085BC0F0F77 /* Sources */ = { + 12EFC10AB5C2EA98F334550611A9DCBB /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - B27108488925B317D1B71B8EFC4141E6 /* Observable+Result.swift in Sources */, - 05C7415FA9A3BFB0AACC7F960DA81A94 /* RxResult-dummy.m in Sources */, + F3517A420CDE2827D2261ED6D3BD98EB /* AddRef.swift in Sources */, + 0442297C1EFEF037AFB3B5FD8A497C67 /* Amb.swift in Sources */, + 2623CCF1A94A3BD22FA9F12A28B408D8 /* AnonymousDisposable.swift in Sources */, + F8CD8E90F6C457AE300686FA933CD23D /* AnonymousObserver.swift in Sources */, + B0B24158E8321860038B8B4836910DAD /* AnyObserver.swift in Sources */, + 8B9607993EC4A716DC777FB7B7222C3A /* AsMaybe.swift in Sources */, + 002B9B0DAFEAF7E2EBC58983395070F0 /* AsSingle.swift in Sources */, + 3252B25FFDC78249800EB329E61C0B5D /* AsyncLock.swift in Sources */, + D12748E5CF2DC2C8EC77A619E928AF43 /* AsyncSubject.swift in Sources */, + 3CBEC2D57468CF481BEED1A2AD10516E /* AtomicInt.swift in Sources */, + E1DC4AFA2E963FE7209A7CD8CDDE40D9 /* Bag+Rx.swift in Sources */, + C2909E6E19BDA3A92F391270C0CA1039 /* Bag.swift in Sources */, + 22DFF8AF88CDEE64C8FF3B3961DFE046 /* BehaviorSubject.swift in Sources */, + E5912C36FD1F275B8EF378A549486085 /* BinaryDisposable.swift in Sources */, + 68177C5E01A5233FE8230020F9221A53 /* BooleanDisposable.swift in Sources */, + BA4E0EB3CC674E862E07D9EAC013470B /* Buffer.swift in Sources */, + C6F024125BD590C8B25E230C033CAEB9 /* Cancelable.swift in Sources */, + 8938B07F56FEF66A335D139F8874E624 /* Catch.swift in Sources */, + D0949A431AAF483BAE808D079686EA32 /* CombineLatest+arity.swift in Sources */, + A8683C6144CE48959005EC5C86220C49 /* CombineLatest+Collection.swift in Sources */, + 1E17BA1223FB58356AC5524F3D123967 /* CombineLatest.swift in Sources */, + 7FFF525B7C210CED0A79E3BB9FED4049 /* Completable+AndThen.swift in Sources */, + ACBD11D9685C84250DCD1875DF022678 /* Completable.swift in Sources */, + BEBDFB2D28DBD368FC8FB64615969586 /* CompositeDisposable.swift in Sources */, + C4280A500DFE2089C10C04502CB7C02D /* Concat.swift in Sources */, + 88829B07114713529AB3189A6DC8D7C9 /* ConcurrentDispatchQueueScheduler.swift in Sources */, + F7C4637543580BC0090130F813E71D3A /* ConcurrentMainScheduler.swift in Sources */, + A8115B27E4ECFE99AD38A8359596943D /* ConnectableObservableType.swift in Sources */, + 88710E04FB717A181FBDDAF582A34BE4 /* Create.swift in Sources */, + F70AE092EE0EF949F18F5F9B12ABE79A /* CurrentThreadScheduler.swift in Sources */, + D2F1707E5DE96DD2BBF0BF7306EC9FE8 /* Debounce.swift in Sources */, + FFAA3F634F75981F8614EB10EFCD2BF0 /* Debug.swift in Sources */, + 7375C2B233ACADE9E105D8C676697012 /* DefaultIfEmpty.swift in Sources */, + D583B5476715748949AAFBE012F49D9B /* Deferred.swift in Sources */, + DAD0868A9340069211B47BC4D647A835 /* Delay.swift in Sources */, + 9FD618D904BEDDDA8EE7EC64071FC489 /* DelaySubscription.swift in Sources */, + 460BB59D97F3F29A269B1A7082FCB333 /* Dematerialize.swift in Sources */, + A67D1195B41F296171F3D756F6335DD2 /* Deprecated.swift in Sources */, + C03E61E9C31BA9FCBF83B14D1CA25C82 /* DeprecationWarner.swift in Sources */, + CA1764228E349192321886A8A1A29882 /* DispatchQueue+Extensions.swift in Sources */, + A99DBD4F7C687A0177F26DBE21D97E1E /* DispatchQueueConfiguration.swift in Sources */, + 93149585E3AE31FCF70A4A66A506B8C5 /* Disposable.swift in Sources */, + 97490338AF3711C6B02E41AD497BC50A /* Disposables.swift in Sources */, + CDE01EE264794098DFE23C1EA288B449 /* DisposeBag.swift in Sources */, + 9611DB9468A200A15D332A0165B7F1AB /* DisposeBase.swift in Sources */, + 15C81FC5E74C85840A1FD17A7938673F /* DistinctUntilChanged.swift in Sources */, + DF274CB62748178C4CAF7394D5C1E852 /* Do.swift in Sources */, + 385B561B1FC68C783307BB2EDFBDAE7C /* ElementAt.swift in Sources */, + 8552BEABDAC6FE50EDEDA2B5307A5006 /* Empty.swift in Sources */, + 6AE562FF43A8508285D997FCBE46EBAF /* Enumerated.swift in Sources */, + 690C585F8226F6EEDB2E62AFBB931226 /* Error.swift in Sources */, + A0CF13F79750A237BC234C08A07654BB /* Errors.swift in Sources */, + 10D5745D28CB8DF90F0F258295DF0AEA /* Event.swift in Sources */, + 3A092B17698A9BED08D736651D98D02E /* Filter.swift in Sources */, + 02BD8648AF004594F6797DE38573FE39 /* First.swift in Sources */, + 322656FEBE57801F79DCB15A40FB4048 /* Generate.swift in Sources */, + 9B11B21BE0E64517A509FF3A0336B270 /* GroupBy.swift in Sources */, + 70EF5D2B1E06F252EFE43C9B263DBCD7 /* GroupedObservable.swift in Sources */, + 450CD097CC31F6C3A1F2D7BB07955D61 /* HistoricalScheduler.swift in Sources */, + DD7E735114FEBB775163DE7F5C41AF7B /* HistoricalSchedulerTimeConverter.swift in Sources */, + C02C3A388DD43E274205635DAC67C4E3 /* ImmediateSchedulerType.swift in Sources */, + 77883163ED760770C9B0B93C8ACEF8EE /* InfiniteSequence.swift in Sources */, + D3D32DFDB678035768F17D880BAC4D55 /* InvocableScheduledItem.swift in Sources */, + 5FFD0410433AC7C7AAE87B0C8C0326D1 /* InvocableType.swift in Sources */, + B658888418A6CD5C0EC7A8AE5555D127 /* Just.swift in Sources */, + 03B91B4B0420234FEBCE861A576F74F5 /* Lock.swift in Sources */, + 2F7951A49CCB81EF4FD5D37423BAA697 /* LockOwnerType.swift in Sources */, + 344191598262E1B1DA87C027AD73DCAC /* MainScheduler.swift in Sources */, + C29A648D13CC178E34204BD6B94B6F4F /* Map.swift in Sources */, + 2C9249F0C2D17F71C2CC5EA604116477 /* Materialize.swift in Sources */, + 546A96F3D4C3BFF002717ACCF35775D0 /* Maybe.swift in Sources */, + 03C5153B6777CBCEAF377A4C93489A16 /* Merge.swift in Sources */, + 72884B16BAA217679004A1DF99E9A215 /* Multicast.swift in Sources */, + 62D63D080E682D2F87DF814C1E2A774B /* Never.swift in Sources */, + D4C0182B2629F0857A63C1CE2AE0421D /* NopDisposable.swift in Sources */, + 668C7AC1B436D19103B441C730FF20E4 /* Observable.swift in Sources */, + F24CF11336E2E03CA50F24843D268382 /* ObservableConvertibleType.swift in Sources */, + C19A66C56A68137010C556E21CCDF819 /* ObservableType+Extensions.swift in Sources */, + 69DB9D444289CAA3F3749955A4C47632 /* ObservableType+PrimitiveSequence.swift in Sources */, + 076BAA36915F8F033BB8DEB838F9F709 /* ObservableType.swift in Sources */, + E714BF48DB538F74A105A182A3E525CA /* ObserveOn.swift in Sources */, + 670ACA399880A4931B3102033EB46CD4 /* ObserverBase.swift in Sources */, + F6A4487D9D4B0668FD0AB4A0AFF4D6C6 /* ObserverType.swift in Sources */, + 317B73BB3A9FF3FEB7B6EDAAFE5B40D9 /* OperationQueueScheduler.swift in Sources */, + 960504296CD45B2B7DD3FB5B90673E80 /* Optional.swift in Sources */, + 1229AF4C6EB5CAF62A85C3882476FC32 /* Platform.Darwin.swift in Sources */, + 32A52F423E72DE7BADDE8E1629830948 /* Platform.Linux.swift in Sources */, + 52FEC7FC122B2AA9E30A0860CC0917A5 /* PrimitiveSequence+Zip+arity.swift in Sources */, + 0D988043A991120A86C475B12186F68B /* PrimitiveSequence.swift in Sources */, + 35D05E4D6DAAF16670AD5C4271730512 /* PriorityQueue.swift in Sources */, + B99D564F42232760AA8C23A02BEDD25C /* Producer.swift in Sources */, + 82FF4951B3158E12ADE51F5FA8598AB0 /* PublishSubject.swift in Sources */, + 62947FEC928C8F7F0C9D0F017FB977C7 /* Queue.swift in Sources */, + 065BFC7E5B240E4241F308F44D82ED5D /* Range.swift in Sources */, + 60340CEE6DB8D1F8219F261A4C6AE80C /* Reactive.swift in Sources */, + 544A284D9C3EBA85316F80E699D09617 /* RecursiveLock.swift in Sources */, + 40D19C71957A9E154F9C820C2270BD45 /* RecursiveScheduler.swift in Sources */, + A16839FCA733C04C0DAA9EDAF5A2EFC6 /* Reduce.swift in Sources */, + FAC7C4156E05A62766B845DCFBFFE85D /* RefCountDisposable.swift in Sources */, + DD210886C593281DB9091FF9B730A496 /* Repeat.swift in Sources */, + 13814CBFE144E047FBEA3D0619054415 /* ReplaySubject.swift in Sources */, + D1B5407EDFFC2D4AA1FE7D02F33B6699 /* RetryWhen.swift in Sources */, + B30F216CDCC013FED89185F65F021265 /* Rx.swift in Sources */, + B05B5151D2E5A297F21846DB449CA38B /* RxMutableBox.swift in Sources */, + 5C52783FA4DB6ADF0FB650D7E579CFA1 /* RxSwift-dummy.m in Sources */, + B89CE98A884BAF109B0FA9DDC95B64CB /* Sample.swift in Sources */, + D31CF38FA7B3307D4E99B9E6D282067B /* Scan.swift in Sources */, + B772F6BDA9C5AA78FF7B80B83ADD8027 /* ScheduledDisposable.swift in Sources */, + ACABE22FD720F22A62FBAAE8576B4ABB /* ScheduledItem.swift in Sources */, + 07C83D0D40AEBE79243C6E19A01BE527 /* ScheduledItemType.swift in Sources */, + D8D5235BCC99126843CAE2FF4757904C /* SchedulerServices+Emulation.swift in Sources */, + 061AAFEDD246C77FD55799058FCDAC0F /* SchedulerType.swift in Sources */, + 26EB971E4356F176AABCFE178B55600F /* Sequence.swift in Sources */, + 5EFCC71C031A35D8B0C1EF4E48DD76ED /* SerialDispatchQueueScheduler.swift in Sources */, + B8E9D1D474CD1E51502A4A07E827BBE1 /* SerialDisposable.swift in Sources */, + EE4CD454DEC3BA0A6522001A042FA8BA /* ShareReplayScope.swift in Sources */, + EC9687F2007CED4EF15FF683052A74EB /* Single.swift in Sources */, + 1A5FB6355CFDCFD9640FEE03756017FF /* SingleAssignmentDisposable.swift in Sources */, + FCF99C4FAE4D99F899B030C232D6004B /* SingleAsync.swift in Sources */, + C25B36B4767499223ED427C3DAB29043 /* Sink.swift in Sources */, + 13B3BA7D8C593A9CD5F4F5BD3CFB9BB0 /* Skip.swift in Sources */, + 0A5533385BB719552FCF874D92FFB569 /* SkipUntil.swift in Sources */, + 5B65E0ED4195C6240828102C8ED08D92 /* SkipWhile.swift in Sources */, + 809A5BAE4AEEC3FE63019E53D82F2FF9 /* StartWith.swift in Sources */, + D76923A51822D005671F3553748E0BC3 /* String+Rx.swift in Sources */, + 5B60088D43E2346D52D2F6ACC2BC6D32 /* SubjectType.swift in Sources */, + A3AC4C24C7E08FAE201C5E693CEFC6D9 /* SubscribeOn.swift in Sources */, + 3009C8D6DAE2771E4D4D49AC4DC18787 /* SubscriptionDisposable.swift in Sources */, + C35D892AEC97BC1DA53DC7C60D2BF1C1 /* SwiftSupport.swift in Sources */, + DAEF3B67BC4A8DE036AD51D014B96059 /* Switch.swift in Sources */, + 5E189CEBCE99863D7AAB802F2ABCB75F /* SwitchIfEmpty.swift in Sources */, + 5E3A7DFEE99E013AA61DE75E3332AC1E /* SynchronizedDisposeType.swift in Sources */, + 49DE49188D41E229CF9028D561FF7A3B /* SynchronizedOnType.swift in Sources */, + 0960C990C447BF74277D2DD16011B369 /* SynchronizedUnsubscribeType.swift in Sources */, + AB4FB56CFE89E49B9E7317B3AF72571C /* TailRecursiveSink.swift in Sources */, + 0DDE70ADB8709F6E25332EA9A537DB88 /* Take.swift in Sources */, + E3530CC4C206D8EFED0F3F63BE087E33 /* TakeLast.swift in Sources */, + 98D839FCBF5035A8C19B6E89D00D3476 /* TakeUntil.swift in Sources */, + 51F5F83142F67F2461849B406E38F5F5 /* TakeWhile.swift in Sources */, + 611CEBF5F7ABBE3058A4AC5B0771FBDA /* Throttle.swift in Sources */, + 3CF268A6B9CD9C42415D3944838FE0E6 /* Timeout.swift in Sources */, + 99D18FFA2F8515E8637BD6D46442B4BE /* Timer.swift in Sources */, + FB500D84B424405CE24E9077CE995277 /* ToArray.swift in Sources */, + 0052B6E4FA4066D340C33A0298C0F142 /* Using.swift in Sources */, + E6302B831B2EBDCBD0DD12BD73B56C04 /* VirtualTimeConverterType.swift in Sources */, + 45CF69293E85D5709A82376383003DA9 /* VirtualTimeScheduler.swift in Sources */, + AEEE25889332A034D1A4BD2DC07E66BB /* Window.swift in Sources */, + CDCB94BDC5BFF9666E2A6DB7C1F4B55A /* WithLatestFrom.swift in Sources */, + B88C382D964E6EFBA54037A889498F0B /* Zip+arity.swift in Sources */, + 12FB92CF4C984299087B7C2FEBC96467 /* Zip+Collection.swift in Sources */, + 7580E216DF69DA4B747AC36BDF3EDD6B /* Zip.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - A864EE8329E34CEFD6B82E3B335F4FE2 /* Sources */ = { + 8C771B7D5ED605F31F7CAE06873A555F /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 6560F5426738BB4D81BFBD3FE59BF91F /* AddRef.swift in Sources */, - 097A796FA424C0B01587384C480CDA0E /* Amb.swift in Sources */, - 5F728739BD27AE74509FA4F30CCCF383 /* AnonymousDisposable.swift in Sources */, - AC6E6FE647D535EA8CC23954218CFFEE /* AnonymousInvocable.swift in Sources */, - BDC176355514081CB266EE06DF9B5BB8 /* AnonymousObservable.swift in Sources */, - 72D5B465FB2F7D61A47FD00EBC4F8DCF /* AnonymousObserver.swift in Sources */, - 400F0CA62F6FAE58FBB3D77C6DD1CAA2 /* AnyObserver.swift in Sources */, - 8686DCF23F67D6157555A8AE77AA925A /* AsyncLock.swift in Sources */, - CA6843651D1E771036849FA8715F02F4 /* Bag.swift in Sources */, - 377293886CACE70742B6AA0A04DCFC4C /* BehaviorSubject.swift in Sources */, - BE92C2638C17BDCBCB15FAC88F012EF6 /* BinaryDisposable.swift in Sources */, - 16A2C4F4F72F5BA60DDB1A60B5B9FC56 /* BooleanDisposable.swift in Sources */, - 1E95EBA43ECFB191413C122E69517619 /* Buffer.swift in Sources */, - 34C2B67E363C502DACEF7B2ED1E323D4 /* Cancelable.swift in Sources */, - 9AFFF7F253095BF8B4A8F84EE738EFB3 /* Catch.swift in Sources */, - 10C725DBFDCA89A816BF6F8BAB73CD25 /* CombineLatest+arity.swift in Sources */, - 8EAD35DBE26670B791B4E4140561D70B /* CombineLatest+CollectionType.swift in Sources */, - 7E951C0CA32B94424982FF11DD29853A /* CombineLatest.swift in Sources */, - 610E18C0DF001DADBE74A7B9BCDB7C3D /* CompositeDisposable.swift in Sources */, - 17372783670D60B8EC91D17386FCB4D5 /* Concat.swift in Sources */, - F0D703399B97746A13B83F100AD68EDD /* ConcurrentDispatchQueueScheduler.swift in Sources */, - 5F5540814A34A3B703A069D75B5EAEC2 /* ConcurrentMainScheduler.swift in Sources */, - 0DA6513A18ED0B833CC78B40C0A7E539 /* ConnectableObservable.swift in Sources */, - 783FAA6133D921A74ED4153FAE751C77 /* ConnectableObservableType.swift in Sources */, - 3B8E7C458441C57044CA7F192D82276E /* CurrentThreadScheduler.swift in Sources */, - 352E321273ED040B178E4A48BA34946C /* Debug.swift in Sources */, - EB20C78D3006F5900F58DD2B6BE03643 /* Debunce.swift in Sources */, - D53C8F0E3240A2523076BB0EB2B82B21 /* Deferred.swift in Sources */, - 1B794A91A52E44B85DFB7C1D48400093 /* Delay.swift in Sources */, - BCE8DB83287D9164D1435F594FE4D454 /* DelaySubscription.swift in Sources */, - A6B1801A64855DA4ABBF5871AA3A76DA /* DispatchQueueConfiguration.swift in Sources */, - 723241F347117A21291F5369F00E2CFA /* DispatchQueueSchedulerQOS.swift in Sources */, - 2F1968DCC43DE46F233471E5DF9F1113 /* Disposable.swift in Sources */, - 98A24BBB697B086117BE466618F02390 /* Disposables.swift in Sources */, - 1ACC633D8892FDD58734D428BECD86C9 /* DisposeBag.swift in Sources */, - 9434FE82C0EDADCDC31753FF9F12ED75 /* DisposeBase.swift in Sources */, - 8572544D95E7278D3B81FA59BA42715E /* DistinctUntilChanged.swift in Sources */, - 135FCE53FCE636AAEF92AF2A33D1A8E3 /* Do.swift in Sources */, - F0287DAA9FFF8F36BFB4BD3FFB802569 /* ElementAt.swift in Sources */, - D39127CC2ABC13C7BB659B0E00457BD4 /* Empty.swift in Sources */, - 00DF0AB722BD5164E5060E362485A23A /* Error.swift in Sources */, - E91E1FEA319A452EA2FEAE9ECA186155 /* Errors.swift in Sources */, - D7955CA0C11057494C334920F0DA6141 /* Event.swift in Sources */, - FD7420E7087EEDC2DF4ECDCA325FAE94 /* Filter.swift in Sources */, - B067D9C0586D1C303AA2107FD0873CF7 /* Generate.swift in Sources */, - 6CA02589E759A3B346D500CC9015845F /* HistoricalScheduler.swift in Sources */, - 2332503D70FAB4F9A3BDB376D29F1D85 /* HistoricalSchedulerTimeConverter.swift in Sources */, - 91B99E6DD69AB768779F80048C8E26DF /* ImmediateScheduler.swift in Sources */, - 1B9235AEBDC726056C3D51E4A0A7C105 /* ImmediateSchedulerType.swift in Sources */, - C925DD1C1CFB7E0CD563456BEE748F2B /* InfiniteSequence.swift in Sources */, - 82EF6C488E5BF1D639FDD5F616DF86FE /* InvocableScheduledItem.swift in Sources */, - 475808A387C4E6469FC8CE3218F2B916 /* InvocableType.swift in Sources */, - B19B5B0EDDF415B0D74398F9523415C0 /* Just.swift in Sources */, - 52BF64467BF9E65DAAA72C7268CDB39E /* Lock.swift in Sources */, - 88A1548B249DB0C426D52EF276E8DF5B /* LockOwnerType.swift in Sources */, - 00A9A4F322528A821277704AD26B01A5 /* MainScheduler.swift in Sources */, - E1AEFF090A5EB9D193798E4AF5C91962 /* Map.swift in Sources */, - 4511562714A68F326B9919F59DEFD59D /* Merge.swift in Sources */, - E9D07C569398B9A979A3126B356C79F2 /* Multicast.swift in Sources */, - 219C24F87C7D811B03FDFA41D1970EFE /* Never.swift in Sources */, - D6BF790F189818FFF24E985BA1394595 /* NopDisposable.swift in Sources */, - 96657084DB3F297C08F9658F8F649253 /* Observable+Aggregate.swift in Sources */, - FD8ED4442E1681575B1ECA00AAF4AB0F /* Observable+Binding.swift in Sources */, - 3A8971E83498246D7667B408EE8C56DC /* Observable+Concurrency.swift in Sources */, - 33D31A57020151DC36B92C87BD838EC4 /* Observable+Creation.swift in Sources */, - A249EBEA7AFDB785DE6CF45C02B304D9 /* Observable+Debug.swift in Sources */, - E95301460FCE57DE3342BA9C5C9AB7F5 /* Observable+Multiple.swift in Sources */, - 3F56DF4EADB00CB6F578A37C47FD2056 /* Observable+Single.swift in Sources */, - F7D2D2A47F1C7C8FE6FAA8400E93392F /* Observable+StandardSequenceOperators.swift in Sources */, - 71D784D5CDA60404E680C22343F3D2A1 /* Observable+Time.swift in Sources */, - 2BE3F0922ABC10606E372C867596FE4A /* Observable.swift in Sources */, - 91484EA04486F0C228EBE623BE8FEEEB /* ObservableConvertibleType.swift in Sources */, - B1572A5A6CB4A1A15DCB918912FD5D00 /* ObservableType+Extensions.swift in Sources */, - 8DA95CD12C67F634935594CE8A063D7B /* ObservableType.swift in Sources */, - A48BC06B9C084DA458D803DD35376FEE /* ObserveOn.swift in Sources */, - C2F6B0B3BDADB16EA5F15C5B1E5D7E19 /* ObserveOnSerialDispatchQueue.swift in Sources */, - C35236527440F926A6F5CB8F19C188AD /* ObserverBase.swift in Sources */, - E4ED7E8D9B68EF208927150433695BEC /* ObserverType.swift in Sources */, - 7723386FF9094E2B0531309D01C61B19 /* OperationQueueScheduler.swift in Sources */, - 2FC8D8F026DA84BE5FC902DF01F14188 /* Platform.Darwin.swift in Sources */, - FC5E0A40D5D0BE8EDEABA4C081EADE40 /* Platform.Linux.swift in Sources */, - 2C78EF70DDCCBB23B5E18763D3F15119 /* PriorityQueue.swift in Sources */, - 0013DBB3057EC96B04484E12747B0CF5 /* Producer.swift in Sources */, - 1C11AFCC868156DE9AF98A5867D2BA7B /* PublishSubject.swift in Sources */, - B03D7EF92D630D360FB2D9DDAFE063B3 /* Queue.swift in Sources */, - 4015EEBED6D65B16E0AEB3132F42568B /* Range.swift in Sources */, - CA2C50B148004823E38BDB7F86166C44 /* Reactive.swift in Sources */, - AC82B0D737E0D58608ADFA36936F5BED /* RecursiveScheduler.swift in Sources */, - 951E34768763A533F80ACC40B4922801 /* Reduce.swift in Sources */, - 074FBD3F1CA6496D31A0F61160610A93 /* RefCount.swift in Sources */, - 80C4C0FD2269C735E500BE23DC69FBC2 /* RefCountDisposable.swift in Sources */, - 1997D1992B7E820DC33A57CE4AFC27F5 /* Repeat.swift in Sources */, - 001BE20540E0FB303A6E717BC193298F /* ReplaySubject.swift in Sources */, - 6D98462D3AD6C08C7F98E12EE0130FCC /* RetryWhen.swift in Sources */, - C15948C6BA443F1337D2A17AA900DE36 /* Rx.swift in Sources */, - 443ABF09C61A634AB8FD249D51D882FA /* RxMutableBox.swift in Sources */, - 70E1E10B0A4308A1E3C8F68C8E49115C /* RxSwift-dummy.m in Sources */, - FAAB616D9AD02B3145B021AF708816C6 /* Sample.swift in Sources */, - 1CA4B17EF2C8BBBDD70CB2AB62E66957 /* Scan.swift in Sources */, - 963222931DE446945228BACE4BD93D72 /* ScheduledDisposable.swift in Sources */, - 86632C43C9E0086CB1893495681A8DDD /* ScheduledItem.swift in Sources */, - C537921C778C86A3E7E27B3A61E21223 /* ScheduledItemType.swift in Sources */, - 3211F3B812957C5A201746891A58970B /* SchedulerServices+Emulation.swift in Sources */, - 706A729B116B097C9CAEA0C1F9621437 /* SchedulerType.swift in Sources */, - 5530FC28B405F0799BD0DCBB780EF35B /* Sequence.swift in Sources */, - A98B10EDEBCA5F7D4A1909EFC6E6B3CB /* SerialDispatchQueueScheduler.swift in Sources */, - 2C74202BF5844FFE97AA3CFCED615AD1 /* SerialDisposable.swift in Sources */, - AF419B7832C2BCDDBE478A9494D2A1DD /* ShareReplay1.swift in Sources */, - FEA3406B49FAF134FC30155D2F46E79D /* ShareReplay1WhileConnected.swift in Sources */, - 5E93B07F8A81160AAC6A0E3A29D8DB01 /* SingleAssignmentDisposable.swift in Sources */, - 74795735815E0A71A6F6056F1925513A /* SingleAsync.swift in Sources */, - 68C83BC33126EE73BC143E7BB6698F93 /* Sink.swift in Sources */, - 2E9A6BBC623D557D1AD31A6E092FBEE8 /* Skip.swift in Sources */, - 56E779018CF671EA073661A43D687CD8 /* SkipUntil.swift in Sources */, - F5966F0C24DB09A63022269CF3B3E76C /* SkipWhile.swift in Sources */, - F5915E58183DE766781B2A8E27C837B5 /* StableCompositeDisposable.swift in Sources */, - F699D3AE886D892ECD878F813C3DFF3C /* StartWith.swift in Sources */, - E86A2A9C2C96912D14AE670958605E8F /* String+Rx.swift in Sources */, - E020C4F1D654BA67A863CBF8B5A5E32C /* SubjectType.swift in Sources */, - 86DAE070315C40B977FBFD94326BA6AC /* SubscribeOn.swift in Sources */, - A91626D9CB9A378CB78CC44F42E19F38 /* SubscriptionDisposable.swift in Sources */, - 3349028DEED77A8378F8F74A1F8D7ED9 /* Switch.swift in Sources */, - 6B78E09A7DBEF1DF0747AED7B5B59393 /* SynchronizedDisposeType.swift in Sources */, - 27AB00F27451886345564EF019B9EA0E /* SynchronizedOnType.swift in Sources */, - 98A450BF913A4021EBE100AC5472FF6C /* SynchronizedSubscribeType.swift in Sources */, - 8742446BD699465C5498EC33895EBFB1 /* SynchronizedUnsubscribeType.swift in Sources */, - 7F7D584A14F1099EE2562D1C3313BBA2 /* TailRecursiveSink.swift in Sources */, - B7E5B43161892602B09597911367DB2E /* Take.swift in Sources */, - 97388735972E2BFFFFFC657FB7A3071B /* TakeLast.swift in Sources */, - 084A3CC81C1BE8E684A2B8A098C9AF34 /* TakeUntil.swift in Sources */, - EE262CEEAF5F4F7E09C7869ABC10B693 /* TakeWhile.swift in Sources */, - CD22C02CDE3ACD258B09D4654FDE7703 /* Throttle.swift in Sources */, - 8122CFC98ABF2CC73FE5CD10DDD6C17E /* Timeout.swift in Sources */, - 0E7D399D15655F0A183F577AEA4C6F1C /* Timer.swift in Sources */, - E8D5AEE7E30EBD2B4C9D86FBF0BB08FD /* ToArray.swift in Sources */, - 6B4108C3AD59E04F274C924861E314C1 /* Using.swift in Sources */, - 8376CC3E1A61BEC62094E2FB0EECD1B4 /* Variable.swift in Sources */, - A029BED32D20F8EAAE25134D3B950125 /* VirtualTimeConverterType.swift in Sources */, - BE36DCDB5A5D805DB6CC6B8ED0D22FC7 /* VirtualTimeScheduler.swift in Sources */, - D15D67215E9C09E50D81653CB1FF0986 /* Window.swift in Sources */, - 5930C80AC1718C4BB2A505DCD849B958 /* WithLatestFrom.swift in Sources */, - E8677578640256E39B0BCAC31721498E /* Zip+arity.swift in Sources */, - 68F5F675E2E0C3FF02449DB8816033A3 /* Zip+CollectionType.swift in Sources */, - EFF200E81CD7EF35DC50B33A83B05222 /* Zip.swift in Sources */, + 3843044BF96532A7B6577835C7BC4DF6 /* AnyError.swift in Sources */, + 9A52D6C592AF30D60FE2DD187D6622E2 /* NoError.swift in Sources */, + 3B0032BFA220ACEF07FFE0E64DDD8A9F /* Result-dummy.m in Sources */, + 4DD78A63B058EA42F2CDF9D9E9D9F797 /* Result.swift in Sources */, + 50AEB9D245A6BB5B0F43C05C178DD470 /* ResultProtocol.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - DDCD98B84E740D1E063917EBD9735CDC /* Sources */ = { + 9C56C0D29B7D10340B0BCA2C3EAFA3CC /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - DF2293D8EB70741ACE12F26F682FD160 /* Pods-RxResult-dummy.m in Sources */, + 42CFA57913D9E49150810864E09E45F7 /* RxAtomic-dummy.m in Sources */, + 6E82B10CC100DCDEEF77616C3696D7C1 /* RxAtomic.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - F162BF56DADC06D7E91FFB1A8CF405B7 /* Sources */ = { + AF54805EC50842D3BD7F2D7623A974BB /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 9870748D1B35944D269629117D5C1E8D /* Result-dummy.m in Sources */, - DDA9B5599971EC0DD398A790A5AAEC93 /* Result.swift in Sources */, - FDE3AD5AC2A8FFE275CB5DC8D5DB42D4 /* ResultProtocol.swift in Sources */, + FC7EDF0454FF17D508B09416D07BABFF /* Pods-RxResult_Example-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E2FAC5C3BDE1835F1406E2413B7EE5FC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0EB3BE1AD1E8FDBE98DC9F8BFFD722C6 /* Observable+Result.swift in Sources */, + 2CB8AC02968E19B9F4913441D9B7B091 /* RxResult-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 24508F3D20E062109AE7E807CB12417C /* PBXTargetDependency */ = { + 1C9FD2FCA07AC328CC794AE1823986CE /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Result; - target = EAB22F772776C387CE1B75FEB0A7D252 /* Result */; - targetProxy = ABEFF94EEB0144E6BA52F6A8CE02A9BA /* PBXContainerItemProxy */; + target = 28FF03E1697E60C736C1E5E368AF8EEC /* Result */; + targetProxy = 9496EF2BEF95A68255D931BDF60A713D /* PBXContainerItemProxy */; + }; + 246C23C6EC44007B0F85B5073317672D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = RxAtomic; + target = 8E75A6C1C04A259F3C0A8DA18004A41C /* RxAtomic */; + targetProxy = B3A1A2D4A7E6A237836550CA1D68ED5D /* PBXContainerItemProxy */; }; - 3CF08415167B0A547507337FFFE5A493 /* PBXTargetDependency */ = { + 63A000CB3154222BB0EFFAE53832CD07 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = RxSwift; - target = 2A9D7A592F09FF96E9DBE83DD9826AAB /* RxSwift */; - targetProxy = 6AB24C17F7998362927FCC76EEF0CBCC /* PBXContainerItemProxy */; + target = 2EADD5409F0441361CA3B73DFD9FE91D /* RxSwift */; + targetProxy = 578F3A1F07A9E029011C395463983E5A /* PBXContainerItemProxy */; }; - 436FD6AC88FC22FCC419E87C9CF4DB11 /* PBXTargetDependency */ = { + 71C6FA86204EA4DACC90D2BD69431646 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = RxResult; - target = 9E8EAB519BE57079A7CA154D82119D2C /* RxResult */; - targetProxy = 640764CBFC5AEDF50EDEB8E9AF759B36 /* PBXContainerItemProxy */; + target = 12354131C339D0FE52F4BA654C3ECFEF /* RxResult */; + targetProxy = 93677621185036542494747A93A14C5C /* PBXContainerItemProxy */; }; - D622D37DF3CECFEE021FD1C5DBB397D5 /* PBXTargetDependency */ = { + AF6AB4FDB844839A4405BB79C7F517B8 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Result; - target = EAB22F772776C387CE1B75FEB0A7D252 /* Result */; - targetProxy = 86171A4658AE1C7EE27F41C7B5EBB88B /* PBXContainerItemProxy */; + target = 28FF03E1697E60C736C1E5E368AF8EEC /* Result */; + targetProxy = C4E07B5C14EF42D0A3AAA62E44B95796 /* PBXContainerItemProxy */; + }; + BCDD97D3E84F710330CA2E81901737D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = RxAtomic; + target = 8E75A6C1C04A259F3C0A8DA18004A41C /* RxAtomic */; + targetProxy = CD8BB9B1E75802FB6F549B43FA691739 /* PBXContainerItemProxy */; }; - E57431DE71EA95D243615DA9BA4EA188 /* PBXTargetDependency */ = { + BEB92D633CF68CBD9326923743C231C1 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = RxAtomic; + target = 8E75A6C1C04A259F3C0A8DA18004A41C /* RxAtomic */; + targetProxy = 4ECCE610131A0F279C013483747612D0 /* PBXContainerItemProxy */; + }; + D570556CD87B3C44199A93620025F195 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = RxSwift; - target = 2A9D7A592F09FF96E9DBE83DD9826AAB /* RxSwift */; - targetProxy = C8B7771957B926FBDF3C07A2FD080491 /* PBXContainerItemProxy */; + target = 2EADD5409F0441361CA3B73DFD9FE91D /* RxSwift */; + targetProxy = 2B633930E9B1EF21F7BCA2CD2D29B8DE /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 00DF4F44EE34D82E80B8C3AB94846DD8 /* Debug */ = { + 0862756C2FBDB0EA63609FF8526CDF4C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2B21D2D781560258A552780FBB3C869A /* RxSwift.xcconfig */; + baseConfigurationReference = 1AC29AA583F9C77301468FB2C1964D68 /* Pods-RxResult_Example.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxSwift/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-RxResult_Example/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/RxSwift/RxSwift.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = RxSwift; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-RxResult_Example/Pods-RxResult_Example.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 12914D756594D15C6F2CA12FE5F89F1B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - 494FAE4766D65E5BA59DBAB825663F56 /* Release */ = { + 0934543FE0B23986C70E2D000A4E51CF /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2B21D2D781560258A552780FBB3C869A /* RxSwift.xcconfig */; + baseConfigurationReference = 3059598BFFD3ADF442CD414BA8231510 /* RxAtomic.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxSwift/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/RxAtomic/RxAtomic-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/RxAtomic/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/RxSwift/RxSwift.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = RxSwift; + MODULEMAP_FILE = "Target Support Files/RxAtomic/RxAtomic.modulemap"; + PRODUCT_MODULE_NAME = RxAtomic; + PRODUCT_NAME = RxAtomic; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - 66DAE44CE57411BCCF1DBA46144D6D38 /* Release */ = { + 182E898DB1EBFE8DFE2CA2AE40ED7F2C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AABD914DD68B12B2969BE3B86887136C /* Result.xcconfig */; + baseConfigurationReference = 8A3B2A49BA13692D0A7D0D15C2B5F825 /* Pods-RxResult_Example.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Result/Result-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Result/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-RxResult_Example/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Result/Result.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Result; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-RxResult_Example/Pods-RxResult_Example.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - 906E9743F855A5AFFD6D9D84FE7ACA6C /* Debug */ = { + 2EB0718AD86B554D9D9C7FCBD1787A85 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E6CE446E0286FCF4CAA3A13AC7BD3DEA /* Pods-RxResult.debug.xcconfig */; + baseConfigurationReference = BD779EED5DD01AC79749667BE808366C /* RxResult.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-RxResult/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/RxResult/RxResult-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/RxResult/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-RxResult/Pods-RxResult.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_RxResult; + MODULEMAP_FILE = "Target Support Files/RxResult/RxResult.modulemap"; + PRODUCT_MODULE_NAME = RxResult; + PRODUCT_NAME = RxResult; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - A144CD32C83A13179A23874A5886709A /* Debug */ = { + 2F668DB4A5DF7A647A8FF86DB30F72F9 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AABD914DD68B12B2969BE3B86887136C /* Result.xcconfig */; + baseConfigurationReference = 9AAE18CCC50DA37847B5CF56E90EA85D /* Result.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; GCC_PREFIX_HEADER = "Target Support Files/Result/Result-prefix.pch"; INFOPLIST_FILE = "Target Support Files/Result/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/Result/Result.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_MODULE_NAME = Result; PRODUCT_NAME = Result; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - B01B5E8A09FCF9B8763C7B07F9D5DAAB /* Debug */ = { + 56A8745D3C2D5BBB92D5C667ECF9A1D5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 33A29040C488129DB1AC189DFE8E1BB0 /* RxResult.xcconfig */; + baseConfigurationReference = 47536CCBB57625B0725031FE8EF82A52 /* RxSwift.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/RxResult/RxResult-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxResult/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/RxSwift/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/RxResult/RxResult.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = RxResult; + MODULEMAP_FILE = "Target Support Files/RxSwift/RxSwift.modulemap"; + PRODUCT_MODULE_NAME = RxSwift; + PRODUCT_NAME = RxSwift; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - B19E088F907A2E09F4C831C52FB46E0D /* Release */ = { + 74756D5954376372BB4C583ABCDD29FF /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 33A29040C488129DB1AC189DFE8E1BB0 /* RxResult.xcconfig */; + baseConfigurationReference = 9AAE18CCC50DA37847B5CF56E90EA85D /* Result.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/RxResult/RxResult-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxResult/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Result/Result-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Result/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/RxResult/RxResult.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = RxResult; + MODULEMAP_FILE = "Target Support Files/Result/Result.modulemap"; + PRODUCT_MODULE_NAME = Result; + PRODUCT_NAME = Result; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - BDD1809C043DC634BDA098BB98AE19EE /* Release */ = { + 75A02087C1B27993E35B5C4DA792433C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8B538014A11812FE58AB4064A18DACB3 /* Pods-RxResult.release.xcconfig */; + baseConfigurationReference = 47536CCBB57625B0725031FE8EF82A52 /* RxSwift.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/RxSwift/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/RxSwift/RxSwift.modulemap"; + PRODUCT_MODULE_NAME = RxSwift; + PRODUCT_NAME = RxSwift; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 8DDFA5FA8D4131BFD96E5E26F3672644 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_ALLOWED = NO; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-RxResult/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 10.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + 913D2DD60D176DF78AAA840562EA77C7 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3059598BFFD3ADF442CD414BA8231510 /* RxAtomic.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/RxAtomic/RxAtomic-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/RxAtomic/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-RxResult/Pods-RxResult.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_RxResult; + MODULEMAP_FILE = "Target Support Files/RxAtomic/RxAtomic.modulemap"; + PRODUCT_MODULE_NAME = RxAtomic; + PRODUCT_NAME = RxAtomic; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - E72E7977875C2D251FC62736BBDDC389 /* Release */ = { + D5F759C82752B2EB010DB3CD3D69707C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 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; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_ALLOWED = NO; CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_RELEASE=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 10.0; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.2; SYMROOT = "${SRCROOT}/../build"; + }; + name = Release; + }; + E39AAA0F134C14E7FE742D8CDE980F7E /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = BD779EED5DD01AC79749667BE808366C /* RxResult.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/RxResult/RxResult-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/RxResult/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/RxResult/RxResult.modulemap"; + PRODUCT_MODULE_NAME = RxResult; + PRODUCT_NAME = RxResult; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 18111C84204F0C92D51F7D738899D299 /* Build configuration list for PBXNativeTarget "RxAtomic" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 913D2DD60D176DF78AAA840562EA77C7 /* Debug */, + 0934543FE0B23986C70E2D000A4E51CF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 12914D756594D15C6F2CA12FE5F89F1B /* Debug */, - E72E7977875C2D251FC62736BBDDC389 /* Release */, + 8DDFA5FA8D4131BFD96E5E26F3672644 /* Debug */, + D5F759C82752B2EB010DB3CD3D69707C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 7AB531ED96A621AC3D86266EBA5B7818 /* Build configuration list for PBXNativeTarget "RxResult" */ = { + B16734050DF63A61DB53EA7D08DAA447 /* Build configuration list for PBXNativeTarget "RxSwift" */ = { isa = XCConfigurationList; buildConfigurations = ( - B01B5E8A09FCF9B8763C7B07F9D5DAAB /* Debug */, - B19E088F907A2E09F4C831C52FB46E0D /* Release */, + 56A8745D3C2D5BBB92D5C667ECF9A1D5 /* Debug */, + 75A02087C1B27993E35B5C4DA792433C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - AF9999D9E17A8D7AD2B99D3B7CE7089B /* Build configuration list for PBXNativeTarget "Pods-RxResult" */ = { + E250FA73BDEA1B0EC7E15C6918697313 /* Build configuration list for PBXNativeTarget "RxResult" */ = { isa = XCConfigurationList; buildConfigurations = ( - 906E9743F855A5AFFD6D9D84FE7ACA6C /* Debug */, - BDD1809C043DC634BDA098BB98AE19EE /* Release */, + 2EB0718AD86B554D9D9C7FCBD1787A85 /* Debug */, + E39AAA0F134C14E7FE742D8CDE980F7E /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - C49EB4BACD414C26AEAFB24D1C1BC5A0 /* Build configuration list for PBXNativeTarget "Result" */ = { + E407B6E61DE6244AFCFAAAB456736C56 /* Build configuration list for PBXNativeTarget "Pods-RxResult_Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - A144CD32C83A13179A23874A5886709A /* Debug */, - 66DAE44CE57411BCCF1DBA46144D6D38 /* Release */, + 0862756C2FBDB0EA63609FF8526CDF4C /* Debug */, + 182E898DB1EBFE8DFE2CA2AE40ED7F2C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - C837511020A9F0C9C816A9386658BAA2 /* Build configuration list for PBXNativeTarget "RxSwift" */ = { + EA670D43EFF1DA5DA9A0BFE1F1E05DAE /* Build configuration list for PBXNativeTarget "Result" */ = { isa = XCConfigurationList; buildConfigurations = ( - 00DF4F44EE34D82E80B8C3AB94846DD8 /* Debug */, - 494FAE4766D65E5BA59DBAB825663F56 /* Release */, + 2F668DB4A5DF7A647A8FF86DB30F72F9 /* Debug */, + 74756D5954376372BB4C583ABCDD29FF /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/Pods/Result/README.md b/Example/Pods/Result/README.md index f566178..bf85e78 100644 --- a/Example/Pods/Result/README.md +++ b/Example/Pods/Result/README.md @@ -7,7 +7,7 @@ This is a Swift µframework providing `Result`. -`Result` values are either successful (wrapping `Value`) or failed (wrapping `Error`). This is similar to Swift’s native `Optional` type: `Success` is like `Some`, and `Failure` is like `None` except with an associated `ErrorType` value. The addition of an associated `ErrorType` allows errors to be passed along for logging or displaying to the user. +`Result` values are either successful (wrapping `Value`) or failed (wrapping `Error`). This is similar to Swift’s native `Optional` type: `success` is like `some`, and `failure` is like `none` except with an associated `Error` value. The addition of an associated `Error` allows errors to be passed along for logging or displaying to the user. Using this µframework instead of rolling your own `Result` type allows you to easily interface with other frameworks that also use `Result`. @@ -16,41 +16,41 @@ Using this µframework instead of rolling your own `Result` type allows you to e Use `Result` whenever an operation has the possibility of failure. Consider the following example of a function that tries to extract a `String` for a given key from a JSON `Dictionary`. ```swift -typealias JSONObject = [String:AnyObject] +typealias JSONObject = [String: Any] -enum JSONError : ErrorType { - case NoSuchKey(String) - case TypeMismatch +enum JSONError: Error { + case noSuchKey(String) + case typeMismatch } func stringForKey(json: JSONObject, key: String) -> Result { guard let value = json[key] else { - return .Failure(.NoSuchKey(key)) + return .failure(.noSuchKey(key)) } if let value = value as? String { - return .Success(value) + return .success(value) } else { - return .Failure(.TypeMismatch) + return .failure(.typeMismatch) } } ``` -This function provides a more robust wrapper around the default subscripting provided by `Dictionary`. Rather than return `AnyObject?`, it returns a `Result` that either contains the `String` value for the given key, or an `ErrorType` detailing what went wrong. +This function provides a more robust wrapper around the default subscripting provided by `Dictionary`. Rather than return `Any?`, it returns a `Result` that either contains the `String` value for the given key, or an `ErrorType` detailing what went wrong. One simple way to handle a `Result` is to deconstruct it using a `switch` statement. ```swift switch stringForKey(json, key: "email") { -case let .Success(email): +case let .success(email): print("The email is \(email)") -case let .Failure(JSONError.NoSuchKey(key)): +case let .failure(.noSuchKey(key)): print("\(key) is not a valid key") -case .Failure(JSONError.TypeMismatch): +case .failure(.typeMismatch): print("Didn't have the right type") } ``` @@ -61,7 +61,7 @@ Other methods available for processing `Result` are detailed in the [API documen ## Result vs. Throws -Swift 2.0 introduces error handling via throwing and catching `ErrorType`. `Result` accomplishes the same goal by encapsulating the result instead of hijacking control flow. The `Result` abstraction enables powerful functionality such as `map` and `flatMap`, making `Result` more composable than `throw`. +Swift 2.0 introduces error handling via throwing and catching `Error`. `Result` accomplishes the same goal by encapsulating the result instead of hijacking control flow. The `Result` abstraction enables powerful functionality such as `map` and `flatMap`, making `Result` more composable than `throw`. Since dealing with APIs that throw is common, you can convert such functions into a `Result` by using the `materialize` method. Conversely, a `Result` can be used to throw an error by calling `dematerialize`. @@ -69,22 +69,45 @@ Since dealing with APIs that throw is common, you can convert such functions int `map` and `flatMap` operate the same as `Optional.map` and `Optional.flatMap` except they apply to `Result`. -`map` transforms a `Result` into a `Result` of a new type. It does this by taking a function that transforms the `Value` type into a new value. This transformation is only applied in the case of a `Success`. In the case of a `Failure`, the associated error is re-wrapped in the new `Result`. +`map` transforms a `Result` into a `Result` of a new type. It does this by taking a function that transforms the `Value` type into a new value. This transformation is only applied in the case of a `success`. In the case of a `failure`, the associated error is re-wrapped in the new `Result`. ```swift // transforms a Result to a Result let idResult = intForKey(json, key:"id").map { id in String(id) } ``` -Here, the final result is either the id as a `String`, or carries over the `.Failure` from the previous result. +Here, the final result is either the id as a `String`, or carries over the `failure` from the previous result. -`flatMap` is similar to `map` in that in transforms the `Result` into another `Result`. However, the function passed into `flatMap` must return a `Result`. +`flatMap` is similar to `map` in that it transforms the `Result` into another `Result`. However, the function passed into `flatMap` must return a `Result`. An in depth discussion of `map` and `flatMap` is beyond the scope of this documentation. If you would like a deeper understanding, read about functors and monads. This article is a good place to [start](http://www.javiersoto.me/post/106875422394). ## Integration +### Carthage + 1. Add this repository as a submodule and/or [add it to your Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile) if you’re using [carthage](https://github.com/Carthage/Carthage/) to manage your dependencies. 2. Drag `Result.xcodeproj` into your project or workspace. 3. Link your target against `Result.framework`. 4. Application targets should ensure that the framework gets copied into their application bundle. (Framework targets should instead require the application linking them to include Result.) + +### Cocoapods + +```ruby +pod 'Result', '~> 3.0.0' +``` + +### Swift Package Manager + +```swift +import PackageDescription + +let package = Package( + name: "MyProject", + targets: [], + dependencies: [ + .Package(url: "https://github.com/antitypical/Result.git", + majorVersion: 3) + ] +) +``` diff --git a/Example/Pods/Result/Result/AnyError.swift b/Example/Pods/Result/Result/AnyError.swift new file mode 100644 index 0000000..ee018d2 --- /dev/null +++ b/Example/Pods/Result/Result/AnyError.swift @@ -0,0 +1,46 @@ +import Foundation + +/// A type-erased error which wraps an arbitrary error instance. This should be +/// useful for generic contexts. +public struct AnyError: Swift.Error { + /// The underlying error. + public let error: Swift.Error + + public init(_ error: Swift.Error) { + if let anyError = error as? AnyError { + self = anyError + } else { + self.error = error + } + } +} + +extension AnyError: ErrorConvertible { + public static func error(from error: Error) -> AnyError { + return AnyError(error) + } +} + +extension AnyError: CustomStringConvertible { + public var description: String { + return String(describing: error) + } +} + +extension AnyError: LocalizedError { + public var errorDescription: String? { + return error.localizedDescription + } + + public var failureReason: String? { + return (error as? LocalizedError)?.failureReason + } + + public var helpAnchor: String? { + return (error as? LocalizedError)?.helpAnchor + } + + public var recoverySuggestion: String? { + return (error as? LocalizedError)?.recoverySuggestion + } +} diff --git a/Example/Pods/Result/Result/NoError.swift b/Example/Pods/Result/Result/NoError.swift new file mode 100644 index 0000000..a919f51 --- /dev/null +++ b/Example/Pods/Result/Result/NoError.swift @@ -0,0 +1,10 @@ +/// An “error” that is impossible to construct. +/// +/// This can be used to describe `Result`s where failures will never +/// be generated. For example, `Result` describes a result that +/// contains an `Int`eger and is guaranteed never to be a `failure`. +public enum NoError: Swift.Error, Equatable { + public static func ==(lhs: NoError, rhs: NoError) -> Bool { + return true + } +} diff --git a/Example/Pods/Result/Result/Result.swift b/Example/Pods/Result/Result/Result.swift index e8c7adb..de0330a 100644 --- a/Example/Pods/Result/Result/Result.swift +++ b/Example/Pods/Result/Result/Result.swift @@ -1,14 +1,14 @@ // Copyright (c) 2015 Rob Rix. All rights reserved. /// An enum representing either a failure with an explanatory error, or a success with a result value. -public enum Result: ResultProtocol, CustomStringConvertible, CustomDebugStringConvertible { - case success(T) +public enum Result: ResultProtocol, CustomStringConvertible, CustomDebugStringConvertible { + case success(Value) case failure(Error) // MARK: Constructors /// Constructs a success wrapping a `value`. - public init(value: T) { + public init(value: Value) { self = .success(value) } @@ -17,29 +17,32 @@ public enum Result: ResultProtocol, CustomStringConvertib self = .failure(error) } - /// Constructs a result from an Optional, failing with `Error` if `nil`. - public init(_ value: T?, failWith: @autoclosure () -> Error) { + /// Constructs a result from an `Optional`, failing with `Error` if `nil`. + public init(_ value: Value?, failWith: @autoclosure () -> Error) { self = value.map(Result.success) ?? .failure(failWith()) } /// Constructs a result from a function that uses `throw`, failing with `Error` if throws. - public init(_ f: @autoclosure () throws -> T) { + public init(_ f: @autoclosure () throws -> Value) { self.init(attempt: f) } /// Constructs a result from a function that uses `throw`, failing with `Error` if throws. - public init(attempt f: () throws -> T) { + public init(attempt f: () throws -> Value) { do { self = .success(try f()) - } catch { + } catch var error { + if Error.self == AnyError.self { + error = AnyError(error) + } self = .failure(error as! Error) } } // MARK: Deconstruction - /// Returns the value from `Success` Results or `throw`s the error. - public func dematerialize() throws -> T { + /// Returns the value from `success` Results or `throw`s the error. + public func dematerialize() throws -> Value { switch self { case let .success(value): return value @@ -50,8 +53,8 @@ public enum Result: ResultProtocol, CustomStringConvertib /// Case analysis for Result. /// - /// Returns the value produced by applying `ifFailure` to `Failure` Results, or `ifSuccess` to `Success` Results. - public func analysis(ifSuccess: (T) -> Result, ifFailure: (Error) -> Result) -> Result { + /// Returns the value produced by applying `ifFailure` to `failure` Results, or `ifSuccess` to `success` Results. + public func analysis(ifSuccess: (Value) -> Result, ifFailure: (Error) -> Result) -> Result { switch self { case let .success(value): return ifSuccess(value) @@ -93,9 +96,10 @@ public enum Result: ResultProtocol, CustomStringConvertib // MARK: CustomStringConvertible public var description: String { - return analysis( - ifSuccess: { ".success(\($0))" }, - ifFailure: { ".failure(\($0))" }) + switch self { + case let .success(value): return ".success(\(value))" + case let .failure(error): return ".failure(\(error))" + } } @@ -104,53 +108,44 @@ public enum Result: ResultProtocol, CustomStringConvertib public var debugDescription: String { return description } -} -// MARK: - Derive result from failable closure - -public func materialize(_ f: () throws -> T) -> Result { - return materialize(try f()) + // MARK: ResultProtocol + public var result: Result { + return self + } } -public func materialize(_ f: @autoclosure () throws -> T) -> Result { - do { - return .success(try f()) - } catch let error as NSError { - return .failure(error) +extension Result where Error == AnyError { + /// Constructs a result from an expression that uses `throw`, failing with `AnyError` if throws. + public init(_ f: @autoclosure () throws -> Value) { + self.init(attempt: f) } -} -// MARK: - Cocoa API conveniences + /// Constructs a result from a closure that uses `throw`, failing with `AnyError` if throws. + public init(attempt f: () throws -> Value) { + do { + self = .success(try f()) + } catch { + self = .failure(AnyError(error)) + } + } +} -#if !os(Linux) +// MARK: - Derive result from failable closure -/// Constructs a Result with the result of calling `try` with an error pointer. -/// -/// This is convenient for wrapping Cocoa API which returns an object or `nil` + an error, by reference. e.g.: -/// -/// Result.try { NSData(contentsOfURL: URL, options: .DataReadingMapped, error: $0) } -public func `try`(_ function: String = #function, file: String = #file, line: Int = #line, `try`: (NSErrorPointer) -> T?) -> Result { - var error: NSError? - return `try`(&error).map(Result.success) ?? .failure(error ?? Result.error(function: function, file: file, line: line)) +@available(*, deprecated, renamed: "Result.init(attempt:)") +public func materialize(_ f: () throws -> T) -> Result { + return Result(attempt: f) } -/// Constructs a Result with the result of calling `try` with an error pointer. -/// -/// This is convenient for wrapping Cocoa API which returns a `Bool` + an error, by reference. e.g.: -/// -/// Result.try { NSFileManager.defaultManager().removeItemAtURL(URL, error: $0) } -public func `try`(_ function: String = #function, file: String = #file, line: Int = #line, `try`: (NSErrorPointer) -> Bool) -> Result<(), NSError> { - var error: NSError? - return `try`(&error) ? - .success(()) - : .failure(error ?? Result<(), NSError>.error(function: function, file: file, line: line)) +@available(*, deprecated, renamed: "Result.init(_:)") +public func materialize(_ f: @autoclosure () throws -> T) -> Result { + return Result(f) } -#endif - -// MARK: - ErrorProtocolConvertible conformance +// MARK: - ErrorConvertible conformance -extension NSError: ErrorProtocolConvertible { +extension NSError: ErrorConvertible { public static func error(from error: Swift.Error) -> Self { func cast(_ error: Swift.Error) -> T { return error as! T @@ -160,33 +155,42 @@ extension NSError: ErrorProtocolConvertible { } } -// MARK: - +// MARK: - migration support -/// An “error” that is impossible to construct. -/// -/// This can be used to describe `Result`s where failures will never -/// be generated. For example, `Result` describes a result that -/// contains an `Int`eger and is guaranteed never to be a `Failure`. -public enum NoError: Swift.Error { } +@available(*, unavailable, message: "Use the overload which returns `Result` instead") +public func materialize(_ f: () throws -> T) -> Result { + fatalError() +} -// MARK: - migration support -extension Result { - @available(*, unavailable, renamed: "success") - public static func Success(_: T) -> Result { - fatalError() - } +@available(*, unavailable, message: "Use the overload which returns `Result` instead") +public func materialize(_ f: @autoclosure () throws -> T) -> Result { + fatalError() +} - @available(*, unavailable, renamed: "failure") - public static func Failure(_: Error) -> Result { - fatalError() - } +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + +/// Constructs a `Result` with the result of calling `try` with an error pointer. +/// +/// This is convenient for wrapping Cocoa API which returns an object or `nil` + an error, by reference. e.g.: +/// +/// Result.try { NSData(contentsOfURL: URL, options: .dataReadingMapped, error: $0) } +@available(*, unavailable, message: "This has been removed. Use `Result.init(attempt:)` instead. See https://github.com/antitypical/Result/issues/85 for the details.") +public func `try`(_ function: String = #function, file: String = #file, line: Int = #line, `try`: (NSErrorPointer) -> T?) -> Result { + fatalError() } -extension NSError { - @available(*, unavailable, renamed: "error(from:)") - public static func errorFromErrorType(_ error: Swift.Error) -> Self { - fatalError() - } +/// Constructs a `Result` with the result of calling `try` with an error pointer. +/// +/// This is convenient for wrapping Cocoa API which returns a `Bool` + an error, by reference. e.g.: +/// +/// Result.try { NSFileManager.defaultManager().removeItemAtURL(URL, error: $0) } +@available(*, unavailable, message: "This has been removed. Use `Result.init(attempt:)` instead. See https://github.com/antitypical/Result/issues/85 for the details.") +public func `try`(_ function: String = #function, file: String = #file, line: Int = #line, `try`: (NSErrorPointer) -> Bool) -> Result<(), NSError> { + fatalError() } +#endif + +// MARK: - + import Foundation diff --git a/Example/Pods/Result/Result/ResultProtocol.swift b/Example/Pods/Result/Result/ResultProtocol.swift index 2bfdffb..703ad89 100644 --- a/Example/Pods/Result/Result/ResultProtocol.swift +++ b/Example/Pods/Result/Result/ResultProtocol.swift @@ -1,42 +1,31 @@ // Copyright (c) 2015 Rob Rix. All rights reserved. -/// A type that can represent either failure with an error or success with a result value. +/// A protocol that can be used to constrain associated types as `Result`. public protocol ResultProtocol { associatedtype Value associatedtype Error: Swift.Error - - /// Constructs a successful result wrapping a `value`. - init(value: Value) - /// Constructs a failed result wrapping an `error`. + init(value: Value) init(error: Error) - /// Case analysis for ResultProtocol. - /// - /// Returns the value produced by appliying `ifFailure` to the error if self represents a failure, or `ifSuccess` to the result value if self represents a success. - func analysis(ifSuccess: (Value) -> U, ifFailure: (Error) -> U) -> U - - /// Returns the value if self represents a success, `nil` otherwise. - /// - /// A default implementation is provided by a protocol extension. Conforming types may specialize it. - var value: Value? { get } - - /// Returns the error if self represents a failure, `nil` otherwise. - /// - /// A default implementation is provided by a protocol extension. Conforming types may specialize it. - var error: Error? { get } + var result: Result { get } } -public extension ResultProtocol { - +public extension Result { /// Returns the value if self represents a success, `nil` otherwise. public var value: Value? { - return analysis(ifSuccess: { $0 }, ifFailure: { _ in nil }) + switch self { + case let .success(value): return value + case .failure: return nil + } } /// Returns the error if self represents a failure, `nil` otherwise. public var error: Error? { - return analysis(ifSuccess: { _ in nil }, ifFailure: { $0 }) + switch self { + case .success: return nil + case let .failure(error): return error + } } /// Returns a new Result by mapping `Success`es’ values using `transform`, or re-wrapping `Failure`s’ errors. @@ -46,9 +35,16 @@ public extension ResultProtocol { /// Returns the result of applying `transform` to `Success`es’ values, or re-wrapping `Failure`’s errors. public func flatMap(_ transform: (Value) -> Result) -> Result { - return analysis( - ifSuccess: transform, - ifFailure: Result.failure) + switch self { + case let .success(value): return transform(value) + case let .failure(error): return .failure(error) + } + } + + /// Returns a Result with a tuple of the receiver and `other` values if both + /// are `Success`es, or re-wrapping the error of the earlier `Failure`. + public func fanout(_ other: @autoclosure () -> Result) -> Result<(Value, U), Error> { + return self.flatMap { left in other().map { right in (left, right) } } } /// Returns a new Result by mapping `Failure`'s values using `transform`, or re-wrapping `Success`es’ values. @@ -58,13 +54,22 @@ public extension ResultProtocol { /// Returns the result of applying `transform` to `Failure`’s errors, or re-wrapping `Success`es’ values. public func flatMapError(_ transform: (Error) -> Result) -> Result { - return analysis( - ifSuccess: Result.success, - ifFailure: transform) + switch self { + case let .success(value): return .success(value) + case let .failure(error): return transform(error) + } + } + + /// Returns a new Result by mapping `Success`es’ values using `success`, and by mapping `Failure`'s values using `failure`. + public func bimap(success: (Value) -> U, failure: (Error) -> Error2) -> Result { + switch self { + case let .success(value): return .success(success(value)) + case let .failure(error): return .failure(failure(error)) + } } } -public extension ResultProtocol { +public extension Result { // MARK: Higher-order functions @@ -74,19 +79,20 @@ public extension ResultProtocol { } /// Returns this result if it is a .Success, or the given result otherwise. Equivalent with `??` - public func recover(with result: @autoclosure () -> Self) -> Self { - return analysis( - ifSuccess: { _ in self }, - ifFailure: { _ in result() }) + public func recover(with result: @autoclosure () -> Result) -> Result { + switch self { + case .success: return self + case .failure: return result() + } } } /// Protocol used to constrain `tryMap` to `Result`s with compatible `Error`s. -public protocol ErrorProtocolConvertible: Swift.Error { +public protocol ErrorConvertible: Swift.Error { static func error(from error: Swift.Error) -> Self } -public extension ResultProtocol where Error: ErrorProtocolConvertible { +public extension Result where Error: ErrorConvertible { /// Returns the result of applying `transform` to `Success`es’ values, or wrapping thrown errors. public func tryMap(_ transform: (Value) throws -> U) -> Result { @@ -105,78 +111,42 @@ public extension ResultProtocol where Error: ErrorProtocolConvertible { // MARK: - Operators -infix operator &&& : LogicalConjunctionPrecedence - -/// Returns a Result with a tuple of `left` and `right` values if both are `Success`es, or re-wrapping the error of the earlier `Failure`. -public func &&& (left: L, right: @autoclosure () -> R) -> Result<(L.Value, R.Value), L.Error> - where L.Error == R.Error -{ - return left.flatMap { left in right().map { right in (left, right) } } -} - -precedencegroup ChainingPrecedence { - associativity: left - higherThan: TernaryPrecedence -} - -infix operator >>- : ChainingPrecedence - -/// Returns the result of applying `transform` to `Success`es’ values, or re-wrapping `Failure`’s errors. -/// -/// This is a synonym for `flatMap`. -public func >>- (result: T, transform: (T.Value) -> Result) -> Result { - return result.flatMap(transform) -} - -/// Returns `true` if `left` and `right` are both `Success`es and their values are equal, or if `left` and `right` are both `Failure`s and their errors are equal. -public func == (left: T, right: T) -> Bool - where T.Value: Equatable, T.Error: Equatable -{ - if let left = left.value, let right = right.value { - return left == right - } else if let left = left.error, let right = right.error { - return left == right +extension Result where Value: Equatable, Error: Equatable { + /// Returns `true` if `left` and `right` are both `Success`es and their values are equal, or if `left` and `right` are both `Failure`s and their errors are equal. + public static func ==(left: Result, right: Result) -> Bool { + if let left = left.value, let right = right.value { + return left == right + } else if let left = left.error, let right = right.error { + return left == right + } + return false } - return false } -/// Returns `true` if `left` and `right` represent different cases, or if they represent the same case but different values. -public func != (left: T, right: T) -> Bool - where T.Value: Equatable, T.Error: Equatable -{ - return !(left == right) -} +#if swift(>=4.1) + extension Result: Equatable where Value: Equatable, Error: Equatable { } +#else + extension Result where Value: Equatable, Error: Equatable { + /// Returns `true` if `left` and `right` represent different cases, or if they represent the same case but different values. + public static func !=(left: Result, right: Result) -> Bool { + return !(left == right) + } + } +#endif -/// Returns the value of `left` if it is a `Success`, or `right` otherwise. Short-circuits. -public func ?? (left: T, right: @autoclosure () -> T.Value) -> T.Value { - return left.recover(right()) -} +extension Result { + /// Returns the value of `left` if it is a `Success`, or `right` otherwise. Short-circuits. + public static func ??(left: Result, right: @autoclosure () -> Value) -> Value { + return left.recover(right()) + } -/// Returns `left` if it is a `Success`es, or `right` otherwise. Short-circuits. -public func ?? (left: T, right: @autoclosure () -> T) -> T { - return left.recover(with: right()) + /// Returns `left` if it is a `Success`es, or `right` otherwise. Short-circuits. + public static func ??(left: Result, right: @autoclosure () -> Result) -> Result { + return left.recover(with: right()) + } } // MARK: - migration support -@available(*, unavailable, renamed: "ResultProtocol") -public typealias ResultType = ResultProtocol - -@available(*, unavailable, renamed: "Error") -public typealias ResultErrorType = Swift.Error - -@available(*, unavailable, renamed: "ErrorProtocolConvertible") -public typealias ErrorTypeConvertible = ErrorProtocolConvertible -extension ResultProtocol { - @available(*, unavailable, renamed: "recover(with:)") - public func recoverWith(_ result: @autoclosure () -> Self) -> Self { - fatalError() - } -} - -extension ErrorProtocolConvertible { - @available(*, unavailable, renamed: "error(from:)") - public static func errorFromErrorType(_ error: Swift.Error) -> Self { - fatalError() - } -} +@available(*, unavailable, renamed: "ErrorConvertible") +public protocol ErrorProtocolConvertible: ErrorConvertible {} diff --git a/Example/Pods/RxAtomic/LICENSE.md b/Example/Pods/RxAtomic/LICENSE.md new file mode 100644 index 0000000..d6765d9 --- /dev/null +++ b/Example/Pods/RxAtomic/LICENSE.md @@ -0,0 +1,9 @@ +**The MIT License** +**Copyright © 2015 Krunoslav Zaher** +**All rights reserved.** + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Example/Pods/RxAtomic/README.md b/Example/Pods/RxAtomic/README.md new file mode 100644 index 0000000..03270a0 --- /dev/null +++ b/Example/Pods/RxAtomic/README.md @@ -0,0 +1,217 @@ +Miss Electric Eel 2016 RxSwift: ReactiveX for Swift +====================================== + +[![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%20macOS%20%7C%20tvOS%20%7C%20watchOS%20%7C%20Linux-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) [![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager) + +* RxSwift 3.x / Swift 3.x can be found in [**rxswift-3.0** branch](https://github.com/ReactiveX/RxSwift/tree/rxswift-3.0). + +Rx is a [generic abstraction of computation](https://youtu.be/looJcaeboBY) expressed through `Observable` interface. + +This is a Swift version of [Rx](https://github.com/Reactive-Extensions/Rx.NET). + +It tries to port as many concepts from the original version as possible, but some concepts were adapted for more pleasant and performant integration with iOS/macOS environment. + +Cross platform documentation can be found on [ReactiveX.io](http://reactivex.io/). + +Like the original Rx, its intention is to enable easy composition of asynchronous operations and event/data streams. + +KVO observing, async operations and streams are all unified under [abstraction of sequence](Documentation/GettingStarted.md#observables-aka-sequences). This is the reason why Rx is so simple, elegant and powerful. + +## I came here because I want to ... + +###### ... understand + +* [why use rx?](Documentation/Why.md) +* [the basics, getting started with RxSwift](Documentation/GettingStarted.md) +* [traits](Documentation/Traits.md) - what are `Single`, `Completable`, `Maybe`, `Driver`, `ControlProperty`, and `Variable` ... and why do they exist? +* [testing](Documentation/UnitTests.md) +* [tips and common errors](Documentation/Tips.md) +* [debugging](Documentation/GettingStarted.md#debugging) +* [the math behind Rx](Documentation/MathBehindRx.md) +* [what are hot and cold observable sequences?](Documentation/HotAndColdObservables.md) + +###### ... install + +* Integrate RxSwift/RxCocoa with my app. [Installation Guide](#installation) + +###### ... hack around + +* with the example app. [Running Example App](Documentation/ExampleApp.md) +* with operators in playgrounds. [Playgrounds](Documentation/Playgrounds.md) + +###### ... interact + +* All of this is great, but it would be nice to talk with other people using RxSwift and exchange experiences.
[![Slack channel](http://rxswift-slack.herokuapp.com/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](.github/ISSUE_TEMPLATE.md) +* Request a new feature. [Open an Issue With Feature Request Template](Documentation/NewFeatureRequestTemplate.md) +* Help out [Check out contribution guide](CONTRIBUTING.md) + +###### ... compare + +* [with other libraries](Documentation/ComparisonWithOtherLibraries.md). + + +###### ... find compatible + +* libraries from [RxSwiftCommunity](https://github.com/RxSwiftCommunity). +* [Pods using RxSwift](https://cocoapods.org/?q=uses%3Arxswift). + +###### ... see the broader vision + +* Does this exist for Android? [RxJava](https://github.com/ReactiveX/RxJava) +* Where is all of this going, what is the future, what about reactive architectures, how do you design entire apps this way? [Cycle.js](https://github.com/cyclejs/cycle-core) - this is javascript, but [RxJS](https://github.com/Reactive-Extensions/RxJS) is javascript version of Rx. + +## Usage + + + + + + + + + + + + + + + + + + + +
Here's an exampleIn Action
Define search for GitHub repositories ...
+let searchResults = searchBar.rx.text.orEmpty
+    .throttle(0.3, scheduler: MainScheduler.instance)
+    .distinctUntilChanged()
+    .flatMapLatest { query -> Observable<[Repository]> in
+        if query.isEmpty {
+            return .just([])
+        }
+        return searchGitHub(query)
+            .catchErrorJustReturn([])
+    }
+    .observeOn(MainScheduler.instance)
... then bind the results to your tableview
+searchResults
+    .bind(to: tableView.rx.items(cellIdentifier: "Cell")) {
+        (index, repository: Repository, cell) in
+        cell.textLabel?.text = repository.name
+        cell.detailTextLabel?.text = repository.url
+    }
+    .disposed(by: disposeBag)
+ + +## Requirements + +* Xcode 9.0 +* Swift 4.0 +* Swift 3.x ([use `rxswift-3.0` branch](https://github.com/ReactiveX/RxSwift/tree/rxswift-3.0) instead) +* Swift 2.3 ([use `rxswift-2.0` branch](https://github.com/ReactiveX/RxSwift/tree/rxswift-2.0) instead) + +## Installation + +Rx doesn't contain any external dependencies. + +These are currently the supported options: + +### Manual + +Open Rx.xcworkspace, choose `RxExample` and hit run. This method will build everything and run the sample app + +### [CocoaPods](https://guides.cocoapods.org/using/using-cocoapods.html) + +**Tested with `pod --version`: `1.3.1`** + +```ruby +# Podfile +use_frameworks! + +target 'YOUR_TARGET_NAME' do + pod 'RxSwift', '~> 4.0' + pod 'RxCocoa', '~> 4.0' +end + +# RxTest and RxBlocking make the most sense in the context of unit/integration tests +target 'YOUR_TESTING_TARGET' do + pod 'RxBlocking', '~> 4.0' + pod 'RxTest', '~> 4.0' +end +``` + +Replace `YOUR_TARGET_NAME` and then, in the `Podfile` directory, type: + +```bash +$ pod install +``` + +### [Carthage](https://github.com/Carthage/Carthage) + +**Tested with `carthage version`: `0.26.2`** + +Add this to `Cartfile` + +``` +github "ReactiveX/RxSwift" ~> 4.0 +``` + +```bash +$ carthage update +``` + +### [Swift Package Manager](https://github.com/apple/swift-package-manager) + +**Tested with `swift build --version`: `Swift 4.0.0-dev (swiftpm-13126)`** + +Create a `Package.swift` file. + +```swift +// swift-tools-version:4.0 + +import PackageDescription + +let package = Package( + name: "RxTestProject", + dependencies: [ + .package(url: "https://github.com/ReactiveX/RxSwift.git", "4.0.0" ..< "5.0.0") + ], + targets: [ + .target(name: "RxTestProject", dependencies: ["RxSwift", "RxCocoa"]) + ] +) +``` + +```bash +$ swift build +``` + +To build or test a module with RxTest dependency, set `TEST=1`. ([RxSwift >= 3.4.2](https://github.com/ReactiveX/RxSwift/releases/tag/3.4.2)) + +```bash +$ TEST=1 swift test +``` + +### Manually using git submodules + +* Add RxSwift as a submodule + +```bash +$ git submodule add git@github.com:ReactiveX/RxSwift.git +``` + +* Drag `Rx.xcodeproj` into Project Navigator +* Go to `Project > Targets > Build Phases > Link Binary With Libraries`, click `+` and select `RxSwift-[Platform]` and `RxCocoa-[Platform]` targets + + +## References + +* [http://reactivex.io/](http://reactivex.io/) +* [Reactive Extensions GitHub (GitHub)](https://github.com/Reactive-Extensions) +* [RxSwift RayWenderlich.com Book](https://store.raywenderlich.com/products/rxswift-reactive-programming-with-swift) +* [Boxue.io RxSwift Online Course](https://boxueio.com/series/rxswift-101) (Chinese 🇨🇳) +* [Erik Meijer (Wikipedia)](http://en.wikipedia.org/wiki/Erik_Meijer_%28computer_scientist%29) +* [Expert to Expert: Brian Beckman and Erik Meijer - Inside the .NET Reactive Framework (Rx) (video)](https://youtu.be/looJcaeboBY) +* [Reactive Programming Overview (Jafar Husain from Netflix)](https://www.youtube.com/watch?v=dwP1TNXE6fc) +* [Subject/Observer is Dual to Iterator (paper)](http://csl.stanford.edu/~christos/pldi2010.fit/meijer.duality.pdf) +* [Rx standard sequence operators visualized (visualization tool)](http://rxmarbles.com/) +* [Haskell](https://www.haskell.org/) diff --git a/Example/Pods/RxAtomic/RxAtomic/RxAtomic.c b/Example/Pods/RxAtomic/RxAtomic/RxAtomic.c new file mode 100644 index 0000000..5ec86f5 --- /dev/null +++ b/Example/Pods/RxAtomic/RxAtomic/RxAtomic.c @@ -0,0 +1,7 @@ +// +// RxAtomic.c +// RxAtomic +// +// Created by Krunoslav Zaher on 10/28/18. +// Copyright © 2018 Krunoslav Zaher. All rights reserved. +// diff --git a/Example/Pods/RxAtomic/RxAtomic/include/RxAtomic.h b/Example/Pods/RxAtomic/RxAtomic/include/RxAtomic.h new file mode 100644 index 0000000..cd182ce --- /dev/null +++ b/Example/Pods/RxAtomic/RxAtomic/include/RxAtomic.h @@ -0,0 +1,48 @@ +// +// RxAtomic.h +// RxAtomic +// +// Created by Krunoslav Zaher on 10/28/18. +// Copyright © 2018 Krunoslav Zaher. All rights reserved. +// + +#ifndef RxAtomic_h +#define RxAtomic_h + +#include + +#define SWIFT_NAME(_name) __attribute__((swift_name(#_name))) + +#define Atomic(swift_type, llvm_type) \ + typedef struct { volatile atomic_##llvm_type atom; } Atomic##swift_type;\ + static __inline__ __attribute__((__always_inline__)) SWIFT_NAME(Atomic##swift_type.initialize(self:_:)) \ + void Atomic##swift_type##_Initialize(Atomic##swift_type * _Nonnull self, llvm_type value) { \ + atomic_init(&self->atom, value);\ + }\ + \ + static __inline__ __attribute__((__always_inline__)) SWIFT_NAME(Atomic##swift_type.load(self:)) \ + llvm_type Atomic##swift_type##_Load(Atomic##swift_type * _Nonnull self) { \ + return atomic_load(&self->atom);\ + }\ + \ + static __inline__ __attribute__((__always_inline__)) SWIFT_NAME(Atomic##swift_type.fetchOr(self:_:)) \ + llvm_type Atomic##swift_type##_FetchOr(Atomic##swift_type * _Nonnull self, llvm_type mask) { \ + return atomic_fetch_or(&self->atom, mask);\ + }\ + \ + static __inline__ __attribute__((__always_inline__)) SWIFT_NAME(Atomic##swift_type.add(self:_:)) \ + llvm_type Atomic##swift_type##_Add(Atomic##swift_type * _Nonnull self, llvm_type value) { \ + return atomic_fetch_add(&self->atom, value);\ + }\ + \ + static __inline__ __attribute__((__always_inline__)) SWIFT_NAME(Atomic##swift_type.sub(self:_:)) \ + llvm_type Atomic##swift_type##_Sub(Atomic##swift_type * _Nonnull self, llvm_type value) { \ + return atomic_fetch_sub(&self->atom, value);\ + }\ + \ + +Atomic(Int, int) + +#undef SWIFT_NAME + +#endif /* RxAtomic_h */ diff --git a/Example/Pods/RxSwift/Platform/AtomicInt.swift b/Example/Pods/RxSwift/Platform/AtomicInt.swift new file mode 100644 index 0000000..28ed4ad --- /dev/null +++ b/Example/Pods/RxSwift/Platform/AtomicInt.swift @@ -0,0 +1,33 @@ +// +// AtomicInt.swift +// Platform +// +// Created by Krunoslav Zaher on 10/28/18. +// Copyright © 2018 Krunoslav Zaher. All rights reserved. +// + +import RxAtomic + +typealias AtomicInt = RxAtomic.AtomicInt + +extension AtomicInt { + init(_ initialValue: Int32) { + self.init() + self.initialize(initialValue) + } + + @discardableResult + mutating func increment() -> Int32 { + return self.add(1) + } + + @discardableResult + mutating func decrement() -> Int32 { + return self.sub(1) + } + + mutating func isFlagSet(_ mask: Int32) -> Bool { + return (self.load() & mask) != 0 + } +} + diff --git a/Example/Pods/RxSwift/Platform/DataStructures/Bag.swift b/Example/Pods/RxSwift/Platform/DataStructures/Bag.swift new file mode 100644 index 0000000..22d82d5 --- /dev/null +++ b/Example/Pods/RxSwift/Platform/DataStructures/Bag.swift @@ -0,0 +1,183 @@ +// +// Bag.swift +// Platform +// +// Created by Krunoslav Zaher on 2/28/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +import Swift + +let arrayDictionaryMaxSize = 30 + +struct BagKey { + /** + Unique identifier for object added to `Bag`. + + It's underlying type is UInt64. If we assume there in an idealized CPU that works at 4GHz, + it would take ~150 years of continuous running time for it to overflow. + */ + fileprivate let rawValue: UInt64 +} + +/** +Data structure that represents a bag of elements typed `T`. + +Single element can be stored multiple times. + +Time and space complexity of insertion and deletion is O(n). + +It is suitable for storing small number of elements. +*/ +struct Bag : CustomDebugStringConvertible { + /// Type of identifier for inserted elements. + typealias KeyType = BagKey + + typealias Entry = (key: BagKey, value: T) + + fileprivate var _nextKey: BagKey = BagKey(rawValue: 0) + + // data + + // first fill inline variables + var _key0: BagKey? = nil + var _value0: T? = nil + + // then fill "array dictionary" + var _pairs = ContiguousArray() + + // last is sparse dictionary + var _dictionary: [BagKey : T]? = nil + + var _onlyFastPath = true + + /// Creates new empty `Bag`. + init() { + } + + /** + Inserts `value` into bag. + + - parameter element: Element to insert. + - returns: Key that can be used to remove element from bag. + */ + mutating func insert(_ element: T) -> BagKey { + let key = _nextKey + + _nextKey = BagKey(rawValue: _nextKey.rawValue &+ 1) + + if _key0 == nil { + _key0 = key + _value0 = element + return key + } + + _onlyFastPath = false + + if _dictionary != nil { + _dictionary![key] = element + return key + } + + if _pairs.count < arrayDictionaryMaxSize { + _pairs.append((key: key, value: element)) + return key + } + + _dictionary = [key: element] + + return key + } + + /// - returns: Number of elements in bag. + var count: Int { + let dictionaryCount: Int = _dictionary?.count ?? 0 + return (_value0 != nil ? 1 : 0) + _pairs.count + dictionaryCount + } + + /// Removes all elements from bag and clears capacity. + mutating func removeAll() { + _key0 = nil + _value0 = nil + + _pairs.removeAll(keepingCapacity: false) + _dictionary?.removeAll(keepingCapacity: false) + } + + /** + Removes element with a specific `key` from bag. + + - parameter key: Key that identifies element to remove from bag. + - returns: Element that bag contained, or nil in case element was already removed. + */ + mutating func removeKey(_ key: BagKey) -> T? { + if _key0 == key { + _key0 = nil + let value = _value0! + _value0 = nil + return value + } + + if let existingObject = _dictionary?.removeValue(forKey: key) { + return existingObject + } + + for i in 0 ..< _pairs.count { + if _pairs[i].key == key { + let value = _pairs[i].value + _pairs.remove(at: i) + return value + } + } + + return nil + } +} + +extension Bag { + /// A textual representation of `self`, suitable for debugging. + var debugDescription : String { + return "\(self.count) elements in Bag" + } +} + +extension Bag { + /// Enumerates elements inside the bag. + /// + /// - parameter action: Enumeration closure. + func forEach(_ action: (T) -> Void) { + if _onlyFastPath { + if let value0 = _value0 { + action(value0) + } + return + } + + let value0 = _value0 + let dictionary = _dictionary + + if let value0 = value0 { + action(value0) + } + + for i in 0 ..< _pairs.count { + action(_pairs[i].value) + } + + if dictionary?.count ?? 0 > 0 { + for element in dictionary!.values { + action(element) + } + } + } +} + +extension BagKey: Hashable { + var hashValue: Int { + return rawValue.hashValue + } +} + +func ==(lhs: BagKey, rhs: BagKey) -> Bool { + return lhs.rawValue == rhs.rawValue +} diff --git a/Example/Pods/RxSwift/RxSwift/DataStructures/InfiniteSequence.swift b/Example/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift similarity index 83% rename from Example/Pods/RxSwift/RxSwift/DataStructures/InfiniteSequence.swift rename to Example/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift index a1cce01..5a573a0 100644 --- a/Example/Pods/RxSwift/RxSwift/DataStructures/InfiniteSequence.swift +++ b/Example/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift @@ -1,16 +1,12 @@ // // InfiniteSequence.swift -// RxSwift +// Platform // // Created by Krunoslav Zaher on 6/13/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -/** -Sequence that repeats `repeatedValue` infinite number of times. -*/ +/// Sequence that repeats `repeatedValue` infinite number of times. struct InfiniteSequence : Sequence { typealias Element = E typealias Iterator = AnyIterator diff --git a/Example/Pods/RxSwift/RxSwift/DataStructures/PriorityQueue.swift b/Example/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift similarity index 71% rename from Example/Pods/RxSwift/RxSwift/DataStructures/PriorityQueue.swift rename to Example/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift index d37a063..9b2c370 100644 --- a/Example/Pods/RxSwift/RxSwift/DataStructures/PriorityQueue.swift +++ b/Example/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift @@ -1,19 +1,20 @@ // // PriorityQueue.swift -// Rx +// Platform // // Created by Krunoslav Zaher on 12/27/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -struct PriorityQueue { +struct PriorityQueue { private let _hasHigherPriority: (Element, Element) -> Bool + private let _isEqual: (Element, Element) -> Bool + fileprivate var _elements = [Element]() - init(hasHigherPriority: @escaping (Element, Element) -> Bool) { + init(hasHigherPriority: @escaping (Element, Element) -> Bool, isEqual: @escaping (Element, Element) -> Bool) { _hasHigherPriority = hasHigherPriority + _isEqual = isEqual } mutating func enqueue(_ element: Element) { @@ -41,7 +42,7 @@ struct PriorityQueue { mutating func remove(_ element: Element) { for i in 0 ..< _elements.count { - if _elements[i] === element { + if _isEqual(_elements[i], element) { removeAt(i) return } @@ -51,7 +52,11 @@ struct PriorityQueue { private mutating func removeAt(_ index: Int) { let removingLast = index == _elements.count - 1 if !removingLast { + #if swift(>=3.2) + _elements.swapAt(index, _elements.count - 1) + #else swap(&_elements[index], &_elements[_elements.count - 1]) + #endif } _ = _elements.popLast() @@ -70,15 +75,13 @@ struct PriorityQueue { while unbalancedIndex > 0 { let parentIndex = (unbalancedIndex - 1) / 2 - - if _hasHigherPriority(_elements[unbalancedIndex], _elements[parentIndex]) { - swap(&_elements[unbalancedIndex], &_elements[parentIndex]) - - unbalancedIndex = parentIndex - } - else { - break - } + guard _hasHigherPriority(_elements[unbalancedIndex], _elements[parentIndex]) else { break } + #if swift(>=3.2) + _elements.swapAt(unbalancedIndex, parentIndex) + #else + swap(&_elements[unbalancedIndex], &_elements[parentIndex]) + #endif + unbalancedIndex = parentIndex } } @@ -87,7 +90,7 @@ struct PriorityQueue { precondition(initialUnbalancedIndex < _elements.count) var unbalancedIndex = initialUnbalancedIndex - repeat { + while true { let leftChildIndex = unbalancedIndex * 2 + 1 let rightChildIndex = unbalancedIndex * 2 + 2 @@ -101,15 +104,15 @@ struct PriorityQueue { highestPriorityIndex = rightChildIndex } - if highestPriorityIndex != unbalancedIndex { - swap(&_elements[highestPriorityIndex], &_elements[unbalancedIndex]) + guard highestPriorityIndex != unbalancedIndex else { break } - unbalancedIndex = highestPriorityIndex - } - else { - break - } - } while true + #if swift(>=3.2) + _elements.swapAt(highestPriorityIndex, unbalancedIndex) + #else + swap(&_elements[highestPriorityIndex], &_elements[unbalancedIndex]) + #endif + unbalancedIndex = highestPriorityIndex + } } } diff --git a/Example/Pods/RxSwift/RxSwift/DataStructures/Queue.swift b/Example/Pods/RxSwift/Platform/DataStructures/Queue.swift similarity index 78% rename from Example/Pods/RxSwift/RxSwift/DataStructures/Queue.swift rename to Example/Pods/RxSwift/Platform/DataStructures/Queue.swift index a82a6ab..d05726c 100644 --- a/Example/Pods/RxSwift/RxSwift/DataStructures/Queue.swift +++ b/Example/Pods/RxSwift/Platform/DataStructures/Queue.swift @@ -1,13 +1,11 @@ // // Queue.swift -// Rx +// Platform // // Created by Krunoslav Zaher on 3/21/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - /** Data structure that represents queue. @@ -16,25 +14,23 @@ averaged over N operations. Complexity of `peek` is O(1). */ -public struct Queue: Sequence { - /** - Type of generator. - */ - public typealias Generator = AnyIterator - +struct Queue: Sequence { + /// Type of generator. + typealias Generator = AnyIterator + private let _resizeFactor = 2 private var _storage: ContiguousArray private var _count = 0 private var _pushNextIndex = 0 - private var _initialCapacity: Int + private let _initialCapacity: Int /** Creates new queue. - parameter capacity: Capacity of newly created queue. */ - public init(capacity: Int) { + init(capacity: Int) { _initialCapacity = capacity _storage = ContiguousArray(repeating: nil, count: capacity) @@ -45,24 +41,18 @@ public struct Queue: Sequence { return index < 0 ? index + _storage.count : index } - /** - - returns: Is queue empty. - */ - public var isEmpty: Bool { + /// - returns: Is queue empty. + var isEmpty: Bool { return count == 0 } - /** - - returns: Number of elements inside queue. - */ - public var count: Int { + /// - returns: Number of elements inside queue. + var count: Int { return _count } - /** - - returns: Element in front of a list of elements to `dequeue`. - */ - public func peek() -> T { + /// - returns: Element in front of a list of elements to `dequeue`. + func peek() -> T { precondition(count > 0) return _storage[dequeueIndex]! @@ -89,12 +79,10 @@ public struct Queue: Sequence { _storage = newStorage } - /** - Enqueues `element`. - - - parameter element: Element to enqueue. - */ - public mutating func enqueue(_ element: T) { + /// Enqueues `element`. + /// + /// - parameter element: Element to enqueue. + mutating func enqueue(_ element: T) { if count == _storage.count { resizeTo(Swift.max(_storage.count, 1) * _resizeFactor) } @@ -121,12 +109,10 @@ public struct Queue: Sequence { return _storage[index]! } - /** - Dequeues element or throws an exception in case queue is empty. - - - returns: Dequeued element. - */ - public mutating func dequeue() -> T? { + /// Dequeues element or throws an exception in case queue is empty. + /// + /// - returns: Dequeued element. + mutating func dequeue() -> T? { if self.count == 0 { return nil } @@ -141,10 +127,8 @@ public struct Queue: Sequence { return dequeueElementOnly() } - /** - - returns: Generator of contained elements. - */ - public func makeIterator() -> AnyIterator { + /// - returns: Generator of contained elements. + func makeIterator() -> AnyIterator { var i = dequeueIndex var count = _count diff --git a/Example/Pods/RxSwift/Platform/DeprecationWarner.swift b/Example/Pods/RxSwift/Platform/DeprecationWarner.swift new file mode 100644 index 0000000..863636b --- /dev/null +++ b/Example/Pods/RxSwift/Platform/DeprecationWarner.swift @@ -0,0 +1,43 @@ +// +// DeprecationWarner.swift +// Platform +// +// Created by Shai Mishali on 1/9/18. +// Copyright © 2018 Krunoslav Zaher. All rights reserved. +// + +import Foundation + +#if DEBUG + class DeprecationWarner { + private static var warned = Set() + private static var _lock = NSRecursiveLock() + + static func warnIfNeeded(_ kind: Kind) { + _lock.lock(); defer { _lock.unlock() } + guard !warned.contains(kind) else { return } + + warned.insert(kind) + print("ℹ️ [DEPRECATED] \(kind.message)") + } + } + + extension DeprecationWarner { + enum Kind { + case variable + case globalTestFunctionNext + case globalTestFunctionError + case globalTestFunctionCompleted + + var message: String { + switch self { + case .variable: return "`Variable` is planned for future deprecation. Please consider `BehaviorRelay` as a replacement. Read more at: https://git.io/vNqvx" + case .globalTestFunctionNext: return "The `next()` global function is planned for future deprecation. Please use `Recorded.next()` instead." + case .globalTestFunctionError: return "The `error()` global function is planned for future deprecation. Please use `Recorded.error()` instead." + case .globalTestFunctionCompleted: return "The `completed()` global function is planned for future deprecation. Please use `Recorded.completed()` instead." + } + } + } + } +#endif + diff --git a/Example/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift b/Example/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift new file mode 100644 index 0000000..552314a --- /dev/null +++ b/Example/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift @@ -0,0 +1,21 @@ +// +// DispatchQueue+Extensions.swift +// Platform +// +// Created by Krunoslav Zaher on 10/22/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import Dispatch + +extension DispatchQueue { + private static var token: DispatchSpecificKey<()> = { + let key = DispatchSpecificKey<()>() + DispatchQueue.main.setSpecific(key: key, value: ()) + return key + }() + + static var isMain: Bool { + return DispatchQueue.getSpecific(key: token) != nil + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Platform/Platform.Darwin.swift b/Example/Pods/RxSwift/Platform/Platform.Darwin.swift similarity index 51% rename from Example/Pods/RxSwift/RxSwift/Platform/Platform.Darwin.swift rename to Example/Pods/RxSwift/Platform/Platform.Darwin.swift index 9c0b3f9..6dc36ad 100644 --- a/Example/Pods/RxSwift/RxSwift/Platform/Platform.Darwin.swift +++ b/Example/Pods/RxSwift/Platform/Platform.Darwin.swift @@ -1,46 +1,36 @@ // // Platform.Darwin.swift -// Rx +// Platform // // Created by Krunoslav Zaher on 12/29/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -#if os(OSX) || os(iOS) || os(tvOS) || os(watchOS) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) import Darwin - import Foundation - - #if TRACE_RESOURCES - public typealias AtomicInt = Int32 - #else - typealias AtomicInt = Int32 - #endif - - let AtomicCompareAndSwap = OSAtomicCompareAndSwap32 - let AtomicIncrement = OSAtomicIncrement32 - let AtomicDecrement = OSAtomicDecrement32 + import class Foundation.Thread + import protocol Foundation.NSCopying extension Thread { - static func setThreadLocalStorageValue(_ value: T?, forKey key: AnyObject & NSCopying - ) { + static func setThreadLocalStorageValue(_ value: T?, forKey key: NSCopying) { let currentThread = Thread.current let threadDictionary = currentThread.threadDictionary if let newValue = value { - threadDictionary.setObject(newValue, forKey: key) + threadDictionary[key] = newValue } else { - threadDictionary.removeObject(forKey: key) + threadDictionary[key] = nil } - } - static func getThreadLocalStorageValueForKey(_ key: AnyObject & NSCopying) -> T? { + + static func getThreadLocalStorageValueForKey(_ key: NSCopying) -> T? { let currentThread = Thread.current let threadDictionary = currentThread.threadDictionary return threadDictionary[key] as? T } } - + #endif diff --git a/Example/Pods/RxSwift/Platform/Platform.Linux.swift b/Example/Pods/RxSwift/Platform/Platform.Linux.swift new file mode 100644 index 0000000..570f8f0 --- /dev/null +++ b/Example/Pods/RxSwift/Platform/Platform.Linux.swift @@ -0,0 +1,37 @@ +// +// Platform.Linux.swift +// Platform +// +// Created by Krunoslav Zaher on 12/29/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +#if os(Linux) + + import class Foundation.Thread + + extension Thread { + + static func setThreadLocalStorageValue(_ value: T?, forKey key: String) { + let currentThread = Thread.current + var threadDictionary = currentThread.threadDictionary + + if let newValue = value { + threadDictionary[key] = newValue + } + else { + threadDictionary[key] = nil + } + + currentThread.threadDictionary = threadDictionary + } + + static func getThreadLocalStorageValueForKey(_ key: String) -> T? { + let currentThread = Thread.current + let threadDictionary = currentThread.threadDictionary + + return threadDictionary[key] as? T + } + } + +#endif diff --git a/Example/Pods/RxSwift/Platform/RecursiveLock.swift b/Example/Pods/RxSwift/Platform/RecursiveLock.swift new file mode 100644 index 0000000..c03471d --- /dev/null +++ b/Example/Pods/RxSwift/Platform/RecursiveLock.swift @@ -0,0 +1,34 @@ +// +// RecursiveLock.swift +// Platform +// +// Created by Krunoslav Zaher on 12/18/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +import class Foundation.NSRecursiveLock + +#if TRACE_RESOURCES + class RecursiveLock: NSRecursiveLock { + override init() { + _ = Resources.incrementTotal() + super.init() + } + + override func lock() { + super.lock() + _ = Resources.incrementTotal() + } + + override func unlock() { + super.unlock() + _ = Resources.decrementTotal() + } + + deinit { + _ = Resources.decrementTotal() + } + } +#else + typealias RecursiveLock = NSRecursiveLock +#endif diff --git a/Example/Pods/RxSwift/README.md b/Example/Pods/RxSwift/README.md index b570c7e..03270a0 100644 --- a/Example/Pods/RxSwift/README.md +++ b/Example/Pods/RxSwift/README.md @@ -1,19 +1,15 @@ Miss Electric Eel 2016 RxSwift: ReactiveX for Swift ====================================== -[![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) +[![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%20macOS%20%7C%20tvOS%20%7C%20watchOS%20%7C%20Linux-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) [![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager) -## About Rx - -**:warning: This readme describes RxSwift 3.0 version that requires Swift 3.0.** - -**: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.** +* RxSwift 3.x / Swift 3.x can be found in [**rxswift-3.0** branch](https://github.com/ReactiveX/RxSwift/tree/rxswift-3.0). Rx is a [generic abstraction of computation](https://youtu.be/looJcaeboBY) expressed through `Observable` interface. This is a Swift version of [Rx](https://github.com/Reactive-Extensions/Rx.NET). -It tries to port as many concepts from the original version as possible, but some concepts were adapted for more pleasant and performant integration with iOS/OSX environment. +It tries to port as many concepts from the original version as possible, but some concepts were adapted for more pleasant and performant integration with iOS/macOS environment. Cross platform documentation can be found on [ReactiveX.io](http://reactivex.io/). @@ -27,14 +23,12 @@ KVO observing, async operations and streams are all unified under [abstraction o * [why use rx?](Documentation/Why.md) * [the basics, getting started with RxSwift](Documentation/GettingStarted.md) -* [units](Documentation/Units.md) - what is `Driver`, `ControlProperty`, and `Variable` ... and why do they exist? +* [traits](Documentation/Traits.md) - what are `Single`, `Completable`, `Maybe`, `Driver`, `ControlProperty`, and `Variable` ... and why do they exist? * [testing](Documentation/UnitTests.md) * [tips and common errors](Documentation/Tips.md) * [debugging](Documentation/GettingStarted.md#debugging) * [the math behind Rx](Documentation/MathBehindRx.md) * [what are hot and cold observable sequences?](Documentation/HotAndColdObservables.md) -* [what does the the public API look like?](Documentation/API.md) - ###### ... install @@ -47,10 +41,10 @@ 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.
[![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.
[![Slack channel](http://rxswift-slack.herokuapp.com/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](.github/ISSUE_TEMPLATE.md) * Request a new feature. [Open an Issue With Feature Request Template](Documentation/NewFeatureRequestTemplate.md) - +* Help out [Check out contribution guide](CONTRIBUTING.md) ###### ... compare @@ -80,14 +74,13 @@ KVO observing, async operations and streams are all unified under [abstraction o
-let searchResults = searchBar.rx.text
+let searchResults = searchBar.rx.text.orEmpty
     .throttle(0.3, scheduler: MainScheduler.instance)
     .distinctUntilChanged()
-    .flatMapLatest { query -> Observable<[Repository]> in
+    .flatMapLatest { query -> Observable<[Repository]> in
         if query.isEmpty {
             return .just([])
         }
-
         return searchGitHub(query)
             .catchErrorJustReturn([])
     }
@@ -99,25 +92,22 @@ let searchResults = searchBar.rx.text
   
     
 searchResults
-    .bindTo(tableView.rx.items(cellIdentifier: "Cell")) {
+    .bind(to: tableView.rx.items(cellIdentifier: "Cell")) {
         (index, repository: Repository, cell) in
         cell.textLabel?.text = repository.name
         cell.detailTextLabel?.text = repository.url
     }
-    .addDisposableTo(disposeBag)
+ .disposed(by: disposeBag)
## Requirements -* Xcode 8.0 GM (8A218a) -* Swift 3.0 - -* iOS 8.0+ -* Mac OS X 10.10+ -* tvOS 9.0+ -* watchOS 2.0+ +* Xcode 9.0 +* Swift 4.0 +* Swift 3.x ([use `rxswift-3.0` branch](https://github.com/ReactiveX/RxSwift/tree/rxswift-3.0) instead) +* Swift 2.3 ([use `rxswift-2.0` branch](https://github.com/ReactiveX/RxSwift/tree/rxswift-2.0) instead) ## Installation @@ -131,59 +121,81 @@ Open Rx.xcworkspace, choose `RxExample` and hit run. This method will build ever ### [CocoaPods](https://guides.cocoapods.org/using/using-cocoapods.html) -``` +**Tested with `pod --version`: `1.3.1`** + +```ruby # Podfile use_frameworks! target 'YOUR_TARGET_NAME' do - pod 'RxSwift', '~> 3.0.0-beta.1' - pod 'RxCocoa', '~> 3.0.0-beta.1' + pod 'RxSwift', '~> 4.0' + pod 'RxCocoa', '~> 4.0' end -# RxTests and RxBlocking make the most sense in the context of unit/integration tests +# RxTest and RxBlocking make the most sense in the context of unit/integration tests target 'YOUR_TESTING_TARGET' do - pod 'RxBlocking', '~> 3.0.0-beta.1' - pod 'RxTests', '~> 3.0.0-beta.1' + pod 'RxBlocking', '~> 4.0' + pod 'RxTest', '~> 4.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 -``` - -``` +```bash $ pod install ``` ### [Carthage](https://github.com/Carthage/Carthage) +**Tested with `carthage version`: `0.26.2`** + Add this to `Cartfile` ``` -github "ReactiveX/RxSwift" "3.0.0-beta.1" +github "ReactiveX/RxSwift" ~> 4.0 ``` -``` +```bash $ carthage update ``` +### [Swift Package Manager](https://github.com/apple/swift-package-manager) + +**Tested with `swift build --version`: `Swift 4.0.0-dev (swiftpm-13126)`** + +Create a `Package.swift` file. + +```swift +// swift-tools-version:4.0 + +import PackageDescription + +let package = Package( + name: "RxTestProject", + dependencies: [ + .package(url: "https://github.com/ReactiveX/RxSwift.git", "4.0.0" ..< "5.0.0") + ], + targets: [ + .target(name: "RxTestProject", dependencies: ["RxSwift", "RxCocoa"]) + ] +) +``` + +```bash +$ swift build +``` + +To build or test a module with RxTest dependency, set `TEST=1`. ([RxSwift >= 3.4.2](https://github.com/ReactiveX/RxSwift/releases/tag/3.4.2)) + +```bash +$ TEST=1 swift test +``` + ### Manually using git submodules * Add RxSwift as a submodule -``` +```bash $ git submodule add git@github.com:ReactiveX/RxSwift.git ``` @@ -195,6 +207,8 @@ $ git submodule add git@github.com:ReactiveX/RxSwift.git * [http://reactivex.io/](http://reactivex.io/) * [Reactive Extensions GitHub (GitHub)](https://github.com/Reactive-Extensions) +* [RxSwift RayWenderlich.com Book](https://store.raywenderlich.com/products/rxswift-reactive-programming-with-swift) +* [Boxue.io RxSwift Online Course](https://boxueio.com/series/rxswift-101) (Chinese 🇨🇳) * [Erik Meijer (Wikipedia)](http://en.wikipedia.org/wiki/Erik_Meijer_%28computer_scientist%29) * [Expert to Expert: Brian Beckman and Erik Meijer - Inside the .NET Reactive Framework (Rx) (video)](https://youtu.be/looJcaeboBY) * [Reactive Programming Overview (Jafar Husain from Netflix)](https://www.youtube.com/watch?v=dwP1TNXE6fc) diff --git a/Example/Pods/RxSwift/RxSwift/AnyObserver.swift b/Example/Pods/RxSwift/RxSwift/AnyObserver.swift index d1e2171..dd4f9c4 100644 --- a/Example/Pods/RxSwift/RxSwift/AnyObserver.swift +++ b/Example/Pods/RxSwift/RxSwift/AnyObserver.swift @@ -1,75 +1,72 @@ // // AnyObserver.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/28/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -/** -A type-erased `ObserverType`. - -Forwards operations to an arbitrary underlying observer with the same `Element` type, hiding the specifics of the underlying observer type. -*/ +/// A type-erased `ObserverType`. +/// +/// Forwards operations to an arbitrary underlying observer with the same `Element` type, hiding the specifics of the underlying observer type. public struct AnyObserver : ObserverType { - /** - The type of elements in sequence that observer can observe. - */ + /// The type of elements in sequence that observer can observe. public typealias E = Element - /** - Anonymous event handler type. - */ + /// Anonymous event handler type. public typealias EventHandler = (Event) -> Void - public let observer: EventHandler + private let observer: EventHandler - /** - Construct an instance whose `on(event)` calls `eventHandler(event)` - - - parameter eventHandler: Event handler that observes sequences events. - */ + /// Construct an instance whose `on(event)` calls `eventHandler(event)` + /// + /// - parameter eventHandler: Event handler that observes sequences events. public init(eventHandler: @escaping EventHandler) { self.observer = eventHandler } - /** - Construct an instance whose `on(event)` calls `observer.on(event)` - - - parameter observer: Observer that receives sequence events. - */ + /// Construct an instance whose `on(event)` calls `observer.on(event)` + /// + /// - parameter observer: Observer that receives sequence events. public init(_ observer: O) where O.E == Element { self.observer = observer.on } - /** - Send `event` to this observer. - - - parameter event: Event instance. - */ + /// Send `event` to this observer. + /// + /// - parameter event: Event instance. public func on(_ event: Event) { return self.observer(event) } - /** - Erases type of observer and returns canonical observer. - - - returns: type erased observer. - */ + /// Erases type of observer and returns canonical observer. + /// + /// - returns: type erased observer. public func asObserver() -> AnyObserver { return self } } +extension AnyObserver { + /// Collection of `AnyObserver`s + typealias s = Bag<(Event) -> ()> +} + extension ObserverType { - /** - Erases type of observer and returns canonical observer. - - - returns: type erased observer. - */ + /// Erases type of observer and returns canonical observer. + /// + /// - returns: type erased observer. public func asObserver() -> AnyObserver { return AnyObserver(self) } + + /// Transforms observer of type R to type E using custom transform method. + /// Each event sent to result observer is transformed and sent to `self`. + /// + /// - returns: observer that transforms events. + public func mapObserver(_ transform: @escaping (R) throws -> E) -> AnyObserver { + return AnyObserver { e in + self.on(e.map(transform)) + } + } } diff --git a/Example/Pods/RxSwift/RxSwift/Cancelable.swift b/Example/Pods/RxSwift/RxSwift/Cancelable.swift index 209379c..1fa7a67 100644 --- a/Example/Pods/RxSwift/RxSwift/Cancelable.swift +++ b/Example/Pods/RxSwift/RxSwift/Cancelable.swift @@ -1,28 +1,13 @@ // // Cancelable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/12/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -/** -Represents disposable resource with state tracking. -*/ +/// Represents disposable resource with state tracking. public protocol Cancelable : Disposable { - /** - - returns: Was resource disposed. - */ + /// Was resource disposed. var isDisposed: Bool { get } } - -public extension Cancelable { - - @available(*, deprecated, renamed: "isDisposed") - var disposed: Bool { - return isDisposed - } - -} diff --git a/Example/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift b/Example/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift index c534678..7fbf8c9 100644 --- a/Example/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift +++ b/Example/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift @@ -1,13 +1,11 @@ // // AsyncLock.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/21/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - /** In case nobody holds this lock, the work will be queued and executed immediately on thread that is requesting lock. @@ -18,7 +16,7 @@ and pending work. That means that enqueued work could possibly be executed later on a different thread. */ -class AsyncLock +final class AsyncLock : Disposable , Lock , SynchronizedDisposeType { @@ -60,7 +58,7 @@ class AsyncLock private func dequeue() -> I? { _lock.lock(); defer { _lock.unlock() } // { - if _queue.count > 0 { + if !_queue.isEmpty { return _queue.dequeue() } else { diff --git a/Example/Pods/RxSwift/RxSwift/Concurrency/Lock.swift b/Example/Pods/RxSwift/RxSwift/Concurrency/Lock.swift index 5c9a2ae..52afc1c 100644 --- a/Example/Pods/RxSwift/RxSwift/Concurrency/Lock.swift +++ b/Example/Pods/RxSwift/RxSwift/Concurrency/Lock.swift @@ -1,107 +1,36 @@ // // Lock.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/31/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - protocol Lock { func lock() func unlock() } -#if os(Linux) - import Glibc - - /** - Simple wrapper for spin lock. - */ - class SpinLock { - private var _lock: pthread_spinlock_t = 0 - - init() { - if (pthread_spin_init(&_lock, 0) != 0) { - fatalError("Spin lock initialization failed") - } - } - - func lock() { - pthread_spin_lock(&_lock) - } - - func unlock() { - pthread_spin_unlock(&_lock) - } - - func performLocked(@noescape action: () -> Void) { - lock(); defer { unlock() } - action() - } - - func calculateLocked(@noescape action: () -> T) -> T { - lock(); defer { unlock() } - return action() - } - - func calculateLockedOrFail(@noescape action: () throws -> T) throws -> T { - lock(); defer { unlock() } - let result = try action() - return result - } - - deinit { - pthread_spin_destroy(&_lock) - } - } -#else - - // https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000321.html - typealias SpinLock = NSRecursiveLock -#endif +// https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000321.html +typealias SpinLock = RecursiveLock -extension NSRecursiveLock : Lock { - func performLocked(_ action: () -> Void) { +extension RecursiveLock : Lock { + @inline(__always) + final func performLocked(_ action: () -> Void) { lock(); defer { unlock() } action() } - func calculateLocked(_ action: () -> T) -> T { + @inline(__always) + final func calculateLocked(_ action: () -> T) -> T { lock(); defer { unlock() } return action() } - func calculateLockedOrFail(_ action: () throws -> T) throws -> T { + @inline(__always) + final func calculateLockedOrFail(_ action: () throws -> T) throws -> T { lock(); defer { unlock() } let result = try action() return result } } - -/* -let RECURSIVE_MUTEX = _initializeRecursiveMutex() - -func _initializeRecursiveMutex() -> pthread_mutex_t { - var mutex: pthread_mutex_t = pthread_mutex_t() - var mta: pthread_mutexattr_t = pthread_mutexattr_t() - - pthread_mutex_init(&mutex, nil) - pthread_mutexattr_init(&mta) - pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE) - pthread_mutex_init(&mutex, &mta) - - return mutex -} - -extension pthread_mutex_t { - mutating func lock() { - pthread_mutex_lock(&self) - } - - mutating func unlock() { - pthread_mutex_unlock(&self) - } -} -*/ diff --git a/Example/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift b/Example/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift index fe61d72..eca8d8e 100644 --- a/Example/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift +++ b/Example/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift @@ -1,15 +1,13 @@ // // LockOwnerType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 10/25/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - protocol LockOwnerType : class, Lock { - var _lock: NSRecursiveLock { get } + var _lock: RecursiveLock { get } } extension LockOwnerType { diff --git a/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift b/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift index 5764575..af9548f 100644 --- a/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift +++ b/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift @@ -1,13 +1,11 @@ // // SynchronizedDisposeType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 10/25/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - protocol SynchronizedDisposeType : class, Disposable, Lock { func _synchronized_dispose() } @@ -17,4 +15,4 @@ extension SynchronizedDisposeType { lock(); defer { unlock() } _synchronized_dispose() } -} \ No newline at end of file +} diff --git a/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift b/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift index 366253e..8dfc556 100644 --- a/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift +++ b/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift @@ -1,13 +1,11 @@ // // SynchronizedOnType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 10/25/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - protocol SynchronizedOnType : class, ObserverType, Lock { func _synchronized_on(_ event: Event) } diff --git a/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedSubscribeType.swift b/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedSubscribeType.swift deleted file mode 100644 index 04fbdad..0000000 --- a/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedSubscribeType.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// SynchronizedSubscribeType.swift -// Rx -// -// Created by Krunoslav Zaher on 10/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -protocol SynchronizedSubscribeType : class, ObservableType, Lock { - func _synchronized_subscribe(_ observer: O) -> Disposable where O.E == E -} - -extension SynchronizedSubscribeType { - func synchronizedSubscribe(_ observer: O) -> Disposable where O.E == E { - lock(); defer { unlock() } - return _synchronized_subscribe(observer) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift b/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift index ce5deda..bb1aa7e 100644 --- a/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift +++ b/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift @@ -1,13 +1,11 @@ // // SynchronizedUnsubscribeType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 10/25/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - protocol SynchronizedUnsubscribeType : class { associatedtype DisposeKey diff --git a/Example/Pods/RxSwift/RxSwift/ConnectableObservableType.swift b/Example/Pods/RxSwift/RxSwift/ConnectableObservableType.swift index 6722a4c..52bf93c 100644 --- a/Example/Pods/RxSwift/RxSwift/ConnectableObservableType.swift +++ b/Example/Pods/RxSwift/RxSwift/ConnectableObservableType.swift @@ -1,13 +1,11 @@ // // ConnectableObservableType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/1/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - /** Represents an observable sequence wrapper that can be connected and disconnected from its underlying observable sequence. */ @@ -18,4 +16,4 @@ public protocol ConnectableObservableType : ObservableType { - returns: Disposable used to disconnect the observable wrapper from its source, causing subscribed observer to stop receiving values from the underlying observable sequence. */ func connect() -> Disposable -} \ No newline at end of file +} diff --git a/Example/Pods/RxSwift/RxSwift/DataStructures/Bag.swift b/Example/Pods/RxSwift/RxSwift/DataStructures/Bag.swift deleted file mode 100644 index d09078e..0000000 --- a/Example/Pods/RxSwift/RxSwift/DataStructures/Bag.swift +++ /dev/null @@ -1,336 +0,0 @@ -// -// Bag.swift -// Rx -// -// Created by Krunoslav Zaher on 2/28/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation -import Swift - -let arrayDictionaryMaxSize = 30 - -/** -Class that enables using memory allocations as a means to uniquely identify objects. -*/ -class Identity { - // weird things have known to happen with Swift - var _forceAllocation: Int32 = 0 -} - -func hash(_ _x: Int) -> Int { - var x = _x - x = ((x >> 16) ^ x) &* 0x45d9f3b - x = ((x >> 16) ^ x) &* 0x45d9f3b - x = ((x >> 16) ^ x) - return x; -} - -/** -Unique identifier for object added to `Bag`. -*/ -public struct BagKey : Hashable { - let uniqueIdentity: Identity? - let key: Int - - public var hashValue: Int { - if let uniqueIdentity = uniqueIdentity { - return hash(key) ^ (ObjectIdentifier(uniqueIdentity).hashValue) - } - else { - return hash(key) - } - } -} - -/** -Compares two `BagKey`s. -*/ -public func == (lhs: BagKey, rhs: BagKey) -> Bool { - return lhs.key == rhs.key && lhs.uniqueIdentity === rhs.uniqueIdentity -} - -/** -Data structure that represents a bag of elements typed `T`. - -Single element can be stored multiple times. - -Time and space complexity of insertion an deletion is O(n). - -It is suitable for storing small number of elements. -*/ -public struct Bag : CustomDebugStringConvertible { - /** - Type of identifier for inserted elements. - */ - public typealias KeyType = BagKey - - fileprivate typealias ScopeUniqueTokenType = Int - - typealias Entry = (key: BagKey, value: T) - - fileprivate var _uniqueIdentity: Identity? - fileprivate var _nextKey: ScopeUniqueTokenType = 0 - - // data - - // first fill inline variables - fileprivate var _key0: BagKey? = nil - fileprivate var _value0: T? = nil - - fileprivate var _key1: BagKey? = nil - fileprivate var _value1: T? = nil - - // then fill "array dictionary" - fileprivate var _pairs = ContiguousArray() - - // last is sparse dictionary - fileprivate var _dictionary: [BagKey : T]? = nil - - fileprivate var _onlyFastPath = true - - /** - Creates new empty `Bag`. - */ - public init() { - } - - /** - Inserts `value` into bag. - - - parameter element: Element to insert. - - returns: Key that can be used to remove element from bag. - */ - public mutating func insert(_ element: T) -> BagKey { - _nextKey = _nextKey &+ 1 - -#if DEBUG - _nextKey = _nextKey % 20 -#endif - - if _nextKey == 0 { - _uniqueIdentity = Identity() - } - - let key = BagKey(uniqueIdentity: _uniqueIdentity, key: _nextKey) - - if _key0 == nil { - _key0 = key - _value0 = element - return key - } - - _onlyFastPath = false - - if _key1 == nil { - _key1 = key - _value1 = element - return key - } - - if _dictionary != nil { - _dictionary![key] = element - return key - } - - if _pairs.count < arrayDictionaryMaxSize { - _pairs.append(key: key, value: element) - return key - } - - if _dictionary == nil { - _dictionary = [:] - } - - _dictionary![key] = element - - return key - } - - /** - - returns: Number of elements in bag. - */ - public var count: Int { - let dictionaryCount: Int = _dictionary?.count ?? 0 - return _pairs.count + (_value0 != nil ? 1 : 0) + (_value1 != nil ? 1 : 0) + dictionaryCount - } - - /** - Removes all elements from bag and clears capacity. - */ - public mutating func removeAll() { - _key0 = nil - _value0 = nil - _key1 = nil - _value1 = nil - - _pairs.removeAll(keepingCapacity: false) - _dictionary?.removeAll(keepingCapacity: false) - } - - /** - Removes element with a specific `key` from bag. - - - parameter key: Key that identifies element to remove from bag. - - returns: Element that bag contained, or nil in case element was already removed. - */ - public mutating func removeKey(_ key: BagKey) -> T? { - if _key0 == key { - _key0 = nil - let value = _value0! - _value0 = nil - return value - } - - if _key1 == key { - _key1 = nil - let value = _value1! - _value1 = nil - return value - } - - if let existingObject = _dictionary?.removeValue(forKey: key) { - return existingObject - } - - for i in 0 ..< _pairs.count { - if _pairs[i].key == key { - let value = _pairs[i].value - _pairs.remove(at: i) - return value - } - } - - return nil - } -} - -extension Bag { - /** - A textual representation of `self`, suitable for debugging. - */ - public var debugDescription : String { - return "\(self.count) elements in Bag" - } -} - - -// MARK: forEach - -extension Bag { - /** - Enumerates elements inside the bag. - - - parameter action: Enumeration closure. - */ - public func forEach(_ action: (T) -> Void) { - if _onlyFastPath { - if let value0 = _value0 { - action(value0) - } - return - } - - let pairs = _pairs - let value0 = _value0 - let value1 = _value1 - let dictionary = _dictionary - - if let value0 = value0 { - action(value0) - } - - if let value1 = value1 { - action(value1) - } - - for i in 0 ..< pairs.count { - action(pairs[i].value) - } - - if dictionary?.count ?? 0 > 0 { - for element in dictionary!.values { - action(element) - } - } - } -} - -extension Bag where T: ObserverType { - /** - Dispatches `event` to app observers contained inside bag. - - - parameter action: Enumeration closure. - */ - public func on(_ event: Event) { - if _onlyFastPath { - _value0?.on(event) - return - } - - let pairs = _pairs - let value0 = _value0 - let value1 = _value1 - let dictionary = _dictionary - - if let value0 = value0 { - value0.on(event) - } - - if let value1 = value1 { - value1.on(event) - } - - for i in 0 ..< pairs.count { - pairs[i].value.on(event) - } - - if dictionary?.count ?? 0 > 0 { - for element in dictionary!.values { - element.on(event) - } - } - } -} - -/** -Dispatches `dispose` to all disposables contained inside bag. -*/ -@available(*, deprecated, renamed: "disposeAll(in:)") -public func disposeAllIn(_ bag: Bag) { - disposeAll(in: bag) -} - -/** - Dispatches `dispose` to all disposables contained inside bag. - */ -public func disposeAll(in bag: Bag) { - if bag._onlyFastPath { - bag._value0?.dispose() - return - } - - let pairs = bag._pairs - let value0 = bag._value0 - let value1 = bag._value1 - let dictionary = bag._dictionary - - if let value0 = value0 { - value0.dispose() - } - - if let value1 = value1 { - value1.dispose() - } - - for i in 0 ..< pairs.count { - pairs[i].value.dispose() - } - - if dictionary?.count ?? 0 > 0 { - for element in dictionary!.values { - element.dispose() - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Deprecated.swift b/Example/Pods/RxSwift/RxSwift/Deprecated.swift new file mode 100644 index 0000000..0337d82 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Deprecated.swift @@ -0,0 +1,228 @@ +// +// Deprecated.swift +// RxSwift +// +// Created by Krunoslav Zaher on 3/5/17. +// Copyright © 2017 Krunoslav Zaher. All rights reserved. +// + +extension Observable { + /** + Converts a optional to an observable sequence. + + - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) + + - parameter optional: Optional element in the resulting observable sequence. + - returns: An observable sequence containing the wrapped value or not from given optional. + */ + @available(*, deprecated, message: "Implicit conversions from any type to optional type are allowed and that is causing issues with `from` operator overloading.", renamed: "from(optional:)") + public static func from(_ optional: E?) -> Observable { + return Observable.from(optional: optional) + } + + /** + Converts a optional to an observable sequence. + + - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) + + - parameter optional: Optional element in the resulting observable sequence. + - parameter scheduler: Scheduler to send the optional element on. + - returns: An observable sequence containing the wrapped value or not from given optional. + */ + @available(*, deprecated, message: "Implicit conversions from any type to optional type are allowed and that is causing issues with `from` operator overloading.", renamed: "from(optional:scheduler:)") + public static func from(_ optional: E?, scheduler: ImmediateSchedulerType) -> Observable { + return Observable.from(optional: optional, scheduler: scheduler) + } +} + +extension ObservableType { + /** + + Projects each element of an observable sequence into a new form by incorporating the element's index. + + - seealso: [map operator on reactivex.io](http://reactivex.io/documentation/operators/map.html) + + - parameter selector: A transform function to apply to each source element; the second parameter of the function represents the index of the source element. + - returns: An observable sequence whose elements are the result of invoking the transform function on each element of source. + */ + @available(*, deprecated, message: "Please use enumerated().map()") + public func mapWithIndex(_ selector: @escaping (E, Int) throws -> R) + -> Observable { + return enumerated().map { try selector($0.element, $0.index) } + } + + + /** + + Projects each element of an observable sequence to an observable sequence by incorporating the element's index and merges the resulting observable sequences into one observable sequence. + + - seealso: [flatMap operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) + + - parameter selector: A transform function to apply to each element; the second parameter of the function represents the index of the source 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. + */ + @available(*, deprecated, message: "Please use enumerated().flatMap()") + public func flatMapWithIndex(_ selector: @escaping (E, Int) throws -> O) + -> Observable { + return enumerated().flatMap { try selector($0.element, $0.index) } + } + + /** + + Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. + The element's index is used in the logic of the predicate function. + + - seealso: [skipWhile operator on reactivex.io](http://reactivex.io/documentation/operators/skipwhile.html) + + - parameter predicate: A function to test each element for a condition; the second parameter of the function represents the index of the source element. + - returns: An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. + */ + @available(*, deprecated, message: "Please use enumerated().skipWhile().map()") + public func skipWhileWithIndex(_ predicate: @escaping (E, Int) throws -> Bool) -> Observable { + return enumerated().skipWhile { try predicate($0.element, $0.index) }.map { $0.element } + } + + + /** + + Returns elements from an observable sequence as long as a specified condition is true. + + The element's index is used in the logic of the predicate function. + + - seealso: [takeWhile operator on reactivex.io](http://reactivex.io/documentation/operators/takewhile.html) + + - parameter predicate: A function to test each element for a condition; the second parameter of the function represents the index of the source element. + - returns: An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. + */ + @available(*, deprecated, message: "Please use enumerated().takeWhile().map()") + public func takeWhileWithIndex(_ predicate: @escaping (E, Int) throws -> Bool) -> Observable { + return enumerated().takeWhile { try predicate($0.element, $0.index) }.map { $0.element } + } +} + +extension Disposable { + /// Deprecated in favor of `disposed(by:)` + /// + /// + /// Adds `self` to `bag`. + /// + /// - parameter bag: `DisposeBag` to add `self` to. + @available(*, deprecated, message: "use disposed(by:) instead", renamed: "disposed(by:)") + public func addDisposableTo(_ bag: DisposeBag) { + disposed(by: bag) + } +} + + +extension ObservableType { + + /** + Returns an observable sequence that shares a single subscription to the underlying sequence, and immediately upon subscription replays latest element in buffer. + + This operator is a specialization of replay which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. + + - seealso: [shareReplay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) + + - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. + */ + @available(*, deprecated, message: "use share(replay: 1) instead", renamed: "share(replay:)") + public func shareReplayLatestWhileConnected() + -> Observable { + return share(replay: 1, scope: .whileConnected) + } +} + + +extension ObservableType { + + /** + Returns an observable sequence that shares a single subscription to the underlying sequence, and immediately upon subscription replays maximum number of elements in buffer. + + This operator is a specialization of replay which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. + + - seealso: [shareReplay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) + + - parameter bufferSize: Maximum element count of the replay buffer. + - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. + */ + @available(*, deprecated, message: "Suggested replacement is `share(replay: 1)`. In case old 3.x behavior of `shareReplay` is required please use `share(replay: 1, scope: .forever)` instead.", renamed: "share(replay:)") + public func shareReplay(_ bufferSize: Int) + -> Observable { + return self.share(replay: bufferSize, scope: .forever) + } +} + +/// Variable is a wrapper for `BehaviorSubject`. +/// +/// Unlike `BehaviorSubject` it can't terminate with error, and when variable is deallocated +/// it will complete its observable sequence (`asObservable`). +/// +/// **This concept will be deprecated from RxSwift but offical migration path hasn't been decided yet.** +/// https://github.com/ReactiveX/RxSwift/issues/1501 +/// +/// Current recommended replacement for this API is `RxCocoa.BehaviorRelay` because: +/// * `Variable` isn't a standard cross platform concept, hence it's out of place in RxSwift target. +/// * It doesn't have a counterpart for handling events (`PublishRelay`). It models state only. +/// * It doesn't have a consistent naming with *Relay or other Rx concepts. +/// * It has an inconsistent memory management model compared to other parts of RxSwift (completes on `deinit`). +/// +/// Once plans are finalized, official availability attribute will be added in one of upcoming versions. +public final class Variable { + + public typealias E = Element + + private let _subject: BehaviorSubject + + private var _lock = SpinLock() + + // state + private var _value: E + + #if DEBUG + fileprivate let _synchronizationTracker = SynchronizationTracker() + #endif + + /// Gets or sets current value of variable. + /// + /// Whenever a new value is set, all the observers are notified of the change. + /// + /// Even if the newly set value is same as the old value, observers are still notified for change. + public var value: E { + get { + _lock.lock(); defer { _lock.unlock() } + return _value + } + set(newValue) { + #if DEBUG + _synchronizationTracker.register(synchronizationErrorMessage: .variable) + defer { _synchronizationTracker.unregister() } + #endif + _lock.lock() + _value = newValue + _lock.unlock() + + _subject.on(.next(newValue)) + } + } + + /// Initializes variable with initial value. + /// + /// - parameter value: Initial variable value. + public init(_ value: Element) { + #if DEBUG + DeprecationWarner.warnIfNeeded(.variable) + #endif + + _value = value + _subject = BehaviorSubject(value: value) + } + + /// - returns: Canonical interface for push style sequence + public func asObservable() -> Observable { + return _subject + } + + deinit { + _subject.on(.completed) + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Disposable.swift b/Example/Pods/RxSwift/RxSwift/Disposable.swift index da760ff..b79c77a 100644 --- a/Example/Pods/RxSwift/RxSwift/Disposable.swift +++ b/Example/Pods/RxSwift/RxSwift/Disposable.swift @@ -1,15 +1,13 @@ // // Disposable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/8/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -/// Respresents a disposable resource. +/// Represents a disposable resource. public protocol Disposable { /// Dispose resource. func dispose() -} \ No newline at end of file +} diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift index d60b5b1..449ee3d 100644 --- a/Example/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift +++ b/Example/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift @@ -1,38 +1,29 @@ // // AnonymousDisposable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/15/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -/** -Represents an Action-based disposable. - -When dispose method is called, disposal action will be dereferenced. -*/ -public final class AnonymousDisposable : DisposeBase, Cancelable { +/// Represents an Action-based disposable. +/// +/// When dispose method is called, disposal action will be dereferenced. +fileprivate final class AnonymousDisposable : DisposeBase, Cancelable { public typealias DisposeAction = () -> Void - private var _isDisposed: AtomicInt = 0 + private var _isDisposed = AtomicInt(0) private var _disposeAction: DisposeAction? - /** - - returns: Was resource disposed. - */ + /// - returns: Was resource disposed. public var isDisposed: Bool { - return _isDisposed == 1 + return _isDisposed.isFlagSet(1) } - /** - Constructs a new disposable with the given action used for disposal. - - - parameter disposeAction: Disposal action which will be run upon calling `dispose`. - */ - @available(*, deprecated, renamed: "Disposables.create") - public init(_ disposeAction: @escaping DisposeAction) { + /// Constructs a new disposable with the given action used for disposal. + /// + /// - parameter disposeAction: Disposal action which will be run upon calling `dispose`. + fileprivate init(_ disposeAction: @escaping DisposeAction) { _disposeAction = disposeAction super.init() } @@ -43,14 +34,12 @@ public final class AnonymousDisposable : DisposeBase, Cancelable { super.init() } - /** - Calls the disposal action if and only if the current instance hasn't been disposed yet. - - After invoking disposal action, disposal action will be dereferenced. - */ - public func dispose() { - if AtomicCompareAndSwap(0, 1, &_isDisposed) { - assert(_isDisposed == 1) + /// Calls the disposal action if and only if the current instance hasn't been disposed yet. + /// + /// After invoking disposal action, disposal action will be dereferenced. + fileprivate func dispose() { + if _isDisposed.fetchOr(1) == 0 { + assert(_isDisposed.load() == 1) if let action = _disposeAction { _disposeAction = nil @@ -60,14 +49,12 @@ public final class AnonymousDisposable : DisposeBase, Cancelable { } } -public extension Disposables { +extension Disposables { - /** - Constructs a new disposable with the given action used for disposal. - - - parameter dispose: Disposal action which will be run upon calling `dispose`. - */ - static func create(with dispose: @escaping () -> ()) -> Cancelable { + /// Constructs a new disposable with the given action used for disposal. + /// + /// - parameter dispose: Disposal action which will be run upon calling `dispose`. + public static func create(with dispose: @escaping () -> ()) -> Cancelable { return AnonymousDisposable(disposeAction: dispose) } diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift index 1c597f4..949476c 100644 --- a/Example/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift +++ b/Example/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift @@ -6,45 +6,35 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -/** -Represents two disposable resources that are disposed together. -*/ +/// Represents two disposable resources that are disposed together. private final class BinaryDisposable : DisposeBase, Cancelable { - private var _isDisposed: AtomicInt = 0 + private var _isDisposed = AtomicInt(0) // state private var _disposable1: Disposable? private var _disposable2: Disposable? - /** - - returns: Was resource disposed. - */ + /// - returns: Was resource disposed. var isDisposed: Bool { - return _isDisposed > 0 + return _isDisposed.isFlagSet(1) } - /** - Constructs new binary disposable from two disposables. - - - parameter disposable1: First disposable - - parameter disposable2: Second disposable - */ + /// Constructs new binary disposable from two disposables. + /// + /// - parameter disposable1: First disposable + /// - parameter disposable2: Second disposable init(_ disposable1: Disposable, _ disposable2: Disposable) { _disposable1 = disposable1 _disposable2 = disposable2 super.init() } - /** - Calls the disposal action if and only if the current instance hasn't been disposed yet. - - After invoking disposal action, disposal action will be dereferenced. - */ + /// Calls the disposal action if and only if the current instance hasn't been disposed yet. + /// + /// After invoking disposal action, disposal action will be dereferenced. func dispose() { - if AtomicCompareAndSwap(0, 1, &_isDisposed) { + if _isDisposed.fetchOr(1) == 0 { _disposable1?.dispose() _disposable2?.dispose() _disposable1 = nil @@ -53,12 +43,10 @@ private final class BinaryDisposable : DisposeBase, Cancelable { } } -public extension Disposables { +extension Disposables { - /** - Creates a disposable with the given disposables. - */ - static func create(_ disposable1: Disposable, _ disposable2: Disposable) -> Cancelable { + /// Creates a disposable with the given disposables. + public static func create(_ disposable1: Disposable, _ disposable2: Disposable) -> Cancelable { return BinaryDisposable(disposable1, disposable2) } diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift index 2464a89..efae55e 100644 --- a/Example/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift +++ b/Example/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift @@ -1,44 +1,32 @@ // // BooleanDisposable.swift -// Rx +// RxSwift // // Created by Junior B. on 10/29/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +/// Represents a disposable resource that can be checked for disposal status. +public final class BooleanDisposable : Cancelable { -/** -Represents a disposable resource that can be checked for disposal status. -*/ -public final class BooleanDisposable : Disposable, Cancelable { - internal static let BooleanDisposableTrue = BooleanDisposable(isDisposed: true) private var _isDisposed = false - /** - Initializes a new instance of the `BooleanDisposable` class - */ + /// Initializes a new instance of the `BooleanDisposable` class public init() { } - /** - Initializes a new instance of the `BooleanDisposable` class with given value - */ + /// Initializes a new instance of the `BooleanDisposable` class with given value public init(isDisposed: Bool) { self._isDisposed = isDisposed } - /** - - returns: Was resource disposed. - */ + /// - returns: Was resource disposed. public var isDisposed: Bool { return _isDisposed } - /** - Sets the status to disposed, which can be observer through the `isDisposed` property. - */ + /// Sets the status to disposed, which can be observer through the `isDisposed` property. public func dispose() { _isDisposed = true } diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift index a7e4b5b..b057817 100644 --- a/Example/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift +++ b/Example/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift @@ -1,19 +1,21 @@ // // CompositeDisposable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/20/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +/// Represents a group of disposable resources that are disposed together. +public final class CompositeDisposable : DisposeBase, Cancelable { + /// Key used to remove disposable from composite disposable + public struct DisposeKey { + fileprivate let key: BagKey + fileprivate init(key: BagKey) { + self.key = key + } + } -/** -Represents a group of disposable resources that are disposed together. -*/ -public final class CompositeDisposable : DisposeBase, Disposable, Cancelable { - public typealias DisposeKey = Bag.KeyType - private var _lock = SpinLock() // state @@ -27,18 +29,14 @@ public final class CompositeDisposable : DisposeBase, Disposable, Cancelable { public override init() { } - /** - Initializes a new instance of composite disposable with the specified number of disposables. - */ + /// Initializes a new instance of composite disposable with the specified number of disposables. public init(_ disposable1: Disposable, _ disposable2: Disposable) { // This overload is here to make sure we are using optimized version up to 4 arguments. let _ = _disposables!.insert(disposable1) let _ = _disposables!.insert(disposable2) } - /** - Initializes a new instance of composite disposable with the specified number of disposables. - */ + /// Initializes a new instance of composite disposable with the specified number of disposables. public init(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable) { // This overload is here to make sure we are using optimized version up to 4 arguments. let _ = _disposables!.insert(disposable1) @@ -46,9 +44,7 @@ public final class CompositeDisposable : DisposeBase, Disposable, Cancelable { let _ = _disposables!.insert(disposable3) } - /** - Initializes a new instance of composite disposable with the specified number of disposables. - */ + /// Initializes a new instance of composite disposable with the specified number of disposables. public init(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable, _ disposable4: Disposable, _ disposables: Disposable...) { // This overload is here to make sure we are using optimized version up to 4 arguments. let _ = _disposables!.insert(disposable1) @@ -61,27 +57,13 @@ public final class CompositeDisposable : DisposeBase, Disposable, Cancelable { } } - /** - Initializes a new instance of composite disposable with the specified number of disposables. - */ + /// Initializes a new instance of composite disposable with the specified number of disposables. public init(disposables: [Disposable]) { for disposable in disposables { let _ = _disposables!.insert(disposable) } } - /** - Adds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed. - - - parameter disposable: Disposable to add. - - returns: Key that can be used to remove disposable from composite disposable. In case dispose bag was already - disposed `nil` will be returned. - */ - @available(*, deprecated, renamed: "insert(_:)") - public func addDisposable(_ disposable: Disposable) -> DisposeKey? { - return insert(disposable) - } - /** Adds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed. @@ -102,44 +84,29 @@ public final class CompositeDisposable : DisposeBase, Disposable, Cancelable { private func _insert(_ disposable: Disposable) -> DisposeKey? { _lock.lock(); defer { _lock.unlock() } - return _disposables?.insert(disposable) + let bagKey = _disposables?.insert(disposable) + return bagKey.map(DisposeKey.init) } - /** - - returns: Gets the number of disposables contained in the `CompositeDisposable`. - */ + /// - returns: Gets the number of disposables contained in the `CompositeDisposable`. public var count: Int { _lock.lock(); defer { _lock.unlock() } return _disposables?.count ?? 0 } - /** - Removes and disposes the disposable identified by `disposeKey` from the CompositeDisposable. - - - parameter disposeKey: Key used to identify disposable to be removed. - */ - @available(*, deprecated, renamed: "remove(for:)") - public func removeDisposable(_ disposeKey: DisposeKey) { - remove(for: disposeKey) - } - - /** - Removes and disposes the disposable identified by `disposeKey` from the CompositeDisposable. - - - parameter disposeKey: Key used to identify disposable to be removed. - */ + /// Removes and disposes the disposable identified by `disposeKey` from the CompositeDisposable. + /// + /// - parameter disposeKey: Key used to identify disposable to be removed. public func remove(for disposeKey: DisposeKey) { _remove(for: disposeKey)?.dispose() } private func _remove(for disposeKey: DisposeKey) -> Disposable? { _lock.lock(); defer { _lock.unlock() } - return _disposables?.removeKey(disposeKey) + return _disposables?.removeKey(disposeKey.key) } - /** - Disposes all disposables in the group and removes them from the group. - */ + /// Disposes all disposables in the group and removes them from the group. public func dispose() { if let disposables = _dispose() { disposeAll(in: disposables) @@ -155,3 +122,30 @@ public final class CompositeDisposable : DisposeBase, Disposable, Cancelable { return disposeBag } } + +extension Disposables { + + /// Creates a disposable with the given disposables. + public static func create(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable) -> Cancelable { + return CompositeDisposable(disposable1, disposable2, disposable3) + } + + /// Creates a disposable with the given disposables. + public static func create(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable, _ disposables: Disposable ...) -> Cancelable { + var disposables = disposables + disposables.append(disposable1) + disposables.append(disposable2) + disposables.append(disposable3) + return CompositeDisposable(disposables: disposables) + } + + /// Creates a disposable with the given disposables. + public static func create(_ disposables: [Disposable]) -> Cancelable { + switch disposables.count { + case 2: + return Disposables.create(disposables[0], disposables[1]) + default: + return CompositeDisposable(disposables: disposables) + } + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/Disposables.swift b/Example/Pods/RxSwift/RxSwift/Disposables/Disposables.swift index 694b1e5..8cd6e28 100644 --- a/Example/Pods/RxSwift/RxSwift/Disposables/Disposables.swift +++ b/Example/Pods/RxSwift/RxSwift/Disposables/Disposables.swift @@ -1,61 +1,13 @@ // // Disposables.swift -// Rx +// RxSwift // // Created by Mohsen Ramezanpoor on 01/08/2016. -// Copyright © 2016 Mohsen Ramezanpoor. All rights reserved. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. // -import Foundation - -/** - A collection of utility methods for common disposable operations. - */ +/// A collection of utility methods for common disposable operations. public struct Disposables { - private init() {} - } -public extension Disposables { - - private static let noOp: Disposable = NopDisposable() - - /** - Creates a disposable that does nothing on disposal. - */ - static func create() -> Disposable { - return noOp - } - - /** - Creates a disposable with the given disposables. - */ - static func create(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable) -> Cancelable { - return CompositeDisposable(disposable1, disposable2, disposable3) - } - - /** - Creates a disposable with the given disposables. - */ - static func create(_ disposable1: Disposable, _ disposable2: Disposable, _ disposable3: Disposable, _ disposables: Disposable ...) -> Cancelable { - var disposables = disposables - disposables.append(disposable1) - disposables.append(disposable2) - disposables.append(disposable3) - return CompositeDisposable(disposables: disposables) - } - - /** - Creates a disposable with the given disposables. - */ - static func create(_ disposables: [Disposable]) -> Cancelable { - switch disposables.count { - case 2: - return Disposables.create(disposables[0], disposables[1]) - default: - return CompositeDisposable(disposables: disposables) - } - } - -} diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift b/Example/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift index 34a3b0c..9a2386d 100644 --- a/Example/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift +++ b/Example/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift @@ -1,20 +1,16 @@ // // DisposeBag.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/25/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - extension Disposable { - /** - Adds `self` to `bag`. - - - parameter bag: `DisposeBag` to add `self` to. - */ - public func addDisposableTo(_ bag: DisposeBag) { + /// Adds `self` to `bag` + /// + /// - parameter bag: `DisposeBag` to add `self` to. + public func disposed(by bag: DisposeBag) { bag.insert(self) } } @@ -36,31 +32,17 @@ public final class DisposeBag: DisposeBase { private var _lock = SpinLock() // state - private var _disposables = [Disposable]() - private var _isDisposed = false + fileprivate var _disposables = [Disposable]() + fileprivate var _isDisposed = false - /** - Constructs new empty dispose bag. - */ + /// Constructs new empty dispose bag. public override init() { super.init() } - - /** - Adds `disposable` to be disposed when dispose bag is being deinited. - - - parameter disposable: Disposable to add. - */ - @available(*, deprecated, renamed: "insert(_:)") - public func addDisposable(_ disposable: Disposable) { - insert(disposable) - } - - /** - Adds `disposable` to be disposed when dispose bag is being deinited. - - - parameter disposable: Disposable to add. - */ + + /// Adds `disposable` to be disposed when dispose bag is being deinited. + /// + /// - parameter disposable: Disposable to add. public func insert(_ disposable: Disposable) { _insert(disposable)?.dispose() } @@ -76,9 +58,7 @@ public final class DisposeBag: DisposeBase { return nil } - /** - This is internal on purpose, take a look at `CompositeDisposable` instead. - */ + /// This is internal on purpose, take a look at `CompositeDisposable` instead. private func dispose() { let oldDisposables = _dispose() @@ -102,3 +82,33 @@ public final class DisposeBag: DisposeBase { dispose() } } + +extension DisposeBag { + + /// Convenience init allows a list of disposables to be gathered for disposal. + public convenience init(disposing disposables: Disposable...) { + self.init() + _disposables += disposables + } + + /// Convenience init allows an array of disposables to be gathered for disposal. + public convenience init(disposing disposables: [Disposable]) { + self.init() + _disposables += disposables + } + + /// Convenience function allows a list of disposables to be gathered for disposal. + public func insert(_ disposables: Disposable...) { + insert(disposables) + } + + /// Convenience function allows an array of disposables to be gathered for disposal. + public func insert(_ disposables: [Disposable]) { + _lock.lock(); defer { _lock.unlock() } + if _isDisposed { + disposables.forEach { $0.dispose() } + } else { + _disposables += disposables + } + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift b/Example/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift index 16da27c..8c6a44f 100644 --- a/Example/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift +++ b/Example/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift @@ -1,26 +1,22 @@ // // DisposeBase.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 4/4/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -/** -Base class for all disposables. -*/ +/// Base class for all disposables. public class DisposeBase { init() { #if TRACE_RESOURCES - let _ = AtomicIncrement(&resourceCount) + let _ = Resources.incrementTotal() #endif } deinit { #if TRACE_RESOURCES - let _ = AtomicDecrement(&resourceCount) + let _ = Resources.decrementTotal() #endif } } diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift index 0203f22..149f866 100644 --- a/Example/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift +++ b/Example/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift @@ -1,33 +1,32 @@ // // NopDisposable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/15/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -/** -Represents a disposable that does nothing on disposal. - -Nop = No Operation -*/ -public struct NopDisposable : Disposable { +/// Represents a disposable that does nothing on disposal. +/// +/// Nop = No Operation +fileprivate struct NopDisposable : Disposable { - /** - Singleton instance of `NopDisposable`. - */ - @available(*, deprecated, renamed: "Disposables.create()") - public static let instance: Disposable = NopDisposable() + fileprivate static let noOp: Disposable = NopDisposable() - init() { + fileprivate init() { } - /** - Does nothing. - */ + /// Does nothing. public func dispose() { } } + +extension Disposables { + /** + Creates a disposable that does nothing on disposal. + */ + static public func create() -> Disposable { + return NopDisposable.noOp + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift index 775b086..664603c 100644 --- a/Example/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift +++ b/Example/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift @@ -1,33 +1,25 @@ // // RefCountDisposable.swift -// Rx +// RxSwift // // Created by Junior B. on 10/29/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -/** - Represents a disposable resource that only disposes its underlying disposable resource when all dependent disposable objects have been disposed. - */ +/// Represents a disposable resource that only disposes its underlying disposable resource when all dependent disposable objects have been disposed. public final class RefCountDisposable : DisposeBase, Cancelable { private var _lock = SpinLock() private var _disposable = nil as Disposable? private var _primaryDisposed = false private var _count = 0 - /** - - returns: Was resource disposed. - */ + /// - returns: Was resource disposed. public var isDisposed: Bool { _lock.lock(); defer { _lock.unlock() } return _disposable == nil } - /** - Initializes a new instance of the `RefCountDisposable`. - */ + /// Initializes a new instance of the `RefCountDisposable`. public init(disposable: Disposable) { _disposable = disposable super.init() @@ -55,9 +47,7 @@ public final class RefCountDisposable : DisposeBase, Cancelable { } } - /** - Disposes the underlying disposable only when all dependent disposables have been disposed. - */ + /// Disposes the underlying disposable only when all dependent disposables have been disposed. public func dispose() { let oldDisposable: Disposable? = _lock.calculateLocked { if let oldDisposable = _disposable, !_primaryDisposed @@ -110,7 +100,7 @@ public final class RefCountDisposable : DisposeBase, Cancelable { internal final class RefCountInnerDisposable: DisposeBase, Disposable { private let _parent: RefCountDisposable - private var _isDisposed: AtomicInt = 0 + private var _isDisposed = AtomicInt(0) init(_ parent: RefCountDisposable) { @@ -120,7 +110,7 @@ internal final class RefCountInnerDisposable: DisposeBase, Disposable internal func dispose() { - if AtomicCompareAndSwap(0, 1, &_isDisposed) { + if _isDisposed.fetchOr(1) == 0 { _parent.release() } } diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift index d2f80a0..564a3a2 100644 --- a/Example/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift +++ b/Example/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift @@ -6,29 +6,23 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - private let disposeScheduledDisposable: (ScheduledDisposable) -> Disposable = { sd in sd.disposeInner() return Disposables.create() } -/** -Represents a disposable resource whose disposal invocation will be scheduled on the specified scheduler. -*/ +/// Represents a disposable resource whose disposal invocation will be scheduled on the specified scheduler. public final class ScheduledDisposable : Cancelable { public let scheduler: ImmediateSchedulerType - private var _isDisposed: AtomicInt = 0 + private var _isDisposed = AtomicInt(0) // state private var _disposable: Disposable? - /** - - returns: Was resource disposed. - */ + /// - returns: Was resource disposed. public var isDisposed: Bool { - return _isDisposed == 1 + return _isDisposed.isFlagSet(1) } /** @@ -42,15 +36,13 @@ public final class ScheduledDisposable : Cancelable { _disposable = disposable } - /** - Disposes the wrapped disposable on the provided scheduler. - */ + /// Disposes the wrapped disposable on the provided scheduler. public func dispose() { let _ = scheduler.schedule(self, action: disposeScheduledDisposable) } func disposeInner() { - if AtomicCompareAndSwap(0, 1, &_isDisposed) { + if _isDisposed.fetchOr(1) == 0 { _disposable!.dispose() _disposable = nil } diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift index 8aa355c..6373d2b 100644 --- a/Example/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift +++ b/Example/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift @@ -1,16 +1,12 @@ // // SerialDisposable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/12/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -/** -Represents a disposable resource whose underlying disposable resource can be replaced by another disposable resource, causing automatic disposal of the previous underlying disposable resource. -*/ +/// Represents a disposable resource whose underlying disposable resource can be replaced by another disposable resource, causing automatic disposal of the previous underlying disposable resource. public final class SerialDisposable : DisposeBase, Cancelable { private var _lock = SpinLock() @@ -18,16 +14,12 @@ public final class SerialDisposable : DisposeBase, Cancelable { private var _current = nil as Disposable? private var _isDisposed = false - /** - - returns: Was resource disposed. - */ + /// - returns: Was resource disposed. public var isDisposed: Bool { return _isDisposed } - /** - Initializes a new instance of the `SerialDisposable`. - */ + /// Initializes a new instance of the `SerialDisposable`. override public init() { super.init() } @@ -42,7 +34,7 @@ public final class SerialDisposable : DisposeBase, Cancelable { public var disposable: Disposable { get { return _lock.calculateLocked { - return self.disposable + return _current ?? Disposables.create() } } set (newDisposable) { @@ -63,9 +55,7 @@ public final class SerialDisposable : DisposeBase, Cancelable { } } - /** - Disposes the underlying disposable as well as all future replacements. - */ + /// Disposes the underlying disposable as well as all future replacements. public func dispose() { _dispose()?.dispose() } diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift index a794cc0..f34fac6 100644 --- a/Example/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift +++ b/Example/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift @@ -1,80 +1,64 @@ // // SingleAssignmentDisposable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/15/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation -import Darwin.C.stdatomic - /** Represents a disposable resource which only allows a single assignment of its underlying disposable resource. If an underlying disposable resource has already been set, future attempts to set the underlying disposable resource will throw an exception. */ -public class SingleAssignmentDisposable : DisposeBase, Disposable, Cancelable { - fileprivate enum DisposeState: UInt32 { - case disposed = 1 - case disposableSet = 2 - } +public final class SingleAssignmentDisposable : DisposeBase, Cancelable { - // Jeej, swift API consistency rules - fileprivate enum DisposeStateInt32: Int32 { + fileprivate enum DisposeState: Int32 { case disposed = 1 case disposableSet = 2 } // state - private var _state: UInt32 = 0 + private var _state = AtomicInt(0) private var _disposable = nil as Disposable? - /** - - returns: A value that indicates whether the object is disposed. - */ + /// - returns: A value that indicates whether the object is disposed. public var isDisposed: Bool { - return (_state & DisposeState.disposed.rawValue) != 0 + return _state.isFlagSet(DisposeState.disposed.rawValue) } - /** - Initializes a new instance of the `SingleAssignmentDisposable`. - */ + /// Initializes a new instance of the `SingleAssignmentDisposable`. public override init() { super.init() } - /** - Gets or sets the underlying disposable. After disposal, the result of getting this property is undefined. - - **Throws exception if the `SingleAssignmentDisposable` has already been assigned to.** - */ + /// Gets or sets the underlying disposable. After disposal, the result of getting this property is undefined. + /// + /// **Throws exception if the `SingleAssignmentDisposable` has already been assigned to.** public func setDisposable(_ disposable: Disposable) { _disposable = disposable - let previousState = OSAtomicOr32OrigBarrier(DisposeState.disposableSet.rawValue, &_state) + let previousState = _state.fetchOr(DisposeState.disposableSet.rawValue) - if (previousState & DisposeStateInt32.disposableSet.rawValue) != 0 { + if (previousState & DisposeState.disposableSet.rawValue) != 0 { rxFatalError("oldState.disposable != nil") } - if (previousState & DisposeStateInt32.disposed.rawValue) != 0 { + if (previousState & DisposeState.disposed.rawValue) != 0 { disposable.dispose() _disposable = nil } } - /** - Disposes the underlying disposable. - */ + /// Disposes the underlying disposable. public func dispose() { - let previousState = OSAtomicOr32OrigBarrier(DisposeState.disposed.rawValue, &_state) + let previousState = _state.fetchOr(DisposeState.disposed.rawValue) - if (previousState & DisposeStateInt32.disposed.rawValue) != 0 { + if (previousState & DisposeState.disposed.rawValue) != 0 { return } - if (previousState & DisposeStateInt32.disposableSet.rawValue) != 0 { + if (previousState & DisposeState.disposableSet.rawValue) != 0 { guard let disposable = _disposable else { rxFatalError("Disposable not set") } diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/StableCompositeDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/StableCompositeDisposable.swift deleted file mode 100644 index ad10eac..0000000 --- a/Example/Pods/RxSwift/RxSwift/Disposables/StableCompositeDisposable.swift +++ /dev/null @@ -1,16 +0,0 @@ -// -// StableCompositeDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -public final class StableCompositeDisposable { - @available(*, deprecated, renamed: "Disposables.create") - public static func create(_ disposable1: Disposable, _ disposable2: Disposable) -> Disposable { - return Disposables.create(disposable1, disposable2) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift index 64610d2..3ae138a 100644 --- a/Example/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift +++ b/Example/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift @@ -1,13 +1,11 @@ // // SubscriptionDisposable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 10/25/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - struct SubscriptionDisposable : Disposable { private let _key: T.DisposeKey private weak var _owner: T? diff --git a/Example/Pods/RxSwift/RxSwift/Errors.swift b/Example/Pods/RxSwift/RxSwift/Errors.swift index 8074e16..f17b52d 100644 --- a/Example/Pods/RxSwift/RxSwift/Errors.swift +++ b/Example/Pods/RxSwift/RxSwift/Errors.swift @@ -1,64 +1,44 @@ // // Errors.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/28/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - let RxErrorDomain = "RxErrorDomain" let RxCompositeFailures = "RxCompositeFailures" -/** -Generic Rx error codes. -*/ +/// Generic Rx error codes. public enum RxError : Swift.Error , CustomDebugStringConvertible { - /** - Unknown error occured. - */ + /// Unknown error occurred. case unknown - /** - Performing an action on disposed object. - */ + /// Performing an action on disposed object. case disposed(object: AnyObject) - /** - Aritmetic overflow error. - */ + /// Aritmetic overflow error. case overflow - /** - Argument out of range error. - */ + /// Argument out of range error. case argumentOutOfRange - /** - Sequence doesn't contain any elements. - */ + /// Sequence doesn't contain any elements. case noElements - /** - Sequence contains more than one element. - */ + /// Sequence contains more than one element. case moreThanOneElement - /** - Timeout error. - */ + /// Timeout error. case timeout } -public extension RxError { - /** - A textual representation of `self`, suitable for debugging. - */ +extension RxError { + /// A textual representation of `self`, suitable for debugging. public var debugDescription: String { switch self { case .unknown: - return "Unknown error occured." + return "Unknown error occurred." case .disposed(let object): return "Object `\(object)` was already disposed." case .overflow: - return "Arithmetic overflow occured." + return "Arithmetic overflow occurred." case .argumentOutOfRange: return "Argument out of range." case .noElements: diff --git a/Example/Pods/RxSwift/RxSwift/Event.swift b/Example/Pods/RxSwift/RxSwift/Event.swift index 5fcf8f2..9193e35 100644 --- a/Example/Pods/RxSwift/RxSwift/Event.swift +++ b/Example/Pods/RxSwift/RxSwift/Event.swift @@ -1,19 +1,15 @@ // // Event.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/8/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -/** -Represents a sequence event. - -Sequence grammar: -next\* (error | completed) -*/ +/// Represents a sequence event. +/// +/// Sequence grammar: +/// **next\* (error | completed)** public enum Event { /// Next element is produced. case next(Element) @@ -26,7 +22,7 @@ public enum Event { } extension Event : CustomDebugStringConvertible { - /// - returns: Description of event. + /// Description of event. public var debugDescription: String { switch self { case .next(let value): @@ -40,7 +36,7 @@ extension Event : CustomDebugStringConvertible { } extension Event { - /// - returns: Is `Completed` or `Error` event. + /// Is `completed` or `error` event. public var isStopEvent: Bool { switch self { case .next: return false @@ -48,7 +44,7 @@ extension Event { } } - /// - returns: If `Next` event, returns element value. + /// If `next` event, returns element value. public var element: Element? { if case .next(let value) = self { return value @@ -56,11 +52,55 @@ extension Event { return nil } - /// - returns: If `Error` event, returns error. + /// If `error` event, returns error. public var error: Swift.Error? { if case .error(let error) = self { return error } return nil } + + /// If `completed` event, returns `true`. + public var isCompleted: Bool { + if case .completed = self { + return true + } + return false + } +} + +extension Event { + /// Maps sequence elements using transform. If error happens during the transform, `.error` + /// will be returned as value. + public func map(_ transform: (Element) throws -> Result) -> Event { + do { + switch self { + case let .next(element): + return .next(try transform(element)) + case let .error(error): + return .error(error) + case .completed: + return .completed + } + } + catch let e { + return .error(e) + } + } +} + +/// A type that can be converted to `Event`. +public protocol EventConvertible { + /// Type of element in event + associatedtype ElementType + + /// Event representation of this instance + var event: Event { get } +} + +extension Event : EventConvertible { + /// Event representation of this instance + public var event: Event { + return self + } } diff --git a/Example/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift b/Example/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift new file mode 100644 index 0000000..748578d --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift @@ -0,0 +1,50 @@ +// +// Bag+Rx.swift +// RxSwift +// +// Created by Krunoslav Zaher on 10/19/16. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + + +// MARK: forEach + +@inline(__always) +func dispatch(_ bag: Bag<(Event) -> ()>, _ event: Event) { + bag._value0?(event) + + if bag._onlyFastPath { + return + } + + let pairs = bag._pairs + for i in 0 ..< pairs.count { + pairs[i].value(event) + } + + if let dictionary = bag._dictionary { + for element in dictionary.values { + element(event) + } + } +} + +/// Dispatches `dispose` to all disposables contained inside bag. +func disposeAll(in bag: Bag) { + bag._value0?.dispose() + + if bag._onlyFastPath { + return + } + + let pairs = bag._pairs + for i in 0 ..< pairs.count { + pairs[i].value.dispose() + } + + if let dictionary = bag._dictionary { + for element in dictionary.values { + element.dispose() + } + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift b/Example/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift index b794766..42ef636 100644 --- a/Example/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift +++ b/Example/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift @@ -1,17 +1,13 @@ // // String+Rx.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 12/25/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - extension String { - /** - This is needed because on Linux Swift doesn't have `rangeOfString(..., options: .BackwardsSearch)` - */ + /// This is needed because on Linux Swift doesn't have `rangeOfString(..., options: .BackwardsSearch)` func lastIndexOf(_ character: Character) -> Index? { var index = endIndex while index > startIndex { diff --git a/Example/Pods/RxSwift/RxSwift/GroupedObservable.swift b/Example/Pods/RxSwift/RxSwift/GroupedObservable.swift new file mode 100644 index 0000000..d87e0ba --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/GroupedObservable.swift @@ -0,0 +1,37 @@ +// +// GroupedObservable.swift +// RxSwift +// +// Created by Tomi Koskinen on 01/12/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +/// Represents an observable sequence of elements that have a common key. +public struct GroupedObservable : ObservableType { + public typealias E = Element + + /// Gets the common key. + public let key: Key + + private let source: Observable + + /// Initializes grouped observable sequence with key and source observable sequence. + /// + /// - parameter key: Grouped observable sequence key + /// - parameter source: Observable sequence that represents sequence of elements for the key + /// - returns: Grouped observable sequence of elements for the specific key + public init(key: Key, source: Observable) { + self.key = key + self.source = source + } + + /// Subscribes `observer` to receive events for this sequence. + public func subscribe(_ observer: O) -> Disposable where O.E == E { + return self.source.subscribe(observer) + } + + /// Converts `self` to `Observable` sequence. + public func asObservable() -> Observable { + return source + } +} diff --git a/Example/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift b/Example/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift index c535bd3..8dc2a85 100644 --- a/Example/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift +++ b/Example/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift @@ -6,14 +6,10 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -/** -Represents an object that immediately schedules units of work. -*/ +/// Represents an object that immediately schedules units of work. public protocol ImmediateSchedulerType { /** - Schedules an action to be executed immediatelly. + Schedules an action to be executed immediately. - parameter state: State passed to the action to be executed. - parameter action: Action to be executed. diff --git a/Example/Pods/RxSwift/RxSwift/Observable.swift b/Example/Pods/RxSwift/RxSwift/Observable.swift index 9c0f325..f0c55af 100644 --- a/Example/Pods/RxSwift/RxSwift/Observable.swift +++ b/Example/Pods/RxSwift/RxSwift/Observable.swift @@ -1,32 +1,26 @@ // // Observable.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/8/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -/** -A type-erased `ObservableType`. - -It represents a push style sequence. -*/ +/// A type-erased `ObservableType`. +/// +/// It represents a push style sequence. public class Observable : ObservableType { - /** - Type of elements in sequence. - */ + /// Type of elements in sequence. public typealias E = Element init() { #if TRACE_RESOURCES - OSAtomicIncrement32(&resourceCount) + let _ = Resources.incrementTotal() #endif } public func subscribe(_ observer: O) -> Disposable where O.E == E { - abstractMethod() + rxAbstractMethod() } public func asObservable() -> Observable { @@ -35,18 +29,16 @@ public class Observable : ObservableType { deinit { #if TRACE_RESOURCES - let _ = AtomicDecrement(&resourceCount) + let _ = Resources.decrementTotal() #endif } // this is kind of ugly I know :( // Swift compiler reports "Not supported yet" when trying to override protocol extensions, so ¯\_(ツ)_/¯ - /** - Optimizations for map operator - */ - internal func composeMap(_ selector: @escaping (Element) throws -> R) -> Observable { - return Map(source: self, selector: selector) + /// Optimizations for map operator + internal func composeMap(_ transform: @escaping (Element) throws -> R) -> Observable { + return _map(source: self, transform: transform) } } diff --git a/Example/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift b/Example/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift index a749a06..d89c5aa 100644 --- a/Example/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift +++ b/Example/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift @@ -1,26 +1,18 @@ // // ObservableConvertibleType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 9/17/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -/** -Type that can be converted to observable sequence (`Observer`). -*/ +/// Type that can be converted to observable sequence (`Observable`). public protocol ObservableConvertibleType { - /** - Type of elements in sequence. - */ + /// Type of elements in sequence. associatedtype E - - /** - Converts `self` to `Observable` sequence. - - - returns: Observable sequence that represents `self`. - */ + + /// Converts `self` to `Observable` sequence. + /// + /// - returns: Observable sequence that represents `self`. func asObservable() -> Observable } diff --git a/Example/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift b/Example/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift index 5cb701f..29ed8a2 100644 --- a/Example/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift +++ b/Example/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift @@ -1,179 +1,131 @@ // // ObservableType+Extensions.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/21/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +#if DEBUG + import Foundation +#endif extension ObservableType { /** - Subscribes an event handler to an observable sequence. - - - parameter on: Action to invoke for each event in the observable sequence. - - returns: Subscription object used to unsubscribe from the observable sequence. - */ - // @warn_unused_result(message: "http://git.io/rxs.ud") + Subscribes an event handler to an observable sequence. + + - parameter on: Action to invoke for each event in the observable sequence. + - returns: Subscription object used to unsubscribe from the observable sequence. + */ public func subscribe(_ on: @escaping (Event) -> Void) -> Disposable { - let observer = AnonymousObserver { e in - on(e) - } - return self.subscribeSafe(observer) + let observer = AnonymousObserver { e in + on(e) + } + return self.asObservable().subscribe(observer) } - - #if DEBUG + + /** - Subscribes an element handler, an error handler, a completion handler and disposed handler to an observable 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. - - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. - - parameter onDisposed: Action to invoke upon any type of termination of sequence (if the sequence has - 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 subscribe(file: String = #file, line: UInt = #line, function: String = #function, onNext: ((E) -> Void)? = nil, onError: ((Swift.Error) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onDisposed: (() -> Void)? = nil) + Subscribes an element handler, an error handler, a completion handler and disposed handler to an observable 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. + - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. + - parameter onDisposed: Action to invoke upon any type of termination of sequence (if the sequence has + gracefully completed, errored, or if the generation is canceled by disposing subscription). + - returns: Subscription object used to unsubscribe from the observable sequence. + */ + public func subscribe(onNext: ((E) -> Void)? = nil, onError: ((Swift.Error) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onDisposed: (() -> Void)? = nil) -> Disposable { - - let disposable: Disposable - - if let disposed = onDisposed { - disposable = Disposables.create(with: disposed) - } - else { - disposable = Disposables.create() - } - - let observer = AnonymousObserver { e in - switch e { - case .next(let value): - onNext?(value) - case .error(let e): - if let onError = onError { - onError(e) - } - else { - print("Received unhandled error: \(file):\(line):\(function) -> \(e)") + let disposable: Disposable + + if let disposed = onDisposed { + disposable = Disposables.create(with: disposed) + } + else { + disposable = Disposables.create() + } + + #if DEBUG + let synchronizationTracker = SynchronizationTracker() + #endif + + let callStack = Hooks.recordCallStackOnError ? Hooks.customCaptureSubscriptionCallstack() : [] + + let observer = AnonymousObserver { event in + + #if DEBUG + synchronizationTracker.register(synchronizationErrorMessage: .default) + defer { synchronizationTracker.unregister() } + #endif + + switch event { + case .next(let value): + onNext?(value) + case .error(let error): + if let onError = onError { + onError(error) + } + else { + Hooks.defaultErrorHandler(callStack, error) + } + disposable.dispose() + case .completed: + onCompleted?() + disposable.dispose() } - disposable.dispose() - case .completed: - onCompleted?() - disposable.dispose() } - } - return Disposables.create( - self.subscribeSafe(observer), - disposable - ) + return Disposables.create( + self.asObservable().subscribe(observer), + disposable + ) } - #else - /** - Subscribes an element handler, an error handler, a completion handler and disposed handler to an observable 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. - - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. - - parameter onDisposed: Action to invoke upon any type of termination of sequence (if the sequence has - 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 subscribe(onNext: ((E) -> Void)? = nil, onError: ((Swift.Error) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onDisposed: (() -> Void)? = nil) - -> Disposable { +} - let disposable: Disposable +import class Foundation.NSRecursiveLock - if let disposed = onDisposed { - disposable = Disposables.create(with: disposed) - } - else { - disposable = Disposables.create() - } +extension Hooks { + public typealias DefaultErrorHandler = (_ subscriptionCallStack: [String], _ error: Error) -> () + public typealias CustomCaptureSubscriptionCallstack = () -> [String] - let observer = AnonymousObserver { e in - switch e { - case .next(let value): - onNext?(value) - case .error(let e): - onError?(e) - disposable.dispose() - case .completed: - onCompleted?() - disposable.dispose() - } - } - return Disposables.create( - self.subscribeSafe(observer), - disposable - ) + fileprivate static let _lock = RecursiveLock() + fileprivate static var _defaultErrorHandler: DefaultErrorHandler = { subscriptionCallStack, error in + #if DEBUG + let serializedCallStack = subscriptionCallStack.joined(separator: "\n") + print("Unhandled error happened: \(error)\n subscription called from:\n\(serializedCallStack)") + #endif } - #endif - - /** - Subscribes an element handler to an observable sequence. - - - 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: "subscribe(onNext:)") - public func subscribeNext(_ onNext: @escaping (E) -> Void) - -> Disposable { - let observer = AnonymousObserver { e in - if case .next(let value) = e { - onNext(value) - } - } - return self.subscribeSafe(observer) + fileprivate static var _customCaptureSubscriptionCallstack: CustomCaptureSubscriptionCallstack = { + #if DEBUG + return Thread.callStackSymbols + #else + return [] + #endif } - /** - Subscribes an error handler to an observable sequence. - - - parameter onError: Action to invoke upon errored termination of 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: "subscribe(onError:)") - public func subscribeError(_ onError: @escaping (Swift.Error) -> Void) - -> Disposable { - let observer = AnonymousObserver { e in - if case .error(let error) = e { - onError(error) - } + /// Error handler called in case onError handler wasn't provided. + public static var defaultErrorHandler: DefaultErrorHandler { + get { + _lock.lock(); defer { _lock.unlock() } + return _defaultErrorHandler + } + set { + _lock.lock(); defer { _lock.unlock() } + _defaultErrorHandler = newValue } - return self.subscribeSafe(observer) } - - /** - Subscribes a completion handler to an observable sequence. - - - parameter onCompleted: Action to invoke upon graceful termination of 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: "subscribe(onCompleted:)") - public func subscribeCompleted(_ onCompleted: @escaping () -> Void) - -> Disposable { - let observer = AnonymousObserver { e in - if case .completed = e { - onCompleted() - } + + /// Subscription callstack block to fetch custom callstack information. + public static var customCaptureSubscriptionCallstack: CustomCaptureSubscriptionCallstack { + get { + _lock.lock(); defer { _lock.unlock() } + return _customCaptureSubscriptionCallstack + } + set { + _lock.lock(); defer { _lock.unlock() } + _customCaptureSubscriptionCallstack = newValue } - return self.subscribeSafe(observer) } } -public extension ObservableType { - /** - All internal subscribe calls go through this method. - */ - // @warn_unused_result(message: "http://git.io/rxs.ud") - func subscribeSafe(_ observer: O) -> Disposable where O.E == E { - return self.asObservable().subscribe(observer) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/ObservableType.swift b/Example/Pods/RxSwift/RxSwift/ObservableType.swift index 6c7be85..e41a36a 100644 --- a/Example/Pods/RxSwift/RxSwift/ObservableType.swift +++ b/Example/Pods/RxSwift/RxSwift/ObservableType.swift @@ -6,17 +6,8 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -/** -Represents a push style sequence. -*/ +/// Represents a push style sequence. public protocol ObservableType : ObservableConvertibleType { - /** - Type of elements in sequence. - */ - associatedtype E - /** Subscribes `observer` to receive events for this sequence. @@ -35,21 +26,17 @@ public protocol ObservableType : ObservableConvertibleType { When sequence sends `Complete` or `Error` event all internal resources that compute sequence elements will be freed. - To cancel production of sequence elements and free resources immediatelly, call `dispose` on returned + To cancel production of sequence elements and free resources immediately, call `dispose` on returned subscription. - returns: Subscription for `observer` that can be used to cancel production of sequence elements and free resources. */ - // @warn_unused_result(message: "http://git.io/rxs.ud") func subscribe(_ observer: O) -> Disposable where O.E == E } extension ObservableType { - /** - Default implementation of converting `ObservableType` to `Observable`. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") + /// Default implementation of converting `ObservableType` to `Observable`. public func asObservable() -> Observable { // temporary workaround //return Observable.create(subscribe: self.subscribe) diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/AddRef.swift b/Example/Pods/RxSwift/RxSwift/Observables/AddRef.swift similarity index 88% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/AddRef.swift rename to Example/Pods/RxSwift/RxSwift/Observables/AddRef.swift index 746a94e..b782c13 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/AddRef.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/AddRef.swift @@ -1,14 +1,12 @@ // // AddRef.swift -// Rx +// RxSwift // // Created by Junior B. on 30/10/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -class AddRefSink : Sink, ObserverType { +final class AddRefSink : Sink, ObserverType { typealias Element = O.E override init(observer: O, cancel: Cancelable) { @@ -26,7 +24,7 @@ class AddRefSink : Sink, ObserverType { } } -class AddRef : Producer { +final class AddRef : Producer { typealias EventHandler = (Event) throws -> Void private let _source: Observable @@ -40,7 +38,7 @@ class AddRef : Producer { override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { let releaseDisposable = _refCount.retain() let sink = AddRefSink(observer: observer, cancel: cancel) - let subscription = Disposables.create(releaseDisposable, _source.subscribeSafe(sink)) + let subscription = Disposables.create(releaseDisposable, _source.subscribe(sink)) return (sink: sink, subscription: subscription) } diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Amb.swift b/Example/Pods/RxSwift/RxSwift/Observables/Amb.swift similarity index 63% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Amb.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Amb.swift index 9579228..08ec04e 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Amb.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Amb.swift @@ -6,18 +6,49 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { + /** + Propagates the observable sequence that reacts first. -enum AmbState { + - seealso: [amb operator on reactivex.io](http://reactivex.io/documentation/operators/amb.html) + + - returns: An observable sequence that surfaces any of the given sequences, whichever reacted first. + */ + public static func amb(_ sequence: S) -> Observable + where S.Iterator.Element == Observable { + return sequence.reduce(Observable.never()) { a, o in + return a.amb(o.asObservable()) + } + } +} + +extension ObservableType { + + /** + Propagates the observable sequence that reacts first. + + - seealso: [amb operator on reactivex.io](http://reactivex.io/documentation/operators/amb.html) + + - parameter right: Second observable sequence. + - returns: An observable sequence that surfaces either of the given sequences, whichever reacted first. + */ + public func amb + (_ right: O2) + -> Observable where O2.E == E { + return Amb(left: asObservable(), right: right.asObservable()) + } +} + +fileprivate enum AmbState { case neither case left case right } -class AmbObserver : ObserverType where O.E == ElementType { - typealias Element = ElementType - typealias Parent = AmbSink - typealias This = AmbObserver +final fileprivate class AmbObserver : ObserverType { + typealias Element = O.E + typealias Parent = AmbSink + typealias This = AmbObserver typealias Sink = (This, Event) -> Void fileprivate let _parent: Parent @@ -26,7 +57,7 @@ class AmbObserver : ObserverType where O.E == Elem init(parent: Parent, cancel: Disposable, sink: @escaping Sink) { #if TRACE_RESOURCES - let _ = AtomicIncrement(&resourceCount) + let _ = Resources.incrementTotal() #endif _parent = parent @@ -43,18 +74,19 @@ class AmbObserver : ObserverType where O.E == Elem deinit { #if TRACE_RESOURCES - let _ = AtomicDecrement(&resourceCount) + let _ = Resources.decrementTotal() #endif } } -class AmbSink : Sink where O.E == ElementType { +final fileprivate class AmbSink : Sink { + typealias ElementType = O.E typealias Parent = Amb - typealias AmbObserverType = AmbObserver + typealias AmbObserverType = AmbObserver private let _parent: Parent - private let _lock = NSRecursiveLock() + private let _lock = RecursiveLock() // state private var _choice = AmbState.neither @@ -70,8 +102,11 @@ class AmbSink : Sink where O.E == ElementType { let forwardEvent = { (o: AmbObserverType, event: Event) -> Void in self.forwardOn(event) + if event.isStopEvent { + self.dispose() + } } - + let decide = { (o: AmbObserverType, event: Event, me: AmbState, otherSubscription: Disposable) in self._lock.performLocked { if self._choice == .neither { @@ -105,7 +140,7 @@ class AmbSink : Sink where O.E == ElementType { } } -class Amb: Producer { +final fileprivate class Amb: Producer { fileprivate let _left: Observable fileprivate let _right: Observable diff --git a/Example/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift b/Example/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift new file mode 100644 index 0000000..36fa685 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift @@ -0,0 +1,49 @@ +// +// AsMaybe.swift +// RxSwift +// +// Created by Krunoslav Zaher on 3/12/17. +// Copyright © 2017 Krunoslav Zaher. All rights reserved. +// + +fileprivate final class AsMaybeSink : Sink, ObserverType { + typealias ElementType = O.E + typealias E = ElementType + + private var _element: Event? = nil + + func on(_ event: Event) { + switch event { + case .next: + if _element != nil { + forwardOn(.error(RxError.moreThanOneElement)) + dispose() + } + + _element = event + case .error: + forwardOn(event) + dispose() + case .completed: + if let element = _element { + forwardOn(element) + } + forwardOn(.completed) + dispose() + } + } +} + +final class AsMaybe: Producer { + fileprivate let _source: Observable + + init(source: Observable) { + _source = source + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = AsMaybeSink(observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/AsSingle.swift b/Example/Pods/RxSwift/RxSwift/Observables/AsSingle.swift new file mode 100644 index 0000000..080aa8e --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/AsSingle.swift @@ -0,0 +1,52 @@ +// +// AsSingle.swift +// RxSwift +// +// Created by Krunoslav Zaher on 3/12/17. +// Copyright © 2017 Krunoslav Zaher. All rights reserved. +// + +fileprivate final class AsSingleSink : Sink, ObserverType { + typealias ElementType = O.E + typealias E = ElementType + + private var _element: Event? = nil + + func on(_ event: Event) { + switch event { + case .next: + if _element != nil { + forwardOn(.error(RxError.moreThanOneElement)) + dispose() + } + + _element = event + case .error: + forwardOn(event) + dispose() + case .completed: + if let element = _element { + forwardOn(element) + forwardOn(.completed) + } + else { + forwardOn(.error(RxError.noElements)) + } + dispose() + } + } +} + +final class AsSingle: Producer { + fileprivate let _source: Observable + + init(source: Observable) { + _source = source + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = AsSingleSink(observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Buffer.swift b/Example/Pods/RxSwift/RxSwift/Observables/Buffer.swift similarity index 72% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Buffer.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Buffer.swift index 3bd2583..b8c33ae 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Buffer.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Buffer.swift @@ -1,14 +1,32 @@ // // Buffer.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 9/13/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { -class BufferTimeCount : Producer<[Element]> { + /** + Projects each element of an observable sequence into a buffer that's sent out when either it's full or a given amount of time has elapsed, using the specified scheduler to run timers. + + A useful real-world analogy of this overload is the behavior of a ferry leaving the dock when all seats are taken, or at the scheduled time of departure, whichever event occurs first. + + - seealso: [buffer operator on reactivex.io](http://reactivex.io/documentation/operators/buffer.html) + + - parameter timeSpan: Maximum time length of a buffer. + - parameter count: Maximum element count of a buffer. + - parameter scheduler: Scheduler to run buffering timers on. + - returns: An observable sequence of buffers. + */ + public func buffer(timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) + -> Observable<[E]> { + return BufferTimeCount(source: self.asObservable(), timeSpan: timeSpan, count: count, scheduler: scheduler) + } +} + +final fileprivate class BufferTimeCount : Producer<[Element]> { fileprivate let _timeSpan: RxTimeInterval fileprivate let _count: Int @@ -29,7 +47,7 @@ class BufferTimeCount : Producer<[Element]> { } } -class BufferTimeCountSink +final fileprivate class BufferTimeCountSink : Sink , LockOwnerType , ObserverType @@ -39,7 +57,7 @@ class BufferTimeCountSink private let _parent: Parent - let _lock = NSRecursiveLock() + let _lock = RecursiveLock() // state private let _timerD = SerialDisposable() diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Catch.swift b/Example/Pods/RxSwift/RxSwift/Observables/Catch.swift similarity index 52% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Catch.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Catch.swift index 0f43069..187eb8a 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Catch.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Catch.swift @@ -6,11 +6,84 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { + + /** + Continues an observable sequence that is terminated by an error with the observable sequence produced by the handler. + + - seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html) + + - parameter handler: Error handler function, producing another observable sequence. + - returns: An observable sequence containing the source sequence's elements, followed by the elements produced by the handler's resulting observable sequence in case an error occurred. + */ + public func catchError(_ handler: @escaping (Swift.Error) throws -> Observable) + -> Observable { + return Catch(source: asObservable(), handler: handler) + } + + /** + Continues an observable sequence that is terminated by an error with a single element. + + - seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html) + + - parameter element: Last element in an observable sequence in case error occurs. + - returns: An observable sequence containing the source sequence's elements, followed by the `element` in case an error occurred. + */ + public func catchErrorJustReturn(_ element: E) + -> Observable { + return Catch(source: asObservable(), handler: { _ in Observable.just(element) }) + } + +} + +extension ObservableType { + /** + Continues an observable sequence that is terminated by an error with the next observable sequence. + + - seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html) + + - returns: An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully. + */ + public static func catchError(_ sequence: S) -> Observable + where S.Iterator.Element == Observable { + return CatchSequence(sources: sequence) + } +} + +extension ObservableType { + + /** + Repeats the source observable sequence until it successfully terminates. + + **This could potentially create an infinite sequence.** + + - seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html) + + - returns: Observable sequence to repeat until it successfully terminates. + */ + public func retry() -> Observable { + return CatchSequence(sources: InfiniteSequence(repeatedValue: self.asObservable())) + } + + /** + Repeats the source observable sequence the specified number of times in case of an error or until it successfully terminates. + + If you encounter an error and want it to retry once, then you must use `retry(2)` + + - seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html) + + - parameter maxAttemptCount: Maximum number of times to repeat the sequence. + - returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully. + */ + public func retry(_ maxAttemptCount: Int) + -> Observable { + return CatchSequence(sources: Swift.repeatElement(self.asObservable(), count: maxAttemptCount)) + } +} // catch with callback -class CatchSinkProxy : ObserverType { +final fileprivate class CatchSinkProxy : ObserverType { typealias E = O.E typealias Parent = CatchSink @@ -32,7 +105,7 @@ class CatchSinkProxy : ObserverType { } } -class CatchSink : Sink, ObserverType { +final fileprivate class CatchSink : Sink, ObserverType { typealias E = O.E typealias Parent = Catch @@ -75,7 +148,7 @@ class CatchSink : Sink, ObserverType { } } -class Catch : Producer { +final fileprivate class Catch : Producer { typealias Handler = (Swift.Error) throws -> Observable fileprivate let _source: Observable @@ -95,7 +168,7 @@ class Catch : Producer { // catch enumerable -class CatchSequenceSink +final fileprivate class CatchSequenceSink : TailRecursiveSink , ObserverType where S.Iterator.Element : ObservableConvertibleType, S.Iterator.Element.E == O.E { typealias Element = O.E @@ -145,7 +218,7 @@ class CatchSequenceSink } } -class CatchSequence : Producer where S.Iterator.Element : ObservableConvertibleType { +final fileprivate class CatchSequence : Producer where S.Iterator.Element : ObservableConvertibleType { typealias Element = S.Iterator.Element.E let sources: S diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+CollectionType.swift b/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift similarity index 66% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+CollectionType.swift rename to Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift index e82a48a..45e0173 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+CollectionType.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift @@ -1,21 +1,47 @@ // // CombineLatest+Collection.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 8/29/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { + /** + Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. -class CombineLatestCollectionTypeSink - : Sink where C.Iterator.Element : ObservableConvertibleType, O.E == R { + - seealso: [combinelatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) + + - 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. + */ + public static func combineLatest(_ collection: C, _ resultSelector: @escaping ([C.Iterator.Element.E]) throws -> E) -> Observable + where C.Iterator.Element: ObservableType { + return CombineLatestCollectionType(sources: collection, resultSelector: resultSelector) + } + + /** + Merges the specified observable sequences into one observable sequence whenever any of the observable sequences produces an element. + + - seealso: [combinelatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) + + - returns: An observable sequence containing the result of combining elements of the sources. + */ + public static func combineLatest(_ collection: C) -> Observable<[E]> + where C.Iterator.Element: ObservableType, C.Iterator.Element.E == E { + return CombineLatestCollectionType(sources: collection, resultSelector: { $0 }) + } +} + +final fileprivate class CombineLatestCollectionTypeSink + : Sink where C.Iterator.Element : ObservableConvertibleType { + typealias R = O.E typealias Parent = CombineLatestCollectionType typealias SourceElement = C.Iterator.Element.E let _parent: Parent - let _lock = NSRecursiveLock() + let _lock = RecursiveLock() // state var _numberOfValues = 0 @@ -101,12 +127,16 @@ class CombineLatestCollectionTypeSink j += 1 } + + if _parent._sources.isEmpty { + self.forwardOn(.completed) + } return Disposables.create(_subscriptions) } } -class CombineLatestCollectionType : Producer where C.Iterator.Element : ObservableConvertibleType { +final fileprivate class CombineLatestCollectionType : Producer where C.Iterator.Element : ObservableConvertibleType { typealias ResultSelector = ([C.Iterator.Element.E]) throws -> R let _sources: C @@ -116,7 +146,7 @@ class CombineLatestCollectionType : Producer where C.Iterat init(sources: C, resultSelector: @escaping ResultSelector) { _sources = sources _resultSelector = resultSelector - _count = Int(self._sources.count.toIntMax()) + _count = Int(Int64(self._sources.count)) } override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+arity.swift b/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift similarity index 79% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+arity.swift rename to Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift index 33eadc0..aad2255 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+arity.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift @@ -7,13 +7,11 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - // 2 -extension Observable { +extension ObservableType { /** Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. @@ -22,7 +20,6 @@ extension Observable { - 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 (_ source1: O1, _ source2: O2, resultSelector: @escaping (O1.E, O2.E) throws -> E) -> Observable { @@ -33,7 +30,25 @@ extension Observable { } } -class CombineLatestSink2_ : CombineLatestSink { +extension ObservableType where E == Any { + /** + Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. + + - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) + + - returns: An observable sequence containing the result of combining elements of the sources. + */ + public static func combineLatest + (_ source1: O1, _ source2: O2) + -> Observable<(O1.E, O2.E)> { + return CombineLatest2( + source1: source1.asObservable(), source2: source2.asObservable(), + resultSelector: { ($0, $1) } + ) + } +} + +final class CombineLatestSink2_ : CombineLatestSink { typealias R = O.E typealias Parent = CombineLatest2 @@ -68,7 +83,7 @@ class CombineLatestSink2_ : CombineLatestSink { } } -class CombineLatest2 : Producer { +final class CombineLatest2 : Producer { typealias ResultSelector = (E1, E2) throws -> R let _source1: Observable @@ -94,7 +109,7 @@ class CombineLatest2 : Producer { // 3 -extension Observable { +extension ObservableType { /** Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. @@ -103,7 +118,6 @@ extension Observable { - 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 (_ source1: O1, _ source2: O2, _ source3: O3, resultSelector: @escaping (O1.E, O2.E, O3.E) throws -> E) -> Observable { @@ -114,7 +128,25 @@ extension Observable { } } -class CombineLatestSink3_ : CombineLatestSink { +extension ObservableType where E == Any { + /** + Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. + + - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) + + - returns: An observable sequence containing the result of combining elements of the sources. + */ + public static func combineLatest + (_ source1: O1, _ source2: O2, _ source3: O3) + -> Observable<(O1.E, O2.E, O3.E)> { + return CombineLatest3( + source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), + resultSelector: { ($0, $1, $2) } + ) + } +} + +final class CombineLatestSink3_ : CombineLatestSink { typealias R = O.E typealias Parent = CombineLatest3 @@ -154,7 +186,7 @@ class CombineLatestSink3_ : CombineLatestSink { } } -class CombineLatest3 : Producer { +final class CombineLatest3 : Producer { typealias ResultSelector = (E1, E2, E3) throws -> R let _source1: Observable @@ -182,7 +214,7 @@ class CombineLatest3 : Producer { // 4 -extension Observable { +extension ObservableType { /** Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. @@ -191,7 +223,6 @@ extension Observable { - 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 (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E) throws -> E) -> Observable { @@ -202,7 +233,25 @@ extension Observable { } } -class CombineLatestSink4_ : CombineLatestSink { +extension ObservableType where E == Any { + /** + Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. + + - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) + + - returns: An observable sequence containing the result of combining elements of the sources. + */ + public static func combineLatest + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4) + -> Observable<(O1.E, O2.E, O3.E, O4.E)> { + return CombineLatest4( + source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), + resultSelector: { ($0, $1, $2, $3) } + ) + } +} + +final class CombineLatestSink4_ : CombineLatestSink { typealias R = O.E typealias Parent = CombineLatest4 @@ -247,7 +296,7 @@ class CombineLatestSink4_ : CombineLatestSink : Producer { +final class CombineLatest4 : Producer { typealias ResultSelector = (E1, E2, E3, E4) throws -> R let _source1: Observable @@ -277,7 +326,7 @@ class CombineLatest4 : Producer { // 5 -extension Observable { +extension ObservableType { /** Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. @@ -286,7 +335,6 @@ extension Observable { - 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 (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E) -> Observable { @@ -297,7 +345,25 @@ extension Observable { } } -class CombineLatestSink5_ : CombineLatestSink { +extension ObservableType where E == Any { + /** + Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. + + - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) + + - returns: An observable sequence containing the result of combining elements of the sources. + */ + public static func combineLatest + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5) + -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E)> { + return CombineLatest5( + source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), + resultSelector: { ($0, $1, $2, $3, $4) } + ) + } +} + +final class CombineLatestSink5_ : CombineLatestSink { typealias R = O.E typealias Parent = CombineLatest5 @@ -347,7 +413,7 @@ class CombineLatestSink5_ : CombineLatestSi } } -class CombineLatest5 : Producer { +final class CombineLatest5 : Producer { typealias ResultSelector = (E1, E2, E3, E4, E5) throws -> R let _source1: Observable @@ -379,7 +445,7 @@ class CombineLatest5 : Producer { // 6 -extension Observable { +extension ObservableType { /** Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. @@ -388,7 +454,6 @@ extension Observable { - 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 (_ 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) -> Observable { @@ -399,7 +464,25 @@ extension Observable { } } -class CombineLatestSink6_ : CombineLatestSink { +extension ObservableType where E == Any { + /** + Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. + + - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) + + - returns: An observable sequence containing the result of combining elements of the sources. + */ + public static func combineLatest + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6) + -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E)> { + return CombineLatest6( + source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), + resultSelector: { ($0, $1, $2, $3, $4, $5) } + ) + } +} + +final class CombineLatestSink6_ : CombineLatestSink { typealias R = O.E typealias Parent = CombineLatest6 @@ -454,7 +537,7 @@ class CombineLatestSink6_ : CombineLate } } -class CombineLatest6 : Producer { +final class CombineLatest6 : Producer { typealias ResultSelector = (E1, E2, E3, E4, E5, E6) throws -> R let _source1: Observable @@ -488,7 +571,7 @@ class CombineLatest6 : Producer { // 7 -extension Observable { +extension ObservableType { /** Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. @@ -497,7 +580,6 @@ extension Observable { - 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 (_ 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) -> Observable { @@ -508,7 +590,25 @@ extension Observable { } } -class CombineLatestSink7_ : CombineLatestSink { +extension ObservableType where E == Any { + /** + Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. + + - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) + + - returns: An observable sequence containing the result of combining elements of the sources. + */ + public static func combineLatest + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7) + -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E)> { + return CombineLatest7( + source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), + resultSelector: { ($0, $1, $2, $3, $4, $5, $6) } + ) + } +} + +final class CombineLatestSink7_ : CombineLatestSink { typealias R = O.E typealias Parent = CombineLatest7 @@ -568,7 +668,7 @@ class CombineLatestSink7_ : Combine } } -class CombineLatest7 : Producer { +final class CombineLatest7 : Producer { typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7) throws -> R let _source1: Observable @@ -604,7 +704,7 @@ class CombineLatest7 : Producer { // 8 -extension Observable { +extension ObservableType { /** Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. @@ -613,7 +713,6 @@ extension Observable { - 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 (_ 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) -> Observable { @@ -624,7 +723,25 @@ extension Observable { } } -class CombineLatestSink8_ : CombineLatestSink { +extension ObservableType where E == Any { + /** + Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. + + - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) + + - returns: An observable sequence containing the result of combining elements of the sources. + */ + public static func combineLatest + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8) + -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E)> { + return CombineLatest8( + source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), source8: source8.asObservable(), + resultSelector: { ($0, $1, $2, $3, $4, $5, $6, $7) } + ) + } +} + +final class CombineLatestSink8_ : CombineLatestSink { typealias R = O.E typealias Parent = CombineLatest8 @@ -689,7 +806,7 @@ class CombineLatestSink8_ : Com } } -class CombineLatest8 : Producer { +final class CombineLatest8 : Producer { typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7, E8) throws -> R let _source1: Observable diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest.swift b/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift similarity index 90% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest.swift rename to Example/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift index a84eb5b..8c03e8c 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift @@ -1,13 +1,11 @@ // // CombineLatest.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/21/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - protocol CombineLatestProtocol : class { func next(_ index: Int) func fail(_ error: Swift.Error) @@ -19,7 +17,7 @@ class CombineLatestSink , CombineLatestProtocol { typealias Element = O.E - let _lock = NSRecursiveLock() + let _lock = RecursiveLock() private let _arity: Int private var _numberOfValues = 0 @@ -36,7 +34,7 @@ class CombineLatestSink } func getResult() throws -> Element { - abstractMethod() + rxAbstractMethod() } func next(_ index: Int) { @@ -92,7 +90,7 @@ class CombineLatestSink } } -class CombineLatestObserver +final class CombineLatestObserver : ObserverType , LockOwnerType , SynchronizedOnType { @@ -101,12 +99,12 @@ class CombineLatestObserver private let _parent: CombineLatestProtocol - let _lock: NSRecursiveLock + let _lock: RecursiveLock private let _index: Int private let _this: Disposable private let _setLatestValue: ValueSetter - init(lock: NSRecursiveLock, parent: CombineLatestProtocol, index: Int, setLatestValue: @escaping ValueSetter, this: Disposable) { + init(lock: RecursiveLock, parent: CombineLatestProtocol, index: Int, setLatestValue: @escaping ValueSetter, this: Disposable) { _lock = lock _parent = parent _index = index diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Concat.swift b/Example/Pods/RxSwift/RxSwift/Observables/Concat.swift new file mode 100644 index 0000000..35ef0e1 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/Concat.swift @@ -0,0 +1,131 @@ +// +// Concat.swift +// RxSwift +// +// Created by Krunoslav Zaher on 3/21/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType { + + /** + Concatenates the second observable sequence to `self` upon successful termination of `self`. + + - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) + + - parameter second: Second observable sequence. + - returns: An observable sequence that contains the elements of `self`, followed by those of the second sequence. + */ + public func concat(_ second: O) -> Observable where O.E == E { + return Observable.concat([self.asObservable(), second.asObservable()]) + } +} + +extension ObservableType { + /** + Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully. + + This operator has tail recursive optimizations that will prevent stack overflow. + + Optimizations will be performed in cases equivalent to following: + + [1, [2, [3, .....].concat()].concat].concat() + + - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) + + - returns: An observable sequence that contains the elements of each given sequence, in sequential order. + */ + public static func concat(_ sequence: S) -> Observable + where S.Iterator.Element == Observable { + return Concat(sources: sequence, count: nil) + } + + /** + Concatenates all observable sequences in the given collection, as long as the previous observable sequence terminated successfully. + + This operator has tail recursive optimizations that will prevent stack overflow. + + Optimizations will be performed in cases equivalent to following: + + [1, [2, [3, .....].concat()].concat].concat() + + - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) + + - returns: An observable sequence that contains the elements of each given sequence, in sequential order. + */ + public static func concat(_ collection: S) -> Observable + where S.Iterator.Element == Observable { + return Concat(sources: collection, count: Int64(collection.count)) + } + + /** + Concatenates all observable sequences in the given collection, as long as the previous observable sequence terminated successfully. + + This operator has tail recursive optimizations that will prevent stack overflow. + + Optimizations will be performed in cases equivalent to following: + + [1, [2, [3, .....].concat()].concat].concat() + + - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) + + - returns: An observable sequence that contains the elements of each given sequence, in sequential order. + */ + public static func concat(_ sources: Observable ...) -> Observable { + return Concat(sources: sources, count: Int64(sources.count)) + } +} + +final fileprivate class ConcatSink + : TailRecursiveSink + , ObserverType where S.Iterator.Element : ObservableConvertibleType, S.Iterator.Element.E == O.E { + typealias Element = O.E + + override init(observer: O, cancel: Cancelable) { + super.init(observer: observer, cancel: cancel) + } + + func on(_ event: Event){ + switch event { + case .next: + forwardOn(event) + case .error: + forwardOn(event) + dispose() + case .completed: + schedule(.moveNext) + } + } + + override func subscribeToNext(_ source: Observable) -> Disposable { + return source.subscribe(self) + } + + override func extract(_ observable: Observable) -> SequenceGenerator? { + if let source = observable as? Concat { + return (source._sources.makeIterator(), source._count) + } + else { + return nil + } + } +} + +final fileprivate class Concat : Producer where S.Iterator.Element : ObservableConvertibleType { + typealias Element = S.Iterator.Element.E + + fileprivate let _sources: S + fileprivate let _count: IntMax? + + init(sources: S, count: IntMax?) { + _sources = sources + _count = count + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = ConcatSink(observer: observer, cancel: cancel) + let subscription = sink.run((_sources.makeIterator(), _count)) + return (sink: sink, subscription: subscription) + } +} + diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/AnonymousObservable.swift b/Example/Pods/RxSwift/RxSwift/Observables/Create.swift similarity index 50% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/AnonymousObservable.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Create.swift index 87cf2c6..507c8e6 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/AnonymousObservable.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Create.swift @@ -1,33 +1,55 @@ // -// AnonymousObservable.swift -// Rx +// Create.swift +// RxSwift // // Created by Krunoslav Zaher on 2/8/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { + // MARK: create -class AnonymousObservableSink : Sink, ObserverType { + /** + Creates an observable sequence from a specified subscribe method implementation. + + - seealso: [create operator on reactivex.io](http://reactivex.io/documentation/operators/create.html) + + - parameter subscribe: Implementation of the resulting observable sequence's `subscribe` method. + - returns: The observable sequence with the specified implementation for the `subscribe` method. + */ + public static func create(_ subscribe: @escaping (AnyObserver) -> Disposable) -> Observable { + return AnonymousObservable(subscribe) + } +} + +final fileprivate class AnonymousObservableSink : Sink, ObserverType { typealias E = O.E typealias Parent = AnonymousObservable // state - private var _isStopped: AtomicInt = 0 + private var _isStopped = AtomicInt(0) + + #if DEBUG + fileprivate let _synchronizationTracker = SynchronizationTracker() + #endif override init(observer: O, cancel: Cancelable) { super.init(observer: observer, cancel: cancel) } func on(_ event: Event) { + #if DEBUG + _synchronizationTracker.register(synchronizationErrorMessage: .default) + defer { _synchronizationTracker.unregister() } + #endif switch event { case .next: - if _isStopped == 1 { + if _isStopped.load() == 1 { return } forwardOn(event) case .error, .completed: - if AtomicCompareAndSwap(0, 1, &_isStopped) { + if _isStopped.fetchOr(1) == 0 { forwardOn(event) dispose() } @@ -39,7 +61,7 @@ class AnonymousObservableSink : Sink, ObserverType { } } -class AnonymousObservable : Producer { +final fileprivate class AnonymousObservable : Producer { typealias SubscribeHandler = (AnyObserver) -> Disposable let _subscribeHandler: SubscribeHandler diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Debunce.swift b/Example/Pods/RxSwift/RxSwift/Observables/Debounce.swift similarity index 74% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Debunce.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Debounce.swift index 3f85d37..866427a 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Debunce.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Debounce.swift @@ -1,14 +1,29 @@ // -// Debunce.swift -// Rx +// Debounce.swift +// RxSwift // // Created by Krunoslav Zaher on 9/11/16. // Copyright © 2016 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { -class DebounceSink + /** + Ignores elements from an observable sequence which are followed by another element within a specified relative time duration, using the specified scheduler to run throttling timers. + + - seealso: [debounce operator on reactivex.io](http://reactivex.io/documentation/operators/debounce.html) + + - parameter dueTime: Throttling duration for each element. + - parameter scheduler: Scheduler to run the throttle timers on. + - returns: The throttled sequence. + */ + public func debounce(_ dueTime: RxTimeInterval, scheduler: SchedulerType) + -> Observable { + return Debounce(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) + } +} + +final fileprivate class DebounceSink : Sink , ObserverType , LockOwnerType @@ -18,7 +33,7 @@ class DebounceSink private let _parent: ParentType - let _lock = NSRecursiveLock() + let _lock = RecursiveLock() // state private var _id = 0 as UInt64 @@ -83,7 +98,7 @@ class DebounceSink } } -class Debounce : Producer { +final fileprivate class Debounce : Producer { fileprivate let _source: Observable fileprivate let _dueTime: RxTimeInterval diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Debug.swift b/Example/Pods/RxSwift/RxSwift/Observables/Debug.swift similarity index 50% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Debug.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Debug.swift index 1f5d3ea..85b8af7 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Debug.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Debug.swift @@ -6,15 +6,33 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +import struct Foundation.Date +import class Foundation.DateFormatter -let dateFormat = "yyyy-MM-dd HH:mm:ss.SSS" +extension ObservableType { -func logEvent(_ identifier: String, dateFormat: DateFormatter, content: String) { + /** + Prints received events for all observers on standard output. + + - seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html) + + - parameter identifier: Identifier that is printed together with event description to standard output. + - parameter trimOutput: Should output be trimmed to max 40 characters. + - returns: An observable sequence whose events are printed to standard output. + */ + public func debug(_ identifier: String? = nil, trimOutput: Bool = false, file: String = #file, line: UInt = #line, function: String = #function) + -> Observable { + return Debug(source: self, identifier: identifier, trimOutput: trimOutput, file: file, line: line, function: function) + } +} + +fileprivate let dateFormat = "yyyy-MM-dd HH:mm:ss.SSS" + +fileprivate func logEvent(_ identifier: String, dateFormat: DateFormatter, content: String) { print("\(dateFormat.string(from: Date())): \(identifier) -> \(content)") } -class DebugSink : Sink, ObserverType where O.E == Source.E { +final fileprivate class DebugSink : Sink, ObserverType where O.E == Source.E { typealias Element = O.E typealias Parent = Debug @@ -33,8 +51,9 @@ class DebugSink : Sink, ObserverType func on(_ event: Event) { let maxEventTextLength = 40 let eventText = "\(event)" - let eventNormalized = eventText.characters.count > maxEventTextLength - ? String(eventText.characters.prefix(maxEventTextLength / 2)) + "..." + String(eventText.characters.suffix(maxEventTextLength / 2)) + + let eventNormalized = (eventText.count > maxEventTextLength) && _parent._trimOutput + ? String(eventText.prefix(maxEventTextLength / 2)) + "..." + String(eventText.suffix(maxEventTextLength / 2)) : eventText logEvent(_parent._identifier, dateFormat: _timestampFormatter, content: "Event \(eventNormalized)") @@ -46,24 +65,27 @@ class DebugSink : Sink, ObserverType } override func dispose() { - logEvent(_parent._identifier, dateFormat: _timestampFormatter, content: "isDisposed") + if !self.disposed { + logEvent(_parent._identifier, dateFormat: _timestampFormatter, content: "isDisposed") + } super.dispose() } } -class Debug : Producer { +final fileprivate class Debug : Producer { fileprivate let _identifier: String - + fileprivate let _trimOutput: Bool fileprivate let _source: Source - init(source: Source, identifier: String?, file: String, line: UInt, function: String) { + init(source: Source, identifier: String?, trimOutput: Bool, file: String, line: UInt, function: String) { + _trimOutput = trimOutput if let identifier = identifier { _identifier = identifier } else { let trimmedFile: String if let lastIndex = file.lastIndexOf("/") { - trimmedFile = file[file.index(after: lastIndex) ..< file.endIndex] + trimmedFile = String(file[file.index(after: lastIndex) ..< file.endIndex]) } else { trimmedFile = file diff --git a/Example/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift b/Example/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift new file mode 100644 index 0000000..696361f --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift @@ -0,0 +1,66 @@ +// +// DefaultIfEmpty.swift +// RxSwift +// +// Created by sergdort on 23/12/2016. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType { + + /** + Emits elements from the source observable sequence, or a default element if the source observable sequence is empty. + + - seealso: [DefaultIfEmpty operator on reactivex.io](http://reactivex.io/documentation/operators/defaultifempty.html) + + - parameter default: Default element to be sent if the source does not emit any elements + - returns: An observable sequence which emits default element end completes in case the original sequence is empty + */ + public func ifEmpty(default: E) -> Observable { + return DefaultIfEmpty(source: self.asObservable(), default: `default`) + } +} + +final fileprivate class DefaultIfEmptySink: Sink, ObserverType { + typealias E = O.E + private let _default: E + private var _isEmpty = true + + init(default: E, observer: O, cancel: Cancelable) { + _default = `default` + super.init(observer: observer, cancel: cancel) + } + + func on(_ event: Event) { + switch event { + case .next(_): + _isEmpty = false + forwardOn(event) + case .error(_): + forwardOn(event) + dispose() + case .completed: + if _isEmpty { + forwardOn(.next(_default)) + } + forwardOn(.completed) + dispose() + } + } +} + +final fileprivate class DefaultIfEmpty: Producer { + private let _source: Observable + private let _default: SourceType + + init(source: Observable, `default`: SourceType) { + _source = source + _default = `default` + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceType { + let sink = DefaultIfEmptySink(default: _default, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Deferred.swift b/Example/Pods/RxSwift/RxSwift/Observables/Deferred.swift similarity index 62% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Deferred.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Deferred.swift index 43182ce..947f604 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Deferred.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Deferred.swift @@ -6,9 +6,22 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { + /** + Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes. -class DeferredSink : Sink, ObserverType where S.E == O.E { + - seealso: [defer operator on reactivex.io](http://reactivex.io/documentation/operators/defer.html) + + - 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. + */ + public static func deferred(_ observableFactory: @escaping () throws -> Observable) + -> Observable { + return Deferred(observableFactory: observableFactory) + } +} + +final fileprivate class DeferredSink : Sink, ObserverType where S.E == O.E { typealias E = O.E private let _observableFactory: () throws -> S @@ -44,7 +57,7 @@ class DeferredSink : Sink, ObserverType w } } -class Deferred : Producer { +final fileprivate class Deferred : Producer { typealias Factory = () throws -> S private let _observableFactory : Factory diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Delay.swift b/Example/Pods/RxSwift/RxSwift/Observables/Delay.swift similarity index 75% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Delay.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Delay.swift index 1697692..13955a3 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Delay.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Delay.swift @@ -6,16 +6,33 @@ // Copyright © 2016 Krunoslav Zaher. All rights reserved. // -import Foundation +import struct Foundation.Date -class DelaySink +extension ObservableType { + + /** + Returns an observable sequence by the source observable sequence shifted forward in time by a specified delay. Error events from the source observable sequence are not delayed. + + - seealso: [delay operator on reactivex.io](http://reactivex.io/documentation/operators/delay.html) + + - parameter dueTime: Relative time shift of the source by. + - parameter scheduler: Scheduler to run the subscription delay timer on. + - returns: the source Observable shifted in time by the specified delay. + */ + public func delay(_ dueTime: RxTimeInterval, scheduler: SchedulerType) + -> Observable { + return Delay(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) + } +} + +final fileprivate class DelaySink : Sink - , ObserverType where O.E == ElementType { + , ObserverType { typealias E = O.E typealias Source = Observable typealias DisposeKey = Bag.KeyType - private let _lock = NSRecursiveLock() + private let _lock = RecursiveLock() private let _dueTime: RxTimeInterval private let _scheduler: SchedulerType @@ -40,7 +57,7 @@ class DelaySink } // All of these complications in this method are caused by the fact that - // error should be propagated immediatelly. Error can bepotentially received on different + // error should be propagated immediately. Error can be potentially received on different // scheduler so this process needs to be synchronized somehow. // // Another complication is that scheduler is potentially concurrent so internal queue is used. @@ -63,13 +80,13 @@ class DelaySink _lock.lock() // { let errorEvent = _errorEvent - let eventToForwardImmediatelly = ranAtLeastOnce ? nil : _queue.dequeue()?.event + let eventToForwardImmediately = ranAtLeastOnce ? nil : _queue.dequeue()?.event let nextEventToScheduleOriginalTime: Date? = ranAtLeastOnce && !_queue.isEmpty ? _queue.peek().eventTime : nil if let _ = errorEvent { } else { - if let _ = eventToForwardImmediatelly { + if let _ = eventToForwardImmediately { } else if let _ = nextEventToScheduleOriginalTime { _running = false @@ -87,10 +104,10 @@ class DelaySink return } else { - if let eventToForwardImmediatelly = eventToForwardImmediatelly { + if let eventToForwardImmediately = eventToForwardImmediately { ranAtLeastOnce = true - self.forwardOn(eventToForwardImmediatelly) - if case .completed = eventToForwardImmediatelly { + self.forwardOn(eventToForwardImmediately) + if case .completed = eventToForwardImmediately { self.dispose() return } @@ -117,12 +134,12 @@ class DelaySink switch event { case .error(_): _lock.lock() // { - let shouldSendImmediatelly = !_running + let shouldSendImmediately = !_running _queue = Queue(capacity: 0) _errorEvent = event _lock.unlock() // } - if shouldSendImmediatelly { + if shouldSendImmediately { forwardOn(event) dispose() } @@ -139,13 +156,13 @@ class DelaySink } } - func run(source: Source) -> Disposable { - _sourceSubscription.setDisposable(source.subscribeSafe(self)) + func run(source: Observable) -> Disposable { + _sourceSubscription.setDisposable(source.subscribe(self)) return Disposables.create(_sourceSubscription, _cancelable) } } -class Delay: Producer { +final fileprivate class Delay: Producer { private let _source: Observable private let _dueTime: RxTimeInterval private let _scheduler: SchedulerType diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/DelaySubscription.swift b/Example/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift similarity index 57% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/DelaySubscription.swift rename to Example/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift index d7abf20..9225a19 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/DelaySubscription.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift @@ -6,13 +6,27 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { -class DelaySubscriptionSink - : Sink - , ObserverType where O.E == ElementType { - typealias Parent = DelaySubscription + /** + Time shifts the observable sequence by delaying the subscription with the specified relative time duration, using the specified scheduler to run timers. + + - seealso: [delay operator on reactivex.io](http://reactivex.io/documentation/operators/delay.html) + + - parameter dueTime: Relative time shift of the subscription. + - parameter scheduler: Scheduler to run the subscription delay timer on. + - returns: Time-shifted sequence. + */ + public func delaySubscription(_ dueTime: RxTimeInterval, scheduler: SchedulerType) + -> Observable { + return DelaySubscription(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) + } +} + +final fileprivate class DelaySubscriptionSink + : Sink, ObserverType { typealias E = O.E + typealias Parent = DelaySubscription private let _parent: Parent @@ -30,7 +44,7 @@ class DelaySubscriptionSink } -class DelaySubscription: Producer { +final fileprivate class DelaySubscription: Producer { private let _source: Observable private let _dueTime: RxTimeInterval private let _scheduler: SchedulerType diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift b/Example/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift new file mode 100644 index 0000000..d142249 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift @@ -0,0 +1,51 @@ +// +// Dematerialize.swift +// RxSwift +// +// Created by Jamie Pinkham on 3/13/17. +// Copyright © 2017 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType where E: EventConvertible { + /** + Convert any previously materialized Observable into it's original form. + - seealso: [materialize operator on reactivex.io](http://reactivex.io/documentation/operators/materialize-dematerialize.html) + - returns: The dematerialized observable sequence. + */ + public func dematerialize() -> Observable { + return Dematerialize(source: self.asObservable()) + } + +} + +fileprivate final class DematerializeSink: Sink, ObserverType where O.E == Element.ElementType { + fileprivate func on(_ event: Event) { + switch event { + case .next(let element): + forwardOn(element.event) + if element.event.isStopEvent { + dispose() + } + case .completed: + forwardOn(.completed) + dispose() + case .error(let error): + forwardOn(.error(error)) + dispose() + } + } +} + +final fileprivate class Dematerialize: Producer { + private let _source: Observable + + init(source: Observable) { + _source = source + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element.ElementType { + let sink = DematerializeSink(observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift b/Example/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift new file mode 100644 index 0000000..f72f520 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift @@ -0,0 +1,125 @@ +// +// DistinctUntilChanged.swift +// RxSwift +// +// Created by Krunoslav Zaher on 3/15/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType where E: Equatable { + + /** + Returns an observable sequence that contains only distinct contiguous elements according to equality operator. + + - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) + + - returns: An observable sequence only containing the distinct contiguous elements, based on equality operator, from the source sequence. + */ + public func distinctUntilChanged() + -> Observable { + return self.distinctUntilChanged({ $0 }, comparer: { ($0 == $1) }) + } +} + +extension ObservableType { + /** + Returns an observable sequence that contains only distinct contiguous elements according to the `keySelector`. + + - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) + + - 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. + */ + public func distinctUntilChanged(_ keySelector: @escaping (E) throws -> K) + -> Observable { + return self.distinctUntilChanged(keySelector, comparer: { $0 == $1 }) + } + + /** + Returns an observable sequence that contains only distinct contiguous elements according to the `comparer`. + + - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) + + - 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. + */ + public func distinctUntilChanged(_ comparer: @escaping (E, E) throws -> Bool) + -> Observable { + return self.distinctUntilChanged({ $0 }, comparer: comparer) + } + + /** + Returns an observable sequence that contains only distinct contiguous elements according to the keySelector and the comparer. + + - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) + + - parameter keySelector: A function to compute the comparison key for each element. + - 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. + */ + public func distinctUntilChanged(_ keySelector: @escaping (E) throws -> K, comparer: @escaping (K, K) throws -> Bool) + -> Observable { + return DistinctUntilChanged(source: self.asObservable(), selector: keySelector, comparer: comparer) + } +} + +final fileprivate class DistinctUntilChangedSink: Sink, ObserverType { + typealias E = O.E + + private let _parent: DistinctUntilChanged + private var _currentKey: Key? = nil + + init(parent: DistinctUntilChanged, observer: O, cancel: Cancelable) { + _parent = parent + super.init(observer: observer, cancel: cancel) + } + + func on(_ event: Event) { + switch event { + case .next(let value): + do { + let key = try _parent._selector(value) + var areEqual = false + if let currentKey = _currentKey { + areEqual = try _parent._comparer(currentKey, key) + } + + if areEqual { + return + } + + _currentKey = key + + forwardOn(event) + } + catch let error { + forwardOn(.error(error)) + dispose() + } + case .error, .completed: + forwardOn(event) + dispose() + } + } +} + +final fileprivate class DistinctUntilChanged: Producer { + typealias KeySelector = (Element) throws -> Key + typealias EqualityComparer = (Key, Key) throws -> Bool + + fileprivate let _source: Observable + fileprivate let _selector: KeySelector + fileprivate let _comparer: EqualityComparer + + init(source: Observable, selector: @escaping KeySelector, comparer: @escaping EqualityComparer) { + _source = source + _selector = selector + _comparer = comparer + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = DistinctUntilChangedSink(parent: self, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Do.swift b/Example/Pods/RxSwift/RxSwift/Observables/Do.swift new file mode 100644 index 0000000..2be6d58 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/Do.swift @@ -0,0 +1,93 @@ +// +// Do.swift +// RxSwift +// +// Created by Krunoslav Zaher on 2/21/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType { + /** + Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence. + + - seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html) + + - parameter onNext: Action to invoke for each element in the observable sequence. + - parameter onError: Action to invoke upon errored termination of the observable sequence. + - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. + - parameter onSubscribe: Action to invoke before subscribing to source observable sequence. + - parameter onSubscribed: Action to invoke after 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. + */ + public func `do`(onNext: ((E) throws -> Void)? = nil, onError: ((Swift.Error) throws -> Void)? = nil, onCompleted: (() throws -> Void)? = nil, onSubscribe: (() -> ())? = nil, onSubscribed: (() -> ())? = nil, onDispose: (() -> ())? = nil) + -> Observable { + return Do(source: self.asObservable(), eventHandler: { e in + switch e { + case .next(let element): + try onNext?(element) + case .error(let e): + try onError?(e) + case .completed: + try onCompleted?() + } + }, onSubscribe: onSubscribe, onSubscribed: onSubscribed, onDispose: onDispose) + } +} + +final fileprivate class DoSink : Sink, ObserverType { + typealias Element = O.E + typealias EventHandler = (Event) throws -> Void + + private let _eventHandler: EventHandler + + init(eventHandler: @escaping EventHandler, observer: O, cancel: Cancelable) { + _eventHandler = eventHandler + super.init(observer: observer, cancel: cancel) + } + + func on(_ event: Event) { + do { + try _eventHandler(event) + forwardOn(event) + if event.isStopEvent { + dispose() + } + } + catch let error { + forwardOn(.error(error)) + dispose() + } + } +} + +final fileprivate class Do : Producer { + typealias EventHandler = (Event) throws -> Void + + fileprivate let _source: Observable + fileprivate let _eventHandler: EventHandler + fileprivate let _onSubscribe: (() -> ())? + fileprivate let _onSubscribed: (() -> ())? + fileprivate let _onDispose: (() -> ())? + + init(source: Observable, eventHandler: @escaping EventHandler, onSubscribe: (() -> ())?, onSubscribed: (() -> ())?, onDispose: (() -> ())?) { + _source = source + _eventHandler = eventHandler + _onSubscribe = onSubscribe + _onSubscribed = onSubscribed + _onDispose = onDispose + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + _onSubscribe?() + let sink = DoSink(eventHandler: _eventHandler, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + _onSubscribed?() + let onDispose = _onDispose + let allSubscriptions = Disposables.create { + subscription.dispose() + onDispose?() + } + return (sink: sink, subscription: allSubscriptions) + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/ElementAt.swift b/Example/Pods/RxSwift/RxSwift/Observables/ElementAt.swift similarity index 69% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/ElementAt.swift rename to Example/Pods/RxSwift/RxSwift/Observables/ElementAt.swift index 6e26141..500a044 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/ElementAt.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/ElementAt.swift @@ -1,15 +1,29 @@ // // ElementAt.swift -// Rx +// RxSwift // // Created by Junior B. on 21/10/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { + /** + Returns a sequence emitting only element _n_ emitted by an Observable -class ElementAtSink : Sink, ObserverType where O.E == SourceType { + - seealso: [elementAt operator on reactivex.io](http://reactivex.io/documentation/operators/elementat.html) + + - parameter index: The index of the required element (starting from 0). + - returns: An observable sequence that emits the desired element as its own sole emission. + */ + public func elementAt(_ index: Int) + -> Observable { + return ElementAt(source: asObservable(), index: index, throwOnEmpty: true) + } +} + +final fileprivate class ElementAtSink : Sink, ObserverType { + typealias SourceType = O.E typealias Parent = ElementAt let _parent: Parent @@ -55,7 +69,7 @@ class ElementAtSink : Sink, ObserverType where O } } -class ElementAt : Producer { +final fileprivate class ElementAt : Producer { let _source: Observable let _throwOnEmpty: Bool @@ -73,7 +87,7 @@ class ElementAt : Producer { override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceType { let sink = ElementAtSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribeSafe(sink) + let subscription = _source.subscribe(sink) return (sink: sink, subscription: subscription) } } diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Empty.swift b/Example/Pods/RxSwift/RxSwift/Observables/Empty.swift new file mode 100644 index 0000000..d2dcdb0 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/Empty.swift @@ -0,0 +1,27 @@ +// +// Empty.swift +// RxSwift +// +// Created by Krunoslav Zaher on 8/30/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType { + /** + Returns an empty observable sequence, using the specified scheduler to send out the single `Completed` message. + + - seealso: [empty operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html) + + - returns: An observable sequence with no elements. + */ + public static func empty() -> Observable { + return EmptyProducer() + } +} + +final fileprivate class EmptyProducer : Producer { + override func subscribe(_ observer: O) -> Disposable where O.E == Element { + observer.on(.completed) + return Disposables.create() + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Enumerated.swift b/Example/Pods/RxSwift/RxSwift/Observables/Enumerated.swift new file mode 100644 index 0000000..2a6cd98 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/Enumerated.swift @@ -0,0 +1,62 @@ +// +// Enumerated.swift +// RxSwift +// +// Created by Krunoslav Zaher on 8/6/17. +// Copyright © 2017 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType { + + /** + Enumerates the elements of an observable sequence. + + - seealso: [map operator on reactivex.io](http://reactivex.io/documentation/operators/map.html) + + - returns: An observable sequence that contains tuples of source sequence elements and their indexes. + */ + public func enumerated() + -> Observable<(index: Int, element: E)> { + return Enumerated(source: self.asObservable()) + } +} + +final fileprivate class EnumeratedSink: Sink, ObserverType where O.E == (index: Int, element: Element) { + typealias E = Element + var index = 0 + + func on(_ event: Event) { + switch event { + case .next(let value): + do { + let nextIndex = try incrementChecked(&index) + let next = (index: nextIndex, element: value) + forwardOn(.next(next)) + } + catch let e { + forwardOn(.error(e)) + dispose() + } + case .completed: + forwardOn(.completed) + dispose() + case .error(let error): + forwardOn(.error(error)) + dispose() + } + } +} + +final fileprivate class Enumerated : Producer<(index: Int, element: Element)> { + private let _source: Observable + + init(source: Observable) { + _source = source + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == (index: Int, element: Element) { + let sink = EnumeratedSink(observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Error.swift b/Example/Pods/RxSwift/RxSwift/Observables/Error.swift new file mode 100644 index 0000000..a15942b --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/Error.swift @@ -0,0 +1,33 @@ +// +// Error.swift +// RxSwift +// +// Created by Krunoslav Zaher on 8/30/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType { + /** + Returns an observable sequence that terminates with an `error`. + + - seealso: [throw operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html) + + - returns: The observable sequence that terminates with specified error. + */ + public static func error(_ error: Swift.Error) -> Observable { + return ErrorProducer(error: error) + } +} + +final fileprivate class ErrorProducer : Producer { + private let _error: Swift.Error + + init(error: Swift.Error) { + _error = error + } + + override func subscribe(_ observer: O) -> Disposable where O.E == Element { + observer.on(.error(_error)) + return Disposables.create() + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Filter.swift b/Example/Pods/RxSwift/RxSwift/Observables/Filter.swift similarity index 54% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Filter.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Filter.swift index db97fdf..05dc8a4 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Filter.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Filter.swift @@ -1,14 +1,46 @@ // // Filter.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/17/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { -class FilterSink: Sink, ObserverType { + /** + Filters the elements of an observable sequence based on a predicate. + + - seealso: [filter operator on reactivex.io](http://reactivex.io/documentation/operators/filter.html) + + - 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. + */ + public func filter(_ predicate: @escaping (E) throws -> Bool) + -> Observable { + return Filter(source: asObservable(), predicate: predicate) + } +} + +extension ObservableType { + + /** + Skips elements and completes (or errors) when the observable sequence completes (or errors). Equivalent to filter that always returns false. + + - seealso: [ignoreElements operator on reactivex.io](http://reactivex.io/documentation/operators/ignoreelements.html) + + - returns: An observable sequence that skips all elements of the source sequence. + */ + public func ignoreElements() + -> Completable { + return flatMap { _ in + return Observable.empty() + } + .asCompletable() + } +} + +final fileprivate class FilterSink: Sink, ObserverType { typealias Predicate = (Element) throws -> Bool typealias Element = O.E @@ -39,7 +71,7 @@ class FilterSink: Sink, ObserverType { } } -class Filter : Producer { +final fileprivate class Filter : Producer { typealias Predicate = (Element) throws -> Bool private let _source: Observable diff --git a/Example/Pods/RxSwift/RxSwift/Observables/First.swift b/Example/Pods/RxSwift/RxSwift/Observables/First.swift new file mode 100644 index 0000000..4a72ba0 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/First.swift @@ -0,0 +1,42 @@ +// +// First.swift +// RxSwift +// +// Created by Krunoslav Zaher on 7/31/17. +// Copyright © 2017 Krunoslav Zaher. All rights reserved. +// + +fileprivate final class FirstSink : Sink, ObserverType where O.E == Element? { + typealias E = Element + typealias Parent = First + + func on(_ event: Event) { + switch event { + case .next(let value): + forwardOn(.next(value)) + forwardOn(.completed) + dispose() + case .error(let error): + forwardOn(.error(error)) + dispose() + case .completed: + forwardOn(.next(nil)) + forwardOn(.completed) + dispose() + } + } +} + +final class First: Producer { + fileprivate let _source: Observable + + init(source: Observable) { + _source = source + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element? { + let sink = FirstSink(observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Generate.swift b/Example/Pods/RxSwift/RxSwift/Observables/Generate.swift similarity index 66% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Generate.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Generate.swift index bcd380b..6469937 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Generate.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Generate.swift @@ -1,14 +1,30 @@ // // Generate.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 9/2/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { + /** + Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler + to run the loop send out observer messages. -class GenerateSink : Sink { + - seealso: [create operator on reactivex.io](http://reactivex.io/documentation/operators/create.html) + + - parameter initialState: Initial state. + - parameter condition: Condition to terminate generation (upon returning `false`). + - parameter iterate: Iteration step function. + - parameter scheduler: Scheduler on which to run the generator loop. + - returns: The generated sequence. + */ + public static func generate(initialState: E, condition: @escaping (E) throws -> Bool, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance, iterate: @escaping (E) throws -> E) -> Observable { + return Generate(initialState: initialState, condition: condition, iterate: iterate, resultSelector: { $0 }, scheduler: scheduler) + } +} + +final fileprivate class GenerateSink : Sink { typealias Parent = Generate private let _parent: Parent @@ -47,7 +63,7 @@ class GenerateSink : Sink { } } -class Generate : Producer { +final fileprivate class Generate : Producer { fileprivate let _initialState: S fileprivate let _condition: (S) throws -> Bool fileprivate let _iterate: (S) throws -> S diff --git a/Example/Pods/RxSwift/RxSwift/Observables/GroupBy.swift b/Example/Pods/RxSwift/RxSwift/Observables/GroupBy.swift new file mode 100644 index 0000000..a8a0e78 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/GroupBy.swift @@ -0,0 +1,134 @@ +// +// GroupBy.swift +// RxSwift +// +// Created by Tomi Koskinen on 01/12/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType { + /* + Groups the elements of an observable sequence according to a specified key selector function. + + - seealso: [groupBy operator on reactivex.io](http://reactivex.io/documentation/operators/groupby.html) + + - parameter keySelector: A function to extract the key for each element. + - returns: A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. + */ + public func groupBy(keySelector: @escaping (E) throws -> K) + -> Observable> { + return GroupBy(source: self.asObservable(), selector: keySelector) + } +} + +final fileprivate class GroupedObservableImpl : Observable { + private var _subject: PublishSubject + private var _refCount: RefCountDisposable + + init(key: Key, subject: PublishSubject, refCount: RefCountDisposable) { + _subject = subject + _refCount = refCount + } + + override public func subscribe(_ observer: O) -> Disposable where O.E == E { + let release = _refCount.retain() + let subscription = _subject.subscribe(observer) + return Disposables.create(release, subscription) + } +} + + +final fileprivate class GroupBySink + : Sink + , ObserverType where O.E == GroupedObservable { + typealias E = Element + typealias ResultType = O.E + typealias Parent = GroupBy + + private let _parent: Parent + private let _subscription = SingleAssignmentDisposable() + private var _refCountDisposable: RefCountDisposable! + private var _groupedSubjectTable: [Key: PublishSubject] + + init(parent: Parent, observer: O, cancel: Cancelable) { + _parent = parent + _groupedSubjectTable = [Key: PublishSubject]() + super.init(observer: observer, cancel: cancel) + } + + func run() -> Disposable { + _refCountDisposable = RefCountDisposable(disposable: _subscription) + + _subscription.setDisposable(_parent._source.subscribe(self)) + + return _refCountDisposable + } + + private func onGroupEvent(key: Key, value: Element) { + if let writer = _groupedSubjectTable[key] { + writer.on(.next(value)) + } else { + let writer = PublishSubject() + _groupedSubjectTable[key] = writer + + let group = GroupedObservable( + key: key, + source: GroupedObservableImpl(key: key, subject: writer, refCount: _refCountDisposable) + ) + + forwardOn(.next(group)) + writer.on(.next(value)) + } + } + + final func on(_ event: Event) { + switch event { + case let .next(value): + do { + let groupKey = try _parent._selector(value) + onGroupEvent(key: groupKey, value: value) + } + catch let e { + error(e) + return + } + case let .error(e): + error(e) + case .completed: + forwardOnGroups(event: .completed) + forwardOn(.completed) + _subscription.dispose() + dispose() + } + } + + final func error(_ error: Swift.Error) { + forwardOnGroups(event: .error(error)) + forwardOn(.error(error)) + _subscription.dispose() + dispose() + } + + final func forwardOnGroups(event: Event) { + for writer in _groupedSubjectTable.values { + writer.on(event) + } + } +} + +final fileprivate class GroupBy: Producer> { + typealias KeySelector = (Element) throws -> Key + + fileprivate let _source: Observable + fileprivate let _selector: KeySelector + + init(source: Observable, selector: @escaping KeySelector) { + _source = source + _selector = selector + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == GroupedObservable { + let sink = GroupBySink(parent: self, observer: observer, cancel: cancel) + return (sink: sink, subscription: sink.run()) + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Concat.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Concat.swift deleted file mode 100644 index 6787558..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Concat.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// Concat.swift -// Rx -// -// Created by Krunoslav Zaher on 3/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - - -class ConcatSink - : TailRecursiveSink - , ObserverType where S.Iterator.Element : ObservableConvertibleType, S.Iterator.Element.E == O.E { - typealias Element = O.E - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event){ - switch event { - case .next: - forwardOn(event) - case .error: - forwardOn(event) - dispose() - case .completed: - schedule(.moveNext) - } - } - - override func subscribeToNext(_ source: Observable) -> Disposable { - return source.subscribe(self) - } - - override func extract(_ observable: Observable) -> SequenceGenerator? { - if let source = observable as? Concat { - return (source._sources.makeIterator(), source._count) - } - else { - return nil - } - } -} - -class Concat : Producer where S.Iterator.Element : ObservableConvertibleType { - typealias Element = S.Iterator.Element.E - - fileprivate let _sources: S - fileprivate let _count: IntMax? - - init(sources: S, count: IntMax?) { - _sources = sources - _count = count - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = ConcatSink(observer: observer, cancel: cancel) - let subscription = sink.run((_sources.makeIterator(), _count)) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/ConnectableObservable.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/ConnectableObservable.swift deleted file mode 100644 index db5611b..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/ConnectableObservable.swift +++ /dev/null @@ -1,96 +0,0 @@ -// -// ConnectableObservable.swift -// Rx -// -// Created by Krunoslav Zaher on 3/1/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -/** - Represents an observable wrapper that can be connected and disconnected from its underlying observable sequence. -*/ -public class ConnectableObservable - : Observable - , ConnectableObservableType { - - /** - Connects the observable wrapper to its source. All subscribed observers will receive values from the underlying observable sequence as long as the connection is established. - - - returns: Disposable used to disconnect the observable wrapper from its source, causing subscribed observer to stop receiving values from the underlying observable sequence. - */ - public func connect() -> Disposable { - abstractMethod() - } -} - -class Connection : Disposable { - - private var _lock: NSRecursiveLock - // state - private var _parent: ConnectableObservableAdapter? - private var _subscription : Disposable? - - init(parent: ConnectableObservableAdapter, lock: NSRecursiveLock, subscription: Disposable) { - _parent = parent - _subscription = subscription - _lock = lock - } - - func dispose() { - _lock.lock(); defer { _lock.unlock() } // { - guard let parent = _parent else { - return - } - - guard let oldSubscription = _subscription else { - return - } - - _subscription = nil - if parent._connection === self { - parent._connection = nil - } - _parent = nil - - oldSubscription.dispose() - // } - } -} - -class ConnectableObservableAdapter - : ConnectableObservable { - typealias ConnectionType = Connection - - fileprivate let _subject: S - fileprivate let _source: Observable - - fileprivate let _lock = NSRecursiveLock() - - // state - fileprivate var _connection: ConnectionType? - - init(source: Observable, subject: S) { - _source = source - _subject = subject - _connection = nil - } - - override func connect() -> Disposable { - return _lock.calculateLocked { - if let connection = _connection { - return connection - } - - let disposable = _source.subscribe(_subject.asObserver()) - let connection = Connection(parent: self, lock: _lock, subscription: disposable) - _connection = connection - return connection - } - } - - override func subscribe(_ observer: O) -> Disposable where O.E == S.E { - return _subject.subscribe(observer) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/DistinctUntilChanged.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/DistinctUntilChanged.swift deleted file mode 100644 index 770a531..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/DistinctUntilChanged.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// DistinctUntilChanged.swift -// Rx -// -// Created by Krunoslav Zaher on 3/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -class DistinctUntilChangedSink: Sink, ObserverType { - typealias E = O.E - - private let _parent: DistinctUntilChanged - private var _currentKey: Key? = nil - - init(parent: DistinctUntilChanged, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - let key = try _parent._selector(value) - var areEqual = false - if let currentKey = _currentKey { - areEqual = try _parent._comparer(currentKey, key) - } - - if areEqual { - return - } - - _currentKey = key - - forwardOn(event) - } - catch let error { - forwardOn(.error(error)) - dispose() - } - case .error, .completed: - forwardOn(event) - dispose() - } - } -} - -class DistinctUntilChanged: Producer { - typealias KeySelector = (Element) throws -> Key - typealias EqualityComparer = (Key, Key) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _selector: KeySelector - fileprivate let _comparer: EqualityComparer - - init(source: Observable, selector: @escaping KeySelector, comparer: @escaping EqualityComparer) { - _source = source - _selector = selector - _comparer = comparer - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = DistinctUntilChangedSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Do.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Do.swift deleted file mode 100644 index 726a992..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Do.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// Do.swift -// Rx -// -// Created by Krunoslav Zaher on 2/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -class DoSink : Sink, ObserverType { - typealias Element = O.E - typealias Parent = Do - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - do { - try _parent._eventHandler(event) - forwardOn(event) - if event.isStopEvent { - dispose() - } - } - catch let error { - forwardOn(.error(error)) - dispose() - } - } -} - -class Do : Producer { - typealias EventHandler = (Event) throws -> Void - - fileprivate let _source: Observable - fileprivate let _eventHandler: EventHandler - fileprivate let _onSubscribe: (() -> ())? - fileprivate let _onDispose: (() -> ())? - - init(source: Observable, eventHandler: @escaping EventHandler, onSubscribe: (() -> ())?, onDispose: (() -> ())?) { - _source = source - _eventHandler = eventHandler - _onSubscribe = onSubscribe - _onDispose = onDispose - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - _onSubscribe?() - let sink = DoSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - let onDispose = _onDispose - let allSubscriptions = Disposables.create { - subscription.dispose() - onDispose?() - } - return (sink: sink, subscription: allSubscriptions) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Empty.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Empty.swift deleted file mode 100644 index f28690f..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Empty.swift +++ /dev/null @@ -1,16 +0,0 @@ -// -// Empty.swift -// Rx -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -class Empty : Producer { - override func subscribe(_ observer: O) -> Disposable where O.E == Element { - observer.on(.completed) - return Disposables.create() - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Error.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Error.swift deleted file mode 100644 index 49d89d9..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Error.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// Error.swift -// Rx -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -class Error : Producer { - private let _error: Swift.Error - - init(error: Swift.Error) { - _error = error - } - - override func subscribe(_ observer: O) -> Disposable where O.E == Element { - observer.on(.error(_error)) - return Disposables.create() - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Map.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Map.swift deleted file mode 100644 index b646c41..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Map.swift +++ /dev/null @@ -1,140 +0,0 @@ -// -// Map.swift -// Rx -// -// Created by Krunoslav Zaher on 3/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -class MapSink : Sink, ObserverType { - typealias Selector = (SourceType) throws -> ResultType - - typealias ResultType = O.E - typealias Element = SourceType - - private let _selector: Selector - - init(selector: @escaping Selector, observer: O, cancel: Cancelable) { - _selector = selector - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let element): - do { - let mappedElement = try _selector(element) - forwardOn(.next(mappedElement)) - } - catch let e { - forwardOn(.error(e)) - dispose() - } - case .error(let error): - forwardOn(.error(error)) - dispose() - case .completed: - forwardOn(.completed) - dispose() - } - } -} - -class MapWithIndexSink : Sink, ObserverType { - typealias Selector = (SourceType, Int) throws -> ResultType - - typealias ResultType = O.E - typealias Element = SourceType - typealias Parent = MapWithIndex - - private let _selector: Selector - - private var _index = 0 - - init(selector: @escaping Selector, observer: O, cancel: Cancelable) { - _selector = selector - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let element): - do { - let mappedElement = try _selector(element, try incrementChecked(&_index)) - forwardOn(.next(mappedElement)) - } - catch let e { - forwardOn(.error(e)) - dispose() - } - case .error(let error): - forwardOn(.error(error)) - dispose() - case .completed: - forwardOn(.completed) - dispose() - } - } -} - -class MapWithIndex : Producer { - typealias Selector = (SourceType, Int) throws -> ResultType - - private let _source: Observable - - private let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - _source = source - _selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == ResultType { - let sink = MapWithIndexSink(selector: _selector, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} - -#if TRACE_RESOURCES -public var numberOfMapOperators: Int32 = 0 -#endif - -class Map: Producer { - typealias Selector = (SourceType) throws -> ResultType - - private let _source: Observable - - private let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - _source = source - _selector = selector - -#if TRACE_RESOURCES - let _ = AtomicIncrement(&numberOfMapOperators) -#endif - } - - override func composeMap(_ selector: @escaping (ResultType) throws -> R) -> Observable { - let originalSelector = _selector - return Map(source: _source, selector: { (s: SourceType) throws -> R in - let r: ResultType = try originalSelector(s) - return try selector(r) - }) - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == ResultType { - let sink = MapSink(selector: _selector, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - - #if TRACE_RESOURCES - deinit { - let _ = AtomicDecrement(&numberOfMapOperators) - } - #endif -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Merge.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Merge.swift deleted file mode 100644 index 9916270..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Merge.swift +++ /dev/null @@ -1,424 +0,0 @@ -// -// Merge.swift -// Rx -// -// Created by Krunoslav Zaher on 3/28/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -// MARK: Limited concurrency version - -class MergeLimitedSinkIter - : ObserverType - , LockOwnerType - , SynchronizedOnType where S.E == O.E { - typealias E = O.E - typealias DisposeKey = Bag.KeyType - typealias Parent = MergeLimitedSink - - private let _parent: Parent - private let _disposeKey: DisposeKey - - var _lock: NSRecursiveLock { - return _parent._lock - } - - init(parent: Parent, disposeKey: DisposeKey) { - _parent = parent - _disposeKey = disposeKey - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - _parent.forwardOn(event) - case .error: - _parent.forwardOn(event) - _parent.dispose() - case .completed: - _parent._group.remove(for: _disposeKey) - if let next = _parent._queue.dequeue() { - _parent.subscribe(next, group: _parent._group) - } - else { - _parent._activeCount = _parent._activeCount - 1 - - if _parent._stopped && _parent._activeCount == 0 { - _parent.forwardOn(.completed) - _parent.dispose() - } - } - } - } -} - -class MergeLimitedSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType where S.E == O.E { - typealias E = S - typealias QueueType = Queue - - fileprivate let _maxConcurrent: Int - - let _lock = NSRecursiveLock() - - // state - fileprivate var _stopped = false - fileprivate var _activeCount = 0 - fileprivate var _queue = QueueType(capacity: 2) - - fileprivate let _sourceSubscription = SingleAssignmentDisposable() - fileprivate let _group = CompositeDisposable() - - init(maxConcurrent: Int, observer: O, cancel: Cancelable) { - _maxConcurrent = maxConcurrent - - let _ = _group.insert(_sourceSubscription) - super.init(observer: observer, cancel: cancel) - } - - func run(_ source: Observable) -> Disposable { - let _ = _group.insert(_sourceSubscription) - - let disposable = source.subscribe(self) - _sourceSubscription.setDisposable(disposable) - return _group - } - - func subscribe(_ innerSource: E, group: CompositeDisposable) { - let subscription = SingleAssignmentDisposable() - - let key = group.insert(subscription) - - if let key = key { - let observer = MergeLimitedSinkIter(parent: self, disposeKey: key) - - let disposable = innerSource.asObservable().subscribe(observer) - subscription.setDisposable(disposable) - } - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let value): - let subscribe: Bool - if _activeCount < _maxConcurrent { - _activeCount += 1 - subscribe = true - } - else { - _queue.enqueue(value) - subscribe = false - } - - if subscribe { - self.subscribe(value, group: _group) - } - case .error(let error): - forwardOn(.error(error)) - dispose() - case .completed: - if _activeCount == 0 { - forwardOn(.completed) - dispose() - } - else { - _sourceSubscription.dispose() - } - - _stopped = true - } - } -} - -class MergeLimited : Producer { - private let _source: Observable - private let _maxConcurrent: Int - - init(source: Observable, maxConcurrent: Int) { - _source = source - _maxConcurrent = maxConcurrent - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { - let sink = MergeLimitedSink(maxConcurrent: _maxConcurrent, observer: observer, cancel: cancel) - let subscription = sink.run(_source) - return (sink: sink, subscription: subscription) - } -} - -// MARK: Merge - -final class MergeBasicSink : MergeSink where O.E == S.E { - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: S) throws -> S { - return element - } -} - -// MARK: flatMap - -final class FlatMapSink : MergeSink where O.E == S.E { - typealias Selector = (SourceType) throws -> S - - private let _selector: Selector - - init(selector: @escaping Selector, observer: O, cancel: Cancelable) { - _selector = selector - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceType) throws -> S { - return try _selector(element) - } -} - -final class FlatMapWithIndexSink : MergeSink where O.E == S.E { - typealias Selector = (SourceType, Int) throws -> S - - private var _index = 0 - private let _selector: Selector - - init(selector: @escaping Selector, observer: O, cancel: Cancelable) { - _selector = selector - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceType) throws -> S { - return try _selector(element, try incrementChecked(&_index)) - } -} - -// MARK: FlatMapFirst - -final class FlatMapFirstSink : MergeSink where O.E == S.E { - typealias Selector = (SourceType) throws -> S - - private let _selector: Selector - - override var subscribeNext: Bool { - return _group.count == MergeNoIterators - } - - init(selector: @escaping Selector, observer: O, cancel: Cancelable) { - _selector = selector - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceType) throws -> S { - return try _selector(element) - } -} - -// It's value is one because initial source subscription is always in CompositeDisposable -private let MergeNoIterators = 1 - -class MergeSinkIter : ObserverType where O.E == S.E { - typealias Parent = MergeSink - typealias DisposeKey = CompositeDisposable.DisposeKey - typealias E = O.E - - private let _parent: Parent - private let _disposeKey: DisposeKey - - init(parent: Parent, disposeKey: DisposeKey) { - _parent = parent - _disposeKey = disposeKey - } - - func on(_ event: Event) { - switch event { - case .next(let value): - _parent._lock.lock(); defer { _parent._lock.unlock() } // lock { - _parent.forwardOn(.next(value)) - // } - case .error(let error): - _parent._lock.lock(); defer { _parent._lock.unlock() } // lock { - _parent.forwardOn(.error(error)) - _parent.dispose() - // } - case .completed: - _parent._group.remove(for: _disposeKey) - // If this has returned true that means that `Completed` should be sent. - // In case there is a race who will sent first completed, - // lock will sort it out. When first Completed message is sent - // it will set observer to nil, and thus prevent further complete messages - // to be sent, and thus preserving the sequence grammar. - if _parent._stopped && _parent._group.count == MergeNoIterators { - _parent._lock.lock(); defer { _parent._lock.unlock() } // lock { - _parent.forwardOn(.completed) - _parent.dispose() - // } - } - } - } -} - - -class MergeSink - : Sink - , ObserverType where O.E == S.E { - typealias ResultType = O.E - typealias Element = SourceType - - fileprivate let _lock = NSRecursiveLock() - - fileprivate var subscribeNext: Bool { - return true - } - - // state - fileprivate let _group = CompositeDisposable() - fileprivate let _sourceSubscription = SingleAssignmentDisposable() - - fileprivate var _stopped = false - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func performMap(_ element: SourceType) throws -> S { - abstractMethod() - } - - func on(_ event: Event) { - switch event { - case .next(let element): - if !subscribeNext { - return - } - do { - let value = try performMap(element) - subscribeInner(value.asObservable()) - } - catch let e { - forwardOn(.error(e)) - dispose() - } - case .error(let error): - _lock.lock(); defer { _lock.unlock() } // lock { - forwardOn(.error(error)) - dispose() - // } - case .completed: - _lock.lock(); defer { _lock.unlock() } // lock { - _stopped = true - if _group.count == MergeNoIterators { - forwardOn(.completed) - dispose() - } - else { - _sourceSubscription.dispose() - } - //} - } - } - - func subscribeInner(_ source: Observable) { - let iterDisposable = SingleAssignmentDisposable() - if let disposeKey = _group.insert(iterDisposable) { - let iter = MergeSinkIter(parent: self, disposeKey: disposeKey) - let subscription = source.subscribe(iter) - iterDisposable.setDisposable(subscription) - } - } - - func run(_ source: Observable) -> Disposable { - let _ = _group.insert(_sourceSubscription) - - let subscription = source.subscribe(self) - _sourceSubscription.setDisposable(subscription) - - return _group - } -} - -// MARK: Producers - -final class FlatMap: Producer { - typealias Selector = (SourceType) throws -> S - - private let _source: Observable - - private let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - _source = source - _selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { - let sink = FlatMapSink(selector: _selector, observer: observer, cancel: cancel) - let subscription = sink.run(_source) - return (sink: sink, subscription: subscription) - } -} - -final class FlatMapWithIndex: Producer { - typealias Selector = (SourceType, Int) throws -> S - - private let _source: Observable - - private let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - _source = source - _selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { - let sink = FlatMapWithIndexSink(selector: _selector, observer: observer, cancel: cancel) - let subscription = sink.run(_source) - return (sink: sink, subscription: subscription) - } - -} - -final class FlatMapFirst: Producer { - typealias Selector = (SourceType) throws -> S - - private let _source: Observable - - private let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - _source = source - _selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { - let sink = FlatMapFirstSink(selector: _selector, observer: observer, cancel: cancel) - let subscription = sink.run(_source) - return (sink: sink, subscription: subscription) - } -} - -final class Merge : Producer { - private let _source: Observable - - init(source: Observable) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { - let sink = MergeBasicSink(observer: observer, cancel: cancel) - let subscription = sink.run(_source) - return (sink: sink, subscription: subscription) - } -} - diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Multicast.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Multicast.swift deleted file mode 100644 index e9ec4d1..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Multicast.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// Multicast.swift -// Rx -// -// Created by Krunoslav Zaher on 2/27/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -class MulticastSink: Sink, ObserverType { - typealias Element = O.E - typealias ResultType = Element - typealias MutlicastType = Multicast - - private let _parent: MutlicastType - - init(parent: MutlicastType, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - do { - let subject = try _parent._subjectSelector() - let connectable = ConnectableObservableAdapter(source: _parent._source, subject: subject) - - let observable = try _parent._selector(connectable) - - let subscription = observable.subscribe(self) - let connection = connectable.connect() - - return Disposables.create(subscription, connection) - } - catch let e { - forwardOn(.error(e)) - dispose() - return Disposables.create() - } - } - - func on(_ event: Event) { - forwardOn(event) - switch event { - case .next: break - case .error, .completed: - dispose() - } - } -} - -class Multicast: Producer { - typealias SubjectSelectorType = () throws -> S - typealias SelectorType = (Observable) throws -> Observable - - fileprivate let _source: Observable - fileprivate let _subjectSelector: SubjectSelectorType - fileprivate let _selector: SelectorType - - init(source: Observable, subjectSelector: @escaping SubjectSelectorType, selector: @escaping SelectorType) { - _source = source - _subjectSelector = subjectSelector - _selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = MulticastSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Never.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Never.swift deleted file mode 100644 index 82d28ec..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Never.swift +++ /dev/null @@ -1,15 +0,0 @@ -// -// Never.swift -// Rx -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -class Never : Producer { - override func subscribe(_ observer: O) -> Disposable where O.E == Element { - return Disposables.create() - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOn.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOn.swift deleted file mode 100644 index 901062a..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOn.swift +++ /dev/null @@ -1,129 +0,0 @@ -// -// ObserveOn.swift -// RxSwift -// -// Created by Krunoslav Zaher on 7/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -class ObserveOn : Producer { - let scheduler: ImmediateSchedulerType - let source: Observable - - init(source: Observable, scheduler: ImmediateSchedulerType) { - self.scheduler = scheduler - self.source = source - -#if TRACE_RESOURCES - let _ = AtomicIncrement(&resourceCount) -#endif - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = ObserveOnSink(scheduler: scheduler, observer: observer, cancel: cancel) - let subscription = source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - -#if TRACE_RESOURCES - deinit { - let _ = AtomicDecrement(&resourceCount) - } -#endif -} - -enum ObserveOnState : Int32 { - // pump is not running - case stopped = 0 - // pump is running - case running = 1 -} - -class ObserveOnSink : ObserverBase { - typealias E = O.E - - let _scheduler: ImmediateSchedulerType - - var _lock = SpinLock() - let _observer: O? - - // state - var _state = ObserveOnState.stopped - var _queue = Queue>(capacity: 10) - - let _scheduleDisposable = SerialDisposable() - let _cancel: Cancelable - - init(scheduler: ImmediateSchedulerType, observer: O, cancel: Cancelable) { - _scheduler = scheduler - _observer = observer - _cancel = cancel - } - - override func onCore(_ event: Event) { - let shouldStart = _lock.calculateLocked { () -> Bool in - self._queue.enqueue(event) - - switch self._state { - case .stopped: - self._state = .running - return true - case .running: - return false - } - } - - if shouldStart { - _scheduleDisposable.disposable = self._scheduler.scheduleRecursive((), action: self.run) - } - } - - func run(_ state: Void, recurse: (Void) -> Void) { - let (nextEvent, observer) = self._lock.calculateLocked { () -> (Event?, O?) in - if self._queue.count > 0 { - return (self._queue.dequeue(), self._observer) - } - else { - self._state = .stopped - return (nil, self._observer) - } - } - - if let nextEvent = nextEvent, !_cancel.isDisposed { - observer?.on(nextEvent) - if nextEvent.isStopEvent { - dispose() - } - } - else { - return - } - - let shouldContinue = _shouldContinue_synchronized() - - if shouldContinue { - recurse() - } - } - - func _shouldContinue_synchronized() -> Bool { - _lock.lock(); defer { _lock.unlock() } // { - if self._queue.count > 0 { - return true - } - else { - self._state = .stopped - return false - } - // } - } - - override func dispose() { - super.dispose() - - _cancel.dispose() - _scheduleDisposable.dispose() - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOnSerialDispatchQueue.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOnSerialDispatchQueue.swift deleted file mode 100644 index fdc444d..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOnSerialDispatchQueue.swift +++ /dev/null @@ -1,82 +0,0 @@ -// -// ObserveOnSerialDispatchQueue.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/31/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -#if TRACE_RESOURCES -/** -Counts number of `SerialDispatchQueueObservables`. - -Purposed for unit tests. -*/ -public var numberOfSerialDispatchQueueObservables: AtomicInt = 0 -#endif - -class ObserveOnSerialDispatchQueueSink : ObserverBase { - let scheduler: SerialDispatchQueueScheduler - let observer: O - - let cancel: Cancelable - - var cachedScheduleLambda: ((ObserveOnSerialDispatchQueueSink, Event) -> Disposable)! - - init(scheduler: SerialDispatchQueueScheduler, observer: O, cancel: Cancelable) { - self.scheduler = scheduler - self.observer = observer - self.cancel = cancel - super.init() - - cachedScheduleLambda = { sink, event in - sink.observer.on(event) - - if event.isStopEvent { - sink.dispose() - } - - return Disposables.create() - } - } - - override func onCore(_ event: Event) { - let _ = self.scheduler.schedule((self, event), action: cachedScheduleLambda) - } - - override func dispose() { - super.dispose() - - cancel.dispose() - } -} - -class ObserveOnSerialDispatchQueue : Producer { - let scheduler: SerialDispatchQueueScheduler - let source: Observable - - init(source: Observable, scheduler: SerialDispatchQueueScheduler) { - self.scheduler = scheduler - self.source = source - -#if TRACE_RESOURCES - let _ = AtomicIncrement(&resourceCount) - let _ = AtomicIncrement(&numberOfSerialDispatchQueueObservables) -#endif - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = ObserveOnSerialDispatchQueueSink(scheduler: scheduler, observer: observer, cancel: cancel) - let subscription = source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - -#if TRACE_RESOURCES - deinit { - let _ = AtomicDecrement(&resourceCount) - let _ = AtomicDecrement(&numberOfSerialDispatchQueueObservables) - } -#endif -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/RefCount.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/RefCount.swift deleted file mode 100644 index 64fcb7a..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/RefCount.swift +++ /dev/null @@ -1,84 +0,0 @@ -// -// RefCount.swift -// Rx -// -// Created by Krunoslav Zaher on 3/5/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -class RefCountSink - : Sink - , ObserverType where CO.E == O.E { - typealias Element = O.E - typealias Parent = RefCount - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription = _parent._source.subscribeSafe(self) - - _parent._lock.lock(); defer { _parent._lock.unlock() } // { - if _parent._count == 0 { - _parent._count = 1 - _parent._connectableSubscription = _parent._source.connect() - } - else { - _parent._count = _parent._count + 1 - } - // } - - return Disposables.create { - subscription.dispose() - self._parent._lock.lock(); defer { self._parent._lock.unlock() } // { - if self._parent._count == 1 { - self._parent._connectableSubscription!.dispose() - self._parent._count = 0 - self._parent._connectableSubscription = nil - } - else if self._parent._count > 1 { - self._parent._count = self._parent._count - 1 - } - else { - rxFatalError("Something went wrong with RefCount disposing mechanism") - } - // } - } - } - - func on(_ event: Event) { - switch event { - case .next: - forwardOn(event) - case .error, .completed: - forwardOn(event) - dispose() - } - } -} - -class RefCount: Producer { - fileprivate let _lock = NSRecursiveLock() - - // state - fileprivate var _count = 0 - fileprivate var _connectableSubscription = nil as Disposable? - - fileprivate let _source: CO - - init(source: CO) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == CO.E { - let sink = RefCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Scan.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Scan.swift deleted file mode 100644 index dbb9173..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Scan.swift +++ /dev/null @@ -1,64 +0,0 @@ -// -// Scan.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -class ScanSink : Sink, ObserverType where O.E == Accumulate { - typealias Parent = Scan - typealias E = ElementType - - fileprivate let _parent: Parent - fileprivate var _accumulate: Accumulate - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _accumulate = parent._seed - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let element): - do { - _accumulate = try _parent._accumulator(_accumulate, element) - forwardOn(.next(_accumulate)) - } - catch let error { - forwardOn(.error(error)) - dispose() - } - case .error(let error): - forwardOn(.error(error)) - dispose() - case .completed: - forwardOn(.completed) - dispose() - } - } - -} - -class Scan: Producer { - typealias Accumulator = (Accumulate, Element) throws -> Accumulate - - fileprivate let _source: Observable - fileprivate let _seed: Accumulate - fileprivate let _accumulator: Accumulator - - init(source: Observable, seed: Accumulate, accumulator: @escaping Accumulator) { - _source = source - _seed = seed - _accumulator = accumulator - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Accumulate { - let sink = ScanSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Sequence.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Sequence.swift deleted file mode 100644 index 78cbc29..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Sequence.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// Sequence.swift -// Rx -// -// Created by Krunoslav Zaher on 11/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -class ObservableSequenceSink : Sink where S.Iterator.Element == O.E { - typealias Parent = ObservableSequence - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return _parent._scheduler.scheduleRecursive((_parent._elements.makeIterator(), _parent._elements)) { (iterator, recurse) in - var mutableIterator = iterator - if let next = mutableIterator.0.next() { - self.forwardOn(.next(next)) - recurse(mutableIterator) - } - else { - self.forwardOn(.completed) - } - } - } -} - -class ObservableSequence : Producer { - fileprivate let _elements: S - fileprivate let _scheduler: ImmediateSchedulerType - - init(elements: S, scheduler: ImmediateSchedulerType) { - _elements = elements - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = ObservableSequenceSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1.swift deleted file mode 100644 index 2f78cce..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1.swift +++ /dev/null @@ -1,101 +0,0 @@ -// -// ShareReplay1.swift -// Rx -// -// Created by Krunoslav Zaher on 10/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -// optimized version of share replay for most common case -final class ShareReplay1 - : Observable - , ObserverType - , SynchronizedUnsubscribeType { - - typealias DisposeKey = Bag>.KeyType - - private let _source: Observable - - private var _lock = NSRecursiveLock() - - private var _connection: SingleAssignmentDisposable? - private var _element: Element? - private var _stopped = false - private var _stopEvent = nil as Event? - private var _observers = Bag>() - - init(source: Observable) { - self._source = source - } - - override func subscribe(_ observer: O) -> Disposable where O.E == E { - _lock.lock(); defer { _lock.unlock() } - return _synchronized_subscribe(observer) - } - - func _synchronized_subscribe(_ observer: O) -> Disposable where O.E == E { - if let element = self._element { - observer.on(.next(element)) - } - - if let stopEvent = self._stopEvent { - observer.on(stopEvent) - return Disposables.create() - } - - let initialCount = self._observers.count - - let disposeKey = self._observers.insert(AnyObserver(observer)) - - if initialCount == 0 { - let connection = SingleAssignmentDisposable() - _connection = connection - - connection.setDisposable(self._source.subscribe(self)) - } - - return SubscriptionDisposable(owner: self, key: disposeKey) - } - - func synchronizedUnsubscribe(_ disposeKey: DisposeKey) { - _lock.lock(); defer { _lock.unlock() } - _synchronized_unsubscribe(disposeKey) - } - - func _synchronized_unsubscribe(_ disposeKey: DisposeKey) { - // if already unsubscribed, just return - if self._observers.removeKey(disposeKey) == nil { - return - } - - if _observers.count == 0 { - _connection?.dispose() - _connection = nil - } - } - - func on(_ event: Event) { - _lock.lock(); defer { _lock.unlock() } - _synchronized_on(event) - } - - func _synchronized_on(_ event: Event) { - if _stopped { - return - } - - switch event { - case .next(let element): - _element = element - case .error, .completed: - _stopEvent = event - _stopped = true - _connection?.dispose() - _connection = nil - } - - _observers.on(event) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1WhileConnected.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1WhileConnected.swift deleted file mode 100644 index ae4dc43..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1WhileConnected.swift +++ /dev/null @@ -1,92 +0,0 @@ -// -// ShareReplay1WhileConnected.swift -// Rx -// -// Created by Krunoslav Zaher on 12/6/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -// optimized version of share replay for most common case -final class ShareReplay1WhileConnected - : Observable - , ObserverType - , SynchronizedUnsubscribeType { - - typealias DisposeKey = Bag>.KeyType - - private let _source: Observable - - private var _lock = NSRecursiveLock() - - private var _connection: SingleAssignmentDisposable? - private var _element: Element? - private var _observers = Bag>() - - init(source: Observable) { - self._source = source - } - - override func subscribe(_ observer: O) -> Disposable where O.E == E { - _lock.lock(); defer { _lock.unlock() } - return _synchronized_subscribe(observer) - } - - func _synchronized_subscribe(_ observer: O) -> Disposable where O.E == E { - if let element = self._element { - observer.on(.next(element)) - } - - let initialCount = self._observers.count - - let disposeKey = self._observers.insert(AnyObserver(observer)) - - if initialCount == 0 { - let connection = SingleAssignmentDisposable() - _connection = connection - - connection.setDisposable(self._source.subscribe(self)) - } - - return SubscriptionDisposable(owner: self, key: disposeKey) - } - - func synchronizedUnsubscribe(_ disposeKey: DisposeKey) { - _lock.lock(); defer { _lock.unlock() } - _synchronized_unsubscribe(disposeKey) - } - - func _synchronized_unsubscribe(_ disposeKey: DisposeKey) { - // if already unsubscribed, just return - if self._observers.removeKey(disposeKey) == nil { - return - } - - if _observers.count == 0 { - _connection?.dispose() - _connection = nil - _element = nil - } - } - - func on(_ event: Event) { - _lock.lock(); defer { _lock.unlock() } - _synchronized_on(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): - _element = element - _observers.on(event) - case .error, .completed: - _element = nil - _connection?.dispose() - _connection = nil - let observers = _observers - _observers = Bag() - observers.on(event) - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/SkipWhile.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/SkipWhile.swift deleted file mode 100644 index 28e2fdc..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/SkipWhile.swift +++ /dev/null @@ -1,115 +0,0 @@ -// -// SkipWhile.swift -// Rx -// -// Created by Yury Korolev on 10/9/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -class SkipWhileSink : Sink, ObserverType where O.E == ElementType { - - typealias Parent = SkipWhile - typealias Element = ElementType - - fileprivate let _parent: Parent - fileprivate var _running = false - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if !_running { - do { - _running = try !_parent._predicate(value) - } catch let e { - forwardOn(.error(e)) - dispose() - return - } - } - - if _running { - forwardOn(.next(value)) - } - case .error, .completed: - forwardOn(event) - dispose() - } - } -} - -class SkipWhileSinkWithIndex : Sink, ObserverType where O.E == ElementType { - - typealias Parent = SkipWhile - typealias Element = ElementType - - fileprivate let _parent: Parent - fileprivate var _index = 0 - fileprivate var _running = false - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if !_running { - do { - _running = try !_parent._predicateWithIndex(value, _index) - let _ = try incrementChecked(&_index) - } catch let e { - forwardOn(.error(e)) - dispose() - return - } - } - - if _running { - forwardOn(.next(value)) - } - case .error, .completed: - forwardOn(event) - dispose() - } - } -} - -class SkipWhile: Producer { - typealias Predicate = (Element) throws -> Bool - typealias PredicateWithIndex = (Element, Int) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate! - fileprivate let _predicateWithIndex: PredicateWithIndex! - - init(source: Observable, predicate: @escaping Predicate) { - _source = source - _predicate = predicate - _predicateWithIndex = nil - } - - init(source: Observable, predicate: @escaping PredicateWithIndex) { - _source = source - _predicate = nil - _predicateWithIndex = predicate - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - if let _ = _predicate { - let sink = SkipWhileSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - else { - let sink = SkipWhileSinkWithIndex(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/TakeWhile.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/TakeWhile.swift deleted file mode 100644 index 259bc25..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/TakeWhile.swift +++ /dev/null @@ -1,132 +0,0 @@ -// -// TakeWhile.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -class TakeWhileSink - : Sink - , ObserverType where O.E == ElementType { - typealias Parent = TakeWhile - typealias Element = ElementType - - fileprivate let _parent: Parent - - fileprivate var _running = true - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if !_running { - return - } - - do { - _running = try _parent._predicate(value) - } catch let e { - forwardOn(.error(e)) - dispose() - return - } - - if _running { - forwardOn(.next(value)) - } else { - forwardOn(.completed) - dispose() - } - case .error, .completed: - forwardOn(event) - dispose() - } - } - -} - -class TakeWhileSinkWithIndex - : Sink - , ObserverType where O.E == ElementType { - typealias Parent = TakeWhile - typealias Element = ElementType - - fileprivate let _parent: Parent - - fileprivate var _running = true - fileprivate var _index = 0 - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if !_running { - return - } - - do { - _running = try _parent._predicateWithIndex(value, _index) - let _ = try incrementChecked(&_index) - } catch let e { - forwardOn(.error(e)) - dispose() - return - } - - if _running { - forwardOn(.next(value)) - } else { - forwardOn(.completed) - dispose() - } - case .error, .completed: - forwardOn(event) - dispose() - } - } - -} - -class TakeWhile: Producer { - typealias Predicate = (Element) throws -> Bool - typealias PredicateWithIndex = (Element, Int) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate! - fileprivate let _predicateWithIndex: PredicateWithIndex! - - init(source: Observable, predicate: @escaping Predicate) { - _source = source - _predicate = predicate - _predicateWithIndex = nil - } - - init(source: Observable, predicate: @escaping PredicateWithIndex) { - _source = source - _predicate = nil - _predicateWithIndex = predicate - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - if let _ = _predicate { - let sink = TakeWhileSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } else { - let sink = TakeWhileSinkWithIndex(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Timer.swift b/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Timer.swift deleted file mode 100644 index 7c2df2c..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Timer.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// Timer.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -class TimerSink : Sink where O.E : SignedInteger { - typealias Parent = Timer - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return _parent._scheduler.schedulePeriodic(0 as O.E, startAfter: _parent._dueTime, period: _parent._period!) { state in - self.forwardOn(.next(state)) - return state &+ 1 - } - } -} - -class TimerOneOffSink : Sink where O.E : SignedInteger { - typealias Parent = Timer - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return _parent._scheduler.scheduleRelative((), dueTime: _parent._dueTime) { (_) -> Disposable in - self.forwardOn(.next(0)) - self.forwardOn(.completed) - - return Disposables.create() - } - } -} - -class Timer: Producer { - fileprivate let _scheduler: SchedulerType - fileprivate let _dueTime: RxTimeInterval - fileprivate let _period: RxTimeInterval? - - init(dueTime: RxTimeInterval, period: RxTimeInterval?, scheduler: SchedulerType) { - _scheduler = scheduler - _dueTime = dueTime - _period = period - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - if let _ = _period { - let sink = TimerSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } - else { - let sink = TimerOneOffSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Just.swift b/Example/Pods/RxSwift/RxSwift/Observables/Just.swift similarity index 54% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Just.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Just.swift index eaabfb5..4e49059 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Just.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Just.swift @@ -1,14 +1,39 @@ // // Just.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 8/30/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { + /** + Returns an observable sequence that contains a single element. -class JustScheduledSink : Sink { + - seealso: [just operator on reactivex.io](http://reactivex.io/documentation/operators/just.html) + + - parameter element: Single element in the resulting observable sequence. + - returns: An observable sequence containing the single specified element. + */ + public static func just(_ element: E) -> Observable { + return Just(element: element) + } + + /** + Returns an observable sequence that contains a single element. + + - seealso: [just operator on reactivex.io](http://reactivex.io/documentation/operators/just.html) + + - parameter element: Single element in the resulting observable sequence. + - parameter scheduler: Scheduler to send the single element on. + - returns: An observable sequence containing the single specified element. + */ + public static func just(_ element: E, scheduler: ImmediateSchedulerType) -> Observable { + return JustScheduled(element: element, scheduler: scheduler) + } +} + +final fileprivate class JustScheduledSink : Sink { typealias Parent = JustScheduled private let _parent: Parent @@ -24,13 +49,14 @@ class JustScheduledSink : Sink { self.forwardOn(.next(element)) return scheduler.schedule(()) { _ in self.forwardOn(.completed) + self.dispose() return Disposables.create() } } } } -class JustScheduled : Producer { +final fileprivate class JustScheduled : Producer { fileprivate let _scheduler: ImmediateSchedulerType fileprivate let _element: Element @@ -46,7 +72,7 @@ class JustScheduled : Producer { } } -class Just : Producer { +final fileprivate class Just : Producer { private let _element: Element init(element: Element) { diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Map.swift b/Example/Pods/RxSwift/RxSwift/Observables/Map.swift new file mode 100644 index 0000000..c513218 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/Map.swift @@ -0,0 +1,108 @@ +// +// Map.swift +// RxSwift +// +// Created by Krunoslav Zaher on 3/15/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType { + + /** + Projects each element of an observable sequence into a new form. + + - seealso: [map operator on reactivex.io](http://reactivex.io/documentation/operators/map.html) + + - parameter transform: 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. + + */ + public func map(_ transform: @escaping (E) throws -> R) + -> Observable { + return self.asObservable().composeMap(transform) + } +} + +final fileprivate class MapSink : Sink, ObserverType { + typealias Transform = (SourceType) throws -> ResultType + + typealias ResultType = O.E + typealias Element = SourceType + + private let _transform: Transform + + init(transform: @escaping Transform, observer: O, cancel: Cancelable) { + _transform = transform + super.init(observer: observer, cancel: cancel) + } + + func on(_ event: Event) { + switch event { + case .next(let element): + do { + let mappedElement = try _transform(element) + forwardOn(.next(mappedElement)) + } + catch let e { + forwardOn(.error(e)) + dispose() + } + case .error(let error): + forwardOn(.error(error)) + dispose() + case .completed: + forwardOn(.completed) + dispose() + } + } +} + +#if TRACE_RESOURCES + fileprivate var _numberOfMapOperators = AtomicInt(0) + extension Resources { + public static var numberOfMapOperators: Int32 { + return _numberOfMapOperators.load() + } + } +#endif + +internal func _map(source: Observable, transform: @escaping (Element) throws -> R) -> Observable { + return Map(source: source, transform: transform) +} + +final fileprivate class Map: Producer { + typealias Transform = (SourceType) throws -> ResultType + + private let _source: Observable + + private let _transform: Transform + + init(source: Observable, transform: @escaping Transform) { + _source = source + _transform = transform + +#if TRACE_RESOURCES + let _ = _numberOfMapOperators.increment() +#endif + } + + override func composeMap(_ selector: @escaping (ResultType) throws -> R) -> Observable { + let originalSelector = _transform + return Map(source: _source, transform: { (s: SourceType) throws -> R in + let r: ResultType = try originalSelector(s) + return try selector(r) + }) + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == ResultType { + let sink = MapSink(transform: _transform, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) + } + + #if TRACE_RESOURCES + deinit { + let _ = _numberOfMapOperators.decrement() + } + #endif +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Materialize.swift b/Example/Pods/RxSwift/RxSwift/Observables/Materialize.swift new file mode 100644 index 0000000..cf19b6d --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/Materialize.swift @@ -0,0 +1,44 @@ +// +// Materialize.swift +// RxSwift +// +// Created by sergdort on 08/03/2017. +// Copyright © 2017 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType { + /** + Convert any Observable into an Observable of its events. + - seealso: [materialize operator on reactivex.io](http://reactivex.io/documentation/operators/materialize-dematerialize.html) + - returns: An observable sequence that wraps events in an Event. The returned Observable never errors, but it does complete after observing all of the events of the underlying Observable. + */ + public func materialize() -> Observable> { + return Materialize(source: self.asObservable()) + } +} + +fileprivate final class MaterializeSink: Sink, ObserverType where O.E == Event { + + func on(_ event: Event) { + forwardOn(.next(event)) + if event.isStopEvent { + forwardOn(.completed) + dispose() + } + } +} + +final fileprivate class Materialize: Producer> { + private let _source: Observable + + init(source: Observable) { + _source = source + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + let sink = MaterializeSink(observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + + return (sink: sink, subscription: subscription) + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Merge.swift b/Example/Pods/RxSwift/RxSwift/Observables/Merge.swift new file mode 100644 index 0000000..b2f9a0d --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/Merge.swift @@ -0,0 +1,598 @@ +// +// Merge.swift +// RxSwift +// +// Created by Krunoslav Zaher on 3/28/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType { + + /** + Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. + + - seealso: [flatMap operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) + + - 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. + */ + public func flatMap(_ selector: @escaping (E) throws -> O) + -> Observable { + return FlatMap(source: asObservable(), selector: selector) + } + +} + +extension ObservableType { + + /** + Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. + If element is received while there is some projected observable sequence being merged it will simply be ignored. + + - seealso: [flatMapFirst operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) + + - 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. + */ + public func flatMapFirst(_ selector: @escaping (E) throws -> O) + -> Observable { + return FlatMapFirst(source: asObservable(), selector: selector) + } +} + +extension ObservableType where E : ObservableConvertibleType { + + /** + Merges elements from all observable sequences in the given enumerable sequence into a single observable sequence. + + - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) + + - returns: The observable sequence that merges the elements of the observable sequences. + */ + public func merge() -> Observable { + return Merge(source: asObservable()) + } + + /** + Merges elements from all inner observable sequences into a single observable sequence, limiting the number of concurrent subscriptions to inner sequences. + + - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) + + - parameter maxConcurrent: Maximum number of inner observable sequences being subscribed to concurrently. + - returns: The observable sequence that merges the elements of the inner sequences. + */ + public func merge(maxConcurrent: Int) + -> Observable { + return MergeLimited(source: asObservable(), maxConcurrent: maxConcurrent) + } +} + +extension ObservableType where E : ObservableConvertibleType { + + /** + Concatenates all inner observable sequences, as long as the previous observable sequence terminated successfully. + + - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) + + - returns: An observable sequence that contains the elements of each observed inner sequence, in sequential order. + */ + public func concat() -> Observable { + return merge(maxConcurrent: 1) + } +} + +extension ObservableType { + /** + Merges elements from all observable sequences from collection into a single observable sequence. + + - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) + + - parameter sources: Collection of observable sequences to merge. + - returns: The observable sequence that merges the elements of the observable sequences. + */ + public static func merge(_ sources: C) -> Observable where C.Iterator.Element == Observable { + return MergeArray(sources: Array(sources)) + } + + /** + Merges elements from all observable sequences from array into a single observable sequence. + + - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) + + - parameter sources: Array of observable sequences to merge. + - returns: The observable sequence that merges the elements of the observable sequences. + */ + public static func merge(_ sources: [Observable]) -> Observable { + return MergeArray(sources: sources) + } + + /** + Merges elements from all observable sequences into a single observable sequence. + + - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) + + - parameter sources: Collection of observable sequences to merge. + - returns: The observable sequence that merges the elements of the observable sequences. + */ + public static func merge(_ sources: Observable...) -> Observable { + return MergeArray(sources: sources) + } +} + +// MARK: concatMap + +extension ObservableType { + /** + Projects each element of an observable sequence to an observable sequence and concatenates the resulting observable sequences into one observable sequence. + + - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) + + - returns: An observable sequence that contains the elements of each observed inner sequence, in sequential order. + */ + + public func concatMap(_ selector: @escaping (E) throws -> O) + -> Observable { + return ConcatMap(source: asObservable(), selector: selector) + } +} + +fileprivate final class MergeLimitedSinkIter + : ObserverType + , LockOwnerType + , SynchronizedOnType where SourceSequence.E == Observer.E { + typealias E = Observer.E + typealias DisposeKey = CompositeDisposable.DisposeKey + typealias Parent = MergeLimitedSink + + private let _parent: Parent + private let _disposeKey: DisposeKey + + var _lock: RecursiveLock { + return _parent._lock + } + + init(parent: Parent, disposeKey: DisposeKey) { + _parent = parent + _disposeKey = disposeKey + } + + func on(_ event: Event) { + synchronizedOn(event) + } + + func _synchronized_on(_ event: Event) { + switch event { + case .next: + _parent.forwardOn(event) + case .error: + _parent.forwardOn(event) + _parent.dispose() + case .completed: + _parent._group.remove(for: _disposeKey) + if let next = _parent._queue.dequeue() { + _parent.subscribe(next, group: _parent._group) + } + else { + _parent._activeCount = _parent._activeCount - 1 + + if _parent._stopped && _parent._activeCount == 0 { + _parent.forwardOn(.completed) + _parent.dispose() + } + } + } + } +} + +fileprivate final class ConcatMapSink: MergeLimitedSink where Observer.E == SourceSequence.E { + typealias Selector = (SourceElement) throws -> SourceSequence + + private let _selector: Selector + + init(selector: @escaping Selector, observer: Observer, cancel: Cancelable) { + _selector = selector + super.init(maxConcurrent: 1, observer: observer, cancel: cancel) + } + + override func performMap(_ element: SourceElement) throws -> SourceSequence { + return try _selector(element) + } +} + +fileprivate final class MergeLimitedBasicSink: MergeLimitedSink where Observer.E == SourceSequence.E { + + override func performMap(_ element: SourceSequence) throws -> SourceSequence { + return element + } +} + +fileprivate class MergeLimitedSink + : Sink + , ObserverType where Observer.E == SourceSequence.E { + typealias QueueType = Queue + + let _maxConcurrent: Int + + let _lock = RecursiveLock() + + // state + var _stopped = false + var _activeCount = 0 + var _queue = QueueType(capacity: 2) + + let _sourceSubscription = SingleAssignmentDisposable() + let _group = CompositeDisposable() + + init(maxConcurrent: Int, observer: Observer, cancel: Cancelable) { + _maxConcurrent = maxConcurrent + super.init(observer: observer, cancel: cancel) + } + + func run(_ source: Observable) -> Disposable { + let _ = _group.insert(_sourceSubscription) + + let disposable = source.subscribe(self) + _sourceSubscription.setDisposable(disposable) + return _group + } + + func subscribe(_ innerSource: SourceSequence, group: CompositeDisposable) { + let subscription = SingleAssignmentDisposable() + + let key = group.insert(subscription) + + if let key = key { + let observer = MergeLimitedSinkIter(parent: self, disposeKey: key) + + let disposable = innerSource.asObservable().subscribe(observer) + subscription.setDisposable(disposable) + } + } + + func performMap(_ element: SourceElement) throws -> SourceSequence { + rxAbstractMethod() + } + + @inline(__always) + final private func nextElementArrived(element: SourceElement) -> SourceSequence? { + _lock.lock(); defer { _lock.unlock() } // { + let subscribe: Bool + if _activeCount < _maxConcurrent { + _activeCount += 1 + subscribe = true + } + else { + do { + let value = try performMap(element) + _queue.enqueue(value) + } catch { + forwardOn(.error(error)) + dispose() + } + subscribe = false + } + + if subscribe { + do { + return try performMap(element) + } catch { + forwardOn(.error(error)) + dispose() + } + } + + return nil + // } + } + + func on(_ event: Event) { + switch event { + case .next(let element): + if let sequence = self.nextElementArrived(element: element) { + self.subscribe(sequence, group: _group) + } + case .error(let error): + _lock.lock(); defer { _lock.unlock() } + + forwardOn(.error(error)) + dispose() + case .completed: + _lock.lock(); defer { _lock.unlock() } + + if _activeCount == 0 { + forwardOn(.completed) + dispose() + } + else { + _sourceSubscription.dispose() + } + + _stopped = true + } + } +} + +final fileprivate class MergeLimited : Producer { + private let _source: Observable + private let _maxConcurrent: Int + + init(source: Observable, maxConcurrent: Int) { + _source = source + _maxConcurrent = maxConcurrent + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceSequence.E { + let sink = MergeLimitedBasicSink(maxConcurrent: _maxConcurrent, observer: observer, cancel: cancel) + let subscription = sink.run(_source) + return (sink: sink, subscription: subscription) + } +} + +// MARK: Merge + +fileprivate final class MergeBasicSink : MergeSink where O.E == S.E { + override func performMap(_ element: S) throws -> S { + return element + } +} + +// MARK: flatMap + +fileprivate final class FlatMapSink : MergeSink where Observer.E == SourceSequence.E { + typealias Selector = (SourceElement) throws -> SourceSequence + + private let _selector: Selector + + init(selector: @escaping Selector, observer: Observer, cancel: Cancelable) { + _selector = selector + super.init(observer: observer, cancel: cancel) + } + + override func performMap(_ element: SourceElement) throws -> SourceSequence { + return try _selector(element) + } +} + +// MARK: FlatMapFirst + +fileprivate final class FlatMapFirstSink : MergeSink where Observer.E == SourceSequence.E { + typealias Selector = (SourceElement) throws -> SourceSequence + + private let _selector: Selector + + override var subscribeNext: Bool { + return _activeCount == 0 + } + + init(selector: @escaping Selector, observer: Observer, cancel: Cancelable) { + _selector = selector + super.init(observer: observer, cancel: cancel) + } + + override func performMap(_ element: SourceElement) throws -> SourceSequence { + return try _selector(element) + } +} + +fileprivate final class MergeSinkIter : ObserverType where Observer.E == SourceSequence.E { + typealias Parent = MergeSink + typealias DisposeKey = CompositeDisposable.DisposeKey + typealias E = Observer.E + + private let _parent: Parent + private let _disposeKey: DisposeKey + + init(parent: Parent, disposeKey: DisposeKey) { + _parent = parent + _disposeKey = disposeKey + } + + func on(_ event: Event) { + _parent._lock.lock(); defer { _parent._lock.unlock() } // lock { + switch event { + case .next(let value): + _parent.forwardOn(.next(value)) + case .error(let error): + _parent.forwardOn(.error(error)) + _parent.dispose() + case .completed: + _parent._group.remove(for: _disposeKey) + _parent._activeCount -= 1 + _parent.checkCompleted() + } + // } + } +} + + +fileprivate class MergeSink + : Sink + , ObserverType where Observer.E == SourceSequence.E { + typealias ResultType = Observer.E + typealias Element = SourceElement + + let _lock = RecursiveLock() + + var subscribeNext: Bool { + return true + } + + // state + let _group = CompositeDisposable() + let _sourceSubscription = SingleAssignmentDisposable() + + var _activeCount = 0 + var _stopped = false + + override init(observer: Observer, cancel: Cancelable) { + super.init(observer: observer, cancel: cancel) + } + + func performMap(_ element: SourceElement) throws -> SourceSequence { + rxAbstractMethod() + } + + @inline(__always) + final private func nextElementArrived(element: SourceElement) -> SourceSequence? { + _lock.lock(); defer { _lock.unlock() } // { + if !subscribeNext { + return nil + } + + do { + let value = try performMap(element) + _activeCount += 1 + return value + } + catch let e { + forwardOn(.error(e)) + dispose() + return nil + } + // } + } + + func on(_ event: Event) { + switch event { + case .next(let element): + if let value = nextElementArrived(element: element) { + subscribeInner(value.asObservable()) + } + case .error(let error): + _lock.lock(); defer { _lock.unlock() } + forwardOn(.error(error)) + dispose() + case .completed: + _lock.lock(); defer { _lock.unlock() } + _stopped = true + _sourceSubscription.dispose() + checkCompleted() + } + } + + func subscribeInner(_ source: Observable) { + let iterDisposable = SingleAssignmentDisposable() + if let disposeKey = _group.insert(iterDisposable) { + let iter = MergeSinkIter(parent: self, disposeKey: disposeKey) + let subscription = source.subscribe(iter) + iterDisposable.setDisposable(subscription) + } + } + + func run(_ sources: [Observable]) -> Disposable { + _activeCount += sources.count + + for source in sources { + subscribeInner(source) + } + + _stopped = true + + checkCompleted() + + return _group + } + + @inline(__always) + func checkCompleted() { + if _stopped && _activeCount == 0 { + self.forwardOn(.completed) + self.dispose() + } + } + + func run(_ source: Observable) -> Disposable { + let _ = _group.insert(_sourceSubscription) + + let subscription = source.subscribe(self) + _sourceSubscription.setDisposable(subscription) + + return _group + } +} + +// MARK: Producers + +final fileprivate class FlatMap: Producer { + typealias Selector = (SourceElement) throws -> SourceSequence + + private let _source: Observable + + private let _selector: Selector + + init(source: Observable, selector: @escaping Selector) { + _source = source + _selector = selector + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceSequence.E { + let sink = FlatMapSink(selector: _selector, observer: observer, cancel: cancel) + let subscription = sink.run(_source) + return (sink: sink, subscription: subscription) + } +} + +final fileprivate class FlatMapFirst: Producer { + typealias Selector = (SourceElement) throws -> SourceSequence + + private let _source: Observable + + private let _selector: Selector + + init(source: Observable, selector: @escaping Selector) { + _source = source + _selector = selector + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceSequence.E { + let sink = FlatMapFirstSink(selector: _selector, observer: observer, cancel: cancel) + let subscription = sink.run(_source) + return (sink: sink, subscription: subscription) + } +} + +final class ConcatMap: Producer { + typealias Selector = (SourceElement) throws -> SourceSequence + + private let _source: Observable + private let _selector: Selector + + init(source: Observable, selector: @escaping Selector) { + _source = source + _selector = selector + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceSequence.E { + let sink = ConcatMapSink(selector: _selector, observer: observer, cancel: cancel) + let subscription = sink.run(_source) + return (sink: sink, subscription: subscription) + } +} + +final class Merge : Producer { + private let _source: Observable + + init(source: Observable) { + _source = source + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceSequence.E { + let sink = MergeBasicSink(observer: observer, cancel: cancel) + let subscription = sink.run(_source) + return (sink: sink, subscription: subscription) + } +} + +final fileprivate class MergeArray : Producer { + private let _sources: [Observable] + + init(sources: [Observable]) { + _sources = sources + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + let sink = MergeBasicSink, O>(observer: observer, cancel: cancel) + let subscription = sink.run(_sources) + return (sink: sink, subscription: subscription) + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Multicast.swift b/Example/Pods/RxSwift/RxSwift/Observables/Multicast.swift new file mode 100644 index 0000000..a027c4f --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/Multicast.swift @@ -0,0 +1,408 @@ +// +// Multicast.swift +// RxSwift +// +// Created by Krunoslav Zaher on 2/27/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +/** + Represents an observable wrapper that can be connected and disconnected from its underlying observable sequence. + */ +public class ConnectableObservable + : Observable + , ConnectableObservableType { + + /** + Connects the observable wrapper to its source. All subscribed observers will receive values from the underlying observable sequence as long as the connection is established. + + - returns: Disposable used to disconnect the observable wrapper from its source, causing subscribed observer to stop receiving values from the underlying observable sequence. + */ + public func connect() -> Disposable { + rxAbstractMethod() + } +} + +extension ObservableType { + + /** + Multicasts the source sequence notifications through an instantiated subject into all uses of the sequence within a selector function. + + Each subscription to the resulting sequence causes a separate multicast invocation, exposing the sequence resulting from the selector function's invocation. + + For specializations with fixed subject types, see `publish` and `replay`. + + - seealso: [multicast operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html) + + - parameter subjectSelector: Factory function to create an intermediate subject through which the source sequence's elements will be multicast to the selector function. + - parameter selector: Selector function which can use the multicasted source sequence subject to the policies enforced by the created subject. + - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. + */ + public func multicast(_ subjectSelector: @escaping () throws -> S, selector: @escaping (Observable) throws -> Observable) + -> Observable where S.SubjectObserverType.E == E { + return Multicast( + source: self.asObservable(), + subjectSelector: subjectSelector, + selector: selector + ) + } +} + +extension ObservableType { + + /** + Returns a connectable observable sequence that shares a single subscription to the underlying sequence. + + This operator is a specialization of `multicast` using a `PublishSubject`. + + - seealso: [publish operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html) + + - returns: A connectable observable sequence that shares a single subscription to the underlying sequence. + */ + public func publish() -> ConnectableObservable { + return self.multicast { PublishSubject() } + } +} + +extension ObservableType { + + /** + Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize elements. + + This operator is a specialization of `multicast` using a `ReplaySubject`. + + - seealso: [replay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) + + - parameter bufferSize: Maximum element count of the replay buffer. + - returns: A connectable observable sequence that shares a single subscription to the underlying sequence. + */ + public func replay(_ bufferSize: Int) + -> ConnectableObservable { + return self.multicast { ReplaySubject.create(bufferSize: bufferSize) } + } + + /** + Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying all elements. + + This operator is a specialization of `multicast` using a `ReplaySubject`. + + - seealso: [replay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) + + - returns: A connectable observable sequence that shares a single subscription to the underlying sequence. + */ + public func replayAll() + -> ConnectableObservable { + return self.multicast { ReplaySubject.createUnbounded() } + } +} + +extension ConnectableObservableType { + + /** + Returns an observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence. + + - seealso: [refCount operator on reactivex.io](http://reactivex.io/documentation/operators/refcount.html) + + - returns: An observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence. + */ + public func refCount() -> Observable { + return RefCount(source: self) + } +} + +extension ObservableType { + + /** + Multicasts the source sequence notifications through the specified subject to the resulting connectable observable. + + Upon connection of the connectable observable, the subject is subscribed to the source exactly one, and messages are forwarded to the observers registered with the connectable observable. + + For specializations with fixed subject types, see `publish` and `replay`. + + - seealso: [multicast operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html) + + - parameter subject: Subject to push source elements into. + - returns: A connectable observable sequence that upon connection causes the source sequence to push results into the specified subject. + */ + public func multicast(_ subject: S) + -> ConnectableObservable where S.SubjectObserverType.E == E { + return ConnectableObservableAdapter(source: self.asObservable(), makeSubject: { subject }) + } + + /** + Multicasts the source sequence notifications through an instantiated subject to the resulting connectable observable. + + Upon connection of the connectable observable, the subject is subscribed to the source exactly one, and messages are forwarded to the observers registered with the connectable observable. + + Subject is cleared on connection disposal or in case source sequence produces terminal event. + + - seealso: [multicast operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html) + + - parameter makeSubject: Factory function used to instantiate a subject for each connection. + - returns: A connectable observable sequence that upon connection causes the source sequence to push results into the specified subject. + */ + public func multicast(makeSubject: @escaping () -> S) + -> ConnectableObservable where S.SubjectObserverType.E == E { + return ConnectableObservableAdapter(source: self.asObservable(), makeSubject: makeSubject) + } +} + +final fileprivate class Connection : ObserverType, Disposable { + typealias E = S.SubjectObserverType.E + + private var _lock: RecursiveLock + // state + private var _parent: ConnectableObservableAdapter? + private var _subscription : Disposable? + private var _subjectObserver: S.SubjectObserverType + + private var _disposed: Bool = false + + init(parent: ConnectableObservableAdapter, subjectObserver: S.SubjectObserverType, lock: RecursiveLock, subscription: Disposable) { + _parent = parent + _subscription = subscription + _lock = lock + _subjectObserver = subjectObserver + } + + func on(_ event: Event) { + if _disposed { + return + } + if event.isStopEvent { + self.dispose() + } + _subjectObserver.on(event) + } + + func dispose() { + _lock.lock(); defer { _lock.unlock() } // { + _disposed = true + guard let parent = _parent else { + return + } + + if parent._connection === self { + parent._connection = nil + parent._subject = nil + } + _parent = nil + + _subscription?.dispose() + _subscription = nil + // } + } +} + +final fileprivate class ConnectableObservableAdapter + : ConnectableObservable { + typealias ConnectionType = Connection + + fileprivate let _source: Observable + fileprivate let _makeSubject: () -> S + + fileprivate let _lock = RecursiveLock() + fileprivate var _subject: S? + + // state + fileprivate var _connection: ConnectionType? + + init(source: Observable, makeSubject: @escaping () -> S) { + _source = source + _makeSubject = makeSubject + _subject = nil + _connection = nil + } + + override func connect() -> Disposable { + return _lock.calculateLocked { + if let connection = _connection { + return connection + } + + let singleAssignmentDisposable = SingleAssignmentDisposable() + let connection = Connection(parent: self, subjectObserver: self.lazySubject.asObserver(), lock: _lock, subscription: singleAssignmentDisposable) + _connection = connection + let subscription = _source.subscribe(connection) + singleAssignmentDisposable.setDisposable(subscription) + return connection + } + } + + fileprivate var lazySubject: S { + if let subject = self._subject { + return subject + } + + let subject = _makeSubject() + self._subject = subject + return subject + } + + override func subscribe(_ observer: O) -> Disposable where O.E == S.E { + return self.lazySubject.subscribe(observer) + } +} + +final fileprivate class RefCountSink + : Sink + , ObserverType where CO.E == O.E { + typealias Element = O.E + typealias Parent = RefCount + + private let _parent: Parent + + private var _connectionIdSnapshot: Int64 = -1 + + init(parent: Parent, observer: O, cancel: Cancelable) { + _parent = parent + super.init(observer: observer, cancel: cancel) + } + + func run() -> Disposable { + let subscription = _parent._source.subscribe(self) + _parent._lock.lock(); defer { _parent._lock.unlock() } // { + + _connectionIdSnapshot = _parent._connectionId + + if self.disposed { + return Disposables.create() + } + + if _parent._count == 0 { + _parent._count = 1 + _parent._connectableSubscription = _parent._source.connect() + } + else { + _parent._count = _parent._count + 1 + } + // } + + return Disposables.create { + subscription.dispose() + self._parent._lock.lock(); defer { self._parent._lock.unlock() } // { + if self._parent._connectionId != self._connectionIdSnapshot { + return + } + if self._parent._count == 1 { + self._parent._count = 0 + guard let connectableSubscription = self._parent._connectableSubscription else { + return + } + + connectableSubscription.dispose() + self._parent._connectableSubscription = nil + } + else if self._parent._count > 1 { + self._parent._count = self._parent._count - 1 + } + else { + rxFatalError("Something went wrong with RefCount disposing mechanism") + } + // } + } + } + + func on(_ event: Event) { + switch event { + case .next: + forwardOn(event) + case .error, .completed: + _parent._lock.lock() // { + if _parent._connectionId == self._connectionIdSnapshot { + let connection = _parent._connectableSubscription + defer { connection?.dispose() } + _parent._count = 0 + _parent._connectionId = _parent._connectionId &+ 1 + _parent._connectableSubscription = nil + } + // } + _parent._lock.unlock() + forwardOn(event) + dispose() + } + } +} + +final fileprivate class RefCount: Producer { + fileprivate let _lock = RecursiveLock() + + // state + fileprivate var _count = 0 + fileprivate var _connectionId: Int64 = 0 + fileprivate var _connectableSubscription = nil as Disposable? + + fileprivate let _source: CO + + init(source: CO) { + _source = source + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == CO.E { + let sink = RefCountSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) + } +} + +final fileprivate class MulticastSink: Sink, ObserverType { + typealias Element = O.E + typealias ResultType = Element + typealias MutlicastType = Multicast + + private let _parent: MutlicastType + + init(parent: MutlicastType, observer: O, cancel: Cancelable) { + _parent = parent + super.init(observer: observer, cancel: cancel) + } + + func run() -> Disposable { + do { + let subject = try _parent._subjectSelector() + let connectable = ConnectableObservableAdapter(source: _parent._source, makeSubject: { subject }) + + let observable = try _parent._selector(connectable) + + let subscription = observable.subscribe(self) + let connection = connectable.connect() + + return Disposables.create(subscription, connection) + } + catch let e { + forwardOn(.error(e)) + dispose() + return Disposables.create() + } + } + + func on(_ event: Event) { + forwardOn(event) + switch event { + case .next: break + case .error, .completed: + dispose() + } + } +} + +final fileprivate class Multicast: Producer { + typealias SubjectSelectorType = () throws -> S + typealias SelectorType = (Observable) throws -> Observable + + fileprivate let _source: Observable + fileprivate let _subjectSelector: SubjectSelectorType + fileprivate let _selector: SelectorType + + init(source: Observable, subjectSelector: @escaping SubjectSelectorType, selector: @escaping SelectorType) { + _source = source + _subjectSelector = subjectSelector + _selector = selector + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { + let sink = MulticastSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Never.swift b/Example/Pods/RxSwift/RxSwift/Observables/Never.swift new file mode 100644 index 0000000..d98a7a8 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/Never.swift @@ -0,0 +1,27 @@ +// +// Never.swift +// RxSwift +// +// Created by Krunoslav Zaher on 8/30/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType { + + /** + Returns a non-terminating observable sequence, which can be used to denote an infinite duration. + + - seealso: [never operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html) + + - returns: An observable sequence whose observers will never get called. + */ + public static func never() -> Observable { + return NeverProducer() + } +} + +final fileprivate class NeverProducer : Producer { + override func subscribe(_ observer: O) -> Disposable where O.E == Element { + return Disposables.create() + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Observable+Aggregate.swift b/Example/Pods/RxSwift/RxSwift/Observables/Observable+Aggregate.swift deleted file mode 100644 index b56be33..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Observable+Aggregate.swift +++ /dev/null @@ -1,64 +0,0 @@ -// -// Observable+Aggregate.swift -// Rx -// -// Created by Krunoslav Zaher on 3/22/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -// MARK: reduce - -extension ObservableType { - - /** - Applies an `accumulator` function over an observable sequence, returning the result of the aggregation as a single element in the result sequence. The specified `seed` value is used as the initial accumulator value. - - For aggregation behavior with incremental intermediate results, see `scan`. - - - seealso: [reduce operator on reactivex.io](http://reactivex.io/documentation/operators/reduce.html) - - - parameter seed: The initial accumulator value. - - parameter accumulator: A accumulator function to be invoked on each element. - - parameter mapResult: A function to transform the final accumulator value into the result value. - - returns: An observable sequence containing a single element with the final accumulator value. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func reduce(_ seed: A, accumulator: @escaping (A, E) throws -> A, mapResult: @escaping (A) throws -> R) - -> Observable { - return Reduce(source: self.asObservable(), seed: seed, accumulator: accumulator, mapResult: mapResult) - } - - /** - Applies an `accumulator` function over an observable sequence, returning the result of the aggregation as a single element in the result sequence. The specified `seed` value is used as the initial accumulator value. - - For aggregation behavior with incremental intermediate results, see `scan`. - - - seealso: [reduce operator on reactivex.io](http://reactivex.io/documentation/operators/reduce.html) - - - parameter seed: The initial accumulator value. - - parameter accumulator: A accumulator function to be invoked on each element. - - returns: An observable sequence containing a single element with the final accumulator value. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func reduce(_ seed: A, accumulator: @escaping (A, E) throws -> A) - -> Observable { - return Reduce(source: self.asObservable(), seed: seed, accumulator: accumulator, mapResult: { $0 }) - } - - /** - Converts an Observable into another Observable that emits the whole sequence as a single array and then terminates. - - For aggregation behavior see `reduce`. - - - seealso: [toArray operator on reactivex.io](http://reactivex.io/documentation/operators/to.html) - - - returns: An observable sequence containing all the emitted elements as array. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func toArray() - -> Observable<[E]> { - return ToArray(source: self.asObservable()) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Observable+Binding.swift b/Example/Pods/RxSwift/RxSwift/Observables/Observable+Binding.swift deleted file mode 100644 index 95f6e53..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Observable+Binding.swift +++ /dev/null @@ -1,190 +0,0 @@ -// -// Observable+Binding.swift -// Rx -// -// Created by Krunoslav Zaher on 3/1/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -// MARK: multicast - -extension ObservableType { - - /** - Multicasts the source sequence notifications through the specified subject to the resulting connectable observable. - - Upon connection of the connectable observable, the subject is subscribed to the source exactly one, and messages are forwarded to the observers registered with the connectable observable. - - For specializations with fixed subject types, see `publish` and `replay`. - - - seealso: [multicast operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html) - - - parameter subject: Subject to push source elements into. - - returns: A connectable observable sequence that upon connection causes the source sequence to push results into the specified subject. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func multicast(_ subject: S) - -> ConnectableObservable where S.SubjectObserverType.E == E { - return ConnectableObservableAdapter(source: self.asObservable(), subject: subject) - } - - /** - Multicasts the source sequence notifications through an instantiated subject into all uses of the sequence within a selector function. - - Each subscription to the resulting sequence causes a separate multicast invocation, exposing the sequence resulting from the selector function's invocation. - - For specializations with fixed subject types, see `publish` and `replay`. - - - seealso: [multicast operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html) - - - parameter subjectSelector: Factory function to create an intermediate subject through which the source sequence's elements will be multicast to the selector function. - - parameter selector: Selector function which can use the multicasted source sequence subject to the policies enforced by the created subject. - - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func multicast(_ subjectSelector: @escaping () throws -> S, selector: @escaping (Observable) throws -> Observable) - -> Observable where S.SubjectObserverType.E == E { - return Multicast( - source: self.asObservable(), - subjectSelector: subjectSelector, - selector: selector - ) - } -} - -// MARK: publish - -extension ObservableType { - - /** - Returns a connectable observable sequence that shares a single subscription to the underlying sequence. - - This operator is a specialization of `multicast` using a `PublishSubject`. - - - seealso: [publish operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html) - - - returns: A connectable observable sequence that shares a single subscription to the underlying sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func publish() -> ConnectableObservable { - return self.multicast(PublishSubject()) - } -} - -// MARK: replay - -extension ObservableType { - - /** - Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize elements. - - This operator is a specialization of `multicast` using a `ReplaySubject`. - - - seealso: [replay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) - - - parameter bufferSize: Maximum element count of the replay buffer. - - returns: A connectable observable sequence that shares a single subscription to the underlying sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func replay(_ bufferSize: Int) - -> ConnectableObservable { - return self.multicast(ReplaySubject.create(bufferSize: bufferSize)) - } - - /** - Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying all elements. - - This operator is a specialization of `multicast` using a `ReplaySubject`. - - - seealso: [replay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) - - - returns: A connectable observable sequence that shares a single subscription to the underlying sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func replayAll() - -> ConnectableObservable { - return self.multicast(ReplaySubject.createUnbounded()) - } -} - -// MARK: refcount - -extension ConnectableObservableType { - - /** - Returns an observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence. - - - seealso: [refCount operator on reactivex.io](http://reactivex.io/documentation/operators/refCount.html) - - - returns: An observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func refCount() -> Observable { - return RefCount(source: self) - } -} - -// MARK: share - -extension ObservableType { - - /** - Returns an observable sequence that shares a single subscription to the underlying sequence. - - This operator is a specialization of publish which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. - - - seealso: [share operator on reactivex.io](http://reactivex.io/documentation/operators/refcount.html) - - - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func share() -> Observable { - return self.publish().refCount() - } -} - -// MARK: shareReplay - -extension ObservableType { - - /** - Returns an observable sequence that shares a single subscription to the underlying sequence, and immediately upon subscription replays maximum number of elements in buffer. - - This operator is a specialization of replay which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. - - - seealso: [shareReplay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) - - - parameter bufferSize: Maximum element count of the replay buffer. - - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func shareReplay(_ bufferSize: Int) - -> Observable { - if bufferSize == 1 { - return ShareReplay1(source: self.asObservable()) - } - else { - return self.replay(bufferSize).refCount() - } - } - - /** - Returns an observable sequence that shares a single subscription to the underlying sequence, and immediately upon subscription replays latest element in buffer. - - This operator is a specialization of replay which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. - - Unlike `shareReplay(bufferSize: Int)`, this operator will clear latest element from replay buffer in case number of subscribers drops from one to zero. In case sequence - completes or errors out replay buffer is also cleared. - - - seealso: [shareReplay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) - - - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func shareReplayLatestWhileConnected() - -> Observable { - return ShareReplay1WhileConnected(source: self.asObservable()) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Observable+Concurrency.swift b/Example/Pods/RxSwift/RxSwift/Observables/Observable+Concurrency.swift deleted file mode 100644 index 1ece7d8..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Observable+Concurrency.swift +++ /dev/null @@ -1,62 +0,0 @@ -// -// Observable+Concurrency.swift -// Rx -// -// Created by Krunoslav Zaher on 3/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -// MARK: observeOn - -extension ObservableType { - - /** - Wraps the source sequence in order to run its observer callbacks on the specified scheduler. - - This only invokes observer callbacks on a `scheduler`. In case the subscription and/or unsubscription - actions have side-effects that require to be run on a scheduler, use `subscribeOn`. - - - seealso: [observeOn operator on reactivex.io](http://reactivex.io/documentation/operators/observeon.html) - - - parameter scheduler: Scheduler to notify observers on. - - returns: The source sequence whose observations happen on the specified scheduler. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func observeOn(_ scheduler: ImmediateSchedulerType) - -> Observable { - if let scheduler = scheduler as? SerialDispatchQueueScheduler { - return ObserveOnSerialDispatchQueue(source: self.asObservable(), scheduler: scheduler) - } - else { - return ObserveOn(source: self.asObservable(), scheduler: scheduler) - } - } -} - -// MARK: subscribeOn - -extension ObservableType { - - /** - Wraps the source sequence in order to run its subscription and unsubscription logic on the specified - scheduler. - - This operation is not commonly used. - - This only performs the side-effects of subscription and unsubscription on the specified scheduler. - - In order to invoke observer callbacks on a `scheduler`, use `observeOn`. - - - seealso: [subscribeOn operator on reactivex.io](http://reactivex.io/documentation/operators/subscribeon.html) - - - parameter scheduler: Scheduler to perform subscription and unsubscription actions on. - - returns: The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func subscribeOn(_ scheduler: ImmediateSchedulerType) - -> Observable { - return SubscribeOn(source: self, scheduler: scheduler) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Observable+Creation.swift b/Example/Pods/RxSwift/RxSwift/Observables/Observable+Creation.swift deleted file mode 100644 index c42b019..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Observable+Creation.swift +++ /dev/null @@ -1,237 +0,0 @@ -// -// Observable+Creation.swift -// Rx -// -// Created by Krunoslav Zaher on 3/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -extension Observable { - // MARK: create - - /** - Creates an observable sequence from a specified subscribe method implementation. - - - seealso: [create operator on reactivex.io](http://reactivex.io/documentation/operators/create.html) - - - parameter subscribe: Implementation of the resulting observable sequence's `subscribe` method. - - returns: The observable sequence with the specified implementation for the `subscribe` method. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public static func create(_ subscribe: @escaping (AnyObserver) -> Disposable) -> Observable { - return AnonymousObservable(subscribe) - } - - // MARK: empty - - /** - Returns an empty observable sequence, using the specified scheduler to send out the single `Completed` message. - - - seealso: [empty operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html) - - - returns: An observable sequence with no elements. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public static func empty() -> Observable { - return Empty() - } - - // MARK: never - - /** - Returns a non-terminating observable sequence, which can be used to denote an infinite duration. - - - seealso: [never operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html) - - - returns: An observable sequence whose observers will never get called. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public static func never() -> Observable { - return Never() - } - - // MARK: just - - /** - Returns an observable sequence that contains a single element. - - - seealso: [just operator on reactivex.io](http://reactivex.io/documentation/operators/just.html) - - - parameter element: Single element in the resulting observable sequence. - - parameter: Scheduler to send the single element on. - - returns: An observable sequence containing the single specified element. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public static func just(_ element: E, scheduler: ImmediateSchedulerType? = nil) -> Observable { - if let scheduler = scheduler { - return JustScheduled(element: element, scheduler: scheduler) - } - else { - return Just(element: element) - } - } - - // MARK: fail - - /** - Returns an observable sequence that terminates with an `error`. - - - seealso: [throw operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html) - - - returns: The observable sequence that terminates with specified error. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public static func error(_ error: Swift.Error) -> Observable { - return Error(error: error) - } - - // MARK: of - - /** - This method creates a new Observable instance with a variable number of elements. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - parameter elements: Elements to generate. - - parameter scheduler: Scheduler to send elements on. If `nil`, elements are sent immediatelly on subscription. - - 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 ..., scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return ObservableSequence(elements: elements, scheduler: scheduler) - } - - // MARK: defer - - /** - Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes. - - - seealso: [defer operator on reactivex.io](http://reactivex.io/documentation/operators/defer.html) - - - 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 () throws -> Observable) - -> Observable { - return Deferred(observableFactory: observableFactory) - } - - /** - Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler - to run the loop send out observer messages. - - - seealso: [create operator on reactivex.io](http://reactivex.io/documentation/operators/create.html) - - - parameter initialState: Initial state. - - parameter condition: Condition to terminate generation (upon returning `false`). - - parameter iterate: Iteration step function. - - parameter scheduler: Scheduler on which to run the generator loop. - - returns: The generated sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public static func generate(initialState: E, condition: @escaping (E) throws -> Bool, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance, iterate: @escaping (E) throws -> E) -> Observable { - return Generate(initialState: initialState, condition: condition, iterate: iterate, resultSelector: { $0 }, scheduler: scheduler) - } - - /** - Generates an observable sequence that repeats the given element infinitely, using the specified scheduler to send out observer messages. - - - seealso: [repeat operator on reactivex.io](http://reactivex.io/documentation/operators/repeat.html) - - - parameter element: Element to repeat. - - parameter scheduler: Scheduler to run the producer loop on. - - returns: An observable sequence that repeats the given element infinitely. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public static func repeatElement(_ element: E, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return RepeatElement(element: element, scheduler: scheduler) - } - - /** - Constructs an observable sequence that depends on a resource object, whose lifetime is tied to the resulting observable sequence's lifetime. - - - seealso: [using operator on reactivex.io](http://reactivex.io/documentation/operators/using.html) - - - parameter resourceFactory: Factory function to obtain a resource object. - - parameter observableFactory: Factory function to obtain an observable sequence that depends on the obtained resource. - - returns: An observable sequence whose lifetime controls the lifetime of the dependent resource object. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public static func using(_ resourceFactory: @escaping () throws -> R, observableFactory: @escaping (R) throws -> Observable) -> Observable { - return Using(resourceFactory: resourceFactory, observableFactory: observableFactory) - } -} - -extension Observable where Element : SignedInteger { - /** - Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to generate and send out observer messages. - - - seealso: [range operator on reactivex.io](http://reactivex.io/documentation/operators/range.html) - - - parameter start: The value of the first integer in the sequence. - - parameter count: The number of sequential integers to generate. - - parameter scheduler: Scheduler to run the generator loop on. - - returns: An observable sequence that contains a range of sequential integral numbers. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public static func range(start: E, count: E, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return RangeProducer(start: start, count: count, scheduler: scheduler) - } -} - -extension Sequence { - /** - Converts a sequence to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - returns: The observable sequence whose elements are pulled from the given enumerable sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - @available(*, deprecated, renamed: "Observable.from()") - public func toObservable(_ scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return ObservableSequence(elements: Array(self), scheduler: scheduler) - } -} - -extension Array { - /** - Converts a sequence to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - returns: The observable sequence whose elements are pulled from the given enumerable sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - @available(*, deprecated, renamed: "Observable.from()") - public func toObservable(_ scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return ObservableSequence(elements: self, scheduler: scheduler) - } -} - -extension Observable { - /** - Converts an array to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - returns: The observable sequence whose elements are pulled from the given enumerable sequence. - */ - public static func from(_ array: [E], scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return ObservableSequence(elements: array, scheduler: scheduler) - } - - /** - Converts a sequence to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - returns: The observable sequence whose elements are pulled from the given enumerable sequence. - */ - public static func from(_ sequence: S, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable where S.Iterator.Element == E { - return ObservableSequence(elements: sequence, scheduler: scheduler) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Observable+Debug.swift b/Example/Pods/RxSwift/RxSwift/Observables/Observable+Debug.swift deleted file mode 100644 index c5799e0..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Observable+Debug.swift +++ /dev/null @@ -1,28 +0,0 @@ -// -// Observable+Debug.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/2/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -// MARK: debug - -extension ObservableType { - - /** - Prints received events for all observers on standard output. - - - seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html) - - - 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) - -> Observable { - return Debug(source: self, identifier: identifier, file: file, line: line, function: function) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Observable+Multiple.swift b/Example/Pods/RxSwift/RxSwift/Observables/Observable+Multiple.swift deleted file mode 100644 index e88d819..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Observable+Multiple.swift +++ /dev/null @@ -1,440 +0,0 @@ -// -// Observable+Multiple.swift -// Rx -// -// Created by Krunoslav Zaher on 3/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -// MARK: combineLatest - -extension Observable { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combinelatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - 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(_ collection: C, _ resultSelector: @escaping ([C.Iterator.Element.E]) throws -> Element) -> Observable - where C.Iterator.Element: ObservableType { - return CombineLatestCollectionType(sources: collection, resultSelector: resultSelector) - } -} - -extension Collection where Iterator.Element : ObservableType { - - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combinelatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - 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") - @available(*, deprecated, renamed: "Observable.combineLatest()") - public func combineLatest(_ resultSelector: @escaping ([Generator.Element.E]) throws -> R) -> Observable { - return CombineLatestCollectionType(sources: self, resultSelector: resultSelector) - } -} - -// MARK: zip - -extension Observable { - /** - 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. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - 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(_ collection: C, _ resultSelector: @escaping ([C.Iterator.Element.E]) throws -> Element) -> Observable - where C.Iterator.Element: ObservableType { - return ZipCollectionType(sources: collection, resultSelector: resultSelector) - } -} - -extension Collection where Iterator.Element : ObservableType { - - /** - 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. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - 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") - @available(*, deprecated, renamed: "Observable.zip()") - public func zip(_ resultSelector: @escaping ([Generator.Element.E]) throws -> R) -> Observable { - return ZipCollectionType(sources: self, resultSelector: resultSelector) - } -} - -// MARK: switch - -extension ObservableType where E : ObservableConvertibleType { - - /** - Transforms an observable sequence of observable sequences into an observable sequence - producing values only from the most recent observable sequence. - - Each time a new inner observable sequence is received, unsubscribe from the - previous inner observable sequence. - - - seealso: [switch operator on reactivex.io](http://reactivex.io/documentation/operators/switch.html) - - - 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") - public func switchLatest() -> Observable { - return Switch(source: asObservable()) - } -} - -// MARK: concat - -extension ObservableType { - - /** - Concatenates the second observable sequence to `self` upon successful termination of `self`. - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - parameter second: Second observable sequence. - - returns: An observable sequence that contains the elements of `self`, followed by those of the second sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func concat(_ second: O) -> Observable where O.E == E { - return Observable.concat([self.asObservable(), second.asObservable()]) - } -} - -extension Observable { - /** - Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully. - - This operator has tail recursive optimizations that will prevent stack overflow. - - Optimizations will be performed in cases equivalent to following: - - [1, [2, [3, .....].concat()].concat].concat() - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - returns: An observable sequence that contains the elements of each given sequence, in sequential order. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public static func concat(_ sequence: S) -> Observable - where S.Iterator.Element == Observable { - return Concat(sources: sequence, count: nil) - } - - /** - Concatenates all observable sequences in the given collection, as long as the previous observable sequence terminated successfully. - - This operator has tail recursive optimizations that will prevent stack overflow. - - Optimizations will be performed in cases equivalent to following: - - [1, [2, [3, .....].concat()].concat].concat() - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - returns: An observable sequence that contains the elements of each given sequence, in sequential order. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public static func concat(_ collection: S) -> Observable - where S.Iterator.Element == Observable { - return Concat(sources: collection, count: collection.count.toIntMax()) - } -} - -extension Sequence where Iterator.Element : ObservableType { - - /** - Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully. - - This operator has tail recursive optimizations that will prevent stack overflow. - - Optimizations will be performed in cases equivalent to following: - - [1, [2, [3, .....].concat()].concat].concat() - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - returns: An observable sequence that contains the elements of each given sequence, in sequential order. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - @available(*, deprecated, renamed: "Observable.concat()") - public func concat() - -> Observable { - return Concat(sources: self, count: nil) - } -} - -extension Collection where Iterator.Element : ObservableType { - - /** - Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully. - - This operator has tail recursive optimizations that will prevent stack overflow and enable generating - infinite observable sequences while using limited amount of memory during generation. - - Optimizations will be performed in cases equivalent to following: - - [1, [2, [3, .....].concat()].concat].concat() - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - returns: An observable sequence that contains the elements of each given sequence, in sequential order. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - @available(*, deprecated, renamed: "Observable.concat()") - public func concat() - -> Observable { - return Concat(sources: self, count: self.count.toIntMax()) - } -} - -extension ObservableType where E : ObservableConvertibleType { - - /** - Concatenates all inner observable sequences, as long as the previous observable sequence terminated successfully. - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - returns: An observable sequence that contains the elements of each observed inner sequence, in sequential order. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func concat() -> Observable { - return merge(maxConcurrent: 1) - } -} - -// MARK: merge - -extension ObservableType where E : ObservableConvertibleType { - - /** - Merges elements from all observable sequences in the given enumerable sequence into a single observable sequence. - - - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) - - - returns: The observable sequence that merges the elements of the observable sequences. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func merge() -> Observable { - return Merge(source: asObservable()) - } - - /** - Merges elements from all inner observable sequences into a single observable sequence, limiting the number of concurrent subscriptions to inner sequences. - - - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) - - - parameter maxConcurrent: Maximum number of inner observable sequences being subscribed to concurrently. - - 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) - -> Observable { - return MergeLimited(source: asObservable(), maxConcurrent: maxConcurrent) - } -} - -// MARK: catch - -extension ObservableType { - - /** - Continues an observable sequence that is terminated by an error with the observable sequence produced by the handler. - - - seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html) - - - parameter handler: Error handler function, producing another observable sequence. - - returns: An observable sequence containing the source sequence's elements, followed by the elements produced by the handler's resulting observable sequence in case an error occurred. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func catchError(_ handler: @escaping (Swift.Error) throws -> Observable) - -> Observable { - return Catch(source: asObservable(), handler: handler) - } - - /** - Continues an observable sequence that is terminated by an error with a single element. - - - seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html) - - - parameter element: Last element in an observable sequence in case error occurs. - - returns: An observable sequence containing the source sequence's elements, followed by the `element` in case an error occurred. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func catchErrorJustReturn(_ element: E) - -> Observable { - return Catch(source: asObservable(), handler: { _ in Observable.just(element) }) - } - -} - -extension Observable { - /** - Continues an observable sequence that is terminated by an error with the next observable sequence. - - - seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html) - - - returns: An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public static func catchError(_ sequence: S) -> Observable - where S.Iterator.Element == Observable { - return CatchSequence(sources: sequence) - } -} - -extension Sequence where Iterator.Element : ObservableType { - /** - Continues an observable sequence that is terminated by an error with the next observable sequence. - - - seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html) - - - returns: An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - @available(*, deprecated, renamed: "Observable.catchError()") - public func catchError() - -> Observable { - return CatchSequence(sources: self) - } -} - -// MARK: takeUntil - -extension ObservableType { - - /** - Returns the elements from the source observable sequence until the other observable sequence produces an element. - - - seealso: [takeUntil operator on reactivex.io](http://reactivex.io/documentation/operators/takeuntil.html) - - - parameter other: Observable sequence that terminates propagation of elements of the source sequence. - - returns: An observable sequence containing the elements of the source sequence up to the point the other sequence interrupted further propagation. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func takeUntil(_ other: O) - -> Observable { - return TakeUntil(source: asObservable(), other: other.asObservable()) - } -} - -// MARK: skipUntil - -extension ObservableType { - - /** - Returns the elements from the source observable sequence that are emitted after the other observable sequence produces an element. - - - seealso: [skipUntil operator on reactivex.io](http://reactivex.io/documentation/operators/skipuntil.html) - - - parameter other: Observable sequence that starts propagation of elements of the source sequence. - - returns: An observable sequence containing the elements of the source sequence that are emitted after the other sequence emits an item. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func skipUntil(_ other: O) - -> Observable { - return SkipUntil(source: asObservable(), other: other.asObservable()) - } -} - -// MARK: amb - -extension ObservableType { - - /** - Propagates the observable sequence that reacts first. - - - seealso: [amb operator on reactivex.io](http://reactivex.io/documentation/operators/amb.html) - - - parameter right: Second observable sequence. - - returns: An observable sequence that surfaces either of the given sequences, whichever reacted first. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func amb - (_ right: O2) - -> Observable where O2.E == E { - return Amb(left: asObservable(), right: right.asObservable()) - } -} - -extension Observable { - /** - Propagates the observable sequence that reacts first. - - - seealso: [amb operator on reactivex.io](http://reactivex.io/documentation/operators/amb.html) - - - returns: An observable sequence that surfaces any of the given sequences, whichever reacted first. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public static func amb(_ sequence: S) -> Observable - where S.Iterator.Element == Observable { - return sequence.reduce(Observable.never()) { a, o in - return a.amb(o.asObservable()) - } - } -} - -extension Sequence where Iterator.Element : ObservableType { - - /** - Propagates the observable sequence that reacts first. - - - seealso: [amb operator on reactivex.io](http://reactivex.io/documentation/operators/amb.html) - - - returns: An observable sequence that surfaces any of the given sequences, whichever reacted first. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - @available(*, deprecated, renamed: "Observable.amb()") - public func amb() - -> Observable { - return self.reduce(Observable.never()) { a, o in - return a.amb(o.asObservable()) - } - } -} - -// withLatestFrom - -extension ObservableType { - - /** - Merges two observable sequences into one observable sequence by combining each element from self with the latest element from the second source, if any. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter second: Second observable source. - - 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(_ second: SecondO, resultSelector: @escaping (E, SecondO.E) throws -> ResultType) -> Observable { - return WithLatestFrom(first: asObservable(), second: second.asObservable(), resultSelector: resultSelector) - } - - /** - Merges two observable sequences into one observable sequence by using latest element from the second sequence every time when `self` emitts an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - 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(_ second: SecondO) -> Observable { - return WithLatestFrom(first: asObservable(), second: second.asObservable(), resultSelector: { $1 }) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Observable+Single.swift b/Example/Pods/RxSwift/RxSwift/Observables/Observable+Single.swift deleted file mode 100644 index 17aa334..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Observable+Single.swift +++ /dev/null @@ -1,294 +0,0 @@ -// -// Observable+Single.swift -// Rx -// -// Created by Krunoslav Zaher on 2/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -// MARK: distinct until changed - -extension ObservableType where E: Equatable { - - /** - Returns an observable sequence that contains only distinct contiguous elements according to equality operator. - - - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) - - - 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") - public func distinctUntilChanged() - -> Observable { - return self.distinctUntilChanged({ $0 }, comparer: { ($0 == $1) }) - } -} - -extension ObservableType { - /** - Returns an observable sequence that contains only distinct contiguous elements according to the `keySelector`. - - - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) - - - 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(_ keySelector: @escaping (E) throws -> K) - -> Observable { - return self.distinctUntilChanged(keySelector, comparer: { $0 == $1 }) - } - - /** - Returns an observable sequence that contains only distinct contiguous elements according to the `comparer`. - - - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) - - - 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) throws -> Bool) - -> Observable { - return self.distinctUntilChanged({ $0 }, comparer: comparer) - } - - /** - Returns an observable sequence that contains only distinct contiguous elements according to the keySelector and the comparer. - - - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) - - - parameter keySelector: A function to compute the comparison key for each element. - - 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(_ keySelector: @escaping (E) throws -> K, comparer: @escaping (K, K) throws -> Bool) - -> Observable { - return DistinctUntilChanged(source: self.asObservable(), selector: keySelector, comparer: comparer) - } -} - -// MARK: doOn - -extension ObservableType { - - /** - Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence. - - - seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html) - - - 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) throws -> Void) - -> Observable { - return Do(source: self.asObservable(), eventHandler: eventHandler, onSubscribe: nil, onDispose: nil) - } - - /** - Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence. - - - seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html) - - - parameter onNext: Action to invoke for each element in the observable sequence. - - parameter onError: Action to invoke upon errored termination of the observable sequence. - - 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") - @available(*, deprecated, renamed: "do(onNext:onError:onCompleted:)") - public func doOn(onNext: ((E) throws -> Void)? = nil, onError: ((Swift.Error) throws -> Void)? = nil, onCompleted: (() throws -> Void)? = nil) - -> Observable { - return Do(source: self.asObservable(), eventHandler: { e in - switch e { - case .next(let element): - try onNext?(element) - case .error(let e): - try onError?(e) - case .completed: - try onCompleted?() - } - }, - onSubscribe: nil, - onDispose: nil) - } - - /** - Invokes an action for each Next 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. - - 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) throws -> Void) - -> Observable { - return self.do(onNext: onNext) - } - - /** - Invokes an action for the Error event in the observable sequence, and propagates all observer messages through the result sequence. - - - parameter onError: Action to invoke upon errored 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(onError:)") - public func doOnError(onError: @escaping (Swift.Error) throws -> Void) - -> Observable { - return self.do(onError: onError) - } - - /** - Invokes an action for the Completed event in the observable sequence, and propagates all observer messages through the result sequence. - - - 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 () throws -> Void) - -> Observable { - return self.do(onCompleted: onCompleted) - } - - /** - Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence. - - - seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html) - - - parameter onNext: Action to invoke for each element in the observable sequence. - - parameter onError: Action to invoke upon errored termination of the observable sequence. - - 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) throws -> Void)? = nil, onError: ((Swift.Error) throws -> Void)? = nil, onCompleted: (() throws -> Void)? = nil, onSubscribe: (() -> ())? = nil, onDispose: (() -> ())? = nil) - -> Observable { - return Do(source: self.asObservable(), eventHandler: { e in - switch e { - case .next(let element): - try onNext?(element) - case .error(let e): - try onError?(e) - case .completed: - try onCompleted?() - } - }, onSubscribe: onSubscribe, onDispose: onDispose) - } -} - -// MARK: startWith - -extension ObservableType { - - /** - Prepends a sequence of values to an observable sequence. - - - seealso: [startWith operator on reactivex.io](http://reactivex.io/documentation/operators/startwith.html) - - - parameter elements: Elements 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(_ elements: E ...) - -> Observable { - return StartWith(source: self.asObservable(), elements: elements) - } -} - -// MARK: retry - -extension ObservableType { - - /** - Repeats the source observable sequence until it successfully terminates. - - **This could potentially create an infinite sequence.** - - - seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html) - - - returns: Observable sequence to repeat until it successfully terminates. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func retry() -> Observable { - return CatchSequence(sources: InfiniteSequence(repeatedValue: self.asObservable())) - } - - /** - Repeats the source observable sequence the specified number of times in case of an error or until it successfully terminates. - - If you encounter an error and want it to retry once, then you must use `retry(2)` - - - seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html) - - - parameter maxAttemptCount: Maximum number of times to repeat the sequence. - - returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func retry(_ maxAttemptCount: Int) - -> Observable { - return CatchSequence(sources: repeatElement(self.asObservable(), count: maxAttemptCount)) - } - - /** - Repeats the source observable sequence on error when the notifier emits a next value. - If the source observable errors and the notifier completes, it will complete the source sequence. - - - seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html) - - - parameter notificationHandler: A handler that is passed an observable sequence of errors raised by the source observable and returns and observable that either continues, completes or errors. This behavior is then applied to the source observable. - - returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully or is notified to error or complete. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func retryWhen(_ notificationHandler: @escaping (Observable) -> TriggerObservable) - -> Observable { - return RetryWhenSequence(sources: InfiniteSequence(repeatedValue: self.asObservable()), notificationHandler: notificationHandler) - } - - /** - Repeats the source observable sequence on error when the notifier emits a next value. - If the source observable errors and the notifier completes, it will complete the source sequence. - - - seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html) - - - parameter notificationHandler: A handler that is passed an observable sequence of errors raised by the source observable and returns and observable that either continues, completes or errors. This behavior is then applied to the source observable. - - returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully or is notified to error or complete. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func retryWhen(_ notificationHandler: @escaping (Observable) -> TriggerObservable) - -> Observable { - return RetryWhenSequence(sources: InfiniteSequence(repeatedValue: self.asObservable()), notificationHandler: notificationHandler) - } -} - -// MARK: scan - -extension ObservableType { - - /** - Applies an accumulator function over an observable sequence and returns each intermediate result. The specified seed value is used as the initial accumulator value. - - For aggregation behavior with no intermediate results, see `reduce`. - - - seealso: [scan operator on reactivex.io](http://reactivex.io/documentation/operators/scan.html) - - - parameter seed: The initial accumulator value. - - 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(_ seed: A, accumulator: @escaping (A, E) throws -> A) - -> Observable { - return Scan(source: self.asObservable(), seed: seed, accumulator: accumulator) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Observable+StandardSequenceOperators.swift b/Example/Pods/RxSwift/RxSwift/Observables/Observable+StandardSequenceOperators.swift deleted file mode 100644 index 6c5db5f..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Observable+StandardSequenceOperators.swift +++ /dev/null @@ -1,323 +0,0 @@ -// -// Observable+StandardSequenceOperators.swift -// Rx -// -// Created by Krunoslav Zaher on 2/17/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -// MARK: filter aka where - -extension ObservableType { - - /** - Filters the elements of an observable sequence based on a predicate. - - - seealso: [filter operator on reactivex.io](http://reactivex.io/documentation/operators/filter.html) - - - 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) throws -> Bool) - -> Observable { - return Filter(source: asObservable(), predicate: predicate) - } -} - -// MARK: takeWhile - -extension ObservableType { - - /** - Returns elements from an observable sequence as long as a specified condition is true. - - - seealso: [takeWhile operator on reactivex.io](http://reactivex.io/documentation/operators/takewhile.html) - - - parameter predicate: A function to test each element for a condition. - - returns: An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func takeWhile(_ predicate: @escaping (E) throws -> Bool) - -> Observable { - return TakeWhile(source: asObservable(), predicate: predicate) - } - - /** - Returns elements from an observable sequence as long as a specified condition is true. - - The element's index is used in the logic of the predicate function. - - - seealso: [takeWhile operator on reactivex.io](http://reactivex.io/documentation/operators/takewhile.html) - - - parameter predicate: A function to test each element for a condition; the second parameter of the function represents the index of the source element. - - returns: An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func takeWhileWithIndex(_ predicate: @escaping (E, Int) throws -> Bool) - -> Observable { - return TakeWhile(source: asObservable(), predicate: predicate) - } -} - -// MARK: take - -extension ObservableType { - - /** - Returns a specified number of contiguous elements from the start of an observable sequence. - - - seealso: [take operator on reactivex.io](http://reactivex.io/documentation/operators/take.html) - - - parameter count: The number of elements to return. - - returns: An observable sequence that contains the specified number of elements from the start of the input sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func take(_ count: Int) - -> Observable { - if count == 0 { - return Observable.empty() - } - else { - return TakeCount(source: asObservable(), count: count) - } - } -} - -// MARK: takeLast - -extension ObservableType { - - /** - Returns a specified number of contiguous elements from the end of an observable sequence. - - This operator accumulates a buffer with a length enough to store elements count elements. Upon completion of the source sequence, this buffer is drained on the result sequence. This causes the elements to be delayed. - - - seealso: [takeLast operator on reactivex.io](http://reactivex.io/documentation/operators/takelast.html) - - - parameter count: Number of elements to take from the end of the source sequence. - - returns: An observable sequence containing the specified number of elements from the end of the source sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func takeLast(_ count: Int) - -> Observable { - return TakeLast(source: asObservable(), count: count) - } -} - - -// MARK: skip - -extension ObservableType { - - /** - Bypasses a specified number of elements in an observable sequence and then returns the remaining elements. - - - seealso: [skip operator on reactivex.io](http://reactivex.io/documentation/operators/skip.html) - - - 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) - -> Observable { - return SkipCount(source: asObservable(), count: count) - } -} - -// MARK: SkipWhile - -extension ObservableType { - - /** - Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. - - - seealso: [skipWhile operator on reactivex.io](http://reactivex.io/documentation/operators/skipwhile.html) - - - parameter predicate: A function to test each element for a condition. - - returns: An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func skipWhile(_ predicate: @escaping (E) throws -> Bool) -> Observable { - return SkipWhile(source: asObservable(), predicate: predicate) - } - - /** - Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. - The element's index is used in the logic of the predicate function. - - - seealso: [skipWhile operator on reactivex.io](http://reactivex.io/documentation/operators/skipwhile.html) - - - parameter predicate: A function to test each element for a condition; the second parameter of the function represents the index of the source element. - - returns: An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func skipWhileWithIndex(_ predicate: @escaping (E, Int) throws -> Bool) -> Observable { - return SkipWhile(source: asObservable(), predicate: predicate) - } -} - -// MARK: map aka select - -extension ObservableType { - - /** - Projects each element of an observable sequence into a new form. - - - seealso: [map operator on reactivex.io](http://reactivex.io/documentation/operators/map.html) - - - 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(_ selector: @escaping (E) throws -> R) - -> Observable { - return self.asObservable().composeMap(selector) - } - - /** - Projects each element of an observable sequence into a new form by incorporating the element's index. - - - seealso: [map operator on reactivex.io](http://reactivex.io/documentation/operators/map.html) - - - parameter selector: A transform function to apply to each source element; the second parameter of the function represents the index of the 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 mapWithIndex(_ selector: @escaping (E, Int) throws -> R) - -> Observable { - return MapWithIndex(source: asObservable(), selector: selector) - } -} - -// MARK: flatMap - -extension ObservableType { - - /** - Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. - - - seealso: [flatMap operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) - - - 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(_ selector: @escaping (E) throws -> O) - -> Observable { - return FlatMap(source: asObservable(), selector: selector) - } - - /** - Projects each element of an observable sequence to an observable sequence by incorporating the element's index and merges the resulting observable sequences into one observable sequence. - - - seealso: [flatMap operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) - - - parameter selector: A transform function to apply to each element; the second parameter of the function represents the index of the source 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 flatMapWithIndex(_ selector: @escaping (E, Int) throws -> O) - -> Observable { - return FlatMapWithIndex(source: asObservable(), selector: selector) - } -} - -// MARK: flatMapFirst - -extension ObservableType { - - /** - Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. - If element is received while there is some projected observable sequence being merged it will simply be ignored. - - - seealso: [flatMapFirst operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) - - - 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(_ selector: @escaping (E) throws -> O) - -> Observable { - return FlatMapFirst(source: asObservable(), selector: selector) - } -} - -// MARK: flatMapLatest - -extension ObservableType { - /** - Projects each element of an observable sequence into a new sequence of observable sequences and then - transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. - - It is a combination of `map` + `switchLatest` operator - - - seealso: [flatMapLatest operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) - - - parameter selector: A transform function to apply to each element. - - 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(_ selector: @escaping (E) throws -> O) - -> Observable { - return FlatMapLatest(source: asObservable(), selector: selector) - } -} - -// MARK: elementAt - -extension ObservableType { - - /** - Returns a sequence emitting only item _n_ emitted by an Observable - - - seealso: [elementAt operator on reactivex.io](http://reactivex.io/documentation/operators/elementat.html) - - - parameter index: The index of the required item (starting from 0). - - returns: An observable sequence that emits the desired item as its own sole emission. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func elementAt(_ index: Int) - -> Observable { - return ElementAt(source: asObservable(), index: index, throwOnEmpty: true) - } -} - -// MARK: single - -extension ObservableType { - - /** - The single operator is similar to first, but throws a `RxError.NoElements` or `RxError.MoreThanOneElement` - if the source Observable does not emit exactly one item before successfully completing. - - - seealso: [single operator on reactivex.io](http://reactivex.io/documentation/operators/first.html) - - - returns: An observable sequence that emits a single item or throws an exception if more (or none) of them are emitted. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func single() - -> Observable { - return SingleAsync(source: asObservable()) - } - - /** - The single operator is similar to first, but throws a `RxError.NoElements` or `RxError.MoreThanOneElement` - if the source Observable does not emit exactly one item before successfully completing. - - - seealso: [single operator on reactivex.io](http://reactivex.io/documentation/operators/first.html) - - - parameter predicate: A function to test each source element for a condition. - - returns: An observable sequence that emits a single item or throws an exception if more (or none) of them are emitted. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func single(_ predicate: @escaping (E) throws -> Bool) - -> Observable { - return SingleAsync(source: asObservable(), predicate: predicate) - } - -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Observable+Time.swift b/Example/Pods/RxSwift/RxSwift/Observables/Observable+Time.swift deleted file mode 100644 index e975ead..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Observable+Time.swift +++ /dev/null @@ -1,293 +0,0 @@ -// -// Observable+Time.swift -// Rx -// -// Created by Krunoslav Zaher on 3/22/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -// MARK: throttle -extension ObservableType { - - /** - Returns an Observable that emits the first and the latest item emitted by the source Observable during sequential time windows of a specified duration. - - This operator makes sure that no two elements are emitted in less then dueTime. - - - seealso: [debounce operator on reactivex.io](http://reactivex.io/documentation/operators/debounce.html) - - - parameter dueTime: Throttling duration for each element. - - parameter latest: Should latest element received in a dueTime wide time window since last element emission be emitted. - - parameter scheduler: Scheduler to run the throttle timers and send events on. - - returns: The throttled sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func throttle(_ dueTime: RxTimeInterval, latest: Bool = true, scheduler: SchedulerType) - -> Observable { - return Throttle(source: self.asObservable(), dueTime: dueTime, latest: latest, scheduler: scheduler) - } - - /** - Ignores elements from an observable sequence which are followed by another element within a specified relative time duration, using the specified scheduler to run throttling timers. - - - seealso: [debounce operator on reactivex.io](http://reactivex.io/documentation/operators/debounce.html) - - - parameter dueTime: Throttling duration for each element. - - parameter scheduler: Scheduler to run the throttle timers and send events on. - - returns: The throttled sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func debounce(_ dueTime: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return Debounce(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) - } -} - -// MARK: sample - -extension ObservableType { - - /** - Samples the source observable sequence using a sampler observable sequence producing sampling ticks. - - Upon each sampling tick, the latest element (if any) in the source sequence during the last sampling interval is sent to the resulting sequence. - - **In case there were no new elements between sampler ticks, no element is sent to the resulting sequence.** - - - seealso: [sample operator on reactivex.io](http://reactivex.io/documentation/operators/sample.html) - - - parameter sampler: Sampling tick sequence. - - returns: Sampled observable sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func sample(_ sampler: O) - -> Observable { - return Sample(source: self.asObservable(), sampler: sampler.asObservable(), onlyNew: true) - } -} - -extension Observable where Element : SignedInteger { - /** - Returns an observable sequence that produces a value after each period, using the specified scheduler to run timers and to send out observer messages. - - - seealso: [interval operator on reactivex.io](http://reactivex.io/documentation/operators/interval.html) - - - parameter period: Period for producing the values in the resulting sequence. - - parameter scheduler: Scheduler to run the timer on. - - 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, scheduler: SchedulerType) - -> Observable { - return Timer(dueTime: period, - period: period, - scheduler: scheduler - ) - } -} - -// MARK: timer - -extension Observable where Element: SignedInteger { - /** - 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. - - - seealso: [timer operator on reactivex.io](http://reactivex.io/documentation/operators/timer.html) - - - parameter dueTime: Relative time at which to produce the first value. - - parameter period: Period to produce subsequent values. - - parameter scheduler: Scheduler to run timers on. - - 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? = nil, scheduler: SchedulerType) - -> Observable { - return Timer( - dueTime: dueTime, - period: period, - scheduler: scheduler - ) - } -} - -// MARK: take - -extension ObservableType { - - /** - Takes elements for the specified duration from the start of the observable source sequence, using the specified scheduler to run timers. - - - seealso: [take operator on reactivex.io](http://reactivex.io/documentation/operators/take.html) - - - parameter duration: Duration for taking elements from the start of the sequence. - - parameter scheduler: Scheduler to run the timer on. - - returns: An observable sequence with the elements taken during the specified duration from the start of the source sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func take(_ duration: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return TakeTime(source: self.asObservable(), duration: duration, scheduler: scheduler) - } -} - -// MARK: skip - -extension ObservableType { - - /** - Skips elements for the specified duration from the start of the observable source sequence, using the specified scheduler to run timers. - - - seealso: [skip operator on reactivex.io](http://reactivex.io/documentation/operators/skip.html) - - - parameter duration: Duration for skipping elements from the start of the sequence. - - parameter scheduler: Scheduler to run the timer on. - - returns: An observable sequence with the elements skipped during the specified duration from the start of the source sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func skip(_ duration: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return SkipTime(source: self.asObservable(), duration: duration, scheduler: scheduler) - } -} - -// MARK: ignoreElements - -extension ObservableType { - - /** - Skips elements and completes (or errors) when the receiver completes (or errors). Equivalent to filter that always returns false. - - - seealso: [ignoreElements operator on reactivex.io](http://reactivex.io/documentation/operators/ignoreelements.html) - - - returns: An observable sequence that skips all elements of the source sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func ignoreElements() - -> Observable { - return filter { _ -> Bool in - return false - } - } -} - -// MARK: delaySubscription - -extension ObservableType { - - /** - Time shifts the observable sequence by delaying the subscription with the specified relative time duration, using the specified scheduler to run timers. - - - seealso: [delay operator on reactivex.io](http://reactivex.io/documentation/operators/delay.html) - - - parameter dueTime: Relative time shift of the subscription. - - parameter scheduler: Scheduler to run the subscription delay timer on. - - returns: Time-shifted sequence. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func delaySubscription(_ dueTime: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return DelaySubscription(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) - } -} - -// MARK: buffer - -extension ObservableType { - - /** - Projects each element of an observable sequence into a buffer that's sent out when either it's full or a given amount of time has elapsed, using the specified scheduler to run timers. - - A useful real-world analogy of this overload is the behavior of a ferry leaving the dock when all seats are taken, or at the scheduled time of departure, whichever event occurs first. - - - seealso: [buffer operator on reactivex.io](http://reactivex.io/documentation/operators/buffer.html) - - - parameter timeSpan: Maximum time length of a buffer. - - parameter count: Maximum element count of a buffer. - - parameter scheduler: Scheduler to run buffering timers on. - - returns: An observable sequence of buffers. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func buffer(timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) - -> Observable<[E]> { - return BufferTimeCount(source: self.asObservable(), timeSpan: timeSpan, count: count, scheduler: scheduler) - } -} - -// MARK: window - -extension ObservableType { - - /** - Projects each element of an observable sequence into a window that is completed when either it’s full or a given amount of time has elapsed. - - - seealso: [window operator on reactivex.io](http://reactivex.io/documentation/operators/window.html) - - - parameter timeSpan: Maximum time length of a window. - - parameter count: Maximum element count of a window. - - parameter scheduler: Scheduler to run windowing timers on. - - returns: An observable sequence of windows (instances of `Observable`). - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func window(timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) - -> Observable> { - return WindowTimeCount(source: self.asObservable(), timeSpan: timeSpan, count: count, scheduler: scheduler) - } -} - -// MARK: timeout - -extension ObservableType { - - /** - Applies a timeout policy for each element in the observable sequence. If the next element isn't received within the specified timeout duration starting from its predecessor, a TimeoutError is propagated to the observer. - - - seealso: [timeout operator on reactivex.io](http://reactivex.io/documentation/operators/timeout.html) - - - parameter dueTime: Maximum duration between values before a timeout occurs. - - parameter scheduler: Scheduler to run the timeout timer on. - - returns: An observable sequence with a TimeoutError in case of a timeout. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func timeout(_ dueTime: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return Timeout(source: self.asObservable(), dueTime: dueTime, other: Observable.error(RxError.timeout), scheduler: scheduler) - } - - /** - Applies a timeout policy for each element in the observable sequence, using the specified scheduler to run timeout timers. If the next element isn't received within the specified timeout duration starting from its predecessor, the other observable sequence is used to produce future messages from that point on. - - - seealso: [timeout operator on reactivex.io](http://reactivex.io/documentation/operators/timeout.html) - - - parameter dueTime: Maximum duration between values before a timeout occurs. - - parameter other: Sequence to return in case of a timeout. - - parameter scheduler: Scheduler to run the timeout timer on. - - returns: The source sequence switching to the other sequence in case of a timeout. - */ - // @warn_unused_result(message:"http://git.io/rxs.uo") - public func timeout(_ dueTime: RxTimeInterval, other: O, scheduler: SchedulerType) - -> Observable where E == O.E { - return Timeout(source: self.asObservable(), dueTime: dueTime, other: other.asObservable(), scheduler: scheduler) - } -} - -// MARK: delay - -extension ObservableType { - - /** - Returns an observable sequence by the source observable sequence shifted forward in time by a specified delay. Error events from the source observable sequence are not delayed. - - - seealso: [delay operator on reactivex.io](http://reactivex.io/documentation/operators/delay.html) - - - parameter dueTime: Relative time shift of the source by. - - parameter scheduler: Scheduler to run the subscription delay timer on. - - returns: the source Observable shifted in time by the specified delay. - */ - // @warn_unused_result(message="http://git.io/rxs.uo") - public func delay(_ dueTime: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return Delay(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift b/Example/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift new file mode 100644 index 0000000..82147a0 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift @@ -0,0 +1,231 @@ +// +// ObserveOn.swift +// RxSwift +// +// Created by Krunoslav Zaher on 7/25/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType { + + /** + Wraps the source sequence in order to run its observer callbacks on the specified scheduler. + + This only invokes observer callbacks on a `scheduler`. In case the subscription and/or unsubscription + actions have side-effects that require to be run on a scheduler, use `subscribeOn`. + + - seealso: [observeOn operator on reactivex.io](http://reactivex.io/documentation/operators/observeon.html) + + - parameter scheduler: Scheduler to notify observers on. + - returns: The source sequence whose observations happen on the specified scheduler. + */ + public func observeOn(_ scheduler: ImmediateSchedulerType) + -> Observable { + if let scheduler = scheduler as? SerialDispatchQueueScheduler { + return ObserveOnSerialDispatchQueue(source: self.asObservable(), scheduler: scheduler) + } + else { + return ObserveOn(source: self.asObservable(), scheduler: scheduler) + } + } +} + +final fileprivate class ObserveOn : Producer { + let scheduler: ImmediateSchedulerType + let source: Observable + + init(source: Observable, scheduler: ImmediateSchedulerType) { + self.scheduler = scheduler + self.source = source + +#if TRACE_RESOURCES + let _ = Resources.incrementTotal() +#endif + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + let sink = ObserveOnSink(scheduler: scheduler, observer: observer, cancel: cancel) + let subscription = source.subscribe(sink) + return (sink: sink, subscription: subscription) + } + +#if TRACE_RESOURCES + deinit { + let _ = Resources.decrementTotal() + } +#endif +} + +enum ObserveOnState : Int32 { + // pump is not running + case stopped = 0 + // pump is running + case running = 1 +} + +final fileprivate class ObserveOnSink : ObserverBase { + typealias E = O.E + + let _scheduler: ImmediateSchedulerType + + var _lock = SpinLock() + let _observer: O + + // state + var _state = ObserveOnState.stopped + var _queue = Queue>(capacity: 10) + + let _scheduleDisposable = SerialDisposable() + let _cancel: Cancelable + + init(scheduler: ImmediateSchedulerType, observer: O, cancel: Cancelable) { + _scheduler = scheduler + _observer = observer + _cancel = cancel + } + + override func onCore(_ event: Event) { + let shouldStart = _lock.calculateLocked { () -> Bool in + self._queue.enqueue(event) + + switch self._state { + case .stopped: + self._state = .running + return true + case .running: + return false + } + } + + if shouldStart { + _scheduleDisposable.disposable = self._scheduler.scheduleRecursive((), action: self.run) + } + } + + func run(_ state: (), _ recurse: (()) -> ()) { + let (nextEvent, observer) = self._lock.calculateLocked { () -> (Event?, O) in + if !self._queue.isEmpty { + return (self._queue.dequeue(), self._observer) + } + else { + self._state = .stopped + return (nil, self._observer) + } + } + + if let nextEvent = nextEvent, !_cancel.isDisposed { + observer.on(nextEvent) + if nextEvent.isStopEvent { + dispose() + } + } + else { + return + } + + let shouldContinue = _shouldContinue_synchronized() + + if shouldContinue { + recurse(()) + } + } + + func _shouldContinue_synchronized() -> Bool { + _lock.lock(); defer { _lock.unlock() } // { + if !self._queue.isEmpty { + return true + } + else { + self._state = .stopped + return false + } + // } + } + + override func dispose() { + super.dispose() + + _cancel.dispose() + _scheduleDisposable.dispose() + } +} + +#if TRACE_RESOURCES + fileprivate var _numberOfSerialDispatchQueueObservables = AtomicInt(0) + extension Resources { + /** + Counts number of `SerialDispatchQueueObservables`. + + Purposed for unit tests. + */ + public static var numberOfSerialDispatchQueueObservables: Int32 { + return _numberOfSerialDispatchQueueObservables.load() + } + } +#endif + +final fileprivate class ObserveOnSerialDispatchQueueSink : ObserverBase { + let scheduler: SerialDispatchQueueScheduler + let observer: O + + let cancel: Cancelable + + var cachedScheduleLambda: (((sink: ObserveOnSerialDispatchQueueSink, event: Event)) -> Disposable)! + + init(scheduler: SerialDispatchQueueScheduler, observer: O, cancel: Cancelable) { + self.scheduler = scheduler + self.observer = observer + self.cancel = cancel + super.init() + + cachedScheduleLambda = { pair in + guard !cancel.isDisposed else { return Disposables.create() } + + pair.sink.observer.on(pair.event) + + if pair.event.isStopEvent { + pair.sink.dispose() + } + + return Disposables.create() + } + } + + override func onCore(_ event: Event) { + let _ = self.scheduler.schedule((self, event), action: cachedScheduleLambda!) + } + + override func dispose() { + super.dispose() + + cancel.dispose() + } +} + +final fileprivate class ObserveOnSerialDispatchQueue : Producer { + let scheduler: SerialDispatchQueueScheduler + let source: Observable + + init(source: Observable, scheduler: SerialDispatchQueueScheduler) { + self.scheduler = scheduler + self.source = source + + #if TRACE_RESOURCES + let _ = Resources.incrementTotal() + let _ = _numberOfSerialDispatchQueueObservables.increment() + #endif + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + let sink = ObserveOnSerialDispatchQueueSink(scheduler: scheduler, observer: observer, cancel: cancel) + let subscription = source.subscribe(sink) + return (sink: sink, subscription: subscription) + } + + #if TRACE_RESOURCES + deinit { + let _ = Resources.decrementTotal() + let _ = _numberOfSerialDispatchQueueObservables.decrement() + } + #endif +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Optional.swift b/Example/Pods/RxSwift/RxSwift/Observables/Optional.swift new file mode 100644 index 0000000..8cd6a16 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/Optional.swift @@ -0,0 +1,95 @@ +// +// Optional.swift +// RxSwift +// +// Created by tarunon on 2016/12/13. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType { + /** + Converts a optional to an observable sequence. + + - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) + + - parameter optional: Optional element in the resulting observable sequence. + - returns: An observable sequence containing the wrapped value or not from given optional. + */ + public static func from(optional: E?) -> Observable { + return ObservableOptional(optional: optional) + } + + /** + Converts a optional to an observable sequence. + + - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) + + - parameter optional: Optional element in the resulting observable sequence. + - parameter scheduler: Scheduler to send the optional element on. + - returns: An observable sequence containing the wrapped value or not from given optional. + */ + public static func from(optional: E?, scheduler: ImmediateSchedulerType) -> Observable { + return ObservableOptionalScheduled(optional: optional, scheduler: scheduler) + } +} + +final fileprivate class ObservableOptionalScheduledSink : Sink { + typealias E = O.E + typealias Parent = ObservableOptionalScheduled + + private let _parent: Parent + + init(parent: Parent, observer: O, cancel: Cancelable) { + _parent = parent + super.init(observer: observer, cancel: cancel) + } + + func run() -> Disposable { + return _parent._scheduler.schedule(_parent._optional) { (optional: E?) -> Disposable in + if let next = optional { + self.forwardOn(.next(next)) + return self._parent._scheduler.schedule(()) { _ in + self.forwardOn(.completed) + self.dispose() + return Disposables.create() + } + } else { + self.forwardOn(.completed) + self.dispose() + return Disposables.create() + } + } + } +} + +final fileprivate class ObservableOptionalScheduled : Producer { + fileprivate let _optional: E? + fileprivate let _scheduler: ImmediateSchedulerType + + init(optional: E?, scheduler: ImmediateSchedulerType) { + _optional = optional + _scheduler = scheduler + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + let sink = ObservableOptionalScheduledSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) + } +} + +final fileprivate class ObservableOptional: Producer { + private let _optional: E? + + init(optional: E?) { + _optional = optional + } + + override func subscribe(_ observer: O) -> Disposable where O.E == E { + if let element = _optional { + observer.on(.next(element)) + } + observer.on(.completed) + return Disposables.create() + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Producer.swift b/Example/Pods/RxSwift/RxSwift/Observables/Producer.swift similarity index 71% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Producer.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Producer.swift index 3dd7e6c..2b60fbf 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Producer.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Producer.swift @@ -1,13 +1,11 @@ // // Producer.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/20/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - class Producer : Observable { override init() { super.init() @@ -34,40 +32,34 @@ class Producer : Observable { } func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - abstractMethod() + rxAbstractMethod() } } -fileprivate class SinkDisposer: Cancelable { - fileprivate enum DisposeState: UInt32 { +fileprivate final class SinkDisposer: Cancelable { + fileprivate enum DisposeState: Int32 { case disposed = 1 case sinkAndSubscriptionSet = 2 } - // Jeej, swift API consistency rules - fileprivate enum DisposeStateInt32: Int32 { - case disposed = 1 - case sinkAndSubscriptionSet = 2 - } - - private var _state: UInt32 = 0 + private var _state = AtomicInt(0) private var _sink: Disposable? = nil private var _subscription: Disposable? = nil var isDisposed: Bool { - return (_state & DisposeState.disposed.rawValue) != 0 + return _state.isFlagSet(DisposeState.disposed.rawValue) } func setSinkAndSubscription(sink: Disposable, subscription: Disposable) { _sink = sink _subscription = subscription - let previousState = OSAtomicOr32OrigBarrier(DisposeState.sinkAndSubscriptionSet.rawValue, &_state) - if (previousState & DisposeStateInt32.sinkAndSubscriptionSet.rawValue) != 0 { + let previousState = _state.fetchOr(DisposeState.sinkAndSubscriptionSet.rawValue) + if (previousState & DisposeState.sinkAndSubscriptionSet.rawValue) != 0 { rxFatalError("Sink and subscription were already set") } - if (previousState & DisposeStateInt32.disposed.rawValue) != 0 { + if (previousState & DisposeState.disposed.rawValue) != 0 { sink.dispose() subscription.dispose() _sink = nil @@ -76,12 +68,13 @@ fileprivate class SinkDisposer: Cancelable { } func dispose() { - let previousState = OSAtomicOr32OrigBarrier(DisposeState.disposed.rawValue, &_state) - if (previousState & DisposeStateInt32.disposed.rawValue) != 0 { + let previousState = _state.fetchOr(DisposeState.disposed.rawValue) + + if (previousState & DisposeState.disposed.rawValue) != 0 { return } - if (previousState & DisposeStateInt32.sinkAndSubscriptionSet.rawValue) != 0 { + if (previousState & DisposeState.sinkAndSubscriptionSet.rawValue) != 0 { guard let sink = _sink else { rxFatalError("Sink not set") } diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Range.swift b/Example/Pods/RxSwift/RxSwift/Observables/Range.swift similarity index 59% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Range.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Range.swift index dbdb50e..9b85554 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Range.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Range.swift @@ -1,14 +1,28 @@ // // Range.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 9/13/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType where E : RxAbstractInteger { + /** + Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to generate and send out observer messages. -class RangeProducer : Producer { + - seealso: [range operator on reactivex.io](http://reactivex.io/documentation/operators/range.html) + + - parameter start: The value of the first integer in the sequence. + - parameter count: The number of sequential integers to generate. + - parameter scheduler: Scheduler to run the generator loop on. + - returns: An observable sequence that contains a range of sequential integral numbers. + */ + public static func range(start: E, count: E, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { + return RangeProducer(start: start, count: count, scheduler: scheduler) + } +} + +final fileprivate class RangeProducer : Producer { fileprivate let _start: E fileprivate let _count: E fileprivate let _scheduler: ImmediateSchedulerType @@ -34,7 +48,7 @@ class RangeProducer : Producer { } } -class RangeSink : Sink where O.E: SignedInteger { +final fileprivate class RangeSink : Sink where O.E: RxAbstractInteger { typealias Parent = RangeProducer private let _parent: Parent diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Reduce.swift b/Example/Pods/RxSwift/RxSwift/Observables/Reduce.swift similarity index 50% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Reduce.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Reduce.swift index 2b098d9..3e4a7b9 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Reduce.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Reduce.swift @@ -1,14 +1,48 @@ // // Reduce.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 4/1/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation -class ReduceSink : Sink, ObserverType { +extension ObservableType { + /** + Applies an `accumulator` function over an observable sequence, returning the result of the aggregation as a single element in the result sequence. The specified `seed` value is used as the initial accumulator value. + + For aggregation behavior with incremental intermediate results, see `scan`. + + - seealso: [reduce operator on reactivex.io](http://reactivex.io/documentation/operators/reduce.html) + + - parameter seed: The initial accumulator value. + - parameter accumulator: A accumulator function to be invoked on each element. + - parameter mapResult: A function to transform the final accumulator value into the result value. + - returns: An observable sequence containing a single element with the final accumulator value. + */ + public func reduce(_ seed: A, accumulator: @escaping (A, E) throws -> A, mapResult: @escaping (A) throws -> R) + -> Observable { + return Reduce(source: self.asObservable(), seed: seed, accumulator: accumulator, mapResult: mapResult) + } + + /** + Applies an `accumulator` function over an observable sequence, returning the result of the aggregation as a single element in the result sequence. The specified `seed` value is used as the initial accumulator value. + + For aggregation behavior with incremental intermediate results, see `scan`. + + - seealso: [reduce operator on reactivex.io](http://reactivex.io/documentation/operators/reduce.html) + + - parameter seed: The initial accumulator value. + - parameter accumulator: A accumulator function to be invoked on each element. + - returns: An observable sequence containing a single element with the final accumulator value. + */ + public func reduce(_ seed: A, accumulator: @escaping (A, E) throws -> A) + -> Observable { + return Reduce(source: self.asObservable(), seed: seed, accumulator: accumulator, mapResult: { $0 }) + } +} + +final fileprivate class ReduceSink : Sink, ObserverType { typealias ResultType = O.E typealias Parent = Reduce @@ -50,7 +84,7 @@ class ReduceSink : Sink, Observe } } -class Reduce : Producer { +final fileprivate class Reduce : Producer { typealias AccumulatorType = (AccumulateType, SourceType) throws -> AccumulateType typealias ResultSelectorType = (AccumulateType) throws -> ResultType @@ -72,3 +106,4 @@ class Reduce : Producer { return (sink: sink, subscription: subscription) } } + diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Repeat.swift b/Example/Pods/RxSwift/RxSwift/Observables/Repeat.swift similarity index 56% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Repeat.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Repeat.swift index a5d29d8..6892ec1 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Repeat.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Repeat.swift @@ -1,14 +1,27 @@ // // Repeat.swift -// RxExample +// RxSwift // // Created by Krunoslav Zaher on 9/13/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { + /** + Generates an observable sequence that repeats the given element infinitely, using the specified scheduler to send out observer messages. -class RepeatElement : Producer { + - seealso: [repeat operator on reactivex.io](http://reactivex.io/documentation/operators/repeat.html) + + - parameter element: Element to repeat. + - parameter scheduler: Scheduler to run the producer loop on. + - returns: An observable sequence that repeats the given element infinitely. + */ + public static func repeatElement(_ element: E, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { + return RepeatElement(element: element, scheduler: scheduler) + } +} + +final fileprivate class RepeatElement : Producer { fileprivate let _element: Element fileprivate let _scheduler: ImmediateSchedulerType @@ -25,7 +38,7 @@ class RepeatElement : Producer { } } -class RepeatElementSink : Sink { +final fileprivate class RepeatElementSink : Sink { typealias Parent = RepeatElement private let _parent: Parent diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/RetryWhen.swift b/Example/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift similarity index 57% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/RetryWhen.swift rename to Example/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift index dec9f50..268b399 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/RetryWhen.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift @@ -1,14 +1,43 @@ // // RetryWhen.swift -// Rx +// RxSwift // // Created by Junior B. on 06/10/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { -class RetryTriggerSink + /** + Repeats the source observable sequence on error when the notifier emits a next value. + If the source observable errors and the notifier completes, it will complete the source sequence. + + - seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html) + + - parameter notificationHandler: A handler that is passed an observable sequence of errors raised by the source observable and returns and observable that either continues, completes or errors. This behavior is then applied to the source observable. + - returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully or is notified to error or complete. + */ + public func retryWhen(_ notificationHandler: @escaping (Observable) -> TriggerObservable) + -> Observable { + return RetryWhenSequence(sources: InfiniteSequence(repeatedValue: self.asObservable()), notificationHandler: notificationHandler) + } + + /** + Repeats the source observable sequence on error when the notifier emits a next value. + If the source observable errors and the notifier completes, it will complete the source sequence. + + - seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html) + + - parameter notificationHandler: A handler that is passed an observable sequence of errors raised by the source observable and returns and observable that either continues, completes or errors. This behavior is then applied to the source observable. + - returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully or is notified to error or complete. + */ + public func retryWhen(_ notificationHandler: @escaping (Observable) -> TriggerObservable) + -> Observable { + return RetryWhenSequence(sources: InfiniteSequence(repeatedValue: self.asObservable()), notificationHandler: notificationHandler) + } +} + +final fileprivate class RetryTriggerSink : ObserverType where S.Iterator.Element : ObservableType, S.Iterator.Element.E == O.E { typealias E = TriggerObservable.E @@ -35,17 +64,19 @@ class RetryTriggerSink - : SingleAssignmentDisposable - , ObserverType where S.Iterator.Element : ObservableType, S.Iterator.Element.E == O.E { +final fileprivate class RetryWhenSequenceSinkIter + : ObserverType + , Disposable where S.Iterator.Element : ObservableType, S.Iterator.Element.E == O.E { typealias E = O.E typealias Parent = RetryWhenSequenceSink fileprivate let _parent: Parent fileprivate let _errorHandlerSubscription = SingleAssignmentDisposable() + fileprivate let _subscription: Disposable - init(parent: Parent) { + init(parent: Parent, subscription: Disposable) { _parent = parent + _subscription = subscription } func on(_ event: Event) { @@ -57,7 +88,7 @@ class RetryWhenSequenceSinkIter +final fileprivate class RetryWhenSequenceSink : TailRecursiveSink where S.Iterator.Element : ObservableType, S.Iterator.Element.E == O.E { typealias Element = O.E typealias Parent = RetryWhenSequence - let _lock = NSRecursiveLock() + let _lock = RecursiveLock() fileprivate let _parent: Parent @@ -119,8 +150,9 @@ class RetryWhenSequenceSink) -> Disposable { - let iter = RetryWhenSequenceSinkIter(parent: self) - iter.setDisposable(source.subscribe(iter)) + let subscription = SingleAssignmentDisposable() + let iter = RetryWhenSequenceSinkIter(parent: self, subscription: subscription) + subscription.setDisposable(source.subscribe(iter)) return iter } @@ -131,7 +163,7 @@ class RetryWhenSequenceSink : Producer where S.Iterator.Element : ObservableType { +final fileprivate class RetryWhenSequence : Producer where S.Iterator.Element : ObservableType { typealias Element = S.Iterator.Element.E fileprivate let _sources: S diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Sample.swift b/Example/Pods/RxSwift/RxSwift/Observables/Sample.swift similarity index 72% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Sample.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Sample.swift index 7190bfb..31f8b62 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Sample.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Sample.swift @@ -6,19 +6,37 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { -class SamplerSink + /** + Samples the source observable sequence using a sampler observable sequence producing sampling ticks. + + Upon each sampling tick, the latest element (if any) in the source sequence during the last sampling interval is sent to the resulting sequence. + + **In case there were no new elements between sampler ticks, no element is sent to the resulting sequence.** + + - seealso: [sample operator on reactivex.io](http://reactivex.io/documentation/operators/sample.html) + + - parameter sampler: Sampling tick sequence. + - returns: Sampled observable sequence. + */ + public func sample(_ sampler: O) + -> Observable { + return Sample(source: self.asObservable(), sampler: sampler.asObservable()) + } +} + +final fileprivate class SamplerSink : ObserverType , LockOwnerType - , SynchronizedOnType where O.E == ElementType { + , SynchronizedOnType { typealias E = SampleType typealias Parent = SampleSequenceSink fileprivate let _parent: Parent - var _lock: NSRecursiveLock { + var _lock: RecursiveLock { return _parent._lock } @@ -34,10 +52,7 @@ class SamplerSink switch event { case .next: if let element = _parent._element { - if _parent._parent._onlyNew { - _parent._element = nil - } - + _parent._element = nil _parent.forwardOn(.next(element)) } @@ -61,7 +76,7 @@ class SamplerSink } } -class SampleSequenceSink +final fileprivate class SampleSequenceSink : Sink , ObserverType , LockOwnerType @@ -71,7 +86,7 @@ class SampleSequenceSink fileprivate let _parent: Parent - let _lock = NSRecursiveLock() + let _lock = RecursiveLock() // state fileprivate var _element = nil as Element? @@ -110,15 +125,13 @@ class SampleSequenceSink } -class Sample : Producer { +final fileprivate class Sample : Producer { fileprivate let _source: Observable fileprivate let _sampler: Observable - fileprivate let _onlyNew: Bool - init(source: Observable, sampler: Observable, onlyNew: Bool) { + init(source: Observable, sampler: Observable) { _source = source _sampler = sampler - _onlyNew = onlyNew } override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Scan.swift b/Example/Pods/RxSwift/RxSwift/Observables/Scan.swift new file mode 100644 index 0000000..39d5e92 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/Scan.swift @@ -0,0 +1,101 @@ +// +// Scan.swift +// RxSwift +// +// Created by Krunoslav Zaher on 6/14/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType { + + /** + Applies an accumulator function over an observable sequence and returns each intermediate result. The specified seed value is used as the initial accumulator value. + + For aggregation behavior with no intermediate results, see `reduce`. + + - seealso: [scan operator on reactivex.io](http://reactivex.io/documentation/operators/scan.html) + + - parameter seed: The initial accumulator value. + - parameter accumulator: An accumulator function to be invoked on each element. + - returns: An observable sequence containing the accumulated values. + */ + public func scan(into seed: A, accumulator: @escaping (inout A, E) throws -> ()) + -> Observable { + return Scan(source: self.asObservable(), seed: seed, accumulator: accumulator) + } + + /** + Applies an accumulator function over an observable sequence and returns each intermediate result. The specified seed value is used as the initial accumulator value. + + For aggregation behavior with no intermediate results, see `reduce`. + + - seealso: [scan operator on reactivex.io](http://reactivex.io/documentation/operators/scan.html) + + - parameter seed: The initial accumulator value. + - parameter accumulator: An accumulator function to be invoked on each element. + - returns: An observable sequence containing the accumulated values. + */ + public func scan(_ seed: A, accumulator: @escaping (A, E) throws -> A) + -> Observable { + return Scan(source: self.asObservable(), seed: seed) { acc, element in + let currentAcc = acc + acc = try accumulator(currentAcc, element) + } + } +} + +final fileprivate class ScanSink : Sink, ObserverType { + typealias Accumulate = O.E + typealias Parent = Scan + typealias E = ElementType + + fileprivate let _parent: Parent + fileprivate var _accumulate: Accumulate + + init(parent: Parent, observer: O, cancel: Cancelable) { + _parent = parent + _accumulate = parent._seed + super.init(observer: observer, cancel: cancel) + } + + func on(_ event: Event) { + switch event { + case .next(let element): + do { + try _parent._accumulator(&_accumulate, element) + forwardOn(.next(_accumulate)) + } + catch let error { + forwardOn(.error(error)) + dispose() + } + case .error(let error): + forwardOn(.error(error)) + dispose() + case .completed: + forwardOn(.completed) + dispose() + } + } + +} + +final fileprivate class Scan: Producer { + typealias Accumulator = (inout Accumulate, Element) throws -> () + + fileprivate let _source: Observable + fileprivate let _seed: Accumulate + fileprivate let _accumulator: Accumulator + + init(source: Observable, seed: Accumulate, accumulator: @escaping Accumulator) { + _source = source + _seed = seed + _accumulator = accumulator + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Accumulate { + let sink = ScanSink(parent: self, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Sequence.swift b/Example/Pods/RxSwift/RxSwift/Observables/Sequence.swift new file mode 100644 index 0000000..e141bc7 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/Sequence.swift @@ -0,0 +1,89 @@ +// +// Sequence.swift +// RxSwift +// +// Created by Krunoslav Zaher on 11/14/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType { + // MARK: of + + /** + This method creates a new Observable instance with a variable number of elements. + + - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) + + - parameter elements: Elements to generate. + - parameter scheduler: Scheduler to send elements on. If `nil`, elements are sent immediately on subscription. + - returns: The observable sequence whose elements are pulled from the given arguments. + */ + public static func of(_ elements: E ..., scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { + return ObservableSequence(elements: elements, scheduler: scheduler) + } +} + +extension ObservableType { + /** + Converts an array to an observable sequence. + + - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) + + - returns: The observable sequence whose elements are pulled from the given enumerable sequence. + */ + public static func from(_ array: [E], scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { + return ObservableSequence(elements: array, scheduler: scheduler) + } + + /** + Converts a sequence to an observable sequence. + + - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) + + - returns: The observable sequence whose elements are pulled from the given enumerable sequence. + */ + public static func from(_ sequence: S, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable where S.Iterator.Element == E { + return ObservableSequence(elements: sequence, scheduler: scheduler) + } +} + +final fileprivate class ObservableSequenceSink : Sink where S.Iterator.Element == O.E { + typealias Parent = ObservableSequence + + private let _parent: Parent + + init(parent: Parent, observer: O, cancel: Cancelable) { + _parent = parent + super.init(observer: observer, cancel: cancel) + } + + func run() -> Disposable { + return _parent._scheduler.scheduleRecursive((_parent._elements.makeIterator(), _parent._elements)) { (iterator, recurse) in + var mutableIterator = iterator + if let next = mutableIterator.0.next() { + self.forwardOn(.next(next)) + recurse(mutableIterator) + } + else { + self.forwardOn(.completed) + self.dispose() + } + } + } +} + +final fileprivate class ObservableSequence : Producer { + fileprivate let _elements: S + fileprivate let _scheduler: ImmediateSchedulerType + + init(elements: S, scheduler: ImmediateSchedulerType) { + _elements = elements + _scheduler = scheduler + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + let sink = ObservableSequenceSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift b/Example/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift new file mode 100644 index 0000000..5af102f --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift @@ -0,0 +1,458 @@ +// +// ShareReplayScope.swift +// RxSwift +// +// Created by Krunoslav Zaher on 5/28/17. +// Copyright © 2017 Krunoslav Zaher. All rights reserved. +// + +/// Subject lifetime scope +public enum SubjectLifetimeScope { + /** + **Each connection will have it's own subject instance to store replay events.** + **Connections will be isolated from each another.** + + Configures the underlying implementation to behave equivalent to. + + ``` + source.multicast(makeSubject: { MySubject() }).refCount() + ``` + + **This is the recommended default.** + + This has the following consequences: + * `retry` or `concat` operators will function as expected because terminating the sequence will clear internal state. + * Each connection to source observable sequence will use it's own subject. + * When the number of subscribers drops from 1 to 0 and connection to source sequence is disposed, subject will be cleared. + + + ``` + let xs = Observable.deferred { () -> Observable in + print("Performing work ...") + return Observable.just(Date().timeIntervalSince1970) + } + .share(replay: 1, scope: .whileConnected) + + _ = xs.subscribe(onNext: { print("next \($0)") }, onCompleted: { print("completed\n") }) + _ = xs.subscribe(onNext: { print("next \($0)") }, onCompleted: { print("completed\n") }) + _ = xs.subscribe(onNext: { print("next \($0)") }, onCompleted: { print("completed\n") }) + + ``` + + Notice how time interval is different and `Performing work ...` is printed each time) + + ``` + Performing work ... + next 1495998900.82141 + completed + + Performing work ... + next 1495998900.82359 + completed + + Performing work ... + next 1495998900.82444 + completed + + + ``` + + */ + case whileConnected + + /** + **One subject will store replay events for all connections to source.** + **Connections won't be isolated from each another.** + + Configures the underlying implementation behave equivalent to. + + ``` + source.multicast(MySubject()).refCount() + ``` + + This has the following consequences: + * Using `retry` or `concat` operators after this operator usually isn't advised. + * Each connection to source observable sequence will share the same subject. + * After number of subscribers drops from 1 to 0 and connection to source observable sequence is dispose, this operator will + continue holding a reference to the same subject. + If at some later moment a new observer initiates a new connection to source it can potentially receive + some of the stale events received during previous connection. + * After source sequence terminates any new observer will always immediately receive replayed elements and terminal event. + No new subscriptions to source observable sequence will be attempted. + + ``` + let xs = Observable.deferred { () -> Observable in + print("Performing work ...") + return Observable.just(Date().timeIntervalSince1970) + } + .share(replay: 1, scope: .forever) + + _ = xs.subscribe(onNext: { print("next \($0)") }, onCompleted: { print("completed\n") }) + _ = xs.subscribe(onNext: { print("next \($0)") }, onCompleted: { print("completed\n") }) + _ = xs.subscribe(onNext: { print("next \($0)") }, onCompleted: { print("completed\n") }) + ``` + + Notice how time interval is the same, replayed, and `Performing work ...` is printed only once + + ``` + Performing work ... + next 1495999013.76356 + completed + + next 1495999013.76356 + completed + + next 1495999013.76356 + completed + ``` + + */ + case forever +} + +extension ObservableType { + + /** + Returns an observable sequence that **shares a single subscription to the underlying sequence**, and immediately upon subscription replays elements in buffer. + + This operator is equivalent to: + * `.whileConnected` + ``` + // Each connection will have it's own subject instance to store replay events. + // Connections will be isolated from each another. + source.multicast(makeSubject: { Replay.create(bufferSize: replay) }).refCount() + ``` + * `.forever` + ``` + // One subject will store replay events for all connections to source. + // Connections won't be isolated from each another. + source.multicast(Replay.create(bufferSize: replay)).refCount() + ``` + + It uses optimized versions of the operators for most common operations. + + - parameter replay: Maximum element count of the replay buffer. + - parameter scope: Lifetime scope of sharing subject. For more information see `SubjectLifetimeScope` enum. + + - seealso: [shareReplay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) + + - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. + */ + public func share(replay: Int = 0, scope: SubjectLifetimeScope = .whileConnected) + -> Observable { + switch scope { + case .forever: + switch replay { + case 0: return self.multicast(PublishSubject()).refCount() + default: return self.multicast(ReplaySubject.create(bufferSize: replay)).refCount() + } + case .whileConnected: + switch replay { + case 0: return ShareWhileConnected(source: self.asObservable()) + case 1: return ShareReplay1WhileConnected(source: self.asObservable()) + default: return self.multicast(makeSubject: { ReplaySubject.create(bufferSize: replay) }).refCount() + } + } + } +} + +fileprivate final class ShareReplay1WhileConnectedConnection + : ObserverType + , SynchronizedUnsubscribeType { + typealias E = Element + typealias Observers = AnyObserver.s + typealias DisposeKey = Observers.KeyType + + typealias Parent = ShareReplay1WhileConnected + private let _parent: Parent + private let _subscription = SingleAssignmentDisposable() + + private let _lock: RecursiveLock + private var _disposed: Bool = false + fileprivate var _observers = Observers() + fileprivate var _element: Element? + + init(parent: Parent, lock: RecursiveLock) { + _parent = parent + _lock = lock + + #if TRACE_RESOURCES + _ = Resources.incrementTotal() + #endif + } + + final func on(_ event: Event) { + _lock.lock() + let observers = _synchronized_on(event) + _lock.unlock() + dispatch(observers, event) + } + + final private func _synchronized_on(_ event: Event) -> Observers { + if _disposed { + return Observers() + } + + switch event { + case .next(let element): + _element = element + return _observers + case .error, .completed: + let observers = _observers + self._synchronized_dispose() + return observers + } + } + + final func connect() { + _subscription.setDisposable(_parent._source.subscribe(self)) + } + + final func _synchronized_subscribe(_ observer: O) -> Disposable where O.E == Element { + _lock.lock(); defer { _lock.unlock() } + if let element = _element { + observer.on(.next(element)) + } + + let disposeKey = _observers.insert(observer.on) + + return SubscriptionDisposable(owner: self, key: disposeKey) + } + + final private func _synchronized_dispose() { + _disposed = true + if _parent._connection === self { + _parent._connection = nil + } + _observers = Observers() + } + + final func synchronizedUnsubscribe(_ disposeKey: DisposeKey) { + _lock.lock() + let shouldDisconnect = _synchronized_unsubscribe(disposeKey) + _lock.unlock() + if shouldDisconnect { + _subscription.dispose() + } + } + + @inline(__always) + final private func _synchronized_unsubscribe(_ disposeKey: DisposeKey) -> Bool { + // if already unsubscribed, just return + if self._observers.removeKey(disposeKey) == nil { + return false + } + + if _observers.count == 0 { + _synchronized_dispose() + return true + } + + return false + } + + #if TRACE_RESOURCES + deinit { + _ = Resources.decrementTotal() + } + #endif +} + +// optimized version of share replay for most common case +final fileprivate class ShareReplay1WhileConnected + : Observable { + + fileprivate typealias Connection = ShareReplay1WhileConnectedConnection + + fileprivate let _source: Observable + + fileprivate let _lock = RecursiveLock() + + fileprivate var _connection: Connection? + + init(source: Observable) { + self._source = source + } + + override func subscribe(_ observer: O) -> Disposable where O.E == E { + _lock.lock() + + let connection = _synchronized_subscribe(observer) + let count = connection._observers.count + + let disposable = connection._synchronized_subscribe(observer) + + _lock.unlock() + + if count == 0 { + connection.connect() + } + + return disposable + } + + @inline(__always) + private func _synchronized_subscribe(_ observer: O) -> Connection where O.E == E { + let connection: Connection + + if let existingConnection = _connection { + connection = existingConnection + } + else { + connection = ShareReplay1WhileConnectedConnection( + parent: self, + lock: _lock) + _connection = connection + } + + return connection + } +} + +fileprivate final class ShareWhileConnectedConnection + : ObserverType + , SynchronizedUnsubscribeType { + typealias E = Element + typealias Observers = AnyObserver.s + typealias DisposeKey = Observers.KeyType + + typealias Parent = ShareWhileConnected + private let _parent: Parent + private let _subscription = SingleAssignmentDisposable() + + private let _lock: RecursiveLock + private var _disposed: Bool = false + fileprivate var _observers = Observers() + + init(parent: Parent, lock: RecursiveLock) { + _parent = parent + _lock = lock + + #if TRACE_RESOURCES + _ = Resources.incrementTotal() + #endif + } + + final func on(_ event: Event) { + _lock.lock() + let observers = _synchronized_on(event) + _lock.unlock() + dispatch(observers, event) + } + + final private func _synchronized_on(_ event: Event) -> Observers { + if _disposed { + return Observers() + } + + switch event { + case .next: + return _observers + case .error, .completed: + let observers = _observers + self._synchronized_dispose() + return observers + } + } + + final func connect() { + _subscription.setDisposable(_parent._source.subscribe(self)) + } + + final func _synchronized_subscribe(_ observer: O) -> Disposable where O.E == Element { + _lock.lock(); defer { _lock.unlock() } + + let disposeKey = _observers.insert(observer.on) + + return SubscriptionDisposable(owner: self, key: disposeKey) + } + + final private func _synchronized_dispose() { + _disposed = true + if _parent._connection === self { + _parent._connection = nil + } + _observers = Observers() + } + + final func synchronizedUnsubscribe(_ disposeKey: DisposeKey) { + _lock.lock() + let shouldDisconnect = _synchronized_unsubscribe(disposeKey) + _lock.unlock() + if shouldDisconnect { + _subscription.dispose() + } + } + + @inline(__always) + final private func _synchronized_unsubscribe(_ disposeKey: DisposeKey) -> Bool { + // if already unsubscribed, just return + if self._observers.removeKey(disposeKey) == nil { + return false + } + + if _observers.count == 0 { + _synchronized_dispose() + return true + } + + return false + } + + #if TRACE_RESOURCES + deinit { + _ = Resources.decrementTotal() + } + #endif +} + +// optimized version of share replay for most common case +final fileprivate class ShareWhileConnected + : Observable { + + fileprivate typealias Connection = ShareWhileConnectedConnection + + fileprivate let _source: Observable + + fileprivate let _lock = RecursiveLock() + + fileprivate var _connection: Connection? + + init(source: Observable) { + self._source = source + } + + override func subscribe(_ observer: O) -> Disposable where O.E == E { + _lock.lock() + + let connection = _synchronized_subscribe(observer) + let count = connection._observers.count + + let disposable = connection._synchronized_subscribe(observer) + + _lock.unlock() + + if count == 0 { + connection.connect() + } + + return disposable + } + + @inline(__always) + private func _synchronized_subscribe(_ observer: O) -> Connection where O.E == E { + let connection: Connection + + if let existingConnection = _connection { + connection = existingConnection + } + else { + connection = ShareWhileConnectedConnection( + parent: self, + lock: _lock) + _connection = connection + } + + return connection + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/SingleAsync.swift b/Example/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift similarity index 52% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/SingleAsync.swift rename to Example/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift index 2e36f67..1419a93 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/SingleAsync.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift @@ -1,14 +1,43 @@ // // SingleAsync.swift -// Rx +// RxSwift // // Created by Junior B. on 09/11/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { -class SingleAsyncSink : Sink, ObserverType where O.E == ElementType { + /** + The single operator is similar to first, but throws a `RxError.noElements` or `RxError.moreThanOneElement` + if the source Observable does not emit exactly one element before successfully completing. + + - seealso: [single operator on reactivex.io](http://reactivex.io/documentation/operators/first.html) + + - returns: An observable sequence that emits a single element or throws an exception if more (or none) of them are emitted. + */ + public func single() + -> Observable { + return SingleAsync(source: asObservable()) + } + + /** + The single operator is similar to first, but throws a `RxError.NoElements` or `RxError.MoreThanOneElement` + if the source Observable does not emit exactly one element before successfully completing. + + - seealso: [single operator on reactivex.io](http://reactivex.io/documentation/operators/first.html) + + - parameter predicate: A function to test each source element for a condition. + - returns: An observable sequence that emits a single element or throws an exception if more (or none) of them are emitted. + */ + public func single(_ predicate: @escaping (E) throws -> Bool) + -> Observable { + return SingleAsync(source: asObservable(), predicate: predicate) + } +} + +fileprivate final class SingleAsyncSink : Sink, ObserverType { + typealias ElementType = O.E typealias Parent = SingleAsync typealias E = ElementType @@ -35,29 +64,29 @@ class SingleAsyncSink : Sink, ObserverType wher return } - if _seenValue == false { - _seenValue = true - forwardOn(.next(value)) - } else { + if _seenValue { forwardOn(.error(RxError.moreThanOneElement)) dispose() + return } - + + _seenValue = true + forwardOn(.next(value)) case .error: forwardOn(event) dispose() case .completed: - if (!_seenValue) { - forwardOn(.error(RxError.noElements)) - } else { + if (_seenValue) { forwardOn(.completed) + } else { + forwardOn(.error(RxError.noElements)) } dispose() } } } -class SingleAsync: Producer { +final class SingleAsync: Producer { typealias Predicate = (Element) throws -> Bool fileprivate let _source: Observable diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Sink.swift b/Example/Pods/RxSwift/RxSwift/Observables/Sink.swift similarity index 68% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Sink.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Sink.swift index 33824af..214cfda 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Sink.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Sink.swift @@ -1,21 +1,23 @@ // // Sink.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/19/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - class Sink : Disposable { fileprivate let _observer: O fileprivate let _cancel: Cancelable fileprivate var _disposed: Bool + #if DEBUG + fileprivate let _synchronizationTracker = SynchronizationTracker() + #endif + init(observer: O, cancel: Cancelable) { #if TRACE_RESOURCES - let _ = AtomicIncrement(&resourceCount) + let _ = Resources.incrementTotal() #endif _observer = observer _cancel = cancel @@ -23,6 +25,10 @@ class Sink : Disposable { } final func forwardOn(_ event: Event) { + #if DEBUG + _synchronizationTracker.register(synchronizationErrorMessage: .default) + defer { _synchronizationTracker.unregister() } + #endif if _disposed { return } @@ -33,6 +39,10 @@ class Sink : Disposable { return SinkForward(forward: self) } + final var disposed: Bool { + return _disposed + } + func dispose() { _disposed = true _cancel.dispose() @@ -40,12 +50,12 @@ class Sink : Disposable { deinit { #if TRACE_RESOURCES - let _ = AtomicDecrement(&resourceCount) + let _ = Resources.decrementTotal() #endif } } -class SinkForward: ObserverType { +final class SinkForward: ObserverType { typealias E = O.E private let _forward: Sink @@ -54,7 +64,7 @@ class SinkForward: ObserverType { _forward = forward } - func on(_ event: Event) { + final func on(_ event: Event) { switch event { case .next: _forward._observer.on(event) diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Skip.swift b/Example/Pods/RxSwift/RxSwift/Observables/Skip.swift similarity index 62% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Skip.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Skip.swift index 95252c4..fcac9d4 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Skip.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Skip.swift @@ -6,13 +6,44 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { + + /** + Bypasses a specified number of elements in an observable sequence and then returns the remaining elements. + + - seealso: [skip operator on reactivex.io](http://reactivex.io/documentation/operators/skip.html) + + - 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. + */ + public func skip(_ count: Int) + -> Observable { + return SkipCount(source: asObservable(), count: count) + } +} + +extension ObservableType { + + /** + Skips elements for the specified duration from the start of the observable source sequence, using the specified scheduler to run timers. + + - seealso: [skip operator on reactivex.io](http://reactivex.io/documentation/operators/skip.html) + + - parameter duration: Duration for skipping elements from the start of the sequence. + - parameter scheduler: Scheduler to run the timer on. + - returns: An observable sequence with the elements skipped during the specified duration from the start of the source sequence. + */ + public func skip(_ duration: RxTimeInterval, scheduler: SchedulerType) + -> Observable { + return SkipTime(source: self.asObservable(), duration: duration, scheduler: scheduler) + } +} // count version -class SkipCountSink : Sink, ObserverType where O.E == ElementType { - typealias Parent = SkipCount - typealias Element = ElementType +final fileprivate class SkipCountSink : Sink, ObserverType { + typealias Element = O.E + typealias Parent = SkipCount let parent: Parent @@ -45,7 +76,7 @@ class SkipCountSink : Sink, ObserverType where } -class SkipCount: Producer { +final fileprivate class SkipCount: Producer { let source: Observable let count: Int @@ -64,7 +95,7 @@ class SkipCount: Producer { // time version -class SkipTimeSink : Sink, ObserverType where O.E == ElementType { +final fileprivate class SkipTimeSink : Sink, ObserverType where O.E == ElementType { typealias Parent = SkipTime typealias Element = ElementType @@ -98,7 +129,7 @@ class SkipTimeSink : Sink, ObserverType where O } func run() -> Disposable { - let disposeTimer = parent.scheduler.scheduleRelative((), dueTime: self.parent.duration) { + let disposeTimer = parent.scheduler.scheduleRelative((), dueTime: self.parent.duration) { _ in self.tick() return Disposables.create() } @@ -109,7 +140,7 @@ class SkipTimeSink : Sink, ObserverType where O } } -class SkipTime: Producer { +final fileprivate class SkipTime: Producer { let source: Observable let duration: RxTimeInterval let scheduler: SchedulerType diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/SkipUntil.swift b/Example/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift similarity index 68% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/SkipUntil.swift rename to Example/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift index baebf1f..f35f1fd 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/SkipUntil.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift @@ -1,23 +1,37 @@ // // SkipUntil.swift -// Rx +// RxSwift // // Created by Yury Korolev on 10/3/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { -class SkipUntilSinkOther + /** + Returns the elements from the source observable sequence that are emitted after the other observable sequence produces an element. + + - seealso: [skipUntil operator on reactivex.io](http://reactivex.io/documentation/operators/skipuntil.html) + + - parameter other: Observable sequence that starts propagation of elements of the source sequence. + - returns: An observable sequence containing the elements of the source sequence that are emitted after the other sequence emits an item. + */ + public func skipUntil(_ other: O) + -> Observable { + return SkipUntil(source: asObservable(), other: other.asObservable()) + } +} + +final fileprivate class SkipUntilSinkOther : ObserverType , LockOwnerType - , SynchronizedOnType where O.E == ElementType { - typealias Parent = SkipUntilSink + , SynchronizedOnType { + typealias Parent = SkipUntilSink typealias E = Other fileprivate let _parent: Parent - var _lock: NSRecursiveLock { + var _lock: RecursiveLock { return _parent._lock } @@ -26,7 +40,7 @@ class SkipUntilSinkOther init(parent: Parent) { _parent = parent #if TRACE_RESOURCES - let _ = AtomicIncrement(&resourceCount) + let _ = Resources.incrementTotal() #endif } @@ -49,22 +63,22 @@ class SkipUntilSinkOther #if TRACE_RESOURCES deinit { - let _ = AtomicDecrement(&resourceCount) + let _ = Resources.decrementTotal() } #endif } -class SkipUntilSink +final fileprivate class SkipUntilSink : Sink , ObserverType , LockOwnerType - , SynchronizedOnType where O.E == ElementType { - typealias E = ElementType + , SynchronizedOnType { + typealias E = O.E typealias Parent = SkipUntil - let _lock = NSRecursiveLock() + let _lock = RecursiveLock() fileprivate let _parent: Parent fileprivate var _forwardElements = false @@ -87,12 +101,12 @@ class SkipUntilSink } case .error: forwardOn(event) - dispose() + self.dispose() case .completed: if _forwardElements { forwardOn(event) } - _sourceSubscription.dispose() + self.dispose() } } @@ -107,7 +121,7 @@ class SkipUntilSink } } -class SkipUntil: Producer { +final fileprivate class SkipUntil: Producer { fileprivate let _source: Observable fileprivate let _other: Observable diff --git a/Example/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift b/Example/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift new file mode 100644 index 0000000..4bb394b --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift @@ -0,0 +1,77 @@ +// +// SkipWhile.swift +// RxSwift +// +// Created by Yury Korolev on 10/9/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType { + + /** + Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. + + - seealso: [skipWhile operator on reactivex.io](http://reactivex.io/documentation/operators/skipwhile.html) + + - parameter predicate: A function to test each element for a condition. + - returns: An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. + */ + public func skipWhile(_ predicate: @escaping (E) throws -> Bool) -> Observable { + return SkipWhile(source: asObservable(), predicate: predicate) + } +} + +final fileprivate class SkipWhileSink : Sink, ObserverType { + + typealias Element = O.E + typealias Parent = SkipWhile + + fileprivate let _parent: Parent + fileprivate var _running = false + + init(parent: Parent, observer: O, cancel: Cancelable) { + _parent = parent + super.init(observer: observer, cancel: cancel) + } + + func on(_ event: Event) { + switch event { + case .next(let value): + if !_running { + do { + _running = try !_parent._predicate(value) + } catch let e { + forwardOn(.error(e)) + dispose() + return + } + } + + if _running { + forwardOn(.next(value)) + } + case .error, .completed: + forwardOn(event) + dispose() + } + } +} + +final fileprivate class SkipWhile: Producer { + typealias Predicate = (Element) throws -> Bool + typealias PredicateWithIndex = (Element, Int) throws -> Bool + + fileprivate let _source: Observable + fileprivate let _predicate: Predicate + + init(source: Observable, predicate: @escaping Predicate) { + _source = source + _predicate = predicate + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = SkipWhileSink(parent: self, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/StartWith.swift b/Example/Pods/RxSwift/RxSwift/Observables/StartWith.swift similarity index 52% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/StartWith.swift rename to Example/Pods/RxSwift/RxSwift/Observables/StartWith.swift index ec0f662..14776f9 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/StartWith.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/StartWith.swift @@ -1,14 +1,28 @@ // // StartWith.swift -// RxCocoa +// RxSwift // // Created by Krunoslav Zaher on 4/6/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { -class StartWith: Producer { + /** + Prepends a sequence of values to an observable sequence. + + - seealso: [startWith operator on reactivex.io](http://reactivex.io/documentation/operators/startwith.html) + + - parameter elements: Elements to prepend to the specified sequence. + - returns: The source sequence prepended with the specified values. + */ + public func startWith(_ elements: E ...) + -> Observable { + return StartWith(source: self.asObservable(), elements: elements) + } +} + +final fileprivate class StartWith: Producer { let elements: [Element] let source: Observable diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/SubscribeOn.swift b/Example/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift similarity index 61% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/SubscribeOn.swift rename to Example/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift index b2f871c..2a33e03 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/SubscribeOn.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift @@ -6,9 +6,30 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { -class SubscribeOnSink : Sink, ObserverType where Ob.E == O.E { + /** + Wraps the source sequence in order to run its subscription and unsubscription logic on the specified + scheduler. + + This operation is not commonly used. + + This only performs the side-effects of subscription and unsubscription on the specified scheduler. + + In order to invoke observer callbacks on a `scheduler`, use `observeOn`. + + - seealso: [subscribeOn operator on reactivex.io](http://reactivex.io/documentation/operators/subscribeon.html) + + - parameter scheduler: Scheduler to perform subscription and unsubscription actions on. + - returns: The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler. + */ + public func subscribeOn(_ scheduler: ImmediateSchedulerType) + -> Observable { + return SubscribeOn(source: self, scheduler: scheduler) + } +} + +final fileprivate class SubscribeOnSink : Sink, ObserverType where Ob.E == O.E { typealias Element = O.E typealias Parent = SubscribeOn @@ -45,7 +66,7 @@ class SubscribeOnSink : Sink, ObserverTy } } -class SubscribeOn : Producer { +final fileprivate class SubscribeOn : Producer { let source: Ob let scheduler: ImmediateSchedulerType diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Switch.swift b/Example/Pods/RxSwift/RxSwift/Observables/Switch.swift similarity index 61% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Switch.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Switch.swift index 32f0dae..2da1000 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Switch.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Switch.swift @@ -1,24 +1,57 @@ // // Switch.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/12/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { + /** + Projects each element of an observable sequence into a new sequence of observable sequences and then + transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. -class SwitchSink + It is a combination of `map` + `switchLatest` operator + + - seealso: [flatMapLatest operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) + + - parameter selector: A transform function to apply to each element. + - 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. + */ + public func flatMapLatest(_ selector: @escaping (E) throws -> O) + -> Observable { + return FlatMapLatest(source: asObservable(), selector: selector) + } +} + +extension ObservableType where E : ObservableConvertibleType { + + /** + Transforms an observable sequence of observable sequences into an observable sequence + producing values only from the most recent observable sequence. + + Each time a new inner observable sequence is received, unsubscribe from the + previous inner observable sequence. + + - seealso: [switch operator on reactivex.io](http://reactivex.io/documentation/operators/switch.html) + + - returns: The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received. + */ + public func switchLatest() -> Observable { + return Switch(source: asObservable()) + } +} + +fileprivate class SwitchSink : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType where S.E == O.E { + , ObserverType where S.E == O.E { typealias E = SourceType fileprivate let _subscriptions: SingleAssignmentDisposable = SingleAssignmentDisposable() fileprivate let _innerSubscription: SerialDisposable = SerialDisposable() - let _lock = NSRecursiveLock() + let _lock = RecursiveLock() // state fileprivate var _stopped = false @@ -34,24 +67,33 @@ class SwitchSink _subscriptions.setDisposable(subscription) return Disposables.create(_subscriptions, _innerSubscription) } - - func on(_ event: Event) { - synchronizedOn(event) - } func performMap(_ element: SourceType) throws -> S { - abstractMethod() + rxAbstractMethod() } - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): + @inline(__always) + final private func nextElementArrived(element: E) -> (Int, Observable)? { + _lock.lock(); defer { _lock.unlock() } // { do { let observable = try performMap(element).asObservable() _hasLatest = true _latest = _latest &+ 1 - let latest = _latest + return (_latest, observable) + } + catch let error { + forwardOn(.error(error)) + dispose() + } + return nil + // } + } + + func on(_ event: Event) { + switch event { + case .next(let element): + if let (latest, observable) = nextElementArrived(element: element) { let d = SingleAssignmentDisposable() _innerSubscription.disposable = d @@ -59,14 +101,12 @@ class SwitchSink let disposable = observable.subscribe(observer) d.setDisposable(disposable) } - catch let error { - forwardOn(.error(error)) - dispose() - } case .error(let error): + _lock.lock(); defer { _lock.unlock() } forwardOn(.error(error)) dispose() case .completed: + _lock.lock(); defer { _lock.unlock() } _stopped = true _subscriptions.dispose() @@ -79,7 +119,7 @@ class SwitchSink } } -class SwitchSinkIter +final fileprivate class SwitchSinkIter : ObserverType , LockOwnerType , SynchronizedOnType where S.E == O.E { @@ -90,7 +130,7 @@ class SwitchSinkIter fileprivate let _id: Int fileprivate let _self: Disposable - var _lock: NSRecursiveLock { + var _lock: RecursiveLock { return _parent._lock } @@ -133,7 +173,7 @@ class SwitchSinkIter // MARK: Specializations -final class SwitchIdentitySink : SwitchSink where O.E == S.E { +final fileprivate class SwitchIdentitySink : SwitchSink where O.E == S.E { override init(observer: O, cancel: Cancelable) { super.init(observer: observer, cancel: cancel) } @@ -143,7 +183,7 @@ final class SwitchIdentitySink : } } -final class MapSwitchSink : SwitchSink where O.E == S.E { +final fileprivate class MapSwitchSink : SwitchSink where O.E == S.E { typealias Selector = (SourceType) throws -> S fileprivate let _selector: Selector @@ -160,7 +200,7 @@ final class MapSwitchSink : Producer { +final fileprivate class Switch : Producer { fileprivate let _source: Observable init(source: Observable) { @@ -174,7 +214,7 @@ final class Switch : Producer { } } -final class FlatMapLatest : Producer { +final fileprivate class FlatMapLatest : Producer { typealias Selector = (SourceType) throws -> S fileprivate let _source: Observable diff --git a/Example/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift b/Example/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift new file mode 100644 index 0000000..0b10dc6 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift @@ -0,0 +1,104 @@ +// +// SwitchIfEmpty.swift +// RxSwift +// +// Created by sergdort on 23/12/2016. +// Copyright © 2016 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType { + /** + Returns the elements of the specified sequence or `switchTo` sequence if the sequence is empty. + + - seealso: [DefaultIfEmpty operator on reactivex.io](http://reactivex.io/documentation/operators/defaultifempty.html) + + - parameter switchTo: Observable sequence being returned when source sequence is empty. + - returns: Observable sequence that contains elements from switchTo sequence if source is empty, otherwise returns source sequence elements. + */ + public func ifEmpty(switchTo other: Observable) -> Observable { + return SwitchIfEmpty(source: asObservable(), ifEmpty: other) + } +} + +final fileprivate class SwitchIfEmpty: Producer { + + private let _source: Observable + private let _ifEmpty: Observable + + init(source: Observable, ifEmpty: Observable) { + _source = source + _ifEmpty = ifEmpty + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = SwitchIfEmptySink(ifEmpty: _ifEmpty, + observer: observer, + cancel: cancel) + let subscription = sink.run(_source.asObservable()) + + return (sink: sink, subscription: subscription) + } +} + +final fileprivate class SwitchIfEmptySink: Sink + , ObserverType { + typealias E = O.E + + private let _ifEmpty: Observable + private var _isEmpty = true + private let _ifEmptySubscription = SingleAssignmentDisposable() + + init(ifEmpty: Observable, observer: O, cancel: Cancelable) { + _ifEmpty = ifEmpty + super.init(observer: observer, cancel: cancel) + } + + func run(_ source: Observable) -> Disposable { + let subscription = source.subscribe(self) + return Disposables.create(subscription, _ifEmptySubscription) + } + + func on(_ event: Event) { + switch event { + case .next: + _isEmpty = false + forwardOn(event) + case .error: + forwardOn(event) + dispose() + case .completed: + guard _isEmpty else { + forwardOn(.completed) + dispose() + return + } + let ifEmptySink = SwitchIfEmptySinkIter(parent: self) + _ifEmptySubscription.setDisposable(_ifEmpty.subscribe(ifEmptySink)) + } + } +} + +final fileprivate class SwitchIfEmptySinkIter + : ObserverType { + typealias E = O.E + typealias Parent = SwitchIfEmptySink + + private let _parent: Parent + + init(parent: Parent) { + _parent = parent + } + + func on(_ event: Event) { + switch event { + case .next: + _parent.forwardOn(event) + case .error: + _parent.forwardOn(event) + _parent.dispose() + case .completed: + _parent.forwardOn(event) + _parent.dispose() + } + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Take.swift b/Example/Pods/RxSwift/RxSwift/Observables/Take.swift similarity index 65% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Take.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Take.swift index d1c1e18..661f858 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Take.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Take.swift @@ -6,13 +6,49 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { + + /** + Returns a specified number of contiguous elements from the start of an observable sequence. + + - seealso: [take operator on reactivex.io](http://reactivex.io/documentation/operators/take.html) + + - parameter count: The number of elements to return. + - returns: An observable sequence that contains the specified number of elements from the start of the input sequence. + */ + public func take(_ count: Int) + -> Observable { + if count == 0 { + return Observable.empty() + } + else { + return TakeCount(source: asObservable(), count: count) + } + } +} + +extension ObservableType { + + /** + Takes elements for the specified duration from the start of the observable source sequence, using the specified scheduler to run timers. + + - seealso: [take operator on reactivex.io](http://reactivex.io/documentation/operators/take.html) + + - parameter duration: Duration for taking elements from the start of the sequence. + - parameter scheduler: Scheduler to run the timer on. + - returns: An observable sequence with the elements taken during the specified duration from the start of the source sequence. + */ + public func take(_ duration: RxTimeInterval, scheduler: SchedulerType) + -> Observable { + return TakeTime(source: self.asObservable(), duration: duration, scheduler: scheduler) + } +} // count version -class TakeCountSink : Sink, ObserverType where O.E == ElementType { - typealias Parent = TakeCount - typealias E = ElementType +final fileprivate class TakeCountSink : Sink, ObserverType { + typealias E = O.E + typealias Parent = TakeCount private let _parent: Parent @@ -49,7 +85,7 @@ class TakeCountSink : Sink, ObserverType where } -class TakeCount: Producer { +final fileprivate class TakeCount: Producer { fileprivate let _source: Observable fileprivate let _count: Int @@ -70,7 +106,7 @@ class TakeCount: Producer { // time version -class TakeTimeSink +final fileprivate class TakeTimeSink : Sink , LockOwnerType , ObserverType @@ -80,7 +116,7 @@ class TakeTimeSink fileprivate let _parent: Parent - let _lock = NSRecursiveLock() + let _lock = RecursiveLock() init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent @@ -112,7 +148,7 @@ class TakeTimeSink } func run() -> Disposable { - let disposeTimer = _parent._scheduler.scheduleRelative((), dueTime: _parent._duration) { + let disposeTimer = _parent._scheduler.scheduleRelative((), dueTime: _parent._duration) { _ in self.tick() return Disposables.create() } @@ -123,7 +159,7 @@ class TakeTimeSink } } -class TakeTime : Producer { +final fileprivate class TakeTime : Producer { typealias TimeInterval = RxTimeInterval fileprivate let _source: Observable diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/TakeLast.swift b/Example/Pods/RxSwift/RxSwift/Observables/TakeLast.swift similarity index 56% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/TakeLast.swift rename to Example/Pods/RxSwift/RxSwift/Observables/TakeLast.swift index 76796be..7bf1664 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/TakeLast.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/TakeLast.swift @@ -1,25 +1,40 @@ // // TakeLast.swift -// Rx +// RxSwift // // Created by Tomi Koskinen on 25/10/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { + /** + Returns a specified number of contiguous elements from the end of an observable sequence. -class TakeLastSink : Sink, ObserverType where O.E == ElementType { - typealias Parent = TakeLast - typealias E = ElementType + This operator accumulates a buffer with a length enough to store elements count elements. Upon completion of the source sequence, this buffer is drained on the result sequence. This causes the elements to be delayed. + + - seealso: [takeLast operator on reactivex.io](http://reactivex.io/documentation/operators/takelast.html) + + - parameter count: Number of elements to take from the end of the source sequence. + - returns: An observable sequence containing the specified number of elements from the end of the source sequence. + */ + public func takeLast(_ count: Int) + -> Observable { + return TakeLast(source: asObservable(), count: count) + } +} + +final fileprivate class TakeLastSink : Sink, ObserverType { + typealias E = O.E + typealias Parent = TakeLast private let _parent: Parent - private var _elements: Queue + private var _elements: Queue init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent - _elements = Queue(capacity: parent._count + 1) + _elements = Queue(capacity: parent._count + 1) super.init(observer: observer, cancel: cancel) } @@ -43,7 +58,7 @@ class TakeLastSink : Sink, ObserverType where O } } -class TakeLast: Producer { +final fileprivate class TakeLast: Producer { fileprivate let _source: Observable fileprivate let _count: Int diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/TakeUntil.swift b/Example/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift similarity index 68% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/TakeUntil.swift rename to Example/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift index 83452b8..f2e5f98 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/TakeUntil.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift @@ -6,18 +6,32 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { -class TakeUntilSinkOther + /** + Returns the elements from the source observable sequence until the other observable sequence produces an element. + + - seealso: [takeUntil operator on reactivex.io](http://reactivex.io/documentation/operators/takeuntil.html) + + - parameter other: Observable sequence that terminates propagation of elements of the source sequence. + - returns: An observable sequence containing the elements of the source sequence up to the point the other sequence interrupted further propagation. + */ + public func takeUntil(_ other: O) + -> Observable { + return TakeUntil(source: asObservable(), other: other.asObservable()) + } +} + +final fileprivate class TakeUntilSinkOther : ObserverType , LockOwnerType - , SynchronizedOnType where O.E == ElementType { - typealias Parent = TakeUntilSink + , SynchronizedOnType { + typealias Parent = TakeUntilSink typealias E = Other fileprivate let _parent: Parent - var _lock: NSRecursiveLock { + var _lock: RecursiveLock { return _parent._lock } @@ -26,7 +40,7 @@ class TakeUntilSinkOther init(parent: Parent) { _parent = parent #if TRACE_RESOURCES - let _ = AtomicIncrement(&resourceCount) + let _ = Resources.incrementTotal() #endif } @@ -43,32 +57,29 @@ class TakeUntilSinkOther _parent.forwardOn(.error(e)) _parent.dispose() case .completed: - _parent._open = true _subscription.dispose() } } #if TRACE_RESOURCES deinit { - let _ = AtomicDecrement(&resourceCount) + let _ = Resources.decrementTotal() } #endif } -class TakeUntilSink +final fileprivate class TakeUntilSink : Sink , LockOwnerType , ObserverType - , SynchronizedOnType where O.E == ElementType { - typealias E = ElementType + , SynchronizedOnType { + typealias E = O.E typealias Parent = TakeUntil fileprivate let _parent: Parent - let _lock = NSRecursiveLock() + let _lock = RecursiveLock() - // state - fileprivate var _open = false init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent @@ -102,7 +113,7 @@ class TakeUntilSink } } -class TakeUntil: Producer { +final fileprivate class TakeUntil: Producer { fileprivate let _source: Observable fileprivate let _other: Observable diff --git a/Example/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift b/Example/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift new file mode 100644 index 0000000..2b7b551 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift @@ -0,0 +1,85 @@ +// +// TakeWhile.swift +// RxSwift +// +// Created by Krunoslav Zaher on 6/7/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType { + + /** + Returns elements from an observable sequence as long as a specified condition is true. + + - seealso: [takeWhile operator on reactivex.io](http://reactivex.io/documentation/operators/takewhile.html) + + - parameter predicate: A function to test each element for a condition. + - returns: An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. + */ + public func takeWhile(_ predicate: @escaping (E) throws -> Bool) + -> Observable { + return TakeWhile(source: asObservable(), predicate: predicate) + } +} + +final fileprivate class TakeWhileSink + : Sink + , ObserverType { + typealias Element = O.E + typealias Parent = TakeWhile + + fileprivate let _parent: Parent + + fileprivate var _running = true + + init(parent: Parent, observer: O, cancel: Cancelable) { + _parent = parent + super.init(observer: observer, cancel: cancel) + } + + func on(_ event: Event) { + switch event { + case .next(let value): + if !_running { + return + } + + do { + _running = try _parent._predicate(value) + } catch let e { + forwardOn(.error(e)) + dispose() + return + } + + if _running { + forwardOn(.next(value)) + } else { + forwardOn(.completed) + dispose() + } + case .error, .completed: + forwardOn(event) + dispose() + } + } + +} + +final fileprivate class TakeWhile: Producer { + typealias Predicate = (Element) throws -> Bool + + fileprivate let _source: Observable + fileprivate let _predicate: Predicate + + init(source: Observable, predicate: @escaping Predicate) { + _source = source + _predicate = predicate + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { + let sink = TakeWhileSink(parent: self, observer: observer, cancel: cancel) + let subscription = _source.subscribe(sink) + return (sink: sink, subscription: subscription) + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Throttle.swift b/Example/Pods/RxSwift/RxSwift/Observables/Throttle.swift similarity index 77% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Throttle.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Throttle.swift index 4332dcb..0c4ca74 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Throttle.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Throttle.swift @@ -1,14 +1,34 @@ // // Throttle.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/22/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +import struct Foundation.Date -class ThrottleSink +extension ObservableType { + + /** + Returns an Observable that emits the first and the latest item emitted by the source Observable during sequential time windows of a specified duration. + + This operator makes sure that no two elements are emitted in less then dueTime. + + - seealso: [debounce operator on reactivex.io](http://reactivex.io/documentation/operators/debounce.html) + + - parameter dueTime: Throttling duration for each element. + - parameter latest: Should latest element received in a dueTime wide time window since last element emission be emitted. + - parameter scheduler: Scheduler to run the throttle timers on. + - returns: The throttled sequence. + */ + public func throttle(_ dueTime: RxTimeInterval, latest: Bool = true, scheduler: SchedulerType) + -> Observable { + return Throttle(source: self.asObservable(), dueTime: dueTime, latest: latest, scheduler: scheduler) + } +} + +final fileprivate class ThrottleSink : Sink , ObserverType , LockOwnerType @@ -18,7 +38,7 @@ class ThrottleSink private let _parent: ParentType - let _lock = NSRecursiveLock() + let _lock = RecursiveLock() // state private var _lastUnsentElement: Element? = nil @@ -120,7 +140,7 @@ class ThrottleSink } } -class Throttle : Producer { +final fileprivate class Throttle : Producer { fileprivate let _source: Observable fileprivate let _dueTime: RxTimeInterval diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Timeout.swift b/Example/Pods/RxSwift/RxSwift/Observables/Timeout.swift similarity index 58% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Timeout.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Timeout.swift index edf2720..7008de8 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Timeout.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Timeout.swift @@ -1,20 +1,50 @@ // // Timeout.swift -// Rx +// RxSwift // // Created by Tomi Koskinen on 13/11/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { -class TimeoutSink: Sink, LockOwnerType, ObserverType where O.E == ElementType { - typealias E = ElementType + /** + Applies a timeout policy for each element in the observable sequence. If the next element isn't received within the specified timeout duration starting from its predecessor, a TimeoutError is propagated to the observer. + + - seealso: [timeout operator on reactivex.io](http://reactivex.io/documentation/operators/timeout.html) + + - parameter dueTime: Maximum duration between values before a timeout occurs. + - parameter scheduler: Scheduler to run the timeout timer on. + - returns: An observable sequence with a `RxError.timeout` in case of a timeout. + */ + public func timeout(_ dueTime: RxTimeInterval, scheduler: SchedulerType) + -> Observable { + return Timeout(source: self.asObservable(), dueTime: dueTime, other: Observable.error(RxError.timeout), scheduler: scheduler) + } + + /** + Applies a timeout policy for each element in the observable sequence, using the specified scheduler to run timeout timers. If the next element isn't received within the specified timeout duration starting from its predecessor, the other observable sequence is used to produce future messages from that point on. + + - seealso: [timeout operator on reactivex.io](http://reactivex.io/documentation/operators/timeout.html) + + - parameter dueTime: Maximum duration between values before a timeout occurs. + - parameter other: Sequence to return in case of a timeout. + - parameter scheduler: Scheduler to run the timeout timer on. + - returns: The source sequence switching to the other sequence in case of a timeout. + */ + public func timeout(_ dueTime: RxTimeInterval, other: O, scheduler: SchedulerType) + -> Observable where E == O.E { + return Timeout(source: self.asObservable(), dueTime: dueTime, other: other.asObservable(), scheduler: scheduler) + } +} + +final fileprivate class TimeoutSink: Sink, LockOwnerType, ObserverType { + typealias E = O.E typealias Parent = Timeout private let _parent: Parent - let _lock = NSRecursiveLock() + let _lock = RecursiveLock() private let _timerD = SerialDisposable() private let _subscription = SerialDisposable() @@ -33,7 +63,7 @@ class TimeoutSink: Sink, LockOwnerType, Observe _createTimeoutTimer() - original.setDisposable(_parent._source.subscribeSafe(self)) + original.setDisposable(_parent._source.subscribe(self)) return Disposables.create(_subscription, _timerD) } @@ -89,7 +119,7 @@ class TimeoutSink: Sink, LockOwnerType, Observe } if timerWins { - self._subscription.disposable = self._parent._other.subscribeSafe(self.forwarder()) + self._subscription.disposable = self._parent._other.subscribe(self.forwarder()) } return Disposables.create() @@ -100,7 +130,7 @@ class TimeoutSink: Sink, LockOwnerType, Observe } -class Timeout : Producer { +final fileprivate class Timeout : Producer { fileprivate let _source: Observable fileprivate let _dueTime: RxTimeInterval diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Timer.swift b/Example/Pods/RxSwift/RxSwift/Observables/Timer.swift new file mode 100644 index 0000000..dec69e1 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/Timer.swift @@ -0,0 +1,111 @@ +// +// Timer.swift +// RxSwift +// +// Created by Krunoslav Zaher on 6/7/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +extension ObservableType where E : RxAbstractInteger { + /** + Returns an observable sequence that produces a value after each period, using the specified scheduler to run timers and to send out observer messages. + + - seealso: [interval operator on reactivex.io](http://reactivex.io/documentation/operators/interval.html) + + - parameter period: Period for producing the values in the resulting sequence. + - parameter scheduler: Scheduler to run the timer on. + - returns: An observable sequence that produces a value after each period. + */ + public static func interval(_ period: RxTimeInterval, scheduler: SchedulerType) + -> Observable { + return Timer(dueTime: period, + period: period, + scheduler: scheduler + ) + } +} + +extension ObservableType where E: RxAbstractInteger { + /** + 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. + + - seealso: [timer operator on reactivex.io](http://reactivex.io/documentation/operators/timer.html) + + - parameter dueTime: Relative time at which to produce the first value. + - parameter period: Period to produce subsequent values. + - parameter scheduler: Scheduler to run timers on. + - returns: An observable sequence that produces a value after due time has elapsed and then each period. + */ + public static func timer(_ dueTime: RxTimeInterval, period: RxTimeInterval? = nil, scheduler: SchedulerType) + -> Observable { + return Timer( + dueTime: dueTime, + period: period, + scheduler: scheduler + ) + } +} + +final fileprivate class TimerSink : Sink where O.E : RxAbstractInteger { + typealias Parent = Timer + + private let _parent: Parent + + init(parent: Parent, observer: O, cancel: Cancelable) { + _parent = parent + super.init(observer: observer, cancel: cancel) + } + + func run() -> Disposable { + return _parent._scheduler.schedulePeriodic(0 as O.E, startAfter: _parent._dueTime, period: _parent._period!) { state in + self.forwardOn(.next(state)) + return state &+ 1 + } + } +} + +final fileprivate class TimerOneOffSink : Sink where O.E : RxAbstractInteger { + typealias Parent = Timer + + private let _parent: Parent + + init(parent: Parent, observer: O, cancel: Cancelable) { + _parent = parent + super.init(observer: observer, cancel: cancel) + } + + func run() -> Disposable { + return _parent._scheduler.scheduleRelative(self, dueTime: _parent._dueTime) { (`self`) -> Disposable in + self.forwardOn(.next(0)) + self.forwardOn(.completed) + self.dispose() + + return Disposables.create() + } + } +} + +final fileprivate class Timer: Producer { + fileprivate let _scheduler: SchedulerType + fileprivate let _dueTime: RxTimeInterval + fileprivate let _period: RxTimeInterval? + + init(dueTime: RxTimeInterval, period: RxTimeInterval?, scheduler: SchedulerType) { + _scheduler = scheduler + _dueTime = dueTime + _period = period + } + + override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { + if let _ = _period { + let sink = TimerSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) + } + else { + let sink = TimerOneOffSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) + } + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/ToArray.swift b/Example/Pods/RxSwift/RxSwift/Observables/ToArray.swift similarity index 63% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/ToArray.swift rename to Example/Pods/RxSwift/RxSwift/Observables/ToArray.swift index e066ec1..93fcb80 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/ToArray.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/ToArray.swift @@ -1,14 +1,30 @@ // // ToArray.swift -// Rx +// RxSwift // // Created by Junior B. on 20/10/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation -class ToArraySink : Sink, ObserverType where O.E == [SourceType] { +extension ObservableType { + + /** + Converts an Observable into another Observable that emits the whole sequence as a single array and then terminates. + + For aggregation behavior see `reduce`. + + - seealso: [toArray operator on reactivex.io](http://reactivex.io/documentation/operators/to.html) + + - returns: An observable sequence containing all the emitted elements as array. + */ + public func toArray() + -> Observable<[E]> { + return ToArray(source: self.asObservable()) + } +} + +final fileprivate class ToArraySink : Sink, ObserverType where O.E == [SourceType] { typealias Parent = ToArray let _parent: Parent @@ -35,7 +51,7 @@ class ToArraySink : Sink, ObserverType where O.E } } -class ToArray : Producer<[SourceType]> { +final fileprivate class ToArray : Producer<[SourceType]> { let _source: Observable init(source: Observable) { diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Using.swift b/Example/Pods/RxSwift/RxSwift/Observables/Using.swift similarity index 63% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Using.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Using.swift index d0c89b6..8ea8326 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Using.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Using.swift @@ -1,17 +1,29 @@ // // Using.swift -// Rx +// RxSwift // // Created by Yury Korolev on 10/15/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { + /** + Constructs an observable sequence that depends on a resource object, whose lifetime is tied to the resulting observable sequence's lifetime. -class UsingSink : Sink, ObserverType where O.E == SourceType { + - seealso: [using operator on reactivex.io](http://reactivex.io/documentation/operators/using.html) + - parameter resourceFactory: Factory function to obtain a resource object. + - parameter observableFactory: Factory function to obtain an observable sequence that depends on the obtained resource. + - returns: An observable sequence whose lifetime controls the lifetime of the dependent resource object. + */ + public static func using(_ resourceFactory: @escaping () throws -> Resource, observableFactory: @escaping (Resource) throws -> Observable) -> Observable { + return Using(resourceFactory: resourceFactory, observableFactory: observableFactory) + } +} + +final fileprivate class UsingSink : Sink, ObserverType { + typealias SourceType = O.E typealias Parent = Using - typealias E = O.E private let _parent: Parent @@ -40,7 +52,7 @@ class UsingSink : Sink } } - func on(_ event: Event) { + func on(_ event: Event) { switch event { case let .next(value): forwardOn(.next(value)) @@ -54,7 +66,7 @@ class UsingSink : Sink } } -class Using: Producer { +final fileprivate class Using: Producer { typealias E = SourceType diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Window.swift b/Example/Pods/RxSwift/RxSwift/Observables/Window.swift similarity index 80% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Window.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Window.swift index 25a5a2f..c862dfb 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Window.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Window.swift @@ -1,14 +1,30 @@ // // Window.swift -// Rx +// RxSwift // // Created by Junior B. on 29/10/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { -class WindowTimeCountSink + /** + Projects each element of an observable sequence into a window that is completed when either it’s full or a given amount of time has elapsed. + + - seealso: [window operator on reactivex.io](http://reactivex.io/documentation/operators/window.html) + + - parameter timeSpan: Maximum time length of a window. + - parameter count: Maximum element count of a window. + - parameter scheduler: Scheduler to run windowing timers on. + - returns: An observable sequence of windows (instances of `Observable`). + */ + public func window(timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) + -> Observable> { + return WindowTimeCount(source: self.asObservable(), timeSpan: timeSpan, count: count, scheduler: scheduler) + } +} + +final fileprivate class WindowTimeCountSink : Sink , ObserverType , LockOwnerType @@ -18,7 +34,7 @@ class WindowTimeCountSink private let _parent: Parent - let _lock = NSRecursiveLock() + let _lock = RecursiveLock() private var _subject = PublishSubject() private var _count = 0 @@ -42,7 +58,7 @@ class WindowTimeCountSink forwardOn(.next(AddRef(source: _subject, refCount: _refCountDisposable).asObservable())) createTimer(_windowId) - let _ = _groupDisposable.insert(_parent._source.subscribeSafe(self)) + let _ = _groupDisposable.insert(_parent._source.subscribe(self)) return _refCountDisposable } @@ -132,7 +148,7 @@ class WindowTimeCountSink } } -class WindowTimeCount : Producer> { +final fileprivate class WindowTimeCount : Producer> { fileprivate let _timeSpan: RxTimeInterval fileprivate let _count: Int diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/WithLatestFrom.swift b/Example/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift similarity index 58% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/WithLatestFrom.swift rename to Example/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift index 58f23f2..bd22e2f 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/WithLatestFrom.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift @@ -1,25 +1,51 @@ // // WithLatestFrom.swift -// RxExample +// RxSwift // // Created by Yury Korolev on 10/19/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { -class WithLatestFromSink + /** + Merges two observable sequences into one observable sequence by combining each element from self with the latest element from the second source, if any. + + - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) + + - parameter second: Second observable source. + - 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(_ second: SecondO, resultSelector: @escaping (E, SecondO.E) throws -> ResultType) -> Observable { + return WithLatestFrom(first: asObservable(), second: second.asObservable(), resultSelector: resultSelector) + } + + /** + Merges two observable sequences into one observable sequence by using latest element from the second sequence every time when `self` emits an element. + + - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) + + - 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(_ second: SecondO) -> Observable { + return WithLatestFrom(first: asObservable(), second: second.asObservable(), resultSelector: { $1 }) + } +} + +final fileprivate class WithLatestFromSink : Sink , ObserverType , LockOwnerType - , SynchronizedOnType where O.E == ResultType { - + , SynchronizedOnType { + typealias ResultType = O.E typealias Parent = WithLatestFrom typealias E = FirstType fileprivate let _parent: Parent - var _lock = NSRecursiveLock() + var _lock = RecursiveLock() fileprivate var _latest: SecondType? init(parent: Parent, observer: O, cancel: Cancelable) { @@ -64,18 +90,19 @@ class WithLatestFromSink } } -class WithLatestFromSecond +final fileprivate class WithLatestFromSecond : ObserverType , LockOwnerType - , SynchronizedOnType where O.E == ResultType { + , SynchronizedOnType { - typealias Parent = WithLatestFromSink + typealias ResultType = O.E + typealias Parent = WithLatestFromSink typealias E = SecondType private let _parent: Parent private let _disposable: Disposable - var _lock: NSRecursiveLock { + var _lock: RecursiveLock { return _parent._lock } @@ -101,7 +128,7 @@ class WithLatestFromSecond } } -class WithLatestFrom: Producer { +final fileprivate class WithLatestFrom: Producer { typealias ResultSelector = (FirstType, SecondType) throws -> ResultType fileprivate let _first: Observable diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+CollectionType.swift b/Example/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift similarity index 67% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+CollectionType.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift index 9da1e62..1a871c1 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+CollectionType.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift @@ -1,21 +1,48 @@ // // Zip+Collection.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 8/30/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +extension ObservableType { + /** + 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. -class ZipCollectionTypeSink - : Sink where C.Iterator.Element : ObservableConvertibleType, O.E == R { + - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) + + - 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. + */ + public static func zip(_ collection: C, _ resultSelector: @escaping ([C.Iterator.Element.E]) throws -> E) -> Observable + where C.Iterator.Element: ObservableType { + return ZipCollectionType(sources: collection, resultSelector: resultSelector) + } + + /** + Merges the specified observable sequences into one observable sequence whenever all of the observable sequences have produced an element at a corresponding index. + + - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) + + - returns: An observable sequence containing the result of combining elements of the sources. + */ + public static func zip(_ collection: C) -> Observable<[E]> + where C.Iterator.Element: ObservableType, C.Iterator.Element.E == E { + return ZipCollectionType(sources: collection, resultSelector: { $0 }) + } + +} + +final fileprivate class ZipCollectionTypeSink + : Sink where C.Iterator.Element : ObservableConvertibleType { + typealias R = O.E typealias Parent = ZipCollectionType typealias SourceElement = C.Iterator.Element.E private let _parent: Parent - private let _lock = NSRecursiveLock() + private let _lock = RecursiveLock() // state private var _numberOfValues = 0 @@ -49,8 +76,7 @@ class ZipCollectionTypeSink } if _numberOfValues < _parent.count { - let numberOfOthersThatAreDone = _numberOfDone - (_isDone[atIndex] ? 1 : 0) - if numberOfOthersThatAreDone == _parent.count - 1 { + if _numberOfDone == _parent.count - 1 { self.forwardOn(.completed) self.dispose() } @@ -66,7 +92,7 @@ class ZipCollectionTypeSink for i in 0 ..< _values.count { arguments.append(_values[i].dequeue()!) - if _values[i].count > 0 { + if !_values[i].isEmpty { _numberOfValues += 1 } } @@ -113,12 +139,16 @@ class ZipCollectionTypeSink _subscriptions[j].setDisposable(disposable) j += 1 } + + if _parent.sources.isEmpty { + self.forwardOn(.completed) + } return Disposables.create(_subscriptions) } } -class ZipCollectionType : Producer where C.Iterator.Element : ObservableConvertibleType { +final fileprivate class ZipCollectionType : Producer where C.Iterator.Element : ObservableConvertibleType { typealias ResultSelector = ([C.Iterator.Element.E]) throws -> R let sources: C @@ -128,7 +158,7 @@ class ZipCollectionType : Producer where C.Iterator.Element init(sources: C, resultSelector: @escaping ResultSelector) { self.sources = sources self.resultSelector = resultSelector - self.count = Int(self.sources.count.toIntMax()) + self.count = Int(Int64(self.sources.count)) } override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+arity.swift b/Example/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift similarity index 77% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+arity.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift index 6c3612a..434543e 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+arity.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift @@ -7,13 +7,11 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - // 2 -extension Observable { +extension ObservableType { /** 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. @@ -22,7 +20,6 @@ extension Observable { - 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 (_ source1: O1, _ source2: O2, resultSelector: @escaping (O1.E, O2.E) throws -> E) -> Observable { @@ -33,7 +30,25 @@ extension Observable { } } -class ZipSink2_ : ZipSink { +extension ObservableType where E == Any { + /** + Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. + + - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) + + - returns: An observable sequence containing the result of combining elements of the sources. + */ + public static func zip + (_ source1: O1, _ source2: O2) + -> Observable<(O1.E, O2.E)> { + return Zip2( + source1: source1.asObservable(), source2: source2.asObservable(), + resultSelector: { ($0, $1) } + ) + } +} + +final class ZipSink2_ : ZipSink { typealias R = O.E typealias Parent = Zip2 @@ -49,8 +64,8 @@ class ZipSink2_ : ZipSink { override func hasElements(_ index: Int) -> Bool { switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 + case 0: return !_values1.isEmpty + case 1: return !_values2.isEmpty default: rxFatalError("Unhandled case (Function)") @@ -80,7 +95,7 @@ class ZipSink2_ : ZipSink { } } -class Zip2 : Producer { +final class Zip2 : Producer { typealias ResultSelector = (E1, E2) throws -> R let source1: Observable @@ -106,7 +121,7 @@ class Zip2 : Producer { // 3 -extension Observable { +extension ObservableType { /** 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. @@ -115,7 +130,6 @@ extension Observable { - 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 (_ source1: O1, _ source2: O2, _ source3: O3, resultSelector: @escaping (O1.E, O2.E, O3.E) throws -> E) -> Observable { @@ -126,7 +140,25 @@ extension Observable { } } -class ZipSink3_ : ZipSink { +extension ObservableType where E == Any { + /** + Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. + + - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) + + - returns: An observable sequence containing the result of combining elements of the sources. + */ + public static func zip + (_ source1: O1, _ source2: O2, _ source3: O3) + -> Observable<(O1.E, O2.E, O3.E)> { + return Zip3( + source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), + resultSelector: { ($0, $1, $2) } + ) + } +} + +final class ZipSink3_ : ZipSink { typealias R = O.E typealias Parent = Zip3 @@ -143,9 +175,9 @@ class ZipSink3_ : ZipSink { override func hasElements(_ index: Int) -> Bool { switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - case 2: return _values3.count > 0 + case 0: return !_values1.isEmpty + case 1: return !_values2.isEmpty + case 2: return !_values3.isEmpty default: rxFatalError("Unhandled case (Function)") @@ -179,7 +211,7 @@ class ZipSink3_ : ZipSink { } } -class Zip3 : Producer { +final class Zip3 : Producer { typealias ResultSelector = (E1, E2, E3) throws -> R let source1: Observable @@ -207,7 +239,7 @@ class Zip3 : Producer { // 4 -extension Observable { +extension ObservableType { /** 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. @@ -216,7 +248,6 @@ extension Observable { - 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 (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E) throws -> E) -> Observable { @@ -227,7 +258,25 @@ extension Observable { } } -class ZipSink4_ : ZipSink { +extension ObservableType where E == Any { + /** + Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. + + - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) + + - returns: An observable sequence containing the result of combining elements of the sources. + */ + public static func zip + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4) + -> Observable<(O1.E, O2.E, O3.E, O4.E)> { + return Zip4( + source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), + resultSelector: { ($0, $1, $2, $3) } + ) + } +} + +final class ZipSink4_ : ZipSink { typealias R = O.E typealias Parent = Zip4 @@ -245,10 +294,10 @@ class ZipSink4_ : ZipSink { override func hasElements(_ index: Int) -> Bool { switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - case 2: return _values3.count > 0 - case 3: return _values4.count > 0 + case 0: return !_values1.isEmpty + case 1: return !_values2.isEmpty + case 2: return !_values3.isEmpty + case 3: return !_values4.isEmpty default: rxFatalError("Unhandled case (Function)") @@ -286,7 +335,7 @@ class ZipSink4_ : ZipSink { } } -class Zip4 : Producer { +final class Zip4 : Producer { typealias ResultSelector = (E1, E2, E3, E4) throws -> R let source1: Observable @@ -316,7 +365,7 @@ class Zip4 : Producer { // 5 -extension Observable { +extension ObservableType { /** 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. @@ -325,7 +374,6 @@ extension Observable { - 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 (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E) -> Observable { @@ -336,7 +384,25 @@ extension Observable { } } -class ZipSink5_ : ZipSink { +extension ObservableType where E == Any { + /** + Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. + + - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) + + - returns: An observable sequence containing the result of combining elements of the sources. + */ + public static func zip + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5) + -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E)> { + return Zip5( + source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), + resultSelector: { ($0, $1, $2, $3, $4) } + ) + } +} + +final class ZipSink5_ : ZipSink { typealias R = O.E typealias Parent = Zip5 @@ -355,11 +421,11 @@ class ZipSink5_ : ZipSink { override func hasElements(_ index: Int) -> Bool { switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - case 2: return _values3.count > 0 - case 3: return _values4.count > 0 - case 4: return _values5.count > 0 + case 0: return !_values1.isEmpty + case 1: return !_values2.isEmpty + case 2: return !_values3.isEmpty + case 3: return !_values4.isEmpty + case 4: return !_values5.isEmpty default: rxFatalError("Unhandled case (Function)") @@ -401,7 +467,7 @@ class ZipSink5_ : ZipSink { } } -class Zip5 : Producer { +final class Zip5 : Producer { typealias ResultSelector = (E1, E2, E3, E4, E5) throws -> R let source1: Observable @@ -433,7 +499,7 @@ class Zip5 : Producer { // 6 -extension Observable { +extension ObservableType { /** 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. @@ -442,7 +508,6 @@ extension Observable { - 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 (_ 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) -> Observable { @@ -453,7 +518,25 @@ extension Observable { } } -class ZipSink6_ : ZipSink { +extension ObservableType where E == Any { + /** + Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. + + - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) + + - returns: An observable sequence containing the result of combining elements of the sources. + */ + public static func zip + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6) + -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E)> { + return Zip6( + source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), + resultSelector: { ($0, $1, $2, $3, $4, $5) } + ) + } +} + +final class ZipSink6_ : ZipSink { typealias R = O.E typealias Parent = Zip6 @@ -473,12 +556,12 @@ class ZipSink6_ : ZipSink { override func hasElements(_ index: Int) -> Bool { switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - case 2: return _values3.count > 0 - case 3: return _values4.count > 0 - case 4: return _values5.count > 0 - case 5: return _values6.count > 0 + case 0: return !_values1.isEmpty + case 1: return !_values2.isEmpty + case 2: return !_values3.isEmpty + case 3: return !_values4.isEmpty + case 4: return !_values5.isEmpty + case 5: return !_values6.isEmpty default: rxFatalError("Unhandled case (Function)") @@ -524,7 +607,7 @@ class ZipSink6_ : ZipSink { } } -class Zip6 : Producer { +final class Zip6 : Producer { typealias ResultSelector = (E1, E2, E3, E4, E5, E6) throws -> R let source1: Observable @@ -558,7 +641,7 @@ class Zip6 : Producer { // 7 -extension Observable { +extension ObservableType { /** 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. @@ -567,7 +650,6 @@ extension Observable { - 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 (_ 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) -> Observable { @@ -578,7 +660,25 @@ extension Observable { } } -class ZipSink7_ : ZipSink { +extension ObservableType where E == Any { + /** + Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. + + - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) + + - returns: An observable sequence containing the result of combining elements of the sources. + */ + public static func zip + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7) + -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E)> { + return Zip7( + source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), + resultSelector: { ($0, $1, $2, $3, $4, $5, $6) } + ) + } +} + +final class ZipSink7_ : ZipSink { typealias R = O.E typealias Parent = Zip7 @@ -599,13 +699,13 @@ class ZipSink7_ : ZipSink { override func hasElements(_ index: Int) -> Bool { switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - case 2: return _values3.count > 0 - case 3: return _values4.count > 0 - case 4: return _values5.count > 0 - case 5: return _values6.count > 0 - case 6: return _values7.count > 0 + case 0: return !_values1.isEmpty + case 1: return !_values2.isEmpty + case 2: return !_values3.isEmpty + case 3: return !_values4.isEmpty + case 4: return !_values5.isEmpty + case 5: return !_values6.isEmpty + case 6: return !_values7.isEmpty default: rxFatalError("Unhandled case (Function)") @@ -655,7 +755,7 @@ class ZipSink7_ : ZipSink { } } -class Zip7 : Producer { +final class Zip7 : Producer { typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7) throws -> R let source1: Observable @@ -691,7 +791,7 @@ class Zip7 : Producer { // 8 -extension Observable { +extension ObservableType { /** 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. @@ -700,7 +800,6 @@ extension Observable { - 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 (_ 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) -> Observable { @@ -711,7 +810,25 @@ extension Observable { } } -class ZipSink8_ : ZipSink { +extension ObservableType where E == Any { + /** + Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. + + - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) + + - returns: An observable sequence containing the result of combining elements of the sources. + */ + public static func zip + (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8) + -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E)> { + return Zip8( + source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), source8: source8.asObservable(), + resultSelector: { ($0, $1, $2, $3, $4, $5, $6, $7) } + ) + } +} + +final class ZipSink8_ : ZipSink { typealias R = O.E typealias Parent = Zip8 @@ -733,14 +850,14 @@ class ZipSink8_ : ZipSink { override func hasElements(_ index: Int) -> Bool { switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - case 2: return _values3.count > 0 - case 3: return _values4.count > 0 - case 4: return _values5.count > 0 - case 5: return _values6.count > 0 - case 6: return _values7.count > 0 - case 7: return _values8.count > 0 + case 0: return !_values1.isEmpty + case 1: return !_values2.isEmpty + case 2: return !_values3.isEmpty + case 3: return !_values4.isEmpty + case 4: return !_values5.isEmpty + case 5: return !_values6.isEmpty + case 6: return !_values7.isEmpty + case 7: return !_values8.isEmpty default: rxFatalError("Unhandled case (Function)") @@ -794,7 +911,7 @@ class ZipSink8_ : ZipSink { } } -class Zip8 : Producer { +final class Zip8 : Producer { typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7, E8) throws -> R let source1: Observable diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Zip.swift b/Example/Pods/RxSwift/RxSwift/Observables/Zip.swift similarity index 91% rename from Example/Pods/RxSwift/RxSwift/Observables/Implementations/Zip.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Zip.swift index 0cd273c..a283bf2 100644 --- a/Example/Pods/RxSwift/RxSwift/Observables/Implementations/Zip.swift +++ b/Example/Pods/RxSwift/RxSwift/Observables/Zip.swift @@ -6,8 +6,6 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - protocol ZipSinkProtocol : class { func next(_ index: Int) @@ -20,7 +18,7 @@ class ZipSink : Sink, ZipSinkProtocol { let _arity: Int - let _lock = NSRecursiveLock() + let _lock = RecursiveLock() // state private var _isDone: [Bool] @@ -33,11 +31,11 @@ class ZipSink : Sink, ZipSinkProtocol { } func getResult() throws -> Element { - abstractMethod() + rxAbstractMethod() } func hasElements(_ index: Int) -> Bool { - abstractMethod() + rxAbstractMethod() } func next(_ index: Int) { @@ -102,7 +100,7 @@ class ZipSink : Sink, ZipSinkProtocol { } } -class ZipObserver +final class ZipObserver : ObserverType , LockOwnerType , SynchronizedOnType { @@ -111,14 +109,14 @@ class ZipObserver private var _parent: ZipSinkProtocol? - let _lock: NSRecursiveLock + let _lock: RecursiveLock // state private let _index: Int private let _this: Disposable private let _setNextValue: ValueSetter - init(lock: NSRecursiveLock, parent: ZipSinkProtocol, index: Int, setNextValue: @escaping ValueSetter, this: Disposable) { + init(lock: RecursiveLock, parent: ZipSinkProtocol, index: Int, setNextValue: @escaping ValueSetter, this: Disposable) { _lock = lock _parent = parent _index = index diff --git a/Example/Pods/RxSwift/RxSwift/ObserverType.swift b/Example/Pods/RxSwift/RxSwift/ObserverType.swift index b604e63..e3ed7aa 100644 --- a/Example/Pods/RxSwift/RxSwift/ObserverType.swift +++ b/Example/Pods/RxSwift/RxSwift/ObserverType.swift @@ -1,56 +1,40 @@ // // ObserverType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/8/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -/** -Supports push-style iteration over an observable sequence. -*/ +/// Supports push-style iteration over an observable sequence. public protocol ObserverType { - /** - The type of elements in sequence that observer can observe. - */ + /// The type of elements in sequence that observer can observe. associatedtype E - /** - Notify observer about sequence event. - - - parameter event: Event that occured. - */ + /// Notify observer about sequence event. + /// + /// - parameter event: Event that occurred. func on(_ event: Event) } -/** -Convenience API extensions to provide alternate next, error, completed events -*/ -public extension ObserverType { - - /** - Convenience method equivalent to `on(.next(element: E))` +/// Convenience API extensions to provide alternate next, error, completed events +extension ObserverType { - - parameter element: Next element to send to observer(s) - */ - final func onNext(_ element: E) { + /// Convenience method equivalent to `on(.next(element: E))` + /// + /// - parameter element: Next element to send to observer(s) + public func onNext(_ element: E) { on(.next(element)) } - /** - Convenience method equivalent to `on(.completed)` - */ - final func onCompleted() { + /// Convenience method equivalent to `on(.completed)` + public func onCompleted() { on(.completed) } - /** - Convenience method equivalent to `on(.error(Swift.Error))` - - parameter error: Swift.Error to send to observer(s) - */ - final func onError(_ error: Swift.Error) { + /// Convenience method equivalent to `on(.error(Swift.Error))` + /// - parameter error: Swift.Error to send to observer(s) + public func onError(_ error: Swift.Error) { on(.error(error)) } } diff --git a/Example/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift b/Example/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift index 72376e4..54e83f5 100644 --- a/Example/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift +++ b/Example/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift @@ -1,14 +1,12 @@ // // AnonymousObserver.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/8/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -class AnonymousObserver : ObserverBase { +final class AnonymousObserver : ObserverBase { typealias Element = ElementType typealias EventHandler = (Event) -> Void @@ -17,7 +15,7 @@ class AnonymousObserver : ObserverBase { init(_ eventHandler: @escaping EventHandler) { #if TRACE_RESOURCES - let _ = AtomicIncrement(&resourceCount) + let _ = Resources.incrementTotal() #endif _eventHandler = eventHandler } @@ -28,7 +26,7 @@ class AnonymousObserver : ObserverBase { #if TRACE_RESOURCES deinit { - let _ = AtomicDecrement(&resourceCount) + let _ = Resources.decrementTotal() } #endif } diff --git a/Example/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift b/Example/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift index 4ff3fe0..9648daf 100644 --- a/Example/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift +++ b/Example/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift @@ -1,39 +1,34 @@ // // ObserverBase.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/15/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - class ObserverBase : Disposable, ObserverType { typealias E = ElementType - private var _isStopped: AtomicInt = 0 + private var _isStopped = AtomicInt(0) func on(_ event: Event) { switch event { case .next: - if _isStopped == 0 { + if _isStopped.load() == 0 { onCore(event) } case .error, .completed: - - if !AtomicCompareAndSwap(0, 1, &_isStopped) { - return + if _isStopped.fetchOr(1) == 0 { + onCore(event) } - - onCore(event) } } func onCore(_ event: Event) { - abstractMethod() + rxAbstractMethod() } func dispose() { - _isStopped = 1 + _isStopped.fetchOr(1) } } diff --git a/Example/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift b/Example/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift index d58be82..48a599d 100644 --- a/Example/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift +++ b/Example/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift @@ -1,13 +1,11 @@ // // TailRecursiveSink.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 3/21/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - enum TailRecursiveSinkCommand { case moveNext case dispose @@ -64,7 +62,7 @@ class TailRecursiveSink } func extract(_ observable: Observable) -> SequenceGenerator? { - abstractMethod() + rxAbstractMethod() } // should be done on gate locked @@ -122,18 +120,18 @@ class TailRecursiveSink } } while next == nil - if next == nil { + guard let existingNext = next else { done() return } let disposable = SingleAssignmentDisposable() _subscription.disposable = disposable - disposable.setDisposable(subscribeToNext(next!)) + disposable.setDisposable(subscribeToNext(existingNext)) } func subscribeToNext(_ source: Observable) -> Disposable { - abstractMethod() + rxAbstractMethod() } func disposeCommand() { @@ -145,6 +143,7 @@ class TailRecursiveSink super.dispose() _subscription.dispose() + _gate.dispose() schedule(.dispose) } diff --git a/Example/Pods/RxSwift/RxSwift/Platform/Platform.Linux.swift b/Example/Pods/RxSwift/RxSwift/Platform/Platform.Linux.swift deleted file mode 100644 index ff7c043..0000000 --- a/Example/Pods/RxSwift/RxSwift/Platform/Platform.Linux.swift +++ /dev/null @@ -1,222 +0,0 @@ -// -// Platform.Linux.swift -// Rx -// -// Created by Krunoslav Zaher on 12/29/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -#if os(Linux) - //////////////////////////////////////////////////////////////////////////////// - // This is not the greatest API in the world, this is just a tribute. - // !!! Proof of concept until libdispatch becomes operational. !!! - //////////////////////////////////////////////////////////////////////////////// - - import Foundation - import XCTest - import Glibc - import SwiftShims - - // MARK: CoreFoundation run loop mock - - public typealias CFRunLoopRef = Int - public let kCFRunLoopDefaultMode = "CFRunLoopDefaultMode" - - typealias Action = () -> () - - var queue = Queue(capacity: 100) - - var runLoopCounter = 0 - - extension NSThread { - public var isMainThread: Bool { - return true - } - } - - public func CFRunLoopWakeUp(_ runLoop: CFRunLoopRef) { - } - - public func CFRunLoopStop(_ runLoop: CFRunLoopRef) { - runLoopCounter -= 1 - } - - public func CFRunLoopPerformBlock(_ runLoop: CFRunLoopRef, _ mode: String, _ action: () -> ()) { - queue.enqueue(element: action) - } - - public func CFRunLoopRun() { - runLoopCounter += 1 - let currentValueOfCounter = runLoopCounter - while let front = queue.dequeue() { - front() - if runLoopCounter < currentValueOfCounter - 1 { - fatalError("called stop twice") - } - - if runLoopCounter == currentValueOfCounter - 1 { - break - } - } - } - - public func CFRunLoopGetCurrent() -> CFRunLoopRef { - return 0 - } - - // MARK: Atomic, just something that works for single thread case - - #if TRACE_RESOURCES - public typealias AtomicInt = Int64 - #else - typealias AtomicInt = Int64 - #endif - - func AtomicIncrement(_ increment: UnsafeMutablePointer) -> AtomicInt { - increment.memory = increment.memory + 1 - return increment.memory - } - - func AtomicDecrement(_ increment: UnsafeMutablePointer) -> AtomicInt { - increment.memory = increment.memory - 1 - return increment.memory - } - - func AtomicCompareAndSwap(_ l: AtomicInt, _ r: AtomicInt, _ target: UnsafeMutablePointer) -> Bool { - //return __sync_val_compare_and_swap(target, l, r) - if target.memory == l { - target.memory = r - return true - } - - return false - } - - extension NSThread { - static func setThreadLocalStorageValue(value: T?, forKey key: String) { - let currentThread = NSThread.currentThread() - var threadDictionary = currentThread.threadDictionary - - if let newValue = value { - threadDictionary[key] = newValue - } - else { - threadDictionary[key] = nil - } - - currentThread.threadDictionary = threadDictionary - } - - static func getThreadLocalStorageValueForKey(key: String) -> T? { - let currentThread = NSThread.currentThread() - let threadDictionary = currentThread.threadDictionary - - return threadDictionary[key] as? T - } - } - - // - - // MARK: objc mock - - public func objc_sync_enter(_ lock: AnyObject) { - } - - public func objc_sync_exit(_ lock: AnyObject) { - - } - - - // MARK: libdispatch - - public typealias dispatch_time_t = Int - public typealias dispatch_source_t = Int - public typealias dispatch_source_type_t = Int - public typealias dispatch_queue_t = Int - public typealias dispatch_object_t = Int - public typealias dispatch_block_t = () -> () - public typealias dispatch_queue_attr_t = Int - public typealias qos_class_t = Int - - public let DISPATCH_QUEUE_SERIAL = 0 - - public let DISPATCH_QUEUE_PRIORITY_HIGH = 1 - public let DISPATCH_QUEUE_PRIORITY_DEFAULT = 2 - public let DISPATCH_QUEUE_PRIORITY_LOW = 3 - - public let QOS_CLASS_USER_INTERACTIVE = 0 - public let QOS_CLASS_USER_INITIATED = 1 - public let QOS_CLASS_DEFAULT = 2 - public let QOS_CLASS_UTILITY = 3 - public let QOS_CLASS_BACKGROUND = 4 - - public let DISPATCH_SOURCE_TYPE_TIMER = 0 - public let DISPATCH_TIME_FOREVER = 1 as UInt64 - public let NSEC_PER_SEC = 1 - - public let DISPATCH_TIME_NOW = -1 - - public func dispatch_time(_ when: dispatch_time_t, _ delta: Int64) -> dispatch_time_t { - return when + Int(delta) - } - - public func dispatch_queue_create(_ label: UnsafePointer, _ attr: dispatch_queue_attr_t!) -> dispatch_queue_t! { - return 0 - } - - public func dispatch_set_target_queue(_ object: dispatch_object_t!, _ queue: dispatch_queue_t!) { - } - - public func dispatch_async(_ queue2: dispatch_queue_t, _ block: dispatch_block_t) { - queue.enqueue(block) - } - - public func dispatch_source_create(_ type: dispatch_source_type_t, _ handle: UInt, _ mask: UInt, _ queue: dispatch_queue_t!) -> dispatch_source_t! { - return 0 - } - - public func dispatch_source_set_timer(_ source: dispatch_source_t, _ start: dispatch_time_t, _ interval: UInt64, _ leeway: UInt64) { - - } - - public func dispatch_source_set_event_handler(_ source: dispatch_source_t, _ handler: dispatch_block_t!) { - queue.enqueue(handler) - } - - public func dispatch_resume(_ object: dispatch_object_t) { - } - - public func dispatch_source_cancel(_ source: dispatch_source_t) { - } - - public func dispatch_get_global_queue(_ identifier: Int, _ flags: UInt) -> dispatch_queue_t! { - return 0 - } - - public func dispatch_get_main_queue() -> dispatch_queue_t! { - return 0 - } - - // MARK: XCTest - - public class Expectation { - public func fulfill() { - } - } - - extension XCTestCase { - public func setUp() { - } - - public func tearDown() { - } - - public func expectationWithDescription(description: String) -> Expectation { - return Expectation() - } - - public func waitForExpectationsWithTimeout(time: NSTimeInterval, action: Swift.Error? -> Void) { - } - } - -#endif diff --git a/Example/Pods/RxSwift/RxSwift/Reactive.swift b/Example/Pods/RxSwift/RxSwift/Reactive.swift index 7b8706d..b873996 100644 --- a/Example/Pods/RxSwift/RxSwift/Reactive.swift +++ b/Example/Pods/RxSwift/RxSwift/Reactive.swift @@ -1,6 +1,6 @@ // // Reactive.swift -// Rx +// RxSwift // // Created by Yury Korolev on 5/2/16. // Copyright © 2016 Krunoslav Zaher. All rights reserved. @@ -23,56 +23,52 @@ */ public struct Reactive { - /** - Base object to extend. - */ + /// Base object to extend. public let base: Base - /** - Creates extensions with base object. - - - parameter base: Base object. - */ + /// Creates extensions with base object. + /// + /// - parameter base: Base object. public init(_ base: Base) { self.base = base } } -/** - A type that has reactive extensions. - */ +/// A type that has reactive extensions. public protocol ReactiveCompatible { + /// Extended type associatedtype CompatibleType - /** - Reactive extensions. - */ - static var rx: Reactive.Type { get } + /// Reactive extensions. + static var rx: Reactive.Type { get set } - /** - Reactive extensions. - */ - var rx: Reactive { get } + /// Reactive extensions. + var rx: Reactive { get set } } -public extension ReactiveCompatible { - /** - Reactive extensions. - */ +extension ReactiveCompatible { + /// Reactive extensions. public static var rx: Reactive.Type { - return Reactive.self + get { + return Reactive.self + } + set { + // this enables using Reactive to "mutate" base type + } } - /** - Reactive extensions. - */ + /// Reactive extensions. public var rx: Reactive { - return Reactive(self) + get { + return Reactive(self) + } + set { + // this enables using Reactive to "mutate" base object + } } } -import Foundation -/** - Extend NSObject with `rx` proxy. -*/ +import class Foundation.NSObject + +/// Extend NSObject with `rx` proxy. extension NSObject: ReactiveCompatible { } diff --git a/Example/Pods/RxSwift/RxSwift/Rx.swift b/Example/Pods/RxSwift/RxSwift/Rx.swift index 1b11ffd..af948fc 100644 --- a/Example/Pods/RxSwift/RxSwift/Rx.swift +++ b/Example/Pods/RxSwift/RxSwift/Rx.swift @@ -1,42 +1,142 @@ // // Rx.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/14/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - #if TRACE_RESOURCES -/// Counts internal Rx resource allocations (Observables, Observers, Disposables, etc.). This provides a simple way to detect leaks during development. -public var resourceCount: AtomicInt = 0 + fileprivate var resourceCount = AtomicInt(0) + + /// Resource utilization information + public struct Resources { + /// Counts internal Rx resource allocations (Observables, Observers, Disposables, etc.). This provides a simple way to detect leaks during development. + public static var total: Int32 { + return resourceCount.load() + } + + /// Increments `Resources.total` resource count. + /// + /// - returns: New resource count + public static func incrementTotal() -> Int32 { + return resourceCount.increment() + } + + /// Decrements `Resources.total` resource count + /// + /// - returns: New resource count + public static func decrementTotal() -> Int32 { + return resourceCount.decrement() + } + } #endif /// Swift does not implement abstract methods. This method is used as a runtime check to ensure that methods which intended to be abstract (i.e., they should be implemented in subclasses) are not called directly on the superclass. -func abstractMethod() -> Swift.Never { - rxFatalError("Abstract method") +func rxAbstractMethod(file: StaticString = #file, line: UInt = #line) -> Swift.Never { + rxFatalError("Abstract method", file: file, line: line) } -func rxFatalError(_ lastMessage: String) -> Swift.Never { +func rxFatalError(_ lastMessage: @autoclosure () -> String, file: StaticString = #file, line: UInt = #line) -> Swift.Never { // The temptation to comment this line is great, but please don't, it's for your own good. The choice is yours. - fatalError(lastMessage) + fatalError(lastMessage(), file: file, line: line) +} + +func rxFatalErrorInDebug(_ lastMessage: @autoclosure () -> String, file: StaticString = #file, line: UInt = #line) { + #if DEBUG + fatalError(lastMessage(), file: file, line: line) + #else + print("\(file):\(line): \(lastMessage())") + #endif } func incrementChecked(_ i: inout Int) throws -> Int { if i == Int.max { throw RxError.overflow } - let result = i - i += 1 - return result + defer { i += 1 } + return i } func decrementChecked(_ i: inout Int) throws -> Int { if i == Int.min { throw RxError.overflow } - let result = i - i -= 1 - return result + defer { i -= 1 } + return i +} + +#if DEBUG + import class Foundation.Thread + final class SynchronizationTracker { + private let _lock = RecursiveLock() + + public enum SynchronizationErrorMessages: String { + case variable = "Two different threads are trying to assign the same `Variable.value` unsynchronized.\n This is undefined behavior because the end result (variable value) is nondeterministic and depends on the \n operating system thread scheduler. This will cause random behavior of your program.\n" + case `default` = "Two different unsynchronized threads are trying to send some event simultaneously.\n This is undefined behavior because the ordering of the effects caused by these events is nondeterministic and depends on the \n operating system thread scheduler. This will result in a random behavior of your program.\n" + } + + private var _threads = Dictionary() + + private func synchronizationError(_ message: String) { + #if FATAL_SYNCHRONIZATION + rxFatalError(message) + #else + print(message) + #endif + } + + func register(synchronizationErrorMessage: SynchronizationErrorMessages) { + _lock.lock(); defer { _lock.unlock() } + let pointer = Unmanaged.passUnretained(Thread.current).toOpaque() + let count = (_threads[pointer] ?? 0) + 1 + + if count > 1 { + synchronizationError( + "⚠️ Reentrancy anomaly was detected.\n" + + " > Debugging: To debug this issue you can set a breakpoint in \(#file):\(#line) and observe the call stack.\n" + + " > Problem: This behavior is breaking the observable sequence grammar. `next (error | completed)?`\n" + + " This behavior breaks the grammar because there is overlapping between sequence events.\n" + + " Observable sequence is trying to send an event before sending of previous event has finished.\n" + + " > Interpretation: This could mean that there is some kind of unexpected cyclic dependency in your code,\n" + + " or that the system is not behaving in the expected way.\n" + + " > Remedy: If this is the expected behavior this message can be suppressed by adding `.observeOn(MainScheduler.asyncInstance)`\n" + + " or by enqueing sequence events in some other way.\n" + ) + } + + _threads[pointer] = count + + if _threads.count > 1 { + synchronizationError( + "⚠️ Synchronization anomaly was detected.\n" + + " > Debugging: To debug this issue you can set a breakpoint in \(#file):\(#line) and observe the call stack.\n" + + " > Problem: This behavior is breaking the observable sequence grammar. `next (error | completed)?`\n" + + " This behavior breaks the grammar because there is overlapping between sequence events.\n" + + " Observable sequence is trying to send an event before sending of previous event has finished.\n" + + " > Interpretation: " + synchronizationErrorMessage.rawValue + + " > Remedy: If this is the expected behavior this message can be suppressed by adding `.observeOn(MainScheduler.asyncInstance)`\n" + + " or by synchronizing sequence events in some other way.\n" + ) + } + } + + func unregister() { + _lock.lock(); defer { _lock.unlock() } + let pointer = Unmanaged.passUnretained(Thread.current).toOpaque() + _threads[pointer] = (_threads[pointer] ?? 1) - 1 + if _threads[pointer] == 0 { + _threads[pointer] = nil + } + } + } + +#endif + +/// RxSwift global hooks +public enum Hooks { + + // Should capture call stack + public static var recordCallStackOnError: Bool = false + } diff --git a/Example/Pods/RxSwift/RxSwift/RxMutableBox.swift b/Example/Pods/RxSwift/RxSwift/RxMutableBox.swift index 83ff9f7..7f3c333 100644 --- a/Example/Pods/RxSwift/RxSwift/RxMutableBox.swift +++ b/Example/Pods/RxSwift/RxSwift/RxMutableBox.swift @@ -6,31 +6,21 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -/** -Creates mutable reference wrapper for any type. -*/ -class RxMutableBox : CustomDebugStringConvertible { - /** - Wrapped value - */ +/// Creates mutable reference wrapper for any type. +final class RxMutableBox : CustomDebugStringConvertible { + /// Wrapped value var value : T - /** - Creates reference wrapper for `value`. - - - parameter value: Value to wrap. - */ + /// Creates reference wrapper for `value`. + /// + /// - parameter value: Value to wrap. init (_ value: T) { self.value = value } } extension RxMutableBox { - /** - - returns: Box description. - */ + /// - returns: Box description. var debugDescription: String { return "MutatingBox(\(self.value))" } diff --git a/Example/Pods/RxSwift/RxSwift/SchedulerType.swift b/Example/Pods/RxSwift/RxSwift/SchedulerType.swift index ba92ff1..bdfcf8b 100644 --- a/Example/Pods/RxSwift/RxSwift/SchedulerType.swift +++ b/Example/Pods/RxSwift/RxSwift/SchedulerType.swift @@ -1,31 +1,24 @@ // // SchedulerType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/8/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +import struct Foundation.TimeInterval +import struct Foundation.Date -/** -Type that represents time interval in the context of RxSwift. -*/ +// Type that represents time interval in the context of RxSwift. public typealias RxTimeInterval = TimeInterval -/** -Type that represents absolute time in the context of RxSwift. -*/ +/// Type that represents absolute time in the context of RxSwift. public typealias RxTime = Date -/** -Represents an object that schedules units of work. -*/ +/// Represents an object that schedules units of work. public protocol SchedulerType: ImmediateSchedulerType { - /** - - returns: Current time. - */ + /// - returns: Current time. var now : RxTime { get } diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift index 56da6e0..aa1f480 100644 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift +++ b/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift @@ -6,13 +6,13 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +import struct Foundation.Date +import struct Foundation.TimeInterval +import Dispatch -/** -Abstracts the work that needs to be performed on a specific `dispatch_queue_t`. You can also pass a serial dispatch queue, it shouldn't cause any problems. - -This scheduler is suitable when some work needs to be performed in background. -*/ +/// Abstracts the work that needs to be performed on a specific `dispatch_queue_t`. You can also pass a serial dispatch queue, it shouldn't cause any problems. +/// +/// This scheduler is suitable when some work needs to be performed in background. public class ConcurrentDispatchQueueScheduler: SchedulerType { public typealias TimeInterval = Foundation.TimeInterval public typealias Time = Date @@ -23,26 +23,23 @@ public class ConcurrentDispatchQueueScheduler: SchedulerType { let configuration: DispatchQueueConfiguration - /** - Constructs new `ConcurrentDispatchQueueScheduler` that wraps `queue`. - - - parameter queue: Target dispatch queue. - */ + /// Constructs new `ConcurrentDispatchQueueScheduler` that wraps `queue`. + /// + /// - parameter queue: Target dispatch queue. + /// - parameter leeway: The amount of time, in nanoseconds, that the system will defer the timer. public init(queue: DispatchQueue, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { configuration = DispatchQueueConfiguration(queue: queue, leeway: leeway) } - /** - Convenience init for scheduler that wraps one of the global concurrent dispatch queues. - - - parameter globalConcurrentQueueQOS: Target global dispatch queue, by quality of service class. - */ + /// Convenience init for scheduler that wraps one of the global concurrent dispatch queues. + /// + /// - parameter qos: Target global dispatch queue, by quality of service class. + /// - parameter leeway: The amount of time, in nanoseconds, that the system will defer the timer. @available(iOS 8, OSX 10.10, *) - public convenience init(globalConcurrentQueueQOS: DispatchQueueSchedulerQOS, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { - let priority = globalConcurrentQueueQOS.qos + public convenience init(qos: DispatchQoS, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { self.init(queue: DispatchQueue( - label: "rxswift.queue.\(globalConcurrentQueueQOS)", - qos: priority, + label: "rxswift.queue.\(qos)", + qos: qos, attributes: [DispatchQueue.Attributes.concurrent], target: nil), leeway: leeway @@ -50,7 +47,7 @@ public class ConcurrentDispatchQueueScheduler: SchedulerType { } /** - Schedules an action to be executed immediatelly. + Schedules an action to be executed immediately. - parameter state: State passed to the action to be executed. - parameter action: Action to be executed. diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift index 03a369d..a98ad21 100644 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift +++ b/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift @@ -1,12 +1,14 @@ // // ConcurrentMainScheduler.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 10/17/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +import struct Foundation.Date +import struct Foundation.TimeInterval +import Dispatch /** Abstracts work that needs to be performed on `MainThread`. In case `schedule` methods are called from main thread, it will perform action immediately without scheduling. @@ -21,9 +23,7 @@ public final class ConcurrentMainScheduler : SchedulerType { private let _mainScheduler: MainScheduler private let _mainQueue: DispatchQueue - /** - - returns: Current time. - */ + /// - returns: Current time. public var now : Date { return _mainScheduler.now as Date } @@ -33,20 +33,18 @@ public final class ConcurrentMainScheduler : SchedulerType { _mainScheduler = mainScheduler } - /** - Singleton instance of `ConcurrentMainScheduler` - */ + /// Singleton instance of `ConcurrentMainScheduler` public static let instance = ConcurrentMainScheduler(mainScheduler: MainScheduler.instance) /** - Schedules an action to be executed immediatelly. + Schedules an action to be executed immediately. - parameter state: State passed to the action to be executed. - parameter action: Action to be executed. - returns: The disposable object used to cancel the scheduled action (best effort). */ public func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - if Thread.current.isMainThread { + if DispatchQueue.isMain { return action(state) } diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift index 87936aa..0676444 100644 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift +++ b/Example/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift @@ -1,96 +1,92 @@ // // CurrentThreadScheduler.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 8/30/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +import class Foundation.NSObject +import protocol Foundation.NSCopying +import class Foundation.Thread +import Dispatch #if os(Linux) - let CurrentThreadSchedulerKeyInstance = "RxSwift.CurrentThreadScheduler.SchedulerKey" - let CurrentThreadSchedulerQueueKeyInstance = "RxSwift.CurrentThreadScheduler.Queue" - - typealias CurrentThreadSchedulerValue = NSString - let CurrentThreadSchedulerValueInstance = "RxSwift.CurrentThreadScheduler.SchedulerKey" as NSString + import struct Foundation.pthread_key_t + import func Foundation.pthread_setspecific + import func Foundation.pthread_getspecific + import func Foundation.pthread_key_create + + fileprivate enum CurrentThreadSchedulerQueueKey { + fileprivate static let instance = "RxSwift.CurrentThreadScheduler.Queue" + } #else - // temporary workaround - - let CurrentThreadSchedulerKeyInstance = "RxSwift.CurrentThreadScheduler.SchedulerKey" - let CurrentThreadSchedulerQueueKeyInstance = "RxSwift.CurrentThreadScheduler.Queue" - - typealias CurrentThreadSchedulerValue = NSString - let CurrentThreadSchedulerValueInstance = "RxSwift.CurrentThreadScheduler.SchedulerKey" as NSString - - /* - let CurrentThreadSchedulerKeyInstance = CurrentThreadSchedulerKey() - let CurrentThreadSchedulerQueueKeyInstance = CurrentThreadSchedulerQueueKey() - - typealias CurrentThreadSchedulerValue = CurrentThreadSchedulerKey - let CurrentThreadSchedulerValueInstance = CurrentThreadSchedulerKeyInstance - - @objc class CurrentThreadSchedulerKey : NSObject, NSCopying { - override func isEqual(_ object: AnyObject?) -> Bool { - return object === CurrentThreadSchedulerKeyInstance + fileprivate class CurrentThreadSchedulerQueueKey: NSObject, NSCopying { + static let instance = CurrentThreadSchedulerQueueKey() + private override init() { + super.init() } - override var hash: Int { return -904739208 } - - //func copy(with zone: NSZone? = nil) -> AnyObject { - func copyWithZone(zone: NSZone) -> AnyObject { - return CurrentThreadSchedulerKeyInstance + override var hash: Int { + return 0 } - } - @objc class CurrentThreadSchedulerQueueKey : NSObject, NSCopying { - override func isEqual(_ object: AnyObject?) -> Bool { - return object === CurrentThreadSchedulerQueueKeyInstance + public func copy(with zone: NSZone? = nil) -> Any { + return self } - - override var hash: Int { return -904739207 } - - //func copy(with: NSZone?) -> AnyObject { - func copyWithZone(zone: NSZone) -> AnyObject { - return CurrentThreadSchedulerQueueKeyInstance - } - }*/ + } #endif -/** -Represents an object that schedules units of work on the current thread. - -This is the default scheduler for operators that generate elements. - -This scheduler is also sometimes called `trampoline scheduler`. -*/ +/// Represents an object that schedules units of work on the current thread. +/// +/// This is the default scheduler for operators that generate elements. +/// +/// This scheduler is also sometimes called `trampoline scheduler`. public class CurrentThreadScheduler : ImmediateSchedulerType { typealias ScheduleQueue = RxMutableBox> - /** - The singleton instance of the current thread scheduler. - */ + /// The singleton instance of the current thread scheduler. public static let instance = CurrentThreadScheduler() + private static var isScheduleRequiredKey: pthread_key_t = { () -> pthread_key_t in + let key = UnsafeMutablePointer.allocate(capacity: 1) + defer { +#if swift(>=4.1) + key.deallocate() +#else + key.deallocate(capacity: 1) +#endif + } + + guard pthread_key_create(key, nil) == 0 else { + rxFatalError("isScheduleRequired key creation failed") + } + + return key.pointee + }() + + private static var scheduleInProgressSentinel: UnsafeRawPointer = { () -> UnsafeRawPointer in + return UnsafeRawPointer(UnsafeMutablePointer.allocate(capacity: 1)) + }() + static var queue : ScheduleQueue? { get { - return Thread.getThreadLocalStorageValueForKey(CurrentThreadSchedulerQueueKeyInstance as NSString) + return Thread.getThreadLocalStorageValueForKey(CurrentThreadSchedulerQueueKey.instance) } set { - Thread.setThreadLocalStorageValue(newValue, forKey: CurrentThreadSchedulerQueueKeyInstance as NSString) + Thread.setThreadLocalStorageValue(newValue, forKey: CurrentThreadSchedulerQueueKey.instance) } } - /** - Gets a value that indicates whether the caller must call a `schedule` method. - */ + /// Gets a value that indicates whether the caller must call a `schedule` method. public static fileprivate(set) var isScheduleRequired: Bool { get { - let value: CurrentThreadSchedulerValue? = Thread.getThreadLocalStorageValueForKey(CurrentThreadSchedulerKeyInstance as NSString) - return value == nil + return pthread_getspecific(CurrentThreadScheduler.isScheduleRequiredKey) == nil } set(isScheduleRequired) { - Thread.setThreadLocalStorageValue(isScheduleRequired ? nil : CurrentThreadSchedulerValueInstance, forKey: CurrentThreadSchedulerKeyInstance as NSString) + if pthread_setspecific(CurrentThreadScheduler.isScheduleRequiredKey, isScheduleRequired ? nil : scheduleInProgressSentinel) != 0 { + rxFatalError("pthread_setspecific failed") + } } } @@ -142,9 +138,7 @@ public class CurrentThreadScheduler : ImmediateSchedulerType { let scheduledItem = ScheduledItem(action: action, state: state) queue.value.enqueue(scheduledItem) - - // In Xcode 7.3, `return scheduledItem` causes segmentation fault 11 on release build. - // To workaround this compiler issue, returns AnonymousDisposable that disposes scheduledItem. - return Disposables.create(with: scheduledItem.dispose) + + return scheduledItem } } diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/DispatchQueueSchedulerQOS.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/DispatchQueueSchedulerQOS.swift deleted file mode 100644 index a816496..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/DispatchQueueSchedulerQOS.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// DispatchQueueSchedulerQOS.swift -// RxSwift -// -// Created by John C. "Hsoi" Daub on 12/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -/** -Identifies one of the global concurrent dispatch queues with specified quality of service class. -*/ -public enum DispatchQueueSchedulerQOS { - - /** - Identifies global dispatch queue with `QOS_CLASS_USER_INTERACTIVE` - */ - case userInteractive - - /** - Identifies global dispatch queue with `QOS_CLASS_USER_INITIATED` - */ - case userInitiated - - /** - Identifies global dispatch queue with `QOS_CLASS_DEFAULT` - */ - case `default` - - /** - Identifies global dispatch queue with `QOS_CLASS_UTILITY` - */ - case utility - - /** - Identifies global dispatch queue with `QOS_CLASS_BACKGROUND` - */ - case background -} - - -@available(iOS 8, OSX 10.10, *) -extension DispatchQueueSchedulerQOS { - var qos: DispatchQoS { - switch self { - case .userInteractive: return .userInteractive - case .userInitiated: return .userInitiated - case .default: return .default - case .utility: return .utility - case .background: return .background - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift index 3545244..11af238 100644 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift +++ b/Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift @@ -1,16 +1,14 @@ // // HistoricalScheduler.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 12/27/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +import struct Foundation.Date -/** - Provides a virtual time scheduler that uses `NSDate` for absolute time and `NSTimeInterval` for relative time. -*/ +/// Provides a virtual time scheduler that uses `Date` for absolute time and `NSTimeInterval` for relative time. public class HistoricalScheduler : VirtualTimeScheduler { /** @@ -21,5 +19,4 @@ public class HistoricalScheduler : VirtualTimeScheduler RxTime { return virtualTime } - /** - Returns identical value of argument passed because historical virtual time is equal to real time, just - decoupled from local machine clock. - */ + /// Returns identical value of argument passed because historical virtual time is equal to real time, just + /// decoupled from local machine clock. public func convertToVirtualTime(_ time: RxTime) -> VirtualTimeUnit { return time } - /** - Returns identical value of argument passed because historical virtual time is equal to real time, just - decoupled from local machine clock. - */ + /// Returns identical value of argument passed because historical virtual time is equal to real time, just + /// decoupled from local machine clock. public func convertFromVirtualTimeInterval(_ virtualTimeInterval: VirtualTimeIntervalUnit) -> RxTimeInterval { return virtualTimeInterval } - /** - Returns identical value of argument passed because historical virtual time is equal to real time, just - decoupled from local machine clock. - */ + /// Returns identical value of argument passed because historical virtual time is equal to real time, just + /// decoupled from local machine clock. public func convertToVirtualTimeInterval(_ timeInterval: RxTimeInterval) -> VirtualTimeIntervalUnit { return timeInterval } /** - Offsets `NSDate` by time interval. + Offsets `Date` by time interval. - parameter time: Time. - parameter timeInterval: Time interval offset. @@ -67,9 +53,7 @@ public struct HistoricalSchedulerTimeConverter : VirtualTimeConverterType { return time.addingTimeInterval(offset) } - /** - Compares two `NSDate`s. - */ + /// Compares two `Date`s. public func compareVirtualTime(_ lhs: VirtualTimeUnit, _ rhs: VirtualTimeUnit) -> VirtualTimeComparison { switch lhs.compare(rhs as Date) { case .orderedAscending: diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/ImmediateScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/ImmediateScheduler.swift deleted file mode 100644 index b1ff684..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/ImmediateScheduler.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// ImmediateScheduler.swift -// Rx -// -// Created by Krunoslav Zaher on 10/17/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -/** -Represents an object that schedules units of work to run immediately on the current thread. -*/ -private class ImmediateScheduler : ImmediateSchedulerType { - - private let _asyncLock = AsyncLock() - - /** - Schedules an action to be executed immediatelly. - - In case `schedule` is called recursively from inside of `action` callback, scheduled `action` will be enqueued - and executed after current `action`. (`AsyncLock` behavior) - - - parameter state: State passed to the action to be executed. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - let disposable = SingleAssignmentDisposable() - _asyncLock.invoke(AnonymousInvocable { - if disposable.isDisposed { - return - } - disposable.setDisposable(action(state)) - }) - - return disposable - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/AnonymousInvocable.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/AnonymousInvocable.swift deleted file mode 100644 index e74d881..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/AnonymousInvocable.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// AnonymousInvocable.swift -// Rx -// -// Created by Krunoslav Zaher on 11/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -struct AnonymousInvocable : InvocableType { - private let _action: () -> () - - init(_ action: @escaping () -> ()) { - _action = action - } - - func invoke() { - _action() - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift index bd31a1d..f2dfb90 100644 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift +++ b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift @@ -1,12 +1,13 @@ // // DispatchQueueConfiguration.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 7/23/16. // Copyright © 2016 Krunoslav Zaher. All rights reserved. // -import Foundation +import Dispatch +import struct Foundation.TimeInterval struct DispatchQueueConfiguration { let queue: DispatchQueue @@ -42,7 +43,7 @@ extension DispatchQueueConfiguration { let compositeDisposable = CompositeDisposable() let timer = DispatchSource.makeTimerSource(queue: queue) - timer.scheduleOneshot(deadline: deadline) + timer.schedule(deadline: deadline, leeway: leeway) // TODO: // This looks horrible, and yes, it is. @@ -76,8 +77,8 @@ extension DispatchQueueConfiguration { var timerState = state let timer = DispatchSource.makeTimerSource(queue: queue) - timer.scheduleRepeating(deadline: initial, interval: dispatchInterval(period), leeway: leeway) - + timer.schedule(deadline: initial, repeating: dispatchInterval(period), leeway: leeway) + // TODO: // This looks horrible, and yes, it is. // It looks like Apple has made a conceputal change here, and I'm unsure why. diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift index 7f2676b..90445f8 100644 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift +++ b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift @@ -1,13 +1,11 @@ // // InvocableScheduledItem.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 11/7/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - struct InvocableScheduledItem : InvocableType { let _invocable: I diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift index 6a7de26..0dba433 100644 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift +++ b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift @@ -1,13 +1,11 @@ // // InvocableType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 11/7/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - protocol InvocableType { func invoke() } diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift index 5d5ab96..454fb34 100644 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift +++ b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift @@ -1,13 +1,11 @@ // // ScheduledItem.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 9/2/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - struct ScheduledItem : ScheduledItemType , InvocableType { diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift index 2a1eca2..d2b16ca 100644 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift +++ b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift @@ -1,13 +1,11 @@ // // ScheduledItemType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 11/7/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - protocol ScheduledItemType : Cancelable , InvocableType { diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift index 61c01e9..2a72137 100644 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift +++ b/Example/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift @@ -1,15 +1,15 @@ // // MainScheduler.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/8/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +import Dispatch /** -Abstracts work that needs to be performed on `MainThread`. In case `schedule` methods are called from main thread, it will perform action immediately without scheduling. +Abstracts work that needs to be performed on `DispatchQueue.main`. In case `schedule` methods are called from `DispatchQueue.main`, it will perform action immediately without scheduling. This scheduler is usually used to perform UI work. @@ -22,42 +22,34 @@ public final class MainScheduler : SerialDispatchQueueScheduler { private let _mainQueue: DispatchQueue - var numberEnqueued: AtomicInt = 0 + var numberEnqueued = AtomicInt(0) - /** - Initializes new instance of `MainScheduler`. - */ + /// Initializes new instance of `MainScheduler`. public init() { _mainQueue = DispatchQueue.main super.init(serialQueue: _mainQueue) } - /** - Singleton instance of `MainScheduler` - */ + /// Singleton instance of `MainScheduler` public static let instance = MainScheduler() - /** - Singleton instance of `MainScheduler` that always schedules work asynchronously - and doesn't perform optimizations for calls scheduled from main thread. - */ + /// Singleton instance of `MainScheduler` that always schedules work asynchronously + /// and doesn't perform optimizations for calls scheduled from main queue. public static let asyncInstance = SerialDispatchQueueScheduler(serialQueue: DispatchQueue.main) - /** - In case this method is called on a background thread it will throw an exception. - */ + /// In case this method is called on a background thread it will throw an exception. public class func ensureExecutingOnScheduler(errorMessage: String? = nil) { - if !Thread.current.isMainThread { - rxFatalError(errorMessage ?? "Executing on backgound thread. Please use `MainScheduler.instance.schedule` to schedule work on main thread.") + if !DispatchQueue.isMain { + rxFatalError(errorMessage ?? "Executing on background thread. Please use `MainScheduler.instance.schedule` to schedule work on main thread.") } } override func scheduleInternal(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - let currentNumberEnqueued = AtomicIncrement(&numberEnqueued) + let previousNumberEnqueued = numberEnqueued.increment() - if Thread.current.isMainThread && currentNumberEnqueued == 1 { + if DispatchQueue.isMain && previousNumberEnqueued == 0 { let disposable = action(state) - _ = AtomicDecrement(&numberEnqueued) + numberEnqueued.decrement() return disposable } @@ -68,7 +60,7 @@ public final class MainScheduler : SerialDispatchQueueScheduler { _ = action(state) } - _ = AtomicDecrement(&self.numberEnqueued) + self.numberEnqueued.decrement() } return cancel diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift index 38d4922..81ba59f 100644 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift +++ b/Example/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift @@ -1,28 +1,30 @@ // // OperationQueueScheduler.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 4/4/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +import class Foundation.Operation +import class Foundation.OperationQueue +import class Foundation.BlockOperation +import Dispatch -/** -Abstracts the work that needs to be performed on a specific `NSOperationQueue`. - -This scheduler is suitable for cases when there is some bigger chunk of work that needs to be performed in background and you want to fine tune concurrent processing using `maxConcurrentOperationCount`. -*/ +/// Abstracts the work that needs to be performed on a specific `NSOperationQueue`. +/// +/// This scheduler is suitable for cases when there is some bigger chunk of work that needs to be performed in background and you want to fine tune concurrent processing using `maxConcurrentOperationCount`. public class OperationQueueScheduler: ImmediateSchedulerType { public let operationQueue: OperationQueue + public let queuePriority: Operation.QueuePriority - /** - Constructs new instance of `OperationQueueScheduler` that performs work on `operationQueue`. - - - parameter operationQueue: Operation queue targeted to perform work on. - */ - public init(operationQueue: OperationQueue) { + /// Constructs new instance of `OperationQueueScheduler` that performs work on `operationQueue`. + /// + /// - parameter operationQueue: Operation queue targeted to perform work on. + /// - parameter queuePriority: Queue priority which will be assigned to new operations. + public init(operationQueue: OperationQueue, queuePriority: Operation.QueuePriority = .normal) { self.operationQueue = operationQueue + self.queuePriority = queuePriority } /** @@ -33,25 +35,22 @@ public class OperationQueueScheduler: ImmediateSchedulerType { - returns: The disposable object used to cancel the scheduled action (best effort). */ public func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - - let compositeDisposable = CompositeDisposable() - - weak var compositeDisposableWeak = compositeDisposable - + let cancel = SingleAssignmentDisposable() + let operation = BlockOperation { - if compositeDisposableWeak?.isDisposed ?? false { + if cancel.isDisposed { return } - - let disposable = action(state) - let _ = compositeDisposableWeak?.insert(disposable) + + + cancel.setDisposable(action(state)) } + operation.queuePriority = self.queuePriority + self.operationQueue.addOperation(operation) - let _ = compositeDisposable.insert(Disposables.create(with: operation.cancel)) - - return compositeDisposable + return cancel } } diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift index 6ad5456..24d19cc 100644 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift +++ b/Example/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift @@ -6,15 +6,18 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +fileprivate enum ScheduleState { + case initial + case added(CompositeDisposable.DisposeKey) + case done +} -/** -Type erased recursive scheduler. -*/ -class AnyRecursiveScheduler { +/// Type erased recursive scheduler. +final class AnyRecursiveScheduler { + typealias Action = (State, AnyRecursiveScheduler) -> Void - private let _lock = NSRecursiveLock() + private let _lock = RecursiveLock() // state private let _group = CompositeDisposable() @@ -34,11 +37,8 @@ class AnyRecursiveScheduler { - parameter dueTime: Relative time after which to execute the recursive action. */ func schedule(_ state: State, dueTime: RxTimeInterval) { + var scheduleState: ScheduleState = .initial - var isAdded = false - var isDone = false - - var removeKey: CompositeDisposable.DisposeKey? = nil let d = _scheduler.scheduleRelative(state, dueTime: dueTime) { (state) -> Disposable in // best effort if self._group.isDisposed { @@ -46,13 +46,17 @@ class AnyRecursiveScheduler { } let action = self._lock.calculateLocked { () -> Action? in - if isAdded { - self._group.remove(for: removeKey!) + switch scheduleState { + case let .added(removeKey): + self._group.remove(for: removeKey) + case .initial: + break + case .done: + break } - else { - isDone = true - } - + + scheduleState = .done + return self._action } @@ -64,24 +68,30 @@ class AnyRecursiveScheduler { } _lock.performLocked { - if !isDone { - removeKey = _group.insert(d) - isAdded = true + switch scheduleState { + case .added: + rxFatalError("Invalid state") + break + case .initial: + if let removeKey = _group.insert(d) { + scheduleState = .added(removeKey) + } + else { + scheduleState = .done + } + break + case .done: + break } } } - /** - Schedules an action to be executed recursively. - - - parameter state: State passed to the action to be executed. - */ + /// Schedules an action to be executed recursively. + /// + /// - parameter state: State passed to the action to be executed. func schedule(_ state: State) { - - var isAdded = false - var isDone = false - - var removeKey: CompositeDisposable.DisposeKey? = nil + var scheduleState: ScheduleState = .initial + let d = _scheduler.schedule(state) { (state) -> Disposable in // best effort if self._group.isDisposed { @@ -89,12 +99,16 @@ class AnyRecursiveScheduler { } let action = self._lock.calculateLocked { () -> Action? in - if isAdded { - self._group.remove(for: removeKey!) - } - else { - isDone = true + switch scheduleState { + case let .added(removeKey): + self._group.remove(for: removeKey) + case .initial: + break + case .done: + break } + + scheduleState = .done return self._action } @@ -107,9 +121,20 @@ class AnyRecursiveScheduler { } _lock.performLocked { - if !isDone { - removeKey = _group.insert(d) - isAdded = true + switch scheduleState { + case .added: + rxFatalError("Invalid state") + break + case .initial: + if let removeKey = _group.insert(d) { + scheduleState = .added(removeKey) + } + else { + scheduleState = .done + } + break + case .done: + break } } } @@ -122,10 +147,8 @@ class AnyRecursiveScheduler { } } -/** -Type erased recursive scheduler. -*/ -class RecursiveImmediateScheduler { +/// Type erased recursive scheduler. +final class RecursiveImmediateScheduler { typealias Action = (_ state: State, _ recurse: (State) -> Void) -> Void private var _lock = SpinLock() @@ -141,17 +164,12 @@ class RecursiveImmediateScheduler { // immediate scheduling - /** - Schedules an action to be executed recursively. - - - parameter state: State passed to the action to be executed. - */ + /// Schedules an action to be executed recursively. + /// + /// - parameter state: State passed to the action to be executed. func schedule(_ state: State) { - - var isAdded = false - var isDone = false - - var removeKey: CompositeDisposable.DisposeKey? = nil + var scheduleState: ScheduleState = .initial + let d = _scheduler.schedule(state) { (state) -> Disposable in // best effort if self._group.isDisposed { @@ -159,13 +177,17 @@ class RecursiveImmediateScheduler { } let action = self._lock.calculateLocked { () -> Action? in - if isAdded { - self._group.remove(for: removeKey!) + switch scheduleState { + case let .added(removeKey): + self._group.remove(for: removeKey) + case .initial: + break + case .done: + break } - else { - isDone = true - } - + + scheduleState = .done + return self._action } @@ -177,9 +199,20 @@ class RecursiveImmediateScheduler { } _lock.performLocked { - if !isDone { - removeKey = _group.insert(d) - isAdded = true + switch scheduleState { + case .added: + rxFatalError("Invalid state") + break + case .initial: + if let removeKey = _group.insert(d) { + scheduleState = .added(removeKey) + } + else { + scheduleState = .done + } + break + case .done: + break } } } diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift index 9374fc5..ca0a04a 100644 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift +++ b/Example/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift @@ -6,14 +6,12 @@ // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - enum SchedulePeriodicRecursiveCommand { case tick case dispatchStart } -class SchedulePeriodicRecursive { +final class SchedulePeriodicRecursive { typealias RecursiveAction = (State) -> State typealias RecursiveScheduler = AnyRecursiveScheduler @@ -23,7 +21,7 @@ class SchedulePeriodicRecursive { private let _action: RecursiveAction private var _state: State - private var _pendingTickCount: AtomicInt = 0 + private var _pendingTickCount = AtomicInt(0) init(scheduler: SchedulerType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping RecursiveAction, state: State) { _scheduler = scheduler @@ -45,16 +43,16 @@ class SchedulePeriodicRecursive { case .tick: scheduler.schedule(.tick, dueTime: _period) - // The idea is that if on tick there wasn't any item enqueued, schedule to perform work immediatelly. + // The idea is that if on tick there wasn't any item enqueued, schedule to perform work immediately. // Else work will be scheduled after previous enqueued work completes. - if AtomicIncrement(&_pendingTickCount) == 1 { + if _pendingTickCount.increment() == 0 { self.tick(.dispatchStart, scheduler: scheduler) } case .dispatchStart: _state = _action(_state) // Start work and schedule check is this last batch of work - if AtomicDecrement(&_pendingTickCount) > 0 { + if _pendingTickCount.decrement() > 1 { // This gives priority to scheduler emulation, it's not perfect, but helps scheduler.schedule(SchedulePeriodicRecursiveCommand.dispatchStart) } diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift index 01733b0..1a38a73 100644 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift +++ b/Example/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift @@ -1,12 +1,14 @@ // // SerialDispatchQueueScheduler.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/8/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation +import struct Foundation.TimeInterval +import struct Foundation.Date +import Dispatch /** Abstracts the work that needs to be performed on a specific `dispatch_queue_t`. It will make sure @@ -29,15 +31,19 @@ public class SerialDispatchQueueScheduler : SchedulerType { public typealias TimeInterval = Foundation.TimeInterval public typealias Time = Date - /** - - returns: Current time. - */ + /// - returns: Current time. public var now : Date { return Date() } let configuration: DispatchQueueConfiguration + /** + Constructs new `SerialDispatchQueueScheduler` that wraps `serialQueue`. + + - parameter serialQueue: Target dispatch queue. + - parameter leeway: The amount of time, in nanoseconds, that the system will defer the timer. + */ init(serialQueue: DispatchQueue, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { configuration = DispatchQueueConfiguration(queue: serialQueue, leeway: leeway) } @@ -49,6 +55,7 @@ public class SerialDispatchQueueScheduler : SchedulerType { - parameter internalSerialQueueName: Name of internal serial dispatch queue. - parameter serialQueueConfiguration: Additional configuration of internal serial dispatch queue. + - parameter leeway: The amount of time, in nanoseconds, that the system will defer the timer. */ public convenience init(internalSerialQueueName: String, serialQueueConfiguration: ((DispatchQueue) -> Void)? = nil, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { let queue = DispatchQueue(label: internalSerialQueueName, attributes: []) @@ -61,6 +68,7 @@ public class SerialDispatchQueueScheduler : SchedulerType { - parameter queue: Possibly concurrent dispatch queue used to perform work. - parameter internalSerialQueueName: Name of internal serial dispatch queue proxy. + - parameter leeway: The amount of time, in nanoseconds, that the system will defer the timer. */ public convenience init(queue: DispatchQueue, internalSerialQueueName: String, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { // Swift 3.0 IUO @@ -73,17 +81,17 @@ public class SerialDispatchQueueScheduler : SchedulerType { /** Constructs new `SerialDispatchQueueScheduler` that wraps on of the global concurrent dispatch queues. - - parameter globalConcurrentQueueQOS: Identifier for global dispatch queue with specified quality of service class. + - parameter qos: Identifier for global dispatch queue with specified quality of service class. - parameter internalSerialQueueName: Custom name for internal serial dispatch queue proxy. + - parameter leeway: The amount of time, in nanoseconds, that the system will defer the timer. */ @available(iOS 8, OSX 10.10, *) - public convenience init(globalConcurrentQueueQOS: DispatchQueueSchedulerQOS, internalSerialQueueName: String = "rx.global_dispatch_queue.serial", leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { - let priority = globalConcurrentQueueQOS.qos - self.init(queue: DispatchQueue.global(qos: priority.qosClass), internalSerialQueueName: internalSerialQueueName, leeway: leeway) + public convenience init(qos: DispatchQoS, internalSerialQueueName: String = "rx.global_dispatch_queue.serial", leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { + self.init(queue: DispatchQueue.global(qos: qos.qosClass), internalSerialQueueName: internalSerialQueueName, leeway: leeway) } /** - Schedules an action to be executed immediatelly. + Schedules an action to be executed immediately. - parameter state: State passed to the action to be executed. - parameter action: Action to be executed. diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift index c5476a0..a17475a 100644 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift +++ b/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift @@ -1,40 +1,32 @@ // // VirtualTimeConverterType.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 12/23/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -/** -Parametrization for virtual time used by `VirtualTimeScheduler`s. -*/ +/// Parametrization for virtual time used by `VirtualTimeScheduler`s. public protocol VirtualTimeConverterType { - /** - Virtual time unit used that represents ticks of virtual clock. - */ + /// Virtual time unit used that represents ticks of virtual clock. associatedtype VirtualTimeUnit - /** - Virtual time unit used to represent differences of virtual times. - */ + /// Virtual time unit used to represent differences of virtual times. associatedtype VirtualTimeIntervalUnit /** Converts virtual time to real time. - - parameter virtualTime: Virtual time to convert to `NSDate`. - - returns: `NSDate` corresponding to virtual time. + - parameter virtualTime: Virtual time to convert to `Date`. + - returns: `Date` corresponding to virtual time. */ func convertFromVirtualTime(_ virtualTime: VirtualTimeUnit) -> RxTime /** Converts real time to virtual time. - - parameter time: `NSDate` to convert to virtual time. - - returns: Virtual time corresponding to `NSDate`. + - parameter time: `Date` to convert to virtual time. + - returns: Virtual time corresponding to `Date`. */ func convertToVirtualTime(_ time: RxTime) -> VirtualTimeUnit @@ -47,7 +39,7 @@ public protocol VirtualTimeConverterType { func convertFromVirtualTimeInterval(_ virtualTimeInterval: VirtualTimeIntervalUnit) -> RxTimeInterval /** - Converts from virtual time interval to `NSTimeInterval`. + Converts from `NSTimeInterval` to virtual time interval. - parameter timeInterval: `NSTimeInterval` to convert to virtual time interval. - returns: Virtual time interval corresponding to time interval. @@ -64,8 +56,8 @@ public protocol VirtualTimeConverterType { func offsetVirtualTime(_ time: VirtualTimeUnit, offset: VirtualTimeIntervalUnit) -> VirtualTimeUnit /** - This is aditional abstraction because `NSDate` is unfortunately not comparable. - Extending `NSDate` with `Comparable` would be too risky because of possible collisions with other libraries. + This is additional abstraction because `Date` is unfortunately not comparable. + Extending `Date` with `Comparable` would be too risky because of possible collisions with other libraries. */ func compareVirtualTime(_ lhs: VirtualTimeUnit, _ rhs: VirtualTimeUnit) -> VirtualTimeComparison } @@ -73,42 +65,30 @@ public protocol VirtualTimeConverterType { /** Virtual time comparison result. - This is aditional abstraction because `NSDate` is unfortunately not comparable. - Extending `NSDate` with `Comparable` would be too risky because of possible collisions with other libraries. + This is additional abstraction because `Date` is unfortunately not comparable. + Extending `Date` with `Comparable` would be too risky because of possible collisions with other libraries. */ public enum VirtualTimeComparison { - /** - lhs < rhs. - */ + /// lhs < rhs. case lessThan - /** - lhs == rhs. - */ + /// lhs == rhs. case equal - /** - lhs > rhs. - */ + /// lhs > rhs. case greaterThan } extension VirtualTimeComparison { - /** - lhs < rhs. - */ + /// lhs < rhs. var lessThen: Bool { return self == .lessThan } - /** - lhs > rhs - */ + /// lhs > rhs var greaterThan: Bool { return self == .greaterThan } - /** - lhs == rhs - */ + /// lhs == rhs var equal: Bool { return self == .equal } diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift index d1ba5e4..c0e1aa5 100644 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift +++ b/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift @@ -1,19 +1,14 @@ // // VirtualTimeScheduler.swift -// Rx +// RxSwift // // Created by Krunoslav Zaher on 2/14/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // -import Foundation - -/** -Base class for virtual time schedulers using a priority queue for scheduled items. -*/ +/// Base class for virtual time schedulers using a priority queue for scheduled items. open class VirtualTimeScheduler - : SchedulerType - , CustomDebugStringConvertible { + : SchedulerType { public typealias VirtualTime = Converter.VirtualTimeUnit public typealias VirtualTimeInterval = Converter.VirtualTimeIntervalUnit @@ -27,25 +22,19 @@ open class VirtualTimeScheduler private var _nextId = 0 - /** - - returns: Current time. - */ + /// - returns: Current time. public var now: RxTime { return _converter.convertFromVirtualTime(clock) } - /** - - returns: Scheduler's absolute time clock value. - */ + /// - returns: Scheduler's absolute time clock value. public var clock: VirtualTime { return _clock } - /** - Creates a new virtual time scheduler. - - - parameter initialClock: Initial value for the clock. - */ + /// Creates a new virtual time scheduler. + /// + /// - parameter initialClock: Initial value for the clock. public init(initialClock: VirtualTime, converter: Converter) { _clock = initialClock _running = false @@ -59,14 +48,14 @@ open class VirtualTimeScheduler case .greaterThan: return false } - }) + }, isEqual: { $0 === $1 }) #if TRACE_RESOURCES - let _ = AtomicIncrement(&resourceCount) + let _ = Resources.incrementTotal() #endif } /** - Schedules an action to be executed immediatelly. + Schedules an action to be executed immediately. - parameter state: State passed to the action to be executed. - parameter action: Action to be executed. @@ -133,16 +122,12 @@ open class VirtualTimeScheduler return compositeDisposable } - /** - Adjusts time of scheduling before adding item to schedule queue. - */ + /// Adjusts time of scheduling before adding item to schedule queue. open func adjustScheduledTime(_ time: Converter.VirtualTimeUnit) -> Converter.VirtualTimeUnit { return time } - /** - Starts the virtual time scheduler. - */ + /// Starts the virtual time scheduler. public func start() { MainScheduler.ensureExecutingOnScheduler() @@ -180,11 +165,9 @@ open class VirtualTimeScheduler return nil } - /** - Advances the scheduler's clock to the specified time, running all work till that point. - - - parameter virtualTime: Absolute time to advance the scheduler's clock to. - */ + /// Advances the scheduler's clock to the specified time, running all work till that point. + /// + /// - parameter virtualTime: Absolute time to advance the scheduler's clock to. public func advanceTo(_ virtualTime: VirtualTime) { MainScheduler.ensureExecutingOnScheduler() @@ -214,9 +197,7 @@ open class VirtualTimeScheduler _running = false } - /** - Advances the scheduler's clock by the specified relative time. - */ + /// Advances the scheduler's clock by the specified relative time. public func sleep(_ virtualInterval: VirtualTimeInterval) { MainScheduler.ensureExecutingOnScheduler() @@ -228,9 +209,7 @@ open class VirtualTimeScheduler _clock = sleepTo } - /** - Stops the virtual time scheduler. - */ + /// Stops the virtual time scheduler. public func stop() { MainScheduler.ensureExecutingOnScheduler() @@ -239,23 +218,21 @@ open class VirtualTimeScheduler #if TRACE_RESOURCES deinit { - _ = AtomicDecrement(&resourceCount) + _ = Resources.decrementTotal() } #endif } // MARK: description -extension VirtualTimeScheduler { - /** - A textual representation of `self`, suitable for debugging. - */ +extension VirtualTimeScheduler: CustomDebugStringConvertible { + /// A textual representation of `self`, suitable for debugging. public var debugDescription: String { return self._schedulerQueue.debugDescription } } -class VirtualSchedulerItem