From 5d3fa231c6d8427137c97578114b0e90b9a43b9d Mon Sep 17 00:00:00 2001 From: duke Date: Mon, 23 Sep 2019 11:12:52 +0800 Subject: [PATCH 1/7] no message --- .gitignore | 38 + Example/Podfile | 0 Example/Podfile.lock | 30 +- Example/Pods/Alamofire/LICENSE | 2 +- Example/Pods/Alamofire/README.md | 89 +- Example/Pods/Alamofire/Source/AFError.swift | 751 +++-- Example/Pods/Alamofire/Source/Alamofire.swift | 859 ++--- .../Source/DispatchQueue+Alamofire.swift | 12 +- .../Alamofire/Source/MultipartFormData.swift | 198 +- .../Source/NetworkReachabilityManager.swift | 263 +- .../Pods/Alamofire/Source/Notifications.swift | 100 +- .../Alamofire/Source/ParameterEncoding.swift | 287 +- Example/Pods/Alamofire/Source/Request.swift | 1622 ++++++--- Example/Pods/Alamofire/Source/Response.swift | 542 ++- .../Source/ResponseSerialization.swift | 1092 ++++--- Example/Pods/Alamofire/Source/Result.swift | 300 -- .../Alamofire/Source/ServerTrustPolicy.swift | 307 -- .../Alamofire/Source/SessionDelegate.swift | 808 ++--- .../Alamofire/Source/SessionManager.swift | 899 ----- .../Pods/Alamofire/Source/TaskDelegate.swift | 466 --- Example/Pods/Alamofire/Source/Timeline.swift | 136 - .../Pods/Alamofire/Source/Validation.swift | 140 +- .../Local Podspecs/RxNetwork.podspec.json | 6 +- Example/Pods/Manifest.lock | 30 +- Example/Pods/Moya/Sources/Moya/Endpoint.swift | 4 +- .../Moya/Sources/Moya/Moya+Alamofire.swift | 54 +- .../Sources/Moya/MoyaProvider+Defaults.swift | 10 +- .../Sources/Moya/MoyaProvider+Internal.swift | 90 +- .../Pods/Moya/Sources/Moya/MoyaProvider.swift | 8 +- Example/Pods/Moya/Sources/Moya/Plugin.swift | 8 +- .../Moya/Plugins/AccessTokenPlugin.swift | 1 - .../Moya/Plugins/CredentialsPlugin.swift | 3 +- .../Moya/Plugins/NetworkActivityPlugin.swift | 1 - .../Moya/Plugins/NetworkLoggerPlugin.swift | 252 +- .../Sources/RxMoya/Observable+Response.swift | 24 +- .../Moya/Sources/RxMoya/Single+Response.swift | 18 +- Example/Pods/Pods.xcodeproj/project.pbxproj | 2891 ++++++++--------- .../contents.xcworkspacedata | 0 .../xcshareddata/xcschemes/Alamofire.xcscheme | 0 .../xcshareddata/xcschemes/Cache.xcscheme | 0 .../xcshareddata/xcschemes/Moya.xcscheme | 0 .../xcshareddata/xcschemes/Result.xcscheme | 0 .../xcshareddata/xcschemes/RxNetwork.xcscheme | 0 .../xcshareddata/xcschemes/RxSwift.xcscheme | 0 .../xcschemes/Alamofire.xcscheme | 0 .../xcschemes/CleanJSON.xcscheme | 0 .../xcschemes/Moya.xcscheme | 0 .../xcschemes/Pods-RxNetwork_Example.xcscheme | 0 .../xcschemes/Pods-RxNetwork_Tests.xcscheme | 0 .../xcschemes/Result.xcscheme | 0 .../xcschemes/RxNetwork.xcscheme | 0 .../xcschemes/RxSwift.xcscheme | 0 .../xcschemes/Storable.xcscheme | 0 Example/Pods/Result/LICENSE | 21 - Example/Pods/Result/README.md | 112 - Example/Pods/Result/Result/AnyError.swift | 46 - Example/Pods/Result/Result/NoError.swift | 10 - Example/Pods/Result/Result/Result.swift | 229 -- .../Pods/Result/Result/ResultProtocol.swift | 152 - Example/Pods/RxSwift/LICENSE.md | 0 Example/Pods/RxSwift/Platform/AtomicInt.swift | 0 .../RxSwift/Platform/DataStructures/Bag.swift | 0 .../DataStructures/InfiniteSequence.swift | 0 .../DataStructures/PriorityQueue.swift | 0 .../Platform/DataStructures/Queue.swift | 0 .../Platform/DispatchQueue+Extensions.swift | 0 .../RxSwift/Platform/Platform.Darwin.swift | 0 .../RxSwift/Platform/Platform.Linux.swift | 0 .../Pods/RxSwift/Platform/RecursiveLock.swift | 0 Example/Pods/RxSwift/README.md | 0 .../Pods/RxSwift/RxSwift/AnyObserver.swift | 0 Example/Pods/RxSwift/RxSwift/Cancelable.swift | 0 .../RxSwift/Concurrency/AsyncLock.swift | 0 .../RxSwift/RxSwift/Concurrency/Lock.swift | 0 .../RxSwift/Concurrency/LockOwnerType.swift | 0 .../Concurrency/SynchronizedDisposeType.swift | 0 .../Concurrency/SynchronizedOnType.swift | 0 .../SynchronizedUnsubscribeType.swift | 0 .../RxSwift/ConnectableObservableType.swift | 0 .../Pods/RxSwift/RxSwift/Date+Dispatch.swift | 0 Example/Pods/RxSwift/RxSwift/Deprecated.swift | 0 Example/Pods/RxSwift/RxSwift/Disposable.swift | 0 .../Disposables/AnonymousDisposable.swift | 0 .../Disposables/BinaryDisposable.swift | 0 .../Disposables/BooleanDisposable.swift | 0 .../Disposables/CompositeDisposable.swift | 0 .../RxSwift/Disposables/Disposables.swift | 0 .../RxSwift/Disposables/DisposeBag.swift | 0 .../RxSwift/Disposables/DisposeBase.swift | 0 .../RxSwift/Disposables/NopDisposable.swift | 0 .../Disposables/RefCountDisposable.swift | 0 .../Disposables/ScheduledDisposable.swift | 0 .../Disposables/SerialDisposable.swift | 0 .../SingleAssignmentDisposable.swift | 0 .../Disposables/SubscriptionDisposable.swift | 0 Example/Pods/RxSwift/RxSwift/Errors.swift | 0 Example/Pods/RxSwift/RxSwift/Event.swift | 0 .../RxSwift/RxSwift/Extensions/Bag+Rx.swift | 0 .../RxSwift/Extensions/String+Rx.swift | 0 .../RxSwift/RxSwift/GroupedObservable.swift | 0 .../RxSwift/ImmediateSchedulerType.swift | 0 Example/Pods/RxSwift/RxSwift/Observable.swift | 0 .../RxSwift/ObservableConvertibleType.swift | 0 .../RxSwift/ObservableType+Extensions.swift | 0 .../Pods/RxSwift/RxSwift/ObservableType.swift | 0 .../RxSwift/RxSwift/Observables/AddRef.swift | 0 .../RxSwift/RxSwift/Observables/Amb.swift | 0 .../RxSwift/RxSwift/Observables/AsMaybe.swift | 0 .../RxSwift/Observables/AsSingle.swift | 0 .../RxSwift/RxSwift/Observables/Buffer.swift | 0 .../RxSwift/RxSwift/Observables/Catch.swift | 0 .../CombineLatest+Collection.swift | 0 .../Observables/CombineLatest+arity.swift | 0 .../RxSwift/Observables/CombineLatest.swift | 0 .../RxSwift/Observables/CompactMap.swift | 0 .../RxSwift/RxSwift/Observables/Concat.swift | 0 .../RxSwift/RxSwift/Observables/Create.swift | 0 .../RxSwift/Observables/Debounce.swift | 0 .../RxSwift/RxSwift/Observables/Debug.swift | 0 .../RxSwift/Observables/DefaultIfEmpty.swift | 0 .../RxSwift/Observables/Deferred.swift | 0 .../RxSwift/RxSwift/Observables/Delay.swift | 0 .../Observables/DelaySubscription.swift | 0 .../RxSwift/Observables/Dematerialize.swift | 0 .../Observables/DistinctUntilChanged.swift | 0 .../Pods/RxSwift/RxSwift/Observables/Do.swift | 0 .../RxSwift/Observables/ElementAt.swift | 0 .../RxSwift/RxSwift/Observables/Empty.swift | 0 .../RxSwift/Observables/Enumerated.swift | 0 .../RxSwift/RxSwift/Observables/Error.swift | 0 .../RxSwift/RxSwift/Observables/Filter.swift | 0 .../RxSwift/RxSwift/Observables/First.swift | 0 .../RxSwift/Observables/Generate.swift | 0 .../RxSwift/RxSwift/Observables/GroupBy.swift | 0 .../RxSwift/RxSwift/Observables/Just.swift | 0 .../RxSwift/RxSwift/Observables/Map.swift | 0 .../RxSwift/Observables/Materialize.swift | 0 .../RxSwift/RxSwift/Observables/Merge.swift | 0 .../RxSwift/Observables/Multicast.swift | 0 .../RxSwift/RxSwift/Observables/Never.swift | 0 .../RxSwift/Observables/ObserveOn.swift | 0 .../RxSwift/Observables/Optional.swift | 0 .../RxSwift/Observables/Producer.swift | 0 .../RxSwift/RxSwift/Observables/Range.swift | 0 .../RxSwift/RxSwift/Observables/Reduce.swift | 0 .../RxSwift/RxSwift/Observables/Repeat.swift | 0 .../RxSwift/Observables/RetryWhen.swift | 0 .../RxSwift/RxSwift/Observables/Sample.swift | 0 .../RxSwift/RxSwift/Observables/Scan.swift | 0 .../RxSwift/Observables/Sequence.swift | 0 .../Observables/ShareReplayScope.swift | 0 .../RxSwift/Observables/SingleAsync.swift | 0 .../RxSwift/RxSwift/Observables/Sink.swift | 0 .../RxSwift/RxSwift/Observables/Skip.swift | 0 .../RxSwift/Observables/SkipUntil.swift | 0 .../RxSwift/Observables/SkipWhile.swift | 0 .../RxSwift/Observables/StartWith.swift | 0 .../RxSwift/Observables/SubscribeOn.swift | 0 .../RxSwift/RxSwift/Observables/Switch.swift | 0 .../RxSwift/Observables/SwitchIfEmpty.swift | 0 .../RxSwift/RxSwift/Observables/Take.swift | 0 .../RxSwift/Observables/TakeLast.swift | 0 .../RxSwift/Observables/TakeUntil.swift | 0 .../RxSwift/Observables/TakeWhile.swift | 0 .../RxSwift/Observables/Throttle.swift | 0 .../RxSwift/RxSwift/Observables/Timeout.swift | 0 .../RxSwift/RxSwift/Observables/Timer.swift | 0 .../RxSwift/RxSwift/Observables/ToArray.swift | 0 .../RxSwift/RxSwift/Observables/Using.swift | 0 .../RxSwift/RxSwift/Observables/Window.swift | 0 .../RxSwift/Observables/WithLatestFrom.swift | 0 .../RxSwift/Observables/Zip+Collection.swift | 0 .../RxSwift/Observables/Zip+arity.swift | 0 .../RxSwift/RxSwift/Observables/Zip.swift | 0 .../Pods/RxSwift/RxSwift/ObserverType.swift | 0 .../RxSwift/Observers/AnonymousObserver.swift | 0 .../RxSwift/Observers/ObserverBase.swift | 0 .../RxSwift/Observers/TailRecursiveSink.swift | 0 Example/Pods/RxSwift/RxSwift/Reactive.swift | 0 Example/Pods/RxSwift/RxSwift/Rx.swift | 0 .../Pods/RxSwift/RxSwift/RxMutableBox.swift | 0 .../Pods/RxSwift/RxSwift/SchedulerType.swift | 0 .../ConcurrentDispatchQueueScheduler.swift | 0 .../Schedulers/ConcurrentMainScheduler.swift | 0 .../Schedulers/CurrentThreadScheduler.swift | 0 .../Schedulers/HistoricalScheduler.swift | 0 .../HistoricalSchedulerTimeConverter.swift | 0 .../Internal/DispatchQueueConfiguration.swift | 0 .../Internal/InvocableScheduledItem.swift | 0 .../Schedulers/Internal/InvocableType.swift | 0 .../Schedulers/Internal/ScheduledItem.swift | 0 .../Internal/ScheduledItemType.swift | 0 .../RxSwift/Schedulers/MainScheduler.swift | 0 .../Schedulers/OperationQueueScheduler.swift | 0 .../Schedulers/RecursiveScheduler.swift | 0 .../SchedulerServices+Emulation.swift | 0 .../SerialDispatchQueueScheduler.swift | 0 .../Schedulers/VirtualTimeConverterType.swift | 0 .../Schedulers/VirtualTimeScheduler.swift | 0 .../RxSwift/Subjects/AsyncSubject.swift | 0 .../RxSwift/Subjects/BehaviorSubject.swift | 0 .../RxSwift/Subjects/PublishSubject.swift | 0 .../RxSwift/Subjects/ReplaySubject.swift | 0 .../RxSwift/Subjects/SubjectType.swift | 0 .../RxSwift/SwiftSupport/SwiftSupport.swift | 0 .../RxSwift/Traits/Completable+AndThen.swift | 0 .../RxSwift/RxSwift/Traits/Completable.swift | 0 .../Pods/RxSwift/RxSwift/Traits/Maybe.swift | 0 .../ObservableType+PrimitiveSequence.swift | 0 .../Traits/PrimitiveSequence+Zip+arity.swift | 0 .../RxSwift/Traits/PrimitiveSequence.swift | 0 .../Pods/RxSwift/RxSwift/Traits/Single.swift | 0 Example/Pods/Storable/LICENSE | 0 .../Storable/Storable/Classes/Expirable.swift | 0 .../Storable/Storable/Classes/Expiry.swift | 0 .../Storable/Storable/Classes/Storable.swift | 0 .../Storable/Classes/StoringKey.swift | 0 .../Alamofire/Alamofire-Info.plist | 2 +- .../Alamofire/Alamofire-dummy.m | 0 .../Alamofire/Alamofire-prefix.pch | 0 .../Alamofire/Alamofire-umbrella.h | 0 .../Alamofire/Alamofire.modulemap | 0 .../Alamofire/Alamofire.xcconfig | 1 + .../CleanJSON/CleanJSON-Info.plist | 2 +- .../CleanJSON/CleanJSON-dummy.m | 0 .../CleanJSON/CleanJSON-prefix.pch | 0 .../CleanJSON/CleanJSON-umbrella.h | 0 .../CleanJSON/CleanJSON.modulemap | 0 .../CleanJSON/CleanJSON.xcconfig | 0 .../Target Support Files/Moya/Moya-Info.plist | 0 .../Target Support Files/Moya/Moya-dummy.m | 0 .../Target Support Files/Moya/Moya-prefix.pch | 0 .../Target Support Files/Moya/Moya-umbrella.h | 0 .../Target Support Files/Moya/Moya.modulemap | 0 .../Target Support Files/Moya/Moya.xcconfig | 2 +- .../Pods-RxNetwork_Example/Info.plist | 0 .../Pods-RxNetwork_Example-Info.plist | 0 ...xNetwork_Example-acknowledgements.markdown | 26 +- ...s-RxNetwork_Example-acknowledgements.plist | 32 +- .../Pods-RxNetwork_Example-dummy.m | 0 .../Pods-RxNetwork_Example-frameworks.sh | 2 - .../Pods-RxNetwork_Example-umbrella.h | 0 .../Pods-RxNetwork_Example.debug.xcconfig | 6 +- .../Pods-RxNetwork_Example.modulemap | 0 .../Pods-RxNetwork_Example.release.xcconfig | 6 +- .../Pods-RxNetwork_Tests/Info.plist | 0 .../Pods-RxNetwork_Tests-Info.plist | 0 ...-RxNetwork_Tests-acknowledgements.markdown | 0 ...ods-RxNetwork_Tests-acknowledgements.plist | 0 .../Pods-RxNetwork_Tests-dummy.m | 0 .../Pods-RxNetwork_Tests-umbrella.h | 0 .../Pods-RxNetwork_Tests.debug.xcconfig | 6 +- .../Pods-RxNetwork_Tests.modulemap | 0 .../Pods-RxNetwork_Tests.release.xcconfig | 6 +- .../Result/Result-Info.plist | 26 - .../Result/Result-dummy.m | 5 - .../Result/Result-prefix.pch | 12 - .../Result/Result-umbrella.h | 16 - .../Result/Result.modulemap | 6 - .../Result/Result.xcconfig | 9 - .../Target Support Files/RxNetwork/Info.plist | 0 .../RxNetwork/RxNetwork-Info.plist | 2 +- .../RxNetwork/RxNetwork-dummy.m | 0 .../RxNetwork/RxNetwork-prefix.pch | 0 .../RxNetwork/RxNetwork-umbrella.h | 0 .../RxNetwork/RxNetwork.modulemap | 0 .../RxNetwork/RxNetwork.xcconfig | 2 +- .../RxSwift/RxSwift-Info.plist | 0 .../RxSwift/RxSwift-dummy.m | 0 .../RxSwift/RxSwift-prefix.pch | 0 .../RxSwift/RxSwift-umbrella.h | 0 .../RxSwift/RxSwift.modulemap | 0 .../RxSwift/RxSwift.xcconfig | 0 .../Storable/Storable-Info.plist | 0 .../Storable/Storable-dummy.m | 0 .../Storable/Storable-prefix.pch | 0 .../Storable/Storable-umbrella.h | 0 .../Storable/Storable.modulemap | 0 .../Storable/Storable.xcconfig | 0 Example/RxNetwork.xcodeproj/project.pbxproj | 0 .../contents.xcworkspacedata | 0 .../xcschemes/RxNetwork-Example.xcscheme | 0 .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 8 + Example/RxNetwork/AppDelegate.swift | 32 +- Example/RxNetwork/BannerAPI.swift | 0 Example/RxNetwork/BannerModel.swift | 12 +- Example/RxNetwork/Base.lproj/LaunchScreen.xib | 0 Example/RxNetwork/Base.lproj/Main.storyboard | 0 Example/RxNetwork/CleanJSON.swift | 0 .../AppIcon.appiconset/Contents.json | 0 Example/RxNetwork/Info.plist | 0 Example/RxNetwork/Network+Cache.swift | 0 Example/RxNetwork/Network+Demo.swift | 0 Example/RxNetwork/OnCache+Demo.swift | 3 +- Example/RxNetwork/Response+Demo.swift | 5 + Example/RxNetwork/RxNetwork+Demo.swift | 10 + Example/RxNetwork/StoryAPI.swift | 0 Example/RxNetwork/StoryModel.swift | 18 +- Example/RxNetwork/ViewController.swift | 266 +- Example/Tests/Info.plist | 0 Example/Tests/Tests.swift | 0 .../Release-iphoneos/Alamofire.build/dgph | Bin .../Release-iphoneos/Cache.build/dgph | Bin .../Release-iphoneos/Moya.build/dgph | Bin .../Release-iphoneos/Result.build/dgph | Bin .../Release-iphoneos/RxNetwork.build/dgph | Bin .../Release-iphoneos/RxSwift.build/dgph | Bin Gemfile | 0 LICENSE | 0 README.md | 0 RxNetwork.podspec | 2 +- RxNetwork/Assets/.gitkeep | 0 RxNetwork/Classes/.gitkeep | 0 .../Classes/Cacheable/CachingKey+Moya.swift | 0 .../Classes/Cacheable/Observable+Cache.swift | 0 RxNetwork/Classes/Cacheable/OnCache.swift | 0 .../Classes/Cacheable/Single+Cache.swift | 0 .../Classes/Cacheable/TargetType+Cache.swift | 0 RxNetwork/Classes/Core/Configuration.swift | 0 RxNetwork/Classes/Core/Network.swift | 1 - .../Classes/Core/NetworkIndicatorPlugin.swift | 1 - RxNetwork/Classes/Core/TargetType+Rx.swift | 0 fastlane/Fastfile | 0 324 files changed, 5660 insertions(+), 7778 deletions(-) create mode 100644 .gitignore mode change 100644 => 100755 Example/Podfile mode change 100644 => 100755 Example/Podfile.lock delete mode 100644 Example/Pods/Alamofire/Source/Result.swift delete mode 100644 Example/Pods/Alamofire/Source/ServerTrustPolicy.swift delete mode 100644 Example/Pods/Alamofire/Source/SessionManager.swift delete mode 100644 Example/Pods/Alamofire/Source/TaskDelegate.swift delete mode 100644 Example/Pods/Alamofire/Source/Timeline.swift mode change 100644 => 100755 Example/Pods/Local Podspecs/RxNetwork.podspec.json mode change 100644 => 100755 Example/Pods/Manifest.lock mode change 100644 => 100755 Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata mode change 100644 => 100755 Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Alamofire.xcscheme mode change 100644 => 100755 Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Cache.xcscheme mode change 100644 => 100755 Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Moya.xcscheme mode change 100644 => 100755 Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Result.xcscheme mode change 100644 => 100755 Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/RxNetwork.xcscheme mode change 100644 => 100755 Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/RxSwift.xcscheme mode change 100644 => 100755 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Alamofire.xcscheme mode change 100644 => 100755 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/CleanJSON.xcscheme mode change 100644 => 100755 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Moya.xcscheme mode change 100644 => 100755 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Example.xcscheme mode change 100644 => 100755 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Tests.xcscheme mode change 100644 => 100755 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Result.xcscheme mode change 100644 => 100755 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/RxNetwork.xcscheme mode change 100644 => 100755 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/RxSwift.xcscheme mode change 100644 => 100755 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Storable.xcscheme delete mode 100644 Example/Pods/Result/LICENSE delete mode 100644 Example/Pods/Result/README.md delete mode 100644 Example/Pods/Result/Result/AnyError.swift delete mode 100644 Example/Pods/Result/Result/NoError.swift delete mode 100644 Example/Pods/Result/Result/Result.swift delete mode 100644 Example/Pods/Result/Result/ResultProtocol.swift mode change 100644 => 100755 Example/Pods/RxSwift/LICENSE.md mode change 100644 => 100755 Example/Pods/RxSwift/Platform/AtomicInt.swift mode change 100644 => 100755 Example/Pods/RxSwift/Platform/DataStructures/Bag.swift mode change 100644 => 100755 Example/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift mode change 100644 => 100755 Example/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift mode change 100644 => 100755 Example/Pods/RxSwift/Platform/DataStructures/Queue.swift mode change 100644 => 100755 Example/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift mode change 100644 => 100755 Example/Pods/RxSwift/Platform/Platform.Darwin.swift mode change 100644 => 100755 Example/Pods/RxSwift/Platform/Platform.Linux.swift mode change 100644 => 100755 Example/Pods/RxSwift/Platform/RecursiveLock.swift mode change 100644 => 100755 Example/Pods/RxSwift/README.md mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/AnyObserver.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Cancelable.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Concurrency/Lock.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/ConnectableObservableType.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Date+Dispatch.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Deprecated.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Disposable.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Disposables/Disposables.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Errors.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Event.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/GroupedObservable.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observable.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/ObservableType.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/AddRef.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Amb.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/AsSingle.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Buffer.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Catch.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/CompactMap.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Concat.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Create.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Debounce.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Debug.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Deferred.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Delay.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Do.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/ElementAt.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Empty.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Enumerated.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Error.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Filter.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/First.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Generate.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/GroupBy.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Just.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Map.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Materialize.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Merge.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Multicast.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Never.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Optional.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Producer.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Range.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Reduce.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Repeat.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Sample.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Scan.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Sequence.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Sink.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Skip.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/StartWith.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Switch.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Take.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/TakeLast.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Throttle.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Timeout.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Timer.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/ToArray.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Using.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Window.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observables/Zip.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/ObserverType.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Reactive.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Rx.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/RxMutableBox.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/SchedulerType.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Subjects/AsyncSubject.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Subjects/BehaviorSubject.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Subjects/PublishSubject.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Subjects/ReplaySubject.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/SwiftSupport/SwiftSupport.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Traits/Completable+AndThen.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Traits/Completable.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Traits/Maybe.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Traits/ObservableType+PrimitiveSequence.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence+Zip+arity.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence.swift mode change 100644 => 100755 Example/Pods/RxSwift/RxSwift/Traits/Single.swift mode change 100644 => 100755 Example/Pods/Storable/LICENSE mode change 100644 => 100755 Example/Pods/Storable/Storable/Classes/Expirable.swift mode change 100644 => 100755 Example/Pods/Storable/Storable/Classes/Expiry.swift mode change 100644 => 100755 Example/Pods/Storable/Storable/Classes/Storable.swift mode change 100644 => 100755 Example/Pods/Storable/Storable/Classes/StoringKey.swift mode change 100644 => 100755 Example/Pods/Target Support Files/Alamofire/Alamofire-Info.plist mode change 100644 => 100755 Example/Pods/Target Support Files/Alamofire/Alamofire-dummy.m mode change 100644 => 100755 Example/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch mode change 100644 => 100755 Example/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h mode change 100644 => 100755 Example/Pods/Target Support Files/Alamofire/Alamofire.modulemap mode change 100644 => 100755 Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig mode change 100644 => 100755 Example/Pods/Target Support Files/CleanJSON/CleanJSON-Info.plist mode change 100644 => 100755 Example/Pods/Target Support Files/CleanJSON/CleanJSON-dummy.m mode change 100644 => 100755 Example/Pods/Target Support Files/CleanJSON/CleanJSON-prefix.pch mode change 100644 => 100755 Example/Pods/Target Support Files/CleanJSON/CleanJSON-umbrella.h mode change 100644 => 100755 Example/Pods/Target Support Files/CleanJSON/CleanJSON.modulemap mode change 100644 => 100755 Example/Pods/Target Support Files/CleanJSON/CleanJSON.xcconfig mode change 100644 => 100755 Example/Pods/Target Support Files/Moya/Moya-Info.plist mode change 100644 => 100755 Example/Pods/Target Support Files/Moya/Moya-dummy.m mode change 100644 => 100755 Example/Pods/Target Support Files/Moya/Moya-prefix.pch mode change 100644 => 100755 Example/Pods/Target Support Files/Moya/Moya-umbrella.h mode change 100644 => 100755 Example/Pods/Target Support Files/Moya/Moya.modulemap mode change 100644 => 100755 Example/Pods/Target Support Files/Moya/Moya.xcconfig mode change 100644 => 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Info.plist mode change 100644 => 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-Info.plist mode change 100644 => 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.markdown mode change 100644 => 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.plist mode change 100644 => 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-dummy.m mode change 100644 => 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-umbrella.h mode change 100644 => 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.debug.xcconfig mode change 100644 => 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.modulemap mode change 100644 => 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.release.xcconfig mode change 100644 => 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Info.plist mode change 100644 => 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-Info.plist mode change 100644 => 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-acknowledgements.markdown mode change 100644 => 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-acknowledgements.plist mode change 100644 => 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-dummy.m mode change 100644 => 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-umbrella.h mode change 100644 => 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.debug.xcconfig mode change 100644 => 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.modulemap mode change 100644 => 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.release.xcconfig delete mode 100644 Example/Pods/Target Support Files/Result/Result-Info.plist delete mode 100644 Example/Pods/Target Support Files/Result/Result-dummy.m delete mode 100644 Example/Pods/Target Support Files/Result/Result-prefix.pch delete mode 100644 Example/Pods/Target Support Files/Result/Result-umbrella.h delete mode 100644 Example/Pods/Target Support Files/Result/Result.modulemap delete mode 100644 Example/Pods/Target Support Files/Result/Result.xcconfig mode change 100644 => 100755 Example/Pods/Target Support Files/RxNetwork/Info.plist mode change 100644 => 100755 Example/Pods/Target Support Files/RxNetwork/RxNetwork-Info.plist mode change 100644 => 100755 Example/Pods/Target Support Files/RxNetwork/RxNetwork-dummy.m mode change 100644 => 100755 Example/Pods/Target Support Files/RxNetwork/RxNetwork-prefix.pch mode change 100644 => 100755 Example/Pods/Target Support Files/RxNetwork/RxNetwork-umbrella.h mode change 100644 => 100755 Example/Pods/Target Support Files/RxNetwork/RxNetwork.modulemap mode change 100644 => 100755 Example/Pods/Target Support Files/RxNetwork/RxNetwork.xcconfig mode change 100644 => 100755 Example/Pods/Target Support Files/RxSwift/RxSwift-Info.plist mode change 100644 => 100755 Example/Pods/Target Support Files/RxSwift/RxSwift-dummy.m mode change 100644 => 100755 Example/Pods/Target Support Files/RxSwift/RxSwift-prefix.pch mode change 100644 => 100755 Example/Pods/Target Support Files/RxSwift/RxSwift-umbrella.h mode change 100644 => 100755 Example/Pods/Target Support Files/RxSwift/RxSwift.modulemap mode change 100644 => 100755 Example/Pods/Target Support Files/RxSwift/RxSwift.xcconfig mode change 100644 => 100755 Example/Pods/Target Support Files/Storable/Storable-Info.plist mode change 100644 => 100755 Example/Pods/Target Support Files/Storable/Storable-dummy.m mode change 100644 => 100755 Example/Pods/Target Support Files/Storable/Storable-prefix.pch mode change 100644 => 100755 Example/Pods/Target Support Files/Storable/Storable-umbrella.h mode change 100644 => 100755 Example/Pods/Target Support Files/Storable/Storable.modulemap mode change 100644 => 100755 Example/Pods/Target Support Files/Storable/Storable.xcconfig mode change 100644 => 100755 Example/RxNetwork.xcodeproj/project.pbxproj mode change 100644 => 100755 Example/RxNetwork.xcodeproj/project.xcworkspace/contents.xcworkspacedata mode change 100644 => 100755 Example/RxNetwork.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/RxNetwork-Example.xcscheme mode change 100644 => 100755 Example/RxNetwork.xcworkspace/contents.xcworkspacedata create mode 100644 Example/RxNetwork.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist mode change 100644 => 100755 Example/RxNetwork/AppDelegate.swift mode change 100644 => 100755 Example/RxNetwork/BannerAPI.swift mode change 100644 => 100755 Example/RxNetwork/BannerModel.swift mode change 100644 => 100755 Example/RxNetwork/Base.lproj/LaunchScreen.xib mode change 100644 => 100755 Example/RxNetwork/Base.lproj/Main.storyboard mode change 100644 => 100755 Example/RxNetwork/CleanJSON.swift mode change 100644 => 100755 Example/RxNetwork/Images.xcassets/AppIcon.appiconset/Contents.json mode change 100644 => 100755 Example/RxNetwork/Info.plist mode change 100644 => 100755 Example/RxNetwork/Network+Cache.swift mode change 100644 => 100755 Example/RxNetwork/Network+Demo.swift mode change 100644 => 100755 Example/RxNetwork/OnCache+Demo.swift mode change 100644 => 100755 Example/RxNetwork/Response+Demo.swift mode change 100644 => 100755 Example/RxNetwork/RxNetwork+Demo.swift mode change 100644 => 100755 Example/RxNetwork/StoryAPI.swift mode change 100644 => 100755 Example/RxNetwork/StoryModel.swift mode change 100644 => 100755 Example/RxNetwork/ViewController.swift mode change 100644 => 100755 Example/Tests/Info.plist mode change 100644 => 100755 Example/Tests/Tests.swift mode change 100644 => 100755 Example/build/Pods.build/Release-iphoneos/Alamofire.build/dgph mode change 100644 => 100755 Example/build/Pods.build/Release-iphoneos/Cache.build/dgph mode change 100644 => 100755 Example/build/Pods.build/Release-iphoneos/Moya.build/dgph mode change 100644 => 100755 Example/build/Pods.build/Release-iphoneos/Result.build/dgph mode change 100644 => 100755 Example/build/Pods.build/Release-iphoneos/RxNetwork.build/dgph mode change 100644 => 100755 Example/build/Pods.build/Release-iphoneos/RxSwift.build/dgph mode change 100644 => 100755 Gemfile mode change 100644 => 100755 LICENSE mode change 100644 => 100755 README.md mode change 100644 => 100755 RxNetwork.podspec mode change 100644 => 100755 RxNetwork/Assets/.gitkeep mode change 100644 => 100755 RxNetwork/Classes/.gitkeep mode change 100644 => 100755 RxNetwork/Classes/Cacheable/CachingKey+Moya.swift mode change 100644 => 100755 RxNetwork/Classes/Cacheable/Observable+Cache.swift mode change 100644 => 100755 RxNetwork/Classes/Cacheable/OnCache.swift mode change 100644 => 100755 RxNetwork/Classes/Cacheable/Single+Cache.swift mode change 100644 => 100755 RxNetwork/Classes/Cacheable/TargetType+Cache.swift mode change 100644 => 100755 RxNetwork/Classes/Core/Configuration.swift mode change 100644 => 100755 RxNetwork/Classes/Core/Network.swift mode change 100644 => 100755 RxNetwork/Classes/Core/NetworkIndicatorPlugin.swift mode change 100644 => 100755 RxNetwork/Classes/Core/TargetType+Rx.swift mode change 100644 => 100755 fastlane/Fastfile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f784895 --- /dev/null +++ b/.gitignore @@ -0,0 +1,38 @@ +# OS X +.DS_Store + +# Xcode +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ +*.xccheckout +profile +*.moved-aside +DerivedData +*.hmap +*.ipa + +# Bundler +.bundle + +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control +# +# Note: if you ignore the Pods directory, make sure to uncomment +# `pod install` in .travis.yml +# +Pods/ +Example/Pods/ diff --git a/Example/Podfile b/Example/Podfile old mode 100644 new mode 100755 diff --git a/Example/Podfile.lock b/Example/Podfile.lock old mode 100644 new mode 100755 index 7fa7f1f..ce8b193 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,18 +1,16 @@ PODS: - - Alamofire (4.8.2) - - CleanJSON (0.9.3) - - Moya/Core (14.0.0-alpha.1): - - Alamofire (~> 4.1) - - Result (~> 4.1) - - Moya/RxSwift (14.0.0-alpha.1): + - Alamofire (5.0.0-rc.2) + - CleanJSON (1.0.0) + - Moya/Core (14.0.0-beta.2): + - Alamofire (= 5.0.0-rc.2) + - Moya/RxSwift (14.0.0-beta.2): - Moya/Core - RxSwift (~> 5.0) - - Result (4.1.0) - - RxNetwork/Cacheable (1.0.0-beta): + - RxNetwork/Cacheable (1.0.1-beta): - RxNetwork/Core - Storable - - RxNetwork/Core (1.0.0-beta): - - Moya/RxSwift (= 14.0.0-alpha.1) + - RxNetwork/Core (1.0.1-beta): + - Moya/RxSwift (= 14.0.0-beta2) - RxSwift (5.0.0) - Storable (0.1.1) @@ -25,7 +23,6 @@ SPEC REPOS: - Alamofire - CleanJSON - Moya - - Result - RxSwift - Storable @@ -34,14 +31,13 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - Alamofire: ae5c501addb7afdbb13687d7f2f722c78734c2d3 - CleanJSON: e7e3950845b522326790ae0b114bc98102a33456 - Moya: 65485239114b3b327a17dc2e839f6c8b7143aae9 - Result: bd966fac789cc6c1563440b348ab2598cc24d5c7 - RxNetwork: d84d80e4aa6c8bfa6d674c7fbc35e85faf2dd596 + Alamofire: f9450d3c7f6bea2ad62e7a541c3e9b186c7991d6 + CleanJSON: 702dd619e1329c6399a579aa19af311acf47e461 + Moya: 788e592b92fadb10e30d350ed1a9f75c91eb1368 + RxNetwork: a48c6f96a5737620aab43ac53de5ec4382a08903 RxSwift: 8b0671caa829a763bbce7271095859121cbd895f Storable: 31d19a4f897d68d1f1843604b60e12e5c2e1db5f PODFILE CHECKSUM: 22eef8d19050091620bf8737b6cdd9363d3cd8ef -COCOAPODS: 1.7.3 +COCOAPODS: 1.7.5 diff --git a/Example/Pods/Alamofire/LICENSE b/Example/Pods/Alamofire/LICENSE index 38a301a..2ec3cb1 100644 --- a/Example/Pods/Alamofire/LICENSE +++ b/Example/Pods/Alamofire/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Example/Pods/Alamofire/README.md b/Example/Pods/Alamofire/README.md index 26e364a..da7503f 100644 --- a/Example/Pods/Alamofire/README.md +++ b/Example/Pods/Alamofire/README.md @@ -6,18 +6,21 @@ [![Platform](https://img.shields.io/cocoapods/p/Alamofire.svg?style=flat)](https://alamofire.github.io/Alamofire) [![Twitter](https://img.shields.io/badge/twitter-@AlamofireSF-blue.svg?style=flat)](https://twitter.com/AlamofireSF) [![Gitter](https://badges.gitter.im/Alamofire/Alamofire.svg)](https://gitter.im/Alamofire/Alamofire?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +[![Open Source Helpers](https://www.codetriage.com/alamofire/alamofire/badges/users.svg)](https://www.codetriage.com/alamofire/alamofire) Alamofire is an HTTP networking library written in Swift. +**⚠️⚠️⚠️ WARNING ⚠️⚠️⚠️** This documentation is out of date during the Alamofire 5 beta process. + - [Features](#features) - [Component Libraries](#component-libraries) - [Requirements](#requirements) - [Migration Guides](#migration-guides) - [Communication](#communication) - [Installation](#installation) -- [Usage](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md) - - **Intro -** [Making a Request](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#making-a-request), [Response Handling](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-handling), [Response Validation](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-validation), [Response Caching](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-caching) - - **HTTP -** [HTTP Methods](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#http-methods), [Parameter Encoding](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#parameter-encoding), [HTTP Headers](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#http-headers), [Authentication](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#authentication) +- [Usage](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#using-alamofire) + - [**Introduction -**](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#introduction) [Making Requests](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#making-requests), [Response Handling](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-handling), [Response Validation](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-validation), [Response Caching](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-caching) + - **HTTP -** [HTTP Methods](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#http-methods), [Parameters and Parameter Encoder](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md##request-parameters-and-parameter-encoders), [HTTP Headers](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#http-headers), [Authentication](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#authentication) - **Large Data -** [Downloading Data to a File](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#downloading-data-to-a-file), [Uploading Data to a Server](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#uploading-data-to-a-server) - **Tools -** [Statistical Metrics](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#statistical-metrics), [cURL Command Output](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#curl-command-output) - [Advanced Usage](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md) @@ -56,93 +59,53 @@ In order to keep Alamofire focused specifically on core networking implementatio ## Requirements -- iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+ -- Xcode 8.3+ -- Swift 3.1+ +- iOS 10.0+ / macOS 10.12+ / tvOS 10.0+ / watchOS 3.0+ +- Xcode 10.2+ +- Swift 5+ ## Migration Guides +- Alamofire 5.0 Migration Guide: To be written! - [Alamofire 4.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%204.0%20Migration%20Guide.md) - [Alamofire 3.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%203.0%20Migration%20Guide.md) - [Alamofire 2.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%202.0%20Migration%20Guide.md) ## Communication -- If you **need help with making network requests**, use [Stack Overflow](https://stackoverflow.com/questions/tagged/alamofire) and tag `alamofire`. +- If you **need help with making network requests** using Alamofire, use [Stack Overflow](https://stackoverflow.com/questions/tagged/alamofire) and tag `alamofire`. - If you need to **find or understand an API**, check [our documentation](http://alamofire.github.io/Alamofire/) or [Apple's documentation for `URLSession`](https://developer.apple.com/documentation/foundation/url_loading_system), on top of which Alamofire is built. - If you need **help with an Alamofire feature**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire). - If you'd like to **discuss Alamofire best practices**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire). - If you'd like to **discuss a feature request**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire). -- If you **found a bug**, open an issue and follow the guide. The more detail the better! +- If you **found a bug**, open an issue here on GitHub and follow the guide. The more detail the better! - If you **want to contribute**, submit a pull request. ## Installation ### CocoaPods -[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: - -```bash -$ gem install cocoapods -``` - -> CocoaPods 1.1+ is required to build Alamofire 4.0+. - -To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`: +[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`: ```ruby -source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '10.0' -use_frameworks! - -target '' do - pod 'Alamofire', '~> 4.7' -end -``` - -Then, run the following command: - -```bash -$ pod install +pod 'Alamofire', '~> 5.0.0-rc.2' ``` ### Carthage -[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. - -You can install Carthage with [Homebrew](https://brew.sh/) using the following command: - -```bash -$ brew update -$ brew install carthage -``` - -To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`: +[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`: ```ogdl -github "Alamofire/Alamofire" ~> 4.7 +github "Alamofire/Alamofire" "5.0.0-rc.2" ``` -Run `carthage update` to build the framework and drag the built `Alamofire.framework` into your Xcode project. - ### Swift Package Manager -The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It is in early development, but Alamofire does support its use on supported platforms. +The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It is in early development, but Alamofire does support its use on supported platforms. Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`. -#### Swift 3 - -```swift -dependencies: [ - .Package(url: "https://github.com/Alamofire/Alamofire.git", majorVersion: 4) -] -``` - -#### Swift 4 - ```swift dependencies: [ - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.0.0") + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "5.0.0-rc.2") ] ``` @@ -176,7 +139,7 @@ If you prefer not to use any of the aforementioned dependency managers, you can > It does not matter which `Products` folder you choose from, but it does matter whether you choose the top or bottom `Alamofire.framework`. -- Select the top `Alamofire.framework` for iOS and the bottom one for OS X. +- Select the top `Alamofire.framework` for iOS and the bottom one for macOS. > You can verify which one you selected by inspecting the build log for your project. The build target for `Alamofire` will be listed as either `Alamofire iOS`, `Alamofire macOS`, `Alamofire tvOS` or `Alamofire watchOS`. @@ -191,26 +154,22 @@ The following radars have some effect on the current implementation of Alamofire - [`rdar://21349340`](http://www.openradar.me/radar?id=5517037090635776) - Compiler throwing warning due to toll-free bridging issue in test case - `rdar://26870455` - Background URL Session Configurations do not work in the simulator - `rdar://26849668` - Some URLProtocol APIs do not properly handle `URLRequest` -- [`rdar://36082113`](http://openradar.appspot.com/radar?id=4942308441063424) - `URLSessionTaskMetrics` failing to link on watchOS 3.0+ ## Resolved Radars The following radars have been resolved over time after being filed against the Alamofire project. -- [`rdar://26761490`](http://www.openradar.me/radar?id=5010235949318144) - Swift string interpolation causing memory leak with common usage (Resolved on 9/1/17 in Xcode 9 beta 6). - +- [`rdar://26761490`](http://www.openradar.me/radar?id=5010235949318144) - Swift string interpolation causing memory leak with common usage. + - (Resolved): 9/1/17 in Xcode 9 beta 6. +- [`rdar://36082113`](http://openradar.appspot.com/radar?id=4942308441063424) - `URLSessionTaskMetrics` failing to link on watchOS 3.0+ + - (Resolved): Just add `CFNetwork` to your linked frameworks. + ## FAQ ### What's the origin of the name Alamofire? Alamofire is named after the [Alamo Fire flower](https://aggie-horticulture.tamu.edu/wildseed/alamofire.html), a hybrid variant of the Bluebonnet, the official state flower of Texas. -### What logic belongs in a Router vs. a Request Adapter? - -Simple, static data such as paths, parameters and common headers belong in the `Router`. Dynamic data such as an `Authorization` header whose value can changed based on an authentication system belongs in a `RequestAdapter`. - -The reason the dynamic data MUST be placed into the `RequestAdapter` is to support retry operations. When a `Request` is retried, the original request is not rebuilt meaning the `Router` will not be called again. The `RequestAdapter` is called again allowing the dynamic data to be updated on the original request before retrying the `Request`. - ## Credits Alamofire is owned and maintained by the [Alamofire Software Foundation](http://alamofire.org). You can follow them on Twitter at [@AlamofireSF](https://twitter.com/AlamofireSF) for project updates and releases. diff --git a/Example/Pods/Alamofire/Source/AFError.swift b/Example/Pods/Alamofire/Source/AFError.swift index b163f60..b8adbdc 100644 --- a/Example/Pods/Alamofire/Source/AFError.swift +++ b/Example/Pods/Alamofire/Source/AFError.swift @@ -1,7 +1,7 @@ // // AFError.swift // -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -26,158 +26,320 @@ import Foundation /// `AFError` is the error type returned by Alamofire. It encompasses a few different types of errors, each with /// their own associated reasons. -/// -/// - invalidURL: Returned when a `URLConvertible` type fails to create a valid `URL`. -/// - parameterEncodingFailed: Returned when a parameter encoding object throws an error during the encoding process. -/// - multipartEncodingFailed: Returned when some step in the multipart encoding process fails. -/// - responseValidationFailed: Returned when a `validate()` call fails. -/// - responseSerializationFailed: Returned when a response serializer encounters an error in the serialization process. public enum AFError: Error { - /// The underlying reason the parameter encoding error occurred. - /// - /// - missingURL: The URL request did not have a URL to encode. - /// - jsonEncodingFailed: JSON serialization failed with an underlying system error during the - /// encoding process. - /// - propertyListEncodingFailed: Property list serialization failed with an underlying system error during - /// encoding process. - public enum ParameterEncodingFailureReason { - case missingURL - case jsonEncodingFailed(error: Error) - case propertyListEncodingFailed(error: Error) - } - - /// The underlying reason the multipart encoding error occurred. - /// - /// - bodyPartURLInvalid: The `fileURL` provided for reading an encodable body part isn't a - /// file URL. - /// - bodyPartFilenameInvalid: The filename of the `fileURL` provided has either an empty - /// `lastPathComponent` or `pathExtension. - /// - bodyPartFileNotReachable: The file at the `fileURL` provided was not reachable. - /// - bodyPartFileNotReachableWithError: Attempting to check the reachability of the `fileURL` provided threw - /// an error. - /// - bodyPartFileIsDirectory: The file at the `fileURL` provided is actually a directory. - /// - bodyPartFileSizeNotAvailable: The size of the file at the `fileURL` provided was not returned by - /// the system. - /// - bodyPartFileSizeQueryFailedWithError: The attempt to find the size of the file at the `fileURL` provided - /// threw an error. - /// - bodyPartInputStreamCreationFailed: An `InputStream` could not be created for the provided `fileURL`. - /// - outputStreamCreationFailed: An `OutputStream` could not be created when attempting to write the - /// encoded data to disk. - /// - outputStreamFileAlreadyExists: The encoded body data could not be writtent disk because a file - /// already exists at the provided `fileURL`. - /// - outputStreamURLInvalid: The `fileURL` provided for writing the encoded body data to disk is - /// not a file URL. - /// - outputStreamWriteFailed: The attempt to write the encoded body data to disk failed with an - /// underlying error. - /// - inputStreamReadFailed: The attempt to read an encoded body part `InputStream` failed with - /// underlying system error. + /// The underlying reason the `.multipartEncodingFailed` error occurred. public enum MultipartEncodingFailureReason { + /// The `fileURL` provided for reading an encodable body part isn't a file `URL`. case bodyPartURLInvalid(url: URL) + /// The filename of the `fileURL` provided has either an empty `lastPathComponent` or `pathExtension. case bodyPartFilenameInvalid(in: URL) + /// The file at the `fileURL` provided was not reachable. case bodyPartFileNotReachable(at: URL) + /// Attempting to check the reachability of the `fileURL` provided threw an error. case bodyPartFileNotReachableWithError(atURL: URL, error: Error) + /// The file at the `fileURL` provided is actually a directory. case bodyPartFileIsDirectory(at: URL) + /// The size of the file at the `fileURL` provided was not returned by the system. case bodyPartFileSizeNotAvailable(at: URL) + /// The attempt to find the size of the file at the `fileURL` provided threw an error. case bodyPartFileSizeQueryFailedWithError(forURL: URL, error: Error) + /// An `InputStream` could not be created for the provided `fileURL`. case bodyPartInputStreamCreationFailed(for: URL) - + /// An `OutputStream` could not be created when attempting to write the encoded data to disk. case outputStreamCreationFailed(for: URL) + /// The encoded body data could not be written to disk because a file already exists at the provided `fileURL`. case outputStreamFileAlreadyExists(at: URL) + /// The `fileURL` provided for writing the encoded body data to disk is not a file `URL`. case outputStreamURLInvalid(url: URL) + /// The attempt to write the encoded body data to disk failed with an underlying error. case outputStreamWriteFailed(error: Error) - + /// The attempt to read an encoded body part `InputStream` failed with underlying system error. case inputStreamReadFailed(error: Error) } - /// The underlying reason the response validation error occurred. - /// - /// - dataFileNil: The data file containing the server response did not exist. - /// - dataFileReadFailed: The data file containing the server response could not be read. - /// - missingContentType: The response did not contain a `Content-Type` and the `acceptableContentTypes` - /// provided did not contain wildcard type. - /// - unacceptableContentType: The response `Content-Type` did not match any type in the provided - /// `acceptableContentTypes`. - /// - unacceptableStatusCode: The response status code was not acceptable. + /// The underlying reason the `.parameterEncodingFailed` error occurred. + public enum ParameterEncodingFailureReason { + /// The `URLRequest` did not have a `URL` to encode. + case missingURL + /// JSON serialization failed with an underlying system error during the encoding process. + case jsonEncodingFailed(error: Error) + /// Custom parameter encoding failed due to the associated `Error`. + case customEncodingFailed(error: Error) + } + + /// The underlying reason the `.parameterEncoderFailed` error occurred. + public enum ParameterEncoderFailureReason { + /// Possible missing components. + public enum RequiredComponent { + /// The `URL` was missing or unable to be extracted from the passed `URLRequest` or during encoding. + case url + /// The `HTTPMethod` could not be extracted from the passed `URLRequest`. + case httpMethod(rawValue: String) + } + + /// A `RequiredComponent` was missing during encoding. + case missingRequiredComponent(RequiredComponent) + /// The underlying encoder failed with the associated error. + case encoderFailed(error: Error) + } + + /// The underlying reason the `.responseValidationFailed` error occurred. public enum ResponseValidationFailureReason { + /// The data file containing the server response did not exist. case dataFileNil + /// The data file containing the server response at the associated `URL` could not be read. case dataFileReadFailed(at: URL) + /// The response did not contain a `Content-Type` and the `acceptableContentTypes` provided did not contain a + /// wildcard type. case missingContentType(acceptableContentTypes: [String]) + /// The response `Content-Type` did not match any type in the provided `acceptableContentTypes`. case unacceptableContentType(acceptableContentTypes: [String], responseContentType: String) + /// The response status code was not acceptable. case unacceptableStatusCode(code: Int) + /// Custom response validation failed due to the associated `Error`. + case customValidationFailed(error: Error) } /// The underlying reason the response serialization error occurred. - /// - /// - inputDataNil: The server response contained no data. - /// - inputDataNilOrZeroLength: The server response contained no data or the data was zero length. - /// - inputFileNil: The file containing the server response did not exist. - /// - inputFileReadFailed: The file containing the server response could not be read. - /// - stringSerializationFailed: String serialization failed using the provided `String.Encoding`. - /// - jsonSerializationFailed: JSON serialization failed with an underlying system error. - /// - propertyListSerializationFailed: Property list serialization failed with an underlying system error. public enum ResponseSerializationFailureReason { - case inputDataNil + /// The server response contained no data or the data was zero length. case inputDataNilOrZeroLength + /// The file containing the server response did not exist. case inputFileNil + /// The file containing the server response could not be read from the associated `URL`. case inputFileReadFailed(at: URL) + /// String serialization failed using the provided `String.Encoding`. case stringSerializationFailed(encoding: String.Encoding) + /// JSON serialization failed with an underlying system error. case jsonSerializationFailed(error: Error) - case propertyListSerializationFailed(error: Error) + /// A `DataDecoder` failed to decode the response due to the associated `Error`. + case decodingFailed(error: Error) + /// A custom response serializer failed due to the associated `Error`. + case customSerializationFailed(error: Error) + /// Generic serialization failed for an empty response that wasn't type `Empty` but instead the associated type. + case invalidEmptyResponse(type: String) } + /// Underlying reason a server trust evaluation error occurred. + public enum ServerTrustFailureReason { + /// The output of a server trust evaluation. + public struct Output { + /// The host for which the evaluation was performed. + public let host: String + /// The `SecTrust` value which was evaluated. + public let trust: SecTrust + /// The `OSStatus` of evaluation operation. + public let status: OSStatus + /// The result of the evaluation operation. + public let result: SecTrustResultType + + /// Creates an `Output` value from the provided values. + init(_ host: String, _ trust: SecTrust, _ status: OSStatus, _ result: SecTrustResultType) { + self.host = host + self.trust = trust + self.status = status + self.result = result + } + } + + /// No `ServerTrustEvaluator` was found for the associated host. + case noRequiredEvaluator(host: String) + /// No certificates were found with which to perform the trust evaluation. + case noCertificatesFound + /// No public keys were found with which to perform the trust evaluation. + case noPublicKeysFound + /// During evaluation, application of the associated `SecPolicy` failed. + case policyApplicationFailed(trust: SecTrust, policy: SecPolicy, status: OSStatus) + /// During evaluation, setting the associated anchor certificates failed. + case settingAnchorCertificatesFailed(status: OSStatus, certificates: [SecCertificate]) + /// During evaluation, creation of the revocation policy failed. + case revocationPolicyCreationFailed + /// Default evaluation failed with the associated `Output`. + case defaultEvaluationFailed(output: Output) + /// Host validation failed with the associated `Output`. + case hostValidationFailed(output: Output) + /// Revocation check failed with the associated `Output` and options. + case revocationCheckFailed(output: Output, options: RevocationTrustEvaluator.Options) + /// Certificate pinning failed. + case certificatePinningFailed(host: String, trust: SecTrust, pinnedCertificates: [SecCertificate], serverCertificates: [SecCertificate]) + /// Public key pinning failed. + case publicKeyPinningFailed(host: String, trust: SecTrust, pinnedKeys: [SecKey], serverKeys: [SecKey]) + /// Custom server trust evaluation failed due to the associated `Error`. + case customEvaluationFailed(error: Error) + } + + /// The underlying reason the `.urlRequestValidationFailed` + public enum URLRequestValidationFailureReason { + /// URLRequest with GET method had body data. + case bodyDataInGETRequest(Data) + } + + /// `UploadableConvertible` threw an error in `createUploadable()`. + case createUploadableFailed(error: Error) + /// `URLRequestConvertible` threw an error in `asURLRequest()`. + case createURLRequestFailed(error: Error) + /// `SessionDelegate` threw an error while attempting to move downloaded file to destination URL. + case downloadedFileMoveFailed(error: Error, source: URL, destination: URL) + /// `Request` was explicitly cancelled. + case explicitlyCancelled + /// `URLConvertible` type failed to create a valid `URL`. case invalidURL(url: URLConvertible) - case parameterEncodingFailed(reason: ParameterEncodingFailureReason) + /// Multipart form encoding failed. case multipartEncodingFailed(reason: MultipartEncodingFailureReason) + /// `ParameterEncoding` threw an error during the encoding process. + case parameterEncodingFailed(reason: ParameterEncodingFailureReason) + /// `ParameterEncoder` threw an error while running the encoder. + case parameterEncoderFailed(reason: ParameterEncoderFailureReason) + /// `RequestAdapter` threw an error during adaptation. + case requestAdaptationFailed(error: Error) + /// `RequestRetrier` threw an error during the request retry process. + case requestRetryFailed(retryError: Error, originalError: Error) + /// Response validation failed. case responseValidationFailed(reason: ResponseValidationFailureReason) + /// Response serialization failed. case responseSerializationFailed(reason: ResponseSerializationFailureReason) + /// `ServerTrustEvaluating` instance threw an error during trust evaluation. + case serverTrustEvaluationFailed(reason: ServerTrustFailureReason) + /// `Session` which issued the `Request` was deinitialized, most likely because its reference went out of scope. + case sessionDeinitialized + /// `Session` was explicitly invalidated, possibly with the `Error` produced by the underlying `URLSession`. + case sessionInvalidated(error: Error?) + /// `URLSessionTask` completed with error. + case sessionTaskFailed(error: Error) + /// `URLRequest` failed validation. + case urlRequestValidationFailed(reason: URLRequestValidationFailureReason) } -// MARK: - Adapt Error +extension Error { + /// Returns the instance cast as an `AFError`. + public var asAFError: AFError? { + return self as? AFError + } -struct AdaptError: Error { - let error: Error -} + /// Returns the instance cast as an `AFError`. If casting fails, a `fatalError` with the specified `message` is thrown. + public func asAFError(orFailWith message: @autoclosure () -> String, file: StaticString = #file, line: UInt = #line) -> AFError { + guard let afError = self as? AFError else { + fatalError(message(), file: file, line: line) + } + return afError + } -extension Error { - var underlyingAdaptError: Error? { return (self as? AdaptError)?.error } + /// Casts the instance as `AFError` or returns `defaultAFError` + func asAFError(or defaultAFError: @autoclosure () -> AFError) -> AFError { + return self as? AFError ?? defaultAFError() + } } // MARK: - Error Booleans extension AFError { - /// Returns whether the AFError is an invalid URL error. + /// Returns whether the instance is `.sessionDeinitialized`. + public var isSessionDeinitializedError: Bool { + if case .sessionDeinitialized = self { return true } + return false + } + + /// Returns whether the instance is `.sessionInvalidated`. + public var isSessionInvalidatedError: Bool { + if case .sessionInvalidated = self { return true } + return false + } + + /// Returns whether the instance is `.explicitlyCancelled`. + public var isExplicitlyCancelledError: Bool { + if case .explicitlyCancelled = self { return true } + return false + } + + /// Returns whether the instance is `.invalidURL`. public var isInvalidURLError: Bool { if case .invalidURL = self { return true } return false } - /// Returns whether the AFError is a parameter encoding error. When `true`, the `underlyingError` property will + /// Returns whether the instance is `.parameterEncodingFailed`. When `true`, the `underlyingError` property will /// contain the associated value. public var isParameterEncodingError: Bool { if case .parameterEncodingFailed = self { return true } return false } - /// Returns whether the AFError is a multipart encoding error. When `true`, the `url` and `underlyingError` properties - /// will contain the associated values. + /// Returns whether the instance is `.parameterEncoderFailed`. When `true`, the `underlyingError` property will + /// contain the associated value. + public var isParameterEncoderError: Bool { + if case .parameterEncoderFailed = self { return true } + return false + } + + /// Returns whether the instance is `.multipartEncodingFailed`. When `true`, the `url` and `underlyingError` + /// properties will contain the associated values. public var isMultipartEncodingError: Bool { if case .multipartEncodingFailed = self { return true } return false } - /// Returns whether the `AFError` is a response validation error. When `true`, the `acceptableContentTypes`, - /// `responseContentType`, and `responseCode` properties will contain the associated values. + /// Returns whether the instance is `.requestAdaptationFailed`. When `true`, the `underlyingError` property will + /// contain the associated value. + public var isRequestAdaptationError: Bool { + if case .requestAdaptationFailed = self { return true } + return false + } + + /// Returns whether the instance is `.responseValidationFailed`. When `true`, the `acceptableContentTypes`, + /// `responseContentType`, `responseCode`, and `underlyingError` properties will contain the associated values. public var isResponseValidationError: Bool { if case .responseValidationFailed = self { return true } return false } - /// Returns whether the `AFError` is a response serialization error. When `true`, the `failedStringEncoding` and + /// Returns whether the instance is `.responseSerializationFailed`. When `true`, the `failedStringEncoding` and /// `underlyingError` properties will contain the associated values. public var isResponseSerializationError: Bool { if case .responseSerializationFailed = self { return true } return false } + + /// Returns whether the instance is `.serverTrustEvaluationFailed`. When `true`, the `underlyingError` property will + /// contain the associated value. + public var isServerTrustEvaluationError: Bool { + if case .serverTrustEvaluationFailed = self { return true } + return false + } + + /// Returns whether the instance is `requestRetryFailed`. When `true`, the `underlyingError` property will + /// contain the associated value. + public var isRequestRetryError: Bool { + if case .requestRetryFailed = self { return true } + return false + } + + /// Returns whether the instance is `createUploadableFailed`. When `true`, the `underlyingError` property will + /// contain the associated value. + public var isCreateUploadableError: Bool { + if case .createUploadableFailed = self { return true } + return false + } + + /// Returns whether the instance is `createURLRequestFailed`. When `true`, the `underlyingError` property will + /// contain the associated value. + public var isCreateURLRequestError: Bool { + if case .createURLRequestFailed = self { return true } + return false + } + + /// Returns whether the instance is `downloadedFileMoveFailed`. When `true`, the `destination` and `underlyingError` properties will + /// contain the associated values. + public var isDownloadedFileMoveError: Bool { + if case .downloadedFileMoveFailed = self { return true } + return false + } + + /// Returns whether the instance is `createURLRequestFailed`. When `true`, the `underlyingError` property will + /// contain the associated value. + public var isSessionTaskError: Bool { + if case .sessionTaskFailed = self { return true } + return false + } } // MARK: - Convenience Properties @@ -185,86 +347,110 @@ extension AFError { extension AFError { /// The `URLConvertible` associated with the error. public var urlConvertible: URLConvertible? { - switch self { - case .invalidURL(let url): - return url - default: - return nil - } + guard case let .invalidURL(url) = self else { return nil } + return url } /// The `URL` associated with the error. public var url: URL? { - switch self { - case .multipartEncodingFailed(let reason): - return reason.url - default: - return nil - } + guard case let .multipartEncodingFailed(reason) = self else { return nil } + return reason.url } - /// The `Error` returned by a system framework associated with a `.parameterEncodingFailed`, - /// `.multipartEncodingFailed` or `.responseSerializationFailed` error. + /// The underlying `Error` responsible for generating the failure associated with `.sessionInvalidated`, + /// `.parameterEncodingFailed`, `.parameterEncoderFailed`, `.multipartEncodingFailed`, `.requestAdaptationFailed`, + /// `.responseSerializationFailed`, `.requestRetryFailed` errors. public var underlyingError: Error? { switch self { - case .parameterEncodingFailed(let reason): + case let .multipartEncodingFailed(reason): return reason.underlyingError - case .multipartEncodingFailed(let reason): + case let .parameterEncodingFailed(reason): return reason.underlyingError - case .responseSerializationFailed(let reason): + case let .parameterEncoderFailed(reason): + return reason.underlyingError + case let .requestAdaptationFailed(error): + return error + case let .requestRetryFailed(retryError, _): + return retryError + case let .responseValidationFailed(reason): return reason.underlyingError - default: + case let .responseSerializationFailed(reason): + return reason.underlyingError + case let .serverTrustEvaluationFailed(reason): + return reason.underlyingError + case let .sessionInvalidated(error): + return error + case let .createUploadableFailed(error): + return error + case let .createURLRequestFailed(error): + return error + case let .downloadedFileMoveFailed(error, _, _): + return error + case let .sessionTaskFailed(error): + return error + case .explicitlyCancelled, + .invalidURL, + .sessionDeinitialized, + .urlRequestValidationFailed: return nil } } /// The acceptable `Content-Type`s of a `.responseValidationFailed` error. public var acceptableContentTypes: [String]? { - switch self { - case .responseValidationFailed(let reason): - return reason.acceptableContentTypes - default: - return nil - } + guard case let .responseValidationFailed(reason) = self else { return nil } + return reason.acceptableContentTypes } /// The response `Content-Type` of a `.responseValidationFailed` error. public var responseContentType: String? { - switch self { - case .responseValidationFailed(let reason): - return reason.responseContentType - default: - return nil - } + guard case let .responseValidationFailed(reason) = self else { return nil } + return reason.responseContentType } /// The response code of a `.responseValidationFailed` error. public var responseCode: Int? { - switch self { - case .responseValidationFailed(let reason): - return reason.responseCode - default: - return nil - } + guard case let .responseValidationFailed(reason) = self else { return nil } + return reason.responseCode } /// The `String.Encoding` associated with a failed `.stringResponse()` call. public var failedStringEncoding: String.Encoding? { + guard case let .responseSerializationFailed(reason) = self else { return nil } + return reason.failedStringEncoding + } + + /// The `source` URL of a `.downloadedFileMoveFailed` error. + public var sourceURL: URL? { + guard case .downloadedFileMoveFailed(_, let source, _) = self else { return nil } + return source + } + + /// The `destination` URL of a `.downloadedFileMoveFailed` error. + public var destinationURL: URL? { + guard case let .downloadedFileMoveFailed(_, _, destination) = self else { return nil } + return destination + } +} + +extension AFError.ParameterEncodingFailureReason { + var underlyingError: Error? { switch self { - case .responseSerializationFailed(let reason): - return reason.failedStringEncoding - default: + case let .jsonEncodingFailed(error), + let .customEncodingFailed(error): + return error + case .missingURL: return nil } } } -extension AFError.ParameterEncodingFailureReason { +extension AFError.ParameterEncoderFailureReason { var underlyingError: Error? { switch self { - case .jsonEncodingFailed(let error), .propertyListEncodingFailed(let error): + case let .encoderFailed(error): return error - default: + case .missingRequiredComponent: return nil } } @@ -273,23 +459,40 @@ extension AFError.ParameterEncodingFailureReason { extension AFError.MultipartEncodingFailureReason { var url: URL? { switch self { - case .bodyPartURLInvalid(let url), .bodyPartFilenameInvalid(let url), .bodyPartFileNotReachable(let url), - .bodyPartFileIsDirectory(let url), .bodyPartFileSizeNotAvailable(let url), - .bodyPartInputStreamCreationFailed(let url), .outputStreamCreationFailed(let url), - .outputStreamFileAlreadyExists(let url), .outputStreamURLInvalid(let url), - .bodyPartFileNotReachableWithError(let url, _), .bodyPartFileSizeQueryFailedWithError(let url, _): + case let .bodyPartURLInvalid(url), + let .bodyPartFilenameInvalid(url), + let .bodyPartFileNotReachable(url), + let .bodyPartFileIsDirectory(url), + let .bodyPartFileSizeNotAvailable(url), + let .bodyPartInputStreamCreationFailed(url), + let .outputStreamCreationFailed(url), + let .outputStreamFileAlreadyExists(url), + let .outputStreamURLInvalid(url), + let .bodyPartFileNotReachableWithError(url, _), + let .bodyPartFileSizeQueryFailedWithError(url, _): return url - default: + case .outputStreamWriteFailed, + .inputStreamReadFailed: return nil } } var underlyingError: Error? { switch self { - case .bodyPartFileNotReachableWithError(_, let error), .bodyPartFileSizeQueryFailedWithError(_, let error), - .outputStreamWriteFailed(let error), .inputStreamReadFailed(let error): + case let .bodyPartFileNotReachableWithError(_, error), + let .bodyPartFileSizeQueryFailedWithError(_, error), + let .outputStreamWriteFailed(error), + let .inputStreamReadFailed(error): return error - default: + case .bodyPartURLInvalid, + .bodyPartFilenameInvalid, + .bodyPartFileNotReachable, + .bodyPartFileIsDirectory, + .bodyPartFileSizeNotAvailable, + .bodyPartInputStreamCreationFailed, + .outputStreamCreationFailed, + .outputStreamFileAlreadyExists, + .outputStreamURLInvalid: return nil } } @@ -298,27 +501,52 @@ extension AFError.MultipartEncodingFailureReason { extension AFError.ResponseValidationFailureReason { var acceptableContentTypes: [String]? { switch self { - case .missingContentType(let types), .unacceptableContentType(let types, _): + case let .missingContentType(types), + let .unacceptableContentType(types, _): return types - default: + case .dataFileNil, + .dataFileReadFailed, + .unacceptableStatusCode, + .customValidationFailed: return nil } } var responseContentType: String? { switch self { - case .unacceptableContentType(_, let responseType): + case let .unacceptableContentType(_, responseType): return responseType - default: + case .dataFileNil, + .dataFileReadFailed, + .missingContentType, + .unacceptableStatusCode, + .customValidationFailed: return nil } } var responseCode: Int? { switch self { - case .unacceptableStatusCode(let code): + case let .unacceptableStatusCode(code): return code - default: + case .dataFileNil, + .dataFileReadFailed, + .missingContentType, + .unacceptableContentType, + .customValidationFailed: + return nil + } + } + + var underlyingError: Error? { + switch self { + case let .customValidationFailed(error): + return error + case .dataFileNil, + .dataFileReadFailed, + .missingContentType, + .unacceptableContentType, + .unacceptableStatusCode: return nil } } @@ -327,18 +555,70 @@ extension AFError.ResponseValidationFailureReason { extension AFError.ResponseSerializationFailureReason { var failedStringEncoding: String.Encoding? { switch self { - case .stringSerializationFailed(let encoding): + case let .stringSerializationFailed(encoding): return encoding - default: + case .inputDataNilOrZeroLength, + .inputFileNil, + .inputFileReadFailed(_), + .jsonSerializationFailed(_), + .decodingFailed(_), + .customSerializationFailed(_), + .invalidEmptyResponse: + return nil + } + } + + var underlyingError: Error? { + switch self { + case let .jsonSerializationFailed(error), + let .decodingFailed(error), + let .customSerializationFailed(error): + return error + case .inputDataNilOrZeroLength, + .inputFileNil, + .inputFileReadFailed, + .stringSerializationFailed, + .invalidEmptyResponse: + return nil + } + } +} + +extension AFError.ServerTrustFailureReason { + var output: AFError.ServerTrustFailureReason.Output? { + switch self { + case let .defaultEvaluationFailed(output), + let .hostValidationFailed(output), + let .revocationCheckFailed(output, _): + return output + case .noRequiredEvaluator, + .noCertificatesFound, + .noPublicKeysFound, + .policyApplicationFailed, + .settingAnchorCertificatesFailed, + .revocationPolicyCreationFailed, + .certificatePinningFailed, + .publicKeyPinningFailed, + .customEvaluationFailed: return nil } } var underlyingError: Error? { switch self { - case .jsonSerializationFailed(let error), .propertyListSerializationFailed(let error): + case let .customEvaluationFailed(error): return error - default: + case .noRequiredEvaluator, + .noCertificatesFound, + .noPublicKeysFound, + .policyApplicationFailed, + .settingAnchorCertificatesFailed, + .revocationPolicyCreationFailed, + .defaultEvaluationFailed, + .hostValidationFailed, + .revocationCheckFailed, + .certificatePinningFailed, + .publicKeyPinningFailed: return nil } } @@ -349,16 +629,46 @@ extension AFError.ResponseSerializationFailureReason { extension AFError: LocalizedError { public var errorDescription: String? { switch self { - case .invalidURL(let url): + case .explicitlyCancelled: + return "Request explicitly cancelled." + case let .invalidURL(url): return "URL is not valid: \(url)" - case .parameterEncodingFailed(let reason): + case let .parameterEncodingFailed(reason): + return reason.localizedDescription + case let .parameterEncoderFailed(reason): return reason.localizedDescription - case .multipartEncodingFailed(let reason): + case let .multipartEncodingFailed(reason): return reason.localizedDescription - case .responseValidationFailed(let reason): + case let .requestAdaptationFailed(error): + return "Request adaption failed with error: \(error.localizedDescription)" + case let .responseValidationFailed(reason): return reason.localizedDescription - case .responseSerializationFailed(let reason): + case let .responseSerializationFailed(reason): return reason.localizedDescription + case let .requestRetryFailed(retryError, originalError): + return """ + Request retry failed with retry error: \(retryError.localizedDescription), \ + original error: \(originalError.localizedDescription) + """ + case .sessionDeinitialized: + return """ + Session was invalidated without error, so it was likely deinitialized unexpectedly. \ + Be sure to retain a reference to your Session for the duration of your requests. + """ + case let .sessionInvalidated(error): + return "Session was invalidated with error: \(error?.localizedDescription ?? "No description.")" + case .serverTrustEvaluationFailed: + return "Server trust evaluation failed." + case let .urlRequestValidationFailed(reason): + return "URLRequest validation failed due to reason: \(reason.localizedDescription)" + case let .createUploadableFailed(error): + return "Uploadable creation failed with error: \(error.localizedDescription)" + case let .createURLRequestFailed(error): + return "URLRequest creation failed with error: \(error.localizedDescription)" + case let .downloadedFileMoveFailed(error, source, destination): + return "Moving downloaded file from: \(source) to: \(destination) failed with error: \(error.localizedDescription)" + case let .sessionTaskFailed(error): + return "URLSessionTask failed with error: \(error.localizedDescription)" } } } @@ -368,10 +678,21 @@ extension AFError.ParameterEncodingFailureReason { switch self { case .missingURL: return "URL request to encode was missing a URL" - case .jsonEncodingFailed(let error): + case let .jsonEncodingFailed(error): return "JSON could not be encoded because of error:\n\(error.localizedDescription)" - case .propertyListEncodingFailed(let error): - return "PropertyList could not be encoded because of error:\n\(error.localizedDescription)" + case let .customEncodingFailed(error): + return "Custom parameter encoder failed with error: \(error.localizedDescription)" + } + } +} + +extension AFError.ParameterEncoderFailureReason { + var localizedDescription: String { + switch self { + case let .missingRequiredComponent(component): + return "Encoding failed due to a missing request component: \(component)" + case let .encoderFailed(error): + return "The underlying encoder failed with the error: \(error)" } } } @@ -379,37 +700,39 @@ extension AFError.ParameterEncodingFailureReason { extension AFError.MultipartEncodingFailureReason { var localizedDescription: String { switch self { - case .bodyPartURLInvalid(let url): + case let .bodyPartURLInvalid(url): return "The URL provided is not a file URL: \(url)" - case .bodyPartFilenameInvalid(let url): + case let .bodyPartFilenameInvalid(url): return "The URL provided does not have a valid filename: \(url)" - case .bodyPartFileNotReachable(let url): + case let .bodyPartFileNotReachable(url): return "The URL provided is not reachable: \(url)" - case .bodyPartFileNotReachableWithError(let url, let error): - return ( - "The system returned an error while checking the provided URL for " + - "reachability.\nURL: \(url)\nError: \(error)" - ) - case .bodyPartFileIsDirectory(let url): + case let .bodyPartFileNotReachableWithError(url, error): + return """ + The system returned an error while checking the provided URL for reachability. + URL: \(url) + Error: \(error) + """ + case let .bodyPartFileIsDirectory(url): return "The URL provided is a directory: \(url)" - case .bodyPartFileSizeNotAvailable(let url): + case let .bodyPartFileSizeNotAvailable(url): return "Could not fetch the file size from the provided URL: \(url)" - case .bodyPartFileSizeQueryFailedWithError(let url, let error): - return ( - "The system returned an error while attempting to fetch the file size from the " + - "provided URL.\nURL: \(url)\nError: \(error)" - ) - case .bodyPartInputStreamCreationFailed(let url): + case let .bodyPartFileSizeQueryFailedWithError(url, error): + return """ + The system returned an error while attempting to fetch the file size from the provided URL. + URL: \(url) + Error: \(error) + """ + case let .bodyPartInputStreamCreationFailed(url): return "Failed to create an InputStream for the provided URL: \(url)" - case .outputStreamCreationFailed(let url): + case let .outputStreamCreationFailed(url): return "Failed to create an OutputStream for URL: \(url)" - case .outputStreamFileAlreadyExists(let url): + case let .outputStreamFileAlreadyExists(url): return "A file already exists at the provided URL: \(url)" - case .outputStreamURLInvalid(let url): + case let .outputStreamURLInvalid(url): return "The provided OutputStream URL is invalid: \(url)" - case .outputStreamWriteFailed(let error): + case let .outputStreamWriteFailed(error): return "OutputStream write failed with error: \(error)" - case .inputStreamReadFailed(let error): + case let .inputStreamReadFailed(error): return "InputStream read failed with error: \(error)" } } @@ -418,20 +741,25 @@ extension AFError.MultipartEncodingFailureReason { extension AFError.ResponseSerializationFailureReason { var localizedDescription: String { switch self { - case .inputDataNil: - return "Response could not be serialized, input data was nil." case .inputDataNilOrZeroLength: return "Response could not be serialized, input data was nil or zero length." case .inputFileNil: return "Response could not be serialized, input file was nil." - case .inputFileReadFailed(let url): + case let .inputFileReadFailed(url): return "Response could not be serialized, input file could not be read: \(url)." - case .stringSerializationFailed(let encoding): + case let .stringSerializationFailed(encoding): return "String could not be serialized with encoding: \(encoding)." - case .jsonSerializationFailed(let error): + case let .jsonSerializationFailed(error): return "JSON could not be serialized because of error:\n\(error.localizedDescription)" - case .propertyListSerializationFailed(let error): - return "PropertyList could not be serialized because of error:\n\(error.localizedDescription)" + case let .invalidEmptyResponse(type): + return """ + Empty response could not be serialized to type: \(type). \ + Use Empty as the expected type for such responses. + """ + case let .decodingFailed(error): + return "Response could not be decoded because of error:\n\(error.localizedDescription)" + case let .customSerializationFailed(error): + return "Custom response serializer failed with error:\n\(error.localizedDescription)" } } } @@ -441,20 +769,65 @@ extension AFError.ResponseValidationFailureReason { switch self { case .dataFileNil: return "Response could not be validated, data file was nil." - case .dataFileReadFailed(let url): + case let .dataFileReadFailed(url): return "Response could not be validated, data file could not be read: \(url)." - case .missingContentType(let types): - return ( - "Response Content-Type was missing and acceptable content types " + - "(\(types.joined(separator: ","))) do not match \"*/*\"." - ) - case .unacceptableContentType(let acceptableTypes, let responseType): - return ( - "Response Content-Type \"\(responseType)\" does not match any acceptable types: " + - "\(acceptableTypes.joined(separator: ","))." - ) - case .unacceptableStatusCode(let code): + case let .missingContentType(types): + return """ + Response Content-Type was missing and acceptable content types \ + (\(types.joined(separator: ","))) do not match "*/*". + """ + case let .unacceptableContentType(acceptableTypes, responseType): + return """ + Response Content-Type "\(responseType)" does not match any acceptable types: \ + \(acceptableTypes.joined(separator: ",")). + """ + case let .unacceptableStatusCode(code): return "Response status code was unacceptable: \(code)." + case let .customValidationFailed(error): + return "Custom response validation failed with error: \(error.localizedDescription)" + } + } +} + +extension AFError.ServerTrustFailureReason { + var localizedDescription: String { + switch self { + case let .noRequiredEvaluator(host): + return "A ServerTrustEvaluating value is required for host \(host) but none was found." + case .noCertificatesFound: + return "No certificates were found or provided for evaluation." + case .noPublicKeysFound: + return "No public keys were found or provided for evaluation." + case .policyApplicationFailed: + return "Attempting to set a SecPolicy failed." + case .settingAnchorCertificatesFailed: + return "Attempting to set the provided certificates as anchor certificates failed." + case .revocationPolicyCreationFailed: + return "Attempting to create a revocation policy failed." + case let .defaultEvaluationFailed(output): + return "Default evaluation failed for host \(output.host)." + case let .hostValidationFailed(output): + return "Host validation failed for host \(output.host)." + case .revocationCheckFailed(let output, _): + return "Revocation check failed for host \(output.host)." + case .certificatePinningFailed(let host, _, _, _): + return "Certificate pinning failed for host \(host)." + case .publicKeyPinningFailed(let host, _, _, _): + return "Public key pinning failed for host \(host)." + case let .customEvaluationFailed(error): + return "Custom trust evaluation failed with error: \(error.localizedDescription)" + } + } +} + +extension AFError.URLRequestValidationFailureReason { + var localizedDescription: String { + switch self { + case let .bodyDataInGETRequest(data): + return """ + Invalid URLRequest: Requests with GET method cannot have body data: + \(String(decoding: data, as: UTF8.self)) + """ } } } diff --git a/Example/Pods/Alamofire/Source/Alamofire.swift b/Example/Pods/Alamofire/Source/Alamofire.swift index 20c3672..549922d 100644 --- a/Example/Pods/Alamofire/Source/Alamofire.swift +++ b/Example/Pods/Alamofire/Source/Alamofire.swift @@ -1,7 +1,7 @@ // // Alamofire.swift // -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -24,442 +24,497 @@ import Foundation -/// Types adopting the `URLConvertible` protocol can be used to construct URLs, which are then used to construct -/// URL requests. -public protocol URLConvertible { - /// Returns a URL that conforms to RFC 2396 or throws an `Error`. - /// - /// - throws: An `Error` if the type cannot be converted to a `URL`. - /// - /// - returns: A URL or throws an `Error`. - func asURL() throws -> URL -} +/// Global namespace containing API for the `default` `Session` instance. +public enum AF { + /// Current Alamofire version. Necessary since SPM doesn't use dynamic libraries. Plus this will be more accurate. + static let version = "5.0.0-rc.2" -extension String: URLConvertible { - /// Returns a URL if `self` represents a valid URL string that conforms to RFC 2396 or throws an `AFError`. + // MARK: - Data Request + + /// Creates a `DataRequest` using `Session.default` to retrieve the contents of the specified `url` using the + /// `method`, `parameters`, `encoding`, and `headers` provided. /// - /// - throws: An `AFError.invalidURL` if `self` is not a valid URL string. + /// - Parameters: + /// - url: The `URLConvertible` value. + /// - method: The `HTTPMethod`, `.get` by default. + /// - parameters: The `Parameters`, `nil` by default. + /// - encoding: The `ParameterEncoding`, `URLEncoding.default` by default. + /// - headers: The `HTTPHeaders`, `nil` by default. + /// - interceptor: The `RequestInterceptor`, `nil` by default. /// - /// - returns: A URL or throws an `AFError`. - public func asURL() throws -> URL { - guard let url = URL(string: self) else { throw AFError.invalidURL(url: self) } - return url + /// - Returns: The created `DataRequest`. + public static func request(_ url: URLConvertible, + method: HTTPMethod = .get, + parameters: Parameters? = nil, + encoding: ParameterEncoding = URLEncoding.default, + headers: HTTPHeaders? = nil, + interceptor: RequestInterceptor? = nil) -> DataRequest { + return Session.default.request(url, + method: method, + parameters: parameters, + encoding: encoding, + headers: headers, + interceptor: interceptor) } -} - -extension URL: URLConvertible { - /// Returns self. - public func asURL() throws -> URL { return self } -} -extension URLComponents: URLConvertible { - /// Returns a URL if `url` is not nil, otherwise throws an `Error`. + /// Creates a `DataRequest` using `Session.default` to retrieve the contents of the specified `url` using the + /// `method`, `parameters`, `encoding`, and `headers` provided. /// - /// - throws: An `AFError.invalidURL` if `url` is `nil`. + /// - Parameters: + /// - url: The `URLConvertible` value. + /// - method: The `HTTPMethod`, `.get` by default. + /// - parameters: The `Encodable` parameters, `nil` by default. + /// - encoding: The `ParameterEncoder`, `URLEncodedFormParameterEncoder.default` by default. + /// - headers: The `HTTPHeaders`, `nil` by default. + /// - interceptor: The `RequestInterceptor`, `nil` by default. /// - /// - returns: A URL or throws an `AFError`. - public func asURL() throws -> URL { - guard let url = url else { throw AFError.invalidURL(url: self) } - return url + /// - Returns: The created `DataRequest`. + public static func request(_ url: URLConvertible, + method: HTTPMethod = .get, + parameters: Parameters? = nil, + encoder: ParameterEncoder = URLEncodedFormParameterEncoder.default, + headers: HTTPHeaders? = nil, + interceptor: RequestInterceptor? = nil) -> DataRequest { + return Session.default.request(url, + method: method, + parameters: parameters, + encoder: encoder, + headers: headers, + interceptor: interceptor) } -} - -// MARK: - -/// Types adopting the `URLRequestConvertible` protocol can be used to construct URL requests. -public protocol URLRequestConvertible { - /// Returns a URL request or throws if an `Error` was encountered. + /// Creates a `DataRequest` using `Session.default` to execute the specified `urlRequest`. /// - /// - throws: An `Error` if the underlying `URLRequest` is `nil`. + /// - Parameters: + /// - urlRequest: The `URLRequestConvertible` value. + /// - interceptor: The `RequestInterceptor`, `nil` by default. /// - /// - returns: A URL request. - func asURLRequest() throws -> URLRequest -} - -extension URLRequestConvertible { - /// The URL request. - public var urlRequest: URLRequest? { return try? asURLRequest() } -} - -extension URLRequest: URLRequestConvertible { - /// Returns a URL request or throws if an `Error` was encountered. - public func asURLRequest() throws -> URLRequest { return self } -} + /// - Returns: The created `DataRequest`. + public static func request(_ urlRequest: URLRequestConvertible, interceptor: RequestInterceptor? = nil) -> DataRequest { + return Session.default.request(urlRequest, interceptor: interceptor) + } -// MARK: - + // MARK: - Download Request -extension URLRequest { - /// Creates an instance with the specified `method`, `urlString` and `headers`. + /// Creates a `DownloadRequest` using `Session.default` to download the contents of the specified `url` to + /// the provided `destination` using the `method`, `parameters`, `encoding`, and `headers` provided. /// - /// - parameter url: The URL. - /// - parameter method: The HTTP method. - /// - parameter headers: The HTTP headers. `nil` by default. + /// If `destination` is not specified, the download will be moved to a temporary location determined by Alamofire. /// - /// - returns: The new `URLRequest` instance. - public init(url: URLConvertible, method: HTTPMethod, headers: HTTPHeaders? = nil) throws { - let url = try url.asURL() - - self.init(url: url) - - httpMethod = method.rawValue - - if let headers = headers { - for (headerField, headerValue) in headers { - setValue(headerValue, forHTTPHeaderField: headerField) - } - } + /// - Parameters: + /// - url: The `URLConvertible` value. + /// - method: The `HTTPMethod`, `.get` by default. + /// - parameters: The `Parameters`, `nil` by default. + /// - encoding: The `ParameterEncoding`, `URLEncoding.default` by default. + /// - headers: The `HTTPHeaders`, `nil` by default. + /// - interceptor: The `RequestInterceptor`, `nil` by default. + /// - destination: The `DownloadRequest.Destination` closure used the determine the destination of the + /// downloaded file. `nil` by default. + /// + /// - Returns: The created `DownloadRequest`. + public static func download(_ url: URLConvertible, + method: HTTPMethod = .get, + parameters: Parameters? = nil, + encoding: ParameterEncoding = URLEncoding.default, + headers: HTTPHeaders? = nil, + interceptor: RequestInterceptor? = nil, + to destination: DownloadRequest.Destination? = nil) -> DownloadRequest { + return Session.default.download(url, + method: method, + parameters: parameters, + encoding: encoding, + headers: headers, + interceptor: interceptor, + to: destination) } - func adapt(using adapter: RequestAdapter?) throws -> URLRequest { - guard let adapter = adapter else { return self } - return try adapter.adapt(self) + /// Creates a `DownloadRequest` using `Session.default` to download the contents of the specified `url` to the + /// provided `destination` using the `method`, encodable `parameters`, `encoder`, and `headers` provided. + /// + /// - Note: If `destination` is not specified, the download will be moved to a temporary location determined by + /// Alamofire. + /// + /// - Parameters: + /// - url: The `URLConvertible` value. + /// - method: The `HTTPMethod`, `.get` by default. + /// - parameters: The `Encodable` parameters, `nil` by default. + /// - encoder: The `ParameterEncoder`, `URLEncodedFormParameterEncoder.default` by default. + /// - headers: The `HTTPHeaders`, `nil` by default. + /// - interceptor: The `RequestInterceptor`, `nil` by default. + /// - destination: The `DownloadRequest.Destination` closure used the determine the destination of the + /// downloaded file. `nil` by default. + /// + /// - Returns: The created `DownloadRequest`. + public static func download(_ url: URLConvertible, + method: HTTPMethod = .get, + parameters: Parameters? = nil, + encoder: ParameterEncoder = URLEncodedFormParameterEncoder.default, + headers: HTTPHeaders? = nil, + interceptor: RequestInterceptor? = nil, + to destination: DownloadRequest.Destination? = nil) -> DownloadRequest { + return Session.default.download(url, + method: method, + parameters: parameters, + encoder: encoder, + headers: headers, + interceptor: interceptor, + to: destination) } -} -// MARK: - Data Request + // MARK: URLRequest -/// Creates a `DataRequest` using the default `SessionManager` to retrieve the contents of the specified `url`, -/// `method`, `parameters`, `encoding` and `headers`. -/// -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.get` by default. -/// - parameter parameters: The parameters. `nil` by default. -/// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// -/// - returns: The created `DataRequest`. -@discardableResult -public func request( - _ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil) - -> DataRequest -{ - return SessionManager.default.request( - url, - method: method, - parameters: parameters, - encoding: encoding, - headers: headers - ) -} - -/// Creates a `DataRequest` using the default `SessionManager` to retrieve the contents of a URL based on the -/// specified `urlRequest`. -/// -/// - parameter urlRequest: The URL request -/// -/// - returns: The created `DataRequest`. -@discardableResult -public func request(_ urlRequest: URLRequestConvertible) -> DataRequest { - return SessionManager.default.request(urlRequest) -} - -// MARK: - Download Request - -// MARK: URL Request - -/// Creates a `DownloadRequest` using the default `SessionManager` to retrieve the contents of the specified `url`, -/// `method`, `parameters`, `encoding`, `headers` and save them to the `destination`. -/// -/// If `destination` is not specified, the contents will remain in the temporary location determined by the -/// underlying URL session. -/// -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.get` by default. -/// - parameter parameters: The parameters. `nil` by default. -/// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. -/// -/// - returns: The created `DownloadRequest`. -@discardableResult -public func download( - _ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ - return SessionManager.default.download( - url, - method: method, - parameters: parameters, - encoding: encoding, - headers: headers, - to: destination - ) -} - -/// Creates a `DownloadRequest` using the default `SessionManager` to retrieve the contents of a URL based on the -/// specified `urlRequest` and save them to the `destination`. -/// -/// If `destination` is not specified, the contents will remain in the temporary location determined by the -/// underlying URL session. -/// -/// - parameter urlRequest: The URL request. -/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. -/// -/// - returns: The created `DownloadRequest`. -@discardableResult -public func download( - _ urlRequest: URLRequestConvertible, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ - return SessionManager.default.download(urlRequest, to: destination) -} - -// MARK: Resume Data - -/// Creates a `DownloadRequest` using the default `SessionManager` from the `resumeData` produced from a -/// previous request cancellation to retrieve the contents of the original request and save them to the `destination`. -/// -/// If `destination` is not specified, the contents will remain in the temporary location determined by the -/// underlying URL session. -/// -/// On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), `resumeData` is broken -/// on background URL session configurations. There's an underlying bug in the `resumeData` generation logic where the -/// data is written incorrectly and will always fail to resume the download. For more information about the bug and -/// possible workarounds, please refer to the following Stack Overflow post: -/// -/// - http://stackoverflow.com/a/39347461/1342462 -/// -/// - parameter resumeData: The resume data. This is an opaque data blob produced by `URLSessionDownloadTask` -/// when a task is cancelled. See `URLSession -downloadTask(withResumeData:)` for additional -/// information. -/// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. -/// -/// - returns: The created `DownloadRequest`. -@discardableResult -public func download( - resumingWith resumeData: Data, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest -{ - return SessionManager.default.download(resumingWith: resumeData, to: destination) -} - -// MARK: - Upload Request + /// Creates a `DownloadRequest` using `Session.default` to execute the specified `urlRequest` and download + /// the result to the provided `destination`. + /// + /// - Parameters: + /// - urlRequest: The `URLRequestConvertible` value. + /// - interceptor: The `RequestInterceptor`, `nil` by default. + /// - destination: The `DownloadRequest.Destination` closure used the determine the destination of the + /// downloaded file. `nil` by default. + /// + /// - Returns: The created `DownloadRequest`. + public static func download(_ urlRequest: URLRequestConvertible, + interceptor: RequestInterceptor? = nil, + to destination: DownloadRequest.Destination? = nil) -> DownloadRequest { + return Session.default.download(urlRequest, interceptor: interceptor, to: destination) + } -// MARK: File + // MARK: Resume Data -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` -/// for uploading the `file`. -/// -/// - parameter file: The file to upload. -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.post` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload( - _ fileURL: URL, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest -{ - return SessionManager.default.upload(fileURL, to: url, method: method, headers: headers) -} + /// Creates a `DownloadRequest` using the `Session.default` from the `resumeData` produced from a previous + /// `DownloadRequest` cancellation to retrieve the contents of the original request and save them to the `destination`. + /// + /// - Note: If `destination` is not specified, the download will be moved to a temporary location determined by + /// Alamofire. + /// + /// - Note: On some versions of all Apple platforms (iOS 10 - 10.2, macOS 10.12 - 10.12.2, tvOS 10 - 10.1, watchOS 3 - 3.1.1), + /// `resumeData` is broken on background URL session configurations. There's an underlying bug in the `resumeData` + /// generation logic where the data is written incorrectly and will always fail to resume the download. For more + /// information about the bug and possible workarounds, please refer to the [this Stack Overflow post](http://stackoverflow.com/a/39347461/1342462). + /// + /// - Parameters: + /// - resumeData: The resume `Data`. This is an opaque blob produced by `URLSessionDownloadTask` when a task is + /// cancelled. See [Apple's documentation](https://developer.apple.com/documentation/foundation/urlsessiondownloadtask/1411634-cancel) + /// for more information. + /// - interceptor: The `RequestInterceptor`, `nil` by default. + /// - destination: The `DownloadRequest.Destination` closure used to determine the destination of the downloaded + /// file. `nil` by default. + /// + /// - Returns: The created `DownloadRequest`. + public static func download(resumingWith resumeData: Data, + interceptor: RequestInterceptor? = nil, + to destination: DownloadRequest.Destination? = nil) -> DownloadRequest { + return Session.default.download(resumingWith: resumeData, interceptor: interceptor, to: destination) + } -/// Creates a `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for -/// uploading the `file`. -/// -/// - parameter file: The file to upload. -/// - parameter urlRequest: The URL request. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload(_ fileURL: URL, with urlRequest: URLRequestConvertible) -> UploadRequest { - return SessionManager.default.upload(fileURL, with: urlRequest) -} + // MARK: - Upload Request -// MARK: Data + // MARK: Data -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` -/// for uploading the `data`. -/// -/// - parameter data: The data to upload. -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.post` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload( - _ data: Data, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest -{ - return SessionManager.default.upload(data, to: url, method: method, headers: headers) -} - -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for -/// uploading the `data`. -/// -/// - parameter data: The data to upload. -/// - parameter urlRequest: The URL request. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload(_ data: Data, with urlRequest: URLRequestConvertible) -> UploadRequest { - return SessionManager.default.upload(data, with: urlRequest) -} + /// Creates an `UploadRequest` for the given `Data`, `URLRequest` components, and `RequestInterceptor`. + /// + /// - Parameters: + /// - data: The `Data` to upload. + /// - convertible: `URLConvertible` value to be used as the `URLRequest`'s `URL`. + /// - method: `HTTPMethod` for the `URLRequest`. `.post` by default. + /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. + /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. + /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by + /// default. + /// + /// - Returns: The created `UploadRequest`. + public static func upload(_ data: Data, + to convertible: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil, + interceptor: RequestInterceptor? = nil, + fileManager: FileManager = .default) -> UploadRequest { + return Session.default.upload(data, + to: convertible, + method: method, + headers: headers, + interceptor: interceptor, + fileManager: fileManager) + } -// MARK: InputStream + /// Creates an `UploadRequest` for the given `Data` using the `URLRequestConvertible` value and `RequestInterceptor`. + /// + /// - Parameters: + /// - data: The `Data` to upload. + /// - convertible: `URLRequestConvertible` value to be used to create the `URLRequest`. + /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. + /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by + /// default. + /// + /// - Returns: The created `UploadRequest`. + public static func upload(_ data: Data, + with convertible: URLRequestConvertible, + interceptor: RequestInterceptor? = nil, + fileManager: FileManager = .default) -> UploadRequest { + return Session.default.upload(data, with: convertible, interceptor: interceptor, fileManager: fileManager) + } -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `url`, `method` and `headers` -/// for uploading the `stream`. -/// -/// - parameter stream: The stream to upload. -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.post` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload( - _ stream: InputStream, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest -{ - return SessionManager.default.upload(stream, to: url, method: method, headers: headers) -} + // MARK: File -/// Creates an `UploadRequest` using the default `SessionManager` from the specified `urlRequest` for -/// uploading the `stream`. -/// -/// - parameter urlRequest: The URL request. -/// - parameter stream: The stream to upload. -/// -/// - returns: The created `UploadRequest`. -@discardableResult -public func upload(_ stream: InputStream, with urlRequest: URLRequestConvertible) -> UploadRequest { - return SessionManager.default.upload(stream, with: urlRequest) -} + /// Creates an `UploadRequest` for the file at the given file `URL`, using a `URLRequest` from the provided + /// components and `RequestInterceptor`. + /// + /// - Parameters: + /// - fileURL: The `URL` of the file to upload. + /// - convertible: `URLConvertible` value to be used as the `URLRequest`'s `URL`. + /// - method: `HTTPMethod` for the `URLRequest`. `.post` by default. + /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. + /// - interceptor: `RequestInterceptor` value to be used by the returned `UploadRequest`. `nil` by default. + /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by + /// default. + /// + /// - Returns: The created `UploadRequest`. + public static func upload(_ fileURL: URL, + to convertible: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil, + interceptor: RequestInterceptor? = nil, + fileManager: FileManager = .default) -> UploadRequest { + return Session.default.upload(fileURL, + to: convertible, + method: method, + headers: headers, + interceptor: interceptor, + fileManager: fileManager) + } -// MARK: MultipartFormData + /// Creates an `UploadRequest` for the file at the given file `URL` using the `URLRequestConvertible` value and + /// `RequestInterceptor`. + /// + /// - Parameters: + /// - fileURL: The `URL` of the file to upload. + /// - convertible: `URLRequestConvertible` value to be used to create the `URLRequest`. + /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. + /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by + /// default. + /// + /// - Returns: The created `UploadRequest`. + public static func upload(_ fileURL: URL, + with convertible: URLRequestConvertible, + interceptor: RequestInterceptor? = nil, + fileManager: FileManager = .default) -> UploadRequest { + return Session.default.upload(fileURL, with: convertible, interceptor: interceptor, fileManager: fileManager) + } -/// Encodes `multipartFormData` using `encodingMemoryThreshold` with the default `SessionManager` and calls -/// `encodingCompletion` with new `UploadRequest` using the `url`, `method` and `headers`. -/// -/// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative -/// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most -/// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to -/// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory -/// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be -/// used for larger payloads such as video content. -/// -/// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory -/// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, -/// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk -/// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding -/// technique was used. -/// -/// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. -/// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. -/// `multipartFormDataEncodingMemoryThreshold` by default. -/// - parameter url: The URL. -/// - parameter method: The HTTP method. `.post` by default. -/// - parameter headers: The HTTP headers. `nil` by default. -/// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. -public func upload( - multipartFormData: @escaping (MultipartFormData) -> Void, - usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil, - encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) -{ - return SessionManager.default.upload( - multipartFormData: multipartFormData, - usingThreshold: encodingMemoryThreshold, - to: url, - method: method, - headers: headers, - encodingCompletion: encodingCompletion - ) -} + // MARK: InputStream -/// Encodes `multipartFormData` using `encodingMemoryThreshold` and the default `SessionManager` and -/// calls `encodingCompletion` with new `UploadRequest` using the `urlRequest`. -/// -/// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative -/// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most -/// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to -/// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory -/// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be -/// used for larger payloads such as video content. -/// -/// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory -/// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, -/// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk -/// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding -/// technique was used. -/// -/// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. -/// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. -/// `multipartFormDataEncodingMemoryThreshold` by default. -/// - parameter urlRequest: The URL request. -/// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. -public func upload( - multipartFormData: @escaping (MultipartFormData) -> Void, - usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, - with urlRequest: URLRequestConvertible, - encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?) -{ - return SessionManager.default.upload( - multipartFormData: multipartFormData, - usingThreshold: encodingMemoryThreshold, - with: urlRequest, - encodingCompletion: encodingCompletion - ) -} + /// Creates an `UploadRequest` from the `InputStream` provided using a `URLRequest` from the provided components and + /// `RequestInterceptor`. + /// + /// - Parameters: + /// - stream: The `InputStream` that provides the data to upload. + /// - convertible: `URLConvertible` value to be used as the `URLRequest`'s `URL`. + /// - method: `HTTPMethod` for the `URLRequest`. `.post` by default. + /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. + /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. + /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by + /// default. + /// + /// - Returns: The created `UploadRequest`. + public static func upload(_ stream: InputStream, + to convertible: URLConvertible, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil, + interceptor: RequestInterceptor? = nil, + fileManager: FileManager = .default) -> UploadRequest { + return Session.default.upload(stream, + to: convertible, + method: method, + headers: headers, + interceptor: interceptor, + fileManager: fileManager) + } -#if !os(watchOS) + /// Creates an `UploadRequest` from the provided `InputStream` using the `URLRequestConvertible` value and + /// `RequestInterceptor`. + /// + /// - Parameters: + /// - stream: The `InputStream` that provides the data to upload. + /// - convertible: `URLRequestConvertible` value to be used to create the `URLRequest`. + /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. + /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by + /// default. + /// + /// - Returns: The created `UploadRequest`. + public static func upload(_ stream: InputStream, + with convertible: URLRequestConvertible, + interceptor: RequestInterceptor? = nil, + fileManager: FileManager = .default) -> UploadRequest { + return Session.default.upload(stream, with: convertible, interceptor: interceptor, fileManager: fileManager) + } -// MARK: - Stream Request + // MARK: MultipartFormData -// MARK: Hostname and Port + /// Creates an `UploadRequest` for the multipart form data built using a closure and sent using the provided + /// `URLRequest` components and `RequestInterceptor`. + /// + /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cumulative + /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most + /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to + /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory + /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be + /// used for larger payloads such as video content. + /// + /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory + /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, + /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk + /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding + /// technique was used. + /// + /// - Parameters: + /// - multipartFormData: `MultipartFormData` building closure. + /// - convertible: `URLConvertible` value to be used as the `URLRequest`'s `URL`. + /// - encodingMemoryThreshold: Byte threshold used to determine whether the form data is encoded into memory or + /// onto disk before being uploaded. `MultipartFormData.encodingMemoryThreshold` by + /// default. + /// - method: `HTTPMethod` for the `URLRequest`. `.post` by default. + /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. + /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. + /// - fileManager: `FileManager` to be used if the form data exceeds the memory threshold and is + /// written to disk before being uploaded. `.default` instance by default. + /// + /// - Returns: The created `UploadRequest`. + public static func upload(multipartFormData: @escaping (MultipartFormData) -> Void, + to url: URLConvertible, + usingThreshold encodingMemoryThreshold: UInt64 = MultipartFormData.encodingMemoryThreshold, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil, + interceptor: RequestInterceptor? = nil, + fileManager: FileManager = .default) -> UploadRequest { + return Session.default.upload(multipartFormData: multipartFormData, + to: url, + usingThreshold: encodingMemoryThreshold, + method: method, + headers: headers, + interceptor: interceptor, + fileManager: fileManager) + } -/// Creates a `StreamRequest` using the default `SessionManager` for bidirectional streaming with the `hostname` -/// and `port`. -/// -/// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. -/// -/// - parameter hostName: The hostname of the server to connect to. -/// - parameter port: The port of the server to connect to. -/// -/// - returns: The created `StreamRequest`. -@discardableResult -@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) -public func stream(withHostName hostName: String, port: Int) -> StreamRequest { - return SessionManager.default.stream(withHostName: hostName, port: port) -} + /// Creates an `UploadRequest` using a `MultipartFormData` building closure, the provided `URLRequestConvertible` + /// value, and a `RequestInterceptor`. + /// + /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cumulative + /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most + /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to + /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory + /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be + /// used for larger payloads such as video content. + /// + /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory + /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, + /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk + /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding + /// technique was used. + /// + /// - Parameters: + /// - multipartFormData: `MultipartFormData` building closure. + /// - request: `URLRequestConvertible` value to be used to create the `URLRequest`. + /// - encodingMemoryThreshold: Byte threshold used to determine whether the form data is encoded into memory or + /// onto disk before being uploaded. `MultipartFormData.encodingMemoryThreshold` by + /// default. + /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. + /// - fileManager: `FileManager` to be used if the form data exceeds the memory threshold and is + /// written to disk before being uploaded. `.default` instance by default. + /// + /// - Returns: The created `UploadRequest`. + public static func upload(multipartFormData: @escaping (MultipartFormData) -> Void, + with request: URLRequestConvertible, + usingThreshold encodingMemoryThreshold: UInt64 = MultipartFormData.encodingMemoryThreshold, + interceptor: RequestInterceptor? = nil, + fileManager: FileManager = .default) -> UploadRequest { + return Session.default.upload(multipartFormData: multipartFormData, + with: request, + usingThreshold: encodingMemoryThreshold, + interceptor: interceptor, + fileManager: fileManager) + } -// MARK: NetService + /// Creates an `UploadRequest` for the prebuilt `MultipartFormData` value using the provided `URLRequest` components + /// and `RequestInterceptor`. + /// + /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cumulative + /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most + /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to + /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory + /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be + /// used for larger payloads such as video content. + /// + /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory + /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, + /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk + /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding + /// technique was used. + /// + /// - Parameters: + /// - multipartFormData: `MultipartFormData` instance to upload. + /// - url: `URLConvertible` value to be used as the `URLRequest`'s `URL`. + /// - encodingMemoryThreshold: Byte threshold used to determine whether the form data is encoded into memory or + /// onto disk before being uploaded. `MultipartFormData.encodingMemoryThreshold` by + /// default. + /// - method: `HTTPMethod` for the `URLRequest`. `.post` by default. + /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. + /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. + /// - fileManager: `FileManager` to be used if the form data exceeds the memory threshold and is + /// written to disk before being uploaded. `.default` instance by default. + /// + /// - Returns: The created `UploadRequest`. + public static func upload(multipartFormData: MultipartFormData, + to url: URLConvertible, + usingThreshold encodingMemoryThreshold: UInt64 = MultipartFormData.encodingMemoryThreshold, + method: HTTPMethod = .post, + headers: HTTPHeaders? = nil, + interceptor: RequestInterceptor? = nil, + fileManager: FileManager = .default) -> UploadRequest { + return Session.default.upload(multipartFormData: multipartFormData, + to: url, + usingThreshold: encodingMemoryThreshold, + method: method, + headers: headers, + interceptor: interceptor, + fileManager: fileManager) + } -/// Creates a `StreamRequest` using the default `SessionManager` for bidirectional streaming with the `netService`. -/// -/// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. -/// -/// - parameter netService: The net service used to identify the endpoint. -/// -/// - returns: The created `StreamRequest`. -@discardableResult -@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) -public func stream(with netService: NetService) -> StreamRequest { - return SessionManager.default.stream(with: netService) + /// Creates an `UploadRequest` for the prebuilt `MultipartFormData` value using the providing `URLRequestConvertible` + /// value and `RequestInterceptor`. + /// + /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cumulative + /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most + /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to + /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory + /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be + /// used for larger payloads such as video content. + /// + /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory + /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, + /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk + /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding + /// technique was used. + /// + /// - Parameters: + /// - multipartFormData: `MultipartFormData` instance to upload. + /// - request: `URLRequestConvertible` value to be used to create the `URLRequest`. + /// - encodingMemoryThreshold: Byte threshold used to determine whether the form data is encoded into memory or + /// onto disk before being uploaded. `MultipartFormData.encodingMemoryThreshold` by + /// default. + /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. + /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by + /// default. + /// + /// - Returns: The created `UploadRequest`. + public static func upload(multipartFormData: MultipartFormData, + with request: URLRequestConvertible, + usingThreshold encodingMemoryThreshold: UInt64 = MultipartFormData.encodingMemoryThreshold, + interceptor: RequestInterceptor? = nil, + fileManager: FileManager = .default) -> UploadRequest { + return Session.default.upload(multipartFormData: multipartFormData, + with: request, + usingThreshold: encodingMemoryThreshold, + interceptor: interceptor, + fileManager: fileManager) + } } - -#endif diff --git a/Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift b/Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift index a54673c..10cd273 100644 --- a/Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift +++ b/Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift @@ -1,7 +1,7 @@ // // DispatchQueue+Alamofire.swift // -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -26,11 +26,11 @@ import Dispatch import Foundation extension DispatchQueue { - static var userInteractive: DispatchQueue { return DispatchQueue.global(qos: .userInteractive) } - static var userInitiated: DispatchQueue { return DispatchQueue.global(qos: .userInitiated) } - static var utility: DispatchQueue { return DispatchQueue.global(qos: .utility) } - static var background: DispatchQueue { return DispatchQueue.global(qos: .background) } - + /// Execute the provided closure after a `TimeInterval`. + /// + /// - Parameters: + /// - delay: `TimeInterval` to delay execution. + /// - closure: Closure to execute. func after(_ delay: TimeInterval, execute closure: @escaping () -> Void) { asyncAfter(deadline: .now() + delay, execute: closure) } diff --git a/Example/Pods/Alamofire/Source/MultipartFormData.swift b/Example/Pods/Alamofire/Source/MultipartFormData.swift index b840138..4ef54aa 100644 --- a/Example/Pods/Alamofire/Source/MultipartFormData.swift +++ b/Example/Pods/Alamofire/Source/MultipartFormData.swift @@ -1,7 +1,7 @@ // // MultipartFormData.swift // -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -43,7 +43,6 @@ import CoreServices /// - https://www.ietf.org/rfc/rfc2045.txt /// - https://www.w3.org/TR/html401/interact/forms.html#h-17.13 open class MultipartFormData { - // MARK: - Helper Types struct EncodingCharacters { @@ -71,7 +70,7 @@ open class MultipartFormData { boundaryText = "\(EncodingCharacters.crlf)--\(boundary)--\(EncodingCharacters.crlf)" } - return boundaryText.data(using: String.Encoding.utf8, allowLossyConversion: false)! + return Data(boundaryText.utf8) } } @@ -91,6 +90,9 @@ open class MultipartFormData { // MARK: - Properties + /// Default memory threshold used when encoding `MultipartFormData`, in bytes. + public static let encodingMemoryThreshold: UInt64 = 10_000_000 + /// The `Content-Type` header value containing the boundary used to generate the `multipart/form-data`. open lazy var contentType: String = "multipart/form-data; boundary=\(self.boundary)" @@ -98,7 +100,9 @@ open class MultipartFormData { public var contentLength: UInt64 { return bodyParts.reduce(0) { $0 + $1.bodyContentLength } } /// The boundary used to separate the body parts in the encoded form data. - public var boundary: String + public let boundary: String + + let fileManager: FileManager private var bodyParts: [BodyPart] private var bodyPartError: AFError? @@ -106,63 +110,27 @@ open class MultipartFormData { // MARK: - Lifecycle - /// Creates a multipart form data object. + /// Creates an instance. /// - /// - returns: The multipart form data object. - public init() { - self.boundary = BoundaryGenerator.randomBoundary() - self.bodyParts = [] - - /// - /// The optimal read/write buffer size in bytes for input and output streams is 1024 (1KB). For more - /// information, please refer to the following article: - /// - https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Streams/Articles/ReadingInputStreams.html - /// - - self.streamBufferSize = 1024 + /// - Parameters: + /// - fileManager: `FileManager` to use for file operations, if needed. + /// - boundary: Boundary `String` used to separate body parts. + public init(fileManager: FileManager = .default, boundary: String? = nil) { + self.fileManager = fileManager + self.boundary = boundary ?? BoundaryGenerator.randomBoundary() + bodyParts = [] + + // + // The optimal read/write buffer size in bytes for input and output streams is 1024 (1KB). For more + // information, please refer to the following article: + // - https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Streams/Articles/ReadingInputStreams.html + // + streamBufferSize = 1024 } // MARK: - Body Parts - /// Creates a body part from the data and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}` (HTTP Header) - /// - Encoded data - /// - Multipart form boundary - /// - /// - parameter data: The data to encode into the multipart form data. - /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - public func append(_ data: Data, withName name: String) { - let headers = contentHeaders(withName: name) - let stream = InputStream(data: data) - let length = UInt64(data.count) - - append(stream, withLength: length, headers: headers) - } - - /// Creates a body part from the data and appends it to the multipart form data object. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}` (HTTP Header) - /// - `Content-Type: #{generated mimeType}` (HTTP Header) - /// - Encoded data - /// - Multipart form boundary - /// - /// - parameter data: The data to encode into the multipart form data. - /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - /// - parameter mimeType: The MIME type to associate with the data content type in the `Content-Type` HTTP header. - public func append(_ data: Data, withName name: String, mimeType: String) { - let headers = contentHeaders(withName: name, mimeType: mimeType) - let stream = InputStream(data: data) - let length = UInt64(data.count) - - append(stream, withLength: length, headers: headers) - } - - /// Creates a body part from the data and appends it to the multipart form data object. + /// Creates a body part from the data and appends it to the instance. /// /// The body part data will be encoded using the following format: /// @@ -171,11 +139,12 @@ open class MultipartFormData { /// - Encoded file data /// - Multipart form boundary /// - /// - parameter data: The data to encode into the multipart form data. - /// - parameter name: The name to associate with the data in the `Content-Disposition` HTTP header. - /// - parameter fileName: The filename to associate with the data in the `Content-Disposition` HTTP header. - /// - parameter mimeType: The MIME type to associate with the data in the `Content-Type` HTTP header. - public func append(_ data: Data, withName name: String, fileName: String, mimeType: String) { + /// - Parameters: + /// - data: `Data` to encoding into the instance. + /// - name: Name to associate with the `Data` in the `Content-Disposition` HTTP header. + /// - fileName: Filename to associate with the `Data` in the `Content-Disposition` HTTP header. + /// - mimeType: MIME type to associate with the data in the `Content-Type` HTTP header. + public func append(_ data: Data, withName name: String, fileName: String? = nil, mimeType: String? = nil) { let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) let stream = InputStream(data: data) let length = UInt64(data.count) @@ -183,7 +152,7 @@ open class MultipartFormData { append(stream, withLength: length, headers: headers) } - /// Creates a body part from the file and appends it to the multipart form data object. + /// Creates a body part from the file and appends it to the instance. /// /// The body part data will be encoded using the following format: /// @@ -196,8 +165,9 @@ open class MultipartFormData { /// `fileURL`. The `Content-Type` HTTP header MIME type is generated by mapping the `fileURL` extension to the /// system associated MIME type. /// - /// - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. - /// - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. + /// - Parameters: + /// - fileURL: `URL` of the file whose content will be encoded into the instance. + /// - name: Name to associate with the file content in the `Content-Disposition` HTTP header. public func append(_ fileURL: URL, withName name: String) { let fileName = fileURL.lastPathComponent let pathExtension = fileURL.pathExtension @@ -210,7 +180,7 @@ open class MultipartFormData { } } - /// Creates a body part from the file and appends it to the multipart form data object. + /// Creates a body part from the file and appends it to the instance. /// /// The body part data will be encoded using the following format: /// @@ -219,10 +189,11 @@ open class MultipartFormData { /// - Encoded file data /// - Multipart form boundary /// - /// - parameter fileURL: The URL of the file whose content will be encoded into the multipart form data. - /// - parameter name: The name to associate with the file content in the `Content-Disposition` HTTP header. - /// - parameter fileName: The filename to associate with the file content in the `Content-Disposition` HTTP header. - /// - parameter mimeType: The MIME type to associate with the file content in the `Content-Type` HTTP header. + /// - Parameters: + /// - fileURL: `URL` of the file whose content will be encoded into the instance. + /// - name: Name to associate with the file content in the `Content-Disposition` HTTP header. + /// - fileName: Filename to associate with the file content in the `Content-Disposition` HTTP header. + /// - mimeType: MIME type to associate with the file content in the `Content-Type` HTTP header. public func append(_ fileURL: URL, withName name: String, fileName: String, mimeType: String) { let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) @@ -257,7 +228,7 @@ open class MultipartFormData { var isDirectory: ObjCBool = false let path = fileURL.path - guard FileManager.default.fileExists(atPath: path, isDirectory: &isDirectory) && !isDirectory.boolValue else { + guard fileManager.fileExists(atPath: path, isDirectory: &isDirectory) && !isDirectory.boolValue else { setBodyPartError(withReason: .bodyPartFileIsDirectory(at: fileURL)) return } @@ -269,14 +240,13 @@ open class MultipartFormData { let bodyContentLength: UInt64 do { - guard let fileSize = try FileManager.default.attributesOfItem(atPath: path)[.size] as? NSNumber else { + guard let fileSize = try fileManager.attributesOfItem(atPath: path)[.size] as? NSNumber else { setBodyPartError(withReason: .bodyPartFileSizeNotAvailable(at: fileURL)) return } bodyContentLength = fileSize.uint64Value - } - catch { + } catch { setBodyPartError(withReason: .bodyPartFileSizeQueryFailedWithError(forURL: fileURL, error: error)) return } @@ -293,7 +263,7 @@ open class MultipartFormData { append(stream, withLength: bodyContentLength, headers: headers) } - /// Creates a body part from the stream and appends it to the multipart form data object. + /// Creates a body part from the stream and appends it to the instance. /// /// The body part data will be encoded using the following format: /// @@ -302,23 +272,22 @@ open class MultipartFormData { /// - Encoded stream data /// - Multipart form boundary /// - /// - parameter stream: The input stream to encode in the multipart form data. - /// - parameter length: The content length of the stream. - /// - parameter name: The name to associate with the stream content in the `Content-Disposition` HTTP header. - /// - parameter fileName: The filename to associate with the stream content in the `Content-Disposition` HTTP header. - /// - parameter mimeType: The MIME type to associate with the stream content in the `Content-Type` HTTP header. - public func append( - _ stream: InputStream, - withLength length: UInt64, - name: String, - fileName: String, - mimeType: String) - { + /// - Parameters: + /// - stream: `InputStream` to encode into the instance. + /// - length: Length, in bytes, of the stream. + /// - name: Name to associate with the stream content in the `Content-Disposition` HTTP header. + /// - fileName: Filename to associate with the stream content in the `Content-Disposition` HTTP header. + /// - mimeType: MIME type to associate with the stream content in the `Content-Type` HTTP header. + public func append(_ stream: InputStream, + withLength length: UInt64, + name: String, + fileName: String, + mimeType: String) { let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) append(stream, withLength: length, headers: headers) } - /// Creates a body part with the headers, stream and length and appends it to the multipart form data object. + /// Creates a body part with the stream, length, and headers and appends it to the instance. /// /// The body part data will be encoded using the following format: /// @@ -326,9 +295,10 @@ open class MultipartFormData { /// - Encoded stream data /// - Multipart form boundary /// - /// - parameter stream: The input stream to encode in the multipart form data. - /// - parameter length: The content length of the stream. - /// - parameter headers: The HTTP headers for the body part. + /// - Parameters: + /// - stream: `InputStream` to encode into the instance. + /// - length: Length, in bytes, of the stream. + /// - headers: `HTTPHeaders` for the body part. public func append(_ stream: InputStream, withLength length: UInt64, headers: HTTPHeaders) { let bodyPart = BodyPart(headers: headers, bodyStream: stream, bodyContentLength: length) bodyParts.append(bodyPart) @@ -336,15 +306,14 @@ open class MultipartFormData { // MARK: - Data Encoding - /// Encodes all the appended body parts into a single `Data` value. - /// - /// It is important to note that this method will load all the appended body parts into memory all at the same - /// time. This method should only be used when the encoded data will have a small memory footprint. For large data - /// cases, please use the `writeEncodedDataToDisk(fileURL:completionHandler:)` method. + /// Encodes all appended body parts into a single `Data` value. /// - /// - throws: An `AFError` if encoding encounters an error. + /// - Note: This method will load all the appended body parts into memory all at the same time. This method should + /// only be used when the encoded data will have a small memory footprint. For large data cases, please use + /// the `writeEncodedData(to:))` method. /// - /// - returns: The encoded `Data` if encoding is successful. + /// - Returns: The encoded `Data`, if encoding is successful. + /// - Throws: An `AFError` if encoding encounters an error. public func encode() throws -> Data { if let bodyPartError = bodyPartError { throw bodyPartError @@ -363,20 +332,19 @@ open class MultipartFormData { return encoded } - /// Writes the appended body parts into the given file URL. + /// Writes all appended body parts to the given file `URL`. /// /// This process is facilitated by reading and writing with input and output streams, respectively. Thus, /// this approach is very memory efficient and should be used for large body part data. /// - /// - parameter fileURL: The file URL to write the multipart form data into. - /// - /// - throws: An `AFError` if encoding encounters an error. + /// - Parameter fileURL: File `URL` to which to write the form data. + /// - Throws: An `AFError` if encoding encounters an error. public func writeEncodedData(to fileURL: URL) throws { if let bodyPartError = bodyPartError { throw bodyPartError } - if FileManager.default.fileExists(atPath: fileURL.path) { + if fileManager.fileExists(atPath: fileURL.path) { throw AFError.multipartEncodingFailed(reason: .outputStreamFileAlreadyExists(at: fileURL)) } else if !fileURL.isFileURL { throw AFError.multipartEncodingFailed(reason: .outputStreamURLInvalid(url: fileURL)) @@ -389,10 +357,10 @@ open class MultipartFormData { outputStream.open() defer { outputStream.close() } - self.bodyParts.first?.hasInitialBoundary = true - self.bodyParts.last?.hasFinalBoundary = true + bodyParts.first?.hasInitialBoundary = true + bodyParts.last?.hasFinalBoundary = true - for bodyPart in self.bodyParts { + for bodyPart in bodyParts { try write(bodyPart, to: outputStream) } } @@ -419,14 +387,11 @@ open class MultipartFormData { } private func encodeHeaders(for bodyPart: BodyPart) -> Data { - var headerText = "" - - for (key, value) in bodyPart.headers { - headerText += "\(key): \(value)\(EncodingCharacters.crlf)" - } - headerText += EncodingCharacters.crlf + let headerText = bodyPart.headers.map { "\($0.name): \($0.value)\(EncodingCharacters.crlf)" } + .joined() + + EncodingCharacters.crlf - return headerText.data(using: String.Encoding.utf8, allowLossyConversion: false)! + return Data(headerText.utf8) } private func encodeBodyStream(for bodyPart: BodyPart) throws -> Data { @@ -537,8 +502,7 @@ open class MultipartFormData { private func mimeType(forPathExtension pathExtension: String) -> String { if let id = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as CFString, nil)?.takeRetainedValue(), - let contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?.takeRetainedValue() - { + let contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?.takeRetainedValue() { return contentType as String } @@ -547,12 +511,12 @@ open class MultipartFormData { // MARK: - Private - Content Headers - private func contentHeaders(withName name: String, fileName: String? = nil, mimeType: String? = nil) -> [String: String] { + private func contentHeaders(withName name: String, fileName: String? = nil, mimeType: String? = nil) -> HTTPHeaders { var disposition = "form-data; name=\"\(name)\"" if let fileName = fileName { disposition += "; filename=\"\(fileName)\"" } - var headers = ["Content-Disposition": disposition] - if let mimeType = mimeType { headers["Content-Type"] = mimeType } + var headers: HTTPHeaders = [.contentDisposition(disposition)] + if let mimeType = mimeType { headers.add(.contentType(mimeType)) } return headers } diff --git a/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift b/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift index 5470eec..d2c4338 100644 --- a/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift +++ b/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift @@ -1,7 +1,7 @@ // // NetworkReachabilityManager.swift // -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -22,12 +22,12 @@ // THE SOFTWARE. // -#if !os(watchOS) +#if !(os(watchOS) || os(Linux)) import Foundation import SystemConfiguration -/// The `NetworkReachabilityManager` class listens for reachability changes of hosts and addresses for both WWAN and +/// The `NetworkReachabilityManager` class listens for reachability changes of hosts and addresses for both cellular and /// WiFi network interfaces. /// /// Reachability can be used to determine background information about why a network operation failed, or to retry @@ -35,102 +35,116 @@ import SystemConfiguration /// request, as it's possible that an initial request may be required to establish reachability. open class NetworkReachabilityManager { /// Defines the various states of network reachability. - /// - /// - unknown: It is unknown whether the network is reachable. - /// - notReachable: The network is not reachable. - /// - reachable: The network is reachable. public enum NetworkReachabilityStatus { + /// It is unknown whether the network is reachable. case unknown + /// The network is not reachable. case notReachable + /// The network is reachable on the associated `ConnectionType`. case reachable(ConnectionType) - } - /// Defines the various connection types detected by reachability flags. - /// - /// - ethernetOrWiFi: The connection type is either over Ethernet or WiFi. - /// - wwan: The connection type is a WWAN connection. - public enum ConnectionType { - case ethernetOrWiFi - case wwan + init(_ flags: SCNetworkReachabilityFlags) { + guard flags.isActuallyReachable else { self = .notReachable; return } + + var networkStatus: NetworkReachabilityStatus = .reachable(.ethernetOrWiFi) + + if flags.isCellular { networkStatus = .reachable(.cellular) } + + self = networkStatus + } + + /// Defines the various connection types detected by reachability flags. + public enum ConnectionType { + /// The connection type is either over Ethernet or WiFi. + case ethernetOrWiFi + /// The connection type is a cellular connection. + case cellular + } } /// A closure executed when the network reachability status changes. The closure takes a single argument: the /// network reachability status. public typealias Listener = (NetworkReachabilityStatus) -> Void + /// Default `NetworkReachabilityManager` for the zero address and a `listenerQueue` of `.main`. + public static let `default` = NetworkReachabilityManager() + // MARK: - Properties /// Whether the network is currently reachable. - open var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi } + open var isReachable: Bool { return isReachableOnCellular || isReachableOnEthernetOrWiFi } - /// Whether the network is currently reachable over the WWAN interface. - open var isReachableOnWWAN: Bool { return networkReachabilityStatus == .reachable(.wwan) } + /// Whether the network is currently reachable over the cellular interface. + /// + /// - Note: Using this property to decide whether to make a high or low bandwidth request is not recommended. + /// Instead, set the `allowsCellularAccess` on any `URLRequest`s being issued. + /// + open var isReachableOnCellular: Bool { return status == .reachable(.cellular) } /// Whether the network is currently reachable over Ethernet or WiFi interface. - open var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .reachable(.ethernetOrWiFi) } + open var isReachableOnEthernetOrWiFi: Bool { return status == .reachable(.ethernetOrWiFi) } - /// The current network reachability status. - open var networkReachabilityStatus: NetworkReachabilityStatus { - guard let flags = self.flags else { return .unknown } - return networkReachabilityStatusForFlags(flags) - } - - /// The dispatch queue to execute the `listener` closure on. - open var listenerQueue: DispatchQueue = DispatchQueue.main - - /// A closure executed when the network reachability status changes. - open var listener: Listener? + /// `DispatchQueue` on which reachability will update. + public let reachabilityQueue = DispatchQueue(label: "org.alamofire.reachabilityQueue") + /// Flags of the current reachability type, if any. open var flags: SCNetworkReachabilityFlags? { var flags = SCNetworkReachabilityFlags() - if SCNetworkReachabilityGetFlags(reachability, &flags) { - return flags - } + return (SCNetworkReachabilityGetFlags(reachability, &flags)) ? flags : nil + } + + /// The current network reachability status. + open var status: NetworkReachabilityStatus { + return flags.map(NetworkReachabilityStatus.init) ?? .unknown + } - return nil + /// Mutable state storage. + struct MutableState { + /// A closure executed when the network reachability status changes. + var listener: Listener? + /// `DispatchQueue` on which listeners will be called. + var listenerQueue: DispatchQueue? + /// Previously calculated status. + var previousStatus: NetworkReachabilityStatus? } + /// `SCNetworkReachability` instance providing notifications. private let reachability: SCNetworkReachability - open var previousFlags: SCNetworkReachabilityFlags + + /// Protected storage for mutable state. + private let mutableState = Protector(MutableState()) // MARK: - Initialization - /// Creates a `NetworkReachabilityManager` instance with the specified host. + /// Creates an instance with the specified host. /// - /// - parameter host: The host used to evaluate network reachability. + /// - Note: The `host` value must *not* contain a scheme, just the hostname. /// - /// - returns: The new `NetworkReachabilityManager` instance. + /// - Parameters: + /// - host: Host used to evaluate network reachability. Must *not* include the scheme (e.g. `https`). public convenience init?(host: String) { guard let reachability = SCNetworkReachabilityCreateWithName(nil, host) else { return nil } + self.init(reachability: reachability) } - /// Creates a `NetworkReachabilityManager` instance that monitors the address 0.0.0.0. + /// Creates an instance that monitors the address 0.0.0.0. /// /// Reachability treats the 0.0.0.0 address as a special token that causes it to monitor the general routing /// status of the device, both IPv4 and IPv6. - /// - /// - returns: The new `NetworkReachabilityManager` instance. public convenience init?() { - var address = sockaddr_in() - address.sin_len = UInt8(MemoryLayout.size) - address.sin_family = sa_family_t(AF_INET) + var zero = sockaddr() + zero.sa_len = UInt8(MemoryLayout.size) + zero.sa_family = sa_family_t(AF_INET) - guard let reachability = withUnsafePointer(to: &address, { pointer in - return pointer.withMemoryRebound(to: sockaddr.self, capacity: MemoryLayout.size) { - return SCNetworkReachabilityCreateWithAddress(nil, $0) - } - }) else { return nil } + guard let reachability = SCNetworkReachabilityCreateWithAddress(nil, &zero) else { return nil } self.init(reachability: reachability) } private init(reachability: SCNetworkReachability) { self.reachability = reachability - - // Set the previous flags to an unreserved value to represent unknown status - self.previousFlags = SCNetworkReachabilityFlags(rawValue: 1 << 30) } deinit { @@ -141,67 +155,77 @@ open class NetworkReachabilityManager { /// Starts listening for changes in network reachability status. /// - /// - returns: `true` if listening was started successfully, `false` otherwise. + /// - Note: Stops and removes any existing listener. + /// + /// - Parameters: + /// - queue: `DispatchQueue` on which to call the `listener` closure. `.main` by default. + /// - listener: `Listener` closure called when reachability changes. + /// + /// - Returns: `true` if listening was started successfully, `false` otherwise. @discardableResult - open func startListening() -> Bool { - var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil) - context.info = Unmanaged.passUnretained(self).toOpaque() - - let callbackEnabled = SCNetworkReachabilitySetCallback( - reachability, - { (_, flags, info) in - let reachability = Unmanaged.fromOpaque(info!).takeUnretainedValue() - reachability.notifyListener(flags) - }, - &context - ) - - let queueEnabled = SCNetworkReachabilitySetDispatchQueue(reachability, listenerQueue) - - listenerQueue.async { - guard let flags = self.flags else { return } - self.notifyListener(flags) + open func startListening(onQueue queue: DispatchQueue = .main, + onUpdatePerforming listener: @escaping Listener) -> Bool { + stopListening() + + mutableState.write { state in + state.listenerQueue = queue + state.listener = listener + } + + var context = SCNetworkReachabilityContext(version: 0, + info: Unmanaged.passRetained(self).toOpaque(), + retain: nil, + release: nil, + copyDescription: nil) + let callback: SCNetworkReachabilityCallBack = { _, flags, info in + guard let info = info else { return } + + let instance = Unmanaged.fromOpaque(info).takeUnretainedValue() + instance.notifyListener(flags) + } + + let queueAdded = SCNetworkReachabilitySetDispatchQueue(reachability, reachabilityQueue) + let callbackAdded = SCNetworkReachabilitySetCallback(reachability, callback, &context) + + // Manually call listener to give initial state, since the framework may not. + if let currentFlags = flags { + reachabilityQueue.async { + self.notifyListener(currentFlags) + } } - return callbackEnabled && queueEnabled + return callbackAdded && queueAdded } /// Stops listening for changes in network reachability status. open func stopListening() { SCNetworkReachabilitySetCallback(reachability, nil, nil) SCNetworkReachabilitySetDispatchQueue(reachability, nil) + mutableState.write { state in + state.listener = nil + state.listenerQueue = nil + state.previousStatus = nil + } } // MARK: - Internal - Listener Notification + /// Calls the `listener` closure of the `listenerQueue` if the computed status hasn't changed. + /// + /// - Note: Should only be called from the `reachabilityQueue`. + /// + /// - Parameter flags: `SCNetworkReachabilityFlags` to use to calculate the status. func notifyListener(_ flags: SCNetworkReachabilityFlags) { - guard previousFlags != flags else { return } - previousFlags = flags + let newStatus = NetworkReachabilityStatus(flags) - listener?(networkReachabilityStatusForFlags(flags)) - } + mutableState.write { state in + guard state.previousStatus != newStatus else { return } - // MARK: - Internal - Network Reachability Status + state.previousStatus = newStatus - func networkReachabilityStatusForFlags(_ flags: SCNetworkReachabilityFlags) -> NetworkReachabilityStatus { - guard isNetworkReachable(with: flags) else { return .notReachable } - - var networkStatus: NetworkReachabilityStatus = .reachable(.ethernetOrWiFi) - - #if os(iOS) - if flags.contains(.isWWAN) { networkStatus = .reachable(.wwan) } - #endif - - return networkStatus - } - - func isNetworkReachable(with flags: SCNetworkReachabilityFlags) -> Bool { - let isReachable = flags.contains(.reachable) - let needsConnection = flags.contains(.connectionRequired) - let canConnectAutomatically = flags.contains(.connectionOnDemand) || flags.contains(.connectionOnTraffic) - let canConnectWithoutUserInteraction = canConnectAutomatically && !flags.contains(.interventionRequired) - - return isReachable && (!needsConnection || canConnectWithoutUserInteraction) + let listener = state.listener + state.listenerQueue?.async { listener?(newStatus) } + } } } @@ -209,27 +233,34 @@ open class NetworkReachabilityManager { extension NetworkReachabilityManager.NetworkReachabilityStatus: Equatable {} -/// Returns whether the two network reachability status values are equal. -/// -/// - parameter lhs: The left-hand side value to compare. -/// - parameter rhs: The right-hand side value to compare. -/// -/// - returns: `true` if the two values are equal, `false` otherwise. -public func ==( - lhs: NetworkReachabilityManager.NetworkReachabilityStatus, - rhs: NetworkReachabilityManager.NetworkReachabilityStatus) - -> Bool -{ - switch (lhs, rhs) { - case (.unknown, .unknown): - return true - case (.notReachable, .notReachable): - return true - case let (.reachable(lhsConnectionType), .reachable(rhsConnectionType)): - return lhsConnectionType == rhsConnectionType - default: +extension SCNetworkReachabilityFlags { + var isReachable: Bool { return contains(.reachable) } + var isConnectionRequired: Bool { return contains(.connectionRequired) } + var canConnectAutomatically: Bool { return contains(.connectionOnDemand) || contains(.connectionOnTraffic) } + var canConnectWithoutUserInteraction: Bool { return canConnectAutomatically && !contains(.interventionRequired) } + var isActuallyReachable: Bool { return isReachable && (!isConnectionRequired || canConnectWithoutUserInteraction) } + var isCellular: Bool { +#if os(iOS) || os(tvOS) + return contains(.isWWAN) +#else return false +#endif } -} + /// Human readable `String` for all states, to help with debugging. + var readableDescription: String { + let W = isCellular ? "W" : "-" + let R = isReachable ? "R" : "-" + let c = isConnectionRequired ? "c" : "-" + let t = contains(.transientConnection) ? "t" : "-" + let i = contains(.interventionRequired) ? "i" : "-" + let C = contains(.connectionOnTraffic) ? "C" : "-" + let D = contains(.connectionOnDemand) ? "D" : "-" + let l = contains(.isLocalAddress) ? "l" : "-" + let d = contains(.isDirect) ? "d" : "-" + let a = contains(.connectionAutomatic) ? "a" : "-" + + return "\(W)\(R) \(c)\(t)\(i)\(C)\(D)\(l)\(d)\(a)" + } +} #endif diff --git a/Example/Pods/Alamofire/Source/Notifications.swift b/Example/Pods/Alamofire/Source/Notifications.swift index e1ac31b..4a4b25a 100644 --- a/Example/Pods/Alamofire/Source/Notifications.swift +++ b/Example/Pods/Alamofire/Source/Notifications.swift @@ -1,7 +1,7 @@ // // Notifications.swift // -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -24,32 +24,92 @@ import Foundation -extension Notification.Name { - /// Used as a namespace for all `URLSessionTask` related notifications. - public struct Task { - /// Posted when a `URLSessionTask` is resumed. The notification `object` contains the resumed `URLSessionTask`. - public static let DidResume = Notification.Name(rawValue: "org.alamofire.notification.name.task.didResume") +public extension Request { + /// Posted when a `Request` is resumed. The `Notification` contains the resumed `Request`. + static let didResumeNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didResume") + /// Posted when a `Request` is suspended. The `Notification` contains the suspended `Request`. + static let didSuspendNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didSuspend") + /// Posted when a `Request` is cancelled. The `Notification` contains the cancelled `Request`. + static let didCancelNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didCancel") + /// Posted when a `Request` is finished. The `Notification` contains the completed `Request`. + static let didFinishNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didFinish") - /// Posted when a `URLSessionTask` is suspended. The notification `object` contains the suspended `URLSessionTask`. - public static let DidSuspend = Notification.Name(rawValue: "org.alamofire.notification.name.task.didSuspend") + /// Posted when a `URLSessionTask` is resumed. The `Notification` contains the `Request` associated with the `URLSessionTask`. + static let didResumeTaskNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didResumeTask") + /// Posted when a `URLSessionTask` is suspended. The `Notification` contains the `Request` associated with the `URLSessionTask`. + static let didSuspendTaskNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didSuspendTask") + /// Posted when a `URLSessionTask` is cancelled. The `Notification` contains the `Request` associated with the `URLSessionTask`. + static let didCancelTaskNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didCancelTask") + /// Posted when a `URLSessionTask` is completed. The `Notification` contains the `Request` associated with the `URLSessionTask`. + static let didCompleteTaskNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didCompleteTask") +} + +// MARK: - - /// Posted when a `URLSessionTask` is cancelled. The notification `object` contains the cancelled `URLSessionTask`. - public static let DidCancel = Notification.Name(rawValue: "org.alamofire.notification.name.task.didCancel") +extension Notification { + /// The `Request` contained by the instance's `userInfo`, `nil` otherwise. + public var request: Request? { + return userInfo?[String.requestKey] as? Request + } - /// Posted when a `URLSessionTask` is completed. The notification `object` contains the completed `URLSessionTask`. - public static let DidComplete = Notification.Name(rawValue: "org.alamofire.notification.name.task.didComplete") + /// Convenience initializer for a `Notification` containing a `Request` payload. + /// + /// - Parameters: + /// - name: The name of the notification. + /// - request: The `Request` payload. + init(name: Notification.Name, request: Request) { + self.init(name: name, object: nil, userInfo: [String.requestKey: request]) } } -// MARK: - +extension NotificationCenter { + /// Convenience function for posting notifications with `Request` payloads. + /// + /// - Parameters: + /// - name: The name of the notification. + /// - request: The `Request` payload. + func postNotification(named name: Notification.Name, with request: Request) { + let notification = Notification(name: name, request: request) + post(notification) + } +} -extension Notification { - /// Used as a namespace for all `Notification` user info dictionary keys. - public struct Key { - /// User info dictionary key representing the `URLSessionTask` associated with the notification. - public static let Task = "org.alamofire.notification.key.task" +extension String { + /// User info dictionary key representing the `Request` associated with the notification. + fileprivate static let requestKey = "org.alamofire.notification.key.request" +} + +/// `EventMonitor` that provides Alamofire's notifications. +public final class AlamofireNotifications: EventMonitor { + public func requestDidResume(_ request: Request) { + NotificationCenter.default.postNotification(named: Request.didResumeNotification, with: request) + } + + public func requestDidSuspend(_ request: Request) { + NotificationCenter.default.postNotification(named: Request.didSuspendNotification, with: request) + } + + public func requestDidCancel(_ request: Request) { + NotificationCenter.default.postNotification(named: Request.didCancelNotification, with: request) + } + + public func requestDidFinish(_ request: Request) { + NotificationCenter.default.postNotification(named: Request.didFinishNotification, with: request) + } + + public func request(_ request: Request, didResumeTask task: URLSessionTask) { + NotificationCenter.default.postNotification(named: Request.didResumeTaskNotification, with: request) + } + + public func request(_ request: Request, didSuspendTask task: URLSessionTask) { + NotificationCenter.default.postNotification(named: Request.didSuspendTaskNotification, with: request) + } + + public func request(_ request: Request, didCancelTask task: URLSessionTask) { + NotificationCenter.default.postNotification(named: Request.didCancelTaskNotification, with: request) + } - /// User info dictionary key representing the responseData associated with the notification. - public static let ResponseData = "org.alamofire.notification.key.responseData" + public func request(_ request: Request, didCompleteTask task: URLSessionTask, with error: AFError?) { + NotificationCenter.default.postNotification(named: Request.didCompleteTaskNotification, with: request) } } diff --git a/Example/Pods/Alamofire/Source/ParameterEncoding.swift b/Example/Pods/Alamofire/Source/ParameterEncoding.swift index 6195809..fbf1701 100644 --- a/Example/Pods/Alamofire/Source/ParameterEncoding.swift +++ b/Example/Pods/Alamofire/Source/ParameterEncoding.swift @@ -1,7 +1,7 @@ // // ParameterEncoding.swift // -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -24,36 +24,19 @@ import Foundation -/// HTTP method definitions. -/// -/// See https://tools.ietf.org/html/rfc7231#section-4.3 -public enum HTTPMethod: String { - case options = "OPTIONS" - case get = "GET" - case head = "HEAD" - case post = "POST" - case put = "PUT" - case patch = "PATCH" - case delete = "DELETE" - case trace = "TRACE" - case connect = "CONNECT" -} - -// MARK: - - /// A dictionary of parameters to apply to a `URLRequest`. public typealias Parameters = [String: Any] /// A type used to define how a set of parameters are applied to a `URLRequest`. public protocol ParameterEncoding { - /// Creates a URL request by encoding parameters and applying them onto an existing request. + /// Creates a `URLRequest` by encoding parameters and applying them on the passed request. /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. + /// - Parameters: + /// - urlRequest: `URLRequestConvertible` value onto which parameters will be encoded. + /// - parameters: `Parameters` to encode onto the request. /// - /// - throws: An `AFError.parameterEncodingFailed` error if encoding fails. - /// - /// - returns: The encoded request. + /// - Returns: The encoded `URLRequest`. + /// - Throws: Any `Error` produced during parameter encoding. func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest } @@ -74,27 +57,34 @@ public protocol ParameterEncoding { /// `BoolEncoding` can be used to configure how boolean values are encoded. The default behavior is to encode /// `true` as 1 and `false` as 0. public struct URLEncoding: ParameterEncoding { - // MARK: Helper Types /// Defines whether the url-encoded query string is applied to the existing query string or HTTP body of the /// resulting URL request. - /// - /// - methodDependent: Applies encoded query string result to existing query string for `GET`, `HEAD` and `DELETE` - /// requests and sets as the HTTP body for requests with any other HTTP method. - /// - queryString: Sets or appends encoded query string result to existing query string. - /// - httpBody: Sets encoded query string result as the HTTP body of the URL request. public enum Destination { - case methodDependent, queryString, httpBody + /// Applies encoded query string result to existing query string for `GET`, `HEAD` and `DELETE` requests and + /// sets as the HTTP body for requests with any other HTTP method. + case methodDependent + /// Sets or appends encoded query string result to existing query string. + case queryString + /// Sets encoded query string result as the HTTP body of the URL request. + case httpBody + + func encodesParametersInURL(for method: HTTPMethod) -> Bool { + switch self { + case .methodDependent: return [.get, .head, .delete].contains(method) + case .queryString: return true + case .httpBody: return false + } + } } /// Configures how `Array` parameters are encoded. - /// - /// - brackets: An empty set of square brackets is appended to the key for every value. - /// This is the default behavior. - /// - noBrackets: No brackets are appended. The key is encoded as is. public enum ArrayEncoding { - case brackets, noBrackets + /// An empty set of square brackets is appended to the key for every value. This is the default behavior. + case brackets + /// No brackets are appended. The key is encoded as is. + case noBrackets func encode(key: String) -> String { switch self { @@ -107,11 +97,11 @@ public struct URLEncoding: ParameterEncoding { } /// Configures how `Bool` parameters are encoded. - /// - /// - numeric: Encode `true` as `1` and `false` as `0`. This is the default behavior. - /// - literal: Encode `true` and `false` as string literals. public enum BoolEncoding { - case numeric, literal + /// Encode `true` as `1` and `false` as `0`. This is the default behavior. + case numeric + /// Encode `true` and `false` as string literals. + case literal func encode(value: Bool) -> String { switch self { @@ -125,12 +115,9 @@ public struct URLEncoding: ParameterEncoding { // MARK: Properties - /// Returns a default `URLEncoding` instance. + /// Returns a default `URLEncoding` instance with a `.methodDependent` destination. public static var `default`: URLEncoding { return URLEncoding() } - /// Returns a `URLEncoding` instance with a `.methodDependent` destination. - public static var methodDependent: URLEncoding { return URLEncoding() } - /// Returns a `URLEncoding` instance with a `.queryString` destination. public static var queryString: URLEncoding { return URLEncoding(destination: .queryString) } @@ -148,14 +135,16 @@ public struct URLEncoding: ParameterEncoding { // MARK: Initialization - /// Creates a `URLEncoding` instance using the specified destination. - /// - /// - parameter destination: The destination defining where the encoded query string is to be applied. - /// - parameter arrayEncoding: The encoding to use for `Array` parameters. - /// - parameter boolEncoding: The encoding to use for `Bool` parameters. + /// Creates an instance using the specified parameters. /// - /// - returns: The new `URLEncoding` instance. - public init(destination: Destination = .methodDependent, arrayEncoding: ArrayEncoding = .brackets, boolEncoding: BoolEncoding = .numeric) { + /// - Parameters: + /// - destination: `Destination` defining where the encoded query string will be applied. `.methodDependent` by + /// default. + /// - arrayEncoding: `ArrayEncoding` to use. `.brackets` by default. + /// - boolEncoding: `BoolEncoding` to use. `.numeric` by default. + public init(destination: Destination = .methodDependent, + arrayEncoding: ArrayEncoding = .brackets, + boolEncoding: BoolEncoding = .numeric) { self.destination = destination self.arrayEncoding = arrayEncoding self.boolEncoding = boolEncoding @@ -163,20 +152,12 @@ public struct URLEncoding: ParameterEncoding { // MARK: Encoding - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { var urlRequest = try urlRequest.asURLRequest() guard let parameters = parameters else { return urlRequest } - if let method = HTTPMethod(rawValue: urlRequest.httpMethod ?? "GET"), encodesParametersInURL(with: method) { + if let method = urlRequest.method, destination.encodesParametersInURL(for: method) { guard let url = urlRequest.url else { throw AFError.parameterEncodingFailed(reason: .missingURL) } @@ -191,18 +172,19 @@ public struct URLEncoding: ParameterEncoding { urlRequest.setValue("application/x-www-form-urlencoded; charset=utf-8", forHTTPHeaderField: "Content-Type") } - urlRequest.httpBody = query(parameters).data(using: .utf8, allowLossyConversion: false) + urlRequest.httpBody = Data(query(parameters).utf8) } return urlRequest } - /// Creates percent-escaped, URL encoded query string components from the given key-value pair using recursion. + /// Creates a percent-escaped, URL encoded query string components from the given key-value pair recursively. /// - /// - parameter key: The key of the query component. - /// - parameter value: The value of the query component. + /// - Parameters: + /// - key: Key of the query component. + /// - value: Value of the query component. /// - /// - returns: The percent-escaped, URL encoded query string components. + /// - Returns: The percent-escaped, URL encoded query string components. public func queryComponents(fromKey key: String, value: Any) -> [(String, String)] { var components: [(String, String)] = [] @@ -229,60 +211,13 @@ public struct URLEncoding: ParameterEncoding { return components } - /// Returns a percent-escaped string following RFC 3986 for a query string key or value. - /// - /// RFC 3986 states that the following characters are "reserved" characters. - /// - /// - General Delimiters: ":", "#", "[", "]", "@", "?", "/" - /// - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" + /// Creates a percent-escaped string following RFC 3986 for a query string key or value. /// - /// In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow - /// query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/" - /// should be percent-escaped in the query string. + /// - Parameter string: `String` to be percent-escaped. /// - /// - parameter string: The string to be percent-escaped. - /// - /// - returns: The percent-escaped string. + /// - Returns: The percent-escaped `String`. public func escape(_ string: String) -> String { - let generalDelimitersToEncode = ":#[]@" // does not include "?" or "/" due to RFC 3986 - Section 3.4 - let subDelimitersToEncode = "!$&'()*+,;=" - - var allowedCharacterSet = CharacterSet.urlQueryAllowed - allowedCharacterSet.remove(charactersIn: "\(generalDelimitersToEncode)\(subDelimitersToEncode)") - - var escaped = "" - - //========================================================================================================== - // - // Batching is required for escaping due to an internal bug in iOS 8.1 and 8.2. Encoding more than a few - // hundred Chinese characters causes various malloc error crashes. To avoid this issue until iOS 8 is no - // longer supported, batching MUST be used for encoding. This introduces roughly a 20% overhead. For more - // info, please refer to: - // - // - https://github.com/Alamofire/Alamofire/issues/206 - // - //========================================================================================================== - - if #available(iOS 8.3, *) { - escaped = string.addingPercentEncoding(withAllowedCharacters: allowedCharacterSet) ?? string - } else { - let batchSize = 50 - var index = string.startIndex - - while index != string.endIndex { - let startIndex = index - let endIndex = string.index(index, offsetBy: batchSize, limitedBy: string.endIndex) ?? string.endIndex - let range = startIndex.. String { @@ -294,24 +229,6 @@ public struct URLEncoding: ParameterEncoding { } return components.map { "\($0)=\($1)" }.joined(separator: "&") } - - private func encodesParametersInURL(with method: HTTPMethod) -> Bool { - switch destination { - case .queryString: - return true - case .httpBody: - return false - default: - break - } - - switch method { - case .get, .head, .delete: - return true - default: - return false - } - } } // MARK: - @@ -319,7 +236,6 @@ public struct URLEncoding: ParameterEncoding { /// Uses `JSONSerialization` to create a JSON representation of the parameters object, which is set as the body of the /// request. The `Content-Type` HTTP header field of an encoded request is set to `application/json`. public struct JSONEncoding: ParameterEncoding { - // MARK: Properties /// Returns a `JSONEncoding` instance with default writing options. @@ -333,25 +249,15 @@ public struct JSONEncoding: ParameterEncoding { // MARK: Initialization - /// Creates a `JSONEncoding` instance using the specified options. + /// Creates an instance using the specified `WritingOptions`. /// - /// - parameter options: The options for writing the parameters as JSON data. - /// - /// - returns: The new `JSONEncoding` instance. + /// - Parameter options: `JSONSerialization.WritingOptions` to use. public init(options: JSONSerialization.WritingOptions = []) { self.options = options } // MARK: Encoding - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { var urlRequest = try urlRequest.asURLRequest() @@ -372,14 +278,14 @@ public struct JSONEncoding: ParameterEncoding { return urlRequest } - /// Creates a URL request by encoding the JSON object and setting the resulting data on the HTTP body. - /// - /// - parameter urlRequest: The request to apply the JSON object to. - /// - parameter jsonObject: The JSON object to apply to the request. + /// Encodes any JSON compatible object into a `URLRequest`. /// - /// - throws: An `Error` if the encoding process encounters an error. + /// - Parameters: + /// - urlRequest: `URLRequestConvertible` value into which the object will be encoded. + /// - jsonObject: `Any` value (must be JSON compatible` to be encoded into the `URLRequest`. `nil` by default. /// - /// - returns: The encoded request. + /// - Returns: The encoded `URLRequest`. + /// - Throws: Any `Error` produced during encoding. public func encode(_ urlRequest: URLRequestConvertible, withJSONObject jsonObject: Any? = nil) throws -> URLRequest { var urlRequest = try urlRequest.asURLRequest() @@ -403,81 +309,6 @@ public struct JSONEncoding: ParameterEncoding { // MARK: - -/// Uses `PropertyListSerialization` to create a plist representation of the parameters object, according to the -/// associated format and write options values, which is set as the body of the request. The `Content-Type` HTTP header -/// field of an encoded request is set to `application/x-plist`. -public struct PropertyListEncoding: ParameterEncoding { - - // MARK: Properties - - /// Returns a default `PropertyListEncoding` instance. - public static var `default`: PropertyListEncoding { return PropertyListEncoding() } - - /// Returns a `PropertyListEncoding` instance with xml formatting and default writing options. - public static var xml: PropertyListEncoding { return PropertyListEncoding(format: .xml) } - - /// Returns a `PropertyListEncoding` instance with binary formatting and default writing options. - public static var binary: PropertyListEncoding { return PropertyListEncoding(format: .binary) } - - /// The property list serialization format. - public let format: PropertyListSerialization.PropertyListFormat - - /// The options for writing the parameters as plist data. - public let options: PropertyListSerialization.WriteOptions - - // MARK: Initialization - - /// Creates a `PropertyListEncoding` instance using the specified format and options. - /// - /// - parameter format: The property list serialization format. - /// - parameter options: The options for writing the parameters as plist data. - /// - /// - returns: The new `PropertyListEncoding` instance. - public init( - format: PropertyListSerialization.PropertyListFormat = .xml, - options: PropertyListSerialization.WriteOptions = 0) - { - self.format = format - self.options = options - } - - // MARK: Encoding - - /// Creates a URL request by encoding parameters and applying them onto an existing request. - /// - /// - parameter urlRequest: The request to have parameters applied. - /// - parameter parameters: The parameters to apply. - /// - /// - throws: An `Error` if the encoding process encounters an error. - /// - /// - returns: The encoded request. - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let parameters = parameters else { return urlRequest } - - do { - let data = try PropertyListSerialization.data( - fromPropertyList: parameters, - format: format, - options: options - ) - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/x-plist", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = data - } catch { - throw AFError.parameterEncodingFailed(reason: .propertyListEncodingFailed(error: error)) - } - - return urlRequest - } -} - -// MARK: - - extension NSNumber { fileprivate var isBool: Bool { return CFBooleanGetTypeID() == CFGetTypeID(self) } } diff --git a/Example/Pods/Alamofire/Source/Request.swift b/Example/Pods/Alamofire/Source/Request.swift index a2efaa0..e640f61 100644 --- a/Example/Pods/Alamofire/Source/Request.swift +++ b/Example/Pods/Alamofire/Source/Request.swift @@ -1,7 +1,7 @@ // // Request.swift // -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -24,272 +24,818 @@ import Foundation -/// A type that can inspect and optionally adapt a `URLRequest` in some manner if necessary. -public protocol RequestAdapter { - /// Inspects and adapts the specified `URLRequest` in some manner if necessary and returns the result. +/// `Request` is the common superclass of all Alamofire request types and provides common state, delegate, and callback +/// handling. +public class Request { + /// State of the `Request`, with managed transitions between states set when calling `resume()`, `suspend()`, or + /// `cancel()` on the `Request`. + public enum State { + /// Initial state of the `Request`. + case initialized + /// `State` set when `resume()` is called. Any tasks created for the `Request` will have `resume()` called on + /// them in this state. + case resumed + /// `State` set when `suspend()` is called. Any tasks created for the `Request` will have `suspend()` called on + /// them in this state. + case suspended + /// `State` set when `cancel()` is called. Any tasks created for the `Request` will have `cancel()` called on + /// them. Unlike `resumed` or `suspended`, once in the `cancelled` state, the `Request` can no longer transition + /// to any other state. + case cancelled + /// `State` set when all response serialization completion closures have been cleared on the `Request` and + /// enqueued on their respective queues. + case finished + + /// Determines whether `self` can be transitioned to the provided `State`. + func canTransitionTo(_ state: State) -> Bool { + switch (self, state) { + case (.initialized, _): + return true + case (_, .initialized), (.cancelled, _), (.finished, _): + return false + case (.resumed, .cancelled), (.suspended, .cancelled), (.resumed, .suspended), (.suspended, .resumed): + return true + case (.suspended, .suspended), (.resumed, .resumed): + return false + case (_, .finished): + return true + } + } + } + + // MARK: - Initial State + + /// `UUID` prividing a unique identifier for the `Request`, used in the `Hashable` and `Equatable` conformances. + public let id: UUID + /// The serial queue for all internal async actions. + public let underlyingQueue: DispatchQueue + /// The queue used for all serialization actions. By default it's a serial queue that targets `underlyingQueue`. + public let serializationQueue: DispatchQueue + /// `EventMonitor` used for event callbacks. + public let eventMonitor: EventMonitor? + /// The `Request`'s interceptor. + public let interceptor: RequestInterceptor? + /// The `Request`'s delegate. + public private(set) weak var delegate: RequestDelegate? + + // MARK: - Mutable State + + /// Type encapsulating all mutable state that may need to be accessed from anything other than the `underlyingQueue`. + struct MutableState { + /// State of the `Request`. + var state: State = .initialized + /// `ProgressHandler` and `DispatchQueue` provided for upload progress callbacks. + var uploadProgressHandler: (handler: ProgressHandler, queue: DispatchQueue)? + /// `ProgressHandler` and `DispatchQueue` provided for download progress callbacks. + var downloadProgressHandler: (handler: ProgressHandler, queue: DispatchQueue)? + /// `RedirectHandler` provided for to handle request redirection. + var redirectHandler: RedirectHandler? + /// `CachedResponseHandler` provided to handle response caching. + var cachedResponseHandler: CachedResponseHandler? + /// Closure called when the `Request` is able to create a cURL description of itself. + var cURLHandler: ((String) -> Void)? + /// Response serialization closures that handle response parsing. + var responseSerializers: [() -> Void] = [] + /// Response serialization completion closures executed once all response serializers are complete. + var responseSerializerCompletions: [() -> Void] = [] + /// Whether response serializer processing is finished. + var responseSerializerProcessingFinished = false + /// `URLCredential` used for authentication challenges. + var credential: URLCredential? + /// All `URLRequest`s created by Alamofire on behalf of the `Request`. + var requests: [URLRequest] = [] + /// All `URLSessionTask`s created by Alamofire on behalf of the `Request`. + var tasks: [URLSessionTask] = [] + /// All `URLSessionTaskMetrics` values gathered by Alamofire on behalf of the `Request`. Should correspond + /// exactly the the `tasks` created. + var metrics: [URLSessionTaskMetrics] = [] + /// Number of times any retriers provided retried the `Request`. + var retryCount = 0 + /// Final `AFError` for the `Request`, whether from various internal Alamofire calls or as a result of a `task`. + var error: AFError? + } + + /// Protected `MutableState` value that provides threadsafe access to state values. + fileprivate let protectedMutableState: Protector = Protector(MutableState()) + + /// `State` of the `Request`. + public var state: State { return protectedMutableState.directValue.state } + /// Returns whether `state` is `.initialized`. + public var isInitialized: Bool { return state == .initialized } + /// Returns whether `state is `.resumed`. + public var isResumed: Bool { return state == .resumed } + /// Returns whether `state` is `.suspended`. + public var isSuspended: Bool { return state == .suspended } + /// Returns whether `state` is `.cancelled`. + public var isCancelled: Bool { return state == .cancelled } + /// Returns whether `state` is `.finished`. + public var isFinished: Bool { return state == .finished } + + // MARK: Progress + + /// Closure type executed when monitoring the upload or download progress of a request. + public typealias ProgressHandler = (Progress) -> Void + + /// `Progress` of the upload of the body of the executed `URLRequest`. Reset to `0` if the `Request` is retried. + public let uploadProgress = Progress(totalUnitCount: 0) + /// `Progress` of the download of any response data. Reset to `0` if the `Request` is retried. + public let downloadProgress = Progress(totalUnitCount: 0) + /// `ProgressHandler` called when `uploadProgress` is updated, on the provided `DispatchQueue`. + fileprivate var uploadProgressHandler: (handler: ProgressHandler, queue: DispatchQueue)? { + get { return protectedMutableState.directValue.uploadProgressHandler } + set { protectedMutableState.write { $0.uploadProgressHandler = newValue } } + } + + /// `ProgressHandler` called when `downloadProgress` is updated, on the provided `DispatchQueue`. + fileprivate var downloadProgressHandler: (handler: ProgressHandler, queue: DispatchQueue)? { + get { return protectedMutableState.directValue.downloadProgressHandler } + set { protectedMutableState.write { $0.downloadProgressHandler = newValue } } + } + + // MARK: Redirect Handling + + /// `RedirectHandler` set on the instance. + public private(set) var redirectHandler: RedirectHandler? { + get { return protectedMutableState.directValue.redirectHandler } + set { protectedMutableState.write { $0.redirectHandler = newValue } } + } + + // MARK: Cached Response Handling + + /// `CachedResponseHandler` set on the instance. + public private(set) var cachedResponseHandler: CachedResponseHandler? { + get { return protectedMutableState.directValue.cachedResponseHandler } + set { protectedMutableState.write { $0.cachedResponseHandler = newValue } } + } + + // MARK: URLCredential + + /// `URLCredential` used for authentication challenges. Created by calling one of the `authenticate` methods. + public private(set) var credential: URLCredential? { + get { return protectedMutableState.directValue.credential } + set { protectedMutableState.write { $0.credential = newValue } } + } + + // MARK: Validators + + /// `Validator` callback closures that store the validation calls enqueued. + fileprivate var protectedValidators: Protector<[() -> Void]> = Protector([]) + + // MARK: URLRequests + + /// All `URLRequests` created on behalf of the `Request`, including original and adapted requests. + public var requests: [URLRequest] { return protectedMutableState.directValue.requests } + /// First `URLRequest` created on behalf of the `Request`. May not be the first one actually executed. + public var firstRequest: URLRequest? { return requests.first } + /// Last `URLRequest` created on behalf of the `Request`. + public var lastRequest: URLRequest? { return requests.last } + /// Current `URLRequest` created on behalf of the `Request`. + public var request: URLRequest? { return lastRequest } + + /// `URLRequest`s from all of the `URLSessionTask`s executed on behalf of the `Request`. May be different from + /// `requests` due to `URLSession` manipulation. + public var performedRequests: [URLRequest] { + return protectedMutableState.read { $0.tasks.compactMap { $0.currentRequest } } + } + + // MARK: HTTPURLResponse + + /// `HTTPURLResponse` received from the server, if any. If the `Request` was retried, this is the response of the + /// last `URLSessionTask`. + public var response: HTTPURLResponse? { return lastTask?.response as? HTTPURLResponse } + + // MARK: Tasks + + /// All `URLSessionTask`s created on behalf of the `Request`. + public var tasks: [URLSessionTask] { return protectedMutableState.directValue.tasks } + /// First `URLSessionTask` created on behalf of the `Request`. + public var firstTask: URLSessionTask? { return tasks.first } + /// Last `URLSessionTask` crated on behalf of the `Request`. + public var lastTask: URLSessionTask? { return tasks.last } + /// Current `URLSessionTask` created on behalf of the `Request`. + public var task: URLSessionTask? { return lastTask } + + // MARK: Metrics + + /// All `URLSessionTaskMetrics` gathered on behalf of the `Request`. Should correspond to the `tasks` created. + public var allMetrics: [URLSessionTaskMetrics] { return protectedMutableState.directValue.metrics } + /// First `URLSessionTaskMetrics` gathered on behalf of the `Request`. + public var firstMetrics: URLSessionTaskMetrics? { return allMetrics.first } + /// Last `URLSessionTaskMetrics` gathered on behalf of the `Request`. + public var lastMetrics: URLSessionTaskMetrics? { return allMetrics.last } + /// Current `URLSessionTaskMetrics` gathered on behalf of the `Request`. + public var metrics: URLSessionTaskMetrics? { return lastMetrics } + + // MARK: Retry Count + + /// Number of times the `Request` has been retried. + public var retryCount: Int { return protectedMutableState.directValue.retryCount } + + // MARK: Error + + /// `Error` returned from Alamofire internally, from the network request directly, or any validators executed. + public fileprivate(set) var error: AFError? { + get { return protectedMutableState.directValue.error } + set { protectedMutableState.write { $0.error = newValue } } + } + + /// Default initializer for the `Request` superclass. + /// + /// - Parameters: + /// - id: `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` by default. + /// - underlyingQueue: `DispatchQueue` on which all internal `Request` work is performed. + /// - serializationQueue: `DispatchQueue` on which all serialization work is performed. By default targets + /// `underlyingQueue`, but can be passed another queue from a `Session`. + /// - eventMonitor: `EventMonitor` called for event callbacks from internal `Request` actions. + /// - interceptor: `RequestInterceptor` used throughout the request lifecycle. + /// - delegate: `RequestDelegate` that provides an interface to actions not performed by the `Request`. + init(id: UUID = UUID(), + underlyingQueue: DispatchQueue, + serializationQueue: DispatchQueue, + eventMonitor: EventMonitor?, + interceptor: RequestInterceptor?, + delegate: RequestDelegate) { + self.id = id + self.underlyingQueue = underlyingQueue + self.serializationQueue = serializationQueue + self.eventMonitor = eventMonitor + self.interceptor = interceptor + self.delegate = delegate + } + + // MARK: - Internal Event API + + // All API must be called from underlyingQueue. + + /// Called when a initial `URLRequest` has been created on behalf of the instance. If a `RequestAdapter` is active, + /// the `URLRequest` will be adapted before being issued. /// - /// - parameter urlRequest: The URL request to adapt. + /// - Parameter request: The `URLRequest` created. + func didCreateInitialURLRequest(_ request: URLRequest) { + protectedMutableState.write { $0.requests.append(request) } + + eventMonitor?.request(self, didCreateInitialURLRequest: request) + } + + /// Called when initial `URLRequest` creation has failed, typically through a `URLRequestConvertible`. /// - /// - throws: An `Error` if the adaptation encounters an error. + /// - Note: Triggers retry. /// - /// - returns: The adapted `URLRequest`. - func adapt(_ urlRequest: URLRequest) throws -> URLRequest -} + /// - Parameter error: `AFError` thrown from the failed creation. + func didFailToCreateURLRequest(with error: AFError) { + self.error = error + + eventMonitor?.request(self, didFailToCreateURLRequestWithError: error) -// MARK: - + callCURLHandlerIfNecessary() -/// A closure executed when the `RequestRetrier` determines whether a `Request` should be retried or not. -public typealias RequestRetryCompletion = (_ shouldRetry: Bool, _ timeDelay: TimeInterval) -> Void + retryOrFinish(error: error) + } + + /// Called when a `RequestAdapter` has successfully adapted a `URLRequest`. + /// + /// - Parameters: + /// - initialRequest: The `URLRequest` that was adapted. + /// - adaptedRequest: The `URLRequest` returned by the `RequestAdapter`. + func didAdaptInitialRequest(_ initialRequest: URLRequest, to adaptedRequest: URLRequest) { + protectedMutableState.write { $0.requests.append(adaptedRequest) } -/// A type that determines whether a request should be retried after being executed by the specified session manager -/// and encountering an error. -public protocol RequestRetrier { - /// Determines whether the `Request` should be retried by calling the `completion` closure. + eventMonitor?.request(self, didAdaptInitialRequest: initialRequest, to: adaptedRequest) + } + + /// Called when a `RequestAdapter` fails to adapt a `URLRequest`. /// - /// This operation is fully asynchronous. Any amount of time can be taken to determine whether the request needs - /// to be retried. The one requirement is that the completion closure is called to ensure the request is properly - /// cleaned up after. + /// - Note: Triggers retry. /// - /// - parameter manager: The session manager the request was executed on. - /// - parameter request: The request that failed due to the encountered error. - /// - parameter error: The error encountered when executing the request. - /// - parameter completion: The completion closure to be executed when retry decision has been determined. - func should(_ manager: SessionManager, retry request: Request, with error: Error, completion: @escaping RequestRetryCompletion) -} + /// - Parameters: + /// - request: The `URLRequest` the adapter was called with. + /// - error: The `AFError` returned by the `RequestAdapter`. + func didFailToAdaptURLRequest(_ request: URLRequest, withError error: AFError) { + self.error = error -// MARK: - + eventMonitor?.request(self, didFailToAdaptURLRequest: request, withError: error) -protocol TaskConvertible { - func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask -} + callCURLHandlerIfNecessary() -/// A dictionary of headers to apply to a `URLRequest`. -public typealias HTTPHeaders = [String: String] + retryOrFinish(error: error) + } -// MARK: - + /// Final `URLRequest` has been created for the instance. + /// + /// - Parameter request: The `URLRequest` created. + func didCreateURLRequest(_ request: URLRequest) { + eventMonitor?.request(self, didCreateURLRequest: request) -/// Responsible for sending a request and receiving the response and associated data from the server, as well as -/// managing its underlying `URLSessionTask`. -open class Request { + callCURLHandlerIfNecessary() + } - // MARK: Helper Types + /// Asynchronously calls any stored `cURLHandler` and then removes it from `mutableState`. + private func callCURLHandlerIfNecessary() { + protectedMutableState.write { mutableState in + guard let cURLHandler = mutableState.cURLHandler else { return } - /// A closure executed when monitoring upload or download progress of a request. - public typealias ProgressHandler = (Progress) -> Void + self.underlyingQueue.async { cURLHandler(self.cURLDescription()) } + mutableState.cURLHandler = nil + } + } + + /// Called when a `URLSessionTask` is created on behalf of the instance. + /// + /// - Parameter task: The `URLSessionTask` created. + func didCreateTask(_ task: URLSessionTask) { + protectedMutableState.write { $0.tasks.append(task) } + + eventMonitor?.request(self, didCreateTask: task) + } + + /// Called when resumption is completed. + func didResume() { + eventMonitor?.requestDidResume(self) + } + + /// Called when a `URLSessionTask` is resumed on behalf of the instance. + /// + /// - Parameter task: The `URLSessionTask` resumed. + func didResumeTask(_ task: URLSessionTask) { + eventMonitor?.request(self, didResumeTask: task) + } + + /// Called when suspension is completed. + func didSuspend() { + eventMonitor?.requestDidSuspend(self) + } + + /// Called when a `URLSessionTask` is suspended on behalf of the instance. + /// + /// - Parameter task: The `URLSessionTask` suspended. + func didSuspendTask(_ task: URLSessionTask) { + eventMonitor?.request(self, didSuspendTask: task) + } + + /// Called when cancellation is completed, sets `error` to `AFError.explicitlyCancelled`. + func didCancel() { + error = AFError.explicitlyCancelled + + eventMonitor?.requestDidCancel(self) + } + + /// Called when a `URLSessionTask` is cancelled on behalf of the instance. + /// + /// - Parameter task: The `URLSessionTask` cancelled. + func didCancelTask(_ task: URLSessionTask) { + eventMonitor?.request(self, didCancelTask: task) + } + + /// Called when a `URLSessionTaskMetrics` value is gathered on behalf of the instance. + /// + /// - Parameter metrics: The `URLSessionTaskMetrics` gathered. + func didGatherMetrics(_ metrics: URLSessionTaskMetrics) { + protectedMutableState.write { $0.metrics.append(metrics) } + + eventMonitor?.request(self, didGatherMetrics: metrics) + } + + /// Called when a `URLSessionTask` fails before it is finished, typically during certificate pinning. + /// + /// - Parameters: + /// - task: The `URLSessionTask` which failed. + /// - error: The early failure `AFError`. + func didFailTask(_ task: URLSessionTask, earlyWithError error: AFError) { + self.error = error + + // Task will still complete, so didCompleteTask(_:with:) will handle retry. + eventMonitor?.request(self, didFailTask: task, earlyWithError: error) + } + + /// Called when a `URLSessionTask` completes. All tasks will eventually call this method. + /// + /// - Note: Response validation is synchronously triggered in this step. + /// + /// - Parameters: + /// - task: The `URLSessionTask` which completed. + /// - error: The `AFError` `task` may have completed with. If `error` has already been set on the instance, this + /// value is ignored. + func didCompleteTask(_ task: URLSessionTask, with error: AFError?) { + self.error = self.error ?? error + protectedValidators.directValue.forEach { $0() } + + eventMonitor?.request(self, didCompleteTask: task, with: error) - enum RequestTask { - case data(TaskConvertible?, URLSessionTask?) - case download(TaskConvertible?, URLSessionTask?) - case upload(TaskConvertible?, URLSessionTask?) - case stream(TaskConvertible?, URLSessionTask?) + retryOrFinish(error: self.error) } - // MARK: Properties + /// Called when the `RequestDelegate` is going to retry this `Request`. Calls `reset()`. + func prepareForRetry() { + protectedMutableState.write { $0.retryCount += 1 } + + reset() - /// The delegate for the underlying task. - open internal(set) var delegate: TaskDelegate { - get { - taskDelegateLock.lock() ; defer { taskDelegateLock.unlock() } - return taskDelegate + eventMonitor?.requestIsRetrying(self) + } + + /// Called to determine whether retry will be triggered for the particular error, or whether the instance should + /// call `finish()`. + /// + /// - Parameter error: The possible `AFError` which may trigger retry. + func retryOrFinish(error: AFError?) { + guard let error = error, let delegate = delegate else { finish(); return } + + delegate.retryResult(for: self, dueTo: error) { retryResult in + switch retryResult { + case .doNotRetry: + self.finish() + case let .doNotRetryWithError(retryError): + self.finish(error: retryError.asAFError(orFailWith: "Received retryError was not already AFError")) + case .retry, .retryWithDelay: + delegate.retryRequest(self, withDelay: retryResult.delay) + } } - set { - taskDelegateLock.lock() ; defer { taskDelegateLock.unlock() } - taskDelegate = newValue + } + + /// Finishes this `Request` and starts the response serializers. + /// + /// - Parameter error: The possible `Error` with which the instance will finish. + func finish(error: AFError? = nil) { + if let error = error { self.error = error } + + // Start response handlers + processNextResponseSerializer() + + eventMonitor?.requestDidFinish(self) + } + + /// Appends the response serialization closure to the instance. + /// + /// - Parameter closure: The closure containing the response serialization call. + func appendResponseSerializer(_ closure: @escaping () -> Void) { + protectedMutableState.write { mutableState in + mutableState.responseSerializers.append(closure) + + if mutableState.state == .finished { + mutableState.state = .resumed + } + + if mutableState.responseSerializerProcessingFinished { + underlyingQueue.async { self.processNextResponseSerializer() } + } } } - /// The underlying task. - open var task: URLSessionTask? { return delegate.task } + /// Returns the next response serializer closure to execute if there's one left. + /// + /// - Returns: The next response serialization closure, if there is one. + func nextResponseSerializer() -> (() -> Void)? { + var responseSerializer: (() -> Void)? - /// The session belonging to the underlying task. - public let session: URLSession + protectedMutableState.write { mutableState in + let responseSerializerIndex = mutableState.responseSerializerCompletions.count - /// The request sent or to be sent to the server. - open var request: URLRequest? { return task?.originalRequest } + if responseSerializerIndex < mutableState.responseSerializers.count { + responseSerializer = mutableState.responseSerializers[responseSerializerIndex] + } + } - /// The response received from the server, if any. - open var response: HTTPURLResponse? { return task?.response as? HTTPURLResponse } + return responseSerializer + } - /// The number of times the request has been retried. - open internal(set) var retryCount: UInt = 0 + /// Processes the next response serializer and calls all completions if response serialization is complete. + func processNextResponseSerializer() { + guard let responseSerializer = nextResponseSerializer() else { + // Execute all response serializer completions and clear them + var completions: [() -> Void] = [] - let originalTask: TaskConvertible? + protectedMutableState.write { mutableState in + completions = mutableState.responseSerializerCompletions - var startTime: CFAbsoluteTime? - var endTime: CFAbsoluteTime? + // Clear out all response serializers and response serializer completions in mutable state since the + // request is complete. It's important to do this prior to calling the completion closures in case + // the completions call back into the request triggering a re-processing of the response serializers. + // An example of how this can happen is by calling cancel inside a response completion closure. + mutableState.responseSerializers.removeAll() + mutableState.responseSerializerCompletions.removeAll() - var validations: [() -> Void] = [] + if mutableState.state.canTransitionTo(.finished) { + mutableState.state = .finished + } - private var taskDelegate: TaskDelegate - private var taskDelegateLock = NSLock() + mutableState.responseSerializerProcessingFinished = true + } - // MARK: Lifecycle + completions.forEach { $0() } - init(session: URLSession, requestTask: RequestTask, error: Error? = nil) { - self.session = session + // Cleanup the request + cleanup() - switch requestTask { - case .data(let originalTask, let task): - taskDelegate = DataTaskDelegate(task: task) - self.originalTask = originalTask - case .download(let originalTask, let task): - taskDelegate = DownloadTaskDelegate(task: task) - self.originalTask = originalTask - case .upload(let originalTask, let task): - taskDelegate = UploadTaskDelegate(task: task) - self.originalTask = originalTask - case .stream(let originalTask, let task): - taskDelegate = TaskDelegate(task: task) - self.originalTask = originalTask + return } - delegate.error = error - delegate.queue.addOperation { self.endTime = CFAbsoluteTimeGetCurrent() } + serializationQueue.async { responseSerializer() } } - // MARK: Authentication + /// Notifies the `Request` that the response serializer is complete. + /// + /// - Parameter completion: The completion handler provided with the response serilizer, called when all serializers + /// are complete. + func responseSerializerDidComplete(completion: @escaping () -> Void) { + protectedMutableState.write { $0.responseSerializerCompletions.append(completion) } + processNextResponseSerializer() + } + + /// Resets all task and response serializer related state for retry. + func reset() { + error = nil + + uploadProgress.totalUnitCount = 0 + uploadProgress.completedUnitCount = 0 + downloadProgress.totalUnitCount = 0 + downloadProgress.completedUnitCount = 0 + + protectedMutableState.write { $0.responseSerializerCompletions = [] } + } - /// Associates an HTTP Basic credential with the request. + /// Called when updating the upload progress. /// - /// - parameter user: The user. - /// - parameter password: The password. - /// - parameter persistence: The URL credential persistence. `.ForSession` by default. + /// - Parameters: + /// - totalBytesSent: Total bytes sent so far. + /// - totalBytesExpectedToSend: Total bytes expected to send. + func updateUploadProgress(totalBytesSent: Int64, totalBytesExpectedToSend: Int64) { + uploadProgress.totalUnitCount = totalBytesExpectedToSend + uploadProgress.completedUnitCount = totalBytesSent + + uploadProgressHandler?.queue.async { self.uploadProgressHandler?.handler(self.uploadProgress) } + } + + /// Perform a closure on the current `state` while locked. /// - /// - returns: The request. - @discardableResult - open func authenticate( - user: String, - password: String, - persistence: URLCredential.Persistence = .forSession) - -> Self - { - let credential = URLCredential(user: user, password: password, persistence: persistence) - return authenticate(usingCredential: credential) + /// - Parameter perform: The closure to perform. + func withState(perform: (State) -> Void) { + protectedMutableState.withState(perform: perform) } - /// Associates a specified credential with the request. + // MARK: Task Creation + + /// Called when creating a `URLSessionTask` for this `Request`. Subclasses must override. + /// + /// - Parameters: + /// - request: `URLRequest` to use to create the `URLSessionTask`. + /// - session: `URLSession` which creates the `URLSessionTask`. /// - /// - parameter credential: The credential. + /// - Returns: The `URLSessionTask` created. + func task(for request: URLRequest, using session: URLSession) -> URLSessionTask { + fatalError("Subclasses must override.") + } + + // MARK: - Public API + + // These APIs are callable from any queue. + + // MARK: State + + /// Cancels the instance. Once cancelled, a `Request` can no longer be resumed or suspended. /// - /// - returns: The request. + /// - Returns: The instance. @discardableResult - open func authenticate(usingCredential credential: URLCredential) -> Self { - delegate.credential = credential + public func cancel() -> Self { + protectedMutableState.write { mutableState in + guard mutableState.state.canTransitionTo(.cancelled) else { return } + + mutableState.state = .cancelled + + underlyingQueue.async { self.didCancel() } + + guard let task = mutableState.tasks.last, task.state != .completed else { + underlyingQueue.async { self.finish() } + return + } + + // Resume to ensure metrics are gathered. + task.resume() + task.cancel() + underlyingQueue.async { self.didCancelTask(task) } + } + return self } - /// Returns a base64 encoded basic authentication credential as an authorization header tuple. - /// - /// - parameter user: The user. - /// - parameter password: The password. + /// Suspends the instance. /// - /// - returns: A tuple with Authorization header and credential value if encoding succeeds, `nil` otherwise. - open class func authorizationHeader(user: String, password: String) -> (key: String, value: String)? { - guard let data = "\(user):\(password)".data(using: .utf8) else { return nil } + /// - Returns: The instance. + @discardableResult + public func suspend() -> Self { + protectedMutableState.write { mutableState in + guard mutableState.state.canTransitionTo(.suspended) else { return } - let credential = data.base64EncodedString(options: []) + mutableState.state = .suspended - return (key: "Authorization", value: "Basic \(credential)") + underlyingQueue.async { self.didSuspend() } + + guard let task = mutableState.tasks.last, task.state != .completed else { return } + + task.suspend() + underlyingQueue.async { self.didSuspendTask(task) } + } + + return self } - // MARK: State + /// Resumes the instance. + /// + /// - Returns: The instance. + @discardableResult + public func resume() -> Self { + protectedMutableState.write { mutableState in + guard mutableState.state.canTransitionTo(.resumed) else { return } - /// Resumes the request. - open func resume() { - guard let task = task else { delegate.queue.isSuspended = false ; return } + mutableState.state = .resumed - if startTime == nil { startTime = CFAbsoluteTimeGetCurrent() } + underlyingQueue.async { self.didResume() } - task.resume() + guard let task = mutableState.tasks.last, task.state != .completed else { return } - NotificationCenter.default.post( - name: Notification.Name.Task.DidResume, - object: self, - userInfo: [Notification.Key.Task: task] - ) + task.resume() + underlyingQueue.async { self.didResumeTask(task) } + } + + return self } - /// Suspends the request. - open func suspend() { - guard let task = task else { return } + // MARK: - Closure API - task.suspend() + /// Associates a credential using the provided values with the instance. + /// + /// - Parameters: + /// - username: The username. + /// - password: The password. + /// - persistence: The `URLCredential.Persistence` for the created `URLCredential`. `.forSession` by default. + /// + /// - Returns: The instance. + @discardableResult + public func authenticate(username: String, password: String, persistence: URLCredential.Persistence = .forSession) -> Self { + let credential = URLCredential(user: username, password: password, persistence: persistence) - NotificationCenter.default.post( - name: Notification.Name.Task.DidSuspend, - object: self, - userInfo: [Notification.Key.Task: task] - ) + return authenticate(with: credential) } - /// Cancels the request. - open func cancel() { - guard let task = task else { return } + /// Associates the provided credential with the instance. + /// + /// - Parameter credential: The `URLCredential`. + /// + /// - Returns: The instance. + @discardableResult + public func authenticate(with credential: URLCredential) -> Self { + protectedMutableState.write { $0.credential = credential } - task.cancel() + return self + } - NotificationCenter.default.post( - name: Notification.Name.Task.DidCancel, - object: self, - userInfo: [Notification.Key.Task: task] - ) + /// Sets a closure to be called periodically during the lifecycle of the instance as data is read from the server. + /// + /// - Note: Only the last closure provided is used. + /// + /// - Parameters: + /// - queue: The `DispatchQueue` to execute the closure on. `.main` by default. + /// - closure: The closure to be executed periodically as data is read from the server. + /// + /// - Returns: The instance. + @discardableResult + public func downloadProgress(queue: DispatchQueue = .main, closure: @escaping ProgressHandler) -> Self { + protectedMutableState.write { $0.downloadProgressHandler = (handler: closure, queue: queue) } + + return self } -} -// MARK: - CustomStringConvertible + /// Sets a closure to be called periodically during the lifecycle of the instance as data is sent to the server. + /// + /// - Note: Only the last closure provided is used. + /// + /// - Parameters: + /// - queue: The `DispatchQueue` to execute the closure on. `.main` by default. + /// - closure: The closure to be executed periodically as data is sent to the server. + /// + /// - Returns: The instance. + @discardableResult + public func uploadProgress(queue: DispatchQueue = .main, closure: @escaping ProgressHandler) -> Self { + protectedMutableState.write { $0.uploadProgressHandler = (handler: closure, queue: queue) } -extension Request: CustomStringConvertible { - /// The textual representation used when written to an output stream, which includes the HTTP method and URL, as - /// well as the response status code if a response has been received. - open var description: String { - var components: [String] = [] + return self + } + + // MARK: Redirects - if let HTTPMethod = request?.httpMethod { - components.append(HTTPMethod) + /// Sets the redirect handler for the instance which will be used if a redirect response is encountered. + /// + /// - Note: Attempting to set the redirect handler more than once is a logic error and will crash. + /// + /// - Parameter handler: The `RedirectHandler`. + /// + /// - Returns: The instance. + @discardableResult + public func redirect(using handler: RedirectHandler) -> Self { + protectedMutableState.write { mutableState in + precondition(mutableState.redirectHandler == nil, "Redirect handler has already been set.") + mutableState.redirectHandler = handler } - if let urlString = request?.url?.absoluteString { - components.append(urlString) + return self + } + + // MARK: Cached Responses + + /// Sets the cached response handler for the `Request` which will be used when attempting to cache a response. + /// + /// - Note: Attempting to set the cache handler more than once is a logic error and will crash. + /// + /// - Parameter handler: The `CachedResponseHandler`. + /// + /// - Returns: The instance. + @discardableResult + public func cacheResponse(using handler: CachedResponseHandler) -> Self { + protectedMutableState.write { mutableState in + precondition(mutableState.cachedResponseHandler == nil, "Cached response handler has already been set.") + mutableState.cachedResponseHandler = handler } - if let response = response { - components.append("(\(response.statusCode))") + return self + } + + /// Sets a handler to be called when the cURL description of the request is available. + /// + /// - Note: When waiting for a `Request`'s `URLRequest` to be created, only the last `handler` will be called. + /// + /// - Parameter handler: Closure to be called when the cURL description is available. + /// + /// - Returns: The instance. + @discardableResult + public func cURLDescription(calling handler: @escaping (String) -> Void) -> Self { + protectedMutableState.write { mutableState in + if mutableState.requests.last != nil { + underlyingQueue.async { handler(self.cURLDescription()) } + } else { + mutableState.cURLHandler = handler + } } - return components.joined(separator: " ") + return self + } + + // MARK: Cleanup + + /// Final cleanup step executed when the instance finishes response serialization. + func cleanup() { + delegate?.cleanup(after: self) + // No-op: override in subclass } } -// MARK: - CustomDebugStringConvertible +// MARK: - Protocol Conformances -extension Request: CustomDebugStringConvertible { - /// The textual representation used when written to an output stream, in the form of a cURL command. - open var debugDescription: String { - return cURLRepresentation() +extension Request: Equatable { + public static func ==(lhs: Request, rhs: Request) -> Bool { + return lhs.id == rhs.id } +} - func cURLRepresentation() -> String { - var components = ["$ curl -v"] +extension Request: Hashable { + public func hash(into hasher: inout Hasher) { + hasher.combine(id) + } +} - guard let request = self.request, - let url = request.url, - let host = url.host - else { - return "$ curl command could not be created" - } +extension Request: CustomStringConvertible { + /// A textual representation of this instance, including the `HTTPMethod` and `URL` if the `URLRequest` has been + /// created, as well as the response status code, if a response has been received. + public var description: String { + guard let request = performedRequests.last ?? lastRequest, + let url = request.url, + let method = request.httpMethod else { return "No request created yet." } - if let httpMethod = request.httpMethod, httpMethod != "GET" { - components.append("-X \(httpMethod)") - } + let requestDescription = "\(method) \(url.absoluteString)" + + return response.map { "\(requestDescription) (\($0.statusCode))" } ?? requestDescription + } +} + +extension Request { + /// cURL representation of the instance. + /// + /// - Returns: The cURL equivalent of the instance. + public func cURLDescription() -> String { + guard + let request = lastRequest, + let url = request.url, + let host = url.host, + let method = request.httpMethod else { return "$ curl command could not be created" } + + var components = ["$ curl -v"] - if let credentialStorage = self.session.configuration.urlCredentialStorage { - let protectionSpace = URLProtectionSpace( - host: host, - port: url.port ?? 0, - protocol: url.scheme, - realm: host, - authenticationMethod: NSURLAuthenticationMethodHTTPBasic - ) + components.append("-X \(method)") + + if let credentialStorage = delegate?.sessionConfiguration.urlCredentialStorage { + let protectionSpace = URLProtectionSpace(host: host, + port: url.port ?? 0, + protocol: url.scheme, + realm: host, + authenticationMethod: NSURLAuthenticationMethodHTTPBasic) if let credentials = credentialStorage.credentials(for: protectionSpace)?.values { for credential in credentials { @@ -297,39 +843,39 @@ extension Request: CustomDebugStringConvertible { components.append("-u \(user):\(password)") } } else { - if let credential = delegate.credential, let user = credential.user, let password = credential.password { + if let credential = credential, let user = credential.user, let password = credential.password { components.append("-u \(user):\(password)") } } } - if session.configuration.httpShouldSetCookies { + if let configuration = delegate?.sessionConfiguration, configuration.httpShouldSetCookies { if - let cookieStorage = session.configuration.httpCookieStorage, - let cookies = cookieStorage.cookies(for: url), !cookies.isEmpty - { - let string = cookies.reduce("") { $0 + "\($1.name)=\($1.value);" } - - #if swift(>=3.2) - components.append("-b \"\(string[.. Void) + + /// Asynchronously retry the `Request`. + /// + /// - Parameters: + /// - request: `Request` which will be retried. + /// - timeDelay: `TimeInterval` after which the retry will be triggered. + func retryRequest(_ request: Request, withDelay timeDelay: TimeInterval?) +} + +// MARK: - Subclasses -/// Specific type of `Request` that manages an underlying `URLSessionDataTask`. -open class DataRequest: Request { +// MARK: - DataRequest - // MARK: Helper Types +/// `Request` subclass which handles in-memory `Data` download using `URLSessionDataTask`. +public class DataRequest: Request { + /// `URLRequestConvertible` value used to create `URLRequest`s for this instance. + public let convertible: URLRequestConvertible + /// `Data` read from the server so far. + public var data: Data? { return protectedData.directValue } - struct Requestable: TaskConvertible { - let urlRequest: URLRequest + /// Protected storage for the `Data` read by the instance. + private var protectedData: Protector = Protector(nil) - func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { - do { - let urlRequest = try self.urlRequest.adapt(using: adapter) - return queue.sync { session.dataTask(with: urlRequest) } - } catch { - throw AdaptError(error: error) - } - } + /// Creates a `DataRequest` using the provided parameters. + /// + /// - Parameters: + /// - id: `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` by default. + /// - convertible: `URLRequestConvertible` value used to create `URLRequest`s for this instance. + /// - underlyingQueue: `DispatchQueue` on which all internal `Request` work is performed. + /// - serializationQueue: `DispatchQueue` on which all serialization work is performed. By default targets + /// `underlyingQueue`, but can be passed another queue from a `Session`. + /// - eventMonitor: `EventMonitor` called for event callbacks from internal `Request` actions. + /// - interceptor: `RequestInterceptor` used throughout the request lifecycle. + /// - delegate: `RequestDelegate` that provides an interface to actions not performed by the `Request`. + init(id: UUID = UUID(), + convertible: URLRequestConvertible, + underlyingQueue: DispatchQueue, + serializationQueue: DispatchQueue, + eventMonitor: EventMonitor?, + interceptor: RequestInterceptor?, + delegate: RequestDelegate) { + self.convertible = convertible + + super.init(id: id, + underlyingQueue: underlyingQueue, + serializationQueue: serializationQueue, + eventMonitor: eventMonitor, + interceptor: interceptor, + delegate: delegate) } - // MARK: Properties + override func reset() { + super.reset() - /// The request sent or to be sent to the server. - open override var request: URLRequest? { - if let request = super.request { return request } - if let requestable = originalTask as? Requestable { return requestable.urlRequest } + protectedData.directValue = nil + } - return nil + /// Called when `Data` is received by this instance. + /// + /// - Note: Also calls `updateDownloadProgress`. + /// + /// - Parameter data: The `Data` received. + func didReceive(data: Data) { + if self.data == nil { + protectedData.directValue = data + } else { + protectedData.append(data) + } + + updateDownloadProgress() } - /// The progress of fetching the response data from the server for the request. - open var progress: Progress { return dataDelegate.progress } + override func task(for request: URLRequest, using session: URLSession) -> URLSessionTask { + let copiedRequest = request + return session.dataTask(with: copiedRequest) + } + + /// Called to updated the `downloadProgress` of the instance. + func updateDownloadProgress() { + let totalBytesReceived = Int64(data?.count ?? 0) + let totalBytesExpected = task?.response?.expectedContentLength ?? NSURLSessionTransferSizeUnknown - var dataDelegate: DataTaskDelegate { return delegate as! DataTaskDelegate } + downloadProgress.totalUnitCount = totalBytesExpected + downloadProgress.completedUnitCount = totalBytesReceived - // MARK: Stream + downloadProgressHandler?.queue.async { self.downloadProgressHandler?.handler(self.downloadProgress) } + } - /// Sets a closure to be called periodically during the lifecycle of the request as data is read from the server. + /// Validates the request, using the specified closure. /// - /// This closure returns the bytes most recently received from the server, not including data from previous calls. - /// If this closure is set, data will only be available within this closure, and will not be saved elsewhere. It is - /// also important to note that the server data in any `Response` object will be `nil`. + /// - Note: If validation fails, subsequent calls to response handlers will have an associated error. /// - /// - parameter closure: The code to be executed periodically during the lifecycle of the request. + /// - Parameter validation: `Validation` closure used to validate the response. /// - /// - returns: The request. + /// - Returns: The instance. @discardableResult - open func stream(closure: ((Data) -> Void)? = nil) -> Self { - dataDelegate.dataStream = closure - return self - } + public func validate(_ validation: @escaping Validation) -> Self { + let validator: () -> Void = { [unowned self] in + guard self.error == nil, let response = self.response else { return } - // MARK: Progress + let result = validation(self.request, response, self.data) + + if case let .failure(error) = result { self.error = error.asAFError(or: .responseValidationFailed(reason: .customValidationFailed(error: error))) } + + self.eventMonitor?.request(self, + didValidateRequest: self.request, + response: response, + data: self.data, + withResult: result) + } + + protectedValidators.append(validator) - /// Sets a closure to be called periodically during the lifecycle of the `Request` as data is read from the server. - /// - /// - parameter queue: The dispatch queue to execute the closure on. - /// - parameter closure: The code to be executed periodically as data is read from the server. - /// - /// - returns: The request. - @discardableResult - open func downloadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { - dataDelegate.progressHandler = (closure, queue) return self } } -// MARK: - - -/// Specific type of `Request` that manages an underlying `URLSessionDownloadTask`. -open class DownloadRequest: Request { +// MARK: - DownloadRequest - // MARK: Helper Types +/// `Request` subclass which downloads `Data` to a file on disk using `URLSessionDownloadTask`. +public class DownloadRequest: Request { + /// A set of options to be executed prior to moving a downloaded file from the temporary `URL` to the destination + /// `URL`. + public struct Options: OptionSet { + /// Specifies that intermediate directories for the destination URL should be created. + public static let createIntermediateDirectories = Options(rawValue: 1 << 0) + /// Specifies that any previous file at the destination `URL` should be removed. + public static let removePreviousFile = Options(rawValue: 1 << 1) - /// A collection of options to be executed prior to moving a downloaded file from the temporary URL to the - /// destination URL. - public struct DownloadOptions: OptionSet { /// Returns the raw bitmask value of the option and satisfies the `RawRepresentable` protocol. - public let rawValue: UInt + public let rawValue: Int - /// A `DownloadOptions` flag that creates intermediate directories for the destination URL if specified. - public static let createIntermediateDirectories = DownloadOptions(rawValue: 1 << 0) - - /// A `DownloadOptions` flag that removes a previous file from the destination URL if specified. - public static let removePreviousFile = DownloadOptions(rawValue: 1 << 1) - - /// Creates a `DownloadFileDestinationOptions` instance with the specified raw value. - /// - /// - parameter rawValue: The raw bitmask value for the option. - /// - /// - returns: A new log level instance. - public init(rawValue: UInt) { + public init(rawValue: Int) { self.rawValue = rawValue } } + // MARK: Destination + /// A closure executed once a download request has successfully completed in order to determine where to move the /// temporary file written to during the download process. The closure takes two arguments: the temporary file URL /// and the URL response, and returns a two arguments: the file URL where the temporary file should be moved and /// the options defining how the file should be moved. - public typealias DownloadFileDestination = ( - _ temporaryURL: URL, - _ response: HTTPURLResponse) - -> (destinationURL: URL, options: DownloadOptions) - - enum Downloadable: TaskConvertible { - case request(URLRequest) - case resumeData(Data) + public typealias Destination = (_ temporaryURL: URL, + _ response: HTTPURLResponse) -> (destinationURL: URL, options: Options) - func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { - do { - let task: URLSessionTask + // MARK: Destination - switch self { - case let .request(urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.sync { session.downloadTask(with: urlRequest) } - case let .resumeData(resumeData): - task = queue.sync { session.downloadTask(withResumeData: resumeData) } - } + /// Creates a download file destination closure which uses the default file manager to move the temporary file to a + /// file URL in the first available directory with the specified search path directory and search path domain mask. + /// + /// - Parameters: + /// - directory: The search path directory. `.documentDirectory` by default. + /// - domain: The search path domain mask. `.userDomainMask` by default. + /// - options: `DownloadRequest.Options` used when moving the downloaded file to its destination. None by + /// default. + /// - Returns: The `Destination` closure. + public class func suggestedDownloadDestination(for directory: FileManager.SearchPathDirectory = .documentDirectory, + in domain: FileManager.SearchPathDomainMask = .userDomainMask, + options: Options = []) -> Destination { + return { temporaryURL, response in + let directoryURLs = FileManager.default.urls(for: directory, in: domain) + let url = directoryURLs.first?.appendingPathComponent(response.suggestedFilename!) ?? temporaryURL - return task - } catch { - throw AdaptError(error: error) - } + return (url, options) } } - // MARK: Properties + /// Default `Destination` used by Alamofire to ensure all downloads persist. This `Destination` prepends + /// `Alamofire_` to the automatically generated download name and moves it within the temporary directory. Files + /// with this destination must be additionally moved if they should survive the system reclamation of temporary + /// space. + static let defaultDestination: Destination = { url, _ in + let filename = "Alamofire_\(url.lastPathComponent)" + let destination = url.deletingLastPathComponent().appendingPathComponent(filename) - /// The request sent or to be sent to the server. - open override var request: URLRequest? { - if let request = super.request { return request } - - if let downloadable = originalTask as? Downloadable, case let .request(urlRequest) = downloadable { - return urlRequest - } + return (destination, []) + } - return nil + /// Type describing the source used to create the underlying `URLSessionDownloadTask`. + public enum Downloadable { + /// Download should be started from the `URLRequest` produced by the associated `URLRequestConvertible` value. + case request(URLRequestConvertible) + /// Download should be started from the associated resume `Data` value. + case resumeData(Data) } - /// The resume data of the underlying download task if available after a failure. - open var resumeData: Data? { return downloadDelegate.resumeData } + // MARK: Mutable State + + /// Type containing all mutable state for `DownloadRequest` instances. + private struct DownloadRequestMutableState { + /// Possible resume `Data` produced when cancelling the instance. + var resumeData: Data? + /// `URL` to which `Data` is being downloaded. + var fileURL: URL? + } - /// The progress of downloading the response data from the server for the request. - open var progress: Progress { return downloadDelegate.progress } + /// Protected mutable state specific to `DownloadRequest`. + private let protectedDownloadMutableState: Protector = Protector(DownloadRequestMutableState()) - var downloadDelegate: DownloadTaskDelegate { return delegate as! DownloadTaskDelegate } + /// If the download is resumable and eventually cancelled, this value may be used to resume the download using the + /// `download(resumingWith data:)` API. + /// + /// - Note: For more information about `resumeData`, see [Apple's documentation](https://developer.apple.com/documentation/foundation/urlsessiondownloadtask/1411634-cancel). + public var resumeData: Data? { return protectedDownloadMutableState.directValue.resumeData } + /// If the download is successful, the `URL` where the file was downloaded. + public var fileURL: URL? { return protectedDownloadMutableState.directValue.fileURL } - // MARK: State + // MARK: Initial State - /// Cancels the request. - open override func cancel() { - downloadDelegate.downloadTask.cancel { self.downloadDelegate.resumeData = $0 } + /// `Downloadable` value used for this instance. + public let downloadable: Downloadable + /// The `Destination` to which the downloaded file is moved. + let destination: Destination - NotificationCenter.default.post( - name: Notification.Name.Task.DidCancel, - object: self, - userInfo: [Notification.Key.Task: task as Any] - ) + /// Creates a `DownloadRequest` using the provided parameters. + /// + /// - Parameters: + /// - id: `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` by default. + /// - downloadable: `Downloadable` value used to create `URLSessionDownloadTasks` for the instance. + /// - underlyingQueue: `DispatchQueue` on which all internal `Request` work is performed. + /// - serializationQueue: `DispatchQueue` on which all serialization work is performed. By default targets + /// `underlyingQueue`, but can be passed another queue from a `Session`. + /// - eventMonitor: `EventMonitor` called for event callbacks from internal `Request` actions. + /// - interceptor: `RequestInterceptor` used throughout the request lifecycle. + /// - delegate: `RequestDelegate` that provides an interface to actions not performed by the `Request` + /// - destination: `Destination` closure used to move the downloaded file to its final location. + init(id: UUID = UUID(), + downloadable: Downloadable, + underlyingQueue: DispatchQueue, + serializationQueue: DispatchQueue, + eventMonitor: EventMonitor?, + interceptor: RequestInterceptor?, + delegate: RequestDelegate, + destination: @escaping Destination) { + self.downloadable = downloadable + self.destination = destination + + super.init(id: id, + underlyingQueue: underlyingQueue, + serializationQueue: serializationQueue, + eventMonitor: eventMonitor, + interceptor: interceptor, + delegate: delegate) } - // MARK: Progress + override func reset() { + super.reset() + + protectedDownloadMutableState.write { + $0.resumeData = nil + $0.fileURL = nil + } + } - /// Sets a closure to be called periodically during the lifecycle of the `Request` as data is read from the server. + /// Called when a download has finished. /// - /// - parameter queue: The dispatch queue to execute the closure on. - /// - parameter closure: The code to be executed periodically as data is read from the server. + /// - Parameters: + /// - task: `URLSessionTask` that finished the download. + /// - result: `Result` of the automatic move to `destination`. + func didFinishDownloading(using task: URLSessionTask, with result: Result) { + eventMonitor?.request(self, didFinishDownloadingUsing: task, with: result) + + switch result { + case let .success(url): protectedDownloadMutableState.write { $0.fileURL = url } + case let .failure(error): self.error = error + } + } + + /// Updates the `downloadProgress` using the provided values. /// - /// - returns: The request. - @discardableResult - open func downloadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { - downloadDelegate.progressHandler = (closure, queue) - return self + /// - Parameters: + /// - bytesWritten: Total bytes written so far. + /// - totalBytesExpectedToWrite: Total bytes expected to write. + func updateDownloadProgress(bytesWritten: Int64, totalBytesExpectedToWrite: Int64) { + downloadProgress.totalUnitCount = totalBytesExpectedToWrite + downloadProgress.completedUnitCount += bytesWritten + + downloadProgressHandler?.queue.async { self.downloadProgressHandler?.handler(self.downloadProgress) } } - // MARK: Destination + override func task(for request: URLRequest, using session: URLSession) -> URLSessionTask { + return session.downloadTask(with: request) + } - /// Creates a download file destination closure which uses the default file manager to move the temporary file to a - /// file URL in the first available directory with the specified search path directory and search path domain mask. + /// Creates a `URLSessionTask` from the provided resume data. /// - /// - parameter directory: The search path directory. `.DocumentDirectory` by default. - /// - parameter domain: The search path domain mask. `.UserDomainMask` by default. + /// - Parameters: + /// - data: `Data` used to resume the download. + /// - session: `URLSession` used to create the `URLSessionTask`. /// - /// - returns: A download file destination closure. - open class func suggestedDownloadDestination( - for directory: FileManager.SearchPathDirectory = .documentDirectory, - in domain: FileManager.SearchPathDomainMask = .userDomainMask) - -> DownloadFileDestination - { - return { temporaryURL, response in - let directoryURLs = FileManager.default.urls(for: directory, in: domain) + /// - Returns: The `URLSessionTask` created. + public func task(forResumeData data: Data, using session: URLSession) -> URLSessionTask { + return session.downloadTask(withResumeData: data) + } - if !directoryURLs.isEmpty { - return (directoryURLs[0].appendingPathComponent(response.suggestedFilename!), []) - } + /// Cancels the instance. Once cancelled, a `DownloadRequest` can no longer be resumed or suspended. + /// + /// - Note: This method will NOT produce resume data. If you wish to cancel and produce resume data, use + /// `cancel(producingResumeData:)` or `cancel(byProducingResumeData:)`. + /// + /// - Returns: The instance. + @discardableResult + public override func cancel() -> Self { + return cancel(producingResumeData: false) + } - return (temporaryURL, []) - } + /// Cancels the instance, optionally producing resume data. Once cancelled, a `DownloadRequest` can no longer be + /// resumed or suspended. + /// + /// - Note: If `producingResumeData` is `true`, the `resumeData` property will be populated with any resume data, if + /// available. + /// + /// - Returns: The instance. + @discardableResult + public func cancel(producingResumeData shouldProduceResumeData: Bool) -> Self { + return cancel(optionallyProducingResumeData: shouldProduceResumeData ? { _ in } : nil) } -} -// MARK: - + /// Cancels the instance while producing resume data. Once cancelled, a `DownloadRequest` can no longer be resumed + /// or suspended. + /// + /// - Note: The resume data passed to the completion handler will also be available on the instance's `resumeData` + /// property. + /// + /// - Parameter completionHandler: The completion handler that is called when the download has been successfully + /// cancelled. It is not guaranteed to be called on a particular queue, so you may + /// want use an appropriate queue to perform your work. + /// + /// - Returns: The instance. + @discardableResult + public func cancel(byProducingResumeData completionHandler: @escaping (_ data: Data?) -> Void) -> Self { + return cancel(optionallyProducingResumeData: completionHandler) + } -/// Specific type of `Request` that manages an underlying `URLSessionUploadTask`. -open class UploadRequest: DataRequest { + /// Internal implementation of cancellation that optionally takes a resume data handler. If no handler is passed, + /// cancellation is performed without producing resume data. + /// + /// - Parameter completionHandler: Optional resume data handler. + /// + /// - Returns: The instance. + private func cancel(optionallyProducingResumeData completionHandler: ((_ resumeData: Data?) -> Void)?) -> Self { + protectedMutableState.write { mutableState in + guard mutableState.state.canTransitionTo(.cancelled) else { return } - // MARK: Helper Types + mutableState.state = .cancelled - enum Uploadable: TaskConvertible { - case data(Data, URLRequest) - case file(URL, URLRequest) - case stream(InputStream, URLRequest) + underlyingQueue.async { self.didCancel() } - func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { - do { - let task: URLSessionTask + guard let task = mutableState.tasks.last as? URLSessionDownloadTask, task.state != .completed else { + underlyingQueue.async { self.finish() } + return + } - switch self { - case let .data(data, urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.sync { session.uploadTask(with: urlRequest, from: data) } - case let .file(url, urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.sync { session.uploadTask(with: urlRequest, fromFile: url) } - case let .stream(_, urlRequest): - let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.sync { session.uploadTask(withStreamedRequest: urlRequest) } + if let completionHandler = completionHandler { + // Resume to ensure metrics are gathered. + task.resume() + task.cancel { resumeData in + self.protectedDownloadMutableState.write { $0.resumeData = resumeData } + self.underlyingQueue.async { self.didCancelTask(task) } + completionHandler(resumeData) } - - return task - } catch { - throw AdaptError(error: error) + } else { + // Resume to ensure metrics are gathered. + task.resume() + task.cancel() + self.underlyingQueue.async { self.didCancelTask(task) } } } + + return self } - // MARK: Properties + /// Validates the request, using the specified closure. + /// + /// - Note: If validation fails, subsequent calls to response handlers will have an associated error. + /// + /// - Parameter validation: `Validation` closure to validate the response. + /// + /// - Returns: The instance. + @discardableResult + public func validate(_ validation: @escaping Validation) -> Self { + let validator: () -> Void = { [unowned self] in + guard self.error == nil, let response = self.response else { return } - /// The request sent or to be sent to the server. - open override var request: URLRequest? { - if let request = super.request { return request } + let result = validation(self.request, response, self.fileURL) - guard let uploadable = originalTask as? Uploadable else { return nil } + if case let .failure(error) = result { self.error = error.asAFError(or: .responseValidationFailed(reason: .customValidationFailed(error: error))) } - switch uploadable { - case .data(_, let urlRequest), .file(_, let urlRequest), .stream(_, let urlRequest): - return urlRequest + self.eventMonitor?.request(self, + didValidateRequest: self.request, + response: response, + fileURL: self.fileURL, + withResult: result) } + + protectedValidators.append(validator) + + return self } +} - /// The progress of uploading the payload to the server for the upload request. - open var uploadProgress: Progress { return uploadDelegate.uploadProgress } +// MARK: - UploadRequest + +/// `DataRequest` subclass which handles `Data` upload from memory, file, or stream using `URLSessionUploadTask`. +public class UploadRequest: DataRequest { + /// Type describing the origin of the upload, whether `Data`, file, or stream. + public enum Uploadable { + /// Upload from the provided `Data` value. + case data(Data) + /// Upload from the provided file `URL`, as well as a `Bool` determining whether the source file should be + /// automatically removed once uploaded. + case file(URL, shouldRemove: Bool) + /// Upload from the provided `InputStream`. + case stream(InputStream) + } - var uploadDelegate: UploadTaskDelegate { return delegate as! UploadTaskDelegate } + // MARK: Initial State - // MARK: Upload Progress + /// The `UploadableConvertible` value used to produce the `Uploadable` value for this instance. + public let upload: UploadableConvertible - /// Sets a closure to be called periodically during the lifecycle of the `UploadRequest` as data is sent to - /// the server. - /// - /// After the data is sent to the server, the `progress(queue:closure:)` APIs can be used to monitor the progress - /// of data being read from the server. + /// `FileManager` used to perform cleanup tasks, including the removal of multipart form encoded payloads written + /// to disk. + public let fileManager: FileManager + + // MARK: Mutable State + + /// `Uploadable` value used by the instance. + public var uploadable: Uploadable? + + /// Creates an `UploadRequest` using the provided parameters. /// - /// - parameter queue: The dispatch queue to execute the closure on. - /// - parameter closure: The code to be executed periodically as data is sent to the server. + /// - Parameters: + /// - id: `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` by default. + /// - convertible: `UploadConvertible` value used to determine the type of upload to be performed. + /// - underlyingQueue: `DispatchQueue` on which all internal `Request` work is performed. + /// - serializationQueue: `DispatchQueue` on which all serialization work is performed. By default targets + /// `underlyingQueue`, but can be passed another queue from a `Session`. + /// - eventMonitor: `EventMonitor` called for event callbacks from internal `Request` actions. + /// - interceptor: `RequestInterceptor` used throughout the request lifecycle. + /// - delegate: `RequestDelegate` that provides an interface to actions not performed by the `Request`. + init(id: UUID = UUID(), + convertible: UploadConvertible, + underlyingQueue: DispatchQueue, + serializationQueue: DispatchQueue, + eventMonitor: EventMonitor?, + interceptor: RequestInterceptor?, + fileManager: FileManager, + delegate: RequestDelegate) { + upload = convertible + self.fileManager = fileManager + + super.init(id: id, + convertible: convertible, + underlyingQueue: underlyingQueue, + serializationQueue: serializationQueue, + eventMonitor: eventMonitor, + interceptor: interceptor, + delegate: delegate) + } + + /// Called when the `Uploadable` value has been created from the `UploadConvertible`. /// - /// - returns: The request. - @discardableResult - open func uploadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self { - uploadDelegate.uploadProgressHandler = (closure, queue) - return self + /// - Parameter uploadable: The `Uploadable` that was created. + func didCreateUploadable(_ uploadable: Uploadable) { + self.uploadable = uploadable + + eventMonitor?.request(self, didCreateUploadable: uploadable) } -} -// MARK: - + /// Called when the `Uploadable` value could not be created. + /// + /// - Parameter error: `AFError` produced by the failure. + func didFailToCreateUploadable(with error: AFError) { + self.error = error + + eventMonitor?.request(self, didFailToCreateUploadableWithError: error) -#if !os(watchOS) + retryOrFinish(error: error) + } -/// Specific type of `Request` that manages an underlying `URLSessionStreamTask`. -@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) -open class StreamRequest: Request { - enum Streamable: TaskConvertible { - case stream(hostName: String, port: Int) - case netService(NetService) + override func task(for request: URLRequest, using session: URLSession) -> URLSessionTask { + guard let uploadable = uploadable else { + fatalError("Attempting to create a URLSessionUploadTask when Uploadable value doesn't exist.") + } - func task(session: URLSession, adapter: RequestAdapter?, queue: DispatchQueue) throws -> URLSessionTask { - let task: URLSessionTask + switch uploadable { + case let .data(data): return session.uploadTask(with: request, from: data) + case let .file(url, _): return session.uploadTask(with: request, fromFile: url) + case .stream: return session.uploadTask(withStreamedRequest: request) + } + } - switch self { - case let .stream(hostName, port): - task = queue.sync { session.streamTask(withHostName: hostName, port: port) } - case let .netService(netService): - task = queue.sync { session.streamTask(with: netService) } - } + /// Produces the `InputStream` from `uploadable`, if it can. + /// + /// - Note: Calling this method with a non-`.stream` `Uploadable` is a logic error and will crash. + /// + /// - Returns: The `InputStream`. + func inputStream() -> InputStream { + guard let uploadable = uploadable else { + fatalError("Attempting to access the input stream but the uploadable doesn't exist.") + } - return task + guard case let .stream(stream) = uploadable else { + fatalError("Attempted to access the stream of an UploadRequest that wasn't created with one.") } + + eventMonitor?.request(self, didProvideInputStream: stream) + + return stream + } + + public override func cleanup() { + defer { super.cleanup() } + + guard + let uploadable = self.uploadable, + case let .file(url, shouldRemove) = uploadable, + shouldRemove + else { return } + + try? fileManager.removeItem(at: url) + } +} + +/// A type that can produce an `UploadRequest.Uploadable` value. +public protocol UploadableConvertible { + /// Produces an `UploadRequest.Uploadable` value from the instance. + /// + /// - Returns: The `UploadRequest.Uploadable`. + /// - Throws: Any `Error` produced during creation. + func createUploadable() throws -> UploadRequest.Uploadable +} + +extension UploadRequest.Uploadable: UploadableConvertible { + public func createUploadable() throws -> UploadRequest.Uploadable { + return self } } -#endif +/// A type that can be converted to an upload, whether from an `UploadRequest.Uploadable` or `URLRequestConvertible`. +public protocol UploadConvertible: UploadableConvertible & URLRequestConvertible {} diff --git a/Example/Pods/Alamofire/Source/Response.swift b/Example/Pods/Alamofire/Source/Response.swift index 747a471..5874b28 100644 --- a/Example/Pods/Alamofire/Source/Response.swift +++ b/Example/Pods/Alamofire/Source/Response.swift @@ -1,7 +1,7 @@ // // Response.swift // -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -24,8 +24,13 @@ import Foundation -/// Used to store all data associated with an non-serialized response of a data or upload request. -public struct DefaultDataResponse { +/// Default type of `DataResponse` returned by Alamofire, with an `AFError` `Failure` type. +public typealias AFDataResponse = DataResponse +/// Default type of `DownloadResponse` returned by Alamofire, with an `AFError` `Failure` type. +public typealias AFDownloadResponse = DownloadResponse + +/// Type used to store all values associated with a serialized response of a `DataRequest` or `UploadRequest`. +public struct DataResponse { /// The URL request sent to the server. public let request: URLRequest? @@ -35,87 +40,42 @@ public struct DefaultDataResponse { /// The data returned by the server. public let data: Data? - /// The error encountered while executing or validating the request. - public let error: Error? - - /// The timeline of the complete lifecycle of the request. - public let timeline: Timeline - - var _metrics: AnyObject? - - /// Creates a `DefaultDataResponse` instance from the specified parameters. - /// - /// - Parameters: - /// - request: The URL request sent to the server. - /// - response: The server's response to the URL request. - /// - data: The data returned by the server. - /// - error: The error encountered while executing or validating the request. - /// - timeline: The timeline of the complete lifecycle of the request. `Timeline()` by default. - /// - metrics: The task metrics containing the request / response statistics. `nil` by default. - public init( - request: URLRequest?, - response: HTTPURLResponse?, - data: Data?, - error: Error?, - timeline: Timeline = Timeline(), - metrics: AnyObject? = nil) - { - self.request = request - self.response = response - self.data = data - self.error = error - self.timeline = timeline - } -} - -// MARK: - - -/// Used to store all data associated with a serialized response of a data or upload request. -public struct DataResponse { - /// The URL request sent to the server. - public let request: URLRequest? + /// The final metrics of the response. + public let metrics: URLSessionTaskMetrics? - /// The server's response to the URL request. - public let response: HTTPURLResponse? - - /// The data returned by the server. - public let data: Data? + /// The time taken to serialize the response. + public let serializationDuration: TimeInterval /// The result of response serialization. - public let result: Result - - /// The timeline of the complete lifecycle of the request. - public let timeline: Timeline + public let result: Result /// Returns the associated value of the result if it is a success, `nil` otherwise. - public var value: Value? { return result.value } + public var value: Success? { return result.success } /// Returns the associated error value if the result if it is a failure, `nil` otherwise. - public var error: Error? { return result.error } - - var _metrics: AnyObject? - - /// Creates a `DataResponse` instance with the specified parameters derived from response serialization. - /// - /// - parameter request: The URL request sent to the server. - /// - parameter response: The server's response to the URL request. - /// - parameter data: The data returned by the server. - /// - parameter result: The result of response serialization. - /// - parameter timeline: The timeline of the complete lifecycle of the `Request`. Defaults to `Timeline()`. - /// - /// - returns: The new `DataResponse` instance. - public init( - request: URLRequest?, - response: HTTPURLResponse?, - data: Data?, - result: Result, - timeline: Timeline = Timeline()) - { + public var error: Failure? { return result.failure } + + /// Creates a `DataResponse` instance with the specified parameters derived from the response serialization. + /// + /// - Parameters: + /// - request: The `URLRequest` sent to the server. + /// - response: The `HTTPURLResponse` from the server. + /// - data: The `Data` returned by the server. + /// - metrics: The `URLSessionTaskMetrics` of the `DataRequest` or `UploadRequest`. + /// - serializationDuration: The duration taken by serialization. + /// - result: The `Result` of response serialization. + public init(request: URLRequest?, + response: HTTPURLResponse?, + data: Data?, + metrics: URLSessionTaskMetrics?, + serializationDuration: TimeInterval, + result: Result) { self.request = request self.response = response self.data = data + self.metrics = metrics + self.serializationDuration = serializationDuration self.result = result - self.timeline = timeline } } @@ -125,21 +85,37 @@ extension DataResponse: CustomStringConvertible, CustomDebugStringConvertible { /// The textual representation used when written to an output stream, which includes whether the result was a /// success or failure. public var description: String { - return result.debugDescription + return "\(result)" } /// The debug textual representation used when written to an output stream, which includes the URL request, the URL - /// response, the server data, the response serialization result and the timeline. + /// response, the server data, the duration of the network and serialization actions, and the response serialization + /// result. public var debugDescription: String { - var output: [String] = [] - - output.append(request != nil ? "[Request]: \(request!.httpMethod ?? "GET") \(request!)" : "[Request]: nil") - output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") - output.append("[Data]: \(data?.count ?? 0) bytes") - output.append("[Result]: \(result.debugDescription)") - output.append("[Timeline]: \(timeline.debugDescription)") - - return output.joined(separator: "\n") + let requestDescription = request.map { "\($0.httpMethod!) \($0)" } ?? "nil" + let requestBody = request?.httpBody.map { String(decoding: $0, as: UTF8.self) } ?? "None" + let responseDescription = response.map { response in + let sortedHeaders = response.headers.sorted() + + return """ + [Status Code]: \(response.statusCode) + [Headers]: + \(sortedHeaders) + """ + } ?? "nil" + let responseBody = data.map { String(decoding: $0, as: UTF8.self) } ?? "None" + let metricsDescription = metrics.map { "\($0.taskInterval.duration)s" } ?? "None" + + return """ + [Request]: \(requestDescription) + [Request Body]: \n\(requestBody) + [Response]: \n\(responseDescription) + [Response Body]: \n\(responseBody) + [Data]: \(data?.description ?? "None") + [Network Duration]: \(metricsDescription) + [Serialization Duration]: \(serializationDuration)s + [Result]: \(result) + """ } } @@ -158,27 +134,22 @@ extension DataResponse { /// /// - returns: A `DataResponse` whose result wraps the value returned by the given closure. If this instance's /// result is a failure, returns a response wrapping the same failure. - public func map(_ transform: (Value) -> T) -> DataResponse { - var response = DataResponse( - request: request, - response: self.response, - data: data, - result: result.map(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response + public func map(_ transform: (Success) -> NewSuccess) -> DataResponse { + return DataResponse(request: request, + response: response, + data: data, + metrics: metrics, + serializationDuration: serializationDuration, + result: result.map(transform)) } /// Evaluates the given closure when the result of this `DataResponse` is a success, passing the unwrapped result /// value as a parameter. /// - /// Use the `flatMap` method with a closure that may throw an error. For example: + /// Use the `tryMap` method with a closure that may throw an error. For example: /// /// let possibleData: DataResponse = ... - /// let possibleObject = possibleData.flatMap { + /// let possibleObject = possibleData.tryMap { /// try JSONSerialization.jsonObject(with: $0) /// } /// @@ -186,18 +157,13 @@ extension DataResponse { /// /// - returns: A success or failure `DataResponse` depending on the result of the given closure. If this instance's /// result is a failure, returns the same failure. - public func flatMap(_ transform: (Value) throws -> T) -> DataResponse { - var response = DataResponse( - request: request, - response: self.response, - data: data, - result: result.flatMap(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response + public func tryMap(_ transform: (Success) throws -> NewSuccess) -> DataResponse { + return DataResponse(request: request, + response: response, + data: data, + metrics: metrics, + serializationDuration: serializationDuration, + result: result.tryMap(transform)) } /// Evaluates the specified closure when the `DataResponse` is a failure, passing the unwrapped error as a parameter. @@ -208,166 +174,95 @@ extension DataResponse { /// let withMyError = possibleData.mapError { MyError.error($0) } /// /// - Parameter transform: A closure that takes the error of the instance. + /// /// - Returns: A `DataResponse` instance containing the result of the transform. - public func mapError(_ transform: (Error) -> E) -> DataResponse { - var response = DataResponse( - request: request, - response: self.response, - data: data, - result: result.mapError(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response + public func mapError(_ transform: (Failure) -> NewFailure) -> DataResponse { + return DataResponse(request: request, + response: response, + data: data, + metrics: metrics, + serializationDuration: serializationDuration, + result: result.mapError(transform)) } /// Evaluates the specified closure when the `DataResponse` is a failure, passing the unwrapped error as a parameter. /// - /// Use the `flatMapError` function with a closure that may throw an error. For example: + /// Use the `tryMapError` function with a closure that may throw an error. For example: /// /// let possibleData: DataResponse = ... - /// let possibleObject = possibleData.flatMapError { + /// let possibleObject = possibleData.tryMapError { /// try someFailableFunction(taking: $0) /// } /// /// - Parameter transform: A throwing closure that takes the error of the instance. /// /// - Returns: A `DataResponse` instance containing the result of the transform. - public func flatMapError(_ transform: (Error) throws -> E) -> DataResponse { - var response = DataResponse( - request: request, - response: self.response, - data: data, - result: result.flatMapError(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response + public func tryMapError(_ transform: (Failure) throws -> NewFailure) -> DataResponse { + return DataResponse(request: request, + response: response, + data: data, + metrics: metrics, + serializationDuration: serializationDuration, + result: result.tryMapError(transform)) } } // MARK: - -/// Used to store all data associated with an non-serialized response of a download request. -public struct DefaultDownloadResponse { +/// Used to store all data associated with a serialized response of a download request. +public struct DownloadResponse { /// The URL request sent to the server. public let request: URLRequest? /// The server's response to the URL request. public let response: HTTPURLResponse? - /// The temporary destination URL of the data returned from the server. - public let temporaryURL: URL? - - /// The final destination URL of the data returned from the server if it was moved. - public let destinationURL: URL? + /// The final destination URL of the data returned from the server after it is moved. + public let fileURL: URL? /// The resume data generated if the request was cancelled. public let resumeData: Data? - /// The error encountered while executing or validating the request. - public let error: Error? + /// The final metrics of the response. + public let metrics: URLSessionTaskMetrics? - /// The timeline of the complete lifecycle of the request. - public let timeline: Timeline - - var _metrics: AnyObject? - - /// Creates a `DefaultDownloadResponse` instance from the specified parameters. - /// - /// - Parameters: - /// - request: The URL request sent to the server. - /// - response: The server's response to the URL request. - /// - temporaryURL: The temporary destination URL of the data returned from the server. - /// - destinationURL: The final destination URL of the data returned from the server if it was moved. - /// - resumeData: The resume data generated if the request was cancelled. - /// - error: The error encountered while executing or validating the request. - /// - timeline: The timeline of the complete lifecycle of the request. `Timeline()` by default. - /// - metrics: The task metrics containing the request / response statistics. `nil` by default. - public init( - request: URLRequest?, - response: HTTPURLResponse?, - temporaryURL: URL?, - destinationURL: URL?, - resumeData: Data?, - error: Error?, - timeline: Timeline = Timeline(), - metrics: AnyObject? = nil) - { - self.request = request - self.response = response - self.temporaryURL = temporaryURL - self.destinationURL = destinationURL - self.resumeData = resumeData - self.error = error - self.timeline = timeline - } -} - -// MARK: - - -/// Used to store all data associated with a serialized response of a download request. -public struct DownloadResponse { - /// The URL request sent to the server. - public let request: URLRequest? - - /// The server's response to the URL request. - public let response: HTTPURLResponse? - - /// The temporary destination URL of the data returned from the server. - public let temporaryURL: URL? - - /// The final destination URL of the data returned from the server if it was moved. - public let destinationURL: URL? - - /// The resume data generated if the request was cancelled. - public let resumeData: Data? + /// The time taken to serialize the response. + public let serializationDuration: TimeInterval /// The result of response serialization. - public let result: Result - - /// The timeline of the complete lifecycle of the request. - public let timeline: Timeline + public let result: Result /// Returns the associated value of the result if it is a success, `nil` otherwise. - public var value: Value? { return result.value } + public var value: Success? { return result.success } /// Returns the associated error value if the result if it is a failure, `nil` otherwise. - public var error: Error? { return result.error } - - var _metrics: AnyObject? + public var error: Failure? { return result.failure } /// Creates a `DownloadResponse` instance with the specified parameters derived from response serialization. /// - /// - parameter request: The URL request sent to the server. - /// - parameter response: The server's response to the URL request. - /// - parameter temporaryURL: The temporary destination URL of the data returned from the server. - /// - parameter destinationURL: The final destination URL of the data returned from the server if it was moved. - /// - parameter resumeData: The resume data generated if the request was cancelled. - /// - parameter result: The result of response serialization. - /// - parameter timeline: The timeline of the complete lifecycle of the `Request`. Defaults to `Timeline()`. - /// - /// - returns: The new `DownloadResponse` instance. - public init( - request: URLRequest?, - response: HTTPURLResponse?, - temporaryURL: URL?, - destinationURL: URL?, - resumeData: Data?, - result: Result, - timeline: Timeline = Timeline()) - { + /// - Parameters: + /// - request: The `URLRequest` sent to the server. + /// - response: The `HTTPURLResponse` from the server. + /// - temporaryURL: The temporary destination `URL` of the data returned from the server. + /// - destinationURL: The final destination `URL` of the data returned from the server, if it was moved. + /// - resumeData: The resume `Data` generated if the request was cancelled. + /// - metrics: The `URLSessionTaskMetrics` of the `DownloadRequest`. + /// - serializationDuration: The duration taken by serialization. + /// - result: The `Result` of response serialization. + public init(request: URLRequest?, + response: HTTPURLResponse?, + fileURL: URL?, + resumeData: Data?, + metrics: URLSessionTaskMetrics?, + serializationDuration: TimeInterval, + result: Result) { self.request = request self.response = response - self.temporaryURL = temporaryURL - self.destinationURL = destinationURL + self.fileURL = fileURL self.resumeData = resumeData + self.metrics = metrics + self.serializationDuration = serializationDuration self.result = result - self.timeline = timeline } } @@ -377,24 +272,37 @@ extension DownloadResponse: CustomStringConvertible, CustomDebugStringConvertibl /// The textual representation used when written to an output stream, which includes whether the result was a /// success or failure. public var description: String { - return result.debugDescription + return "\(result)" } /// The debug textual representation used when written to an output stream, which includes the URL request, the URL - /// response, the temporary and destination URLs, the resume data, the response serialization result and the - /// timeline. + /// response, the temporary and destination URLs, the resume data, the durations of the network and serialization + /// actions, and the response serialization result. public var debugDescription: String { - var output: [String] = [] - - output.append(request != nil ? "[Request]: \(request!.httpMethod ?? "GET") \(request!)" : "[Request]: nil") - output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") - output.append("[TemporaryURL]: \(temporaryURL?.path ?? "nil")") - output.append("[DestinationURL]: \(destinationURL?.path ?? "nil")") - output.append("[ResumeData]: \(resumeData?.count ?? 0) bytes") - output.append("[Result]: \(result.debugDescription)") - output.append("[Timeline]: \(timeline.debugDescription)") - - return output.joined(separator: "\n") + let requestDescription = request.map { "\($0.httpMethod!) \($0)" } ?? "nil" + let requestBody = request?.httpBody.map { String(decoding: $0, as: UTF8.self) } ?? "None" + let responseDescription = response.map { response in + let sortedHeaders = response.headers.sorted() + + return """ + [Status Code]: \(response.statusCode) + [Headers]: + \(sortedHeaders) + """ + } ?? "nil" + let metricsDescription = metrics.map { "\($0.taskInterval.duration)s" } ?? "None" + let resumeDataDescription = resumeData.map { "\($0)" } ?? "None" + + return """ + [Request]: \(requestDescription) + [Request Body]: \n\(requestBody) + [Response]: \n\(responseDescription) + [File URL]: \(fileURL?.path ?? "nil") + [ResumeData]: \(resumeDataDescription) + [Network Duration]: \(metricsDescription) + [Serialization Duration]: \(serializationDuration)s + [Result]: \(result) + """ } } @@ -413,29 +321,23 @@ extension DownloadResponse { /// /// - returns: A `DownloadResponse` whose result wraps the value returned by the given closure. If this instance's /// result is a failure, returns a response wrapping the same failure. - public func map(_ transform: (Value) -> T) -> DownloadResponse { - var response = DownloadResponse( - request: request, - response: self.response, - temporaryURL: temporaryURL, - destinationURL: destinationURL, - resumeData: resumeData, - result: result.map(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response + public func map(_ transform: (Success) -> NewSuccess) -> DownloadResponse { + return DownloadResponse(request: request, + response: response, + fileURL: fileURL, + resumeData: resumeData, + metrics: metrics, + serializationDuration: serializationDuration, + result: result.map(transform)) } /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped /// result value as a parameter. /// - /// Use the `flatMap` method with a closure that may throw an error. For example: + /// Use the `tryMap` method with a closure that may throw an error. For example: /// /// let possibleData: DownloadResponse = ... - /// let possibleObject = possibleData.flatMap { + /// let possibleObject = possibleData.tryMap { /// try JSONSerialization.jsonObject(with: $0) /// } /// @@ -443,20 +345,14 @@ extension DownloadResponse { /// /// - returns: A success or failure `DownloadResponse` depending on the result of the given closure. If this /// instance's result is a failure, returns the same failure. - public func flatMap(_ transform: (Value) throws -> T) -> DownloadResponse { - var response = DownloadResponse( - request: request, - response: self.response, - temporaryURL: temporaryURL, - destinationURL: destinationURL, - resumeData: resumeData, - result: result.flatMap(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response + public func tryMap(_ transform: (Success) throws -> NewSuccess) -> DownloadResponse { + return DownloadResponse(request: request, + response: response, + fileURL: fileURL, + resumeData: resumeData, + metrics: metrics, + serializationDuration: serializationDuration, + result: result.tryMap(transform)) } /// Evaluates the specified closure when the `DownloadResponse` is a failure, passing the unwrapped error as a parameter. @@ -467,101 +363,37 @@ extension DownloadResponse { /// let withMyError = possibleData.mapError { MyError.error($0) } /// /// - Parameter transform: A closure that takes the error of the instance. + /// /// - Returns: A `DownloadResponse` instance containing the result of the transform. - public func mapError(_ transform: (Error) -> E) -> DownloadResponse { - var response = DownloadResponse( - request: request, - response: self.response, - temporaryURL: temporaryURL, - destinationURL: destinationURL, - resumeData: resumeData, - result: result.mapError(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response + public func mapError(_ transform: (Failure) -> NewFailure) -> DownloadResponse { + return DownloadResponse(request: request, + response: response, + fileURL: fileURL, + resumeData: resumeData, + metrics: metrics, + serializationDuration: serializationDuration, + result: result.mapError(transform)) } /// Evaluates the specified closure when the `DownloadResponse` is a failure, passing the unwrapped error as a parameter. /// - /// Use the `flatMapError` function with a closure that may throw an error. For example: + /// Use the `tryMapError` function with a closure that may throw an error. For example: /// /// let possibleData: DownloadResponse = ... - /// let possibleObject = possibleData.flatMapError { + /// let possibleObject = possibleData.tryMapError { /// try someFailableFunction(taking: $0) /// } /// /// - Parameter transform: A throwing closure that takes the error of the instance. /// /// - Returns: A `DownloadResponse` instance containing the result of the transform. - public func flatMapError(_ transform: (Error) throws -> E) -> DownloadResponse { - var response = DownloadResponse( - request: request, - response: self.response, - temporaryURL: temporaryURL, - destinationURL: destinationURL, - resumeData: resumeData, - result: result.flatMapError(transform), - timeline: timeline - ) - - response._metrics = _metrics - - return response - } -} - -// MARK: - - -protocol Response { - /// The task metrics containing the request / response statistics. - var _metrics: AnyObject? { get set } - mutating func add(_ metrics: AnyObject?) -} - -extension Response { - mutating func add(_ metrics: AnyObject?) { - #if !os(watchOS) - guard #available(iOS 10.0, macOS 10.12, tvOS 10.0, *) else { return } - guard let metrics = metrics as? URLSessionTaskMetrics else { return } - - _metrics = metrics - #endif + public func tryMapError(_ transform: (Failure) throws -> NewFailure) -> DownloadResponse { + return DownloadResponse(request: request, + response: response, + fileURL: fileURL, + resumeData: resumeData, + metrics: metrics, + serializationDuration: serializationDuration, + result: result.tryMapError(transform)) } } - -// MARK: - - -@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) -extension DefaultDataResponse: Response { -#if !os(watchOS) - /// The task metrics containing the request / response statistics. - public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } -#endif -} - -@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) -extension DataResponse: Response { -#if !os(watchOS) - /// The task metrics containing the request / response statistics. - public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } -#endif -} - -@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) -extension DefaultDownloadResponse: Response { -#if !os(watchOS) - /// The task metrics containing the request / response statistics. - public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } -#endif -} - -@available(iOS 10.0, macOS 10.12, tvOS 10.0, *) -extension DownloadResponse: Response { -#if !os(watchOS) - /// The task metrics containing the request / response statistics. - public var metrics: URLSessionTaskMetrics? { return _metrics as? URLSessionTaskMetrics } -#endif -} diff --git a/Example/Pods/Alamofire/Source/ResponseSerialization.swift b/Example/Pods/Alamofire/Source/ResponseSerialization.swift index 9cc105a..fd235f2 100644 --- a/Example/Pods/Alamofire/Source/ResponseSerialization.swift +++ b/Example/Pods/Alamofire/Source/ResponseSerialization.swift @@ -1,7 +1,7 @@ // // ResponseSerialization.swift // -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -24,80 +24,144 @@ import Foundation -/// The type in which all data response serializers must conform to in order to serialize a response. +// MARK: Protocols + +/// The type to which all data response serializers must conform in order to serialize a response. public protocol DataResponseSerializerProtocol { - /// The type of serialized object to be created by this `DataResponseSerializerType`. + /// The type of serialized object to be created. associatedtype SerializedObject - /// A closure used by response handlers that takes a request, response, data and error and returns a result. - var serializeResponse: (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result { get } + /// Serialize the response `Data` into the provided type.. + /// + /// - Parameters: + /// - request: `URLRequest` which was used to perform the request, if any. + /// - response: `HTTPURLResponse` received from the server, if any. + /// - data: `Data` returned from the server, if any. + /// - error: `Error` produced by Alamofire or the underlying `URLSession` during the request. + /// + /// - Returns: The `SerializedObject`. + /// - Throws: Any `Error` produced during serialization. + func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> SerializedObject } -// MARK: - - -/// A generic `DataResponseSerializerType` used to serialize a request, response, and data into a serialized object. -public struct DataResponseSerializer: DataResponseSerializerProtocol { - /// The type of serialized object to be created by this `DataResponseSerializer`. - public typealias SerializedObject = Value - - /// A closure used by response handlers that takes a request, response, data and error and returns a result. - public var serializeResponse: (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result +/// The type to which all download response serializers must conform in order to serialize a response. +public protocol DownloadResponseSerializerProtocol { + /// The type of serialized object to be created. + associatedtype SerializedObject - /// Initializes the `ResponseSerializer` instance with the given serialize response closure. + /// Serialize the downloaded response `Data` from disk into the provided type.. /// - /// - parameter serializeResponse: The closure used to serialize the response. + /// - Parameters: + /// - request: `URLRequest` which was used to perform the request, if any. + /// - response: `HTTPURLResponse` received from the server, if any. + /// - fileURL: File `URL` to which the response data was downloaded. + /// - error: `Error` produced by Alamofire or the underlying `URLSession` during the request. /// - /// - returns: The new generic response serializer instance. - public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result) { - self.serializeResponse = serializeResponse - } + /// - Returns: The `SerializedObject`. + /// - Throws: Any `Error` produced during serialization. + func serializeDownload(request: URLRequest?, response: HTTPURLResponse?, fileURL: URL?, error: Error?) throws -> SerializedObject } -// MARK: - +/// A serializer that can handle both data and download responses. +public protocol ResponseSerializer: DataResponseSerializerProtocol & DownloadResponseSerializerProtocol { + /// `DataPreprocessor` used to prepare incoming `Data` for serialization. + var dataPreprocessor: DataPreprocessor { get } + /// `HTTPMethod`s for which empty response bodies are considered appropriate. + var emptyRequestMethods: Set { get } + /// HTTP response codes for which empty response bodies are considered appropriate. + var emptyResponseCodes: Set { get } +} -/// The type in which all download response serializers must conform to in order to serialize a response. -public protocol DownloadResponseSerializerProtocol { - /// The type of serialized object to be created by this `DownloadResponseSerializerType`. - associatedtype SerializedObject +/// Type used to preprocess `Data` before it handled by a serializer. +public protocol DataPreprocessor { + /// Process `Data` before it's handled by a serializer. + /// - Parameter data: The raw `Data` to process. + func preprocess(_ data: Data) throws -> Data +} + +/// `DataPreprocessor` that returns passed `Data` without any transform. +public struct PassthroughPreprocessor: DataPreprocessor { + public init() {} + + public func preprocess(_ data: Data) throws -> Data { return data } +} + +/// `DataPreprocessor` that trims Google's typical `)]}',\n` XSSI JSON header. +public struct GoogleXSSIPreprocessor: DataPreprocessor { + public init() {} - /// A closure used by response handlers that takes a request, response, url and error and returns a result. - var serializeResponse: (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result { get } + public func preprocess(_ data: Data) throws -> Data { + return (data.prefix(6) == Data(")]}',\n".utf8)) ? data.dropFirst(6) : data + } } -// MARK: - +extension ResponseSerializer { + /// Default `DataPreprocessor`. `PassthroughPreprocessor` by default. + public static var defaultDataPreprocessor: DataPreprocessor { return PassthroughPreprocessor() } + /// Default `HTTPMethod`s for which empty response bodies are considered appropriate. `[.head]` by default. + public static var defaultEmptyRequestMethods: Set { return [.head] } + /// HTTP response codes for which empty response bodies are considered appropriate. `[204, 205]` by default. + public static var defaultEmptyResponseCodes: Set { return [204, 205] } + + public var dataPreprocessor: DataPreprocessor { return Self.defaultDataPreprocessor } + public var emptyRequestMethods: Set { return Self.defaultEmptyRequestMethods } + public var emptyResponseCodes: Set { return Self.defaultEmptyResponseCodes } -/// A generic `DownloadResponseSerializerType` used to serialize a request, response, and data into a serialized object. -public struct DownloadResponseSerializer: DownloadResponseSerializerProtocol { - /// The type of serialized object to be created by this `DownloadResponseSerializer`. - public typealias SerializedObject = Value + /// Determines whether the `request` allows empty response bodies, if `request` exists. + /// + /// - Parameter request: `URLRequest` to evaluate. + /// + /// - Returns: `Bool` representing the outcome of the evaluation, or `nil` if `request` was `nil`. + public func requestAllowsEmptyResponseData(_ request: URLRequest?) -> Bool? { + return request.flatMap { $0.httpMethod } + .flatMap(HTTPMethod.init) + .map { emptyRequestMethods.contains($0) } + } - /// A closure used by response handlers that takes a request, response, url and error and returns a result. - public var serializeResponse: (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result + /// Determines whether the `response` allows empty response bodies, if `response` exists`. + /// + /// - Parameter response: `HTTPURLResponse` to evaluate. + /// + /// - Returns: `Bool` representing the outcome of the evaluation, or `nil` if `response` was `nil`. + public func responseAllowsEmptyResponseData(_ response: HTTPURLResponse?) -> Bool? { + return response.flatMap { $0.statusCode } + .map { emptyResponseCodes.contains($0) } + } - /// Initializes the `ResponseSerializer` instance with the given serialize response closure. + /// Determines whether `request` and `response` allow empty response bodies. /// - /// - parameter serializeResponse: The closure used to serialize the response. + /// - Parameters: + /// - request: `URLRequest` to evaluate. + /// - response: `HTTPURLResponse` to evaluate. /// - /// - returns: The new generic response serializer instance. - public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result) { - self.serializeResponse = serializeResponse + /// - Returns: `true` if `request` or `response` allow empty bodies, `false` otherwise. + public func emptyResponseAllowed(forRequest request: URLRequest?, response: HTTPURLResponse?) -> Bool { + return (requestAllowsEmptyResponseData(request) == true) || (responseAllowsEmptyResponseData(response) == true) } } -// MARK: - Timeline +/// By default, any serializer declared to conform to both types will get file serialization for free, as it just feeds +/// the data read from disk into the data response serializer. +public extension DownloadResponseSerializerProtocol where Self: DataResponseSerializerProtocol { + func serializeDownload(request: URLRequest?, response: HTTPURLResponse?, fileURL: URL?, error: Error?) throws -> Self.SerializedObject { + guard error == nil else { throw error! } -extension Request { - var timeline: Timeline { - let requestStartTime = self.startTime ?? CFAbsoluteTimeGetCurrent() - let requestCompletedTime = self.endTime ?? CFAbsoluteTimeGetCurrent() - let initialResponseTime = self.delegate.initialResponseTime ?? requestCompletedTime + guard let fileURL = fileURL else { + throw AFError.responseSerializationFailed(reason: .inputFileNil) + } + + let data: Data + do { + data = try Data(contentsOf: fileURL) + } catch { + throw AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL)) + } - return Timeline( - requestStartTime: requestStartTime, - initialResponseTime: initialResponseTime, - requestCompletedTime: requestCompletedTime, - serializationCompletedTime: CFAbsoluteTimeGetCurrent() - ) + do { + return try serialize(request: request, response: response, data: data, error: error) + } catch { + throw error + } } } @@ -106,25 +170,29 @@ extension Request { extension DataRequest { /// Adds a handler to be called once the request has finished. /// - /// - parameter queue: The queue on which the completion handler is dispatched. - /// - parameter completionHandler: The code to be executed once the request has finished. + /// - Parameters: + /// - queue: The queue on which the completion handler is dispatched. `.main` by default. + /// - completionHandler: The code to be executed once the request has finished. /// - /// - returns: The request. + /// - Returns: The request. @discardableResult - public func response(queue: DispatchQueue? = nil, completionHandler: @escaping (DefaultDataResponse) -> Void) -> Self { - delegate.queue.addOperation { - (queue ?? DispatchQueue.main).async { - var dataResponse = DefaultDataResponse( - request: self.request, - response: self.response, - data: self.delegate.data, - error: self.delegate.error, - timeline: self.timeline - ) - - dataResponse.add(self.delegate.metrics) - - completionHandler(dataResponse) + public func response(queue: DispatchQueue = .main, completionHandler: @escaping (AFDataResponse) -> Void) -> Self { + appendResponseSerializer { + // Start work that should be on the serialization queue. + let result = AFResult(value: self.data, error: self.error) + // End work that should be on the serialization queue. + + self.underlyingQueue.async { + let response = DataResponse(request: self.request, + response: self.response, + data: self.data, + metrics: self.metrics, + serializationDuration: 0, + result: result) + + self.eventMonitor?.request(self, didParseResponse: response) + + self.responseSerializerDidComplete { queue.async { completionHandler(response) } } } } @@ -133,38 +201,77 @@ extension DataRequest { /// Adds a handler to be called once the request has finished. /// - /// - parameter queue: The queue on which the completion handler is dispatched. - /// - parameter responseSerializer: The response serializer responsible for serializing the request, response, - /// and data. - /// - parameter completionHandler: The code to be executed once the request has finished. + /// - Parameters: + /// - queue: The queue on which the completion handler is dispatched. `.main` by default + /// - responseSerializer: The response serializer responsible for serializing the request, response, and data. + /// - completionHandler: The code to be executed once the request has finished. /// - /// - returns: The request. + /// - Returns: The request. @discardableResult - public func response( - queue: DispatchQueue? = nil, - responseSerializer: T, - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - delegate.queue.addOperation { - let result = responseSerializer.serializeResponse( - self.request, - self.response, - self.delegate.data, - self.delegate.error - ) - - var dataResponse = DataResponse( - request: self.request, - response: self.response, - data: self.delegate.data, - result: result, - timeline: self.timeline - ) - - dataResponse.add(self.delegate.metrics) - - (queue ?? DispatchQueue.main).async { completionHandler(dataResponse) } + public func response(queue: DispatchQueue = .main, + responseSerializer: Serializer, + completionHandler: @escaping (AFDataResponse) -> Void) + -> Self { + appendResponseSerializer { + // Start work that should be on the serialization queue. + let start = CFAbsoluteTimeGetCurrent() + let result: AFResult = Result { + try responseSerializer.serialize(request: self.request, + response: self.response, + data: self.data, + error: self.error) + }.mapError { error in + error.asAFError(or: .responseSerializationFailed(reason: .customSerializationFailed(error: error))) + } + + let end = CFAbsoluteTimeGetCurrent() + // End work that should be on the serialization queue. + + self.underlyingQueue.async { + let response = DataResponse(request: self.request, + response: self.response, + data: self.data, + metrics: self.metrics, + serializationDuration: end - start, + result: result) + + self.eventMonitor?.request(self, didParseResponse: response) + + guard let serializerError = result.failure, let delegate = self.delegate else { + self.responseSerializerDidComplete { queue.async { completionHandler(response) } } + return + } + + delegate.retryResult(for: self, dueTo: serializerError) { retryResult in + var didComplete: (() -> Void)? + + defer { + if let didComplete = didComplete { + self.responseSerializerDidComplete { queue.async { didComplete() } } + } + } + + switch retryResult { + case .doNotRetry: + didComplete = { completionHandler(response) } + + case let .doNotRetryWithError(retryError): + let result: AFResult = .failure(retryError.asAFError(orFailWith: "Received retryError was not already AFError")) + + let response = DataResponse(request: self.request, + response: self.response, + data: self.data, + metrics: self.metrics, + serializationDuration: end - start, + result: result) + + didComplete = { completionHandler(response) } + + case .retry, .retryWithDelay: + delegate.retryRequest(self, withDelay: retryResult.delay) + } + } + } } return self @@ -174,31 +281,32 @@ extension DataRequest { extension DownloadRequest { /// Adds a handler to be called once the request has finished. /// - /// - parameter queue: The queue on which the completion handler is dispatched. - /// - parameter completionHandler: The code to be executed once the request has finished. + /// - Parameters: + /// - queue: The queue on which the completion handler is dispatched. `.main` by default. + /// - completionHandler: The code to be executed once the request has finished. /// - /// - returns: The request. + /// - Returns: The request. @discardableResult - public func response( - queue: DispatchQueue? = nil, - completionHandler: @escaping (DefaultDownloadResponse) -> Void) - -> Self - { - delegate.queue.addOperation { - (queue ?? DispatchQueue.main).async { - var downloadResponse = DefaultDownloadResponse( - request: self.request, - response: self.response, - temporaryURL: self.downloadDelegate.temporaryURL, - destinationURL: self.downloadDelegate.destinationURL, - resumeData: self.downloadDelegate.resumeData, - error: self.downloadDelegate.error, - timeline: self.timeline - ) - - downloadResponse.add(self.delegate.metrics) - - completionHandler(downloadResponse) + public func response(queue: DispatchQueue = .main, + completionHandler: @escaping (AFDownloadResponse) -> Void) + -> Self { + appendResponseSerializer { + // Start work that should be on the serialization queue. + let result = AFResult(value: self.fileURL, error: self.error) + // End work that should be on the serialization queue. + + self.underlyingQueue.async { + let response = DownloadResponse(request: self.request, + response: self.response, + fileURL: self.fileURL, + resumeData: self.resumeData, + metrics: self.metrics, + serializationDuration: 0, + result: result) + + self.eventMonitor?.request(self, didParseResponse: response) + + self.responseSerializerDidComplete { queue.async { completionHandler(response) } } } } @@ -207,40 +315,79 @@ extension DownloadRequest { /// Adds a handler to be called once the request has finished. /// - /// - parameter queue: The queue on which the completion handler is dispatched. - /// - parameter responseSerializer: The response serializer responsible for serializing the request, response, - /// and data contained in the destination url. - /// - parameter completionHandler: The code to be executed once the request has finished. + /// - Parameters: + /// - queue: The queue on which the completion handler is dispatched. `.main` by default. + /// - responseSerializer: The response serializer responsible for serializing the request, response, and data + /// contained in the destination `URL`. + /// - completionHandler: The code to be executed once the request has finished. /// - /// - returns: The request. + /// - Returns: The request. @discardableResult - public func response( - queue: DispatchQueue? = nil, - responseSerializer: T, - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - delegate.queue.addOperation { - let result = responseSerializer.serializeResponse( - self.request, - self.response, - self.downloadDelegate.fileURL, - self.downloadDelegate.error - ) - - var downloadResponse = DownloadResponse( - request: self.request, - response: self.response, - temporaryURL: self.downloadDelegate.temporaryURL, - destinationURL: self.downloadDelegate.destinationURL, - resumeData: self.downloadDelegate.resumeData, - result: result, - timeline: self.timeline - ) - - downloadResponse.add(self.delegate.metrics) - - (queue ?? DispatchQueue.main).async { completionHandler(downloadResponse) } + public func response(queue: DispatchQueue = .main, + responseSerializer: T, + completionHandler: @escaping (AFDownloadResponse) -> Void) + -> Self { + appendResponseSerializer { + // Start work that should be on the serialization queue. + let start = CFAbsoluteTimeGetCurrent() + let result: AFResult = Result { + try responseSerializer.serializeDownload(request: self.request, + response: self.response, + fileURL: self.fileURL, + error: self.error) + }.mapError { error in + error.asAFError(or: .responseSerializationFailed(reason: .customSerializationFailed(error: error))) + } + let end = CFAbsoluteTimeGetCurrent() + // End work that should be on the serialization queue. + + self.underlyingQueue.async { + let response = DownloadResponse(request: self.request, + response: self.response, + fileURL: self.fileURL, + resumeData: self.resumeData, + metrics: self.metrics, + serializationDuration: end - start, + result: result) + + self.eventMonitor?.request(self, didParseResponse: response) + + guard let serializerError = result.failure, let delegate = self.delegate else { + self.responseSerializerDidComplete { queue.async { completionHandler(response) } } + return + } + + delegate.retryResult(for: self, dueTo: serializerError) { retryResult in + var didComplete: (() -> Void)? + + defer { + if let didComplete = didComplete { + self.responseSerializerDidComplete { queue.async { didComplete() } } + } + } + + switch retryResult { + case .doNotRetry: + didComplete = { completionHandler(response) } + + case let .doNotRetryWithError(retryError): + let result: AFResult = .failure(retryError.asAFError(orFailWith: "Received retryError was not already AFError")) + + let response = DownloadResponse(request: self.request, + response: self.response, + fileURL: self.fileURL, + resumeData: self.resumeData, + metrics: self.metrics, + serializationDuration: end - start, + result: result) + + didComplete = { completionHandler(response) } + + case .retry, .retryWithDelay: + delegate.retryRequest(self, withDelay: retryResult.delay) + } + } + } } return self @@ -249,467 +396,384 @@ extension DownloadRequest { // MARK: - Data -extension Request { - /// Returns a result data type that contains the response data as-is. - /// - /// - parameter response: The response from the server. - /// - parameter data: The data returned from the server. - /// - parameter error: The error already encountered if it exists. - /// - /// - returns: The result data type. - public static func serializeResponseData(response: HTTPURLResponse?, data: Data?, error: Error?) -> Result { - guard error == nil else { return .failure(error!) } - - if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(Data()) } - - guard let validData = data else { - return .failure(AFError.responseSerializationFailed(reason: .inputDataNil)) - } - - return .success(validData) - } -} - extension DataRequest { - /// Creates a response serializer that returns the associated data as-is. - /// - /// - returns: A data response serializer. - public static func dataResponseSerializer() -> DataResponseSerializer { - return DataResponseSerializer { _, response, data, error in - return Request.serializeResponseData(response: response, data: data, error: error) - } - } - /// Adds a handler to be called once the request has finished. /// - /// - parameter completionHandler: The code to be executed once the request has finished. + /// - Parameters: + /// - queue: The queue on which the completion handler is dispatched. `.main` by default. + /// - completionHandler: The code to be executed once the request has finished. /// - /// - returns: The request. + /// - Returns: The request. @discardableResult - public func responseData( - queue: DispatchQueue? = nil, - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DataRequest.dataResponseSerializer(), - completionHandler: completionHandler - ) + public func responseData(queue: DispatchQueue = .main, + completionHandler: @escaping (AFDataResponse) -> Void) + -> Self { + return response(queue: queue, + responseSerializer: DataResponseSerializer(), + completionHandler: completionHandler) } } -extension DownloadRequest { - /// Creates a response serializer that returns the associated data as-is. - /// - /// - returns: A data response serializer. - public static func dataResponseSerializer() -> DownloadResponseSerializer { - return DownloadResponseSerializer { _, response, fileURL, error in - guard error == nil else { return .failure(error!) } +/// A `ResponseSerializer` that performs minimal response checking and returns any response data as-is. By default, a +/// request returning `nil` or no data is considered an error. However, if the response is has a status code valid for +/// empty responses (`204`, `205`), then an empty `Data` value is returned. +public final class DataResponseSerializer: ResponseSerializer { + public let dataPreprocessor: DataPreprocessor + public let emptyResponseCodes: Set + public let emptyRequestMethods: Set + + /// Creates an instance using the provided values. + /// + /// - Parameters: + /// - dataPreprocessor: `DataPreprocessor` used to prepare the received `Data` for serialization. + /// - emptyResponseCodes: The HTTP response codes for which empty responses are allowed. `[204, 205]` by default. + /// - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default. + public init(dataPreprocessor: DataPreprocessor = DataResponseSerializer.defaultDataPreprocessor, + emptyResponseCodes: Set = DataResponseSerializer.defaultEmptyResponseCodes, + emptyRequestMethods: Set = DataResponseSerializer.defaultEmptyRequestMethods) { + self.dataPreprocessor = dataPreprocessor + self.emptyResponseCodes = emptyResponseCodes + self.emptyRequestMethods = emptyRequestMethods + } - guard let fileURL = fileURL else { - return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) - } + public func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> Data { + guard error == nil else { throw error! } - do { - let data = try Data(contentsOf: fileURL) - return Request.serializeResponseData(response: response, data: data, error: error) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) + guard var data = data, !data.isEmpty else { + guard emptyResponseAllowed(forRequest: request, response: response) else { + throw AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength) } + + return Data() } + + data = try dataPreprocessor.preprocess(data) + + return data } +} +extension DownloadRequest { /// Adds a handler to be called once the request has finished. /// - /// - parameter completionHandler: The code to be executed once the request has finished. + /// - Parameters: + /// - queue: The queue on which the completion handler is dispatched. `.main` by default. + /// - completionHandler: The code to be executed once the request has finished. /// - /// - returns: The request. + /// - Returns: The request. @discardableResult - public func responseData( - queue: DispatchQueue? = nil, - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DownloadRequest.dataResponseSerializer(), - completionHandler: completionHandler - ) + public func responseData(queue: DispatchQueue = .main, + completionHandler: @escaping (AFDownloadResponse) -> Void) + -> Self { + return response(queue: queue, + responseSerializer: DataResponseSerializer(), + completionHandler: completionHandler) } } // MARK: - String -extension Request { - /// Returns a result string type initialized from the response data with the specified string encoding. - /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server - /// response, falling back to the default HTTP default character set, ISO-8859-1. - /// - parameter response: The response from the server. - /// - parameter data: The data returned from the server. - /// - parameter error: The error already encountered if it exists. - /// - /// - returns: The result data type. - public static func serializeResponseString( - encoding: String.Encoding?, - response: HTTPURLResponse?, - data: Data?, - error: Error?) - -> Result - { - guard error == nil else { return .failure(error!) } - - if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success("") } - - guard let validData = data else { - return .failure(AFError.responseSerializationFailed(reason: .inputDataNil)) +/// A `ResponseSerializer` that decodes the response data as a `String`. By default, a request returning `nil` or no +/// data is considered an error. However, if the response is has a status code valid for empty responses (`204`, `205`), +/// then an empty `String` is returned. +public final class StringResponseSerializer: ResponseSerializer { + public let dataPreprocessor: DataPreprocessor + /// Optional string encoding used to validate the response. + public let encoding: String.Encoding? + public let emptyResponseCodes: Set + public let emptyRequestMethods: Set + + /// Creates an instance with the provided values. + /// + /// - Parameters: + /// - dataPreprocessor: `DataPreprocessor` used to prepare the received `Data` for serialization. + /// - encoding: A string encoding. Defaults to `nil`, in which case the encoding will be determined + /// from the server response, falling back to the default HTTP character set, `ISO-8859-1`. + /// - emptyResponseCodes: The HTTP response codes for which empty responses are allowed. `[204, 205]` by default. + /// - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default. + public init(dataPreprocessor: DataPreprocessor = StringResponseSerializer.defaultDataPreprocessor, + encoding: String.Encoding? = nil, + emptyResponseCodes: Set = StringResponseSerializer.defaultEmptyResponseCodes, + emptyRequestMethods: Set = StringResponseSerializer.defaultEmptyRequestMethods) { + self.dataPreprocessor = dataPreprocessor + self.encoding = encoding + self.emptyResponseCodes = emptyResponseCodes + self.emptyRequestMethods = emptyRequestMethods + } + + public func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> String { + guard error == nil else { throw error! } + + guard var data = data, !data.isEmpty else { + guard emptyResponseAllowed(forRequest: request, response: response) else { + throw AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength) + } + + return "" } + data = try dataPreprocessor.preprocess(data) + var convertedEncoding = encoding if let encodingName = response?.textEncodingName as CFString?, convertedEncoding == nil { - convertedEncoding = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding( - CFStringConvertIANACharSetNameToEncoding(encodingName)) - ) + let ianaCharSet = CFStringConvertIANACharSetNameToEncoding(encodingName) + let nsStringEncoding = CFStringConvertEncodingToNSStringEncoding(ianaCharSet) + convertedEncoding = String.Encoding(rawValue: nsStringEncoding) } let actualEncoding = convertedEncoding ?? .isoLatin1 - if let string = String(data: validData, encoding: actualEncoding) { - return .success(string) - } else { - return .failure(AFError.responseSerializationFailed(reason: .stringSerializationFailed(encoding: actualEncoding))) + guard let string = String(data: data, encoding: actualEncoding) else { + throw AFError.responseSerializationFailed(reason: .stringSerializationFailed(encoding: actualEncoding)) } + + return string } } extension DataRequest { - /// Creates a response serializer that returns a result string type initialized from the response data with - /// the specified string encoding. - /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server - /// response, falling back to the default HTTP default character set, ISO-8859-1. - /// - /// - returns: A string response serializer. - public static func stringResponseSerializer(encoding: String.Encoding? = nil) -> DataResponseSerializer { - return DataResponseSerializer { _, response, data, error in - return Request.serializeResponseString(encoding: encoding, response: response, data: data, error: error) - } - } - /// Adds a handler to be called once the request has finished. /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the - /// server response, falling back to the default HTTP default character set, - /// ISO-8859-1. - /// - parameter completionHandler: A closure to be executed once the request has finished. + /// - Parameters: + /// - queue: The queue on which the completion handler is dispatched. `.main` by default. + /// - encoding: The string encoding. Defaults to `nil`, in which case the encoding will be determined from + /// the server response, falling back to the default HTTP character set, `ISO-8859-1`. + /// - completionHandler: A closure to be executed once the request has finished. /// - /// - returns: The request. + /// - Returns: The request. @discardableResult - public func responseString( - queue: DispatchQueue? = nil, - encoding: String.Encoding? = nil, - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DataRequest.stringResponseSerializer(encoding: encoding), - completionHandler: completionHandler - ) + public func responseString(queue: DispatchQueue = .main, + encoding: String.Encoding? = nil, + completionHandler: @escaping (AFDataResponse) -> Void) -> Self { + return response(queue: queue, + responseSerializer: StringResponseSerializer(encoding: encoding), + completionHandler: completionHandler) } } extension DownloadRequest { - /// Creates a response serializer that returns a result string type initialized from the response data with - /// the specified string encoding. - /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the server - /// response, falling back to the default HTTP default character set, ISO-8859-1. - /// - /// - returns: A string response serializer. - public static func stringResponseSerializer(encoding: String.Encoding? = nil) -> DownloadResponseSerializer { - return DownloadResponseSerializer { _, response, fileURL, error in - guard error == nil else { return .failure(error!) } - - guard let fileURL = fileURL else { - return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) - } - - do { - let data = try Data(contentsOf: fileURL) - return Request.serializeResponseString(encoding: encoding, response: response, data: data, error: error) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) - } - } - } - /// Adds a handler to be called once the request has finished. /// - /// - parameter encoding: The string encoding. If `nil`, the string encoding will be determined from the - /// server response, falling back to the default HTTP default character set, - /// ISO-8859-1. - /// - parameter completionHandler: A closure to be executed once the request has finished. + /// - Parameters: + /// - queue: The queue on which the completion handler is dispatched. `.main` by default. + /// - encoding: The string encoding. Defaults to `nil`, in which case the encoding will be determined from + /// the server response, falling back to the default HTTP character set, `ISO-8859-1`. + /// - completionHandler: A closure to be executed once the request has finished. /// - /// - returns: The request. + /// - Returns: The request. @discardableResult - public func responseString( - queue: DispatchQueue? = nil, - encoding: String.Encoding? = nil, - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DownloadRequest.stringResponseSerializer(encoding: encoding), - completionHandler: completionHandler - ) + public func responseString(queue: DispatchQueue = .main, + encoding: String.Encoding? = nil, + completionHandler: @escaping (AFDownloadResponse) -> Void) + -> Self { + return response(queue: queue, + responseSerializer: StringResponseSerializer(encoding: encoding), + completionHandler: completionHandler) } } // MARK: - JSON -extension Request { - /// Returns a JSON object contained in a result type constructed from the response data using `JSONSerialization` - /// with the specified reading options. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - parameter response: The response from the server. - /// - parameter data: The data returned from the server. - /// - parameter error: The error already encountered if it exists. - /// - /// - returns: The result data type. - public static func serializeResponseJSON( - options: JSONSerialization.ReadingOptions, - response: HTTPURLResponse?, - data: Data?, - error: Error?) - -> Result - { - guard error == nil else { return .failure(error!) } - - if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } - - guard let validData = data, validData.count > 0 else { - return .failure(AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)) +/// A `ResponseSerializer` that decodes the response data using `JSONSerialization`. By default, a request returning +/// `nil` or no data is considered an error. However, if the response is has a status code valid for empty responses +/// (`204`, `205`), then an `NSNull` value is returned. +public final class JSONResponseSerializer: ResponseSerializer { + public let dataPreprocessor: DataPreprocessor + public let emptyResponseCodes: Set + public let emptyRequestMethods: Set + /// `JSONSerialization.ReadingOptions` used when serializing a response. + public let options: JSONSerialization.ReadingOptions + + /// Creates an instance with the provided values. + /// + /// - Parameters: + /// - dataPreprocessor: `DataPreprocessor` used to prepare the received `Data` for serialization. + /// - emptyResponseCodes: The HTTP response codes for which empty responses are allowed. `[204, 205]` by default. + /// - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default. + /// - options: The options to use. `.allowFragments` by default. + public init(dataPreprocessor: DataPreprocessor = JSONResponseSerializer.defaultDataPreprocessor, + emptyResponseCodes: Set = JSONResponseSerializer.defaultEmptyResponseCodes, + emptyRequestMethods: Set = JSONResponseSerializer.defaultEmptyRequestMethods, + options: JSONSerialization.ReadingOptions = .allowFragments) { + self.dataPreprocessor = dataPreprocessor + self.emptyResponseCodes = emptyResponseCodes + self.emptyRequestMethods = emptyRequestMethods + self.options = options + } + + public func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> Any { + guard error == nil else { throw error! } + + guard var data = data, !data.isEmpty else { + guard emptyResponseAllowed(forRequest: request, response: response) else { + throw AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength) + } + + return NSNull() } + data = try dataPreprocessor.preprocess(data) + do { - let json = try JSONSerialization.jsonObject(with: validData, options: options) - return .success(json) + return try JSONSerialization.jsonObject(with: data, options: options) } catch { - return .failure(AFError.responseSerializationFailed(reason: .jsonSerializationFailed(error: error))) + throw AFError.responseSerializationFailed(reason: .jsonSerializationFailed(error: error)) } } } extension DataRequest { - /// Creates a response serializer that returns a JSON object result type constructed from the response data using - /// `JSONSerialization` with the specified reading options. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - /// - returns: A JSON object response serializer. - public static func jsonResponseSerializer( - options: JSONSerialization.ReadingOptions = .allowFragments) - -> DataResponseSerializer - { - return DataResponseSerializer { _, response, data, error in - return Request.serializeResponseJSON(options: options, response: response, data: data, error: error) - } - } - /// Adds a handler to be called once the request has finished. /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - parameter completionHandler: A closure to be executed once the request has finished. + /// - Parameters: + /// - queue: The queue on which the completion handler is dispatched. `.main` by default. + /// - options: The JSON serialization reading options. `.allowFragments` by default. + /// - completionHandler: A closure to be executed once the request has finished. /// - /// - returns: The request. + /// - Returns: The request. @discardableResult - public func responseJSON( - queue: DispatchQueue? = nil, - options: JSONSerialization.ReadingOptions = .allowFragments, - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DataRequest.jsonResponseSerializer(options: options), - completionHandler: completionHandler - ) + public func responseJSON(queue: DispatchQueue = .main, + options: JSONSerialization.ReadingOptions = .allowFragments, + completionHandler: @escaping (AFDataResponse) -> Void) -> Self { + return response(queue: queue, + responseSerializer: JSONResponseSerializer(options: options), + completionHandler: completionHandler) } } extension DownloadRequest { - /// Creates a response serializer that returns a JSON object result type constructed from the response data using - /// `JSONSerialization` with the specified reading options. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - /// - returns: A JSON object response serializer. - public static func jsonResponseSerializer( - options: JSONSerialization.ReadingOptions = .allowFragments) - -> DownloadResponseSerializer - { - return DownloadResponseSerializer { _, response, fileURL, error in - guard error == nil else { return .failure(error!) } - - guard let fileURL = fileURL else { - return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) - } - - do { - let data = try Data(contentsOf: fileURL) - return Request.serializeResponseJSON(options: options, response: response, data: data, error: error) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) - } - } - } - /// Adds a handler to be called once the request has finished. /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - parameter completionHandler: A closure to be executed once the request has finished. + /// - Parameters: + /// - queue: The queue on which the completion handler is dispatched. `.main` by default. + /// - options: The JSON serialization reading options. `.allowFragments` by default. + /// - completionHandler: A closure to be executed once the request has finished. /// - /// - returns: The request. + /// - Returns: The request. @discardableResult - public func responseJSON( - queue: DispatchQueue? = nil, - options: JSONSerialization.ReadingOptions = .allowFragments, - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DownloadRequest.jsonResponseSerializer(options: options), - completionHandler: completionHandler - ) + public func responseJSON(queue: DispatchQueue = .main, + options: JSONSerialization.ReadingOptions = .allowFragments, + completionHandler: @escaping (AFDownloadResponse) -> Void) + -> Self { + return response(queue: queue, + responseSerializer: JSONResponseSerializer(options: options), + completionHandler: completionHandler) } } -// MARK: - Property List +// MARK: - Empty -extension Request { - /// Returns a plist object contained in a result type constructed from the response data using - /// `PropertyListSerialization` with the specified reading options. - /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - parameter response: The response from the server. - /// - parameter data: The data returned from the server. - /// - parameter error: The error already encountered if it exists. +/// Protocol representing an empty response. Use `T.emptyValue()` to get an instance. +public protocol EmptyResponse { + /// Empty value for the conforming type. /// - /// - returns: The result data type. - public static func serializeResponsePropertyList( - options: PropertyListSerialization.ReadOptions, - response: HTTPURLResponse?, - data: Data?, - error: Error?) - -> Result - { - guard error == nil else { return .failure(error!) } - - if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(NSNull()) } + /// - Returns: Value of `Self` to use for empty values. + static func emptyValue() -> Self +} - guard let validData = data, validData.count > 0 else { - return .failure(AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)) - } +/// Type representing an empty response. Use `Empty.value` to get the static instance. +public struct Empty: Decodable { + /// Static `Empty` instance used for all `Empty` responses. + public static let value = Empty() +} - do { - let plist = try PropertyListSerialization.propertyList(from: validData, options: options, format: nil) - return .success(plist) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .propertyListSerializationFailed(error: error))) - } +extension Empty: EmptyResponse { + public static func emptyValue() -> Empty { + return value } } -extension DataRequest { - /// Creates a response serializer that returns an object constructed from the response data using - /// `PropertyListSerialization` with the specified reading options. - /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - /// - returns: A property list object response serializer. - public static func propertyListResponseSerializer( - options: PropertyListSerialization.ReadOptions = []) - -> DataResponseSerializer - { - return DataResponseSerializer { _, response, data, error in - return Request.serializeResponsePropertyList(options: options, response: response, data: data, error: error) - } - } +// MARK: - DataDecoder Protocol - /// Adds a handler to be called once the request has finished. +/// Any type which can decode `Data` into a `Decodable` type. +public protocol DataDecoder { + /// Decode `Data` into the provided type. /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - parameter completionHandler: A closure to be executed once the request has finished. + /// - Parameters: + /// - type: The `Type` to be decoded. + /// - data: The `Data` to be decoded. /// - /// - returns: The request. - @discardableResult - public func responsePropertyList( - queue: DispatchQueue? = nil, - options: PropertyListSerialization.ReadOptions = [], - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DataRequest.propertyListResponseSerializer(options: options), - completionHandler: completionHandler - ) - } + /// - Returns: The decoded value of type `D`. + /// - Throws: Any error that occurs during decode. + func decode(_ type: D.Type, from data: Data) throws -> D } -extension DownloadRequest { - /// Creates a response serializer that returns an object constructed from the response data using - /// `PropertyListSerialization` with the specified reading options. - /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - /// - returns: A property list object response serializer. - public static func propertyListResponseSerializer( - options: PropertyListSerialization.ReadOptions = []) - -> DownloadResponseSerializer - { - return DownloadResponseSerializer { _, response, fileURL, error in - guard error == nil else { return .failure(error!) } +/// `JSONDecoder` automatically conforms to `DataDecoder`. +extension JSONDecoder: DataDecoder {} + +// MARK: - Decodable + +/// A `ResponseSerializer` that decodes the response data as a generic value using any type that conforms to +/// `DataDecoder`. By default, this is an instance of `JSONDecoder`. Additionally, a request returning `nil` or no data +/// is considered an error. However, if the response is has a status code valid for empty responses (`204`, `205`), then +/// the `Empty.value` value is returned. +public final class DecodableResponseSerializer: ResponseSerializer { + public let dataPreprocessor: DataPreprocessor + /// The `DataDecoder` instance used to decode responses. + public let decoder: DataDecoder + public let emptyResponseCodes: Set + public let emptyRequestMethods: Set + + /// Creates an instance using the values provided. + /// + /// - Parameters: + /// - dataPreprocessor: `DataPreprocessor` used to prepare the received `Data` for serialization. + /// - decoder: The `DataDecoder`. `JSONDecoder()` by default. + /// - emptyResponseCodes: The HTTP response codes for which empty responses are allowed. `[204, 205]` by default. + /// - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default. + public init(dataPreprocessor: DataPreprocessor = DecodableResponseSerializer.defaultDataPreprocessor, + decoder: DataDecoder = JSONDecoder(), + emptyResponseCodes: Set = DecodableResponseSerializer.defaultEmptyResponseCodes, + emptyRequestMethods: Set = DecodableResponseSerializer.defaultEmptyRequestMethods) { + self.dataPreprocessor = dataPreprocessor + self.decoder = decoder + self.emptyResponseCodes = emptyResponseCodes + self.emptyRequestMethods = emptyRequestMethods + } + + public func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> T { + guard error == nil else { throw error! } - guard let fileURL = fileURL else { - return .failure(AFError.responseSerializationFailed(reason: .inputFileNil)) + guard var data = data, !data.isEmpty else { + guard emptyResponseAllowed(forRequest: request, response: response) else { + throw AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength) } - do { - let data = try Data(contentsOf: fileURL) - return Request.serializeResponsePropertyList(options: options, response: response, data: data, error: error) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL))) + guard let emptyResponseType = T.self as? EmptyResponse.Type, let emptyValue = emptyResponseType.emptyValue() as? T else { + throw AFError.responseSerializationFailed(reason: .invalidEmptyResponse(type: "\(T.self)")) } + + return emptyValue + } + + data = try dataPreprocessor.preprocess(data) + + do { + return try decoder.decode(T.self, from: data) + } catch { + throw AFError.responseSerializationFailed(reason: .decodingFailed(error: error)) } } +} +extension DataRequest { /// Adds a handler to be called once the request has finished. /// - /// - parameter options: The property list reading options. Defaults to `[]`. - /// - parameter completionHandler: A closure to be executed once the request has finished. + /// - Parameters: + /// - type: `Decodable` type to decode from response data. + /// - queue: The queue on which the completion handler is dispatched. `.main` by default. + /// - decoder: `DataDecoder` to use to decode the response. `JSONDecoder()` by default. + /// - completionHandler: A closure to be executed once the request has finished. /// - /// - returns: The request. + /// - Returns: The request. @discardableResult - public func responsePropertyList( - queue: DispatchQueue? = nil, - options: PropertyListSerialization.ReadOptions = [], - completionHandler: @escaping (DownloadResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DownloadRequest.propertyListResponseSerializer(options: options), - completionHandler: completionHandler - ) + public func responseDecodable(of type: T.Type = T.self, + queue: DispatchQueue = .main, + decoder: DataDecoder = JSONDecoder(), + completionHandler: @escaping (AFDataResponse) -> Void) -> Self { + return response(queue: queue, + responseSerializer: DecodableResponseSerializer(decoder: decoder), + completionHandler: completionHandler) } } - -/// A set of HTTP response status code that do not contain response data. -private let emptyDataStatusCodes: Set = [204, 205] diff --git a/Example/Pods/Alamofire/Source/Result.swift b/Example/Pods/Alamofire/Source/Result.swift deleted file mode 100644 index e092808..0000000 --- a/Example/Pods/Alamofire/Source/Result.swift +++ /dev/null @@ -1,300 +0,0 @@ -// -// Result.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. -// - -import Foundation - -/// Used to represent whether a request was successful or encountered an error. -/// -/// - success: The request and all post processing operations were successful resulting in the serialization of the -/// provided associated value. -/// -/// - failure: The request encountered an error resulting in a failure. The associated values are the original data -/// provided by the server as well as the error that caused the failure. -public enum Result { - case success(Value) - case failure(Error) - - /// Returns `true` if the result is a success, `false` otherwise. - public var isSuccess: Bool { - switch self { - case .success: - return true - case .failure: - return false - } - } - - /// Returns `true` if the result is a failure, `false` otherwise. - public var isFailure: Bool { - return !isSuccess - } - - /// Returns the associated value if the result is a success, `nil` otherwise. - public var value: Value? { - switch self { - case .success(let value): - return value - case .failure: - return nil - } - } - - /// Returns the associated error value if the result is a failure, `nil` otherwise. - public var error: Error? { - switch self { - case .success: - return nil - case .failure(let error): - return error - } - } -} - -// MARK: - CustomStringConvertible - -extension Result: CustomStringConvertible { - /// The textual representation used when written to an output stream, which includes whether the result was a - /// success or failure. - public var description: String { - switch self { - case .success: - return "SUCCESS" - case .failure: - return "FAILURE" - } - } -} - -// MARK: - CustomDebugStringConvertible - -extension Result: CustomDebugStringConvertible { - /// The debug textual representation used when written to an output stream, which includes whether the result was a - /// success or failure in addition to the value or error. - public var debugDescription: String { - switch self { - case .success(let value): - return "SUCCESS: \(value)" - case .failure(let error): - return "FAILURE: \(error)" - } - } -} - -// MARK: - Functional APIs - -extension Result { - /// Creates a `Result` instance from the result of a closure. - /// - /// A failure result is created when the closure throws, and a success result is created when the closure - /// succeeds without throwing an error. - /// - /// func someString() throws -> String { ... } - /// - /// let result = Result(value: { - /// return try someString() - /// }) - /// - /// // The type of result is Result - /// - /// The trailing closure syntax is also supported: - /// - /// let result = Result { try someString() } - /// - /// - parameter value: The closure to execute and create the result for. - public init(value: () throws -> Value) { - do { - self = try .success(value()) - } catch { - self = .failure(error) - } - } - - /// Returns the success value, or throws the failure error. - /// - /// let possibleString: Result = .success("success") - /// try print(possibleString.unwrap()) - /// // Prints "success" - /// - /// let noString: Result = .failure(error) - /// try print(noString.unwrap()) - /// // Throws error - public func unwrap() throws -> Value { - switch self { - case .success(let value): - return value - case .failure(let error): - throw error - } - } - - /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter. - /// - /// Use the `map` method with a closure that does not throw. For example: - /// - /// let possibleData: Result = .success(Data()) - /// let possibleInt = possibleData.map { $0.count } - /// try print(possibleInt.unwrap()) - /// // Prints "0" - /// - /// let noData: Result = .failure(error) - /// let noInt = noData.map { $0.count } - /// try print(noInt.unwrap()) - /// // Throws error - /// - /// - parameter transform: A closure that takes the success value of the `Result` instance. - /// - /// - returns: A `Result` containing the result of the given closure. If this instance is a failure, returns the - /// same failure. - public func map(_ transform: (Value) -> T) -> Result { - switch self { - case .success(let value): - return .success(transform(value)) - case .failure(let error): - return .failure(error) - } - } - - /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter. - /// - /// Use the `flatMap` method with a closure that may throw an error. For example: - /// - /// let possibleData: Result = .success(Data(...)) - /// let possibleObject = possibleData.flatMap { - /// try JSONSerialization.jsonObject(with: $0) - /// } - /// - /// - parameter transform: A closure that takes the success value of the instance. - /// - /// - returns: A `Result` containing the result of the given closure. If this instance is a failure, returns the - /// same failure. - public func flatMap(_ transform: (Value) throws -> T) -> Result { - switch self { - case .success(let value): - do { - return try .success(transform(value)) - } catch { - return .failure(error) - } - case .failure(let error): - return .failure(error) - } - } - - /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `mapError` function with a closure that does not throw. For example: - /// - /// let possibleData: Result = .failure(someError) - /// let withMyError: Result = possibleData.mapError { MyError.error($0) } - /// - /// - Parameter transform: A closure that takes the error of the instance. - /// - Returns: A `Result` instance containing the result of the transform. If this instance is a success, returns - /// the same instance. - public func mapError(_ transform: (Error) -> T) -> Result { - switch self { - case .failure(let error): - return .failure(transform(error)) - case .success: - return self - } - } - - /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `flatMapError` function with a closure that may throw an error. For example: - /// - /// let possibleData: Result = .success(Data(...)) - /// let possibleObject = possibleData.flatMapError { - /// try someFailableFunction(taking: $0) - /// } - /// - /// - Parameter transform: A throwing closure that takes the error of the instance. - /// - /// - Returns: A `Result` instance containing the result of the transform. If this instance is a success, returns - /// the same instance. - public func flatMapError(_ transform: (Error) throws -> T) -> Result { - switch self { - case .failure(let error): - do { - return try .failure(transform(error)) - } catch { - return .failure(error) - } - case .success: - return self - } - } - - /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter. - /// - /// Use the `withValue` function to evaluate the passed closure without modifying the `Result` instance. - /// - /// - Parameter closure: A closure that takes the success value of this instance. - /// - Returns: This `Result` instance, unmodified. - @discardableResult - public func withValue(_ closure: (Value) throws -> Void) rethrows -> Result { - if case let .success(value) = self { try closure(value) } - - return self - } - - /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `withError` function to evaluate the passed closure without modifying the `Result` instance. - /// - /// - Parameter closure: A closure that takes the success value of this instance. - /// - Returns: This `Result` instance, unmodified. - @discardableResult - public func withError(_ closure: (Error) throws -> Void) rethrows -> Result { - if case let .failure(error) = self { try closure(error) } - - return self - } - - /// Evaluates the specified closure when the `Result` is a success. - /// - /// Use the `ifSuccess` function to evaluate the passed closure without modifying the `Result` instance. - /// - /// - Parameter closure: A `Void` closure. - /// - Returns: This `Result` instance, unmodified. - @discardableResult - public func ifSuccess(_ closure: () throws -> Void) rethrows -> Result { - if isSuccess { try closure() } - - return self - } - - /// Evaluates the specified closure when the `Result` is a failure. - /// - /// Use the `ifFailure` function to evaluate the passed closure without modifying the `Result` instance. - /// - /// - Parameter closure: A `Void` closure. - /// - Returns: This `Result` instance, unmodified. - @discardableResult - public func ifFailure(_ closure: () throws -> Void) rethrows -> Result { - if isFailure { try closure() } - - return self - } -} diff --git a/Example/Pods/Alamofire/Source/ServerTrustPolicy.swift b/Example/Pods/Alamofire/Source/ServerTrustPolicy.swift deleted file mode 100644 index dea099e..0000000 --- a/Example/Pods/Alamofire/Source/ServerTrustPolicy.swift +++ /dev/null @@ -1,307 +0,0 @@ -// -// ServerTrustPolicy.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. -// - -import Foundation - -/// Responsible for managing the mapping of `ServerTrustPolicy` objects to a given host. -open class ServerTrustPolicyManager { - /// The dictionary of policies mapped to a particular host. - public let policies: [String: ServerTrustPolicy] - - /// Initializes the `ServerTrustPolicyManager` instance with the given policies. - /// - /// Since different servers and web services can have different leaf certificates, intermediate and even root - /// certficates, it is important to have the flexibility to specify evaluation policies on a per host basis. This - /// allows for scenarios such as using default evaluation for host1, certificate pinning for host2, public key - /// pinning for host3 and disabling evaluation for host4. - /// - /// - parameter policies: A dictionary of all policies mapped to a particular host. - /// - /// - returns: The new `ServerTrustPolicyManager` instance. - public init(policies: [String: ServerTrustPolicy]) { - self.policies = policies - } - - /// Returns the `ServerTrustPolicy` for the given host if applicable. - /// - /// By default, this method will return the policy that perfectly matches the given host. Subclasses could override - /// this method and implement more complex mapping implementations such as wildcards. - /// - /// - parameter host: The host to use when searching for a matching policy. - /// - /// - returns: The server trust policy for the given host if found. - open func serverTrustPolicy(forHost host: String) -> ServerTrustPolicy? { - return policies[host] - } -} - -// MARK: - - -extension URLSession { - private struct AssociatedKeys { - static var managerKey = "URLSession.ServerTrustPolicyManager" - } - - var serverTrustPolicyManager: ServerTrustPolicyManager? { - get { - return objc_getAssociatedObject(self, &AssociatedKeys.managerKey) as? ServerTrustPolicyManager - } - set (manager) { - objc_setAssociatedObject(self, &AssociatedKeys.managerKey, manager, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } -} - -// MARK: - ServerTrustPolicy - -/// The `ServerTrustPolicy` evaluates the server trust generally provided by an `NSURLAuthenticationChallenge` when -/// connecting to a server over a secure HTTPS connection. The policy configuration then evaluates the server trust -/// with a given set of criteria to determine whether the server trust is valid and the connection should be made. -/// -/// Using pinned certificates or public keys for evaluation helps prevent man-in-the-middle (MITM) attacks and other -/// vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged -/// to route all communication over an HTTPS connection with pinning enabled. -/// -/// - performDefaultEvaluation: Uses the default server trust evaluation while allowing you to control whether to -/// validate the host provided by the challenge. Applications are encouraged to always -/// validate the host in production environments to guarantee the validity of the server's -/// certificate chain. -/// -/// - performRevokedEvaluation: Uses the default and revoked server trust evaluations allowing you to control whether to -/// validate the host provided by the challenge as well as specify the revocation flags for -/// testing for revoked certificates. Apple platforms did not start testing for revoked -/// certificates automatically until iOS 10.1, macOS 10.12 and tvOS 10.1 which is -/// demonstrated in our TLS tests. Applications are encouraged to always validate the host -/// in production environments to guarantee the validity of the server's certificate chain. -/// -/// - pinCertificates: Uses the pinned certificates to validate the server trust. The server trust is -/// considered valid if one of the pinned certificates match one of the server certificates. -/// By validating both the certificate chain and host, certificate pinning provides a very -/// secure form of server trust validation mitigating most, if not all, MITM attacks. -/// Applications are encouraged to always validate the host and require a valid certificate -/// chain in production environments. -/// -/// - pinPublicKeys: Uses the pinned public keys to validate the server trust. The server trust is considered -/// valid if one of the pinned public keys match one of the server certificate public keys. -/// By validating both the certificate chain and host, public key pinning provides a very -/// secure form of server trust validation mitigating most, if not all, MITM attacks. -/// Applications are encouraged to always validate the host and require a valid certificate -/// chain in production environments. -/// -/// - disableEvaluation: Disables all evaluation which in turn will always consider any server trust as valid. -/// -/// - customEvaluation: Uses the associated closure to evaluate the validity of the server trust. -public enum ServerTrustPolicy { - case performDefaultEvaluation(validateHost: Bool) - case performRevokedEvaluation(validateHost: Bool, revocationFlags: CFOptionFlags) - case pinCertificates(certificates: [SecCertificate], validateCertificateChain: Bool, validateHost: Bool) - case pinPublicKeys(publicKeys: [SecKey], validateCertificateChain: Bool, validateHost: Bool) - case disableEvaluation - case customEvaluation((_ serverTrust: SecTrust, _ host: String) -> Bool) - - // MARK: - Bundle Location - - /// Returns all certificates within the given bundle with a `.cer` file extension. - /// - /// - parameter bundle: The bundle to search for all `.cer` files. - /// - /// - returns: All certificates within the given bundle. - public static func certificates(in bundle: Bundle = Bundle.main) -> [SecCertificate] { - var certificates: [SecCertificate] = [] - - let paths = Set([".cer", ".CER", ".crt", ".CRT", ".der", ".DER"].map { fileExtension in - bundle.paths(forResourcesOfType: fileExtension, inDirectory: nil) - }.joined()) - - for path in paths { - if - let certificateData = try? Data(contentsOf: URL(fileURLWithPath: path)) as CFData, - let certificate = SecCertificateCreateWithData(nil, certificateData) - { - certificates.append(certificate) - } - } - - return certificates - } - - /// Returns all public keys within the given bundle with a `.cer` file extension. - /// - /// - parameter bundle: The bundle to search for all `*.cer` files. - /// - /// - returns: All public keys within the given bundle. - public static func publicKeys(in bundle: Bundle = Bundle.main) -> [SecKey] { - var publicKeys: [SecKey] = [] - - for certificate in certificates(in: bundle) { - if let publicKey = publicKey(for: certificate) { - publicKeys.append(publicKey) - } - } - - return publicKeys - } - - // MARK: - Evaluation - - /// Evaluates whether the server trust is valid for the given host. - /// - /// - parameter serverTrust: The server trust to evaluate. - /// - parameter host: The host of the challenge protection space. - /// - /// - returns: Whether the server trust is valid. - public func evaluate(_ serverTrust: SecTrust, forHost host: String) -> Bool { - var serverTrustIsValid = false - - switch self { - case let .performDefaultEvaluation(validateHost): - let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, policy) - - serverTrustIsValid = trustIsValid(serverTrust) - case let .performRevokedEvaluation(validateHost, revocationFlags): - let defaultPolicy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - let revokedPolicy = SecPolicyCreateRevocation(revocationFlags) - SecTrustSetPolicies(serverTrust, [defaultPolicy, revokedPolicy] as CFTypeRef) - - serverTrustIsValid = trustIsValid(serverTrust) - case let .pinCertificates(pinnedCertificates, validateCertificateChain, validateHost): - if validateCertificateChain { - let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, policy) - - SecTrustSetAnchorCertificates(serverTrust, pinnedCertificates as CFArray) - SecTrustSetAnchorCertificatesOnly(serverTrust, true) - - serverTrustIsValid = trustIsValid(serverTrust) - } else { - let serverCertificatesDataArray = certificateData(for: serverTrust) - let pinnedCertificatesDataArray = certificateData(for: pinnedCertificates) - - outerLoop: for serverCertificateData in serverCertificatesDataArray { - for pinnedCertificateData in pinnedCertificatesDataArray { - if serverCertificateData == pinnedCertificateData { - serverTrustIsValid = true - break outerLoop - } - } - } - } - case let .pinPublicKeys(pinnedPublicKeys, validateCertificateChain, validateHost): - var certificateChainEvaluationPassed = true - - if validateCertificateChain { - let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) - SecTrustSetPolicies(serverTrust, policy) - - certificateChainEvaluationPassed = trustIsValid(serverTrust) - } - - if certificateChainEvaluationPassed { - outerLoop: for serverPublicKey in ServerTrustPolicy.publicKeys(for: serverTrust) as [AnyObject] { - for pinnedPublicKey in pinnedPublicKeys as [AnyObject] { - if serverPublicKey.isEqual(pinnedPublicKey) { - serverTrustIsValid = true - break outerLoop - } - } - } - } - case .disableEvaluation: - serverTrustIsValid = true - case let .customEvaluation(closure): - serverTrustIsValid = closure(serverTrust, host) - } - - return serverTrustIsValid - } - - // MARK: - Private - Trust Validation - - private func trustIsValid(_ trust: SecTrust) -> Bool { - var isValid = false - - var result = SecTrustResultType.invalid - let status = SecTrustEvaluate(trust, &result) - - if status == errSecSuccess { - let unspecified = SecTrustResultType.unspecified - let proceed = SecTrustResultType.proceed - - - isValid = result == unspecified || result == proceed - } - - return isValid - } - - // MARK: - Private - Certificate Data - - private func certificateData(for trust: SecTrust) -> [Data] { - var certificates: [SecCertificate] = [] - - for index in 0.. [Data] { - return certificates.map { SecCertificateCopyData($0) as Data } - } - - // MARK: - Private - Public Key Extraction - - private static func publicKeys(for trust: SecTrust) -> [SecKey] { - var publicKeys: [SecKey] = [] - - for index in 0.. SecKey? { - var publicKey: SecKey? - - let policy = SecPolicyCreateBasicX509() - var trust: SecTrust? - let trustCreationStatus = SecTrustCreateWithCertificates(certificate, policy, &trust) - - if let trust = trust, trustCreationStatus == errSecSuccess { - publicKey = SecTrustCopyPublicKey(trust) - } - - return publicKey - } -} diff --git a/Example/Pods/Alamofire/Source/SessionDelegate.swift b/Example/Pods/Alamofire/Source/SessionDelegate.swift index 4964f1e..1cc2b3d 100644 --- a/Example/Pods/Alamofire/Source/SessionDelegate.swift +++ b/Example/Pods/Alamofire/Source/SessionDelegate.swift @@ -1,7 +1,7 @@ // // SessionDelegate.swift // -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -24,702 +24,282 @@ import Foundation -/// Responsible for handling all delegate callbacks for the underlying session. +/// Class which implements the various `URLSessionDelegate` methods to connect various Alamofire features. open class SessionDelegate: NSObject { + private let fileManager: FileManager - // MARK: URLSessionDelegate Overrides + weak var stateProvider: SessionStateProvider? + var eventMonitor: EventMonitor? - /// Overrides default behavior for URLSessionDelegate method `urlSession(_:didBecomeInvalidWithError:)`. - open var sessionDidBecomeInvalidWithError: ((URLSession, Error?) -> Void)? - - /// Overrides default behavior for URLSessionDelegate method `urlSession(_:didReceive:completionHandler:)`. - open var sessionDidReceiveChallenge: ((URLSession, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - - /// Overrides all behavior for URLSessionDelegate method `urlSession(_:didReceive:completionHandler:)` and requires the caller to call the `completionHandler`. - open var sessionDidReceiveChallengeWithCompletion: ((URLSession, URLAuthenticationChallenge, @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionDelegate method `urlSessionDidFinishEvents(forBackgroundURLSession:)`. - open var sessionDidFinishEventsForBackgroundURLSession: ((URLSession) -> Void)? - - // MARK: URLSessionTaskDelegate Overrides - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)`. - open var taskWillPerformHTTPRedirection: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest) -> URLRequest?)? - - /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)` and - /// requires the caller to call the `completionHandler`. - open var taskWillPerformHTTPRedirectionWithCompletion: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest, @escaping (URLRequest?) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didReceive:completionHandler:)`. - open var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - - /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:didReceive:completionHandler:)` and - /// requires the caller to call the `completionHandler`. - open var taskDidReceiveChallengeWithCompletion: ((URLSession, URLSessionTask, URLAuthenticationChallenge, @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:needNewBodyStream:)`. - open var taskNeedNewBodyStream: ((URLSession, URLSessionTask) -> InputStream?)? - - /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:needNewBodyStream:)` and - /// requires the caller to call the `completionHandler`. - open var taskNeedNewBodyStreamWithCompletion: ((URLSession, URLSessionTask, @escaping (InputStream?) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)`. - open var taskDidSendBodyData: ((URLSession, URLSessionTask, Int64, Int64, Int64) -> Void)? - - /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didCompleteWithError:)`. - open var taskDidComplete: ((URLSession, URLSessionTask, Error?) -> Void)? - - // MARK: URLSessionDataDelegate Overrides - - /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:completionHandler:)`. - open var dataTaskDidReceiveResponse: ((URLSession, URLSessionDataTask, URLResponse) -> URLSession.ResponseDisposition)? - - /// Overrides all behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:completionHandler:)` and - /// requires caller to call the `completionHandler`. - open var dataTaskDidReceiveResponseWithCompletion: ((URLSession, URLSessionDataTask, URLResponse, @escaping (URLSession.ResponseDisposition) -> Void) -> Void)? - - /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didBecome:)`. - open var dataTaskDidBecomeDownloadTask: ((URLSession, URLSessionDataTask, URLSessionDownloadTask) -> Void)? - - /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:)`. - open var dataTaskDidReceiveData: ((URLSession, URLSessionDataTask, Data) -> Void)? - - /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:willCacheResponse:completionHandler:)`. - open var dataTaskWillCacheResponse: ((URLSession, URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?)? - - /// Overrides all behavior for URLSessionDataDelegate method `urlSession(_:dataTask:willCacheResponse:completionHandler:)` and - /// requires caller to call the `completionHandler`. - open var dataTaskWillCacheResponseWithCompletion: ((URLSession, URLSessionDataTask, CachedURLResponse, @escaping (CachedURLResponse?) -> Void) -> Void)? - - // MARK: URLSessionDownloadDelegate Overrides - - /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didFinishDownloadingTo:)`. - open var downloadTaskDidFinishDownloadingToURL: ((URLSession, URLSessionDownloadTask, URL) -> Void)? - - /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:)`. - open var downloadTaskDidWriteData: ((URLSession, URLSessionDownloadTask, Int64, Int64, Int64) -> Void)? + /// Creates an instance from the given `FileManager`. + /// + /// - Parameter fileManager: `FileManager` to use for underlying file management, such as moving downloaded files. + /// `.default` by default. + public init(fileManager: FileManager = .default) { + self.fileManager = fileManager + } +} - /// Overrides default behavior for URLSessionDownloadDelegate method `urlSession(_:downloadTask:didResumeAtOffset:expectedTotalBytes:)`. - open var downloadTaskDidResumeAtOffset: ((URLSession, URLSessionDownloadTask, Int64, Int64) -> Void)? +/// Type which provides various `Session` state values. +protocol SessionStateProvider: AnyObject { + var serverTrustManager: ServerTrustManager? { get } + var redirectHandler: RedirectHandler? { get } + var cachedResponseHandler: CachedResponseHandler? { get } + + func request(for task: URLSessionTask) -> Request? + func didGatherMetricsForTask(_ task: URLSessionTask) + func didCompleteTask(_ task: URLSessionTask) + func credential(for task: URLSessionTask, in protectionSpace: URLProtectionSpace) -> URLCredential? + func cancelRequestsForSessionInvalidation(with error: Error?) +} - // MARK: URLSessionStreamDelegate Overrides +// MARK: URLSessionDelegate -#if !os(watchOS) +extension SessionDelegate: URLSessionDelegate { + open func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) { + eventMonitor?.urlSession(session, didBecomeInvalidWithError: error) - /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:readClosedFor:)`. - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open var streamTaskReadClosed: ((URLSession, URLSessionStreamTask) -> Void)? { - get { - return _streamTaskReadClosed as? (URLSession, URLSessionStreamTask) -> Void - } - set { - _streamTaskReadClosed = newValue - } + stateProvider?.cancelRequestsForSessionInvalidation(with: error) } +} - /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:writeClosedFor:)`. - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open var streamTaskWriteClosed: ((URLSession, URLSessionStreamTask) -> Void)? { - get { - return _streamTaskWriteClosed as? (URLSession, URLSessionStreamTask) -> Void - } - set { - _streamTaskWriteClosed = newValue - } - } +// MARK: URLSessionTaskDelegate - /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:betterRouteDiscoveredFor:)`. - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open var streamTaskBetterRouteDiscovered: ((URLSession, URLSessionStreamTask) -> Void)? { - get { - return _streamTaskBetterRouteDiscovered as? (URLSession, URLSessionStreamTask) -> Void - } - set { - _streamTaskBetterRouteDiscovered = newValue +extension SessionDelegate: URLSessionTaskDelegate { + /// Result of a `URLAuthenticationChallenge` evaluation. + typealias ChallengeEvaluation = (disposition: URLSession.AuthChallengeDisposition, credential: URLCredential?, error: AFError?) + + open func urlSession(_ session: URLSession, + task: URLSessionTask, + didReceive challenge: URLAuthenticationChallenge, + completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { + eventMonitor?.urlSession(session, task: task, didReceive: challenge) + + let evaluation: ChallengeEvaluation + switch challenge.protectionSpace.authenticationMethod { + case NSURLAuthenticationMethodServerTrust: + evaluation = attemptServerTrustAuthentication(with: challenge) + case NSURLAuthenticationMethodHTTPBasic, NSURLAuthenticationMethodHTTPDigest: + evaluation = attemptHTTPAuthentication(for: challenge, belongingTo: task) + // case NSURLAuthenticationMethodClientCertificate: + // Alamofire doesn't currently support client certificate validation. + default: + evaluation = (.performDefaultHandling, nil, nil) } - } - /// Overrides default behavior for URLSessionStreamDelegate method `urlSession(_:streamTask:didBecome:outputStream:)`. - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open var streamTaskDidBecomeInputAndOutputStreams: ((URLSession, URLSessionStreamTask, InputStream, OutputStream) -> Void)? { - get { - return _streamTaskDidBecomeInputStream as? (URLSession, URLSessionStreamTask, InputStream, OutputStream) -> Void - } - set { - _streamTaskDidBecomeInputStream = newValue + if let error = evaluation.error { + stateProvider?.request(for: task)?.didFailTask(task, earlyWithError: error) } - } - - var _streamTaskReadClosed: Any? - var _streamTaskWriteClosed: Any? - var _streamTaskBetterRouteDiscovered: Any? - var _streamTaskDidBecomeInputStream: Any? - -#endif - // MARK: Properties - - var retrier: RequestRetrier? - weak var sessionManager: SessionManager? - - var requests: [Int: Request] = [:] - private let lock = NSLock() - - /// Access the task delegate for the specified task in a thread-safe manner. - open subscript(task: URLSessionTask) -> Request? { - get { - lock.lock() ; defer { lock.unlock() } - return requests[task.taskIdentifier] - } - set { - lock.lock() ; defer { lock.unlock() } - requests[task.taskIdentifier] = newValue - } + completionHandler(evaluation.disposition, evaluation.credential) } - // MARK: Lifecycle - - /// Initializes the `SessionDelegate` instance. + /// Evaluates the server trust `URLAuthenticationChallenge` received. /// - /// - returns: The new `SessionDelegate` instance. - public override init() { - super.init() - } + /// - Parameter challenge: The `URLAuthenticationChallenge`. + /// + /// - Returns: The `ChallengeEvaluation`. + func attemptServerTrustAuthentication(with challenge: URLAuthenticationChallenge) -> ChallengeEvaluation { + let host = challenge.protectionSpace.host - // MARK: NSObject Overrides + guard challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust, + let trust = challenge.protectionSpace.serverTrust + else { + return (.performDefaultHandling, nil, nil) + } - /// Returns a `Bool` indicating whether the `SessionDelegate` implements or inherits a method that can respond - /// to a specified message. - /// - /// - parameter selector: A selector that identifies a message. - /// - /// - returns: `true` if the receiver implements or inherits a method that can respond to selector, otherwise `false`. - open override func responds(to selector: Selector) -> Bool { - #if !os(macOS) - if selector == #selector(URLSessionDelegate.urlSessionDidFinishEvents(forBackgroundURLSession:)) { - return sessionDidFinishEventsForBackgroundURLSession != nil + do { + guard let evaluator = try stateProvider?.serverTrustManager?.serverTrustEvaluator(forHost: host) else { + return (.performDefaultHandling, nil, nil) } - #endif - - #if !os(watchOS) - if #available(iOS 9.0, macOS 10.11, tvOS 9.0, *) { - switch selector { - case #selector(URLSessionStreamDelegate.urlSession(_:readClosedFor:)): - return streamTaskReadClosed != nil - case #selector(URLSessionStreamDelegate.urlSession(_:writeClosedFor:)): - return streamTaskWriteClosed != nil - case #selector(URLSessionStreamDelegate.urlSession(_:betterRouteDiscoveredFor:)): - return streamTaskBetterRouteDiscovered != nil - case #selector(URLSessionStreamDelegate.urlSession(_:streamTask:didBecome:outputStream:)): - return streamTaskDidBecomeInputAndOutputStreams != nil - default: - break - } - } - #endif - - switch selector { - case #selector(URLSessionDelegate.urlSession(_:didBecomeInvalidWithError:)): - return sessionDidBecomeInvalidWithError != nil - case #selector(URLSessionDelegate.urlSession(_:didReceive:completionHandler:)): - return (sessionDidReceiveChallenge != nil || sessionDidReceiveChallengeWithCompletion != nil) - case #selector(URLSessionTaskDelegate.urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)): - return (taskWillPerformHTTPRedirection != nil || taskWillPerformHTTPRedirectionWithCompletion != nil) - case #selector(URLSessionDataDelegate.urlSession(_:dataTask:didReceive:completionHandler:)): - return (dataTaskDidReceiveResponse != nil || dataTaskDidReceiveResponseWithCompletion != nil) - default: - return type(of: self).instancesRespond(to: selector) - } - } -} -// MARK: - URLSessionDelegate + try evaluator.evaluate(trust, forHost: host) -extension SessionDelegate: URLSessionDelegate { - /// Tells the delegate that the session has been invalidated. - /// - /// - parameter session: The session object that was invalidated. - /// - parameter error: The error that caused invalidation, or nil if the invalidation was explicit. - open func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) { - sessionDidBecomeInvalidWithError?(session, error) + return (.useCredential, URLCredential(trust: trust), nil) + } catch { + return (.cancelAuthenticationChallenge, nil, error.asAFError(or: .serverTrustEvaluationFailed(reason: .customEvaluationFailed(error: error)))) + } } - /// Requests credentials from the delegate in response to a session-level authentication request from the - /// remote server. + /// Evaluates the HTTP authentication `URLAuthenticationChallenge` received for `task`. /// - /// - parameter session: The session containing the task that requested authentication. - /// - parameter challenge: An object that contains the request for authentication. - /// - parameter completionHandler: A handler that your delegate method must call providing the disposition - /// and credential. - open func urlSession( - _ session: URLSession, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { - guard sessionDidReceiveChallengeWithCompletion == nil else { - sessionDidReceiveChallengeWithCompletion?(session, challenge, completionHandler) - return + /// - Parameters: + /// - challenge: The `URLAuthenticationChallenge`. + /// - task: The `URLSessionTask` which received the challenge. + /// + /// - Returns: The `ChallengeEvaluation`. + func attemptHTTPAuthentication(for challenge: URLAuthenticationChallenge, + belongingTo task: URLSessionTask) -> ChallengeEvaluation { + guard challenge.previousFailureCount == 0 else { + return (.rejectProtectionSpace, nil, nil) } - var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling - var credential: URLCredential? - - if let sessionDidReceiveChallenge = sessionDidReceiveChallenge { - (disposition, credential) = sessionDidReceiveChallenge(session, challenge) - } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { - let host = challenge.protectionSpace.host - - if - let serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicy(forHost: host), - let serverTrust = challenge.protectionSpace.serverTrust - { - if serverTrustPolicy.evaluate(serverTrust, forHost: host) { - disposition = .useCredential - credential = URLCredential(trust: serverTrust) - } else { - disposition = .cancelAuthenticationChallenge - } - } + guard let credential = stateProvider?.credential(for: task, in: challenge.protectionSpace) else { + return (.performDefaultHandling, nil, nil) } - completionHandler(disposition, credential) + return (.useCredential, credential, nil) } -#if !os(macOS) - - /// Tells the delegate that all messages enqueued for a session have been delivered. - /// - /// - parameter session: The session that no longer has any outstanding requests. - open func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession) { - sessionDidFinishEventsForBackgroundURLSession?(session) + open func urlSession(_ session: URLSession, + task: URLSessionTask, + didSendBodyData bytesSent: Int64, + totalBytesSent: Int64, + totalBytesExpectedToSend: Int64) { + eventMonitor?.urlSession(session, + task: task, + didSendBodyData: bytesSent, + totalBytesSent: totalBytesSent, + totalBytesExpectedToSend: totalBytesExpectedToSend) + + stateProvider?.request(for: task)?.updateUploadProgress(totalBytesSent: totalBytesSent, + totalBytesExpectedToSend: totalBytesExpectedToSend) } -#endif -} - -// MARK: - URLSessionTaskDelegate - -extension SessionDelegate: URLSessionTaskDelegate { - /// Tells the delegate that the remote server requested an HTTP redirect. - /// - /// - parameter session: The session containing the task whose request resulted in a redirect. - /// - parameter task: The task whose request resulted in a redirect. - /// - parameter response: An object containing the server’s response to the original request. - /// - parameter request: A URL request object filled out with the new location. - /// - parameter completionHandler: A closure that your handler should call with either the value of the request - /// parameter, a modified URL request object, or NULL to refuse the redirect and - /// return the body of the redirect response. - open func urlSession( - _ session: URLSession, - task: URLSessionTask, - willPerformHTTPRedirection response: HTTPURLResponse, - newRequest request: URLRequest, - completionHandler: @escaping (URLRequest?) -> Void) - { - guard taskWillPerformHTTPRedirectionWithCompletion == nil else { - taskWillPerformHTTPRedirectionWithCompletion?(session, task, response, request, completionHandler) - return - } - - var redirectRequest: URLRequest? = request + open func urlSession(_ session: URLSession, + task: URLSessionTask, + needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) { + eventMonitor?.urlSession(session, taskNeedsNewBodyStream: task) - if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { - redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) + guard let request = stateProvider?.request(for: task) as? UploadRequest else { + fatalError("needNewBodyStream for request that isn't UploadRequest.") } - completionHandler(redirectRequest) + completionHandler(request.inputStream()) } - /// Requests credentials from the delegate in response to an authentication request from the remote server. - /// - /// - parameter session: The session containing the task whose request requires authentication. - /// - parameter task: The task whose request requires authentication. - /// - parameter challenge: An object that contains the request for authentication. - /// - parameter completionHandler: A handler that your delegate method must call providing the disposition - /// and credential. - open func urlSession( - _ session: URLSession, - task: URLSessionTask, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { - guard taskDidReceiveChallengeWithCompletion == nil else { - taskDidReceiveChallengeWithCompletion?(session, task, challenge, completionHandler) - return - } + open func urlSession(_ session: URLSession, + task: URLSessionTask, + willPerformHTTPRedirection response: HTTPURLResponse, + newRequest request: URLRequest, + completionHandler: @escaping (URLRequest?) -> Void) { + eventMonitor?.urlSession(session, task: task, willPerformHTTPRedirection: response, newRequest: request) - if let taskDidReceiveChallenge = taskDidReceiveChallenge { - let result = taskDidReceiveChallenge(session, task, challenge) - completionHandler(result.0, result.1) - } else if let delegate = self[task]?.delegate { - delegate.urlSession( - session, - task: task, - didReceive: challenge, - completionHandler: completionHandler - ) + if let redirectHandler = stateProvider?.request(for: task)?.redirectHandler ?? stateProvider?.redirectHandler { + redirectHandler.task(task, willBeRedirectedTo: request, for: response, completion: completionHandler) } else { - urlSession(session, didReceive: challenge, completionHandler: completionHandler) + completionHandler(request) } } - /// Tells the delegate when a task requires a new request body stream to send to the remote server. - /// - /// - parameter session: The session containing the task that needs a new body stream. - /// - parameter task: The task that needs a new body stream. - /// - parameter completionHandler: A completion handler that your delegate method should call with the new body stream. - open func urlSession( - _ session: URLSession, - task: URLSessionTask, - needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) - { - guard taskNeedNewBodyStreamWithCompletion == nil else { - taskNeedNewBodyStreamWithCompletion?(session, task, completionHandler) - return - } - - if let taskNeedNewBodyStream = taskNeedNewBodyStream { - completionHandler(taskNeedNewBodyStream(session, task)) - } else if let delegate = self[task]?.delegate { - delegate.urlSession(session, task: task, needNewBodyStream: completionHandler) - } - } - - /// Periodically informs the delegate of the progress of sending body content to the server. - /// - /// - parameter session: The session containing the data task. - /// - parameter task: The data task. - /// - parameter bytesSent: The number of bytes sent since the last time this delegate method was called. - /// - parameter totalBytesSent: The total number of bytes sent so far. - /// - parameter totalBytesExpectedToSend: The expected length of the body data. - open func urlSession( - _ session: URLSession, - task: URLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { - if let taskDidSendBodyData = taskDidSendBodyData { - taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) - } else if let delegate = self[task]?.delegate as? UploadTaskDelegate { - delegate.URLSession( - session, - task: task, - didSendBodyData: bytesSent, - totalBytesSent: totalBytesSent, - totalBytesExpectedToSend: totalBytesExpectedToSend - ) - } - } + open func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics) { + eventMonitor?.urlSession(session, task: task, didFinishCollecting: metrics) -#if !os(watchOS) + stateProvider?.request(for: task)?.didGatherMetrics(metrics) - /// Tells the delegate that the session finished collecting metrics for the task. - /// - /// - parameter session: The session collecting the metrics. - /// - parameter task: The task whose metrics have been collected. - /// - parameter metrics: The collected metrics. - @available(iOS 10.0, macOS 10.12, tvOS 10.0, *) - @objc(URLSession:task:didFinishCollectingMetrics:) - open func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics) { - self[task]?.delegate.metrics = metrics + stateProvider?.didGatherMetricsForTask(task) } -#endif - - /// Tells the delegate that the task finished transferring data. - /// - /// - parameter session: The session containing the task whose request finished transferring data. - /// - parameter task: The task whose request finished transferring data. - /// - parameter error: If an error occurred, an error object indicating how the transfer failed, otherwise nil. open func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { - /// Executed after it is determined that the request is not going to be retried - let completeTask: (URLSession, URLSessionTask, Error?) -> Void = { [weak self] session, task, error in - guard let strongSelf = self else { return } - - strongSelf.taskDidComplete?(session, task, error) - - strongSelf[task]?.delegate.urlSession(session, task: task, didCompleteWithError: error) + eventMonitor?.urlSession(session, task: task, didCompleteWithError: error) - var userInfo: [String: Any] = [Notification.Key.Task: task] + stateProvider?.request(for: task)?.didCompleteTask(task, with: error.map { $0.asAFError(or: .sessionTaskFailed(error: $0)) }) - if let data = (strongSelf[task]?.delegate as? DataTaskDelegate)?.data { - userInfo[Notification.Key.ResponseData] = data - } - - NotificationCenter.default.post( - name: Notification.Name.Task.DidComplete, - object: strongSelf, - userInfo: userInfo - ) - - strongSelf[task] = nil - } + stateProvider?.didCompleteTask(task) + } - guard let request = self[task], let sessionManager = sessionManager else { - completeTask(session, task, error) - return - } + @available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) + open func urlSession(_ session: URLSession, taskIsWaitingForConnectivity task: URLSessionTask) { + eventMonitor?.urlSession(session, taskIsWaitingForConnectivity: task) + } +} - // Run all validations on the request before checking if an error occurred - request.validations.forEach { $0() } +// MARK: URLSessionDataDelegate - // Determine whether an error has occurred - var error: Error? = error +extension SessionDelegate: URLSessionDataDelegate { + open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { + eventMonitor?.urlSession(session, dataTask: dataTask, didReceive: data) - if request.delegate.error != nil { - error = request.delegate.error + guard let request = stateProvider?.request(for: dataTask) as? DataRequest else { + fatalError("dataTask received data for incorrect Request subclass: \(String(describing: stateProvider?.request(for: dataTask)))") } - /// If an error occurred and the retrier is set, asynchronously ask the retrier if the request - /// should be retried. Otherwise, complete the task by notifying the task delegate. - if let retrier = retrier, let error = error { - retrier.should(sessionManager, retry: request, with: error) { [weak self] shouldRetry, timeDelay in - guard shouldRetry else { completeTask(session, task, error) ; return } - - DispatchQueue.utility.after(timeDelay) { [weak self] in - guard let strongSelf = self else { return } + request.didReceive(data: data) + } - let retrySucceeded = strongSelf.sessionManager?.retry(request) ?? false + open func urlSession(_ session: URLSession, + dataTask: URLSessionDataTask, + willCacheResponse proposedResponse: CachedURLResponse, + completionHandler: @escaping (CachedURLResponse?) -> Void) { + eventMonitor?.urlSession(session, dataTask: dataTask, willCacheResponse: proposedResponse) - if retrySucceeded, let task = request.task { - strongSelf[task] = request - return - } else { - completeTask(session, task, error) - } - } - } + if let handler = stateProvider?.request(for: dataTask)?.cachedResponseHandler ?? stateProvider?.cachedResponseHandler { + handler.dataTask(dataTask, willCacheResponse: proposedResponse, completion: completionHandler) } else { - completeTask(session, task, error) + completionHandler(proposedResponse) } } } -// MARK: - URLSessionDataDelegate - -extension SessionDelegate: URLSessionDataDelegate { - /// Tells the delegate that the data task received the initial reply (headers) from the server. - /// - /// - parameter session: The session containing the data task that received an initial reply. - /// - parameter dataTask: The data task that received an initial reply. - /// - parameter response: A URL response object populated with headers. - /// - parameter completionHandler: A completion handler that your code calls to continue the transfer, passing a - /// constant to indicate whether the transfer should continue as a data task or - /// should become a download task. - open func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - didReceive response: URLResponse, - completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) - { - guard dataTaskDidReceiveResponseWithCompletion == nil else { - dataTaskDidReceiveResponseWithCompletion?(session, dataTask, response, completionHandler) - return - } +// MARK: URLSessionDownloadDelegate - var disposition: URLSession.ResponseDisposition = .allow +extension SessionDelegate: URLSessionDownloadDelegate { + open func urlSession(_ session: URLSession, + downloadTask: URLSessionDownloadTask, + didResumeAtOffset fileOffset: Int64, + expectedTotalBytes: Int64) { + eventMonitor?.urlSession(session, + downloadTask: downloadTask, + didResumeAtOffset: fileOffset, + expectedTotalBytes: expectedTotalBytes) - if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { - disposition = dataTaskDidReceiveResponse(session, dataTask, response) + guard let downloadRequest = stateProvider?.request(for: downloadTask) as? DownloadRequest else { + fatalError("No DownloadRequest found for downloadTask: \(downloadTask)") } - completionHandler(disposition) + downloadRequest.updateDownloadProgress(bytesWritten: fileOffset, + totalBytesExpectedToWrite: expectedTotalBytes) } - /// Tells the delegate that the data task was changed to a download task. - /// - /// - parameter session: The session containing the task that was replaced by a download task. - /// - parameter dataTask: The data task that was replaced by a download task. - /// - parameter downloadTask: The new download task that replaced the data task. - open func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - didBecome downloadTask: URLSessionDownloadTask) - { - if let dataTaskDidBecomeDownloadTask = dataTaskDidBecomeDownloadTask { - dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask) - } else { - self[downloadTask]?.delegate = DownloadTaskDelegate(task: downloadTask) - } - } - - /// Tells the delegate that the data task has received some of the expected data. - /// - /// - parameter session: The session containing the data task that provided data. - /// - parameter dataTask: The data task that provided data. - /// - parameter data: A data object containing the transferred data. - open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { - if let dataTaskDidReceiveData = dataTaskDidReceiveData { - dataTaskDidReceiveData(session, dataTask, data) - } else if let delegate = self[dataTask]?.delegate as? DataTaskDelegate { - delegate.urlSession(session, dataTask: dataTask, didReceive: data) - } - } + open func urlSession(_ session: URLSession, + downloadTask: URLSessionDownloadTask, + didWriteData bytesWritten: Int64, + totalBytesWritten: Int64, + totalBytesExpectedToWrite: Int64) { + eventMonitor?.urlSession(session, + downloadTask: downloadTask, + didWriteData: bytesWritten, + totalBytesWritten: totalBytesWritten, + totalBytesExpectedToWrite: totalBytesExpectedToWrite) - /// Asks the delegate whether the data (or upload) task should store the response in the cache. - /// - /// - parameter session: The session containing the data (or upload) task. - /// - parameter dataTask: The data (or upload) task. - /// - parameter proposedResponse: The default caching behavior. This behavior is determined based on the current - /// caching policy and the values of certain received headers, such as the Pragma - /// and Cache-Control headers. - /// - parameter completionHandler: A block that your handler must call, providing either the original proposed - /// response, a modified version of that response, or NULL to prevent caching the - /// response. If your delegate implements this method, it must call this completion - /// handler; otherwise, your app leaks memory. - open func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - willCacheResponse proposedResponse: CachedURLResponse, - completionHandler: @escaping (CachedURLResponse?) -> Void) - { - guard dataTaskWillCacheResponseWithCompletion == nil else { - dataTaskWillCacheResponseWithCompletion?(session, dataTask, proposedResponse, completionHandler) - return + guard let downloadRequest = stateProvider?.request(for: downloadTask) as? DownloadRequest else { + fatalError("No DownloadRequest found for downloadTask: \(downloadTask)") } - if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { - completionHandler(dataTaskWillCacheResponse(session, dataTask, proposedResponse)) - } else if let delegate = self[dataTask]?.delegate as? DataTaskDelegate { - delegate.urlSession( - session, - dataTask: dataTask, - willCacheResponse: proposedResponse, - completionHandler: completionHandler - ) - } else { - completionHandler(proposedResponse) - } + downloadRequest.updateDownloadProgress(bytesWritten: bytesWritten, + totalBytesExpectedToWrite: totalBytesExpectedToWrite) } -} - -// MARK: - URLSessionDownloadDelegate -extension SessionDelegate: URLSessionDownloadDelegate { - /// Tells the delegate that a download task has finished downloading. - /// - /// - parameter session: The session containing the download task that finished. - /// - parameter downloadTask: The download task that finished. - /// - parameter location: A file URL for the temporary file. Because the file is temporary, you must either - /// open the file for reading or move it to a permanent location in your app’s sandbox - /// container directory before returning from this delegate method. - open func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didFinishDownloadingTo location: URL) - { - if let downloadTaskDidFinishDownloadingToURL = downloadTaskDidFinishDownloadingToURL { - downloadTaskDidFinishDownloadingToURL(session, downloadTask, location) - } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { - delegate.urlSession(session, downloadTask: downloadTask, didFinishDownloadingTo: location) - } - } + open func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) { + eventMonitor?.urlSession(session, downloadTask: downloadTask, didFinishDownloadingTo: location) - /// Periodically informs the delegate about the download’s progress. - /// - /// - parameter session: The session containing the download task. - /// - parameter downloadTask: The download task. - /// - parameter bytesWritten: The number of bytes transferred since the last time this delegate - /// method was called. - /// - parameter totalBytesWritten: The total number of bytes transferred so far. - /// - parameter totalBytesExpectedToWrite: The expected length of the file, as provided by the Content-Length - /// header. If this header was not provided, the value is - /// `NSURLSessionTransferSizeUnknown`. - open func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { - if let downloadTaskDidWriteData = downloadTaskDidWriteData { - downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) - } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { - delegate.urlSession( - session, - downloadTask: downloadTask, - didWriteData: bytesWritten, - totalBytesWritten: totalBytesWritten, - totalBytesExpectedToWrite: totalBytesExpectedToWrite - ) + guard let request = stateProvider?.request(for: downloadTask) as? DownloadRequest else { + fatalError("Download finished but either no request found or request wasn't DownloadRequest") } - } - /// Tells the delegate that the download task has resumed downloading. - /// - /// - parameter session: The session containing the download task that finished. - /// - parameter downloadTask: The download task that resumed. See explanation in the discussion. - /// - parameter fileOffset: If the file's cache policy or last modified date prevents reuse of the - /// existing content, then this value is zero. Otherwise, this value is an - /// integer representing the number of bytes on disk that do not need to be - /// retrieved again. - /// - parameter expectedTotalBytes: The expected length of the file, as provided by the Content-Length header. - /// If this header was not provided, the value is NSURLSessionTransferSizeUnknown. - open func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { - if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { - downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) - } else if let delegate = self[downloadTask]?.delegate as? DownloadTaskDelegate { - delegate.urlSession( - session, - downloadTask: downloadTask, - didResumeAtOffset: fileOffset, - expectedTotalBytes: expectedTotalBytes - ) + guard let response = request.response else { + fatalError("URLSessionDownloadTask finished downloading with no response.") } - } -} -// MARK: - URLSessionStreamDelegate + let (destination, options) = (request.destination)(location, response) -#if !os(watchOS) + eventMonitor?.request(request, didCreateDestinationURL: destination) -@available(iOS 9.0, macOS 10.11, tvOS 9.0, *) -extension SessionDelegate: URLSessionStreamDelegate { - /// Tells the delegate that the read side of the connection has been closed. - /// - /// - parameter session: The session. - /// - parameter streamTask: The stream task. - open func urlSession(_ session: URLSession, readClosedFor streamTask: URLSessionStreamTask) { - streamTaskReadClosed?(session, streamTask) - } + do { + if options.contains(.removePreviousFile), fileManager.fileExists(atPath: destination.path) { + try fileManager.removeItem(at: destination) + } - /// Tells the delegate that the write side of the connection has been closed. - /// - /// - parameter session: The session. - /// - parameter streamTask: The stream task. - open func urlSession(_ session: URLSession, writeClosedFor streamTask: URLSessionStreamTask) { - streamTaskWriteClosed?(session, streamTask) - } + if options.contains(.createIntermediateDirectories) { + let directory = destination.deletingLastPathComponent() + try fileManager.createDirectory(at: directory, withIntermediateDirectories: true) + } - /// Tells the delegate that the system has determined that a better route to the host is available. - /// - /// - parameter session: The session. - /// - parameter streamTask: The stream task. - open func urlSession(_ session: URLSession, betterRouteDiscoveredFor streamTask: URLSessionStreamTask) { - streamTaskBetterRouteDiscovered?(session, streamTask) - } + try fileManager.moveItem(at: location, to: destination) - /// Tells the delegate that the stream task has been completed and provides the unopened stream objects. - /// - /// - parameter session: The session. - /// - parameter streamTask: The stream task. - /// - parameter inputStream: The new input stream. - /// - parameter outputStream: The new output stream. - open func urlSession( - _ session: URLSession, - streamTask: URLSessionStreamTask, - didBecome inputStream: InputStream, - outputStream: OutputStream) - { - streamTaskDidBecomeInputAndOutputStreams?(session, streamTask, inputStream, outputStream) + request.didFinishDownloading(using: downloadTask, with: .success(destination)) + } catch { + request.didFinishDownloading(using: downloadTask, with: .failure(.downloadedFileMoveFailed(error: error, source: location, destination: destination))) + } } } - -#endif diff --git a/Example/Pods/Alamofire/Source/SessionManager.swift b/Example/Pods/Alamofire/Source/SessionManager.swift deleted file mode 100644 index 02c36a7..0000000 --- a/Example/Pods/Alamofire/Source/SessionManager.swift +++ /dev/null @@ -1,899 +0,0 @@ -// -// SessionManager.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. -// - -import Foundation - -/// Responsible for creating and managing `Request` objects, as well as their underlying `NSURLSession`. -open class SessionManager { - - // MARK: - Helper Types - - /// Defines whether the `MultipartFormData` encoding was successful and contains result of the encoding as - /// associated values. - /// - /// - Success: Represents a successful `MultipartFormData` encoding and contains the new `UploadRequest` along with - /// streaming information. - /// - Failure: Used to represent a failure in the `MultipartFormData` encoding and also contains the encoding - /// error. - public enum MultipartFormDataEncodingResult { - case success(request: UploadRequest, streamingFromDisk: Bool, streamFileURL: URL?) - case failure(Error) - } - - // MARK: - Properties - - /// A default instance of `SessionManager`, used by top-level Alamofire request methods, and suitable for use - /// directly for any ad hoc requests. - public static let `default`: SessionManager = { - let configuration = URLSessionConfiguration.default - configuration.httpAdditionalHeaders = SessionManager.defaultHTTPHeaders - - return SessionManager(configuration: configuration) - }() - - /// Creates default values for the "Accept-Encoding", "Accept-Language" and "User-Agent" headers. - public static let defaultHTTPHeaders: HTTPHeaders = { - // Accept-Encoding HTTP Header; see https://tools.ietf.org/html/rfc7230#section-4.2.3 - let acceptEncoding: String = "gzip;q=1.0, compress;q=0.5" - - // Accept-Language HTTP Header; see https://tools.ietf.org/html/rfc7231#section-5.3.5 - let acceptLanguage = Locale.preferredLanguages.prefix(6).enumerated().map { index, languageCode in - let quality = 1.0 - (Double(index) * 0.1) - return "\(languageCode);q=\(quality)" - }.joined(separator: ", ") - - // User-Agent Header; see https://tools.ietf.org/html/rfc7231#section-5.5.3 - // Example: `iOS Example/1.0 (org.alamofire.iOS-Example; build:1; iOS 10.0.0) Alamofire/4.0.0` - let userAgent: String = { - if let info = Bundle.main.infoDictionary { - let executable = info[kCFBundleExecutableKey as String] as? String ?? "Unknown" - let bundle = info[kCFBundleIdentifierKey as String] as? String ?? "Unknown" - let appVersion = info["CFBundleShortVersionString"] as? String ?? "Unknown" - let appBuild = info[kCFBundleVersionKey as String] as? String ?? "Unknown" - - let osNameVersion: String = { - let version = ProcessInfo.processInfo.operatingSystemVersion - let versionString = "\(version.majorVersion).\(version.minorVersion).\(version.patchVersion)" - - let osName: String = { - #if os(iOS) - return "iOS" - #elseif os(watchOS) - return "watchOS" - #elseif os(tvOS) - return "tvOS" - #elseif os(macOS) - return "OS X" - #elseif os(Linux) - return "Linux" - #else - return "Unknown" - #endif - }() - - return "\(osName) \(versionString)" - }() - - let alamofireVersion: String = { - guard - let afInfo = Bundle(for: SessionManager.self).infoDictionary, - let build = afInfo["CFBundleShortVersionString"] - else { return "Unknown" } - - return "Alamofire/\(build)" - }() - - return "\(executable)/\(appVersion) (\(bundle); build:\(appBuild); \(osNameVersion)) \(alamofireVersion)" - } - - return "Alamofire" - }() - - return [ - "Accept-Encoding": acceptEncoding, - "Accept-Language": acceptLanguage, - "User-Agent": userAgent - ] - }() - - /// Default memory threshold used when encoding `MultipartFormData` in bytes. - public static let multipartFormDataEncodingMemoryThreshold: UInt64 = 10_000_000 - - /// The underlying session. - public let session: URLSession - - /// The session delegate handling all the task and session delegate callbacks. - public let delegate: SessionDelegate - - /// Whether to start requests immediately after being constructed. `true` by default. - open var startRequestsImmediately: Bool = true - - /// The request adapter called each time a new request is created. - open var adapter: RequestAdapter? - - /// The request retrier called each time a request encounters an error to determine whether to retry the request. - open var retrier: RequestRetrier? { - get { return delegate.retrier } - set { delegate.retrier = newValue } - } - - /// The background completion handler closure provided by the UIApplicationDelegate - /// `application:handleEventsForBackgroundURLSession:completionHandler:` method. By setting the background - /// completion handler, the SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` closure implementation - /// will automatically call the handler. - /// - /// If you need to handle your own events before the handler is called, then you need to override the - /// SessionDelegate `sessionDidFinishEventsForBackgroundURLSession` and manually call the handler when finished. - /// - /// `nil` by default. - open var backgroundCompletionHandler: (() -> Void)? - - let queue = DispatchQueue(label: "org.alamofire.session-manager." + UUID().uuidString) - - // MARK: - Lifecycle - - /// Creates an instance with the specified `configuration`, `delegate` and `serverTrustPolicyManager`. - /// - /// - parameter configuration: The configuration used to construct the managed session. - /// `URLSessionConfiguration.default` by default. - /// - parameter delegate: The delegate used when initializing the session. `SessionDelegate()` by - /// default. - /// - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust - /// challenges. `nil` by default. - /// - /// - returns: The new `SessionManager` instance. - public init( - configuration: URLSessionConfiguration = URLSessionConfiguration.default, - delegate: SessionDelegate = SessionDelegate(), - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { - self.delegate = delegate - self.session = URLSession(configuration: configuration, delegate: delegate, delegateQueue: nil) - - commonInit(serverTrustPolicyManager: serverTrustPolicyManager) - } - - /// Creates an instance with the specified `session`, `delegate` and `serverTrustPolicyManager`. - /// - /// - parameter session: The URL session. - /// - parameter delegate: The delegate of the URL session. Must equal the URL session's delegate. - /// - parameter serverTrustPolicyManager: The server trust policy manager to use for evaluating all server trust - /// challenges. `nil` by default. - /// - /// - returns: The new `SessionManager` instance if the URL session's delegate matches; `nil` otherwise. - public init?( - session: URLSession, - delegate: SessionDelegate, - serverTrustPolicyManager: ServerTrustPolicyManager? = nil) - { - guard delegate === session.delegate else { return nil } - - self.delegate = delegate - self.session = session - - commonInit(serverTrustPolicyManager: serverTrustPolicyManager) - } - - private func commonInit(serverTrustPolicyManager: ServerTrustPolicyManager?) { - session.serverTrustPolicyManager = serverTrustPolicyManager - - delegate.sessionManager = self - - delegate.sessionDidFinishEventsForBackgroundURLSession = { [weak self] session in - guard let strongSelf = self else { return } - DispatchQueue.main.async { strongSelf.backgroundCompletionHandler?() } - } - } - - deinit { - session.invalidateAndCancel() - } - - // MARK: - Data Request - - /// Creates a `DataRequest` to retrieve the contents of the specified `url`, `method`, `parameters`, `encoding` - /// and `headers`. - /// - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.get` by default. - /// - parameter parameters: The parameters. `nil` by default. - /// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - /// - returns: The created `DataRequest`. - @discardableResult - open func request( - _ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil) - -> DataRequest - { - var originalRequest: URLRequest? - - do { - originalRequest = try URLRequest(url: url, method: method, headers: headers) - let encodedURLRequest = try encoding.encode(originalRequest!, with: parameters) - return request(encodedURLRequest) - } catch { - return request(originalRequest, failedWith: error) - } - } - - /// Creates a `DataRequest` to retrieve the contents of a URL based on the specified `urlRequest`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter urlRequest: The URL request. - /// - /// - returns: The created `DataRequest`. - @discardableResult - open func request(_ urlRequest: URLRequestConvertible) -> DataRequest { - var originalRequest: URLRequest? - - do { - originalRequest = try urlRequest.asURLRequest() - let originalTask = DataRequest.Requestable(urlRequest: originalRequest!) - - let task = try originalTask.task(session: session, adapter: adapter, queue: queue) - let request = DataRequest(session: session, requestTask: .data(originalTask, task)) - - delegate[task] = request - - if startRequestsImmediately { request.resume() } - - return request - } catch { - return request(originalRequest, failedWith: error) - } - } - - // MARK: Private - Request Implementation - - private func request(_ urlRequest: URLRequest?, failedWith error: Error) -> DataRequest { - var requestTask: Request.RequestTask = .data(nil, nil) - - if let urlRequest = urlRequest { - let originalTask = DataRequest.Requestable(urlRequest: urlRequest) - requestTask = .data(originalTask, nil) - } - - let underlyingError = error.underlyingAdaptError ?? error - let request = DataRequest(session: session, requestTask: requestTask, error: underlyingError) - - if let retrier = retrier, error is AdaptError { - allowRetrier(retrier, toRetry: request, with: underlyingError) - } else { - if startRequestsImmediately { request.resume() } - } - - return request - } - - // MARK: - Download Request - - // MARK: URL Request - - /// Creates a `DownloadRequest` to retrieve the contents the specified `url`, `method`, `parameters`, `encoding`, - /// `headers` and save them to the `destination`. - /// - /// If `destination` is not specified, the contents will remain in the temporary location determined by the - /// underlying URL session. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.get` by default. - /// - parameter parameters: The parameters. `nil` by default. - /// - parameter encoding: The parameter encoding. `URLEncoding.default` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. - /// - /// - returns: The created `DownloadRequest`. - @discardableResult - open func download( - _ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - let encodedURLRequest = try encoding.encode(urlRequest, with: parameters) - return download(encodedURLRequest, to: destination) - } catch { - return download(nil, to: destination, failedWith: error) - } - } - - /// Creates a `DownloadRequest` to retrieve the contents of a URL based on the specified `urlRequest` and save - /// them to the `destination`. - /// - /// If `destination` is not specified, the contents will remain in the temporary location determined by the - /// underlying URL session. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter urlRequest: The URL request - /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. - /// - /// - returns: The created `DownloadRequest`. - @discardableResult - open func download( - _ urlRequest: URLRequestConvertible, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { - do { - let urlRequest = try urlRequest.asURLRequest() - return download(.request(urlRequest), to: destination) - } catch { - return download(nil, to: destination, failedWith: error) - } - } - - // MARK: Resume Data - - /// Creates a `DownloadRequest` from the `resumeData` produced from a previous request cancellation to retrieve - /// the contents of the original request and save them to the `destination`. - /// - /// If `destination` is not specified, the contents will remain in the temporary location determined by the - /// underlying URL session. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), `resumeData` is broken - /// on background URL session configurations. There's an underlying bug in the `resumeData` generation logic where the - /// data is written incorrectly and will always fail to resume the download. For more information about the bug and - /// possible workarounds, please refer to the following Stack Overflow post: - /// - /// - http://stackoverflow.com/a/39347461/1342462 - /// - /// - parameter resumeData: The resume data. This is an opaque data blob produced by `URLSessionDownloadTask` - /// when a task is cancelled. See `URLSession -downloadTask(withResumeData:)` for - /// additional information. - /// - parameter destination: The closure used to determine the destination of the downloaded file. `nil` by default. - /// - /// - returns: The created `DownloadRequest`. - @discardableResult - open func download( - resumingWith resumeData: Data, - to destination: DownloadRequest.DownloadFileDestination? = nil) - -> DownloadRequest - { - return download(.resumeData(resumeData), to: destination) - } - - // MARK: Private - Download Implementation - - private func download( - _ downloadable: DownloadRequest.Downloadable, - to destination: DownloadRequest.DownloadFileDestination?) - -> DownloadRequest - { - do { - let task = try downloadable.task(session: session, adapter: adapter, queue: queue) - let download = DownloadRequest(session: session, requestTask: .download(downloadable, task)) - - download.downloadDelegate.destination = destination - - delegate[task] = download - - if startRequestsImmediately { download.resume() } - - return download - } catch { - return download(downloadable, to: destination, failedWith: error) - } - } - - private func download( - _ downloadable: DownloadRequest.Downloadable?, - to destination: DownloadRequest.DownloadFileDestination?, - failedWith error: Error) - -> DownloadRequest - { - var downloadTask: Request.RequestTask = .download(nil, nil) - - if let downloadable = downloadable { - downloadTask = .download(downloadable, nil) - } - - let underlyingError = error.underlyingAdaptError ?? error - - let download = DownloadRequest(session: session, requestTask: downloadTask, error: underlyingError) - download.downloadDelegate.destination = destination - - if let retrier = retrier, error is AdaptError { - allowRetrier(retrier, toRetry: download, with: underlyingError) - } else { - if startRequestsImmediately { download.resume() } - } - - return download - } - - // MARK: - Upload Request - - // MARK: File - - /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `file`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter file: The file to upload. - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.post` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload( - _ fileURL: URL, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - return upload(fileURL, with: urlRequest) - } catch { - return upload(nil, failedWith: error) - } - } - - /// Creates a `UploadRequest` from the specified `urlRequest` for uploading the `file`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter file: The file to upload. - /// - parameter urlRequest: The URL request. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload(_ fileURL: URL, with urlRequest: URLRequestConvertible) -> UploadRequest { - do { - let urlRequest = try urlRequest.asURLRequest() - return upload(.file(fileURL, urlRequest)) - } catch { - return upload(nil, failedWith: error) - } - } - - // MARK: Data - - /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `data`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter data: The data to upload. - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.post` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload( - _ data: Data, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - return upload(data, with: urlRequest) - } catch { - return upload(nil, failedWith: error) - } - } - - /// Creates an `UploadRequest` from the specified `urlRequest` for uploading the `data`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter data: The data to upload. - /// - parameter urlRequest: The URL request. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload(_ data: Data, with urlRequest: URLRequestConvertible) -> UploadRequest { - do { - let urlRequest = try urlRequest.asURLRequest() - return upload(.data(data, urlRequest)) - } catch { - return upload(nil, failedWith: error) - } - } - - // MARK: InputStream - - /// Creates an `UploadRequest` from the specified `url`, `method` and `headers` for uploading the `stream`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter stream: The stream to upload. - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.post` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload( - _ stream: InputStream, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil) - -> UploadRequest - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - return upload(stream, with: urlRequest) - } catch { - return upload(nil, failedWith: error) - } - } - - /// Creates an `UploadRequest` from the specified `urlRequest` for uploading the `stream`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter stream: The stream to upload. - /// - parameter urlRequest: The URL request. - /// - /// - returns: The created `UploadRequest`. - @discardableResult - open func upload(_ stream: InputStream, with urlRequest: URLRequestConvertible) -> UploadRequest { - do { - let urlRequest = try urlRequest.asURLRequest() - return upload(.stream(stream, urlRequest)) - } catch { - return upload(nil, failedWith: error) - } - } - - // MARK: MultipartFormData - - /// Encodes `multipartFormData` using `encodingMemoryThreshold` and calls `encodingCompletion` with new - /// `UploadRequest` using the `url`, `method` and `headers`. - /// - /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative - /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - /// used for larger payloads such as video content. - /// - /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - /// technique was used. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - /// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - /// `multipartFormDataEncodingMemoryThreshold` by default. - /// - parameter url: The URL. - /// - parameter method: The HTTP method. `.post` by default. - /// - parameter headers: The HTTP headers. `nil` by default. - /// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. - open func upload( - multipartFormData: @escaping (MultipartFormData) -> Void, - usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, - to url: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil, - queue: DispatchQueue? = nil, - encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) - { - do { - let urlRequest = try URLRequest(url: url, method: method, headers: headers) - - return upload( - multipartFormData: multipartFormData, - usingThreshold: encodingMemoryThreshold, - with: urlRequest, - queue: queue, - encodingCompletion: encodingCompletion - ) - } catch { - (queue ?? DispatchQueue.main).async { encodingCompletion?(.failure(error)) } - } - } - - /// Encodes `multipartFormData` using `encodingMemoryThreshold` and calls `encodingCompletion` with new - /// `UploadRequest` using the `urlRequest`. - /// - /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cummulative - /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - /// used for larger payloads such as video content. - /// - /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - /// technique was used. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter multipartFormData: The closure used to append body parts to the `MultipartFormData`. - /// - parameter encodingMemoryThreshold: The encoding memory threshold in bytes. - /// `multipartFormDataEncodingMemoryThreshold` by default. - /// - parameter urlRequest: The URL request. - /// - parameter encodingCompletion: The closure called when the `MultipartFormData` encoding is complete. - open func upload( - multipartFormData: @escaping (MultipartFormData) -> Void, - usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold, - with urlRequest: URLRequestConvertible, - queue: DispatchQueue? = nil, - encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?) - { - DispatchQueue.global(qos: .utility).async { - let formData = MultipartFormData() - multipartFormData(formData) - - var tempFileURL: URL? - - do { - var urlRequestWithContentType = try urlRequest.asURLRequest() - urlRequestWithContentType.setValue(formData.contentType, forHTTPHeaderField: "Content-Type") - - let isBackgroundSession = self.session.configuration.identifier != nil - - if formData.contentLength < encodingMemoryThreshold && !isBackgroundSession { - let data = try formData.encode() - - let encodingResult = MultipartFormDataEncodingResult.success( - request: self.upload(data, with: urlRequestWithContentType), - streamingFromDisk: false, - streamFileURL: nil - ) - - (queue ?? DispatchQueue.main).async { encodingCompletion?(encodingResult) } - } else { - let fileManager = FileManager.default - let tempDirectoryURL = URL(fileURLWithPath: NSTemporaryDirectory()) - let directoryURL = tempDirectoryURL.appendingPathComponent("org.alamofire.manager/multipart.form.data") - let fileName = UUID().uuidString - let fileURL = directoryURL.appendingPathComponent(fileName) - - tempFileURL = fileURL - - var directoryError: Error? - - // Create directory inside serial queue to ensure two threads don't do this in parallel - self.queue.sync { - do { - try fileManager.createDirectory(at: directoryURL, withIntermediateDirectories: true, attributes: nil) - } catch { - directoryError = error - } - } - - if let directoryError = directoryError { throw directoryError } - - try formData.writeEncodedData(to: fileURL) - - let upload = self.upload(fileURL, with: urlRequestWithContentType) - - // Cleanup the temp file once the upload is complete - upload.delegate.queue.addOperation { - do { - try FileManager.default.removeItem(at: fileURL) - } catch { - // No-op - } - } - - (queue ?? DispatchQueue.main).async { - let encodingResult = MultipartFormDataEncodingResult.success( - request: upload, - streamingFromDisk: true, - streamFileURL: fileURL - ) - - encodingCompletion?(encodingResult) - } - } - } catch { - // Cleanup the temp file in the event that the multipart form data encoding failed - if let tempFileURL = tempFileURL { - do { - try FileManager.default.removeItem(at: tempFileURL) - } catch { - // No-op - } - } - - (queue ?? DispatchQueue.main).async { encodingCompletion?(.failure(error)) } - } - } - } - - // MARK: Private - Upload Implementation - - private func upload(_ uploadable: UploadRequest.Uploadable) -> UploadRequest { - do { - let task = try uploadable.task(session: session, adapter: adapter, queue: queue) - let upload = UploadRequest(session: session, requestTask: .upload(uploadable, task)) - - if case let .stream(inputStream, _) = uploadable { - upload.delegate.taskNeedNewBodyStream = { _, _ in inputStream } - } - - delegate[task] = upload - - if startRequestsImmediately { upload.resume() } - - return upload - } catch { - return upload(uploadable, failedWith: error) - } - } - - private func upload(_ uploadable: UploadRequest.Uploadable?, failedWith error: Error) -> UploadRequest { - var uploadTask: Request.RequestTask = .upload(nil, nil) - - if let uploadable = uploadable { - uploadTask = .upload(uploadable, nil) - } - - let underlyingError = error.underlyingAdaptError ?? error - let upload = UploadRequest(session: session, requestTask: uploadTask, error: underlyingError) - - if let retrier = retrier, error is AdaptError { - allowRetrier(retrier, toRetry: upload, with: underlyingError) - } else { - if startRequestsImmediately { upload.resume() } - } - - return upload - } - -#if !os(watchOS) - - // MARK: - Stream Request - - // MARK: Hostname and Port - - /// Creates a `StreamRequest` for bidirectional streaming using the `hostname` and `port`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter hostName: The hostname of the server to connect to. - /// - parameter port: The port of the server to connect to. - /// - /// - returns: The created `StreamRequest`. - @discardableResult - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open func stream(withHostName hostName: String, port: Int) -> StreamRequest { - return stream(.stream(hostName: hostName, port: port)) - } - - // MARK: NetService - - /// Creates a `StreamRequest` for bidirectional streaming using the `netService`. - /// - /// If `startRequestsImmediately` is `true`, the request will have `resume()` called before being returned. - /// - /// - parameter netService: The net service used to identify the endpoint. - /// - /// - returns: The created `StreamRequest`. - @discardableResult - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - open func stream(with netService: NetService) -> StreamRequest { - return stream(.netService(netService)) - } - - // MARK: Private - Stream Implementation - - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - private func stream(_ streamable: StreamRequest.Streamable) -> StreamRequest { - do { - let task = try streamable.task(session: session, adapter: adapter, queue: queue) - let request = StreamRequest(session: session, requestTask: .stream(streamable, task)) - - delegate[task] = request - - if startRequestsImmediately { request.resume() } - - return request - } catch { - return stream(failedWith: error) - } - } - - @available(iOS 9.0, macOS 10.11, tvOS 9.0, *) - private func stream(failedWith error: Error) -> StreamRequest { - let stream = StreamRequest(session: session, requestTask: .stream(nil, nil), error: error) - if startRequestsImmediately { stream.resume() } - return stream - } - -#endif - - // MARK: - Internal - Retry Request - - func retry(_ request: Request) -> Bool { - guard let originalTask = request.originalTask else { return false } - - do { - let task = try originalTask.task(session: session, adapter: adapter, queue: queue) - - if let originalTask = request.task { - delegate[originalTask] = nil // removes the old request to avoid endless growth - } - - request.delegate.task = task // resets all task delegate data - - request.retryCount += 1 - request.startTime = CFAbsoluteTimeGetCurrent() - request.endTime = nil - - task.resume() - - return true - } catch { - request.delegate.error = error.underlyingAdaptError ?? error - return false - } - } - - private func allowRetrier(_ retrier: RequestRetrier, toRetry request: Request, with error: Error) { - DispatchQueue.utility.async { [weak self] in - guard let strongSelf = self else { return } - - retrier.should(strongSelf, retry: request, with: error) { shouldRetry, timeDelay in - guard let strongSelf = self else { return } - - guard shouldRetry else { - if strongSelf.startRequestsImmediately { request.resume() } - return - } - - DispatchQueue.utility.after(timeDelay) { - guard let strongSelf = self else { return } - - let retrySucceeded = strongSelf.retry(request) - - if retrySucceeded, let task = request.task { - strongSelf.delegate[task] = request - } else { - if strongSelf.startRequestsImmediately { request.resume() } - } - } - } - } - } -} diff --git a/Example/Pods/Alamofire/Source/TaskDelegate.swift b/Example/Pods/Alamofire/Source/TaskDelegate.swift deleted file mode 100644 index 5705737..0000000 --- a/Example/Pods/Alamofire/Source/TaskDelegate.swift +++ /dev/null @@ -1,466 +0,0 @@ -// -// TaskDelegate.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. -// - -import Foundation - -/// The task delegate is responsible for handling all delegate callbacks for the underlying task as well as -/// executing all operations attached to the serial operation queue upon task completion. -open class TaskDelegate: NSObject { - - // MARK: Properties - - /// The serial operation queue used to execute all operations after the task completes. - public let queue: OperationQueue - - /// The data returned by the server. - public var data: Data? { return nil } - - /// The error generated throughout the lifecyle of the task. - public var error: Error? - - var task: URLSessionTask? { - set { - taskLock.lock(); defer { taskLock.unlock() } - _task = newValue - } - get { - taskLock.lock(); defer { taskLock.unlock() } - return _task - } - } - - var initialResponseTime: CFAbsoluteTime? - var credential: URLCredential? - var metrics: AnyObject? // URLSessionTaskMetrics - - private var _task: URLSessionTask? { - didSet { reset() } - } - - private let taskLock = NSLock() - - // MARK: Lifecycle - - init(task: URLSessionTask?) { - _task = task - - self.queue = { - let operationQueue = OperationQueue() - - operationQueue.maxConcurrentOperationCount = 1 - operationQueue.isSuspended = true - operationQueue.qualityOfService = .utility - - return operationQueue - }() - } - - func reset() { - error = nil - initialResponseTime = nil - } - - // MARK: URLSessionTaskDelegate - - var taskWillPerformHTTPRedirection: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest) -> URLRequest?)? - var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? - var taskNeedNewBodyStream: ((URLSession, URLSessionTask) -> InputStream?)? - var taskDidCompleteWithError: ((URLSession, URLSessionTask, Error?) -> Void)? - - @objc(URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:) - func urlSession( - _ session: URLSession, - task: URLSessionTask, - willPerformHTTPRedirection response: HTTPURLResponse, - newRequest request: URLRequest, - completionHandler: @escaping (URLRequest?) -> Void) - { - var redirectRequest: URLRequest? = request - - if let taskWillPerformHTTPRedirection = taskWillPerformHTTPRedirection { - redirectRequest = taskWillPerformHTTPRedirection(session, task, response, request) - } - - completionHandler(redirectRequest) - } - - @objc(URLSession:task:didReceiveChallenge:completionHandler:) - func urlSession( - _ session: URLSession, - task: URLSessionTask, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - { - var disposition: URLSession.AuthChallengeDisposition = .performDefaultHandling - var credential: URLCredential? - - if let taskDidReceiveChallenge = taskDidReceiveChallenge { - (disposition, credential) = taskDidReceiveChallenge(session, task, challenge) - } else if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { - let host = challenge.protectionSpace.host - - if - let serverTrustPolicy = session.serverTrustPolicyManager?.serverTrustPolicy(forHost: host), - let serverTrust = challenge.protectionSpace.serverTrust - { - if serverTrustPolicy.evaluate(serverTrust, forHost: host) { - disposition = .useCredential - credential = URLCredential(trust: serverTrust) - } else { - disposition = .cancelAuthenticationChallenge - } - } - } else { - if challenge.previousFailureCount > 0 { - disposition = .rejectProtectionSpace - } else { - credential = self.credential ?? session.configuration.urlCredentialStorage?.defaultCredential(for: challenge.protectionSpace) - - if credential != nil { - disposition = .useCredential - } - } - } - - completionHandler(disposition, credential) - } - - @objc(URLSession:task:needNewBodyStream:) - func urlSession( - _ session: URLSession, - task: URLSessionTask, - needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) - { - var bodyStream: InputStream? - - if let taskNeedNewBodyStream = taskNeedNewBodyStream { - bodyStream = taskNeedNewBodyStream(session, task) - } - - completionHandler(bodyStream) - } - - @objc(URLSession:task:didCompleteWithError:) - func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { - if let taskDidCompleteWithError = taskDidCompleteWithError { - taskDidCompleteWithError(session, task, error) - } else { - if let error = error { - if self.error == nil { self.error = error } - - if - let downloadDelegate = self as? DownloadTaskDelegate, - let resumeData = (error as NSError).userInfo[NSURLSessionDownloadTaskResumeData] as? Data - { - downloadDelegate.resumeData = resumeData - } - } - - queue.isSuspended = false - } - } -} - -// MARK: - - -class DataTaskDelegate: TaskDelegate, URLSessionDataDelegate { - - // MARK: Properties - - var dataTask: URLSessionDataTask { return task as! URLSessionDataTask } - - override var data: Data? { - if dataStream != nil { - return nil - } else { - return mutableData - } - } - - var progress: Progress - var progressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? - - var dataStream: ((_ data: Data) -> Void)? - - private var totalBytesReceived: Int64 = 0 - private var mutableData: Data - - private var expectedContentLength: Int64? - - // MARK: Lifecycle - - override init(task: URLSessionTask?) { - mutableData = Data() - progress = Progress(totalUnitCount: 0) - - super.init(task: task) - } - - override func reset() { - super.reset() - - progress = Progress(totalUnitCount: 0) - totalBytesReceived = 0 - mutableData = Data() - expectedContentLength = nil - } - - // MARK: URLSessionDataDelegate - - var dataTaskDidReceiveResponse: ((URLSession, URLSessionDataTask, URLResponse) -> URLSession.ResponseDisposition)? - var dataTaskDidBecomeDownloadTask: ((URLSession, URLSessionDataTask, URLSessionDownloadTask) -> Void)? - var dataTaskDidReceiveData: ((URLSession, URLSessionDataTask, Data) -> Void)? - var dataTaskWillCacheResponse: ((URLSession, URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?)? - - func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - didReceive response: URLResponse, - completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) - { - var disposition: URLSession.ResponseDisposition = .allow - - expectedContentLength = response.expectedContentLength - - if let dataTaskDidReceiveResponse = dataTaskDidReceiveResponse { - disposition = dataTaskDidReceiveResponse(session, dataTask, response) - } - - completionHandler(disposition) - } - - func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - didBecome downloadTask: URLSessionDownloadTask) - { - dataTaskDidBecomeDownloadTask?(session, dataTask, downloadTask) - } - - func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { - if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } - - if let dataTaskDidReceiveData = dataTaskDidReceiveData { - dataTaskDidReceiveData(session, dataTask, data) - } else { - if let dataStream = dataStream { - dataStream(data) - } else { - mutableData.append(data) - } - - let bytesReceived = Int64(data.count) - totalBytesReceived += bytesReceived - let totalBytesExpected = dataTask.response?.expectedContentLength ?? NSURLSessionTransferSizeUnknown - - progress.totalUnitCount = totalBytesExpected - progress.completedUnitCount = totalBytesReceived - - if let progressHandler = progressHandler { - progressHandler.queue.async { progressHandler.closure(self.progress) } - } - } - } - - func urlSession( - _ session: URLSession, - dataTask: URLSessionDataTask, - willCacheResponse proposedResponse: CachedURLResponse, - completionHandler: @escaping (CachedURLResponse?) -> Void) - { - var cachedResponse: CachedURLResponse? = proposedResponse - - if let dataTaskWillCacheResponse = dataTaskWillCacheResponse { - cachedResponse = dataTaskWillCacheResponse(session, dataTask, proposedResponse) - } - - completionHandler(cachedResponse) - } -} - -// MARK: - - -class DownloadTaskDelegate: TaskDelegate, URLSessionDownloadDelegate { - - // MARK: Properties - - var downloadTask: URLSessionDownloadTask { return task as! URLSessionDownloadTask } - - var progress: Progress - var progressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? - - var resumeData: Data? - override var data: Data? { return resumeData } - - var destination: DownloadRequest.DownloadFileDestination? - - var temporaryURL: URL? - var destinationURL: URL? - - var fileURL: URL? { return destination != nil ? destinationURL : temporaryURL } - - // MARK: Lifecycle - - override init(task: URLSessionTask?) { - progress = Progress(totalUnitCount: 0) - super.init(task: task) - } - - override func reset() { - super.reset() - - progress = Progress(totalUnitCount: 0) - resumeData = nil - } - - // MARK: URLSessionDownloadDelegate - - var downloadTaskDidFinishDownloadingToURL: ((URLSession, URLSessionDownloadTask, URL) -> URL)? - var downloadTaskDidWriteData: ((URLSession, URLSessionDownloadTask, Int64, Int64, Int64) -> Void)? - var downloadTaskDidResumeAtOffset: ((URLSession, URLSessionDownloadTask, Int64, Int64) -> Void)? - - func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didFinishDownloadingTo location: URL) - { - temporaryURL = location - - guard - let destination = destination, - let response = downloadTask.response as? HTTPURLResponse - else { return } - - let result = destination(location, response) - let destinationURL = result.destinationURL - let options = result.options - - self.destinationURL = destinationURL - - do { - if options.contains(.removePreviousFile), FileManager.default.fileExists(atPath: destinationURL.path) { - try FileManager.default.removeItem(at: destinationURL) - } - - if options.contains(.createIntermediateDirectories) { - let directory = destinationURL.deletingLastPathComponent() - try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: true) - } - - try FileManager.default.moveItem(at: location, to: destinationURL) - } catch { - self.error = error - } - } - - func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - { - if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } - - if let downloadTaskDidWriteData = downloadTaskDidWriteData { - downloadTaskDidWriteData( - session, - downloadTask, - bytesWritten, - totalBytesWritten, - totalBytesExpectedToWrite - ) - } else { - progress.totalUnitCount = totalBytesExpectedToWrite - progress.completedUnitCount = totalBytesWritten - - if let progressHandler = progressHandler { - progressHandler.queue.async { progressHandler.closure(self.progress) } - } - } - } - - func urlSession( - _ session: URLSession, - downloadTask: URLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - { - if let downloadTaskDidResumeAtOffset = downloadTaskDidResumeAtOffset { - downloadTaskDidResumeAtOffset(session, downloadTask, fileOffset, expectedTotalBytes) - } else { - progress.totalUnitCount = expectedTotalBytes - progress.completedUnitCount = fileOffset - } - } -} - -// MARK: - - -class UploadTaskDelegate: DataTaskDelegate { - - // MARK: Properties - - var uploadTask: URLSessionUploadTask { return task as! URLSessionUploadTask } - - var uploadProgress: Progress - var uploadProgressHandler: (closure: Request.ProgressHandler, queue: DispatchQueue)? - - // MARK: Lifecycle - - override init(task: URLSessionTask?) { - uploadProgress = Progress(totalUnitCount: 0) - super.init(task: task) - } - - override func reset() { - super.reset() - uploadProgress = Progress(totalUnitCount: 0) - } - - // MARK: URLSessionTaskDelegate - - var taskDidSendBodyData: ((URLSession, URLSessionTask, Int64, Int64, Int64) -> Void)? - - func URLSession( - _ session: URLSession, - task: URLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - { - if initialResponseTime == nil { initialResponseTime = CFAbsoluteTimeGetCurrent() } - - if let taskDidSendBodyData = taskDidSendBodyData { - taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) - } else { - uploadProgress.totalUnitCount = totalBytesExpectedToSend - uploadProgress.completedUnitCount = totalBytesSent - - if let uploadProgressHandler = uploadProgressHandler { - uploadProgressHandler.queue.async { uploadProgressHandler.closure(self.uploadProgress) } - } - } - } -} diff --git a/Example/Pods/Alamofire/Source/Timeline.swift b/Example/Pods/Alamofire/Source/Timeline.swift deleted file mode 100644 index 596c1bd..0000000 --- a/Example/Pods/Alamofire/Source/Timeline.swift +++ /dev/null @@ -1,136 +0,0 @@ -// -// Timeline.swift -// -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. -// - -import Foundation - -/// Responsible for computing the timing metrics for the complete lifecycle of a `Request`. -public struct Timeline { - /// The time the request was initialized. - public let requestStartTime: CFAbsoluteTime - - /// The time the first bytes were received from or sent to the server. - public let initialResponseTime: CFAbsoluteTime - - /// The time when the request was completed. - public let requestCompletedTime: CFAbsoluteTime - - /// The time when the response serialization was completed. - public let serializationCompletedTime: CFAbsoluteTime - - /// The time interval in seconds from the time the request started to the initial response from the server. - public let latency: TimeInterval - - /// The time interval in seconds from the time the request started to the time the request completed. - public let requestDuration: TimeInterval - - /// The time interval in seconds from the time the request completed to the time response serialization completed. - public let serializationDuration: TimeInterval - - /// The time interval in seconds from the time the request started to the time response serialization completed. - public let totalDuration: TimeInterval - - /// Creates a new `Timeline` instance with the specified request times. - /// - /// - parameter requestStartTime: The time the request was initialized. Defaults to `0.0`. - /// - parameter initialResponseTime: The time the first bytes were received from or sent to the server. - /// Defaults to `0.0`. - /// - parameter requestCompletedTime: The time when the request was completed. Defaults to `0.0`. - /// - parameter serializationCompletedTime: The time when the response serialization was completed. Defaults - /// to `0.0`. - /// - /// - returns: The new `Timeline` instance. - public init( - requestStartTime: CFAbsoluteTime = 0.0, - initialResponseTime: CFAbsoluteTime = 0.0, - requestCompletedTime: CFAbsoluteTime = 0.0, - serializationCompletedTime: CFAbsoluteTime = 0.0) - { - self.requestStartTime = requestStartTime - self.initialResponseTime = initialResponseTime - self.requestCompletedTime = requestCompletedTime - self.serializationCompletedTime = serializationCompletedTime - - self.latency = initialResponseTime - requestStartTime - self.requestDuration = requestCompletedTime - requestStartTime - self.serializationDuration = serializationCompletedTime - requestCompletedTime - self.totalDuration = serializationCompletedTime - requestStartTime - } -} - -// MARK: - CustomStringConvertible - -extension Timeline: CustomStringConvertible { - /// The textual representation used when written to an output stream, which includes the latency, the request - /// duration and the total duration. - public var description: String { - let latency = String(format: "%.3f", self.latency) - let requestDuration = String(format: "%.3f", self.requestDuration) - let serializationDuration = String(format: "%.3f", self.serializationDuration) - let totalDuration = String(format: "%.3f", self.totalDuration) - - // NOTE: Had to move to string concatenation due to memory leak filed as rdar://26761490. Once memory leak is - // fixed, we should move back to string interpolation by reverting commit 7d4a43b1. - let timings = [ - "\"Latency\": " + latency + " secs", - "\"Request Duration\": " + requestDuration + " secs", - "\"Serialization Duration\": " + serializationDuration + " secs", - "\"Total Duration\": " + totalDuration + " secs" - ] - - return "Timeline: { " + timings.joined(separator: ", ") + " }" - } -} - -// MARK: - CustomDebugStringConvertible - -extension Timeline: CustomDebugStringConvertible { - /// The textual representation used when written to an output stream, which includes the request start time, the - /// initial response time, the request completed time, the serialization completed time, the latency, the request - /// duration and the total duration. - public var debugDescription: String { - let requestStartTime = String(format: "%.3f", self.requestStartTime) - let initialResponseTime = String(format: "%.3f", self.initialResponseTime) - let requestCompletedTime = String(format: "%.3f", self.requestCompletedTime) - let serializationCompletedTime = String(format: "%.3f", self.serializationCompletedTime) - let latency = String(format: "%.3f", self.latency) - let requestDuration = String(format: "%.3f", self.requestDuration) - let serializationDuration = String(format: "%.3f", self.serializationDuration) - let totalDuration = String(format: "%.3f", self.totalDuration) - - // NOTE: Had to move to string concatenation due to memory leak filed as rdar://26761490. Once memory leak is - // fixed, we should move back to string interpolation by reverting commit 7d4a43b1. - let timings = [ - "\"Request Start Time\": " + requestStartTime, - "\"Initial Response Time\": " + initialResponseTime, - "\"Request Completed Time\": " + requestCompletedTime, - "\"Serialization Completed Time\": " + serializationCompletedTime, - "\"Latency\": " + latency + " secs", - "\"Request Duration\": " + requestDuration + " secs", - "\"Serialization Duration\": " + serializationDuration + " secs", - "\"Total Duration\": " + totalDuration + " secs" - ] - - return "Timeline: { " + timings.joined(separator: ", ") + " }" - } -} diff --git a/Example/Pods/Alamofire/Source/Validation.swift b/Example/Pods/Alamofire/Source/Validation.swift index 5640789..1f702b9 100644 --- a/Example/Pods/Alamofire/Source/Validation.swift +++ b/Example/Pods/Alamofire/Source/Validation.swift @@ -1,7 +1,7 @@ // // Validation.swift // -// Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -25,19 +25,12 @@ import Foundation extension Request { - // MARK: Helper Types fileprivate typealias ErrorReason = AFError.ResponseValidationFailureReason - /// Used to represent whether validation was successful or encountered an error resulting in a failure. - /// - /// - success: The validation was successful. - /// - failure: The validation failed encountering the provided error. - public enum ValidationResult { - case success - case failure(Error) - } + /// Used to represent whether a validation succeeded or failed. + public typealias ValidationResult = Result fileprivate struct MIMEType { let type: String @@ -48,12 +41,7 @@ extension Request { init?(_ string: String) { let components: [String] = { let stripped = string.trimmingCharacters(in: .whitespacesAndNewlines) - - #if swift(>=3.2) let split = stripped[..<(stripped.range(of: ";")?.lowerBound ?? stripped.endIndex)] - #else - let split = stripped.substring(to: stripped.range(of: ";")?.lowerBound ?? stripped.endIndex) - #endif return split.components(separatedBy: "/") }() @@ -78,7 +66,7 @@ extension Request { // MARK: Properties - fileprivate var acceptableStatusCodes: [Int] { return Array(200..<300) } + fileprivate var acceptableStatusCodes: Range { return 200..<300 } fileprivate var acceptableContentTypes: [String] { if let accept = request?.value(forHTTPHeaderField: "Accept") { @@ -90,14 +78,12 @@ extension Request { // MARK: Status Code - fileprivate func validate( - statusCode acceptableStatusCodes: S, - response: HTTPURLResponse) + fileprivate func validate(statusCode acceptableStatusCodes: S, + response: HTTPURLResponse) -> ValidationResult - where S.Iterator.Element == Int - { + where S.Iterator.Element == Int { if acceptableStatusCodes.contains(response.statusCode) { - return .success + return .success(Void()) } else { let reason: ErrorReason = .unacceptableStatusCode(code: response.statusCode) return .failure(AFError.responseValidationFailed(reason: reason)) @@ -106,14 +92,12 @@ extension Request { // MARK: Content Type - fileprivate func validate( - contentType acceptableContentTypes: S, - response: HTTPURLResponse, - data: Data?) + fileprivate func validate(contentType acceptableContentTypes: S, + response: HTTPURLResponse, + data: Data?) -> ValidationResult - where S.Iterator.Element == String - { - guard let data = data, data.count > 0 else { return .success } + where S.Iterator.Element == String { + guard let data = data, data.count > 0 else { return .success(Void()) } guard let responseContentType = response.mimeType, @@ -121,7 +105,7 @@ extension Request { else { for contentType in acceptableContentTypes { if let mimeType = MIMEType(contentType), mimeType.isWildcard { - return .success + return .success(Void()) } } @@ -135,15 +119,13 @@ extension Request { for contentType in acceptableContentTypes { if let acceptableMIMEType = MIMEType(contentType), acceptableMIMEType.matches(responseMIMEType) { - return .success + return .success(Void()) } } let error: AFError = { - let reason: ErrorReason = .unacceptableContentType( - acceptableContentTypes: Array(acceptableContentTypes), - responseContentType: responseContentType - ) + let reason: ErrorReason = .unacceptableContentType(acceptableContentTypes: Array(acceptableContentTypes), + responseContentType: responseContentType) return AFError.responseValidationFailed(reason: reason) }() @@ -159,30 +141,6 @@ extension DataRequest { /// request was valid. public typealias Validation = (URLRequest?, HTTPURLResponse, Data?) -> ValidationResult - /// Validates the request, using the specified closure. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter validation: A closure to validate the request. - /// - /// - returns: The request. - @discardableResult - public func validate(_ validation: @escaping Validation) -> Self { - let validationExecution: () -> Void = { [unowned self] in - if - let response = self.response, - self.delegate.error == nil, - case let .failure(error) = validation(self.request, response, self.delegate.data) - { - self.delegate.error = error - } - } - - validations.append(validationExecution) - - return self - } - /// Validates that the response has a status code in the specified sequence. /// /// If validation fails, subsequent calls to response handlers will have an associated error. @@ -193,7 +151,7 @@ extension DataRequest { @discardableResult public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { return validate { [unowned self] _, response, _ in - return self.validate(statusCode: acceptableStatusCodes, response: response) + self.validate(statusCode: acceptableStatusCodes, response: response) } } @@ -205,9 +163,9 @@ extension DataRequest { /// /// - returns: The request. @discardableResult - public func validate(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String { + public func validate(contentType acceptableContentTypes: @escaping @autoclosure () -> S) -> Self where S.Iterator.Element == String { return validate { [unowned self] _, response, data in - return self.validate(contentType: acceptableContentTypes, response: response, data: data) + self.validate(contentType: acceptableContentTypes(), response: response, data: data) } } @@ -219,7 +177,10 @@ extension DataRequest { /// - returns: The request. @discardableResult public func validate() -> Self { - return validate(statusCode: self.acceptableStatusCodes).validate(contentType: self.acceptableContentTypes) + let contentTypes: () -> [String] = { [unowned self] in + self.acceptableContentTypes + } + return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes()) } } @@ -228,41 +189,11 @@ extension DataRequest { extension DownloadRequest { /// A closure used to validate a request that takes a URL request, a URL response, a temporary URL and a /// destination URL, and returns whether the request was valid. - public typealias Validation = ( - _ request: URLRequest?, - _ response: HTTPURLResponse, - _ temporaryURL: URL?, - _ destinationURL: URL?) + public typealias Validation = (_ request: URLRequest?, + _ response: HTTPURLResponse, + _ fileURL: URL?) -> ValidationResult - /// Validates the request, using the specified closure. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter validation: A closure to validate the request. - /// - /// - returns: The request. - @discardableResult - public func validate(_ validation: @escaping Validation) -> Self { - let validationExecution: () -> Void = { [unowned self] in - let request = self.request - let temporaryURL = self.downloadDelegate.temporaryURL - let destinationURL = self.downloadDelegate.destinationURL - - if - let response = self.response, - self.delegate.error == nil, - case let .failure(error) = validation(request, response, temporaryURL, destinationURL) - { - self.delegate.error = error - } - } - - validations.append(validationExecution) - - return self - } - /// Validates that the response has a status code in the specified sequence. /// /// If validation fails, subsequent calls to response handlers will have an associated error. @@ -272,8 +203,8 @@ extension DownloadRequest { /// - returns: The request. @discardableResult public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { - return validate { [unowned self] _, response, _, _ in - return self.validate(statusCode: acceptableStatusCodes, response: response) + return validate { [unowned self] _, response, _ in + self.validate(statusCode: acceptableStatusCodes, response: response) } } @@ -285,17 +216,15 @@ extension DownloadRequest { /// /// - returns: The request. @discardableResult - public func validate(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String { - return validate { [unowned self] _, response, _, _ in - let fileURL = self.downloadDelegate.fileURL - + public func validate(contentType acceptableContentTypes: @escaping @autoclosure () -> S) -> Self where S.Iterator.Element == String { + return validate { [unowned self] _, response, fileURL in guard let validFileURL = fileURL else { return .failure(AFError.responseValidationFailed(reason: .dataFileNil)) } do { let data = try Data(contentsOf: validFileURL) - return self.validate(contentType: acceptableContentTypes, response: response, data: data) + return self.validate(contentType: acceptableContentTypes(), response: response, data: data) } catch { return .failure(AFError.responseValidationFailed(reason: .dataFileReadFailed(at: validFileURL))) } @@ -310,6 +239,9 @@ extension DownloadRequest { /// - returns: The request. @discardableResult public func validate() -> Self { - return validate(statusCode: self.acceptableStatusCodes).validate(contentType: self.acceptableContentTypes) + let contentTypes = { [unowned self] in + self.acceptableContentTypes + } + return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes()) } } diff --git a/Example/Pods/Local Podspecs/RxNetwork.podspec.json b/Example/Pods/Local Podspecs/RxNetwork.podspec.json old mode 100644 new mode 100755 index 551f897..54c2d0d --- a/Example/Pods/Local Podspecs/RxNetwork.podspec.json +++ b/Example/Pods/Local Podspecs/RxNetwork.podspec.json @@ -1,6 +1,6 @@ { "name": "RxNetwork", - "version": "1.0.0-beta", + "version": "1.0.1-beta", "summary": "A swift network library based on Moya/RxSwift.", "homepage": "https://github.com/Pircate/RxNetwork", "license": { @@ -12,7 +12,7 @@ }, "source": { "git": "https://github.com/Pircate/RxNetwork.git", - "tag": "1.0.0-beta" + "tag": "1.0.1-beta" }, "platforms": { "ios": "10.0" @@ -26,7 +26,7 @@ "source_files": "RxNetwork/Classes/Core", "dependencies": { "Moya/RxSwift": [ - "14.0.0-alpha.1" + "14.0.0-beta2" ] } }, diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock old mode 100644 new mode 100755 index 7fa7f1f..ce8b193 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,18 +1,16 @@ PODS: - - Alamofire (4.8.2) - - CleanJSON (0.9.3) - - Moya/Core (14.0.0-alpha.1): - - Alamofire (~> 4.1) - - Result (~> 4.1) - - Moya/RxSwift (14.0.0-alpha.1): + - Alamofire (5.0.0-rc.2) + - CleanJSON (1.0.0) + - Moya/Core (14.0.0-beta.2): + - Alamofire (= 5.0.0-rc.2) + - Moya/RxSwift (14.0.0-beta.2): - Moya/Core - RxSwift (~> 5.0) - - Result (4.1.0) - - RxNetwork/Cacheable (1.0.0-beta): + - RxNetwork/Cacheable (1.0.1-beta): - RxNetwork/Core - Storable - - RxNetwork/Core (1.0.0-beta): - - Moya/RxSwift (= 14.0.0-alpha.1) + - RxNetwork/Core (1.0.1-beta): + - Moya/RxSwift (= 14.0.0-beta2) - RxSwift (5.0.0) - Storable (0.1.1) @@ -25,7 +23,6 @@ SPEC REPOS: - Alamofire - CleanJSON - Moya - - Result - RxSwift - Storable @@ -34,14 +31,13 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - Alamofire: ae5c501addb7afdbb13687d7f2f722c78734c2d3 - CleanJSON: e7e3950845b522326790ae0b114bc98102a33456 - Moya: 65485239114b3b327a17dc2e839f6c8b7143aae9 - Result: bd966fac789cc6c1563440b348ab2598cc24d5c7 - RxNetwork: d84d80e4aa6c8bfa6d674c7fbc35e85faf2dd596 + Alamofire: f9450d3c7f6bea2ad62e7a541c3e9b186c7991d6 + CleanJSON: 702dd619e1329c6399a579aa19af311acf47e461 + Moya: 788e592b92fadb10e30d350ed1a9f75c91eb1368 + RxNetwork: a48c6f96a5737620aab43ac53de5ec4382a08903 RxSwift: 8b0671caa829a763bbce7271095859121cbd895f Storable: 31d19a4f897d68d1f1843604b60e12e5c2e1db5f PODFILE CHECKSUM: 22eef8d19050091620bf8737b6cdd9363d3cd8ef -COCOAPODS: 1.7.3 +COCOAPODS: 1.7.5 diff --git a/Example/Pods/Moya/Sources/Moya/Endpoint.swift b/Example/Pods/Moya/Sources/Moya/Endpoint.swift index 96d31f5..dae0504 100755 --- a/Example/Pods/Moya/Sources/Moya/Endpoint.swift +++ b/Example/Pods/Moya/Sources/Moya/Endpoint.swift @@ -72,10 +72,10 @@ open class Endpoint { } /// Extension for converting an `Endpoint` into a `URLRequest`. -extension Endpoint { +public extension Endpoint { // swiftlint:disable cyclomatic_complexity /// Returns the `Endpoint` converted to a `URLRequest` if valid. Throws an error otherwise. - public func urlRequest() throws -> URLRequest { + func urlRequest() throws -> URLRequest { guard let requestURL = Foundation.URL(string: url) else { throw MoyaError.requestMapping(url) } diff --git a/Example/Pods/Moya/Sources/Moya/Moya+Alamofire.swift b/Example/Pods/Moya/Sources/Moya/Moya+Alamofire.swift index 8d4cd4a..4781317 100644 --- a/Example/Pods/Moya/Sources/Moya/Moya+Alamofire.swift +++ b/Example/Pods/Moya/Sources/Moya/Moya+Alamofire.swift @@ -1,7 +1,7 @@ import Foundation import Alamofire -public typealias Manager = Alamofire.SessionManager +public typealias Session = Alamofire.Session internal typealias Request = Alamofire.Request internal typealias DownloadRequest = Alamofire.DownloadRequest internal typealias UploadRequest = Alamofire.UploadRequest @@ -16,17 +16,22 @@ public typealias Method = Alamofire.HTTPMethod public typealias ParameterEncoding = Alamofire.ParameterEncoding public typealias JSONEncoding = Alamofire.JSONEncoding public typealias URLEncoding = Alamofire.URLEncoding -public typealias PropertyListEncoding = Alamofire.PropertyListEncoding /// Multipart form. public typealias RequestMultipartFormData = Alamofire.MultipartFormData /// Multipart form data encoding result. -public typealias MultipartFormDataEncodingResult = Manager.MultipartFormDataEncodingResult -public typealias DownloadDestination = Alamofire.DownloadRequest.DownloadFileDestination +public typealias DownloadDestination = Alamofire.DownloadRequest.Destination /// Make the Alamofire Request type conform to our type, to prevent leaking Alamofire to plugins. -extension Request: RequestType { } +extension Request: RequestType { + public var sessionHeaders: [String: String] { + return delegate?.sessionConfiguration.httpAdditionalHeaders as? [String: String] ?? [:] + } +} + +/// Represents Request interceptor type that can modify/act on Request +public typealias RequestInterceptor = Alamofire.RequestInterceptor /// Internal token that can be used to cancel requests public final class CancellableToken: Cancellable, CustomDebugStringConvertible { @@ -62,7 +67,7 @@ public final class CancellableToken: Cancellable, CustomDebugStringConvertible { guard let request = self.request else { return "Empty Request" } - return request.debugDescription + return request.cURLDescription() } } @@ -75,16 +80,45 @@ internal protocol Requestable { extension DataRequest: Requestable { internal func response(callbackQueue: DispatchQueue?, completionHandler: @escaping RequestableCompletion) -> Self { - return response(queue: callbackQueue) { handler in - completionHandler(handler.response, handler.request, handler.data, handler.error) + if let callbackQueue = callbackQueue { + return response(queue: callbackQueue) { handler in + completionHandler(handler.response, handler.request, handler.data, handler.error) + } + } else { + return response { handler in + completionHandler(handler.response, handler.request, handler.data, handler.error) + } } } } extension DownloadRequest: Requestable { internal func response(callbackQueue: DispatchQueue?, completionHandler: @escaping RequestableCompletion) -> Self { - return response(queue: callbackQueue) { handler in - completionHandler(handler.response, handler.request, nil, handler.error) + if let callbackQueue = callbackQueue { + return response(queue: callbackQueue) { handler in + completionHandler(handler.response, handler.request, nil, handler.error) + } + } else { + return response { handler in + completionHandler(handler.response, handler.request, nil, handler.error) + } } } } + +final class MoyaRequestInterceptor: RequestInterceptor { + + var prepare: ((URLRequest) -> URLRequest)? + var willSend: ((URLRequest) -> Void)? + + init(prepare: ((URLRequest) -> URLRequest)? = nil, willSend: ((URLRequest) -> Void)? = nil) { + self.prepare = prepare + self.willSend = willSend + } + + func adapt(_ urlRequest: URLRequest, for session: Alamofire.Session, completion: @escaping (Result) -> Void) { + let request = prepare?(urlRequest) ?? urlRequest + willSend?(request) + completion(.success(request)) + } +} diff --git a/Example/Pods/Moya/Sources/Moya/MoyaProvider+Defaults.swift b/Example/Pods/Moya/Sources/Moya/MoyaProvider+Defaults.swift index 10ff5a6..0f97f69 100644 --- a/Example/Pods/Moya/Sources/Moya/MoyaProvider+Defaults.swift +++ b/Example/Pods/Moya/Sources/Moya/MoyaProvider+Defaults.swift @@ -1,6 +1,6 @@ import Foundation -/// These functions are default mappings to `MoyaProvider`'s properties: endpoints, requests, manager, etc. +/// These functions are default mappings to `MoyaProvider`'s properties: endpoints, requests, session etc. public extension MoyaProvider { final class func defaultEndpointMapping(for target: Target) -> Endpoint { return Endpoint( @@ -25,12 +25,10 @@ public extension MoyaProvider { } } - final class func defaultAlamofireManager() -> Manager { + final class func defaultAlamofireSession() -> Session { let configuration = URLSessionConfiguration.default - configuration.httpAdditionalHeaders = Manager.defaultHTTPHeaders + configuration.headers = .default - let manager = Manager(configuration: configuration) - manager.startRequestsImmediately = false - return manager + return Session(configuration: configuration, startRequestsImmediately: false) } } diff --git a/Example/Pods/Moya/Sources/Moya/MoyaProvider+Internal.swift b/Example/Pods/Moya/Sources/Moya/MoyaProvider+Internal.swift index 4c9b710..5493bce 100644 --- a/Example/Pods/Moya/Sources/Moya/MoyaProvider+Internal.swift +++ b/Example/Pods/Moya/Sources/Moya/MoyaProvider+Internal.swift @@ -1,15 +1,14 @@ import Foundation -import Result // MARK: - Method -extension Method { +public extension Method { /// A Boolean value determining whether the request supports multipart. - public var supportsMultipart: Bool { + var supportsMultipart: Bool { switch self { case .post, .put, .patch, .connect: return true - case .get, .delete, .head, .options, .trace: + default: return false } } @@ -63,9 +62,6 @@ public extension MoyaProvider { return } - // Allow plugins to modify request - let preparedRequest = self.plugins.reduce(request) { $1.prepare($0, target: target) } - let networkCompletion: Moya.Completion = { result in if self.trackInflights { self.inflightRequests[endpoint]?.forEach { $0(result) } @@ -78,7 +74,7 @@ public extension MoyaProvider { } } - cancellableToken.innerCancellable = self.performRequest(target, request: preparedRequest, callbackQueue: callbackQueue, progress: progress, completion: networkCompletion, endpoint: endpoint, stubBehavior: stubBehavior) + cancellableToken.innerCancellable = self.performRequest(target, request: request, callbackQueue: callbackQueue, progress: progress, completion: networkCompletion, endpoint: endpoint, stubBehavior: stubBehavior) } requestClosure(endpoint, performNetworking) @@ -155,53 +151,68 @@ public extension MoyaProvider { /// Notify all plugins that a stub is about to be performed. You must call this if overriding `stubRequest`. final func notifyPluginsOfImpendingStub(for request: URLRequest, target: Target) { - let alamoRequest = manager.request(request as URLRequestConvertible) - plugins.forEach { $0.willSend(alamoRequest, target: target) } + let alamoRequest = session.request(request) + let preparedRequest = plugins.reduce(request) { $1.prepare($0, target: target) } + + let stubbedAlamoRequest = RequestTypeWrapper(request: alamoRequest, urlRequest: preparedRequest) + plugins.forEach { $0.willSend(stubbedAlamoRequest, target: target) } } } private extension MoyaProvider { - func sendUploadMultipart(_ target: Target, request: URLRequest, callbackQueue: DispatchQueue?, multipartBody: [MultipartFormData], progress: Moya.ProgressBlock? = nil, completion: @escaping Moya.Completion) -> CancellableWrapper { - let cancellable = CancellableWrapper() + private func interceptor(target: Target) -> MoyaRequestInterceptor { + return MoyaRequestInterceptor(prepare: { [weak self] urlRequest in + return self?.plugins.reduce(urlRequest) { $1.prepare($0, target: target) } ?? urlRequest + }) + } - let multipartFormData: (RequestMultipartFormData) -> Void = { form in - form.applyMoyaMultipartFormData(multipartBody) - } + private func setup(interceptor: MoyaRequestInterceptor, with target: Target, and request: Request) { + interceptor.willSend = { [weak self, weak request] urlRequest in + guard let self = self, let request = request else { return } - manager.upload(multipartFormData: multipartFormData, with: request) { result in - switch result { - case .success(let alamoRequest, _, _): - if cancellable.isCancelled { - self.cancelCompletion(completion, target: target) - return - } - let validationCodes = target.validationType.statusCodes - let validatedRequest = validationCodes.isEmpty ? alamoRequest : alamoRequest.validate(statusCode: validationCodes) - cancellable.innerCancellable = self.sendAlamofireRequest(validatedRequest, target: target, callbackQueue: callbackQueue, progress: progress, completion: completion) - case .failure(let error): - completion(.failure(MoyaError.underlying(error as NSError, nil))) - } + let stubbedAlamoRequest = RequestTypeWrapper(request: request, urlRequest: urlRequest) + self.plugins.forEach { $0.willSend(stubbedAlamoRequest, target: target) } } + } - return cancellable + func sendUploadMultipart(_ target: Target, request: URLRequest, callbackQueue: DispatchQueue?, multipartBody: [MultipartFormData], progress: Moya.ProgressBlock? = nil, completion: @escaping Moya.Completion) -> CancellableToken { + let formData = RequestMultipartFormData() + formData.applyMoyaMultipartFormData(multipartBody) + + let interceptor = self.interceptor(target: target) + let request = session.upload(multipartFormData: formData, with: request, interceptor: interceptor) + setup(interceptor: interceptor, with: target, and: request) + + let validationCodes = target.validationType.statusCodes + let validatedRequest = validationCodes.isEmpty ? request : request.validate(statusCode: validationCodes) + return sendAlamofireRequest(validatedRequest, target: target, callbackQueue: callbackQueue, progress: progress, completion: completion) } func sendUploadFile(_ target: Target, request: URLRequest, callbackQueue: DispatchQueue?, file: URL, progress: ProgressBlock? = nil, completion: @escaping Completion) -> CancellableToken { - let uploadRequest = manager.upload(file, with: request) + let interceptor = self.interceptor(target: target) + let uploadRequest = session.upload(file, with: request, interceptor: interceptor) + setup(interceptor: interceptor, with: target, and: uploadRequest) + let validationCodes = target.validationType.statusCodes let alamoRequest = validationCodes.isEmpty ? uploadRequest : uploadRequest.validate(statusCode: validationCodes) - return self.sendAlamofireRequest(alamoRequest, target: target, callbackQueue: callbackQueue, progress: progress, completion: completion) + return sendAlamofireRequest(alamoRequest, target: target, callbackQueue: callbackQueue, progress: progress, completion: completion) } func sendDownloadRequest(_ target: Target, request: URLRequest, callbackQueue: DispatchQueue?, destination: @escaping DownloadDestination, progress: ProgressBlock? = nil, completion: @escaping Completion) -> CancellableToken { - let downloadRequest = manager.download(request, to: destination) + let interceptor = self.interceptor(target: target) + let downloadRequest = session.download(request, interceptor: interceptor, to: destination) + setup(interceptor: interceptor, with: target, and: downloadRequest) + let validationCodes = target.validationType.statusCodes let alamoRequest = validationCodes.isEmpty ? downloadRequest : downloadRequest.validate(statusCode: validationCodes) - return self.sendAlamofireRequest(alamoRequest, target: target, callbackQueue: callbackQueue, progress: progress, completion: completion) + return sendAlamofireRequest(alamoRequest, target: target, callbackQueue: callbackQueue, progress: progress, completion: completion) } func sendRequest(_ target: Target, request: URLRequest, callbackQueue: DispatchQueue?, progress: Moya.ProgressBlock?, completion: @escaping Moya.Completion) -> CancellableToken { - let initialRequest = manager.request(request as URLRequestConvertible) + let interceptor = self.interceptor(target: target) + let initialRequest = session.request(request, interceptor: interceptor) + setup(interceptor: interceptor, with: target, and: initialRequest) + let validationCodes = target.validationType.statusCodes let alamoRequest = validationCodes.isEmpty ? initialRequest : initialRequest.validate(statusCode: validationCodes) return sendAlamofireRequest(alamoRequest, target: target, callbackQueue: callbackQueue, progress: progress, completion: completion) @@ -211,8 +222,6 @@ private extension MoyaProvider { func sendAlamofireRequest(_ alamoRequest: T, target: Target, callbackQueue: DispatchQueue?, progress progressCompletion: Moya.ProgressBlock?, completion: @escaping Moya.Completion) -> CancellableToken where T: Requestable, T: Request { // Give plugins the chance to alter the outgoing request let plugins = self.plugins - plugins.forEach { $0.willSend(alamoRequest, target: target) } - var progressAlamoRequest = alamoRequest let progressClosure: (Progress) -> Void = { progress in let sendProgress: () -> Void = { @@ -250,15 +259,16 @@ private extension MoyaProvider { // Inform all plugins about the response plugins.forEach { $0.didReceive(result, target: target) } if let progressCompletion = progressCompletion { + let value = try? result.get() switch progressAlamoRequest { case let downloadRequest as DownloadRequest: - progressCompletion(ProgressResponse(progress: downloadRequest.progress, response: result.value)) + progressCompletion(ProgressResponse(progress: downloadRequest.downloadProgress, response: value)) case let uploadRequest as UploadRequest: - progressCompletion(ProgressResponse(progress: uploadRequest.uploadProgress, response: result.value)) + progressCompletion(ProgressResponse(progress: uploadRequest.uploadProgress, response: value)) case let dataRequest as DataRequest: - progressCompletion(ProgressResponse(progress: dataRequest.progress, response: result.value)) + progressCompletion(ProgressResponse(progress: dataRequest.downloadProgress, response: value)) default: - progressCompletion(ProgressResponse(response: result.value)) + progressCompletion(ProgressResponse(response: value)) } } completion(result) diff --git a/Example/Pods/Moya/Sources/Moya/MoyaProvider.swift b/Example/Pods/Moya/Sources/Moya/MoyaProvider.swift index 07231e6..2fa8c96 100755 --- a/Example/Pods/Moya/Sources/Moya/MoyaProvider.swift +++ b/Example/Pods/Moya/Sources/Moya/MoyaProvider.swift @@ -1,5 +1,4 @@ import Foundation -import Result /// Closure to be executed when a request has completed. public typealias Completion = (_ result: Result) -> Void @@ -76,8 +75,7 @@ open class MoyaProvider: MoyaProviderType { /// of a request for a given `TargetType`. public let stubClosure: StubClosure - /// The manager for the session. - public let manager: Manager + public let session: Session /// A list of plugins. /// e.g. for logging, network activity indicator or credentials. @@ -95,14 +93,14 @@ open class MoyaProvider: MoyaProviderType { requestClosure: @escaping RequestClosure = MoyaProvider.defaultRequestMapping, stubClosure: @escaping StubClosure = MoyaProvider.neverStub, callbackQueue: DispatchQueue? = nil, - manager: Manager = MoyaProvider.defaultAlamofireManager(), + session: Session = MoyaProvider.defaultAlamofireSession(), plugins: [PluginType] = [], trackInflights: Bool = false) { self.endpointClosure = endpointClosure self.requestClosure = requestClosure self.stubClosure = stubClosure - self.manager = manager + self.session = session self.plugins = plugins self.trackInflights = trackInflights self.callbackQueue = callbackQueue diff --git a/Example/Pods/Moya/Sources/Moya/Plugin.swift b/Example/Pods/Moya/Sources/Moya/Plugin.swift index 3f5bd6c..47943f7 100644 --- a/Example/Pods/Moya/Sources/Moya/Plugin.swift +++ b/Example/Pods/Moya/Sources/Moya/Plugin.swift @@ -1,5 +1,4 @@ import Foundation -import Result /// A Moya Plugin receives callbacks to perform side effects wherever a request is sent or received. /// @@ -39,9 +38,12 @@ public protocol RequestType { /// Retrieve an `NSURLRequest` representation. var request: URLRequest? { get } + /// Additional headers appended to the request when added to the session. + var sessionHeaders: [String: String] { get } + /// Authenticates the request with a username and password. - func authenticate(user: String, password: String, persistence: URLCredential.Persistence) -> Self + func authenticate(username: String, password: String, persistence: URLCredential.Persistence) -> Self /// Authenticates the request with an `NSURLCredential` instance. - func authenticate(usingCredential credential: URLCredential) -> Self + func authenticate(with credential: URLCredential) -> Self } diff --git a/Example/Pods/Moya/Sources/Moya/Plugins/AccessTokenPlugin.swift b/Example/Pods/Moya/Sources/Moya/Plugins/AccessTokenPlugin.swift index e1234e2..1929fac 100644 --- a/Example/Pods/Moya/Sources/Moya/Plugins/AccessTokenPlugin.swift +++ b/Example/Pods/Moya/Sources/Moya/Plugins/AccessTokenPlugin.swift @@ -1,5 +1,4 @@ import Foundation -import Result // MARK: - AccessTokenAuthorizable diff --git a/Example/Pods/Moya/Sources/Moya/Plugins/CredentialsPlugin.swift b/Example/Pods/Moya/Sources/Moya/Plugins/CredentialsPlugin.swift index 5f22aab..88e1015 100644 --- a/Example/Pods/Moya/Sources/Moya/Plugins/CredentialsPlugin.swift +++ b/Example/Pods/Moya/Sources/Moya/Plugins/CredentialsPlugin.swift @@ -1,5 +1,4 @@ import Foundation -import Result /// Provides each request with optional URLCredentials. public final class CredentialsPlugin: PluginType { @@ -16,7 +15,7 @@ public final class CredentialsPlugin: PluginType { public func willSend(_ request: RequestType, target: TargetType) { if let credentials = credentialsClosure(target) { - _ = request.authenticate(usingCredential: credentials) + _ = request.authenticate(with: credentials) } } } diff --git a/Example/Pods/Moya/Sources/Moya/Plugins/NetworkActivityPlugin.swift b/Example/Pods/Moya/Sources/Moya/Plugins/NetworkActivityPlugin.swift index c900105..988e90f 100644 --- a/Example/Pods/Moya/Sources/Moya/Plugins/NetworkActivityPlugin.swift +++ b/Example/Pods/Moya/Sources/Moya/Plugins/NetworkActivityPlugin.swift @@ -1,5 +1,4 @@ import Foundation -import Result /// Network activity change notification type. public enum NetworkActivityChangeType { diff --git a/Example/Pods/Moya/Sources/Moya/Plugins/NetworkLoggerPlugin.swift b/Example/Pods/Moya/Sources/Moya/Plugins/NetworkLoggerPlugin.swift index cc91afe..7b937e4 100644 --- a/Example/Pods/Moya/Sources/Moya/Plugins/NetworkLoggerPlugin.swift +++ b/Example/Pods/Moya/Sources/Moya/Plugins/NetworkLoggerPlugin.swift @@ -1,114 +1,232 @@ import Foundation -import Result /// Logs network activity (outgoing requests and incoming responses). -public final class NetworkLoggerPlugin: PluginType { - fileprivate let loggerId = "Moya_Logger" - fileprivate let dateFormatString = "dd/MM/yyyy HH:mm:ss" - fileprivate let dateFormatter = DateFormatter() - fileprivate let separator = ", " - fileprivate let terminator = "\n" - fileprivate let cURLTerminator = "\\\n" - fileprivate let output: (_ separator: String, _ terminator: String, _ items: Any...) -> Void - fileprivate let requestDataFormatter: ((Data) -> (String))? - fileprivate let responseDataFormatter: ((Data) -> (Data))? - - /// A Boolean value determing whether response body data should be logged. - public let isVerbose: Bool - public let cURL: Bool +public final class NetworkLoggerPlugin { + + public var configuration: Configuration /// Initializes a NetworkLoggerPlugin. - public init(verbose: Bool = false, cURL: Bool = false, output: ((_ separator: String, _ terminator: String, _ items: Any...) -> Void)? = nil, requestDataFormatter: ((Data) -> (String))? = nil, responseDataFormatter: ((Data) -> (Data))? = nil) { - self.cURL = cURL - self.isVerbose = verbose - self.output = output ?? NetworkLoggerPlugin.reversedPrint - self.requestDataFormatter = requestDataFormatter - self.responseDataFormatter = responseDataFormatter + public init(configuration: Configuration = Configuration()) { + self.configuration = configuration } +} +// MARK: - PluginType +extension NetworkLoggerPlugin: PluginType { public func willSend(_ request: RequestType, target: TargetType) { - if let request = request as? CustomDebugStringConvertible, cURL { - output(separator, terminator, request.debugDescription) - return - } - outputItems(logNetworkRequest(request.request as URLRequest?)) + configuration.output(target, logNetworkRequest(request, target: target)) } public func didReceive(_ result: Result, target: TargetType) { - if case .success(let response) = result { - outputItems(logNetworkResponse(response.response, data: response.data, target: target)) - } else { - outputItems(logNetworkResponse(nil, data: nil, target: target)) - } - } - - fileprivate func outputItems(_ items: [String]) { - if isVerbose { - items.forEach { output(separator, terminator, $0) } - } else { - output(separator, terminator, items) + switch result { + case .success(let response): + configuration.output(target, logNetworkResponse(response, target: target, isFromError: false)) + case let .failure(error): + configuration.output(target, logNetworkError(error, target: target)) } } } +// MARK: - Logging private extension NetworkLoggerPlugin { - var date: String { - dateFormatter.dateFormat = dateFormatString - dateFormatter.locale = Locale(identifier: "en_US_POSIX") - return dateFormatter.string(from: Date()) - } + func logNetworkRequest(_ request: RequestType, target: TargetType) -> [String] { - func format(_ loggerId: String, date: String, identifier: String, message: String) -> String { - return "\(loggerId): [\(date)] \(identifier): \(message)" - } + //cURL formatting + if configuration.logOptions.contains(.formatRequestAscURL), + let request = request as? CustomDebugStringConvertible { + return [configuration.formatter.entry("Request", request.debugDescription, target)] + } - func logNetworkRequest(_ request: URLRequest?) -> [String] { + //Request presence check + guard let httpRequest = request.request else { + return [configuration.formatter.entry("Request", "(invalid request)", target)] + } + // Adding log entries for each given log option var output = [String]() - output += [format(loggerId, date: date, identifier: "Request", message: request?.description ?? "(invalid request)")] + output.append(configuration.formatter.entry("Request", httpRequest.description, target)) - if let headers = request?.allHTTPHeaderFields { - output += [format(loggerId, date: date, identifier: "Request Headers", message: headers.description)] + if configuration.logOptions.contains(.requestHeaders) { + var allHeaders = request.sessionHeaders + if let httpRequestHeaders = httpRequest.allHTTPHeaderFields { + allHeaders.merge(httpRequestHeaders) { $1 } + } + output.append(configuration.formatter.entry("Request Headers", allHeaders.description, target)) } - if let bodyStream = request?.httpBodyStream { - output += [format(loggerId, date: date, identifier: "Request Body Stream", message: bodyStream.description)] - } + if configuration.logOptions.contains(.requestBody) { + if let bodyStream = httpRequest.httpBodyStream { + output.append(configuration.formatter.entry("Request Body Stream", bodyStream.description, target)) + } - if let httpMethod = request?.httpMethod { - output += [format(loggerId, date: date, identifier: "HTTP Request Method", message: httpMethod)] + if let body = httpRequest.httpBody { + let stringOutput = configuration.formatter.requestData(body) + output.append(configuration.formatter.entry("Request Body", stringOutput, target)) + } } - if let body = request?.httpBody, let stringOutput = requestDataFormatter?(body) ?? String(data: body, encoding: .utf8), isVerbose { - output += [format(loggerId, date: date, identifier: "Request Body", message: stringOutput)] + if configuration.logOptions.contains(.requestMethod), + let httpMethod = httpRequest.httpMethod { + output.append(configuration.formatter.entry("HTTP Request Method", httpMethod, target)) } return output } - func logNetworkResponse(_ response: HTTPURLResponse?, data: Data?, target: TargetType) -> [String] { - guard let response = response else { - return [format(loggerId, date: date, identifier: "Response", message: "Received empty network response for \(target).")] + func logNetworkResponse(_ response: Response, target: TargetType, isFromError: Bool) -> [String] { + + //Response presence check + guard let httpResponse = response.response else { + return [configuration.formatter.entry("Response", "Received empty network response for \(target).", target)] } + // Adding log entries for each given log option var output = [String]() - output += [format(loggerId, date: date, identifier: "Response", message: response.description)] + output.append(configuration.formatter.entry("Response", httpResponse.description, target)) + + if (isFromError && configuration.logOptions.contains(.errorResponseBody)) + || configuration.logOptions.contains(.successResponseBody) { - if let data = data, let stringData = String(data: responseDataFormatter?(data) ?? data, encoding: String.Encoding.utf8), isVerbose { - output += [stringData] + let stringOutput = configuration.formatter.responseData(response.data) + output.append(configuration.formatter.entry("Response Body", stringOutput, target)) } return output } + + func logNetworkError(_ error: MoyaError, target: TargetType) -> [String] { + //Some errors will still have a response, like errors due to Alamofire's HTTP code validation. + if let moyaResponse = error.response { + return logNetworkResponse(moyaResponse, target: target, isFromError: true) + } + + //Errors without an HTTPURLResponse are those due to connectivity, time-out and such. + return [configuration.formatter.entry("Error", "Error calling \(target) : \(error)", target)] + } } -fileprivate extension NetworkLoggerPlugin { - static func reversedPrint(_ separator: String, terminator: String, items: Any...) { - for item in items { - print(item, separator: separator, terminator: terminator) +// MARK: - Configuration +public extension NetworkLoggerPlugin { + struct Configuration { + + // MARK: - Typealiases + // swiftlint:disable nesting + public typealias OutputType = (_ target: TargetType, _ items: [String]) -> Void + // swiftlint:enable nesting + + // MARK: - Properties + + public var formatter: Formatter + public var output: OutputType + public var logOptions: LogOptions + + /// The designated way to instanciate a Configuration. + /// + /// - Parameters: + /// - formatter: An object holding all formatter closures available for customization. + /// - output: A closure responsible for writing the given log entries into your log system. + /// The default value writes entries to the debug console. + /// - logOptions: A set of options you can use to customize which request component is logged. + public init(formatter: Formatter = Formatter(), + output: @escaping OutputType = defaultOutput, + logOptions: LogOptions = .default) { + self.formatter = formatter + self.output = output + self.logOptions = logOptions } + + // MARK: - Defaults + + public static func defaultOutput(target: TargetType, items: [String]) { + for item in items { + print(item, separator: ",", terminator: "\n") + } + } + } +} + +public extension NetworkLoggerPlugin.Configuration { + struct LogOptions: OptionSet { + public let rawValue: Int + public init(rawValue: Int) { self.rawValue = rawValue } + + /// The request's method will be logged. + public static let requestMethod: LogOptions = LogOptions(rawValue: 1 << 0) + /// The request's body will be logged. + public static let requestBody: LogOptions = LogOptions(rawValue: 1 << 1) + /// The request's headers will be logged. + public static let requestHeaders: LogOptions = LogOptions(rawValue: 1 << 2) + /// The request will be logged in the cURL format. + /// + /// If this option is used, the following components will be logged regardless of their respective options being set: + /// - request's method + /// - request's headers + /// - request's body. + public static let formatRequestAscURL: LogOptions = LogOptions(rawValue: 1 << 3) + /// The body of a response that is a success will be logged. + public static let successResponseBody: LogOptions = LogOptions(rawValue: 1 << 4) + /// The body of a response that is an error will be logged. + public static let errorResponseBody: LogOptions = LogOptions(rawValue: 1 << 5) + + //Aggregate options + /// Only basic components will be logged. + public static let `default`: LogOptions = [requestMethod, requestHeaders] + /// All components will be logged. + public static let verbose: LogOptions = [requestMethod, requestHeaders, requestBody, + successResponseBody, errorResponseBody] + } +} + +public extension NetworkLoggerPlugin.Configuration { + struct Formatter { + + // MARK: Typealiases + // swiftlint:disable nesting + public typealias DataFormatterType = (Data) -> (String) + public typealias EntryFormatterType = (_ identifier: String, _ message: String, _ target: TargetType) -> String + // swiftlint:enable nesting + + // MARK: Properties + + public var entry: EntryFormatterType + public var requestData: DataFormatterType + public var responseData: DataFormatterType + + /// The designated way to instanciate a Formatter. + /// + /// - Parameters: + /// - entry: The closure formatting a message into a new log entry. + /// - requestData: The closure converting HTTP request's body into a String. + /// The default value assumes the body's data is an utf8 String. + /// - responseData: The closure converting HTTP response's body into a String. + /// The default value assumes the body's data is an utf8 String. + public init(entry: @escaping EntryFormatterType = defaultEntryFormatter, + requestData: @escaping DataFormatterType = defaultDataFormatter, + responseData: @escaping DataFormatterType = defaultDataFormatter) { + self.entry = entry + self.requestData = requestData + self.responseData = responseData + } + + // MARK: Defaults + + public static func defaultDataFormatter(_ data: Data) -> String { + return String(data: data, encoding: .utf8) ?? "## Cannot map data to String ##" + } + + public static func defaultEntryFormatter(identifier: String, message: String, target: TargetType) -> String { + let date = defaultEntryDateFormatter.string(from: Date()) + return "Moya_Logger: [\(date)] \(identifier): \(message)" + } + + static var defaultEntryDateFormatter: DateFormatter = { + let formatter = DateFormatter() + formatter.timeStyle = .short + formatter.dateStyle = .short + return formatter + }() } } diff --git a/Example/Pods/Moya/Sources/RxMoya/Observable+Response.swift b/Example/Pods/Moya/Sources/RxMoya/Observable+Response.swift index ab4aa39..dfc32a6 100644 --- a/Example/Pods/Moya/Sources/RxMoya/Observable+Response.swift +++ b/Example/Pods/Moya/Sources/RxMoya/Observable+Response.swift @@ -11,57 +11,57 @@ import RxSwift #endif /// Extension for processing raw NSData generated by network access. -extension ObservableType where Element == Response { +public extension ObservableType where Element == Response { /// Filters out responses that don't fall within the given range, generating errors when others are encountered. - public func filter(statusCodes: R) -> Observable where R.Bound == Int { + func filter(statusCodes: R) -> Observable where R.Bound == Int { return flatMap { Observable.just(try $0.filter(statusCodes: statusCodes)) } } /// Filters out responses that has the specified `statusCode`. - public func filter(statusCode: Int) -> Observable { + func filter(statusCode: Int) -> Observable { return flatMap { Observable.just(try $0.filter(statusCode: statusCode)) } } /// Filters out responses where `statusCode` falls within the range 200 - 299. - public func filterSuccessfulStatusCodes() -> Observable { + func filterSuccessfulStatusCodes() -> Observable { return flatMap { Observable.just(try $0.filterSuccessfulStatusCodes()) } } /// Filters out responses where `statusCode` falls within the range 200 - 399 - public func filterSuccessfulStatusAndRedirectCodes() -> Observable { + func filterSuccessfulStatusAndRedirectCodes() -> Observable { return flatMap { Observable.just(try $0.filterSuccessfulStatusAndRedirectCodes()) } } /// Maps data received from the signal into an Image. If the conversion fails, the signal errors. - public func mapImage() -> Observable { + func mapImage() -> Observable { return flatMap { Observable.just(try $0.mapImage()) } } /// Maps data received from the signal into a JSON object. If the conversion fails, the signal errors. - public func mapJSON(failsOnEmptyData: Bool = true) -> Observable { + func mapJSON(failsOnEmptyData: Bool = true) -> Observable { return flatMap { Observable.just(try $0.mapJSON(failsOnEmptyData: failsOnEmptyData)) } } /// Maps received data at key path into a String. If the conversion fails, the signal errors. - public func mapString(atKeyPath keyPath: String? = nil) -> Observable { + func mapString(atKeyPath keyPath: String? = nil) -> Observable { return flatMap { Observable.just(try $0.mapString(atKeyPath: keyPath)) } } /// Maps received data at key path into a Decodable object. If the conversion fails, the signal errors. - public func map(_ type: D.Type, atKeyPath keyPath: String? = nil, using decoder: JSONDecoder = JSONDecoder(), failsOnEmptyData: Bool = true) -> Observable { + func map(_ type: D.Type, atKeyPath keyPath: String? = nil, using decoder: JSONDecoder = JSONDecoder(), failsOnEmptyData: Bool = true) -> Observable { return flatMap { Observable.just(try $0.map(type, atKeyPath: keyPath, using: decoder, failsOnEmptyData: failsOnEmptyData)) } } } -extension ObservableType where Element == ProgressResponse { +public extension ObservableType where Element == ProgressResponse { /** Filter completed progress response and maps to actual response - returns: response associated with ProgressResponse object */ - public func filterCompleted() -> Observable { + func filterCompleted() -> Observable { return self .filter { $0.completed } .flatMap { progress -> Observable in @@ -78,7 +78,7 @@ extension ObservableType where Element == ProgressResponse { - returns: observable of progress events */ - public func filterProgress() -> Observable { + func filterProgress() -> Observable { return self.filter { !$0.completed }.map { $0.progress } } } diff --git a/Example/Pods/Moya/Sources/RxMoya/Single+Response.swift b/Example/Pods/Moya/Sources/RxMoya/Single+Response.swift index 53adbe5..2902203 100644 --- a/Example/Pods/Moya/Sources/RxMoya/Single+Response.swift +++ b/Example/Pods/Moya/Sources/RxMoya/Single+Response.swift @@ -11,45 +11,45 @@ import RxSwift #endif /// Extension for processing raw NSData generated by network access. -extension PrimitiveSequence where Trait == SingleTrait, Element == Response { +public extension PrimitiveSequence where Trait == SingleTrait, Element == Response { /// Filters out responses that don't fall within the given closed range, generating errors when others are encountered. - public func filter(statusCodes: R) -> Single where R.Bound == Int { + func filter(statusCodes: R) -> Single where R.Bound == Int { return flatMap { .just(try $0.filter(statusCodes: statusCodes)) } } /// Filters out responses that have the specified `statusCode`. - public func filter(statusCode: Int) -> Single { + func filter(statusCode: Int) -> Single { return flatMap { .just(try $0.filter(statusCode: statusCode)) } } /// Filters out responses where `statusCode` falls within the range 200 - 299. - public func filterSuccessfulStatusCodes() -> Single { + func filterSuccessfulStatusCodes() -> Single { return flatMap { .just(try $0.filterSuccessfulStatusCodes()) } } /// Filters out responses where `statusCode` falls within the range 200 - 399 - public func filterSuccessfulStatusAndRedirectCodes() -> Single { + func filterSuccessfulStatusAndRedirectCodes() -> Single { return flatMap { .just(try $0.filterSuccessfulStatusAndRedirectCodes()) } } /// Maps data received from the signal into an Image. If the conversion fails, the signal errors. - public func mapImage() -> Single { + func mapImage() -> Single { return flatMap { .just(try $0.mapImage()) } } /// Maps data received from the signal into a JSON object. If the conversion fails, the signal errors. - public func mapJSON(failsOnEmptyData: Bool = true) -> Single { + func mapJSON(failsOnEmptyData: Bool = true) -> Single { return flatMap { .just(try $0.mapJSON(failsOnEmptyData: failsOnEmptyData)) } } /// Maps received data at key path into a String. If the conversion fails, the signal errors. - public func mapString(atKeyPath keyPath: String? = nil) -> Single { + func mapString(atKeyPath keyPath: String? = nil) -> Single { return flatMap { .just(try $0.mapString(atKeyPath: keyPath)) } } /// Maps received data at key path into a Decodable object. If the conversion fails, the signal errors. - public func map(_ type: D.Type, atKeyPath keyPath: String? = nil, using decoder: JSONDecoder = JSONDecoder(), failsOnEmptyData: Bool = true) -> Single { + func map(_ type: D.Type, atKeyPath keyPath: String? = nil, using decoder: JSONDecoder = JSONDecoder(), failsOnEmptyData: Bool = true) -> Single { return flatMap { .just(try $0.map(type, atKeyPath: keyPath, using: decoder, failsOnEmptyData: failsOnEmptyData)) } } } diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 4381bd9..02315e8 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -7,296 +7,284 @@ objects = { /* Begin PBXBuildFile section */ - 02D833D04B41753246FD50FFDD847344 /* Zip+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = A217530D24CDC3BA2E0405E7B27526C3 /* Zip+Collection.swift */; }; - 0323A61C53801A428D6EE1392673AA64 /* Queue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C5C3E8FC2320C938515A1D863D28525 /* Queue.swift */; }; - 04BE8EBE8919925CD4718D176E2DBDFE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B66D8C935AC36871C0BD83F0CD6170B /* Foundation.framework */; }; - 065795F57759EFC15C83A75677E68056 /* ValidationType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D7671785890B55A5043DE82BC9AA553 /* ValidationType.swift */; }; - 0774EC3F0D0D32595C320AA3EEEF9422 /* Moya.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E3F372C200DAA39C7197524D94DAE1BA /* Moya.framework */; }; - 08E05C4FFAE31D52C2D29D644C47A48A /* Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87358343A5D901F4521FFF81B0B479DF /* Deprecated.swift */; }; - 091FE0A8C071E11BB7A163E196C2A8CD /* _CleanJSONDecoder+Decode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 480B0F3BD8336820C115D3B6A90A1410 /* _CleanJSONDecoder+Decode.swift */; }; - 09595DBC0E98BF1329B4455CDB05DC8E /* Date+Dispatch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E7732F43DC6F5BC613923EE57A5852F /* Date+Dispatch.swift */; }; - 09E46E8940BAD71075B691A59ACF8025 /* DisposeBag.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA5FE89881BDDFA4543909C57ADDA9E3 /* DisposeBag.swift */; }; - 0B015A56B2FD1136509368B58F130E16 /* Storable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0D3709F813D9E7BC58AB2861169C868 /* Storable.swift */; }; - 0B1F0F2E26C82AD9ECD28EC6D9D4C5E7 /* Deferred.swift in Sources */ = {isa = PBXBuildFile; fileRef = 801227187A38C70B7CD65056C8540660 /* Deferred.swift */; }; - 0B881EBE3D58E0F705BF76D3D42958ED /* SingleAsync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67A470C8DC892EBB4DD7FE56F6BA899F /* SingleAsync.swift */; }; - 0C5E11DE24DAA737704B355F5F2F3426 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 024EA7D7B7A0C01327BB4C4FA42C0DDB /* ParameterEncoding.swift */; }; - 0CAB824B623CBEFAD7EC8AF1082E7BF8 /* Platform.Linux.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4E5F21CD364F77A83FDF0D2A5655D73 /* Platform.Linux.swift */; }; - 0F8FEE9B0E5BC0C3EE472E65C2859C5D /* Concat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EB9B86C292DD53F1AE6C75AC618F2E5 /* Concat.swift */; }; - 11241FCB6F537AA4A61B09428CD8224B /* Bag+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4CF6D434F6E074FA598BAA2C4B35459 /* Bag+Rx.swift */; }; - 11820EBFA8A95FEB359CD8AB71B33BFB /* ObserverBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DF4296505592B5D0FD5CC5BB0E26389 /* ObserverBase.swift */; }; - 11B8A307A4238186C6D8E733D4A5592F /* Defaultable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2865BAAD4EC1FB32BF75306DCE3B1524 /* Defaultable.swift */; }; - 120338CA7F41E1D063EAE5F0A3FCB85E /* MultiTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6FEABAC12B54E0C395879AABDF01D9F /* MultiTarget.swift */; }; - 121869235B8005EC2E00F5D76C8D01ED /* Completable+AndThen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 862992D9BE5907C7BCD1D1470C36FD9B /* Completable+AndThen.swift */; }; - 1314BCDBCF99A827D5F02AC78E2E8289 /* ConcurrentMainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 877918F3F6EED6DB6E729EDB9A1411D3 /* ConcurrentMainScheduler.swift */; }; - 132E0F619E4338E5D1B27E4C72076B3F /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEDE5F6D6258910BBAC86A2FC12706AE /* Notifications.swift */; }; - 136C2E9BF723164C92173621D65ABEE7 /* Cancelable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CC4500F93B4B104E17E70A09776FAFB /* Cancelable.swift */; }; - 16395D90A7735D8F4E0C19FF10F5B619 /* MoyaProvider+Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97CBC3466F1286E71A45E3FFA76CC0BF /* MoyaProvider+Defaults.swift */; }; - 1678953586828BD7DF98D5C6589496AF /* Delay.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA9A9C7AB975B17F9DE9B89754C95017 /* Delay.swift */; }; - 1945CD5D63A1C164AEAAA9A33E85571E /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B8DBF4C657F123B7370D7DB32158FFE1 /* Alamofire-dummy.m */; }; - 1986B50C74F1697EA43F68335C93CEB3 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 940148EFC161536FD6AFDFE736BCA498 /* MultipartFormData.swift */; }; - 1BC4D6D2C03C49C29FEEE4E62F6FD110 /* Empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D6B1411D5F87DCC322904F9E8DEBDF5 /* Empty.swift */; }; + 00FA97D56201027AEB1C7692A2C3CF8B /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C3D522855F74589774A16C6462EFD9DF /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0382B21403508B99FF3327D56E0AF692 /* ReplaySubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = E64F5D693192F855B882C1B714F01BEF /* ReplaySubject.swift */; }; + 0419772A87B16DB7DCF405A9E77D671F /* Protector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F3A668BE4FDB860BAF96CAF554A6F83 /* Protector.swift */; }; + 04796344A7C95D584655C5566DEACC6C /* DefaultIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91602304913C81BC608AA3B12FA2C240 /* DefaultIfEmpty.swift */; }; + 04BE8EBE8919925CD4718D176E2DBDFE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; + 0532D2ACCD5650B6FBF59C260047C3F5 /* Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 957282C5668E6B9BBDC2DC7E772A3CAA /* Rx.swift */; }; + 06507A26118BA5ACFBBC8C225776920E /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = A61C9FDA9C2DC77CC66404E5DC5F5839 /* Validation.swift */; }; + 0774EC3F0D0D32595C320AA3EEEF9422 /* Moya.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33B7AE29589319D1045D96DADFD3BF9D /* Moya.framework */; }; + 08C0D8E4EE5E91B97FDA34C8B1B84AC2 /* MainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB55F8DE2660F9D0DD03968E5A9E3F6E /* MainScheduler.swift */; }; + 091FE0A8C071E11BB7A163E196C2A8CD /* _CleanJSONDecoder+Decode.swift in Sources */ = {isa = PBXBuildFile; fileRef = E35801E05FCED24500A9100CEEFC1717 /* _CleanJSONDecoder+Decode.swift */; }; + 0AE06C3AEA6CA45342BA703230ABD2CB /* CachedResponseHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4046BB44E989FA26661B6373203DFCA /* CachedResponseHandler.swift */; }; + 0B015A56B2FD1136509368B58F130E16 /* Storable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06E4A17B86B13991A06D2DC3AB7F3FA0 /* Storable.swift */; }; + 0CC43FF0E31AA320ACFEB0FE6239DF34 /* ServerTrustEvaluation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 481D7ED739538C7E81FC6264A591FB08 /* ServerTrustEvaluation.swift */; }; + 10B973D93FB221BD387B7C658F77D443 /* SynchronizedOnType.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6BE32335045023EE6863CA98E374280 /* SynchronizedOnType.swift */; }; + 11B8A307A4238186C6D8E733D4A5592F /* Defaultable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 770E07B9D1850E6653372A7CF36A61AA /* Defaultable.swift */; }; + 13457FE4E607509A3B9527B0711033D5 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA20847C685812AF00A79990B6BAA989 /* ResponseSerialization.swift */; }; + 1349831CA5836315AB830BB7ECBF90E0 /* RxSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D26024B8191EBACE7D8A9880B82804A /* RxSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 14AB7976E100075ADEA0AB1DB833E72D /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7199297E549EDE7B1EB1BC3C8F9B9940 /* ParameterEncoding.swift */; }; + 15CB34CE32F8F418ADA0AFEB4586C4AF /* Producer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C8E26BC97A8DED0530AFC5BD39829CB /* Producer.swift */; }; + 15DE050167BCFC5A853464091B9AA007 /* AnyObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BC5936508BB7D22682646A8CB85E7D9 /* AnyObserver.swift */; }; + 162E961BCA06B5856EBE1128F5B578CD /* DispatchQueueConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1B3426F7AF9875D93107A68BD88C6C8 /* DispatchQueueConfiguration.swift */; }; + 167BAD406FED0F1C1E58A64F5D4AAE6E /* SerialDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 038FE19F91DF016528FED78E9115F12F /* SerialDisposable.swift */; }; + 16B528E1AC9C664E75440FE4A34497E2 /* Cancelable.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE7C1B6EB782CFC56290F959830E5184 /* Cancelable.swift */; }; + 17953A9CF2E354B3E69B9ABC2F367AD9 /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F4F1DCDF05BEB3F04B44C57826B6E9D /* AFError.swift */; }; + 1C387C185F4BBBE1283A5BED5ABA27DF /* Reduce.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFE1599E8ADF5C735CC90BFB1D717988 /* Reduce.swift */; }; 1C4D7D3091D1D3E44980C2B8BAE3430B /* OnCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC2CB346ED4ADE0D3CC2B16D179BC8B1 /* OnCache.swift */; }; - 1F31FA4CAAA1E818C08B5C545EAE6F7F /* ShareReplayScope.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26D5A18F2DD0172C5BF816F53C0C842E /* ShareReplayScope.swift */; }; - 1F46CCA1815FF46F59AB203EF1A8525D /* ScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = F19C37AD72A78C0C983C3315B920F431 /* ScheduledItem.swift */; }; - 21EF9008F4B0EB4613C90119946A6551 /* CleanJSON-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 99488A252B958375D5D1E8EE95D9778C /* CleanJSON-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 23246CF823DCA603DDB27F912B9A789D /* PriorityQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25EA3890AFB09F00B4C6CBDEDE6A200B /* PriorityQueue.swift */; }; - 23DCBBC6529D2DF91372B281BF0D7A02 /* ObserverType.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2C8E894D9A7DA056F8BB7785C13E455 /* ObserverType.swift */; }; - 2471127079F04AE182AF5498E85EB4B8 /* Merge.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2C320B56090A8F2C5AF19D07F5AEC4A /* Merge.swift */; }; - 25DEFB41AEB7E497B2DC49D86C079BA3 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A18BFC90176B7DAAF108031606624D89 /* Alamofire.framework */; }; - 2614F337EEC1F3C522BF5C8213F67CBB /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD4F6541B3C1185699540F4720830C9A /* Result.swift */; }; - 27A0F69DDF9E5EA1BD522EBDFD03686A /* AsyncSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80387FC519E22F2B2B49D3AFA0E212D0 /* AsyncSubject.swift */; }; - 285F7999321325C156441650B0539084 /* SynchronizedUnsubscribeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7789F26C8F2E0496E96A6FE451E8E41A /* SynchronizedUnsubscribeType.swift */; }; + 1F9AA48E0CE3132EAA10C2778F554B7E /* Skip.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC534BF69BF4BEBF349DCF903F148AF1 /* Skip.swift */; }; + 20006DEED67151188A24C6723CF7B230 /* Do.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CF66E4C2CB94F6F43B1E691EA0E2231 /* Do.swift */; }; + 20533020B628BCC085D1E0CBC0FF8455 /* URL+Moya.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1BEF04B058DFE32D41D2ADB0346E7B9 /* URL+Moya.swift */; }; + 20ABCF3A27659A9F98E3B2DF11A3E6FC /* Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 837BF293A2A9E426CD22790E32C9C234 /* Deprecated.swift */; }; + 21B0F16982CCF2E0C9D290177BB1F095 /* LockOwnerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAA477DC2A7EE71C837912B943C66EB9 /* LockOwnerType.swift */; }; + 21EF9008F4B0EB4613C90119946A6551 /* CleanJSON-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CF25362BD77D1C26F575845566A7A52 /* CleanJSON-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 22E5874E46AC1CE4CBC8FC662CC55C0C /* ObserverType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 263889CE19EB5C22C1DFE6E75BDF5AE9 /* ObserverType.swift */; }; + 2374D677D92A5059C3149F389B92CA5D /* Single.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62A0CE3B22BC0B6704044CE6929E2AAF /* Single.swift */; }; + 238E56DC535790541C2F3579A5A05AE8 /* Bag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 175ADB815798C35EAE61A42C01BAF510 /* Bag.swift */; }; + 24D8CBA3A7CE6C4670EF7C46D057C55C /* ConnectableObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80B701110F9D39B161D4B6443680FB85 /* ConnectableObservableType.swift */; }; + 2679D07BD27F89352BA304303224430D /* Just.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4AE47EF154E4204A4E65751F8F7E839 /* Just.swift */; }; + 27D17E9A74CD7336DD27E42FE3A20048 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; 2884BDC6DBADE015FA465D06FA6300F6 /* TargetType+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = D81A3288820421CA37D5D3C9485FF92F /* TargetType+Rx.swift */; }; - 29432DBDCD23EF640DAFF2962E45E8B5 /* Optional.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAE93D164F26813DD5276E43F2A9999A /* Optional.swift */; }; - 2AE2ACD4E57C6FF386DEA034A78572D4 /* DecodingStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6878A3D28CCE246541B8A26B4EBAF6F9 /* DecodingStrategy.swift */; }; - 2C1D0CBBA13D012D54497FC3EF998864 /* CleanJSONDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B2B627F2DA4602B785859CD89D41EB2 /* CleanJSONDecoder.swift */; }; - 2C61B040BA6A9A7AE66C4D9BA26D5520 /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C4B8F82613FF1A59E88D066306DAA5A /* SessionDelegate.swift */; }; - 2D4CE23A0975D977928C79D381DD79BE /* NoError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26447F7A81B0685F31D812013E2FD571 /* NoError.swift */; }; - 2E265640FBE3959C1429D6F47C9ED01C /* TargetType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 103BFFAC6E40D7EA3D467DC94D3D0F7D /* TargetType.swift */; }; - 2E6293FB04BED169AD1B614152353B1C /* Range.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6D02DB3C808412802654FEA252DDCE7 /* Range.swift */; }; - 2E93082DE5C3CA63C18B656872776C93 /* Pods-RxNetwork_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BBF5DA155317CA881B91CF1DDE6EF8F /* Pods-RxNetwork_Example-dummy.m */; }; - 304348ADBB6B73EB136AA692F5EE2CEA /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = 826BB238AF8D2DF3C0B3B83BFD8A89C2 /* Event.swift */; }; - 3156598674F07E566AC294693D811920 /* Generate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 109024142E2C5E7A30BAB7DFF67E4F15 /* Generate.swift */; }; - 324E989418751271D45A425315FF2A1D /* PublishSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E82D8BD9ADE36721105B7BDF95ED385 /* PublishSubject.swift */; }; - 329CD2AFDE8484F6307A82C3565B3747 /* Moya+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82D640E71F821B4FBF081C6A290064B9 /* Moya+Alamofire.swift */; }; - 32DE376DCFCB87B29020CD3E29F81BF1 /* MoyaError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C6E87C52334FE85DB9052CA9ADFFA51 /* MoyaError.swift */; }; - 332E55685B00BBB30DCEE7B7F03ED694 /* TakeLast.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9460DD6D919A36951EE3D58A709038A /* TakeLast.swift */; }; - 338F84A5A46770FB148E7E4677275F2E /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2BD9F570439B97484E91A1599F5148B /* MultipartFormData.swift */; }; - 34E1BC9D1970D804A5D837C86224ABE1 /* RxSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F2A5F066478E1EEDABC313C717040322 /* RxSwift-dummy.m */; }; - 353B5E8857906440A1C34CD745BCAB28 /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 392893BEA86DF791410026FE8221C3AE /* CompactMap.swift */; }; - 3571F958A3907B3A806E62D50C2550D4 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 615753299734045C0DD8A27DCC14AE1B /* NetworkReachabilityManager.swift */; }; - 36DD088342598DF3C033711008D6ED32 /* GroupBy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 940E0BBF501F4A300D0021046496FE81 /* GroupBy.swift */; }; - 3786FA53442C441AB02BF1E03462BF03 /* DisposeBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0033AA56A9BDB0EE60CBB527DE4F883 /* DisposeBase.swift */; }; + 2A0B7C366BEF1DA021BBF70D5024627E /* StartWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3710215F4405D61FD1A9C2F0A16B3802 /* StartWith.swift */; }; + 2AE2ACD4E57C6FF386DEA034A78572D4 /* DecodingStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 621E3483BB03CACA14EA24471EE82988 /* DecodingStrategy.swift */; }; + 2B5F202260E63B8BA44425778ADFC4B5 /* CombineLatest+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A44EAF6108B38D69C98B832186F762F /* CombineLatest+Collection.swift */; }; + 2C1D0CBBA13D012D54497FC3EF998864 /* CleanJSONDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 064C77F2FA7A326D7EA8D53FA1C437D1 /* CleanJSONDecoder.swift */; }; + 2D64BC669DA212DBF33189D9A750521A /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D3427D9F3C5D00EA9CDA4CE91EE091 /* Response.swift */; }; + 2F0D3D2291277275F604063A788360FA /* TakeUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61D6CA746419B5F8C8A66C4F282B4A16 /* TakeUntil.swift */; }; + 2F536C2AF3B103298C6C094BB4A7FD37 /* Moya-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F8BFE4BE4F8B73C513A7AF3690DA5DB /* Moya-dummy.m */; }; + 2FD5653F8A16107C1CF16BD0016D464B /* Sample.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1F46CEC9A444CD1F2C933728A1A0261 /* Sample.swift */; }; + 2FF96A3B5939EC3BF89F1B6EA7839065 /* Multicast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68BCEA9418E28101583E11BC73556B8B /* Multicast.swift */; }; + 32BE7904E1C29B3CE8C38F9692B75EBC /* Task.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFFBEA36FF4978E1AE57BEDB7A2BC0AB /* Task.swift */; }; + 35AAA0FF9EC67EAB5504B30080B271B8 /* CurrentThreadScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCAE48409BC07F345CD97CC478FAAF4D /* CurrentThreadScheduler.swift */; }; + 36E9AAC8889EAE48797EA35F978BABFE /* DelaySubscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7D427802B6C9CE0319FB85B28FE4B59 /* DelaySubscription.swift */; }; + 386C181A96676A4F379C4CF2F2630CDB /* AnonymousObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49A2C1D9C92F53AB8857555AA48D8E4F /* AnonymousObserver.swift */; }; 38CF07FCADB03926D1044B3E82BEB60D /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D121C06397586C34177246B57D7862B /* Configuration.swift */; }; - 38F78B05357CE8FE5B2DF694FF52AA89 /* GroupedObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DA7CE3FA675C27EC7531424D601E4D6 /* GroupedObservable.swift */; }; - 39E6C55935090828DC10A4AB3730B0F4 /* Storable-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7379795ED8FA1D61822A8B9006590D64 /* Storable-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3D36D5E39E92F0D7E8DED8DC7191E445 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B473CA79DC00D5023F081186B253959 /* RxSwift.framework */; }; - 3E1656CAA01EF828DF429E152BF70A12 /* URL+Moya.swift in Sources */ = {isa = PBXBuildFile; fileRef = A21383201ED0A5CA1C36C38F51FA3739 /* URL+Moya.swift */; }; - 3E38D1C50CFAD4E26E72D1ABC0C58B07 /* Observable.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDD0C1DC5FEC301AAEF235118622BF21 /* Observable.swift */; }; - 3EB8928A952A649C6FF9C0545A4F512E /* Result-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A1657C8E1E54D4E9C0A1F291FDD728F /* Result-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 39032686C6699D0C73F6624B2353153B /* Amb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A298A1BD371BDDF1B3E5D7EECC3845E /* Amb.swift */; }; + 398F7FA52F7E61329E0874F5668BF5EF /* ObservableType+PrimitiveSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E0C66DF27398C5D3096DDAE92D4736D /* ObservableType+PrimitiveSequence.swift */; }; + 39E6C55935090828DC10A4AB3730B0F4 /* Storable-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E697A997BFA592B3F42528C00EE3FCC6 /* Storable-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3AE2A890E38BBF1090C56D1F71DD7BEC /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 887DA39FFD9CF440698575DBDBB38533 /* CompactMap.swift */; }; + 3C49040F90772F3D25A7967CB2244A97 /* RxMutableBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D1EAD5660345F2842931BB2F20B7114 /* RxMutableBox.swift */; }; + 3C948C15D45C1ACB43D0109AD150DD37 /* SchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8609F5716C4E9428EE5B36B89411E31B /* SchedulerType.swift */; }; + 3CAC4510987ECD76E66C8436897B7E5E /* DispatchQueue+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57E212D5A4117757354B0713D214D3C6 /* DispatchQueue+Extensions.swift */; }; + 3D72F53B4DEF14B79BDE94196F072F42 /* NetworkActivityPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 959132636FAD71C3E674126894F528C9 /* NetworkActivityPlugin.swift */; }; + 3E07E92EB47EDF27A84D979A1A537983 /* Single+Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB72F82649E5D6FCD8D105BF6E7DD562 /* Single+Response.swift */; }; 3EBB3E7924CCFE938B76929457BF23CE /* CachingKey+Moya.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AE6037437F12CA130ACE6A16A2CCA06 /* CachingKey+Moya.swift */; }; - 3F847052B495858D45CA26176A8B3FD0 /* Scan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FBF4F372924B7A26D2E873EC5310C52 /* Scan.swift */; }; - 41E1193E9078A609684A15A3E4ED2E8F /* MainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32CD5C54D21440E751214150F0A09075 /* MainScheduler.swift */; }; - 425340CA98D6F944B1112D62B6C0A1D7 /* NopDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92A3B3C356E05FEB86BFBD27E55708E8 /* NopDisposable.swift */; }; - 42535C9035B77B20A7CA41E71D2FE57B /* Producer.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFD965EB47F82C6AE205F4EC8BB9BA63 /* Producer.swift */; }; - 434AFF6CA325C4EE81DF5F3430116ABD /* Sample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D436E030C2D3F97A16F08D9D699D5E0 /* Sample.swift */; }; - 439542740E764BFA1F48D274C22E3BF3 /* Reactive.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77889CE0FA23657557BCA936F33AC862 /* Reactive.swift */; }; - 443C92502E3FAB86A304206C1B46201A /* SwitchIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC52766E964A2DFA0D2EF71F7F2CEED0 /* SwitchIfEmpty.swift */; }; - 449B237EF52A78C7ADFC3F0A8BA4C043 /* Materialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = A627E2E6E7679AACBF174B6B0004910E /* Materialize.swift */; }; - 46AC93DD8F10B64A012884BADE831B04 /* ConcurrentDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1F86D524D03550F673489574B0D775B /* ConcurrentDispatchQueueScheduler.swift */; }; + 4082513A35C682F2193D002C80F72B79 /* Result+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2617C3A7C5B9307CD29E748E3C8A1BE /* Result+Alamofire.swift */; }; + 40BAAA426379DB35F2487D7074F4F7A1 /* SynchronizedDisposeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A84004A757167A55FF499FBA38C96863 /* SynchronizedDisposeType.swift */; }; + 40C99AD4D80E7AE683F69BD28F77864A /* BooleanDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 106010F786B00382064BEC7285066EAA /* BooleanDisposable.swift */; }; + 427A0635A2E6E28B4A3A816E242B4E37 /* BehaviorSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD4F5F29B9F841EDFCC338661F69C29 /* BehaviorSubject.swift */; }; + 42CDB5C986C78BBC8E5C0185F746CABF /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA9ED278802AC08987B98CCBA8938734 /* SessionDelegate.swift */; }; + 4347316F35AE1AE0AC7A6BE5C92E885B /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A6EAEC21684544BD94E4F5F389AE039 /* Event.swift */; }; + 43FDF5ABE2F18F0B5C933E70C17A809C /* CompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F466DB24369FFA9C876D1159D3EC7B5 /* CompositeDisposable.swift */; }; + 44127C4B989C9CC6A90D78B66A929A5E /* AlamofireExtended.swift in Sources */ = {isa = PBXBuildFile; fileRef = B99FCD857F9FC1E1732BF85DE8B0DAF3 /* AlamofireExtended.swift */; }; + 445F4CB3833C4C1858A745645C25AD2C /* Take.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37B911B1EA77CBDF7B73DBDC7BFD06D5 /* Take.swift */; }; + 450C5E66131BFB4BC0C131E5A59116F6 /* ConcurrentDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5068721A4B673383C14D763B739D0F6A /* ConcurrentDispatchQueueScheduler.swift */; }; 46C6A873F48B33D0D2BAEF82CF17DFCC /* Single+Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8936BBCF5565CBC7816671C7210C68AC /* Single+Cache.swift */; }; - 47B7C3430E561BFE798B4F001B0B16B2 /* Using.swift in Sources */ = {isa = PBXBuildFile; fileRef = C46EB0A1058A5F883D191CBEF78389F9 /* Using.swift */; }; - 48708EFA55C27A9B9D3AE64EE0249218 /* Platform.Darwin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98A7E1F3FF08F854BF270ECCE4F89CC6 /* Platform.Darwin.swift */; }; - 4A648768EE519CD63B393490AA6AAB3E /* SchedulerServices+Emulation.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB53EDF330673B7E3722CEED52EFAA06 /* SchedulerServices+Emulation.swift */; }; - 4B4B9439D5E14B9233B18E66715153D4 /* Dematerialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EFCA4D2614BAE878327E5D1CF0E38D9 /* Dematerialize.swift */; }; - 4B91CEDF27A50F8D344281A4FF43D107 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38B84F4DDE9EC97C7658466A4F61D8CC /* Errors.swift */; }; - 4CC203C24C555389A532542053666F57 /* Just.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBA0D6C32A9B10D1E69850A7C4871D69 /* Just.swift */; }; - 4DBDC234147229C02A8D379242E17038 /* Debounce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5A2A4DEB1CD2B886870C3B065ECDFE /* Debounce.swift */; }; - 4DC36B93D7B6572E946D298D2B971E2B /* AnyObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 123CE5581310E493B28137A7D1923CB7 /* AnyObserver.swift */; }; - 4F5B6E658FB0D8A9456FACD1A7B9C0D1 /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9201C1B93547FA42711EEFC2506420A3 /* Error.swift */; }; - 511A936C7C9F535B044082D1C5C25E3F /* Pods-RxNetwork_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A4E724893CF26E0AFE980F6D1A1AF727 /* Pods-RxNetwork_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 51E52E2FD35BC764AC307F78F5A2F586 /* CompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D57F7C58CAE8463331DAE95C12C191F /* CompositeDisposable.swift */; }; - 53791F5E5F07400F92CFDFC89A432305 /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7F58B0187C36D13D5AFD27DB46819CF /* Validation.swift */; }; - 5380058DAC0302E4C17D73438C75C2D9 /* Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = D77E4E90796539A09CD3F94E2EB07C62 /* Rx.swift */; }; - 53BC2F344EACCAE8F097DAA4BE505CF9 /* ToJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CFDD9DF388C7500BE0CA9EC9430868F /* ToJSON.swift */; }; - 549171A00FBEA590B5B21BC0FDB2E372 /* HistoricalSchedulerTimeConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6D197B36BC69B453F44708E10DF6392 /* HistoricalSchedulerTimeConverter.swift */; }; - 58C5C23A286C6E7ECC37356BD09770FE /* String+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99C694C106C4D52B5E35CFC2329515A8 /* String+Rx.swift */; }; + 471D3D6EDE67F8F777383DC780F4EB47 /* GroupedObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 391E68D2C7A74AE68CF263AA0C1AAA66 /* GroupedObservable.swift */; }; + 482971279D142473EEE3991BDE7BA1CE /* RetryWhen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5156953DD1D83F2B9DF2091FCFCDAEA9 /* RetryWhen.swift */; }; + 485E14141484EF943B5921F0C630C4D2 /* Moya-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 924A2EC1B9F2476BA368A519BC3C894E /* Moya-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 48D97BE7D5CAED273BD2341C239CC934 /* RequestTaskMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1243248DEF75E4E4DB7DB2960DDBAC6F /* RequestTaskMap.swift */; }; + 4A58926B25B353762E5C5E9DDC3663B1 /* Moya+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 166E06420075A86024865085456EB41C /* Moya+Alamofire.swift */; }; + 4B66393BC7CD9C62F326692C1B4E5358 /* RefCountDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A477CFE1FB1F7D21971FB8489E55038B /* RefCountDisposable.swift */; }; + 4C9F9203E47771CF126244603AC7010E /* SkipUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB2181CDF5E277CC3BF3776D0DE23568 /* SkipUntil.swift */; }; + 4DBEBC1C46655FE4482E162B0F962E7C /* Completable+AndThen.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE6017678DC20784DE0E2AD55B4F04DB /* Completable+AndThen.swift */; }; + 4E324C8232C73ACE88495E322AF4A10D /* Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78265D97A9DC9F491966430125C34339 /* Window.swift */; }; + 4FB1B6D22195C720218293530FB1EF0E /* MoyaProvider+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 356880B4C0B320DE90D2184D116E44D2 /* MoyaProvider+Rx.swift */; }; + 52C34E90DCA475F252D13959B66066EB /* RecursiveLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0B13F674DBE3EFB389C8FC0E0EEBB4C /* RecursiveLock.swift */; }; + 537150742875A0BC7F10C7AEA95E90A0 /* ImmediateSchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD67D8AC270144AC44224D8501D46FBE /* ImmediateSchedulerType.swift */; }; + 5398591055AC984105B2FC37BCD5C635 /* InvocableScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2EE4EDA23D55A1A3A024127D814BDEB /* InvocableScheduledItem.swift */; }; + 53BC2F344EACCAE8F097DAA4BE505CF9 /* ToJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3B5139E54D26E6D005B206C90FBC49E /* ToJSON.swift */; }; + 53DF164D8ED7CE192538270A6E44BC5D /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6716FB482B8FB850D691E513742282 /* Image.swift */; }; + 5595FBEF79641901DEF6630C8B3E44D0 /* Maybe.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA41BF945051BA5E92804FFAD6DE5491 /* Maybe.swift */; }; + 567943E7E3072AC8F5ADAA9E66E21F92 /* Platform.Linux.swift in Sources */ = {isa = PBXBuildFile; fileRef = 464A6A21FCFFC435CEB6FF433C2835B6 /* Platform.Linux.swift */; }; + 56EC8ED1535DAB987F3D2B71D4C05773 /* HTTPHeaders.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8330A5B5A3E68AD688C14ED063E1C812 /* HTTPHeaders.swift */; }; + 577F13C1954C9B6A65959FA98CC84FCD /* Scan.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDF5778FD5870156AA7E9BBF3B8AB023 /* Scan.swift */; }; + 5856209957EE2833E86DB346D25BAB3A /* SubscriptionDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B056FB16307BDF73A5E862E88073DF61 /* SubscriptionDisposable.swift */; }; + 58B49162649FA9E9D9488581E8C4C8CC /* Bag+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24377677E869B58AFF6FC7E269547304 /* Bag+Rx.swift */; }; 593DED6A4AC89E3C71F91E6BC5504B57 /* TargetType+Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33AD91CFFC81D1D4F26F7F9F0FCDE143 /* TargetType+Cache.swift */; }; - 5AB424D0E299093D1F496695E1189B43 /* LockOwnerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03C17192B72F7E3A561BBB7AD859C9C1 /* LockOwnerType.swift */; }; - 5B86E408D9160DBC6337FD2D12EBA516 /* Plugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 075B384D9562A42D796BF4DB92925061 /* Plugin.swift */; }; - 5C134EA5D0824F1502BEAF139EBB6511 /* DistinctUntilChanged.swift in Sources */ = {isa = PBXBuildFile; fileRef = F15C22431BEC97AE98B57B47E8759CAF /* DistinctUntilChanged.swift */; }; - 5D8DAD2E93EE4AE8FB9671D7517BB383 /* ToArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39892B52048600EFBD4F560E241AAF21 /* ToArray.swift */; }; - 614876F4E2A5F65779C7EEFE09B5010E /* RecursiveLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4DD70AF3E5FD72B8D7B3936B02A41AD /* RecursiveLock.swift */; }; - 6190E03E117858C0DE78A6416D8A4D9D /* AccessTokenPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDC06C9B7F0ABD6EFECF86BFD2DDEF35 /* AccessTokenPlugin.swift */; }; - 64744C911253C3E01461FAD7C935C8D7 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1C49CE6B8CEEE3328EE09E8318765D8 /* Result.swift */; }; - 655146CB233D90C2C9C1CE8CCDBA84A7 /* Amb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C9837F097BA0661BE725E226C75B0ED /* Amb.swift */; }; - 6872B9E11F1AA180A93CDF92E14F8D9E /* VirtualTimeConverterType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4BD4A3FB6CD3EDB6D05E397C03034CC /* VirtualTimeConverterType.swift */; }; - 6918A61C5276DD8BB5F9A317081E04D7 /* ConnectableObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19C84C90E04E14621E48980EA5C9FCCC /* ConnectableObservableType.swift */; }; - 6AE59C8B0A70042EF7BDAD49F2BEDA90 /* StartWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C07514150A957CE4AA46A9D5858F37 /* StartWith.swift */; }; - 6BC4701328F7A1742F3BDE79C0765AB1 /* Completable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8128A1FF086E2B5F97DF16EC9B0DCC5 /* Completable.swift */; }; - 6F451FF13AA5A3AD4645BFDFB7C2E4ED /* SkipWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 836C06CF483EE7F9CBBFBF2F596B0385 /* SkipWhile.swift */; }; - 6FB77EC3AF24C0111F49D835C594B342 /* AnonymousDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 051A771AEA1D3CFAB8AC9B0B1B1E2A94 /* AnonymousDisposable.swift */; }; - 7213F88AF4702E6DED1E24AA195EA6C5 /* SynchronizedDisposeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6345095269AD5D0D48D3A7337CBDDD9C /* SynchronizedDisposeType.swift */; }; - 72C0F16476393E0A471B708F88C7FFE1 /* SubscriptionDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F840EF70FDF2E2DEB1C4B08BF75926D5 /* SubscriptionDisposable.swift */; }; - 7325A1BDBB3F246C05870D4117E44508 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B66D8C935AC36871C0BD83F0CD6170B /* Foundation.framework */; }; - 73A593930C35A1A369D4C069B3D29161 /* BooleanDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D15E658C47E95B25B21E994C0E218A6E /* BooleanDisposable.swift */; }; - 7493D30AC0FCEAD143DA3B319C7B8F50 /* Disposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06F44D0078C5EDC1E5ED1CE2DA94EC3B /* Disposable.swift */; }; - 7499334C0277A6B598411A71FC4558E4 /* Buffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 414641A651CE66CD2533CDAA1B3228B8 /* Buffer.swift */; }; - 7570CAF273B4C37FAE77398E54A2A94C /* Timeout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21A9921E2E8AEDA2A048794AD482B220 /* Timeout.swift */; }; - 7664FD4F59A0C00866CBAE60B0A3AD64 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B66D8C935AC36871C0BD83F0CD6170B /* Foundation.framework */; }; - 771EC26513B70F9414E185D89BC76846 /* Create.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40621D1C09CEC54AB32D25180619170F /* Create.swift */; }; - 77416321649E85E452388097F17949EC /* TakeUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BDFF360B4EB3BA2B58427E9CC350B4A /* TakeUntil.swift */; }; - 7805949D9B4F03271B54EA5F37804BE0 /* Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = A703EA81C5D80B459B4392FE54E7355A /* Map.swift */; }; - 7886F4A62850202F06BADD4A517CBA9B /* DispatchQueue+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FF0971291DFF3ABDC056FD38C4E26B7 /* DispatchQueue+Extensions.swift */; }; - 78BE8F544BA7FDCC4E5A1DD852443E94 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B66D8C935AC36871C0BD83F0CD6170B /* Foundation.framework */; }; - 7C0E7BD4B015BC2A112597C611294CE2 /* DefaultIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13BBC2F9E5B259AAEAC2D869DFB54EF4 /* DefaultIfEmpty.swift */; }; - 7E7C19622366738BB2DA0F088C7F1CCF /* Take.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42814DB03E511C5C8960096D960A7BF0 /* Take.swift */; }; - 7F355A340130CA2D85BA491EF9CEC8F4 /* MoyaProvider+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23FEA0F0B14DBBC27CEF81DF8BBF4CD2 /* MoyaProvider+Rx.swift */; }; - 80BE5E30D412DD4936FB1DC880A5D6ED /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A3182376CA76F46A4CD75D415DA1334 /* Image.swift */; }; - 827A587C5001B0F60A00DA4FD4840596 /* AtomicInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0175202EBA5B7848CA63FD008999E893 /* AtomicInt.swift */; }; - 82C7792740F127355253176808A72D70 /* CurrentThreadScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = C70C756A73A5373EBA9F35240349A435 /* CurrentThreadScheduler.swift */; }; - 83956E20859CDBBE7BC38ABADE0170FB /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = B68FE6CA81907C496E43720D457CC318 /* AFError.swift */; }; - 83A4F36D291ECB6C479A884977F4AD66 /* ObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EA4C81F172FE56F2110B4E635A9217A /* ObservableType.swift */; }; - 8737708F27205F1DA90D31F130C8A102 /* Lock.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAC31522F5455A2C6F4491368CD360D6 /* Lock.swift */; }; - 889224D6BE4DDFF5CE706F311BA76BF0 /* Storable-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9236A62D5A9A1541E7C97A2305F818F1 /* Storable-dummy.m */; }; - 88F77A310F6EF8D5A8F73E32750B8CD7 /* SerialDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E72F41519DA80A3A76E80765092C618 /* SerialDisposable.swift */; }; - 89FD2F0D9C82B4C997080A7C3CF09045 /* Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D6995DCF5F58FAC14A1A934BDC0A684 /* Zip+arity.swift */; }; - 8AE19DFFB83AF98D68E251DF652CCEED /* AddRef.swift in Sources */ = {isa = PBXBuildFile; fileRef = E21F54A8CC91AE7213A25860CA923CD5 /* AddRef.swift */; }; - 9075C371CABA10F9F80789F3FDA4AD24 /* ScheduledItemType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 070D7D7B9FE72386A08E7ED2EFF2B2A3 /* ScheduledItemType.swift */; }; - 9234ECCE484AA40145644A492A887522 /* SubscribeOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02EF3E2571960553EF676E38AF27D191 /* SubscribeOn.swift */; }; + 5977E90645BBB23BBEAF8FA758A855AC /* Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 281236BEC6F709D46DB47B4A36EFCB03 /* Zip+arity.swift */; }; + 599F0F563C3326C12B41D933F5F80C51 /* SingleAsync.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC2518C82B77E61DD3E771A90D0E705B /* SingleAsync.swift */; }; + 5A7D72019BD3B4DCB3123D94F69AB898 /* SingleAssignmentDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5629A419CA6E7BC96DFC091194F7CCDA /* SingleAssignmentDisposable.swift */; }; + 5AFA1C90693120F18B64A46697EFE3E9 /* AsSingle.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAEFD3E93FCBA179CDE905CC9ECA124D /* AsSingle.swift */; }; + 5C4A0685B5A201436AB52EF25829B333 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CF15DD381BEDD5C680457A3A3C8E7B8 /* MultipartFormData.swift */; }; + 5D12235D061AEE7459279AAF8C348DFE /* URLEncodedFormEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF781C4124DBCD6FD88F02423A0AD64F /* URLEncodedFormEncoder.swift */; }; + 5D61C8ED0DDCC9F8B576B6514B19EE50 /* ParameterEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07DD9FCDFEDD2558F85CFCFD728C8254 /* ParameterEncoder.swift */; }; + 5E626665812F7610667D81C73F448189 /* ValidationType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 518907B2E3570849B955D56284BE399E /* ValidationType.swift */; }; + 5F59200B0DD426BE83DEC34E67AAE564 /* Range.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06ED4CAD705266986228184FEBD4314D /* Range.swift */; }; + 61C0D630EB56761025C8642CC43430C4 /* Date+Dispatch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BF5B5A5394978EC360C135181E91C7B /* Date+Dispatch.swift */; }; + 61D67D39B1D51B9D51B8B9F4D1911428 /* Reactive.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6E2ADDF97E331AE3D9E7015B9331F2E /* Reactive.swift */; }; + 648BEC3D1E2FC89ED7487960646A2672 /* Endpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = F48B7427BBD228A6A0FA6155DB0C4D33 /* Endpoint.swift */; }; + 6671D72BE96F05F0BC070530123C1D0E /* Observable+Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3366E923B08356C8F918DB061CEE17F6 /* Observable+Response.swift */; }; + 67098130C1E0A29A2767D913D6B521EE /* Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = B73D8B762168FDE1579334B98F4B7B6B /* Sequence.swift */; }; + 6730DF6ABF6A785543DA3001108F5749 /* Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8AFA5D5C8CB619386A03ED83164149D /* Debug.swift */; }; + 67C3B90FFD52B59583EFDF7A34559C5C /* Never.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3AF5CD080B1A13647A5A3DED40F55A7 /* Never.swift */; }; + 6810CEB9E126BD33B8A01E79B7D9301D /* PrimitiveSequence+Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = F899E1BF5205E554413060E199938E3E /* PrimitiveSequence+Zip+arity.swift */; }; + 690CADA27732BFA5FC50E02C9DEC59CB /* AsMaybe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F876C06D7849AF358641FC077567E9D /* AsMaybe.swift */; }; + 69ACE4EEE5A8C1C618B22CC1F7B8EF01 /* Session.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEED6A19AADDA66EDB3FB22EFA38154F /* Session.swift */; }; + 69D4126F929F0FDB43A0F44D653FF09F /* Enumerated.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC9D4F3ACB956DC78AABC7EF7116512B /* Enumerated.swift */; }; + 6A22C46CB1EDE471794D9AB2AC10327F /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07060027423087C9DEC5DFC4122FF9CE /* Request.swift */; }; + 6C5C7C4BB1EFDA1970D4F47C1193399F /* PriorityQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC60F887979E1A850A662BB6EC3695E2 /* PriorityQueue.swift */; }; + 6E500E09797E690AF9AC5B9511BAC789 /* MoyaProvider+Internal.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB3EFDC334F6169C56374A5C825DC7B9 /* MoyaProvider+Internal.swift */; }; + 70517C3BAC2D6614347DEAC15299EB84 /* URLConvertible+URLRequestConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C331AE4DF911F37FADFBA55C28BDF95 /* URLConvertible+URLRequestConvertible.swift */; }; + 72BCCB00F4313283460E23F82D9C03EB /* AnonymousDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6A7300E9EDE897E98A93A55ED03C320 /* AnonymousDisposable.swift */; }; + 7337FA6C4A3F6F1FC203606E918BA5F4 /* ScheduledDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D326233DC57411A161CE3F1EC3D8F1E3 /* ScheduledDisposable.swift */; }; + 73C5F7A686893DD40BC9F5F67539A78B /* URLRequest+Encoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53200B222E5F51E904674C0D4BECC7E6 /* URLRequest+Encoding.swift */; }; + 73C77120B878115966FC5AA9AF36E91A /* ObservableType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD129BB4BC4BEFA673CE5337EDE59F16 /* ObservableType+Extensions.swift */; }; + 74AA78DE1FABC94DA40AE8E40A76087F /* GroupBy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4396A8A94652826C607D41298EF08C74 /* GroupBy.swift */; }; + 7AED67E1C3B95CF7A4628FBB5335ECC2 /* SerialDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = D23BE0DFB80262E1E54C75F46321DA46 /* SerialDispatchQueueScheduler.swift */; }; + 7BD6C758E1C3B0DA760A112A98FD921D /* VirtualTimeScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C7C46029C2CD9B28F287FA23CB5AF4E /* VirtualTimeScheduler.swift */; }; + 7CF8362BA31492053F5CB165637AE117 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9563564A7E1F9DEEC3E8617471D512A7 /* NetworkReachabilityManager.swift */; }; + 7E5D7EB916869F933BE3C5B7EA96980C /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28EFF13A360CFD0623C59A70A02E674D /* Timer.swift */; }; + 7EA2F5473AFD81C74A2876C2C978FB02 /* Using.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7A90629DB11EC28A169D2F7F3D632E /* Using.swift */; }; + 7FD07B719F3C7BD7BDEDE04BFC68906A /* MultiTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1DC8D74B0FA822526096B124124CF0D /* MultiTarget.swift */; }; + 807F55A7D4A09A2DCD5FB64D59AF7FB1 /* Merge.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9B8D43335230764364E9B128FBFEE9C /* Merge.swift */; }; + 836193127A436104FABBC1A1666CA5EC /* AtomicInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B3D0937387DF0D74D9ED5F2210527AE /* AtomicInt.swift */; }; + 846AF5592D7EBDCB05E9AB0879BF1342 /* PublishSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6924568E51FA7C86522CA17AE7C24A61 /* PublishSubject.swift */; }; + 8805B3A385FF612893183012DF14AA9B /* HistoricalSchedulerTimeConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1C63393F67222B14B2A6A86BBFB3276 /* HistoricalSchedulerTimeConverter.swift */; }; + 884CB47932E14ADFBC8C13061807316A /* ObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 261441859064F36E20C60F6022EDD26C /* ObservableType.swift */; }; + 889224D6BE4DDFF5CE706F311BA76BF0 /* Storable-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8812BDA42BE19B2653B9E7F54A6C7D71 /* Storable-dummy.m */; }; + 89CF1DF0CAF754571AACBDEFF789074F /* BinaryDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D393291DE590C7D1D4D6ABBE9D7D74D7 /* BinaryDisposable.swift */; }; + 8D008A4A3B54969F4FFE915C65C9066D /* ElementAt.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA2F3406F1AB92C229210DB0D09E5C3C /* ElementAt.swift */; }; + 90C9147FE061B924EAF20E15E79E543C /* SchedulerServices+Emulation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AA6159BDF623D6C60F20E34DCB21069 /* SchedulerServices+Emulation.swift */; }; + 9199D578DD7861D9874762A1226074DA /* ShareReplayScope.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F7813E70AFD621E29F61CC11AF7384A /* ShareReplayScope.swift */; }; 92603F31AA22939DDB47C2F1DB98F135 /* RxNetwork-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 384F5AB8528B8290F3E142C2CEFBEC4D /* RxNetwork-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9312AD5669A7193C912D8331306185C3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B66D8C935AC36871C0BD83F0CD6170B /* Foundation.framework */; }; - 931BBB8230A25161D5C37528A8F9FECF /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35CE0BB6F7B6E73DD6005283B02F7D91 /* SessionManager.swift */; }; - 933FDA5970AA525D6CB92BFEBA2BAB4A /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49DD539DDB729197E3C98CB588FD7742 /* Timeline.swift */; }; - 9561856FF1996ADBDD2FB7776EE43CEC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B66D8C935AC36871C0BD83F0CD6170B /* Foundation.framework */; }; - 95980779C6D9DD12F0BA681545E185AC /* CleanJSON-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E5B94887F68E04765D5DF974982C649 /* CleanJSON-dummy.m */; }; - 96346A11B1649C8F4DA41EE2C4E06ADC /* Maybe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43B7BB421B6C3CBA2E8F3B7040236CBB /* Maybe.swift */; }; - 978DFE1042F33DE92F8757E404E2B398 /* Switch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 588DDC7B8E7AEDB85A2506DEAA9EC743 /* Switch.swift */; }; - 98A929C8E9012AB167672714FFD2113C /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3532859CC374A0448427AA03A17CEF1 /* Request.swift */; }; - 9985B3D69A3155B391C1157E2341764C /* CombineLatest+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9C7FF5091353BEB5B3815670D146F4D /* CombineLatest+Collection.swift */; }; - 9B02DE52BDFEE672F4D0653DE76590BF /* ImmediateSchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9AD710ADE2C9F54D8D083467AB805DE /* ImmediateSchedulerType.swift */; }; + 92811AC5CD9A5004116AE43C4E8FD955 /* OperationQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 656236B3BDCA7C4269F4C0012B871A72 /* OperationQueue+Alamofire.swift */; }; + 95980779C6D9DD12F0BA681545E185AC /* CleanJSON-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 510B47F966CD35AECBAABBAD4972B870 /* CleanJSON-dummy.m */; }; + 97A168DFB6DB61770CE2DBF4FD39AA8D /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9224BCF600D984030DF4BA9B27515E98 /* CFNetwork.framework */; }; + 9826034176E96C9E474E072E83C8A358 /* ToArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = D701E95B632E9004418D08A5ADA9C5F9 /* ToArray.swift */; }; + 9834C2A01D4C3A7727BE17AA6A5512CD /* VirtualTimeConverterType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 026854B499760CAED7E8D0783A1CA04E /* VirtualTimeConverterType.swift */; }; + 995FBC0C424C25F7FA6F2BF1245A8D4C /* OperationQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8298BE160EB95F5580C850AB10A7AE /* OperationQueueScheduler.swift */; }; + 99AE91F0464A31E006B4DF77EF20893E /* Throttle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07EC1ECD525E0CBA56BA47301D8355D0 /* Throttle.swift */; }; 9BC5B6534BBA3A6E9B5CED29CAC0137F /* Network.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDE9E77D94940D5D7DD20415876A3E16 /* Network.swift */; }; - 9C360AF2D7B1DAAD0312FBC12314ACFB /* BehaviorSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = A39A24B971D6837589328B7242501585 /* BehaviorSubject.swift */; }; - 9F6D91CACBE96A65769DF1BDF4E702B0 /* HistoricalScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CDE4A389BA3C59497ECC9FFF14C59CB /* HistoricalScheduler.swift */; }; - A102E67776094FDA2E2783464B31C203 /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5126BA64BB75B98526D6CDB0962DC82 /* Timer.swift */; }; - A135CE538F7816739D4DAC06443DB712 /* SynchronizedOnType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A4A37B4CE82143B83531B6D76B00CF8 /* SynchronizedOnType.swift */; }; - A2110CCE97DB10FDDE5ADBA0D43D7091 /* InfiniteSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DB1AC6526927D201E926E7613DB1388 /* InfiniteSequence.swift */; }; - A333BD461518BFCF585D068FB6E9C662 /* StoringKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = EFAAFA5BEA4EC553AB9EF5EBE4F34D98 /* StoringKey.swift */; }; - A3D6BCEABCC79E04DC1991CB5C3AD3B3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B66D8C935AC36871C0BD83F0CD6170B /* Foundation.framework */; }; - A4B783A510E39EEF7EEA0FA602A8E6B6 /* InvocableScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AF0F7CA0945B7D4424DAE1783C38E86 /* InvocableScheduledItem.swift */; }; - A4D1DC406B5E5AA6F3F7AF43C5CC1441 /* CombineLatest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C53C70334A2566029CA7A1F28C3728A /* CombineLatest.swift */; }; - A535E68C4D89F9F0E2917C60719CC617 /* CredentialsPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8947E196EE277E683690C57CDF44AC57 /* CredentialsPlugin.swift */; }; - A7DD66D69DC12E18E0214E338E0D4AE9 /* SingleAssignmentDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13400A45104B01F3E0ACD874EF8D440D /* SingleAssignmentDisposable.swift */; }; - A85C8671039BF811BF62EB81D21A1F7C /* BinaryDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C07046CE1C8698494AAFDE7CC2AA2546 /* BinaryDisposable.swift */; }; - A9EAF387CD5B2FEC8F03407E4C5032F7 /* Cancellable.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA494C721617E7B90351EA947ADB32F6 /* Cancellable.swift */; }; - AA39B15CCFB83EE63ABD6076EE210E2E /* Never.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCD3C72FA08DDA33A60A64AB444DF824 /* Never.swift */; }; - AB0167F07A236FC1D88BDF28C5DF657B /* CleanJSONKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38D39F19C2D7830625FE2CC5A5A511EE /* CleanJSONKey.swift */; }; - AC3F90F52F73A13B720EB7EA191F5499 /* RecursiveScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79F4E28F448376837374C53780547EB5 /* RecursiveScheduler.swift */; }; - AD49638A04455980DC909159D2B4E523 /* CombineLatest+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9348EC550C2DE629E2972C26303D8574 /* CombineLatest+arity.swift */; }; - ADE32263AC3857A1E2C45ED96F058468 /* Single.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E6A636EE980B3D946A1E9FEEA6C0191 /* Single.swift */; }; - AF71BBA2FE0A68D53748DC34D423F912 /* AsMaybe.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04D20A7AC8E838332E87B9CC6072CA4 /* AsMaybe.swift */; }; - AFC64B1097F7355FF423D6A73E9C7210 /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2CDEBB39F0951C9D52A6E700269F1C9 /* TaskDelegate.swift */; }; - B1BA4E31EDF572FEB7CAF8CDE3E1144F /* RxSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 103A38DB49D6E1C46E635D94E8A8621B /* RxSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B452D153D9753E4193DAADB45456DDB8 /* Enumerated.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB2F21E4C09010A901E61FBA57ECB7F7 /* Enumerated.swift */; }; - B48ED012465B31B5AAADAEB1E1A1EC96 /* AnyError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 788EE0E11F60CA6C5CF81C36BFB8026C /* AnyError.swift */; }; - B617FF75A8D15CD7D5B66AD64D8FCCD9 /* Single+Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB93829954E8FEB012C904908CF52BD0 /* Single+Response.swift */; }; + 9CF9C6A4350CE1B03447B5247F84C2E8 /* Debounce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BCF8A34F8736405DCAA50FCD656E99E /* Debounce.swift */; }; + 9E0E8CA8EF7D5975C391DFCC303F72C3 /* DistinctUntilChanged.swift in Sources */ = {isa = PBXBuildFile; fileRef = 918C6D8E9812D83F3F978BE83821D354 /* DistinctUntilChanged.swift */; }; + 9F264F1A2FF3521FD1F62A4539DC1FAB /* Queue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 851D5C9B66C1AB6A9593879B3FE3AA69 /* Queue.swift */; }; + A0984EC68B044E44BC79B12DAB62A450 /* MoyaProvider+Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 108AC4A14D5252C44424D681EE80F4A3 /* MoyaProvider+Defaults.swift */; }; + A333BD461518BFCF585D068FB6E9C662 /* StoringKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B9DFFBA4375230FEC92CC8AA2FBAC2D /* StoringKey.swift */; }; + A3D6BCEABCC79E04DC1991CB5C3AD3B3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; + A6E54693F4FE0F37FF016CA6F1A4D78B /* AccessTokenPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3551DF262187D1203B83BAF9EA48B1F /* AccessTokenPlugin.swift */; }; + A7C9DE2DBD28F5122541FD9F11FEEEC6 /* Cancellable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E82B2D23DD757B33DD7DFF17FBBD42BC /* Cancellable.swift */; }; + A8921779A0B03A8843F04CB531310210 /* Concat.swift in Sources */ = {isa = PBXBuildFile; fileRef = A42080C29AD328E1CC7E761FF82C78D4 /* Concat.swift */; }; + AABC56D2B22A94FD4F2ACFA194D29FF3 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 435339186260EFAE9AE4DA219F7B2773 /* MultipartFormData.swift */; }; + AB0167F07A236FC1D88BDF28C5DF657B /* CleanJSONKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FCA37674F55BEAA7DB1902D521CB4F7 /* CleanJSONKey.swift */; }; + AC3CB3488A34461DAD252DE4A373C4CB /* Create.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB2EE2ECC802C16571D0ED08E3A792F3 /* Create.swift */; }; + AC991769A1E70432F1438665B7A20D3C /* SubjectType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C843DC02298710B839ADA338C6B946D9 /* SubjectType.swift */; }; + ACEEAB591378F919B3C3B73ABBB644D4 /* AsyncSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0A898627D00FE18A307ED2F6139887E /* AsyncSubject.swift */; }; + AD17EEA35B6F9F92E57C7A81E45C8185 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 57857C02D75DE4B780347BC7585AD918 /* RxSwift.framework */; }; + AD196E6B5826847D4CD2CF688F0670B4 /* Catch.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2510E4501E12CC029C9B3AAB4684F36 /* Catch.swift */; }; + AD9899986955B2EC1EC20818C860C971 /* RequestInterceptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = B47CC1F172167C45762F66717A77796A /* RequestInterceptor.swift */; }; + AE9A449328CF627474BC5A22DD12ADEB /* Optional.swift in Sources */ = {isa = PBXBuildFile; fileRef = B558F8F5563D0291BDEB3FECF5DADCBB /* Optional.swift */; }; + AF92602937CA016548022C600B8CDC16 /* URLSessionConfiguration+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5032057E303F4F9BEBFD1A0BBBAF8D2E /* URLSessionConfiguration+Alamofire.swift */; }; + B03D2733E568FB51D6C8B0F23F5C3AAD /* RecursiveScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = C44F817E631EEBC40D7A1AE6F76CE096 /* RecursiveScheduler.swift */; }; + B10BAC99F09C0D1E119B11DAAF9F4F2E /* Empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52044509C05EFC4E338B319064FC119F /* Empty.swift */; }; + B1282BAF91224397F6AAFB577C341E6A /* ObserveOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E860EE8CCAEE984F3560839F7EBB54D /* ObserveOn.swift */; }; + B1C58F6CED7B3E45170711D9ADF878AF /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 114BFEAEE83F72DCF8BF6D418C63EC48 /* Alamofire-dummy.m */; }; + B23E9A5CDA31534491226F4C2EE8F8E6 /* HTTPMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE2B8FDD8649116A6423B52C08577481 /* HTTPMethod.swift */; }; + B306FA316BF5EECF582CAF821E0696DE /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = C65AB0ECD9BE59B36B0D287583B430BA /* Error.swift */; }; + B45AA223B98773B1565A927496E07F51 /* Timeout.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEDFBA1EA963A0249C7469CF7238858F /* Timeout.swift */; }; + B5AB337ACA26EB58FE7ED9A13F3402D1 /* First.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCF4F6874FC8B9FD31A50E76BA68867A /* First.swift */; }; + B6B5DD46569F622E8065D405F8F8B124 /* SubscribeOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB16749A0EBB70E74838BF111C9A79A /* SubscribeOn.swift */; }; + B72D290CF07850A2B7CF41CEF3FDF3E0 /* Platform.Darwin.swift in Sources */ = {isa = PBXBuildFile; fileRef = F67147776750363CBFC3DDD46CBFD28D /* Platform.Darwin.swift */; }; + B7340AE5CCDA0D48032E76FD2EACABD1 /* String+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A1B471AFBB9EE1592CA2F743A068D13 /* String+Rx.swift */; }; + B788B3354CCEBE56DFDB963CAFD7F6C2 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D5EF00E0D75C20FB6320A6B8BEFFA89 /* Alamofire.swift */; }; + B80CE38A2CF000C91F9BEC252DD44B25 /* NetworkLoggerPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F9B865C569AE9C16A59190E92AE7900 /* NetworkLoggerPlugin.swift */; }; + B8CBBB4C1BE72997572539B3B23CDD7E /* SkipWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B8634B215369599FFBE8D8BEE0A73F0 /* SkipWhile.swift */; }; B90D2337F2914FE4C357BF9742C11E90 /* Pods-RxNetwork_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = DD446B4044B0702284E4C9270774ADF6 /* Pods-RxNetwork_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - BBD2558D69F9DE7866B755E189D14573 /* Disposables.swift in Sources */ = {isa = PBXBuildFile; fileRef = D46A7DCAECDDEB723B4A208E93DEF41E /* Disposables.swift */; }; - BD33731A322FCD83E774BA10733A8602 /* TailRecursiveSink.swift in Sources */ = {isa = PBXBuildFile; fileRef = E376CC266538EDEAA1B5ED6A70AB2D70 /* TailRecursiveSink.swift */; }; - BE6980F49CE2EF9B4D556AFE33DD2159 /* Skip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10DB2F41EF620B1D2DCF82D5814B4CF2 /* Skip.swift */; }; - BE7099C44978FF09B98008BD066C5877 /* Expiry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BFFE78F407A3E3EC3BB0999EAA98C23 /* Expiry.swift */; }; - BEE6B677416CA71C981D1D3F60B18C96 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F83C5AB3CE4C25E433AD5957FDB6B89 /* Alamofire.swift */; }; - BFF250A42923627911E09D7AC6DB22DA /* Expirable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80D881D37DEDE75835E431267A289615 /* Expirable.swift */; }; - C0BF1AEFE6B98C8E2BC20EC6F4A65A3F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B66D8C935AC36871C0BD83F0CD6170B /* Foundation.framework */; }; - C4D595D5D0286F56BAFD564A22CC9CEE /* ReplaySubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9E13D647F8D906A8CFF58E78118ACF9 /* ReplaySubject.swift */; }; - C5487374F304D945EBDC7CB2830BA45A /* CleanJSONUnkeyedDecodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D56A153DA81C8E203702BD0E153976 /* CleanJSONUnkeyedDecodingContainer.swift */; }; - C602D02C572632A3CED6635C06274329 /* ElementAt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AE9784D546FC31E0C910427B049FE19 /* ElementAt.swift */; }; - C6EA8FD1471481D054058D69E9B34729 /* ObservableType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C28A142256D9C33BCC76AA70E5F9C7F7 /* ObservableType+Extensions.swift */; }; - C6F3963FC210E4264B1C9C3444105D40 /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4312F45A0C2A90FA940262A788DA1D2D /* Response.swift */; }; - C7278758EE3C140A29B404CCD186EB56 /* JSONAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57478EAC5004653A54E4D6FAFF1D70BE /* JSONAdapter.swift */; }; - CAA2D20A5DE78FDC37736269E67E1E1B /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E5A5C37017BD8385DC0314BA6CF25BE /* Result.framework */; }; - CAE6B2CAF926F5ADD3A19B7989D2F419 /* CleanJSONDecodingStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2EBDC61865279D6FA005335908D5C904 /* CleanJSONDecodingStorage.swift */; }; - CC220803A2B87B0D86650E779CD1CA23 /* PrimitiveSequence+Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C5CC81D7F7FD374CE8C2EEDE367E7F1 /* PrimitiveSequence+Zip+arity.swift */; }; - CC6E75A6150633B7B69C961E82995F7D /* Multicast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7712E8FD442517BB8CFC52F650538D1F /* Multicast.swift */; }; - CC9A2A080AD7C44E4AB1D8F9FCA4F0C7 /* SchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A01B6FD9971B00B9FC8FA93EFC7C8C67 /* SchedulerType.swift */; }; - CDD6BD84CB084A10EAB6F141ED393719 /* NetworkLoggerPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A7D63109C9D98726B52F3CF146C60C3 /* NetworkLoggerPlugin.swift */; }; - CE2EE27DA1623D412DCCCF686520F77C /* DecodingError+CleanJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20E2A251EE70D5BBAEF40948E9E17D04 /* DecodingError+CleanJSON.swift */; }; - CFE6D7D4FFED0A13B3A2BA4D128E7577 /* OperationQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22CC88B7046DDBA3D6276B4E2194AD69 /* OperationQueueScheduler.swift */; }; - D0B879B08BA15D877B2B281F90B91D04 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B66D8C935AC36871C0BD83F0CD6170B /* Foundation.framework */; }; - D10F142288593BD0B04A5C9AE3ACB077 /* Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63ACC09FA3E638CD1B664F2F58A31E75 /* Sequence.swift */; }; - D1321494A1DC342947D9199B3564947F /* InvocableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F9ABD56A8A5AAA76FA1006C7C0319F9 /* InvocableType.swift */; }; - D14C3C5ABA61ACBEFCFFB903F6A09720 /* Moya-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = EE76E8C0045CAD741B9556B50406C02E /* Moya-dummy.m */; }; - D1E6F6C0078CEE4ABE98162AD229FF85 /* Storable.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D7C0B8547E454B8775051C20634B04D6 /* Storable.framework */; }; - D2704E5203EB1958FF4D12BD149E0AE5 /* _CleanJSONDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = C22C666DC9CA615FB155808E4CCE3685 /* _CleanJSONDecoder.swift */; }; - D354B854B9E34E6286BD13BCA62548D8 /* DispatchQueueConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = B83FC2D2C34F9975CEC708B8B925F398 /* DispatchQueueConfiguration.swift */; }; - D3D8C379C6E4FB487E5ABD6800AD7B7E /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28B36A1B1C36D1080FDD8A8D8DB83EEB /* DispatchQueue+Alamofire.swift */; }; - D4495024CB69E81D87A2F5FFD95057DE /* Result-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 33A6A208C28E271BEB4503B134F03402 /* Result-dummy.m */; }; - D484A277E9CAA9CDCDE27683D6713ED0 /* NetworkActivityPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F05771EBFD4F04FD748DE2AC98236EE /* NetworkActivityPlugin.swift */; }; - D48FB7C636DA126D247030ECE76E5392 /* Bag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 602DE06880AF8D36101AA50B4D6BD1AC /* Bag.swift */; }; - D58F0CE218B00680A9DA435A6D96D2CF /* ObserveOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5DA72693CDC4D9C9673E59AE87805D8 /* ObserveOn.swift */; }; - D5BD48DC2036961497EBC93FE657A688 /* Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35167BBAF273C4BD04E0DC6682DA3027 /* Debug.swift */; }; - D5FB6B8BDFC460ADA8967843EDF62164 /* PrimitiveSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51D25826B7219C70A28E6D2CD3FBB5C5 /* PrimitiveSequence.swift */; }; - D65C254F5ABF2CB5ECEE50FE8F8E1A80 /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = E95A60142ECD29AC2F9B3E721E69D0D8 /* Response.swift */; }; - D74F1CA811CF11909630F335E3D5DDFC /* AnonymousObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F07796D7C322F4B1CD81DCD13822283 /* AnonymousObserver.swift */; }; + B9BCC87C90F47AD8B8FE81CF3F1F251A /* TailRecursiveSink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7783A297EDC6DB81F3E2923068179F39 /* TailRecursiveSink.swift */; }; + BD12A82F374994FCD0AAE6ACA3533A8A /* ScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65B8757D3ADFD48EAD4CEC21E6CA7506 /* ScheduledItem.swift */; }; + BD65127B566C666A67DA98E0AF329A15 /* PrimitiveSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97FE73D2B39572EED263A65F22E19FA2 /* PrimitiveSequence.swift */; }; + BDA6A52A11AA3D5962391C1EFFE2B09D /* NopDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48176300B238876EC6C9D40BFA40DCF4 /* NopDisposable.swift */; }; + BDB2620B10B258173458D6E1B6F871E2 /* Sink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DB0DB0B8DD0BA363E2BADCA7C4EB152 /* Sink.swift */; }; + BE7099C44978FF09B98008BD066C5877 /* Expiry.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7328429742CCF5564A4C089C23BAA1E /* Expiry.swift */; }; + BE82AE980F8C7EE28A6448959194F93A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; + BEA9AC162B40BA3879ECE9D7CD49133C /* DisposeBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCAA7EFDBD65FDF9746A3F061CFFE23A /* DisposeBase.swift */; }; + BFF250A42923627911E09D7AC6DB22DA /* Expirable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F21E6A56EE23C9B87C6B6D7D5F2C93F1 /* Expirable.swift */; }; + C0BF1AEFE6B98C8E2BC20EC6F4A65A3F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; + C1356059527754C583D52890E12D9255 /* ObserverBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23959528143D698F0E7EA5172E01917A /* ObserverBase.swift */; }; + C3EA56C32F615BD7A8917A776DDAE597 /* ScheduledItemType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4224738F69DE56C01651B8544B7C42F /* ScheduledItemType.swift */; }; + C4962311BA5AD3FB8E0AFA1A5BC969BA /* InvocableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 872AA3F1C2369C28062BEF17B62AA2AF /* InvocableType.swift */; }; + C5487374F304D945EBDC7CB2830BA45A /* CleanJSONUnkeyedDecodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58B1CF188B3F948B2B9F1FBB25FC492D /* CleanJSONUnkeyedDecodingContainer.swift */; }; + C64AF152F7928CDB59385528DB65FE19 /* RedirectHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6575CBED40319444DAC29C45231D0ADD /* RedirectHandler.swift */; }; + C7278758EE3C140A29B404CCD186EB56 /* JSONAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57F11648E65F779A1E00EDA213CED5BF /* JSONAdapter.swift */; }; + C7369563F6946D8984124E1A546B6425 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7A3B49D4F7F2FC9AEECDD6F8CF67056 /* Notifications.swift */; }; + C76CF711EC8ED2795A3E431CE9125EB1 /* DisposeBag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2743CDAB975E17560B238D8DA292938 /* DisposeBag.swift */; }; + C77C88909376758350D2DFA86B5FFDCE /* Observable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F741BA7A1003FC8E14528AEE8234E45 /* Observable.swift */; }; + C7A9B57B2343036C600D088D5F8FF536 /* Delay.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5CEF94FA9266F39DB2722D92DCF0C /* Delay.swift */; }; + C7B19143F080448BBA1DCDE85190E987 /* AsyncLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8E39A127DC4BE788E64476BC0EA77F1 /* AsyncLock.swift */; }; + C940142C7BF894844C1732C987EB3A65 /* Disposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE2B47586C4F9A49F712AAF2829C0556 /* Disposable.swift */; }; + CACBD166E573774FB5613C34AA6DA7A7 /* EventMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = C52CC70AAC72FD95F6F5224EC49CB335 /* EventMonitor.swift */; }; + CAE6B2CAF926F5ADD3A19B7989D2F419 /* CleanJSONDecodingStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6DEEA09CCFDE102C00C37E286327774 /* CleanJSONDecodingStorage.swift */; }; + CC822EB8650E011340BDAD6708E10E74 /* Repeat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9557CF86C29E2FFA60740C0FCBB997F0 /* Repeat.swift */; }; + CE2EE27DA1623D412DCCCF686520F77C /* DecodingError+CleanJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 459C12262C5D16FA761505712BB18C0A /* DecodingError+CleanJSON.swift */; }; + CE9E7F1B6C1023ABFD65C8E82C04C13C /* Deferred.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBA4C0FF6B181176D9058AE1F6333332 /* Deferred.swift */; }; + CEF522F304C821113FA3C11E91D33802 /* Materialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CA7D4DC1EE30F6308C2D5F8884C3145 /* Materialize.swift */; }; + D018312354706A06A0A1D14B36F261E0 /* AddRef.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90E8D676117C6EE98E4505BA03AEC218 /* AddRef.swift */; }; + D054281638C6770D95265DC499C0ED96 /* Buffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5ABA32F80170199772B819D5F85455 /* Buffer.swift */; }; + D0B879B08BA15D877B2B281F90B91D04 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; + D0D4408146D541C73AF89DC5A18EAAF8 /* Dematerialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE2F73C6F49CA4D7DEBEE113F83AE16F /* Dematerialize.swift */; }; + D1DB16A8ADF6F23A90784AE6D0F48371 /* Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBFB17250A60745076A6C9C95C151B4B /* Map.swift */; }; + D1E6F6C0078CEE4ABE98162AD229FF85 /* Storable.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D595591C9104D8297D280F60DB59ED40 /* Storable.framework */; }; + D2704E5203EB1958FF4D12BD149E0AE5 /* _CleanJSONDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24723368CF70A3495D4B622F759CA9EB /* _CleanJSONDecoder.swift */; }; + D2E4CA856C232F0C1ED1E3FAF6A67FE8 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EBD7C3BE2D544889C2C44DA82FF75FE /* Errors.swift */; }; + D358A8F8B661F0355556D2EF36E67A78 /* TakeLast.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4AB0C164DB64B572E768E1A47AE2A02 /* TakeLast.swift */; }; + D62D993A4677807A496ADEB7A52F6072 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E3996058E040B343A27929EBE1CB55BD /* Alamofire.framework */; }; + D6B2983389480F48F27A0704EEB5DC81 /* RetryPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBA48397A5BDA8966A7BA81238CB6A25 /* RetryPolicy.swift */; }; D87EC13CC802F87DDC6A53F2C1F7B0D3 /* Observable+Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20D9B49CE2793BFBE289FA0F11F11114 /* Observable+Cache.swift */; }; - D8A18F7E0070BA0A3771DBFFEF2923FA /* First.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8178E16A51434E7A26BBD55A6B37C6E /* First.swift */; }; - DA0F2EA8E3FC92E1E78808787246A5AF /* RefCountDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F8AA49B5F9F6A63CF750597EECE1B35 /* RefCountDisposable.swift */; }; - DB0926187C913F181B19B3DB49939FA9 /* VirtualTimeScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 842A313B38739D79E1F10D268EED6642 /* VirtualTimeScheduler.swift */; }; - DB1E2BD92AD9DB23A2D1B2D80A995FBB /* RxMutableBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06C186E5D087E4643033F456F9857F6C /* RxMutableBox.swift */; }; - DD1912BC629BB811B439BAD22E89C665 /* _CleanJSONDecoder+SingleValueDecodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 608548DDE77A017F5F9ADF9686269FB0 /* _CleanJSONDecoder+SingleValueDecodingContainer.swift */; }; - DE0326CE1EDFDC40B2FE19D76B043A35 /* _CleanJSONDecoder+Unbox.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F709D96E5B405F8743D36F24E01D5BF /* _CleanJSONDecoder+Unbox.swift */; }; - DED57E4610DEC696C6CAB7495918A5A6 /* MoyaProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FE2D1253D17372B25A71630EB670F83 /* MoyaProvider.swift */; }; - DF43FCBD6B7EEA020B0CE98C22141832 /* Task.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B6E93EE7132CF3C6B0CE163B135D045 /* Task.swift */; }; + D8C089847634E593119461FC5006A302 /* AnyEncodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA39293E1B3E2EDE286F008969A48315 /* AnyEncodable.swift */; }; + DA30B0D76146C936010244CCEEA3E7E6 /* SwiftSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01F1F05FFDC43DD6FD101937710A5BC1 /* SwiftSupport.swift */; }; + DB4AC9C9764AB262D9E2629768BD59DA /* CombineLatest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8991A07C83CADA92EC413B79A966B78F /* CombineLatest.swift */; }; + DC1C500659E2AAF20EF85D4E49666A66 /* SwitchIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFCC182F14E626EA6111FE97CE9D3956 /* SwitchIfEmpty.swift */; }; + DD1912BC629BB811B439BAD22E89C665 /* _CleanJSONDecoder+SingleValueDecodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 584F3E4DE3D7704EDA086ED5308DBAFE /* _CleanJSONDecoder+SingleValueDecodingContainer.swift */; }; + DE0326CE1EDFDC40B2FE19D76B043A35 /* _CleanJSONDecoder+Unbox.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0FAC347CF1C5BA6C739BC8A7C1CAD5C /* _CleanJSONDecoder+Unbox.swift */; }; + E07BD425C4EA9ADF15DDFCDB10D0B2FB /* MultipartUpload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45262C79144217A26F50B3D6B87321CC /* MultipartUpload.swift */; }; E0AF946766FBB7F3FDB2AB58FEF36C70 /* Pods-RxNetwork_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0C53BC94DCE913089EC4A7560728795F /* Pods-RxNetwork_Tests-dummy.m */; }; - E0F121E7FAD26855E5EE5A5E30EC790D /* Reduce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EBE73A1F581A150871DD7C59A95C51E /* Reduce.swift */; }; - E111C885E1606D84DC0EB8D0268CE6A6 /* ObservableConvertibleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08BDA24A302F62194382674EDA0F5421 /* ObservableConvertibleType.swift */; }; - E15422635F741E5FA093036E742EDAA5 /* SubjectType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C10F56D87B9C18985D5AAC65395BAAD /* SubjectType.swift */; }; - E1E08DC362294456ED241ED3EAA886E4 /* Repeat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3229669159891C612E13B182201E4BDE /* Repeat.swift */; }; - E23B21DCFF06D63FF04517AE9D9D79C1 /* CleanJSONKeyedDecodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5A0AD1966A3CA77ABDFD3363625E209 /* CleanJSONKeyedDecodingContainer.swift */; }; - E245C5EFDFB200C2AB4F3B114F81B364 /* ObservableType+PrimitiveSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D677955E7367DD419D9178B1CE932CB /* ObservableType+PrimitiveSequence.swift */; }; - E3692924E6A50E2D4560D89F4190EFD3 /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6A7FB919EC54999326B0BFDA624B2A7 /* ResultProtocol.swift */; }; - E3747EC31FCCA97D75A81FC700CF7E24 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63FD0B9EE7F469EB063F26B5D3CF5800 /* ResponseSerialization.swift */; }; - E395E421A778BCB85DC5450199F8892B /* CaseDefaultable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D0BB7725C943BC842980A2432D60C8D /* CaseDefaultable.swift */; }; - E54109F9FA43A4AC965F74DE11CA5C13 /* SwiftSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 581610EDD119727B4B94817B2C112CD5 /* SwiftSupport.swift */; }; - E54153CC14A91DFDA6336E5FB10F5FFF /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B4677E34AE10E0CFC03D558DE92FCBE /* Filter.swift */; }; - E5F8A66352D49013350C45531BF867D1 /* Moya-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D159605860917ACB8FF26C42DEEF6232 /* Moya-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E60A5078E790EC5CB37F6FA29495EC3E /* CleanDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EA9506901CA45368E64CECDE2AC0111 /* CleanDecoder.swift */; }; - E653C3820C34F794AB28E408DF81BCF8 /* AsSingle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77D083AC4720957A6E4CFFF8FC6579DB /* AsSingle.swift */; }; - E75142340368B349DAFFA89FEA288FF3 /* URLRequest+Encoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60C263EBFAA24B7D27F155E1E5128131 /* URLRequest+Encoding.swift */; }; - E7592B57F83C191814EF14372C578B9C /* SkipUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8BA52B58EF201DE49EC2C51C377B61D /* SkipUntil.swift */; }; + E23B21DCFF06D63FF04517AE9D9D79C1 /* CleanJSONKeyedDecodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D7D6D7FF99869C604E595F16D9C25E /* CleanJSONKeyedDecodingContainer.swift */; }; + E25BE67AB5EAAAB182751B0A5DE2B9F2 /* WithLatestFrom.swift in Sources */ = {isa = PBXBuildFile; fileRef = D914052A2E741D0CEB2EFA59C074014E /* WithLatestFrom.swift */; }; + E2D712F3F96DB7FDB9AB571FA4547707 /* InfiniteSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFF748A9DE94AF2910A84704E386E7C4 /* InfiniteSequence.swift */; }; + E395E421A778BCB85DC5450199F8892B /* CaseDefaultable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A35CC6FC2E1BA6BFB7685C3B3FCBF59A /* CaseDefaultable.swift */; }; + E45A738555CB47EDFF9F8F1336E44205 /* Switch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96EF80B4E2AAAB3DE1D4FADFE78D85A1 /* Switch.swift */; }; + E4E12208D5246E64B7E6CCAE987ADB03 /* URLRequest+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F4A9488DF9841A108295CB07FC0A327 /* URLRequest+Alamofire.swift */; }; + E60A5078E790EC5CB37F6FA29495EC3E /* CleanDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 017ED680DB98D60DB2E7143556976543 /* CleanDecoder.swift */; }; + E79031377EE6EBE1EF70ED35CFFE96EF /* ObservableConvertibleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = B26AB0C4DE622914CDFEC21B825AA420 /* ObservableConvertibleType.swift */; }; E7BE920F4D2E2E0C7073DD5F7C28B8A9 /* RxNetwork-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 628BA3C7E3F624B6229544E2A8FFD05A /* RxNetwork-dummy.m */; }; - E7C9A90601ABD0F0AA4CA1B28533EEF1 /* TakeWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD45B63AAE6D93B642C4A51230F46F0E /* TakeWhile.swift */; }; - E8B2184C46353D00C15784066DD3ECC1 /* RetryWhen.swift in Sources */ = {isa = PBXBuildFile; fileRef = C67C82C2CFE102B297A324A4E5FD3DF1 /* RetryWhen.swift */; }; - E9D02B7009E3BF2B23303CF80CEB84AA /* Do.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8399DE5B9DFFDEF68FE6474AAD9A53A /* Do.swift */; }; - EA35F8C81EF439B21DB573B008995118 /* Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DE74457D155859024B48FB2F0BC7F87 /* Window.swift */; }; - EAC682EC13AA7DF2BB24825C505E000E /* Observable+Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C6C436FF6DC0403E652712E36FECA61 /* Observable+Response.swift */; }; - EADFFBF37FD717FE99EC8CD475EA99C4 /* Catch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18CA0A28F7BD98494F33E6D3C42B80AD /* Catch.swift */; }; - EB536542B5291C3FE62DBAA84C39D917 /* WithLatestFrom.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94EFD16772ABA46690CA8FA249CB903F /* WithLatestFrom.swift */; }; - EF7C295499D56DA225649E28864A7DBC /* Zip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87A947560D4F112C1FD4F882B4031FA6 /* Zip.swift */; }; - F0FB5F0D46EA7C4A3386E24321BB72C1 /* ScheduledDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B476AADF13F6F0A81082710723A245D /* ScheduledDisposable.swift */; }; - F13F2AA7F2E6D95A181CAB99B900D531 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = E05E3148400AFACBFF3504ACE2F65DD8 /* ServerTrustPolicy.swift */; }; - F481E26B1DF1754ABD31213BA933D502 /* SerialDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4E2055F21CAA6397EDBB7B6A19BD959 /* SerialDispatchQueueScheduler.swift */; }; + E7EEDB6566BB993101A6BD90444F1B6E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; + E839BCEAF6403EA464B4B2EF0518FA3D /* RxSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3FEE588415252F637ABCB92AE18C00F7 /* RxSwift-dummy.m */; }; + E8FD96EBDB36F2BE905D05F74B0906E5 /* CredentialsPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB57BFEB05E3290A7C495F81D4517E5B /* CredentialsPlugin.swift */; }; + E9A5AC2F471699CCA516952A5FEB990B /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC2A567AC43E17B1DC674A5CF3F39F2 /* DispatchQueue+Alamofire.swift */; }; + EA766C3FABE829E8249206FE33266C0D /* HistoricalScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = F59C671B78801B06D8D03CA0F85EE28B /* HistoricalScheduler.swift */; }; + EB2566DE832D8CBCF4A1C9EEFB5E4D6C /* Completable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A0C3DC12FBBA8B175445D4B6542FF64 /* Completable.swift */; }; + ECFC62A33C1002B1AD46222513ED9FEF /* CombineLatest+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAAC62BE6A4E6D668AD1A41F2E42B770 /* CombineLatest+arity.swift */; }; + ED6455829FB837C6D4E391C2A9827C93 /* Zip+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB8879EB842575E1579597850C8194E8 /* Zip+Collection.swift */; }; + EF796E0D6E10A60D7B888D1F8F7A0DDE /* MoyaError.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE22375883C8BEE55DFC3B2E0D7FA42A /* MoyaError.swift */; }; + EF87506B5CB7A49F7ACE0CB35B79B8E8 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F3DF1FD26065AFB41A53B6BC14F6176 /* Filter.swift */; }; + EFC3E2419DC3305F2BBF3082B92BBD1F /* SynchronizedUnsubscribeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1055FDAF365F3DB3904962ECDD1F2F4 /* SynchronizedUnsubscribeType.swift */; }; + F0A03B5B54EF60731A50C987341D6294 /* Pods-RxNetwork_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BBF5DA155317CA881B91CF1DDE6EF8F /* Pods-RxNetwork_Example-dummy.m */; }; + F30644E28EACE951945892FE12E511A8 /* Pods-RxNetwork_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A4E724893CF26E0AFE980F6D1A1AF727 /* Pods-RxNetwork_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F37BECF2D90C729642BC497E89CFA0D4 /* TargetType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 090295A8960F13E4BF06C7006FE789A3 /* TargetType.swift */; }; + F41B2EE22AC7AD5EA0546BBBBE51AC5D /* RequestTypeWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A9666320D821EBDA842D0CC1AE1614C /* RequestTypeWrapper.swift */; }; + F53C290D4F59A0DCF5F9C7E19DFE6378 /* TakeWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C7088BE6AE7DA584C096FA59443665F /* TakeWhile.swift */; }; F5B7FF902215E83B19A5E5A4C2085D4B /* NetworkIndicatorPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7BE029CFC14C6B15BC4DC1C7A179303 /* NetworkIndicatorPlugin.swift */; }; - F62F0E993778E9D76D4E580D49FA2AD6 /* Sink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F784C720427150EAA452738E1DB92B1 /* Sink.swift */; }; - F717CEC6857DA0BD27D471BC1540CCD0 /* DelaySubscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1699413115460E75FD6A05688F64DDE /* DelaySubscription.swift */; }; - F7B74645E07C39771156A1FA413B98D4 /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 10CBD6C72C526A158BF5722F417B6D9A /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F8A64BE8DB59945D8ACBC94E882A37DC /* AsyncLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EC249A6A06E11F54D558E5C401554C6 /* AsyncLock.swift */; }; - FAB3E6C7229344C485BC8D34F0086535 /* Throttle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E506BE877F467668C514BE40A2DFBCE /* Throttle.swift */; }; - FB031DDE393DE0D6487473DC23080C49 /* Endpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5EA22C7559DBAD1C2B1D8F6252B85F13 /* Endpoint.swift */; }; - FD24425EA86517248535F8BCD813D572 /* AnyEncodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0C2849BA49AFF48E54A097D7748D9BC /* AnyEncodable.swift */; }; - FD619C44738C9EC5FF0A484816B5F361 /* MoyaProvider+Internal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77BB4B1F78E43D421C17871E70259147 /* MoyaProvider+Internal.swift */; }; + F667BEF21A2A6AB70F186E8941B01A81 /* Disposables.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D1E4DD19C27C138BBFDE404525C4B82 /* Disposables.swift */; }; + F71789DC91A75033EFB79DB828676451 /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 215370AD25F418C81C587020AC9D68B0 /* Response.swift */; }; + F7679B14121D8747BF7A256A5EBE4EC1 /* Plugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EB932F3D2C3F68D7D82D6E64015C283 /* Plugin.swift */; }; + F913C5A285AC68CF66368D4F804EA6D3 /* MoyaProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51FB867A01D55D3BE97F5860C0EBBEBE /* MoyaProvider.swift */; }; + F9290AB41C51A32A32F046108AE6DA57 /* Generate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8FFF705DCAF8BB6643736848E973DB9 /* Generate.swift */; }; + F938315E9DD7AA367E34CEB718392F0A /* Zip.swift in Sources */ = {isa = PBXBuildFile; fileRef = A960521EC1AC623495B077564407F5B7 /* Zip.swift */; }; + FA800BAF1EDAAD0F282025D829C6EEC7 /* Lock.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22F8E159844A51D84E34FCCD0B6853C /* Lock.swift */; }; + FDEFBF068E959E054E80BC587A76AEB9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; + FE00C77F24CDC030F41AAFC3F6762470 /* ConcurrentMainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 283ED6471DB679456CD734A6E141CF76 /* ConcurrentMainScheduler.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 0D48BA996BCC0A55189AD41FDF2AA5A7 /* PBXContainerItemProxy */ = { + 158F96E735057F8A56F852DE86F4763F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 17F9141D333DA1A7BE5937F227221070; - remoteInfo = Moya; - }; - 11541F84D7B6ED2E187F0EE61C2EDD25 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 300904838EEDDC3BB8242817D8F97CB6; - remoteInfo = CleanJSON; - }; - 1749E85D34D25C22423E92478E361B72 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = EAAA1AD3A8A1B59AB91319EE40752C6D; - remoteInfo = Alamofire; - }; - 1BF7896FCDCB84A7359C41415E504215 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = E163AC315AD24CFBD60C178D602BFC83; - remoteInfo = Result; + remoteGlobalIDString = 045F970D8042EC014BA1BCBAD66DD876; + remoteInfo = RxNetwork; }; - 21B360D5D43F12BA0676E55F974234C8 /* PBXContainerItemProxy */ = { + 1B4B49F2AAC6FD8E2902B164286D43C9 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; @@ -310,470 +298,497 @@ remoteGlobalIDString = 17F9141D333DA1A7BE5937F227221070; remoteInfo = Moya; }; - 4205D999BE73E66041D185EE4F8558FE /* PBXContainerItemProxy */ = { + 42E97C6CD26A108F4872386DFF21D7F2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = EA9EA43B3B503823EE36C60D9C8A865F; - remoteInfo = RxSwift; + remoteGlobalIDString = 9F445FA5AE809C9022E2F9A48325E6AB; + remoteInfo = Storable; }; - 42E97C6CD26A108F4872386DFF21D7F2 /* PBXContainerItemProxy */ = { + 5210E18E803B371F006D469F7283F550 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 9F445FA5AE809C9022E2F9A48325E6AB; - remoteInfo = Storable; + remoteGlobalIDString = EAAA1AD3A8A1B59AB91319EE40752C6D; + remoteInfo = Alamofire; }; - 712FF6E752334487A0F27CDEAB2DE7B2 /* PBXContainerItemProxy */ = { + 59A4ED76495FD39A306A578DBBDFF562 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 8E13C526B33E1AD69D45907AC0ED80E5; - remoteInfo = "Pods-RxNetwork_Example"; + remoteGlobalIDString = 300904838EEDDC3BB8242817D8F97CB6; + remoteInfo = CleanJSON; }; - 7595F335BB9A9CF46F3789FD83389FDE /* PBXContainerItemProxy */ = { + 6DC199D91DC93068F7D082ECDD6820BA /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = EAAA1AD3A8A1B59AB91319EE40752C6D; - remoteInfo = Alamofire; + remoteGlobalIDString = 17F9141D333DA1A7BE5937F227221070; + remoteInfo = Moya; }; - 802363BF4FC5E12CC87511F43CCEFE93 /* PBXContainerItemProxy */ = { + 712FF6E752334487A0F27CDEAB2DE7B2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 045F970D8042EC014BA1BCBAD66DD876; - remoteInfo = RxNetwork; + remoteGlobalIDString = 8E13C526B33E1AD69D45907AC0ED80E5; + remoteInfo = "Pods-RxNetwork_Example"; }; - 850075BA6F502CFE9A62C08CC0823B8A /* PBXContainerItemProxy */ = { + C6A90E2682DBF1616B2A2982CDC8C53E /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; remoteGlobalIDString = 9F445FA5AE809C9022E2F9A48325E6AB; remoteInfo = Storable; }; - F9BE30A673A8C8DE58C039CE4AF60E2C /* PBXContainerItemProxy */ = { + DAE2B239DDE1BA2B07400D39A108057F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = EAAA1AD3A8A1B59AB91319EE40752C6D; + remoteInfo = Alamofire; + }; + EDF9F4D0C960DCFB830C799EFBA7B1D7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = E163AC315AD24CFBD60C178D602BFC83; - remoteInfo = Result; + remoteGlobalIDString = EA9EA43B3B503823EE36C60D9C8A865F; + remoteInfo = RxSwift; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 00D6C805D75CAD12E0A30E69B3D72E0E /* Pods-RxNetwork_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RxNetwork_Example-acknowledgements.plist"; sourceTree = ""; }; - 0175202EBA5B7848CA63FD008999E893 /* AtomicInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AtomicInt.swift; path = Platform/AtomicInt.swift; sourceTree = ""; }; - 024EA7D7B7A0C01327BB4C4FA42C0DDB /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; - 02EF3E2571960553EF676E38AF27D191 /* SubscribeOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscribeOn.swift; path = RxSwift/Observables/SubscribeOn.swift; sourceTree = ""; }; - 03C17192B72F7E3A561BBB7AD859C9C1 /* LockOwnerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LockOwnerType.swift; path = RxSwift/Concurrency/LockOwnerType.swift; sourceTree = ""; }; - 0461B3F80FC05957690727254D64DB36 /* Result.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Result.framework; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 051A771AEA1D3CFAB8AC9B0B1B1E2A94 /* AnonymousDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousDisposable.swift; path = RxSwift/Disposables/AnonymousDisposable.swift; sourceTree = ""; }; + 017ED680DB98D60DB2E7143556976543 /* CleanDecoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanDecoder.swift; path = CleanJSON/Classes/CleanDecoder.swift; sourceTree = ""; }; + 01F1F05FFDC43DD6FD101937710A5BC1 /* SwiftSupport.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftSupport.swift; path = RxSwift/SwiftSupport/SwiftSupport.swift; sourceTree = ""; }; + 026854B499760CAED7E8D0783A1CA04E /* VirtualTimeConverterType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeConverterType.swift; path = RxSwift/Schedulers/VirtualTimeConverterType.swift; sourceTree = ""; }; + 038FE19F91DF016528FED78E9115F12F /* SerialDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDisposable.swift; path = RxSwift/Disposables/SerialDisposable.swift; sourceTree = ""; }; 0535CEBD31800342D461C28837CFCC26 /* RxNetwork.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = RxNetwork.framework; path = RxNetwork.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 06C186E5D087E4643033F456F9857F6C /* RxMutableBox.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxMutableBox.swift; path = RxSwift/RxMutableBox.swift; sourceTree = ""; }; - 06F44D0078C5EDC1E5ED1CE2DA94EC3B /* Disposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposable.swift; path = RxSwift/Disposable.swift; sourceTree = ""; }; - 070D7D7B9FE72386A08E7ED2EFF2B2A3 /* ScheduledItemType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItemType.swift; path = RxSwift/Schedulers/Internal/ScheduledItemType.swift; sourceTree = ""; }; - 075B384D9562A42D796BF4DB92925061 /* Plugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Plugin.swift; path = Sources/Moya/Plugin.swift; sourceTree = ""; }; - 08BDA24A302F62194382674EDA0F5421 /* ObservableConvertibleType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableConvertibleType.swift; path = RxSwift/ObservableConvertibleType.swift; sourceTree = ""; }; + 059C858334C02C23CC187D952CF29A5A /* Storable.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Storable.modulemap; sourceTree = ""; }; + 064C77F2FA7A326D7EA8D53FA1C437D1 /* CleanJSONDecoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONDecoder.swift; path = CleanJSON/Classes/CleanJSONDecoder.swift; sourceTree = ""; }; + 06E4A17B86B13991A06D2DC3AB7F3FA0 /* Storable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Storable.swift; path = Storable/Classes/Storable.swift; sourceTree = ""; }; + 06ED4CAD705266986228184FEBD4314D /* Range.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Range.swift; path = RxSwift/Observables/Range.swift; sourceTree = ""; }; + 07060027423087C9DEC5DFC4122FF9CE /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; + 07DD9FCDFEDD2558F85CFCFD728C8254 /* ParameterEncoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoder.swift; path = Source/ParameterEncoder.swift; sourceTree = ""; }; + 07EC1ECD525E0CBA56BA47301D8355D0 /* Throttle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Throttle.swift; path = RxSwift/Observables/Throttle.swift; sourceTree = ""; }; + 090295A8960F13E4BF06C7006FE789A3 /* TargetType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TargetType.swift; path = Sources/Moya/TargetType.swift; sourceTree = ""; }; + 09AF3614339D8DFBC367756032AFA679 /* Moya-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Moya-Info.plist"; sourceTree = ""; }; 09B3AB5E5543F51A3C3E4EA4B410EC5D /* Pods_RxNetwork_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_RxNetwork_Tests.framework; path = "Pods-RxNetwork_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 0A3312E74B947986F214ABE751FCA435 /* RxSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = RxSwift.modulemap; sourceTree = ""; }; 0AE6037437F12CA130ACE6A16A2CCA06 /* CachingKey+Moya.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CachingKey+Moya.swift"; path = "RxNetwork/Classes/Cacheable/CachingKey+Moya.swift"; sourceTree = ""; }; - 0AF0F7CA0945B7D4424DAE1783C38E86 /* InvocableScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableScheduledItem.swift; path = RxSwift/Schedulers/Internal/InvocableScheduledItem.swift; sourceTree = ""; }; 0BBF5DA155317CA881B91CF1DDE6EF8F /* Pods-RxNetwork_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-RxNetwork_Example-dummy.m"; sourceTree = ""; }; - 0C4B8F82613FF1A59E88D066306DAA5A /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; + 0BC5936508BB7D22682646A8CB85E7D9 /* AnyObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyObserver.swift; path = RxSwift/AnyObserver.swift; sourceTree = ""; }; 0C53BC94DCE913089EC4A7560728795F /* Pods-RxNetwork_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-RxNetwork_Tests-dummy.m"; sourceTree = ""; }; - 0CFDD9DF388C7500BE0CA9EC9430868F /* ToJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToJSON.swift; path = CleanJSON/Classes/ToJSON.swift; sourceTree = ""; }; - 0D436E030C2D3F97A16F08D9D699D5E0 /* Sample.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sample.swift; path = RxSwift/Observables/Sample.swift; sourceTree = ""; }; - 0D57F7C58CAE8463331DAE95C12C191F /* CompositeDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompositeDisposable.swift; path = RxSwift/Disposables/CompositeDisposable.swift; sourceTree = ""; }; - 0D7671785890B55A5043DE82BC9AA553 /* ValidationType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ValidationType.swift; path = Sources/Moya/ValidationType.swift; sourceTree = ""; }; - 0E506BE877F467668C514BE40A2DFBCE /* Throttle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Throttle.swift; path = RxSwift/Observables/Throttle.swift; sourceTree = ""; }; - 0E5B94887F68E04765D5DF974982C649 /* CleanJSON-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CleanJSON-dummy.m"; sourceTree = ""; }; - 0FE2D1253D17372B25A71630EB670F83 /* MoyaProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaProvider.swift; path = Sources/Moya/MoyaProvider.swift; sourceTree = ""; }; - 103A38DB49D6E1C46E635D94E8A8621B /* RxSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-umbrella.h"; sourceTree = ""; }; - 103BFFAC6E40D7EA3D467DC94D3D0F7D /* TargetType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TargetType.swift; path = Sources/Moya/TargetType.swift; sourceTree = ""; }; - 109024142E2C5E7A30BAB7DFF67E4F15 /* Generate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generate.swift; path = RxSwift/Observables/Generate.swift; sourceTree = ""; }; - 10CBD6C72C526A158BF5722F417B6D9A /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; - 10DB2F41EF620B1D2DCF82D5814B4CF2 /* Skip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Skip.swift; path = RxSwift/Observables/Skip.swift; sourceTree = ""; }; - 123CE5581310E493B28137A7D1923CB7 /* AnyObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyObserver.swift; path = RxSwift/AnyObserver.swift; sourceTree = ""; }; - 13400A45104B01F3E0ACD874EF8D440D /* SingleAssignmentDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAssignmentDisposable.swift; path = RxSwift/Disposables/SingleAssignmentDisposable.swift; sourceTree = ""; }; - 13BBC2F9E5B259AAEAC2D869DFB54EF4 /* DefaultIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DefaultIfEmpty.swift; path = RxSwift/Observables/DefaultIfEmpty.swift; sourceTree = ""; }; - 13D56A153DA81C8E203702BD0E153976 /* CleanJSONUnkeyedDecodingContainer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONUnkeyedDecodingContainer.swift; path = CleanJSON/Classes/CleanJSONUnkeyedDecodingContainer.swift; sourceTree = ""; }; + 0C7C46029C2CD9B28F287FA23CB5AF4E /* VirtualTimeScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeScheduler.swift; path = RxSwift/Schedulers/VirtualTimeScheduler.swift; sourceTree = ""; }; + 0CA7D4DC1EE30F6308C2D5F8884C3145 /* Materialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Materialize.swift; path = RxSwift/Observables/Materialize.swift; sourceTree = ""; }; + 106010F786B00382064BEC7285066EAA /* BooleanDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BooleanDisposable.swift; path = RxSwift/Disposables/BooleanDisposable.swift; sourceTree = ""; }; + 108AC4A14D5252C44424D681EE80F4A3 /* MoyaProvider+Defaults.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Defaults.swift"; path = "Sources/Moya/MoyaProvider+Defaults.swift"; sourceTree = ""; }; + 114BFEAEE83F72DCF8BF6D418C63EC48 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; + 1243248DEF75E4E4DB7DB2960DDBAC6F /* RequestTaskMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RequestTaskMap.swift; path = Source/RequestTaskMap.swift; sourceTree = ""; }; + 13B53E6A7802B138B3145753A273F12E /* CleanJSON.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = CleanJSON.modulemap; sourceTree = ""; }; + 13D3427D9F3C5D00EA9CDA4CE91EE091 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Sources/Moya/Response.swift; sourceTree = ""; }; 146C1142C9648D2BEEC2E9D363828B15 /* Pods-RxNetwork_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-RxNetwork_Example.modulemap"; sourceTree = ""; }; 14B8FBB0B6028D0AFB547A68866504BB /* RxNetwork-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxNetwork-prefix.pch"; sourceTree = ""; }; - 18B94C989BB0DBABAE7B0BB75092C30C /* CleanJSON.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = CleanJSON.modulemap; sourceTree = ""; }; - 18CA0A28F7BD98494F33E6D3C42B80AD /* Catch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catch.swift; path = RxSwift/Observables/Catch.swift; sourceTree = ""; }; - 19C84C90E04E14621E48980EA5C9FCCC /* ConnectableObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectableObservableType.swift; path = RxSwift/ConnectableObservableType.swift; sourceTree = ""; }; - 1A3182376CA76F46A4CD75D415DA1334 /* Image.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Image.swift; path = Sources/Moya/Image.swift; sourceTree = ""; }; - 1A7CB16F3DD845CD538C24BBB40A45B3 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Alamofire.modulemap; sourceTree = ""; }; + 166E06420075A86024865085456EB41C /* Moya+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Moya+Alamofire.swift"; path = "Sources/Moya/Moya+Alamofire.swift"; sourceTree = ""; }; + 175ADB815798C35EAE61A42C01BAF510 /* Bag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bag.swift; path = Platform/DataStructures/Bag.swift; sourceTree = ""; }; + 1AA6159BDF623D6C60F20E34DCB21069 /* SchedulerServices+Emulation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "SchedulerServices+Emulation.swift"; path = "RxSwift/Schedulers/SchedulerServices+Emulation.swift"; sourceTree = ""; }; + 1B3D0937387DF0D74D9ED5F2210527AE /* AtomicInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AtomicInt.swift; path = Platform/AtomicInt.swift; sourceTree = ""; }; + 1B9DFFBA4375230FEC92CC8AA2FBAC2D /* StoringKey.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StoringKey.swift; path = Storable/Classes/StoringKey.swift; sourceTree = ""; }; 1D121C06397586C34177246B57D7862B /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = RxNetwork/Classes/Core/Configuration.swift; sourceTree = ""; }; + 1D1E4DD19C27C138BBFDE404525C4B82 /* Disposables.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposables.swift; path = RxSwift/Disposables/Disposables.swift; sourceTree = ""; }; 1E68285C1E15FC2BCBD42B9A22602FF4 /* Pods-RxNetwork_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-RxNetwork_Tests-acknowledgements.markdown"; sourceTree = ""; }; - 1EA4C81F172FE56F2110B4E635A9217A /* ObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableType.swift; path = RxSwift/ObservableType.swift; sourceTree = ""; }; - 1F05771EBFD4F04FD748DE2AC98236EE /* NetworkActivityPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkActivityPlugin.swift; path = Sources/Moya/Plugins/NetworkActivityPlugin.swift; sourceTree = ""; }; - 1FBF4F372924B7A26D2E873EC5310C52 /* Scan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scan.swift; path = RxSwift/Observables/Scan.swift; sourceTree = ""; }; - 1FF0971291DFF3ABDC056FD38C4E26B7 /* DispatchQueue+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Extensions.swift"; path = "Platform/DispatchQueue+Extensions.swift"; sourceTree = ""; }; + 1EA8F908DF549986F05C0056D23F4DCF /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Alamofire.modulemap; sourceTree = ""; }; + 1F876C06D7849AF358641FC077567E9D /* AsMaybe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsMaybe.swift; path = RxSwift/Observables/AsMaybe.swift; sourceTree = ""; }; + 1FCA37674F55BEAA7DB1902D521CB4F7 /* CleanJSONKey.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONKey.swift; path = CleanJSON/Classes/CleanJSONKey.swift; sourceTree = ""; }; 20D9B49CE2793BFBE289FA0F11F11114 /* Observable+Cache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Cache.swift"; path = "RxNetwork/Classes/Cacheable/Observable+Cache.swift"; sourceTree = ""; }; - 20E2A251EE70D5BBAEF40948E9E17D04 /* DecodingError+CleanJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DecodingError+CleanJSON.swift"; path = "CleanJSON/Classes/DecodingError+CleanJSON.swift"; sourceTree = ""; }; - 21A9921E2E8AEDA2A048794AD482B220 /* Timeout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeout.swift; path = RxSwift/Observables/Timeout.swift; sourceTree = ""; }; - 22CC88B7046DDBA3D6276B4E2194AD69 /* OperationQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OperationQueueScheduler.swift; path = RxSwift/Schedulers/OperationQueueScheduler.swift; sourceTree = ""; }; - 23FEA0F0B14DBBC27CEF81DF8BBF4CD2 /* MoyaProvider+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Rx.swift"; path = "Sources/RxMoya/MoyaProvider+Rx.swift"; sourceTree = ""; }; - 25EA3890AFB09F00B4C6CBDEDE6A200B /* PriorityQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PriorityQueue.swift; path = Platform/DataStructures/PriorityQueue.swift; sourceTree = ""; }; - 26447F7A81B0685F31D812013E2FD571 /* NoError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NoError.swift; path = Result/NoError.swift; sourceTree = ""; }; - 26D5A18F2DD0172C5BF816F53C0C842E /* ShareReplayScope.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareReplayScope.swift; path = RxSwift/Observables/ShareReplayScope.swift; sourceTree = ""; }; - 2865BAAD4EC1FB32BF75306DCE3B1524 /* Defaultable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Defaultable.swift; path = CleanJSON/Classes/Defaultable.swift; sourceTree = ""; }; - 28B36A1B1C36D1080FDD8A8D8DB83EEB /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; - 2A322CC328A74A06BBE73ABF4563D92B /* Moya-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-prefix.pch"; sourceTree = ""; }; - 2A5A2A4DEB1CD2B886870C3B065ECDFE /* Debounce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debounce.swift; path = RxSwift/Observables/Debounce.swift; sourceTree = ""; }; - 2B2B627F2DA4602B785859CD89D41EB2 /* CleanJSONDecoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONDecoder.swift; path = CleanJSON/Classes/CleanJSONDecoder.swift; sourceTree = ""; }; + 215370AD25F418C81C587020AC9D68B0 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; + 23959528143D698F0E7EA5172E01917A /* ObserverBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverBase.swift; path = RxSwift/Observers/ObserverBase.swift; sourceTree = ""; }; + 24377677E869B58AFF6FC7E269547304 /* Bag+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bag+Rx.swift"; path = "RxSwift/Extensions/Bag+Rx.swift"; sourceTree = ""; }; + 24723368CF70A3495D4B622F759CA9EB /* _CleanJSONDecoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = _CleanJSONDecoder.swift; path = CleanJSON/Classes/_CleanJSONDecoder.swift; sourceTree = ""; }; + 261441859064F36E20C60F6022EDD26C /* ObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableType.swift; path = RxSwift/ObservableType.swift; sourceTree = ""; }; + 263889CE19EB5C22C1DFE6E75BDF5AE9 /* ObserverType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverType.swift; path = RxSwift/ObserverType.swift; sourceTree = ""; }; + 273C2759CA11D4F23ACEFDD6381C2955 /* CleanJSON-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "CleanJSON-Info.plist"; sourceTree = ""; }; + 281236BEC6F709D46DB47B4A36EFCB03 /* Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+arity.swift"; path = "RxSwift/Observables/Zip+arity.swift"; sourceTree = ""; }; + 283ED6471DB679456CD734A6E141CF76 /* ConcurrentMainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentMainScheduler.swift; path = RxSwift/Schedulers/ConcurrentMainScheduler.swift; sourceTree = ""; }; + 285B0CBF6658680D66BC9BA5F9369DB2 /* RxSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = RxSwift.modulemap; sourceTree = ""; }; + 28EFF13A360CFD0623C59A70A02E674D /* Timer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timer.swift; path = RxSwift/Observables/Timer.swift; sourceTree = ""; }; 2B41D0A0D02B46471976E76243A7002B /* Pods-RxNetwork_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-RxNetwork_Tests.modulemap"; sourceTree = ""; }; - 2B4677E34AE10E0CFC03D558DE92FCBE /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = RxSwift/Observables/Filter.swift; sourceTree = ""; }; - 2B473CA79DC00D5023F081186B253959 /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 2B8634B215369599FFBE8D8BEE0A73F0 /* SkipWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipWhile.swift; path = RxSwift/Observables/SkipWhile.swift; sourceTree = ""; }; 2CDAF23ECDB357B6F54E0D5B23707BDA /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; - 2EBDC61865279D6FA005335908D5C904 /* CleanJSONDecodingStorage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONDecodingStorage.swift; path = CleanJSON/Classes/CleanJSONDecodingStorage.swift; sourceTree = ""; }; - 3229669159891C612E13B182201E4BDE /* Repeat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Repeat.swift; path = RxSwift/Observables/Repeat.swift; sourceTree = ""; }; - 32CD5C54D21440E751214150F0A09075 /* MainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MainScheduler.swift; path = RxSwift/Schedulers/MainScheduler.swift; sourceTree = ""; }; - 33A6A208C28E271BEB4503B134F03402 /* Result-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Result-dummy.m"; sourceTree = ""; }; + 2D5EF00E0D75C20FB6320A6B8BEFFA89 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; + 30D7D6D7FF99869C604E595F16D9C25E /* CleanJSONKeyedDecodingContainer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONKeyedDecodingContainer.swift; path = CleanJSON/Classes/CleanJSONKeyedDecodingContainer.swift; sourceTree = ""; }; + 3366E923B08356C8F918DB061CEE17F6 /* Observable+Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Response.swift"; path = "Sources/RxMoya/Observable+Response.swift"; sourceTree = ""; }; 33AD91CFFC81D1D4F26F7F9F0FCDE143 /* TargetType+Cache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "TargetType+Cache.swift"; path = "RxNetwork/Classes/Cacheable/TargetType+Cache.swift"; sourceTree = ""; }; - 35167BBAF273C4BD04E0DC6682DA3027 /* Debug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debug.swift; path = RxSwift/Observables/Debug.swift; sourceTree = ""; }; - 35CE0BB6F7B6E73DD6005283B02F7D91 /* SessionManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionManager.swift; path = Source/SessionManager.swift; sourceTree = ""; }; + 33B7AE29589319D1045D96DADFD3BF9D /* Moya.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Moya.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 356880B4C0B320DE90D2184D116E44D2 /* MoyaProvider+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Rx.swift"; path = "Sources/RxMoya/MoyaProvider+Rx.swift"; sourceTree = ""; }; + 3710215F4405D61FD1A9C2F0A16B3802 /* StartWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StartWith.swift; path = RxSwift/Observables/StartWith.swift; sourceTree = ""; }; 3756A9BBE41ABEE8DCBF5BCA6972C4DA /* Moya.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Moya.framework; path = Moya.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 37B911B1EA77CBDF7B73DBDC7BFD06D5 /* Take.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Take.swift; path = RxSwift/Observables/Take.swift; sourceTree = ""; }; 384F5AB8528B8290F3E142C2CEFBEC4D /* RxNetwork-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxNetwork-umbrella.h"; sourceTree = ""; }; - 38B84F4DDE9EC97C7658466A4F61D8CC /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = RxSwift/Errors.swift; sourceTree = ""; }; - 38D39F19C2D7830625FE2CC5A5A511EE /* CleanJSONKey.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONKey.swift; path = CleanJSON/Classes/CleanJSONKey.swift; sourceTree = ""; }; - 392893BEA86DF791410026FE8221C3AE /* CompactMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompactMap.swift; path = RxSwift/Observables/CompactMap.swift; sourceTree = ""; }; - 39892B52048600EFBD4F560E241AAF21 /* ToArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToArray.swift; path = RxSwift/Observables/ToArray.swift; sourceTree = ""; }; - 3C6C436FF6DC0403E652712E36FECA61 /* Observable+Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Response.swift"; path = "Sources/RxMoya/Observable+Response.swift"; sourceTree = ""; }; - 3C6E87C52334FE85DB9052CA9ADFFA51 /* MoyaError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaError.swift; path = Sources/Moya/MoyaError.swift; sourceTree = ""; }; - 3CD79C92FCD473A91027762AD434900E /* CleanJSON-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CleanJSON-prefix.pch"; sourceTree = ""; }; - 3CDE4A389BA3C59497ECC9FFF14C59CB /* HistoricalScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalScheduler.swift; path = RxSwift/Schedulers/HistoricalScheduler.swift; sourceTree = ""; }; - 3D0BB7725C943BC842980A2432D60C8D /* CaseDefaultable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CaseDefaultable.swift; path = CleanJSON/Classes/CaseDefaultable.swift; sourceTree = ""; }; - 3E5A5C37017BD8385DC0314BA6CF25BE /* Result.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 3E61E8EC5B750DA96109A7723F2F10A3 /* Alamofire-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Alamofire-Info.plist"; sourceTree = ""; }; - 40621D1C09CEC54AB32D25180619170F /* Create.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Create.swift; path = RxSwift/Observables/Create.swift; sourceTree = ""; }; - 414641A651CE66CD2533CDAA1B3228B8 /* Buffer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Buffer.swift; path = RxSwift/Observables/Buffer.swift; sourceTree = ""; }; - 42814DB03E511C5C8960096D960A7BF0 /* Take.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Take.swift; path = RxSwift/Observables/Take.swift; sourceTree = ""; }; - 4312F45A0C2A90FA940262A788DA1D2D /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Sources/Moya/Response.swift; sourceTree = ""; }; - 43B7BB421B6C3CBA2E8F3B7040236CBB /* Maybe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Maybe.swift; path = RxSwift/Traits/Maybe.swift; sourceTree = ""; }; - 480B0F3BD8336820C115D3B6A90A1410 /* _CleanJSONDecoder+Decode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "_CleanJSONDecoder+Decode.swift"; path = "CleanJSON/Classes/_CleanJSONDecoder+Decode.swift"; sourceTree = ""; }; - 49DD539DDB729197E3C98CB588FD7742 /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; - 4C5CC81D7F7FD374CE8C2EEDE367E7F1 /* PrimitiveSequence+Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "PrimitiveSequence+Zip+arity.swift"; path = "RxSwift/Traits/PrimitiveSequence+Zip+arity.swift"; sourceTree = ""; }; - 4DB1AC6526927D201E926E7613DB1388 /* InfiniteSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InfiniteSequence.swift; path = Platform/DataStructures/InfiniteSequence.swift; sourceTree = ""; }; - 4EC249A6A06E11F54D558E5C401554C6 /* AsyncLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncLock.swift; path = RxSwift/Concurrency/AsyncLock.swift; sourceTree = ""; }; - 4EFCA4D2614BAE878327E5D1CF0E38D9 /* Dematerialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Dematerialize.swift; path = RxSwift/Observables/Dematerialize.swift; sourceTree = ""; }; + 391E68D2C7A74AE68CF263AA0C1AAA66 /* GroupedObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupedObservable.swift; path = RxSwift/GroupedObservable.swift; sourceTree = ""; }; + 3B8298BE160EB95F5580C850AB10A7AE /* OperationQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OperationQueueScheduler.swift; path = RxSwift/Schedulers/OperationQueueScheduler.swift; sourceTree = ""; }; + 3CF66E4C2CB94F6F43B1E691EA0E2231 /* Do.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Do.swift; path = RxSwift/Observables/Do.swift; sourceTree = ""; }; + 3F741BA7A1003FC8E14528AEE8234E45 /* Observable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Observable.swift; path = RxSwift/Observable.swift; sourceTree = ""; }; + 3FEE588415252F637ABCB92AE18C00F7 /* RxSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxSwift-dummy.m"; sourceTree = ""; }; + 435339186260EFAE9AE4DA219F7B2773 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Sources/Moya/MultipartFormData.swift; sourceTree = ""; }; + 4396A8A94652826C607D41298EF08C74 /* GroupBy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupBy.swift; path = RxSwift/Observables/GroupBy.swift; sourceTree = ""; }; + 45262C79144217A26F50B3D6B87321CC /* MultipartUpload.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartUpload.swift; path = Source/MultipartUpload.swift; sourceTree = ""; }; + 459C12262C5D16FA761505712BB18C0A /* DecodingError+CleanJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DecodingError+CleanJSON.swift"; path = "CleanJSON/Classes/DecodingError+CleanJSON.swift"; sourceTree = ""; }; + 464A6A21FCFFC435CEB6FF433C2835B6 /* Platform.Linux.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Linux.swift; path = Platform/Platform.Linux.swift; sourceTree = ""; }; + 48176300B238876EC6C9D40BFA40DCF4 /* NopDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NopDisposable.swift; path = RxSwift/Disposables/NopDisposable.swift; sourceTree = ""; }; + 481D7ED739538C7E81FC6264A591FB08 /* ServerTrustEvaluation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustEvaluation.swift; path = Source/ServerTrustEvaluation.swift; sourceTree = ""; }; + 49A2C1D9C92F53AB8857555AA48D8E4F /* AnonymousObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousObserver.swift; path = RxSwift/Observers/AnonymousObserver.swift; sourceTree = ""; }; + 4A9666320D821EBDA842D0CC1AE1614C /* RequestTypeWrapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RequestTypeWrapper.swift; path = Sources/Moya/RequestTypeWrapper.swift; sourceTree = ""; }; + 4BF5B5A5394978EC360C135181E91C7B /* Date+Dispatch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Date+Dispatch.swift"; path = "RxSwift/Date+Dispatch.swift"; sourceTree = ""; }; + 4CB16749A0EBB70E74838BF111C9A79A /* SubscribeOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscribeOn.swift; path = RxSwift/Observables/SubscribeOn.swift; sourceTree = ""; }; + 4CF25362BD77D1C26F575845566A7A52 /* CleanJSON-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CleanJSON-umbrella.h"; sourceTree = ""; }; + 4D1EAD5660345F2842931BB2F20B7114 /* RxMutableBox.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxMutableBox.swift; path = RxSwift/RxMutableBox.swift; sourceTree = ""; }; + 5032057E303F4F9BEBFD1A0BBBAF8D2E /* URLSessionConfiguration+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URLSessionConfiguration+Alamofire.swift"; path = "Source/URLSessionConfiguration+Alamofire.swift"; sourceTree = ""; }; 505A47D6BE973E8F95746B12D01A9805 /* Pods-RxNetwork_Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RxNetwork_Example-Info.plist"; sourceTree = ""; }; - 51D25826B7219C70A28E6D2CD3FBB5C5 /* PrimitiveSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PrimitiveSequence.swift; path = RxSwift/Traits/PrimitiveSequence.swift; sourceTree = ""; }; - 57478EAC5004653A54E4D6FAFF1D70BE /* JSONAdapter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONAdapter.swift; path = CleanJSON/Classes/JSONAdapter.swift; sourceTree = ""; }; - 581610EDD119727B4B94817B2C112CD5 /* SwiftSupport.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftSupport.swift; path = RxSwift/SwiftSupport/SwiftSupport.swift; sourceTree = ""; }; - 588DDC7B8E7AEDB85A2506DEAA9EC743 /* Switch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Switch.swift; path = RxSwift/Observables/Switch.swift; sourceTree = ""; }; - 5A7D63109C9D98726B52F3CF146C60C3 /* NetworkLoggerPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkLoggerPlugin.swift; path = Sources/Moya/Plugins/NetworkLoggerPlugin.swift; sourceTree = ""; }; - 5BDFF360B4EB3BA2B58427E9CC350B4A /* TakeUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeUntil.swift; path = RxSwift/Observables/TakeUntil.swift; sourceTree = ""; }; - 5C53C70334A2566029CA7A1F28C3728A /* CombineLatest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CombineLatest.swift; path = RxSwift/Observables/CombineLatest.swift; sourceTree = ""; }; - 5D677955E7367DD419D9178B1CE932CB /* ObservableType+PrimitiveSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableType+PrimitiveSequence.swift"; path = "RxSwift/Traits/ObservableType+PrimitiveSequence.swift"; sourceTree = ""; }; - 5D6B1411D5F87DCC322904F9E8DEBDF5 /* Empty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Empty.swift; path = RxSwift/Observables/Empty.swift; sourceTree = ""; }; + 5068721A4B673383C14D763B739D0F6A /* ConcurrentDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentDispatchQueueScheduler.swift; path = RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift; sourceTree = ""; }; + 510B47F966CD35AECBAABBAD4972B870 /* CleanJSON-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CleanJSON-dummy.m"; sourceTree = ""; }; + 5156953DD1D83F2B9DF2091FCFCDAEA9 /* RetryWhen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RetryWhen.swift; path = RxSwift/Observables/RetryWhen.swift; sourceTree = ""; }; + 518907B2E3570849B955D56284BE399E /* ValidationType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ValidationType.swift; path = Sources/Moya/ValidationType.swift; sourceTree = ""; }; + 51FB867A01D55D3BE97F5860C0EBBEBE /* MoyaProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaProvider.swift; path = Sources/Moya/MoyaProvider.swift; sourceTree = ""; }; + 52044509C05EFC4E338B319064FC119F /* Empty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Empty.swift; path = RxSwift/Observables/Empty.swift; sourceTree = ""; }; + 53200B222E5F51E904674C0D4BECC7E6 /* URLRequest+Encoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URLRequest+Encoding.swift"; path = "Sources/Moya/URLRequest+Encoding.swift"; sourceTree = ""; }; + 532E2616914679E24F3935C6BA666020 /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; + 5629A419CA6E7BC96DFC091194F7CCDA /* SingleAssignmentDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAssignmentDisposable.swift; path = RxSwift/Disposables/SingleAssignmentDisposable.swift; sourceTree = ""; }; + 57857C02D75DE4B780347BC7585AD918 /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 57E212D5A4117757354B0713D214D3C6 /* DispatchQueue+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Extensions.swift"; path = "Platform/DispatchQueue+Extensions.swift"; sourceTree = ""; }; + 57F11648E65F779A1E00EDA213CED5BF /* JSONAdapter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONAdapter.swift; path = CleanJSON/Classes/JSONAdapter.swift; sourceTree = ""; }; + 584F3E4DE3D7704EDA086ED5308DBAFE /* _CleanJSONDecoder+SingleValueDecodingContainer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "_CleanJSONDecoder+SingleValueDecodingContainer.swift"; path = "CleanJSON/Classes/_CleanJSONDecoder+SingleValueDecodingContainer.swift"; sourceTree = ""; }; + 58B1CF188B3F948B2B9F1FBB25FC492D /* CleanJSONUnkeyedDecodingContainer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONUnkeyedDecodingContainer.swift; path = CleanJSON/Classes/CleanJSONUnkeyedDecodingContainer.swift; sourceTree = ""; }; + 5A1B471AFBB9EE1592CA2F743A068D13 /* String+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Rx.swift"; path = "RxSwift/Extensions/String+Rx.swift"; sourceTree = ""; }; + 5A44EAF6108B38D69C98B832186F762F /* CombineLatest+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+Collection.swift"; path = "RxSwift/Observables/CombineLatest+Collection.swift"; sourceTree = ""; }; + 5CF15DD381BEDD5C680457A3A3C8E7B8 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; 5D797E9A5C5782CE845840781FA1CC81 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 5E6A636EE980B3D946A1E9FEEA6C0191 /* Single.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Single.swift; path = RxSwift/Traits/Single.swift; sourceTree = ""; }; - 5E82D8BD9ADE36721105B7BDF95ED385 /* PublishSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PublishSubject.swift; path = RxSwift/Subjects/PublishSubject.swift; sourceTree = ""; }; - 5EA22C7559DBAD1C2B1D8F6252B85F13 /* Endpoint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Endpoint.swift; path = Sources/Moya/Endpoint.swift; sourceTree = ""; }; - 5F07796D7C322F4B1CD81DCD13822283 /* AnonymousObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousObserver.swift; path = RxSwift/Observers/AnonymousObserver.swift; sourceTree = ""; }; - 602DE06880AF8D36101AA50B4D6BD1AC /* Bag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bag.swift; path = Platform/DataStructures/Bag.swift; sourceTree = ""; }; - 608548DDE77A017F5F9ADF9686269FB0 /* _CleanJSONDecoder+SingleValueDecodingContainer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "_CleanJSONDecoder+SingleValueDecodingContainer.swift"; path = "CleanJSON/Classes/_CleanJSONDecoder+SingleValueDecodingContainer.swift"; sourceTree = ""; }; + 5DB0DB0B8DD0BA363E2BADCA7C4EB152 /* Sink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sink.swift; path = RxSwift/Observables/Sink.swift; sourceTree = ""; }; + 5F7813E70AFD621E29F61CC11AF7384A /* ShareReplayScope.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareReplayScope.swift; path = RxSwift/Observables/ShareReplayScope.swift; sourceTree = ""; }; 609EA9D4146C3002A053FD732F25F5C9 /* Pods-RxNetwork_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RxNetwork_Tests.debug.xcconfig"; sourceTree = ""; }; - 60C263EBFAA24B7D27F155E1E5128131 /* URLRequest+Encoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URLRequest+Encoding.swift"; path = "Sources/Moya/URLRequest+Encoding.swift"; sourceTree = ""; }; - 615753299734045C0DD8A27DCC14AE1B /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; + 61D6CA746419B5F8C8A66C4F282B4A16 /* TakeUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeUntil.swift; path = RxSwift/Observables/TakeUntil.swift; sourceTree = ""; }; + 621E3483BB03CACA14EA24471EE82988 /* DecodingStrategy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DecodingStrategy.swift; path = CleanJSON/Classes/DecodingStrategy.swift; sourceTree = ""; }; 628BA3C7E3F624B6229544E2A8FFD05A /* RxNetwork-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxNetwork-dummy.m"; sourceTree = ""; }; - 62A1583B4EDCD56FD0A08DE0E6DB53CF /* RxSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-prefix.pch"; sourceTree = ""; }; - 6343B25C3876A28EBA04E9E4C4B06525 /* RxSwift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "RxSwift-Info.plist"; sourceTree = ""; }; - 6345095269AD5D0D48D3A7337CBDDD9C /* SynchronizedDisposeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedDisposeType.swift; path = RxSwift/Concurrency/SynchronizedDisposeType.swift; sourceTree = ""; }; + 62A0CE3B22BC0B6704044CE6929E2AAF /* Single.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Single.swift; path = RxSwift/Traits/Single.swift; sourceTree = ""; }; 636C1A4840185C5ED791200F21F1D9A8 /* Pods-RxNetwork_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-RxNetwork_Example-frameworks.sh"; sourceTree = ""; }; - 63ACC09FA3E638CD1B664F2F58A31E75 /* Sequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sequence.swift; path = RxSwift/Observables/Sequence.swift; sourceTree = ""; }; - 63FD0B9EE7F469EB063F26B5D3CF5800 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; - 64B0A939B603CEF8DFEC39D2BF35E3C6 /* Moya.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Moya.xcconfig; sourceTree = ""; }; + 656236B3BDCA7C4269F4C0012B871A72 /* OperationQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "OperationQueue+Alamofire.swift"; path = "Source/OperationQueue+Alamofire.swift"; sourceTree = ""; }; + 6575CBED40319444DAC29C45231D0ADD /* RedirectHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RedirectHandler.swift; path = Source/RedirectHandler.swift; sourceTree = ""; }; + 65B8757D3ADFD48EAD4CEC21E6CA7506 /* ScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItem.swift; path = RxSwift/Schedulers/Internal/ScheduledItem.swift; sourceTree = ""; }; 67048AB3FF6627D1617A102F4DA46CC4 /* Pods-RxNetwork_Tests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RxNetwork_Tests-Info.plist"; sourceTree = ""; }; - 67A470C8DC892EBB4DD7FE56F6BA899F /* SingleAsync.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAsync.swift; path = RxSwift/Observables/SingleAsync.swift; sourceTree = ""; }; - 6878A3D28CCE246541B8A26B4EBAF6F9 /* DecodingStrategy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DecodingStrategy.swift; path = CleanJSON/Classes/DecodingStrategy.swift; sourceTree = ""; }; - 6A1657C8E1E54D4E9C0A1F291FDD728F /* Result-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-umbrella.h"; sourceTree = ""; }; - 6A4A37B4CE82143B83531B6D76B00CF8 /* SynchronizedOnType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedOnType.swift; path = RxSwift/Concurrency/SynchronizedOnType.swift; sourceTree = ""; }; - 6CC4500F93B4B104E17E70A09776FAFB /* Cancelable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancelable.swift; path = RxSwift/Cancelable.swift; sourceTree = ""; }; - 6E7732F43DC6F5BC613923EE57A5852F /* Date+Dispatch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Date+Dispatch.swift"; path = "RxSwift/Date+Dispatch.swift"; sourceTree = ""; }; - 6F709D96E5B405F8743D36F24E01D5BF /* _CleanJSONDecoder+Unbox.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "_CleanJSONDecoder+Unbox.swift"; path = "CleanJSON/Classes/_CleanJSONDecoder+Unbox.swift"; sourceTree = ""; }; - 6F83C5AB3CE4C25E433AD5957FDB6B89 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; - 7379795ED8FA1D61822A8B9006590D64 /* Storable-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Storable-umbrella.h"; sourceTree = ""; }; - 764FEB4DA2DA19F677897C2E5AF133FC /* Moya-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Moya-Info.plist"; sourceTree = ""; }; - 7712E8FD442517BB8CFC52F650538D1F /* Multicast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multicast.swift; path = RxSwift/Observables/Multicast.swift; sourceTree = ""; }; - 77889CE0FA23657557BCA936F33AC862 /* Reactive.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reactive.swift; path = RxSwift/Reactive.swift; sourceTree = ""; }; - 7789F26C8F2E0496E96A6FE451E8E41A /* SynchronizedUnsubscribeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedUnsubscribeType.swift; path = RxSwift/Concurrency/SynchronizedUnsubscribeType.swift; sourceTree = ""; }; + 68BCEA9418E28101583E11BC73556B8B /* Multicast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multicast.swift; path = RxSwift/Observables/Multicast.swift; sourceTree = ""; }; + 6924568E51FA7C86522CA17AE7C24A61 /* PublishSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PublishSubject.swift; path = RxSwift/Subjects/PublishSubject.swift; sourceTree = ""; }; + 6A6EAEC21684544BD94E4F5F389AE039 /* Event.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Event.swift; path = RxSwift/Event.swift; sourceTree = ""; }; + 6AD4F5F29B9F841EDFCC338661F69C29 /* BehaviorSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BehaviorSubject.swift; path = RxSwift/Subjects/BehaviorSubject.swift; sourceTree = ""; }; + 6BCF8A34F8736405DCAA50FCD656E99E /* Debounce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debounce.swift; path = RxSwift/Observables/Debounce.swift; sourceTree = ""; }; + 6C7088BE6AE7DA584C096FA59443665F /* TakeWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeWhile.swift; path = RxSwift/Observables/TakeWhile.swift; sourceTree = ""; }; + 6E0C66DF27398C5D3096DDAE92D4736D /* ObservableType+PrimitiveSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableType+PrimitiveSequence.swift"; path = "RxSwift/Traits/ObservableType+PrimitiveSequence.swift"; sourceTree = ""; }; + 6EBD7C3BE2D544889C2C44DA82FF75FE /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = RxSwift/Errors.swift; sourceTree = ""; }; + 7199297E549EDE7B1EB1BC3C8F9B9940 /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; + 770E07B9D1850E6653372A7CF36A61AA /* Defaultable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Defaultable.swift; path = CleanJSON/Classes/Defaultable.swift; sourceTree = ""; }; + 7783A297EDC6DB81F3E2923068179F39 /* TailRecursiveSink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TailRecursiveSink.swift; path = RxSwift/Observers/TailRecursiveSink.swift; sourceTree = ""; }; 779C3CE97C4D1D629211A0D71656A0EF /* Pods_RxNetwork_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_RxNetwork_Example.framework; path = "Pods-RxNetwork_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 77A22401803C87B12D0B1802723F1272 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; - 77BB4B1F78E43D421C17871E70259147 /* MoyaProvider+Internal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Internal.swift"; path = "Sources/Moya/MoyaProvider+Internal.swift"; sourceTree = ""; }; - 77D083AC4720957A6E4CFFF8FC6579DB /* AsSingle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsSingle.swift; path = RxSwift/Observables/AsSingle.swift; sourceTree = ""; }; - 77F0E42A37B61923C3B0F9D91528C433 /* Moya.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Moya.modulemap; sourceTree = ""; }; - 788EE0E11F60CA6C5CF81C36BFB8026C /* AnyError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyError.swift; path = Result/AnyError.swift; sourceTree = ""; }; - 79F4E28F448376837374C53780547EB5 /* RecursiveScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveScheduler.swift; path = RxSwift/Schedulers/RecursiveScheduler.swift; sourceTree = ""; }; - 7BFFE78F407A3E3EC3BB0999EAA98C23 /* Expiry.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expiry.swift; path = Storable/Classes/Expiry.swift; sourceTree = ""; }; + 78265D97A9DC9F491966430125C34339 /* Window.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Window.swift; path = RxSwift/Observables/Window.swift; sourceTree = ""; }; + 7A298A1BD371BDDF1B3E5D7EECC3845E /* Amb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Amb.swift; path = RxSwift/Observables/Amb.swift; sourceTree = ""; }; + 7B6716FB482B8FB850D691E513742282 /* Image.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Image.swift; path = Sources/Moya/Image.swift; sourceTree = ""; }; + 7C331AE4DF911F37FADFBA55C28BDF95 /* URLConvertible+URLRequestConvertible.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URLConvertible+URLRequestConvertible.swift"; path = "Source/URLConvertible+URLRequestConvertible.swift"; sourceTree = ""; }; 7C8EFFA4AD4EBEEEA1A9C774A7B57920 /* Pods-RxNetwork_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RxNetwork_Tests.release.xcconfig"; sourceTree = ""; }; - 7C9837F097BA0661BE725E226C75B0ED /* Amb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Amb.swift; path = RxSwift/Observables/Amb.swift; sourceTree = ""; }; - 7DA7CE3FA675C27EC7531424D601E4D6 /* GroupedObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupedObservable.swift; path = RxSwift/GroupedObservable.swift; sourceTree = ""; }; - 7DE74457D155859024B48FB2F0BC7F87 /* Window.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Window.swift; path = RxSwift/Observables/Window.swift; sourceTree = ""; }; - 7E72F41519DA80A3A76E80765092C618 /* SerialDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDisposable.swift; path = RxSwift/Disposables/SerialDisposable.swift; sourceTree = ""; }; - 7EBE73A1F581A150871DD7C59A95C51E /* Reduce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reduce.swift; path = RxSwift/Observables/Reduce.swift; sourceTree = ""; }; - 801227187A38C70B7CD65056C8540660 /* Deferred.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deferred.swift; path = RxSwift/Observables/Deferred.swift; sourceTree = ""; }; - 80387FC519E22F2B2B49D3AFA0E212D0 /* AsyncSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncSubject.swift; path = RxSwift/Subjects/AsyncSubject.swift; sourceTree = ""; }; + 7EB932F3D2C3F68D7D82D6E64015C283 /* Plugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Plugin.swift; path = Sources/Moya/Plugin.swift; sourceTree = ""; }; + 7F3A668BE4FDB860BAF96CAF554A6F83 /* Protector.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Protector.swift; path = Source/Protector.swift; sourceTree = ""; }; + 7F4A9488DF9841A108295CB07FC0A327 /* URLRequest+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URLRequest+Alamofire.swift"; path = "Source/URLRequest+Alamofire.swift"; sourceTree = ""; }; + 7F8CA8FEF001B39393CE02B01F7ABFEF /* CleanJSON.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CleanJSON.xcconfig; sourceTree = ""; }; + 7F9B865C569AE9C16A59190E92AE7900 /* NetworkLoggerPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkLoggerPlugin.swift; path = Sources/Moya/Plugins/NetworkLoggerPlugin.swift; sourceTree = ""; }; + 802FEC40A7AD7F1C1828DAC26D5037E7 /* RxSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-prefix.pch"; sourceTree = ""; }; 809C5FAB588354C9BA37DC3EAB8CB45C /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = RxSwift.framework; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 80D881D37DEDE75835E431267A289615 /* Expirable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expirable.swift; path = Storable/Classes/Expirable.swift; sourceTree = ""; }; - 813B32AAA3627675D2FFEFD165B45D06 /* Result.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Result.xcconfig; sourceTree = ""; }; - 81C07514150A957CE4AA46A9D5858F37 /* StartWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StartWith.swift; path = RxSwift/Observables/StartWith.swift; sourceTree = ""; }; - 826BB238AF8D2DF3C0B3B83BFD8A89C2 /* Event.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Event.swift; path = RxSwift/Event.swift; sourceTree = ""; }; - 82D640E71F821B4FBF081C6A290064B9 /* Moya+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Moya+Alamofire.swift"; path = "Sources/Moya/Moya+Alamofire.swift"; sourceTree = ""; }; - 836C06CF483EE7F9CBBFBF2F596B0385 /* SkipWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipWhile.swift; path = RxSwift/Observables/SkipWhile.swift; sourceTree = ""; }; - 842A313B38739D79E1F10D268EED6642 /* VirtualTimeScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeScheduler.swift; path = RxSwift/Schedulers/VirtualTimeScheduler.swift; sourceTree = ""; }; - 862992D9BE5907C7BCD1D1470C36FD9B /* Completable+AndThen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Completable+AndThen.swift"; path = "RxSwift/Traits/Completable+AndThen.swift"; sourceTree = ""; }; - 87358343A5D901F4521FFF81B0B479DF /* Deprecated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecated.swift; path = RxSwift/Deprecated.swift; sourceTree = ""; }; - 877918F3F6EED6DB6E729EDB9A1411D3 /* ConcurrentMainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentMainScheduler.swift; path = RxSwift/Schedulers/ConcurrentMainScheduler.swift; sourceTree = ""; }; - 87A947560D4F112C1FD4F882B4031FA6 /* Zip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Zip.swift; path = RxSwift/Observables/Zip.swift; sourceTree = ""; }; - 8923D5FE4C232A98804F332893091E00 /* Storable.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Storable.modulemap; sourceTree = ""; }; + 80B701110F9D39B161D4B6443680FB85 /* ConnectableObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectableObservableType.swift; path = RxSwift/ConnectableObservableType.swift; sourceTree = ""; }; + 8330A5B5A3E68AD688C14ED063E1C812 /* HTTPHeaders.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HTTPHeaders.swift; path = Source/HTTPHeaders.swift; sourceTree = ""; }; + 837BF293A2A9E426CD22790E32C9C234 /* Deprecated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecated.swift; path = RxSwift/Deprecated.swift; sourceTree = ""; }; + 851D5C9B66C1AB6A9593879B3FE3AA69 /* Queue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Queue.swift; path = Platform/DataStructures/Queue.swift; sourceTree = ""; }; + 8609F5716C4E9428EE5B36B89411E31B /* SchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SchedulerType.swift; path = RxSwift/SchedulerType.swift; sourceTree = ""; }; + 87025F53F29324A0B1EFE02C1FF41EFB /* Moya-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-prefix.pch"; sourceTree = ""; }; + 872AA3F1C2369C28062BEF17B62AA2AF /* InvocableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableType.swift; path = RxSwift/Schedulers/Internal/InvocableType.swift; sourceTree = ""; }; + 8812BDA42BE19B2653B9E7F54A6C7D71 /* Storable-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Storable-dummy.m"; sourceTree = ""; }; + 887DA39FFD9CF440698575DBDBB38533 /* CompactMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompactMap.swift; path = RxSwift/Observables/CompactMap.swift; sourceTree = ""; }; 8936BBCF5565CBC7816671C7210C68AC /* Single+Cache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Single+Cache.swift"; path = "RxNetwork/Classes/Cacheable/Single+Cache.swift"; sourceTree = ""; }; - 8947E196EE277E683690C57CDF44AC57 /* CredentialsPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CredentialsPlugin.swift; path = Sources/Moya/Plugins/CredentialsPlugin.swift; sourceTree = ""; }; - 8AE9784D546FC31E0C910427B049FE19 /* ElementAt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ElementAt.swift; path = RxSwift/Observables/ElementAt.swift; sourceTree = ""; }; - 8B476AADF13F6F0A81082710723A245D /* ScheduledDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledDisposable.swift; path = RxSwift/Disposables/ScheduledDisposable.swift; sourceTree = ""; }; - 8EA9506901CA45368E64CECDE2AC0111 /* CleanDecoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanDecoder.swift; path = CleanJSON/Classes/CleanDecoder.swift; sourceTree = ""; }; - 8F784C720427150EAA452738E1DB92B1 /* Sink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sink.swift; path = RxSwift/Observables/Sink.swift; sourceTree = ""; }; - 9201C1B93547FA42711EEFC2506420A3 /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = RxSwift/Observables/Error.swift; sourceTree = ""; }; - 9236A62D5A9A1541E7C97A2305F818F1 /* Storable-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Storable-dummy.m"; sourceTree = ""; }; - 92A3B3C356E05FEB86BFBD27E55708E8 /* NopDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NopDisposable.swift; path = RxSwift/Disposables/NopDisposable.swift; sourceTree = ""; }; - 9348EC550C2DE629E2972C26303D8574 /* CombineLatest+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+arity.swift"; path = "RxSwift/Observables/CombineLatest+arity.swift"; sourceTree = ""; }; - 940148EFC161536FD6AFDFE736BCA498 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; - 940E0BBF501F4A300D0021046496FE81 /* GroupBy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupBy.swift; path = RxSwift/Observables/GroupBy.swift; sourceTree = ""; }; - 94EFD16772ABA46690CA8FA249CB903F /* WithLatestFrom.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WithLatestFrom.swift; path = RxSwift/Observables/WithLatestFrom.swift; sourceTree = ""; }; - 97CBC3466F1286E71A45E3FFA76CC0BF /* MoyaProvider+Defaults.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Defaults.swift"; path = "Sources/Moya/MoyaProvider+Defaults.swift"; sourceTree = ""; }; - 98A7E1F3FF08F854BF270ECCE4F89CC6 /* Platform.Darwin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Darwin.swift; path = Platform/Platform.Darwin.swift; sourceTree = ""; }; - 99488A252B958375D5D1E8EE95D9778C /* CleanJSON-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CleanJSON-umbrella.h"; sourceTree = ""; }; - 99C694C106C4D52B5E35CFC2329515A8 /* String+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Rx.swift"; path = "RxSwift/Extensions/String+Rx.swift"; sourceTree = ""; }; - 9A624CF82AD4E2325D88C723898AB911 /* Result-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-prefix.pch"; sourceTree = ""; }; - 9B66D8C935AC36871C0BD83F0CD6170B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 9B6E93EE7132CF3C6B0CE163B135D045 /* Task.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Task.swift; path = Sources/Moya/Task.swift; sourceTree = ""; }; - 9C10F56D87B9C18985D5AAC65395BAAD /* SubjectType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubjectType.swift; path = RxSwift/Subjects/SubjectType.swift; sourceTree = ""; }; - 9C5C3E8FC2320C938515A1D863D28525 /* Queue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Queue.swift; path = Platform/DataStructures/Queue.swift; sourceTree = ""; }; - 9D6995DCF5F58FAC14A1A934BDC0A684 /* Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+arity.swift"; path = "RxSwift/Observables/Zip+arity.swift"; sourceTree = ""; }; + 8991A07C83CADA92EC413B79A966B78F /* CombineLatest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CombineLatest.swift; path = RxSwift/Observables/CombineLatest.swift; sourceTree = ""; }; + 8A0C3DC12FBBA8B175445D4B6542FF64 /* Completable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Completable.swift; path = RxSwift/Traits/Completable.swift; sourceTree = ""; }; + 8F8BFE4BE4F8B73C513A7AF3690DA5DB /* Moya-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Moya-dummy.m"; sourceTree = ""; }; + 90E8D676117C6EE98E4505BA03AEC218 /* AddRef.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AddRef.swift; path = RxSwift/Observables/AddRef.swift; sourceTree = ""; }; + 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 91602304913C81BC608AA3B12FA2C240 /* DefaultIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DefaultIfEmpty.swift; path = RxSwift/Observables/DefaultIfEmpty.swift; sourceTree = ""; }; + 918C6D8E9812D83F3F978BE83821D354 /* DistinctUntilChanged.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DistinctUntilChanged.swift; path = RxSwift/Observables/DistinctUntilChanged.swift; sourceTree = ""; }; + 9224BCF600D984030DF4BA9B27515E98 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; + 924A2EC1B9F2476BA368A519BC3C894E /* Moya-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-umbrella.h"; sourceTree = ""; }; + 93351B9F2D4D05A8B32289A223198FC4 /* Moya.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Moya.xcconfig; sourceTree = ""; }; + 9557CF86C29E2FFA60740C0FCBB997F0 /* Repeat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Repeat.swift; path = RxSwift/Observables/Repeat.swift; sourceTree = ""; }; + 9563564A7E1F9DEEC3E8617471D512A7 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; + 957282C5668E6B9BBDC2DC7E772A3CAA /* Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rx.swift; path = RxSwift/Rx.swift; sourceTree = ""; }; + 959132636FAD71C3E674126894F528C9 /* NetworkActivityPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkActivityPlugin.swift; path = Sources/Moya/Plugins/NetworkActivityPlugin.swift; sourceTree = ""; }; + 96EF80B4E2AAAB3DE1D4FADFE78D85A1 /* Switch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Switch.swift; path = RxSwift/Observables/Switch.swift; sourceTree = ""; }; + 97FE73D2B39572EED263A65F22E19FA2 /* PrimitiveSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PrimitiveSequence.swift; path = RxSwift/Traits/PrimitiveSequence.swift; sourceTree = ""; }; + 9C8E26BC97A8DED0530AFC5BD39829CB /* Producer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Producer.swift; path = RxSwift/Observables/Producer.swift; sourceTree = ""; }; + 9D26024B8191EBACE7D8A9880B82804A /* RxSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-umbrella.h"; sourceTree = ""; }; 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 9DF4296505592B5D0FD5CC5BB0E26389 /* ObserverBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverBase.swift; path = RxSwift/Observers/ObserverBase.swift; sourceTree = ""; }; - 9EB9B86C292DD53F1AE6C75AC618F2E5 /* Concat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Concat.swift; path = RxSwift/Observables/Concat.swift; sourceTree = ""; }; - 9F7D0F1D51D12073CCF7023693AFC750 /* Storable-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Storable-Info.plist"; sourceTree = ""; }; - 9F8AA49B5F9F6A63CF750597EECE1B35 /* RefCountDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RefCountDisposable.swift; path = RxSwift/Disposables/RefCountDisposable.swift; sourceTree = ""; }; - 9F9ABD56A8A5AAA76FA1006C7C0319F9 /* InvocableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableType.swift; path = RxSwift/Schedulers/Internal/InvocableType.swift; sourceTree = ""; }; - A01B6FD9971B00B9FC8FA93EFC7C8C67 /* SchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SchedulerType.swift; path = RxSwift/SchedulerType.swift; sourceTree = ""; }; - A0C2849BA49AFF48E54A097D7748D9BC /* AnyEncodable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyEncodable.swift; path = Sources/Moya/AnyEncodable.swift; sourceTree = ""; }; - A18BFC90176B7DAAF108031606624D89 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A1C49CE6B8CEEE3328EE09E8318765D8 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; - A21383201ED0A5CA1C36C38F51FA3739 /* URL+Moya.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URL+Moya.swift"; path = "Sources/Moya/URL+Moya.swift"; sourceTree = ""; }; - A217530D24CDC3BA2E0405E7B27526C3 /* Zip+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+Collection.swift"; path = "RxSwift/Observables/Zip+Collection.swift"; sourceTree = ""; }; - A2CDEBB39F0951C9D52A6E700269F1C9 /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; - A3532859CC374A0448427AA03A17CEF1 /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; - A39A24B971D6837589328B7242501585 /* BehaviorSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BehaviorSubject.swift; path = RxSwift/Subjects/BehaviorSubject.swift; sourceTree = ""; }; - A4E2055F21CAA6397EDBB7B6A19BD959 /* SerialDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDispatchQueueScheduler.swift; path = RxSwift/Schedulers/SerialDispatchQueueScheduler.swift; sourceTree = ""; }; + 9E860EE8CCAEE984F3560839F7EBB54D /* ObserveOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserveOn.swift; path = RxSwift/Observables/ObserveOn.swift; sourceTree = ""; }; + 9F3DF1FD26065AFB41A53B6BC14F6176 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = RxSwift/Observables/Filter.swift; sourceTree = ""; }; + 9F466DB24369FFA9C876D1159D3EC7B5 /* CompositeDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompositeDisposable.swift; path = RxSwift/Disposables/CompositeDisposable.swift; sourceTree = ""; }; + 9F4F1DCDF05BEB3F04B44C57826B6E9D /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; + A0A898627D00FE18A307ED2F6139887E /* AsyncSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncSubject.swift; path = RxSwift/Subjects/AsyncSubject.swift; sourceTree = ""; }; + A2EE4EDA23D55A1A3A024127D814BDEB /* InvocableScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableScheduledItem.swift; path = RxSwift/Schedulers/Internal/InvocableScheduledItem.swift; sourceTree = ""; }; + A35CC6FC2E1BA6BFB7685C3B3FCBF59A /* CaseDefaultable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CaseDefaultable.swift; path = CleanJSON/Classes/CaseDefaultable.swift; sourceTree = ""; }; + A42080C29AD328E1CC7E761FF82C78D4 /* Concat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Concat.swift; path = RxSwift/Observables/Concat.swift; sourceTree = ""; }; + A477CFE1FB1F7D21971FB8489E55038B /* RefCountDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RefCountDisposable.swift; path = RxSwift/Disposables/RefCountDisposable.swift; sourceTree = ""; }; A4E724893CF26E0AFE980F6D1A1AF727 /* Pods-RxNetwork_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-RxNetwork_Example-umbrella.h"; sourceTree = ""; }; - A5126BA64BB75B98526D6CDB0962DC82 /* Timer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timer.swift; path = RxSwift/Observables/Timer.swift; sourceTree = ""; }; - A627E2E6E7679AACBF174B6B0004910E /* Materialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Materialize.swift; path = RxSwift/Observables/Materialize.swift; sourceTree = ""; }; - A703EA81C5D80B459B4392FE54E7355A /* Map.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Map.swift; path = RxSwift/Observables/Map.swift; sourceTree = ""; }; + A60DF8D4575271044606BEFDCB119757 /* CleanJSON-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CleanJSON-prefix.pch"; sourceTree = ""; }; + A61C9FDA9C2DC77CC66404E5DC5F5839 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; + A6E2ADDF97E331AE3D9E7015B9331F2E /* Reactive.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reactive.swift; path = RxSwift/Reactive.swift; sourceTree = ""; }; A7BE029CFC14C6B15BC4DC1C7A179303 /* NetworkIndicatorPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkIndicatorPlugin.swift; path = RxNetwork/Classes/Core/NetworkIndicatorPlugin.swift; sourceTree = ""; }; - A8178E16A51434E7A26BBD55A6B37C6E /* First.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = First.swift; path = RxSwift/Observables/First.swift; sourceTree = ""; }; - A8DF7E8E9EF22AB0A0913E99D314AEDB /* CleanJSON-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "CleanJSON-Info.plist"; sourceTree = ""; }; - A9460DD6D919A36951EE3D58A709038A /* TakeLast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeLast.swift; path = RxSwift/Observables/TakeLast.swift; sourceTree = ""; }; + A84004A757167A55FF499FBA38C96863 /* SynchronizedDisposeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedDisposeType.swift; path = RxSwift/Concurrency/SynchronizedDisposeType.swift; sourceTree = ""; }; + A8FFF705DCAF8BB6643736848E973DB9 /* Generate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generate.swift; path = RxSwift/Observables/Generate.swift; sourceTree = ""; }; + A960521EC1AC623495B077564407F5B7 /* Zip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Zip.swift; path = RxSwift/Observables/Zip.swift; sourceTree = ""; }; A9CD2C883403FED402CEAF86D47F2869 /* RxNetwork.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = RxNetwork.modulemap; sourceTree = ""; }; - AA9A9C7AB975B17F9DE9B89754C95017 /* Delay.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Delay.swift; path = RxSwift/Observables/Delay.swift; sourceTree = ""; }; + AA2F3406F1AB92C229210DB0D09E5C3C /* ElementAt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ElementAt.swift; path = RxSwift/Observables/ElementAt.swift; sourceTree = ""; }; + AA39293E1B3E2EDE286F008969A48315 /* AnyEncodable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyEncodable.swift; path = Sources/Moya/AnyEncodable.swift; sourceTree = ""; }; + AE2B47586C4F9A49F712AAF2829C0556 /* Disposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposable.swift; path = RxSwift/Disposable.swift; sourceTree = ""; }; + AFFBEA36FF4978E1AE57BEDB7A2BC0AB /* Task.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Task.swift; path = Sources/Moya/Task.swift; sourceTree = ""; }; + B056FB16307BDF73A5E862E88073DF61 /* SubscriptionDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscriptionDisposable.swift; path = RxSwift/Disposables/SubscriptionDisposable.swift; sourceTree = ""; }; + B1B3426F7AF9875D93107A68BD88C6C8 /* DispatchQueueConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DispatchQueueConfiguration.swift; path = RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift; sourceTree = ""; }; + B1C63393F67222B14B2A6A86BBFB3276 /* HistoricalSchedulerTimeConverter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalSchedulerTimeConverter.swift; path = RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift; sourceTree = ""; }; + B26AB0C4DE622914CDFEC21B825AA420 /* ObservableConvertibleType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableConvertibleType.swift; path = RxSwift/ObservableConvertibleType.swift; sourceTree = ""; }; + B2743CDAB975E17560B238D8DA292938 /* DisposeBag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBag.swift; path = RxSwift/Disposables/DisposeBag.swift; sourceTree = ""; }; + B3551DF262187D1203B83BAF9EA48B1F /* AccessTokenPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AccessTokenPlugin.swift; path = Sources/Moya/Plugins/AccessTokenPlugin.swift; sourceTree = ""; }; + B4046BB44E989FA26661B6373203DFCA /* CachedResponseHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CachedResponseHandler.swift; path = Source/CachedResponseHandler.swift; sourceTree = ""; }; B44AA8B4D28EFEDF548D76837E9809A7 /* RxNetwork.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxNetwork.xcconfig; sourceTree = ""; }; - B4CF6D434F6E074FA598BAA2C4B35459 /* Bag+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bag+Rx.swift"; path = "RxSwift/Extensions/Bag+Rx.swift"; sourceTree = ""; }; - B68FE6CA81907C496E43720D457CC318 /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; - B6D197B36BC69B453F44708E10DF6392 /* HistoricalSchedulerTimeConverter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalSchedulerTimeConverter.swift; path = RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift; sourceTree = ""; }; - B6FEABAC12B54E0C395879AABDF01D9F /* MultiTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultiTarget.swift; path = Sources/Moya/MultiTarget.swift; sourceTree = ""; }; - B83FC2D2C34F9975CEC708B8B925F398 /* DispatchQueueConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DispatchQueueConfiguration.swift; path = RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift; sourceTree = ""; }; - B8BA52B58EF201DE49EC2C51C377B61D /* SkipUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipUntil.swift; path = RxSwift/Observables/SkipUntil.swift; sourceTree = ""; }; - B8DBF4C657F123B7370D7DB32158FFE1 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; - B9C7FF5091353BEB5B3815670D146F4D /* CombineLatest+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+Collection.swift"; path = "RxSwift/Observables/CombineLatest+Collection.swift"; sourceTree = ""; }; - BB2F21E4C09010A901E61FBA57ECB7F7 /* Enumerated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Enumerated.swift; path = RxSwift/Observables/Enumerated.swift; sourceTree = ""; }; - BC11B17C35ABE0EAAEC50E6CAB038C72 /* Result.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Result.modulemap; sourceTree = ""; }; + B47CC1F172167C45762F66717A77796A /* RequestInterceptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RequestInterceptor.swift; path = Source/RequestInterceptor.swift; sourceTree = ""; }; + B558F8F5563D0291BDEB3FECF5DADCBB /* Optional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Optional.swift; path = RxSwift/Observables/Optional.swift; sourceTree = ""; }; + B6BE32335045023EE6863CA98E374280 /* SynchronizedOnType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedOnType.swift; path = RxSwift/Concurrency/SynchronizedOnType.swift; sourceTree = ""; }; + B7328429742CCF5564A4C089C23BAA1E /* Expiry.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expiry.swift; path = Storable/Classes/Expiry.swift; sourceTree = ""; }; + B73D8B762168FDE1579334B98F4B7B6B /* Sequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sequence.swift; path = RxSwift/Observables/Sequence.swift; sourceTree = ""; }; + B7A3B49D4F7F2FC9AEECDD6F8CF67056 /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; + B99FCD857F9FC1E1732BF85DE8B0DAF3 /* AlamofireExtended.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AlamofireExtended.swift; path = Source/AlamofireExtended.swift; sourceTree = ""; }; + BA41BF945051BA5E92804FFAD6DE5491 /* Maybe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Maybe.swift; path = RxSwift/Traits/Maybe.swift; sourceTree = ""; }; + BBA48397A5BDA8966A7BA81238CB6A25 /* RetryPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RetryPolicy.swift; path = Source/RetryPolicy.swift; sourceTree = ""; }; + BBB5CEF94FA9266F39DB2722D92DCF0C /* Delay.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Delay.swift; path = RxSwift/Observables/Delay.swift; sourceTree = ""; }; BC2CB346ED4ADE0D3CC2B16D179BC8B1 /* OnCache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OnCache.swift; path = RxNetwork/Classes/Cacheable/OnCache.swift; sourceTree = ""; }; - BD4F6541B3C1185699540F4720830C9A /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Result/Result.swift; sourceTree = ""; }; - BDC06C9B7F0ABD6EFECF86BFD2DDEF35 /* AccessTokenPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AccessTokenPlugin.swift; path = Sources/Moya/Plugins/AccessTokenPlugin.swift; sourceTree = ""; }; + BCEB2D380081D5A0846F66CFCDA36C82 /* RxSwift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "RxSwift-Info.plist"; sourceTree = ""; }; + BD129BB4BC4BEFA673CE5337EDE59F16 /* ObservableType+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableType+Extensions.swift"; path = "RxSwift/ObservableType+Extensions.swift"; sourceTree = ""; }; + BD7A90629DB11EC28A169D2F7F3D632E /* Using.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Using.swift; path = RxSwift/Observables/Using.swift; sourceTree = ""; }; BDE9E77D94940D5D7DD20415876A3E16 /* Network.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Network.swift; path = RxNetwork/Classes/Core/Network.swift; sourceTree = ""; }; - C07046CE1C8698494AAFDE7CC2AA2546 /* BinaryDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryDisposable.swift; path = RxSwift/Disposables/BinaryDisposable.swift; sourceTree = ""; }; - C1699413115460E75FD6A05688F64DDE /* DelaySubscription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DelaySubscription.swift; path = RxSwift/Observables/DelaySubscription.swift; sourceTree = ""; }; - C1F86D524D03550F673489574B0D775B /* ConcurrentDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentDispatchQueueScheduler.swift; path = RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift; sourceTree = ""; }; - C22C666DC9CA615FB155808E4CCE3685 /* _CleanJSONDecoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = _CleanJSONDecoder.swift; path = CleanJSON/Classes/_CleanJSONDecoder.swift; sourceTree = ""; }; - C28A142256D9C33BCC76AA70E5F9C7F7 /* ObservableType+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableType+Extensions.swift"; path = "RxSwift/ObservableType+Extensions.swift"; sourceTree = ""; }; - C46EB0A1058A5F883D191CBEF78389F9 /* Using.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Using.swift; path = RxSwift/Observables/Using.swift; sourceTree = ""; }; - C67C82C2CFE102B297A324A4E5FD3DF1 /* RetryWhen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RetryWhen.swift; path = RxSwift/Observables/RetryWhen.swift; sourceTree = ""; }; - C6D02DB3C808412802654FEA252DDCE7 /* Range.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Range.swift; path = RxSwift/Observables/Range.swift; sourceTree = ""; }; - C70C756A73A5373EBA9F35240349A435 /* CurrentThreadScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CurrentThreadScheduler.swift; path = RxSwift/Schedulers/CurrentThreadScheduler.swift; sourceTree = ""; }; + BE6017678DC20784DE0E2AD55B4F04DB /* Completable+AndThen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Completable+AndThen.swift"; path = "RxSwift/Traits/Completable+AndThen.swift"; sourceTree = ""; }; + BFCC182F14E626EA6111FE97CE9D3956 /* SwitchIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwitchIfEmpty.swift; path = RxSwift/Observables/SwitchIfEmpty.swift; sourceTree = ""; }; + C22E1442CDC1AC958D56F7A1D91D12E2 /* Storable.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Storable.xcconfig; sourceTree = ""; }; + C3B5139E54D26E6D005B206C90FBC49E /* ToJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToJSON.swift; path = CleanJSON/Classes/ToJSON.swift; sourceTree = ""; }; + C3D522855F74589774A16C6462EFD9DF /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; + C4224738F69DE56C01651B8544B7C42F /* ScheduledItemType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItemType.swift; path = RxSwift/Schedulers/Internal/ScheduledItemType.swift; sourceTree = ""; }; + C42D6560638F4754D6A1106E2C119DC9 /* Moya.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Moya.modulemap; sourceTree = ""; }; + C44F817E631EEBC40D7A1AE6F76CE096 /* RecursiveScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveScheduler.swift; path = RxSwift/Schedulers/RecursiveScheduler.swift; sourceTree = ""; }; + C52CC70AAC72FD95F6F5224EC49CB335 /* EventMonitor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EventMonitor.swift; path = Source/EventMonitor.swift; sourceTree = ""; }; + C65AB0ECD9BE59B36B0D287583B430BA /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = RxSwift/Observables/Error.swift; sourceTree = ""; }; + C6DEEA09CCFDE102C00C37E286327774 /* CleanJSONDecodingStorage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONDecodingStorage.swift; path = CleanJSON/Classes/CleanJSONDecodingStorage.swift; sourceTree = ""; }; + C843DC02298710B839ADA338C6B946D9 /* SubjectType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubjectType.swift; path = RxSwift/Subjects/SubjectType.swift; sourceTree = ""; }; + C9B8D43335230764364E9B128FBFEE9C /* Merge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Merge.swift; path = RxSwift/Observables/Merge.swift; sourceTree = ""; }; + CA20847C685812AF00A79990B6BAA989 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; CA39BBC6D19BBC768D9855F31B730801 /* Pods-RxNetwork_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RxNetwork_Example.debug.xcconfig"; sourceTree = ""; }; - CA5FE89881BDDFA4543909C57ADDA9E3 /* DisposeBag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBag.swift; path = RxSwift/Disposables/DisposeBag.swift; sourceTree = ""; }; - CB53EDF330673B7E3722CEED52EFAA06 /* SchedulerServices+Emulation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "SchedulerServices+Emulation.swift"; path = "RxSwift/Schedulers/SchedulerServices+Emulation.swift"; sourceTree = ""; }; + CAAC62BE6A4E6D668AD1A41F2E42B770 /* CombineLatest+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+arity.swift"; path = "RxSwift/Observables/CombineLatest+arity.swift"; sourceTree = ""; }; + CB3EFDC334F6169C56374A5C825DC7B9 /* MoyaProvider+Internal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Internal.swift"; path = "Sources/Moya/MoyaProvider+Internal.swift"; sourceTree = ""; }; CB8D27833ED4C3A77B842960D1232AF0 /* RxNetwork-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "RxNetwork-Info.plist"; sourceTree = ""; }; - CBA0D6C32A9B10D1E69850A7C4871D69 /* Just.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Just.swift; path = RxSwift/Observables/Just.swift; sourceTree = ""; }; - CD45B63AAE6D93B642C4A51230F46F0E /* TakeWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeWhile.swift; path = RxSwift/Observables/TakeWhile.swift; sourceTree = ""; }; - D04D20A7AC8E838332E87B9CC6072CA4 /* AsMaybe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsMaybe.swift; path = RxSwift/Observables/AsMaybe.swift; sourceTree = ""; }; - D159605860917ACB8FF26C42DEEF6232 /* Moya-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-umbrella.h"; sourceTree = ""; }; - D15E658C47E95B25B21E994C0E218A6E /* BooleanDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BooleanDisposable.swift; path = RxSwift/Disposables/BooleanDisposable.swift; sourceTree = ""; }; - D2BD9F570439B97484E91A1599F5148B /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Sources/Moya/MultipartFormData.swift; sourceTree = ""; }; - D2C320B56090A8F2C5AF19D07F5AEC4A /* Merge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Merge.swift; path = RxSwift/Observables/Merge.swift; sourceTree = ""; }; + CC2518C82B77E61DD3E771A90D0E705B /* SingleAsync.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAsync.swift; path = RxSwift/Observables/SingleAsync.swift; sourceTree = ""; }; + CCAA7EFDBD65FDF9746A3F061CFFE23A /* DisposeBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBase.swift; path = RxSwift/Disposables/DisposeBase.swift; sourceTree = ""; }; + CDC2A567AC43E17B1DC674A5CF3F39F2 /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; + CDF5778FD5870156AA7E9BBF3B8AB023 /* Scan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scan.swift; path = RxSwift/Observables/Scan.swift; sourceTree = ""; }; + CE7C1B6EB782CFC56290F959830E5184 /* Cancelable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancelable.swift; path = RxSwift/Cancelable.swift; sourceTree = ""; }; + D0B13F674DBE3EFB389C8FC0E0EEBB4C /* RecursiveLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveLock.swift; path = Platform/RecursiveLock.swift; sourceTree = ""; }; + D1DC8D74B0FA822526096B124124CF0D /* MultiTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultiTarget.swift; path = Sources/Moya/MultiTarget.swift; sourceTree = ""; }; + D23BE0DFB80262E1E54C75F46321DA46 /* SerialDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDispatchQueueScheduler.swift; path = RxSwift/Schedulers/SerialDispatchQueueScheduler.swift; sourceTree = ""; }; + D2617C3A7C5B9307CD29E748E3C8A1BE /* Result+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Result+Alamofire.swift"; path = "Source/Result+Alamofire.swift"; sourceTree = ""; }; D2E61A1FAEAD8564B5C86A1530F30C64 /* Pods-RxNetwork_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-RxNetwork_Example-acknowledgements.markdown"; sourceTree = ""; }; - D46A7DCAECDDEB723B4A208E93DEF41E /* Disposables.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposables.swift; path = RxSwift/Disposables/Disposables.swift; sourceTree = ""; }; - D4BD4A3FB6CD3EDB6D05E397C03034CC /* VirtualTimeConverterType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeConverterType.swift; path = RxSwift/Schedulers/VirtualTimeConverterType.swift; sourceTree = ""; }; - D5A0AD1966A3CA77ABDFD3363625E209 /* CleanJSONKeyedDecodingContainer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONKeyedDecodingContainer.swift; path = CleanJSON/Classes/CleanJSONKeyedDecodingContainer.swift; sourceTree = ""; }; - D5DA72693CDC4D9C9673E59AE87805D8 /* ObserveOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserveOn.swift; path = RxSwift/Observables/ObserveOn.swift; sourceTree = ""; }; - D6A7FB919EC54999326B0BFDA624B2A7 /* ResultProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResultProtocol.swift; path = Result/ResultProtocol.swift; sourceTree = ""; }; - D77E4E90796539A09CD3F94E2EB07C62 /* Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rx.swift; path = RxSwift/Rx.swift; sourceTree = ""; }; - D7C0B8547E454B8775051C20634B04D6 /* Storable.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Storable.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D326233DC57411A161CE3F1EC3D8F1E3 /* ScheduledDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledDisposable.swift; path = RxSwift/Disposables/ScheduledDisposable.swift; sourceTree = ""; }; + D393291DE590C7D1D4D6ABBE9D7D74D7 /* BinaryDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryDisposable.swift; path = RxSwift/Disposables/BinaryDisposable.swift; sourceTree = ""; }; + D3AF5CD080B1A13647A5A3DED40F55A7 /* Never.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Never.swift; path = RxSwift/Observables/Never.swift; sourceTree = ""; }; + D4AE47EF154E4204A4E65751F8F7E839 /* Just.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Just.swift; path = RxSwift/Observables/Just.swift; sourceTree = ""; }; + D595591C9104D8297D280F60DB59ED40 /* Storable.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Storable.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D6A7300E9EDE897E98A93A55ED03C320 /* AnonymousDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousDisposable.swift; path = RxSwift/Disposables/AnonymousDisposable.swift; sourceTree = ""; }; + D701E95B632E9004418D08A5ADA9C5F9 /* ToArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToArray.swift; path = RxSwift/Observables/ToArray.swift; sourceTree = ""; }; D81A3288820421CA37D5D3C9485FF92F /* TargetType+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "TargetType+Rx.swift"; path = "RxNetwork/Classes/Core/TargetType+Rx.swift"; sourceTree = ""; }; + D8AFA5D5C8CB619386A03ED83164149D /* Debug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debug.swift; path = RxSwift/Observables/Debug.swift; sourceTree = ""; }; D8E25A7EBE7D5EF10E1251AEBB1E81C3 /* RxNetwork.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = RxNetwork.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + D8E39A127DC4BE788E64476BC0EA77F1 /* AsyncLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncLock.swift; path = RxSwift/Concurrency/AsyncLock.swift; sourceTree = ""; }; + D914052A2E741D0CEB2EFA59C074014E /* WithLatestFrom.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WithLatestFrom.swift; path = RxSwift/Observables/WithLatestFrom.swift; sourceTree = ""; }; D9B8AA14A5BB1D0CE3A003CB6A566265 /* CleanJSON.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = CleanJSON.framework; path = CleanJSON.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - DAC31522F5455A2C6F4491368CD360D6 /* Lock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Lock.swift; path = RxSwift/Concurrency/Lock.swift; sourceTree = ""; }; - DAE93D164F26813DD5276E43F2A9999A /* Optional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Optional.swift; path = RxSwift/Observables/Optional.swift; sourceTree = ""; }; - DC52766E964A2DFA0D2EF71F7F2CEED0 /* SwitchIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwitchIfEmpty.swift; path = RxSwift/Observables/SwitchIfEmpty.swift; sourceTree = ""; }; - DCD3C72FA08DDA33A60A64AB444DF824 /* Never.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Never.swift; path = RxSwift/Observables/Never.swift; sourceTree = ""; }; + DAA477DC2A7EE71C837912B943C66EB9 /* LockOwnerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LockOwnerType.swift; path = RxSwift/Concurrency/LockOwnerType.swift; sourceTree = ""; }; + DB8879EB842575E1579597850C8194E8 /* Zip+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+Collection.swift"; path = "RxSwift/Observables/Zip+Collection.swift"; sourceTree = ""; }; + DC534BF69BF4BEBF349DCF903F148AF1 /* Skip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Skip.swift; path = RxSwift/Observables/Skip.swift; sourceTree = ""; }; DD446B4044B0702284E4C9270774ADF6 /* Pods-RxNetwork_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-RxNetwork_Tests-umbrella.h"; sourceTree = ""; }; - DEC6126FA23A77F14AF3E120DE4F9C59 /* RxSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxSwift.xcconfig; sourceTree = ""; }; - DEDE5F6D6258910BBAC86A2FC12706AE /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; - E05E3148400AFACBFF3504ACE2F65DD8 /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; - E21F54A8CC91AE7213A25860CA923CD5 /* AddRef.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AddRef.swift; path = RxSwift/Observables/AddRef.swift; sourceTree = ""; }; - E2C8E894D9A7DA056F8BB7785C13E455 /* ObserverType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverType.swift; path = RxSwift/ObserverType.swift; sourceTree = ""; }; - E376CC266538EDEAA1B5ED6A70AB2D70 /* TailRecursiveSink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TailRecursiveSink.swift; path = RxSwift/Observers/TailRecursiveSink.swift; sourceTree = ""; }; - E3F372C200DAA39C7197524D94DAE1BA /* Moya.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Moya.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E4DD70AF3E5FD72B8D7B3936B02A41AD /* RecursiveLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveLock.swift; path = Platform/RecursiveLock.swift; sourceTree = ""; }; - E8128A1FF086E2B5F97DF16EC9B0DCC5 /* Completable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Completable.swift; path = RxSwift/Traits/Completable.swift; sourceTree = ""; }; - E95A60142ECD29AC2F9B3E721E69D0D8 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; - EB93829954E8FEB012C904908CF52BD0 /* Single+Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Single+Response.swift"; path = "Sources/RxMoya/Single+Response.swift"; sourceTree = ""; }; + DD5ABA32F80170199772B819D5F85455 /* Buffer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Buffer.swift; path = RxSwift/Observables/Buffer.swift; sourceTree = ""; }; + DE2B8FDD8649116A6423B52C08577481 /* HTTPMethod.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HTTPMethod.swift; path = Source/HTTPMethod.swift; sourceTree = ""; }; + DE2F73C6F49CA4D7DEBEE113F83AE16F /* Dematerialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Dematerialize.swift; path = RxSwift/Observables/Dematerialize.swift; sourceTree = ""; }; + DEDFBA1EA963A0249C7469CF7238858F /* Timeout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeout.swift; path = RxSwift/Observables/Timeout.swift; sourceTree = ""; }; + DF781C4124DBCD6FD88F02423A0AD64F /* URLEncodedFormEncoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = URLEncodedFormEncoder.swift; path = Source/URLEncodedFormEncoder.swift; sourceTree = ""; }; + DF8253EDCD720F8564FA74414D06E608 /* Storable-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Storable-Info.plist"; sourceTree = ""; }; + DFE1599E8ADF5C735CC90BFB1D717988 /* Reduce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reduce.swift; path = RxSwift/Observables/Reduce.swift; sourceTree = ""; }; + E0FAC347CF1C5BA6C739BC8A7C1CAD5C /* _CleanJSONDecoder+Unbox.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "_CleanJSONDecoder+Unbox.swift"; path = "CleanJSON/Classes/_CleanJSONDecoder+Unbox.swift"; sourceTree = ""; }; + E1BEF04B058DFE32D41D2ADB0346E7B9 /* URL+Moya.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URL+Moya.swift"; path = "Sources/Moya/URL+Moya.swift"; sourceTree = ""; }; + E1F46CEC9A444CD1F2C933728A1A0261 /* Sample.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sample.swift; path = RxSwift/Observables/Sample.swift; sourceTree = ""; }; + E224D5FA50E8F9A78C3C35F72CF74EC6 /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; + E22F8E159844A51D84E34FCCD0B6853C /* Lock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Lock.swift; path = RxSwift/Concurrency/Lock.swift; sourceTree = ""; }; + E35801E05FCED24500A9100CEEFC1717 /* _CleanJSONDecoder+Decode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "_CleanJSONDecoder+Decode.swift"; path = "CleanJSON/Classes/_CleanJSONDecoder+Decode.swift"; sourceTree = ""; }; + E3996058E040B343A27929EBE1CB55BD /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E64F5D693192F855B882C1B714F01BEF /* ReplaySubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ReplaySubject.swift; path = RxSwift/Subjects/ReplaySubject.swift; sourceTree = ""; }; + E697A997BFA592B3F42528C00EE3FCC6 /* Storable-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Storable-umbrella.h"; sourceTree = ""; }; + E7CD28F8D69454F80A6232372E0A5CF1 /* Storable-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Storable-prefix.pch"; sourceTree = ""; }; + E7D427802B6C9CE0319FB85B28FE4B59 /* DelaySubscription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DelaySubscription.swift; path = RxSwift/Observables/DelaySubscription.swift; sourceTree = ""; }; + E82B2D23DD757B33DD7DFF17FBBD42BC /* Cancellable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancellable.swift; path = Sources/Moya/Cancellable.swift; sourceTree = ""; }; + EB2181CDF5E277CC3BF3776D0DE23568 /* SkipUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipUntil.swift; path = RxSwift/Observables/SkipUntil.swift; sourceTree = ""; }; + EB2EE2ECC802C16571D0ED08E3A792F3 /* Create.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Create.swift; path = RxSwift/Observables/Create.swift; sourceTree = ""; }; + EB55F8DE2660F9D0DD03968E5A9E3F6E /* MainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MainScheduler.swift; path = RxSwift/Schedulers/MainScheduler.swift; sourceTree = ""; }; EBF9E916529EE3C7D211886F849EBE1F /* Storable.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Storable.framework; path = Storable.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + EC60F887979E1A850A662BB6EC3695E2 /* PriorityQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PriorityQueue.swift; path = Platform/DataStructures/PriorityQueue.swift; sourceTree = ""; }; ED823EC216935E3D6BF084F242AEE0CF /* Pods-RxNetwork_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RxNetwork_Example.release.xcconfig"; sourceTree = ""; }; - EDD0C1DC5FEC301AAEF235118622BF21 /* Observable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Observable.swift; path = RxSwift/Observable.swift; sourceTree = ""; }; - EE5247C4D20D79D921A9801954D3F3EE /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; + EE22375883C8BEE55DFC3B2E0D7FA42A /* MoyaError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaError.swift; path = Sources/Moya/MoyaError.swift; sourceTree = ""; }; EE628C03C63BF1A17121E68547368A8E /* Pods-RxNetwork_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RxNetwork_Tests-acknowledgements.plist"; sourceTree = ""; }; - EE76E8C0045CAD741B9556B50406C02E /* Moya-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Moya-dummy.m"; sourceTree = ""; }; - EFAAFA5BEA4EC553AB9EF5EBE4F34D98 /* StoringKey.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StoringKey.swift; path = Storable/Classes/StoringKey.swift; sourceTree = ""; }; - EFD965EB47F82C6AE205F4EC8BB9BA63 /* Producer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Producer.swift; path = RxSwift/Observables/Producer.swift; sourceTree = ""; }; - F0033AA56A9BDB0EE60CBB527DE4F883 /* DisposeBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBase.swift; path = RxSwift/Disposables/DisposeBase.swift; sourceTree = ""; }; - F0D3709F813D9E7BC58AB2861169C868 /* Storable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Storable.swift; path = Storable/Classes/Storable.swift; sourceTree = ""; }; - F15C22431BEC97AE98B57B47E8759CAF /* DistinctUntilChanged.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DistinctUntilChanged.swift; path = RxSwift/Observables/DistinctUntilChanged.swift; sourceTree = ""; }; - F19C37AD72A78C0C983C3315B920F431 /* ScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItem.swift; path = RxSwift/Schedulers/Internal/ScheduledItem.swift; sourceTree = ""; }; - F2A5F066478E1EEDABC313C717040322 /* RxSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxSwift-dummy.m"; sourceTree = ""; }; - F3FEE127DA61F1ABA988876C6138084C /* Storable.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Storable.xcconfig; sourceTree = ""; }; - F4E5F21CD364F77A83FDF0D2A5655D73 /* Platform.Linux.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Linux.swift; path = Platform/Platform.Linux.swift; sourceTree = ""; }; - F7F58B0187C36D13D5AFD27DB46819CF /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; - F8399DE5B9DFFDEF68FE6474AAD9A53A /* Do.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Do.swift; path = RxSwift/Observables/Do.swift; sourceTree = ""; }; - F840EF70FDF2E2DEB1C4B08BF75926D5 /* SubscriptionDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscriptionDisposable.swift; path = RxSwift/Disposables/SubscriptionDisposable.swift; sourceTree = ""; }; - F9AD710ADE2C9F54D8D083467AB805DE /* ImmediateSchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmediateSchedulerType.swift; path = RxSwift/ImmediateSchedulerType.swift; sourceTree = ""; }; - F9E13D647F8D906A8CFF58E78118ACF9 /* ReplaySubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ReplaySubject.swift; path = RxSwift/Subjects/ReplaySubject.swift; sourceTree = ""; }; - FA3D84DCA50A8276F9EC84AA98F3F809 /* Storable-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Storable-prefix.pch"; sourceTree = ""; }; - FA494C721617E7B90351EA947ADB32F6 /* Cancellable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancellable.swift; path = Sources/Moya/Cancellable.swift; sourceTree = ""; }; - FBDE09DDDE11344F0AE6E893F5917C00 /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; - FEEF3368449BA7CE8E53DCAB80DCA93C /* CleanJSON.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CleanJSON.xcconfig; sourceTree = ""; }; - FFB962BADE4367249060B9E6112D240C /* Result-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Result-Info.plist"; sourceTree = ""; }; + EEED6A19AADDA66EDB3FB22EFA38154F /* Session.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Session.swift; path = Source/Session.swift; sourceTree = ""; }; + F1055FDAF365F3DB3904962ECDD1F2F4 /* SynchronizedUnsubscribeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedUnsubscribeType.swift; path = RxSwift/Concurrency/SynchronizedUnsubscribeType.swift; sourceTree = ""; }; + F21E6A56EE23C9B87C6B6D7D5F2C93F1 /* Expirable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expirable.swift; path = Storable/Classes/Expirable.swift; sourceTree = ""; }; + F2510E4501E12CC029C9B3AAB4684F36 /* Catch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catch.swift; path = RxSwift/Observables/Catch.swift; sourceTree = ""; }; + F435A009553E50262C9ADAE649CF4F06 /* RxSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxSwift.xcconfig; sourceTree = ""; }; + F48B7427BBD228A6A0FA6155DB0C4D33 /* Endpoint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Endpoint.swift; path = Sources/Moya/Endpoint.swift; sourceTree = ""; }; + F4AB0C164DB64B572E768E1A47AE2A02 /* TakeLast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeLast.swift; path = RxSwift/Observables/TakeLast.swift; sourceTree = ""; }; + F59C671B78801B06D8D03CA0F85EE28B /* HistoricalScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalScheduler.swift; path = RxSwift/Schedulers/HistoricalScheduler.swift; sourceTree = ""; }; + F67147776750363CBFC3DDD46CBFD28D /* Platform.Darwin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Darwin.swift; path = Platform/Platform.Darwin.swift; sourceTree = ""; }; + F899E1BF5205E554413060E199938E3E /* PrimitiveSequence+Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "PrimitiveSequence+Zip+arity.swift"; path = "RxSwift/Traits/PrimitiveSequence+Zip+arity.swift"; sourceTree = ""; }; + F9F1F93233495F2A608D818473C99A9B /* Alamofire-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Alamofire-Info.plist"; sourceTree = ""; }; + FA9ED278802AC08987B98CCBA8938734 /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; + FAEFD3E93FCBA179CDE905CC9ECA124D /* AsSingle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsSingle.swift; path = RxSwift/Observables/AsSingle.swift; sourceTree = ""; }; + FB57BFEB05E3290A7C495F81D4517E5B /* CredentialsPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CredentialsPlugin.swift; path = Sources/Moya/Plugins/CredentialsPlugin.swift; sourceTree = ""; }; + FB72F82649E5D6FCD8D105BF6E7DD562 /* Single+Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Single+Response.swift"; path = "Sources/RxMoya/Single+Response.swift"; sourceTree = ""; }; + FBA4C0FF6B181176D9058AE1F6333332 /* Deferred.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deferred.swift; path = RxSwift/Observables/Deferred.swift; sourceTree = ""; }; + FBFB17250A60745076A6C9C95C151B4B /* Map.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Map.swift; path = RxSwift/Observables/Map.swift; sourceTree = ""; }; + FC9D4F3ACB956DC78AABC7EF7116512B /* Enumerated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Enumerated.swift; path = RxSwift/Observables/Enumerated.swift; sourceTree = ""; }; + FCAE48409BC07F345CD97CC478FAAF4D /* CurrentThreadScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CurrentThreadScheduler.swift; path = RxSwift/Schedulers/CurrentThreadScheduler.swift; sourceTree = ""; }; + FCF4F6874FC8B9FD31A50E76BA68867A /* First.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = First.swift; path = RxSwift/Observables/First.swift; sourceTree = ""; }; + FD67D8AC270144AC44224D8501D46FBE /* ImmediateSchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmediateSchedulerType.swift; path = RxSwift/ImmediateSchedulerType.swift; sourceTree = ""; }; + FFF748A9DE94AF2910A84704E386E7C4 /* InfiniteSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InfiniteSequence.swift; path = Platform/DataStructures/InfiniteSequence.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 090C1D63463ACF622287EFF9D5C9392D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 7664FD4F59A0C00866CBAE60B0A3AD64 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 0A5AA148AD9F0CB648B38F1EC4F518CA /* Frameworks */ = { + 5827CF915CFA7933D0174C302E3A46C7 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9561856FF1996ADBDD2FB7776EE43CEC /* Foundation.framework in Frameworks */, + A3D6BCEABCC79E04DC1991CB5C3AD3B3 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 1FF9744A7F4E80DD595206C76328C5EB /* Frameworks */ = { + 591829BF0003CFA563EEC001DF4EC49F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7325A1BDBB3F246C05870D4117E44508 /* Foundation.framework in Frameworks */, + 04BE8EBE8919925CD4718D176E2DBDFE /* Foundation.framework in Frameworks */, + 0774EC3F0D0D32595C320AA3EEEF9422 /* Moya.framework in Frameworks */, + D1E6F6C0078CEE4ABE98162AD229FF85 /* Storable.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 5827CF915CFA7933D0174C302E3A46C7 /* Frameworks */ = { + 60CDB8270DBB3B9C73EA85D172891759 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A3D6BCEABCC79E04DC1991CB5C3AD3B3 /* Foundation.framework in Frameworks */, + C0BF1AEFE6B98C8E2BC20EC6F4A65A3F /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 591829BF0003CFA563EEC001DF4EC49F /* Frameworks */ = { + 679A0B3C9CA76C3A293F6FD5A02C7F16 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 04BE8EBE8919925CD4718D176E2DBDFE /* Foundation.framework in Frameworks */, - 0774EC3F0D0D32595C320AA3EEEF9422 /* Moya.framework in Frameworks */, - D1E6F6C0078CEE4ABE98162AD229FF85 /* Storable.framework in Frameworks */, + D0B879B08BA15D877B2B281F90B91D04 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 60CDB8270DBB3B9C73EA85D172891759 /* Frameworks */ = { + 7D0E474D62025CE5F16E392E7D87AF3A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - C0BF1AEFE6B98C8E2BC20EC6F4A65A3F /* Foundation.framework in Frameworks */, + FDEFBF068E959E054E80BC587A76AEB9 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 679A0B3C9CA76C3A293F6FD5A02C7F16 /* Frameworks */ = { + 84C1724A7E970F82428096559396D44F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D0B879B08BA15D877B2B281F90B91D04 /* Foundation.framework in Frameworks */, + D62D993A4677807A496ADEB7A52F6072 /* Alamofire.framework in Frameworks */, + E7EEDB6566BB993101A6BD90444F1B6E /* Foundation.framework in Frameworks */, + AD17EEA35B6F9F92E57C7A81E45C8185 /* RxSwift.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 679BA631B3A4F8FF9AA6DA016000F7CF /* Frameworks */ = { + 8B0D8633F410345F93419B8C3D7B6916 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 25DEFB41AEB7E497B2DC49D86C079BA3 /* Alamofire.framework in Frameworks */, - 78BE8F544BA7FDCC4E5A1DD852443E94 /* Foundation.framework in Frameworks */, - CAA2D20A5DE78FDC37736269E67E1E1B /* Result.framework in Frameworks */, - 3D36D5E39E92F0D7E8DED8DC7191E445 /* RxSwift.framework in Frameworks */, + 97A168DFB6DB61770CE2DBF4FD39AA8D /* CFNetwork.framework in Frameworks */, + BE82AE980F8C7EE28A6448959194F93A /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - E750003F14C6BB2EC651239DB1A5F779 /* Frameworks */ = { + 8D244E0946A438F1C49031A309164420 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9312AD5669A7193C912D8331306185C3 /* Foundation.framework in Frameworks */, + 27D17E9A74CD7336DD27E42FE3A20048 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 0723690676F3E8047D2EBBAB5C0ECD13 /* Storable */ = { + 053A28646D7CB7F1B3B0B60DCD745C36 /* Support Files */ = { + isa = PBXGroup; + children = ( + 059C858334C02C23CC187D952CF29A5A /* Storable.modulemap */, + C22E1442CDC1AC958D56F7A1D91D12E2 /* Storable.xcconfig */, + 8812BDA42BE19B2653B9E7F54A6C7D71 /* Storable-dummy.m */, + DF8253EDCD720F8564FA74414D06E608 /* Storable-Info.plist */, + E7CD28F8D69454F80A6232372E0A5CF1 /* Storable-prefix.pch */, + E697A997BFA592B3F42528C00EE3FCC6 /* Storable-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/Storable"; + sourceTree = ""; + }; + 05C06891358A349995EF1A37F9C6C676 /* iOS */ = { + isa = PBXGroup; + children = ( + 9224BCF600D984030DF4BA9B27515E98 /* CFNetwork.framework */, + 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */, + ); + name = iOS; + sourceTree = ""; + }; + 0884A170C45A02F55F90F52A31DCAEBF /* Storable */ = { isa = PBXGroup; children = ( - 80D881D37DEDE75835E431267A289615 /* Expirable.swift */, - 7BFFE78F407A3E3EC3BB0999EAA98C23 /* Expiry.swift */, - F0D3709F813D9E7BC58AB2861169C868 /* Storable.swift */, - EFAAFA5BEA4EC553AB9EF5EBE4F34D98 /* StoringKey.swift */, - 080340F67876FEE0E8B5D100FE76154F /* Support Files */, + F21E6A56EE23C9B87C6B6D7D5F2C93F1 /* Expirable.swift */, + B7328429742CCF5564A4C089C23BAA1E /* Expiry.swift */, + 06E4A17B86B13991A06D2DC3AB7F3FA0 /* Storable.swift */, + 1B9DFFBA4375230FEC92CC8AA2FBAC2D /* StoringKey.swift */, + 053A28646D7CB7F1B3B0B60DCD745C36 /* Support Files */, ); name = Storable; path = Storable; sourceTree = ""; }; - 080340F67876FEE0E8B5D100FE76154F /* Support Files */ = { + 0D57A41272103515A79F3EB3BB355F11 /* Support Files */ = { isa = PBXGroup; children = ( - 8923D5FE4C232A98804F332893091E00 /* Storable.modulemap */, - F3FEE127DA61F1ABA988876C6138084C /* Storable.xcconfig */, - 9236A62D5A9A1541E7C97A2305F818F1 /* Storable-dummy.m */, - 9F7D0F1D51D12073CCF7023693AFC750 /* Storable-Info.plist */, - FA3D84DCA50A8276F9EC84AA98F3F809 /* Storable-prefix.pch */, - 7379795ED8FA1D61822A8B9006590D64 /* Storable-umbrella.h */, + 285B0CBF6658680D66BC9BA5F9369DB2 /* RxSwift.modulemap */, + F435A009553E50262C9ADAE649CF4F06 /* RxSwift.xcconfig */, + 3FEE588415252F637ABCB92AE18C00F7 /* RxSwift-dummy.m */, + BCEB2D380081D5A0846F66CFCDA36C82 /* RxSwift-Info.plist */, + 802FEC40A7AD7F1C1828DAC26D5037E7 /* RxSwift-prefix.pch */, + 9D26024B8191EBACE7D8A9880B82804A /* RxSwift-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/Storable"; + path = "../Target Support Files/RxSwift"; sourceTree = ""; }; 15E2C5C54A631B70BE62623D551165CB /* Targets Support Files */ = { @@ -785,44 +800,46 @@ name = "Targets Support Files"; sourceTree = ""; }; - 18E0B8A8E598D1B8F4DF4565A12254D2 /* Support Files */ = { + 263288802A0B47814C74B692C694B3B2 /* Frameworks */ = { isa = PBXGroup; children = ( - 0A3312E74B947986F214ABE751FCA435 /* RxSwift.modulemap */, - DEC6126FA23A77F14AF3E120DE4F9C59 /* RxSwift.xcconfig */, - F2A5F066478E1EEDABC313C717040322 /* RxSwift-dummy.m */, - 6343B25C3876A28EBA04E9E4C4B06525 /* RxSwift-Info.plist */, - 62A1583B4EDCD56FD0A08DE0E6DB53CF /* RxSwift-prefix.pch */, - 103A38DB49D6E1C46E635D94E8A8621B /* RxSwift-umbrella.h */, + E3996058E040B343A27929EBE1CB55BD /* Alamofire.framework */, + 33B7AE29589319D1045D96DADFD3BF9D /* Moya.framework */, + 57857C02D75DE4B780347BC7585AD918 /* RxSwift.framework */, + D595591C9104D8297D280F60DB59ED40 /* Storable.framework */, + 05C06891358A349995EF1A37F9C6C676 /* iOS */, ); - name = "Support Files"; - path = "../Target Support Files/RxSwift"; + name = Frameworks; sourceTree = ""; }; - 300060B47C907EDD61E114A2282A6535 /* Alamofire */ = { + 3913DB7B3519A3E923E5A287EC3E64C6 /* Core */ = { isa = PBXGroup; children = ( - B68FE6CA81907C496E43720D457CC318 /* AFError.swift */, - 6F83C5AB3CE4C25E433AD5957FDB6B89 /* Alamofire.swift */, - 28B36A1B1C36D1080FDD8A8D8DB83EEB /* DispatchQueue+Alamofire.swift */, - 940148EFC161536FD6AFDFE736BCA498 /* MultipartFormData.swift */, - 615753299734045C0DD8A27DCC14AE1B /* NetworkReachabilityManager.swift */, - DEDE5F6D6258910BBAC86A2FC12706AE /* Notifications.swift */, - 024EA7D7B7A0C01327BB4C4FA42C0DDB /* ParameterEncoding.swift */, - A3532859CC374A0448427AA03A17CEF1 /* Request.swift */, - E95A60142ECD29AC2F9B3E721E69D0D8 /* Response.swift */, - 63FD0B9EE7F469EB063F26B5D3CF5800 /* ResponseSerialization.swift */, - A1C49CE6B8CEEE3328EE09E8318765D8 /* Result.swift */, - E05E3148400AFACBFF3504ACE2F65DD8 /* ServerTrustPolicy.swift */, - 0C4B8F82613FF1A59E88D066306DAA5A /* SessionDelegate.swift */, - 35CE0BB6F7B6E73DD6005283B02F7D91 /* SessionManager.swift */, - A2CDEBB39F0951C9D52A6E700269F1C9 /* TaskDelegate.swift */, - 49DD539DDB729197E3C98CB588FD7742 /* Timeline.swift */, - F7F58B0187C36D13D5AFD27DB46819CF /* Validation.swift */, - FD11B3D2F0C9E5283D2D4D061BA30DE0 /* Support Files */, + B3551DF262187D1203B83BAF9EA48B1F /* AccessTokenPlugin.swift */, + AA39293E1B3E2EDE286F008969A48315 /* AnyEncodable.swift */, + E82B2D23DD757B33DD7DFF17FBBD42BC /* Cancellable.swift */, + FB57BFEB05E3290A7C495F81D4517E5B /* CredentialsPlugin.swift */, + F48B7427BBD228A6A0FA6155DB0C4D33 /* Endpoint.swift */, + 7B6716FB482B8FB850D691E513742282 /* Image.swift */, + 166E06420075A86024865085456EB41C /* Moya+Alamofire.swift */, + EE22375883C8BEE55DFC3B2E0D7FA42A /* MoyaError.swift */, + 51FB867A01D55D3BE97F5860C0EBBEBE /* MoyaProvider.swift */, + 108AC4A14D5252C44424D681EE80F4A3 /* MoyaProvider+Defaults.swift */, + CB3EFDC334F6169C56374A5C825DC7B9 /* MoyaProvider+Internal.swift */, + 435339186260EFAE9AE4DA219F7B2773 /* MultipartFormData.swift */, + D1DC8D74B0FA822526096B124124CF0D /* MultiTarget.swift */, + 959132636FAD71C3E674126894F528C9 /* NetworkActivityPlugin.swift */, + 7F9B865C569AE9C16A59190E92AE7900 /* NetworkLoggerPlugin.swift */, + 7EB932F3D2C3F68D7D82D6E64015C283 /* Plugin.swift */, + 4A9666320D821EBDA842D0CC1AE1614C /* RequestTypeWrapper.swift */, + 13D3427D9F3C5D00EA9CDA4CE91EE091 /* Response.swift */, + 090295A8960F13E4BF06C7006FE789A3 /* TargetType.swift */, + AFFBEA36FF4978E1AE57BEDB7A2BC0AB /* Task.swift */, + E1BEF04B058DFE32D41D2ADB0346E7B9 /* URL+Moya.swift */, + 53200B222E5F51E904674C0D4BECC7E6 /* URLRequest+Encoding.swift */, + 518907B2E3570849B955D56284BE399E /* ValidationType.swift */, ); - name = Alamofire; - path = Alamofire; + name = Core; sourceTree = ""; }; 428BE2541BA2110F49A350B1B896C949 /* RxNetwork */ = { @@ -863,88 +880,55 @@ path = "Target Support Files/Pods-RxNetwork_Tests"; sourceTree = ""; }; - 64ACBD6E5D3A2768BF256F5C39325B7E /* Support Files */ = { + 5D602395AB4DEC005B9848BD20FFA36E /* Support Files */ = { isa = PBXGroup; children = ( - 77F0E42A37B61923C3B0F9D91528C433 /* Moya.modulemap */, - 64B0A939B603CEF8DFEC39D2BF35E3C6 /* Moya.xcconfig */, - EE76E8C0045CAD741B9556B50406C02E /* Moya-dummy.m */, - 764FEB4DA2DA19F677897C2E5AF133FC /* Moya-Info.plist */, - 2A322CC328A74A06BBE73ABF4563D92B /* Moya-prefix.pch */, - D159605860917ACB8FF26C42DEEF6232 /* Moya-umbrella.h */, + C42D6560638F4754D6A1106E2C119DC9 /* Moya.modulemap */, + 93351B9F2D4D05A8B32289A223198FC4 /* Moya.xcconfig */, + 8F8BFE4BE4F8B73C513A7AF3690DA5DB /* Moya-dummy.m */, + 09AF3614339D8DFBC367756032AFA679 /* Moya-Info.plist */, + 87025F53F29324A0B1EFE02C1FF41EFB /* Moya-prefix.pch */, + 924A2EC1B9F2476BA368A519BC3C894E /* Moya-umbrella.h */, ); name = "Support Files"; path = "../Target Support Files/Moya"; sourceTree = ""; }; - 64BD3C39A92957F5B8683830C050F986 /* Core */ = { - isa = PBXGroup; - children = ( - BDC06C9B7F0ABD6EFECF86BFD2DDEF35 /* AccessTokenPlugin.swift */, - A0C2849BA49AFF48E54A097D7748D9BC /* AnyEncodable.swift */, - FA494C721617E7B90351EA947ADB32F6 /* Cancellable.swift */, - 8947E196EE277E683690C57CDF44AC57 /* CredentialsPlugin.swift */, - 5EA22C7559DBAD1C2B1D8F6252B85F13 /* Endpoint.swift */, - 1A3182376CA76F46A4CD75D415DA1334 /* Image.swift */, - 82D640E71F821B4FBF081C6A290064B9 /* Moya+Alamofire.swift */, - 3C6E87C52334FE85DB9052CA9ADFFA51 /* MoyaError.swift */, - 0FE2D1253D17372B25A71630EB670F83 /* MoyaProvider.swift */, - 97CBC3466F1286E71A45E3FFA76CC0BF /* MoyaProvider+Defaults.swift */, - 77BB4B1F78E43D421C17871E70259147 /* MoyaProvider+Internal.swift */, - D2BD9F570439B97484E91A1599F5148B /* MultipartFormData.swift */, - B6FEABAC12B54E0C395879AABDF01D9F /* MultiTarget.swift */, - 1F05771EBFD4F04FD748DE2AC98236EE /* NetworkActivityPlugin.swift */, - 5A7D63109C9D98726B52F3CF146C60C3 /* NetworkLoggerPlugin.swift */, - 075B384D9562A42D796BF4DB92925061 /* Plugin.swift */, - 4312F45A0C2A90FA940262A788DA1D2D /* Response.swift */, - 103BFFAC6E40D7EA3D467DC94D3D0F7D /* TargetType.swift */, - 9B6E93EE7132CF3C6B0CE163B135D045 /* Task.swift */, - A21383201ED0A5CA1C36C38F51FA3739 /* URL+Moya.swift */, - 60C263EBFAA24B7D27F155E1E5128131 /* URLRequest+Encoding.swift */, - 0D7671785890B55A5043DE82BC9AA553 /* ValidationType.swift */, - ); - name = Core; - sourceTree = ""; - }; - 6A028F07057D6171FFA1C063B83C7C42 /* CleanJSON */ = { + 69AC987079FF3748558F26660B307385 /* CleanJSON */ = { isa = PBXGroup; children = ( - C22C666DC9CA615FB155808E4CCE3685 /* _CleanJSONDecoder.swift */, - 480B0F3BD8336820C115D3B6A90A1410 /* _CleanJSONDecoder+Decode.swift */, - 608548DDE77A017F5F9ADF9686269FB0 /* _CleanJSONDecoder+SingleValueDecodingContainer.swift */, - 6F709D96E5B405F8743D36F24E01D5BF /* _CleanJSONDecoder+Unbox.swift */, - 3D0BB7725C943BC842980A2432D60C8D /* CaseDefaultable.swift */, - 8EA9506901CA45368E64CECDE2AC0111 /* CleanDecoder.swift */, - 2B2B627F2DA4602B785859CD89D41EB2 /* CleanJSONDecoder.swift */, - 2EBDC61865279D6FA005335908D5C904 /* CleanJSONDecodingStorage.swift */, - 38D39F19C2D7830625FE2CC5A5A511EE /* CleanJSONKey.swift */, - D5A0AD1966A3CA77ABDFD3363625E209 /* CleanJSONKeyedDecodingContainer.swift */, - 13D56A153DA81C8E203702BD0E153976 /* CleanJSONUnkeyedDecodingContainer.swift */, - 20E2A251EE70D5BBAEF40948E9E17D04 /* DecodingError+CleanJSON.swift */, - 6878A3D28CCE246541B8A26B4EBAF6F9 /* DecodingStrategy.swift */, - 2865BAAD4EC1FB32BF75306DCE3B1524 /* Defaultable.swift */, - 57478EAC5004653A54E4D6FAFF1D70BE /* JSONAdapter.swift */, - 0CFDD9DF388C7500BE0CA9EC9430868F /* ToJSON.swift */, - C75A12E15856F5C08BB0E235645C427A /* Support Files */, + 24723368CF70A3495D4B622F759CA9EB /* _CleanJSONDecoder.swift */, + E35801E05FCED24500A9100CEEFC1717 /* _CleanJSONDecoder+Decode.swift */, + 584F3E4DE3D7704EDA086ED5308DBAFE /* _CleanJSONDecoder+SingleValueDecodingContainer.swift */, + E0FAC347CF1C5BA6C739BC8A7C1CAD5C /* _CleanJSONDecoder+Unbox.swift */, + A35CC6FC2E1BA6BFB7685C3B3FCBF59A /* CaseDefaultable.swift */, + 017ED680DB98D60DB2E7143556976543 /* CleanDecoder.swift */, + 064C77F2FA7A326D7EA8D53FA1C437D1 /* CleanJSONDecoder.swift */, + C6DEEA09CCFDE102C00C37E286327774 /* CleanJSONDecodingStorage.swift */, + 1FCA37674F55BEAA7DB1902D521CB4F7 /* CleanJSONKey.swift */, + 30D7D6D7FF99869C604E595F16D9C25E /* CleanJSONKeyedDecodingContainer.swift */, + 58B1CF188B3F948B2B9F1FBB25FC492D /* CleanJSONUnkeyedDecodingContainer.swift */, + 459C12262C5D16FA761505712BB18C0A /* DecodingError+CleanJSON.swift */, + 621E3483BB03CACA14EA24471EE82988 /* DecodingStrategy.swift */, + 770E07B9D1850E6653372A7CF36A61AA /* Defaultable.swift */, + 57F11648E65F779A1E00EDA213CED5BF /* JSONAdapter.swift */, + C3B5139E54D26E6D005B206C90FBC49E /* ToJSON.swift */, + D1F67AFA3FD23CBD4976415BDB1E7FE7 /* Support Files */, ); name = CleanJSON; path = CleanJSON; sourceTree = ""; }; - 796BBC65D314FCE86B1F39F9302D9E24 /* Products */ = { + 6FB78F0D3F4B545153139AFA23D78D47 /* Pods */ = { isa = PBXGroup; children = ( - 5D797E9A5C5782CE845840781FA1CC81 /* Alamofire.framework */, - D9B8AA14A5BB1D0CE3A003CB6A566265 /* CleanJSON.framework */, - 3756A9BBE41ABEE8DCBF5BCA6972C4DA /* Moya.framework */, - 779C3CE97C4D1D629211A0D71656A0EF /* Pods_RxNetwork_Example.framework */, - 09B3AB5E5543F51A3C3E4EA4B410EC5D /* Pods_RxNetwork_Tests.framework */, - 0461B3F80FC05957690727254D64DB36 /* Result.framework */, - 0535CEBD31800342D461C28837CFCC26 /* RxNetwork.framework */, - 809C5FAB588354C9BA37DC3EAB8CB45C /* RxSwift.framework */, - EBF9E916529EE3C7D211886F849EBE1F /* Storable.framework */, + C5476BEA77B58535E76AF262458C22E8 /* Alamofire */, + 69AC987079FF3748558F26660B307385 /* CleanJSON */, + 8720AD644706BBFC191C9DCA7897643A /* Moya */, + D20784E1F8F2357A03C3891876802A29 /* RxSwift */, + 0884A170C45A02F55F90F52A31DCAEBF /* Storable */, ); - name = Products; + name = Pods; sourceTree = ""; }; 83D5EC5D270C7564285ABAF817E9EFB2 /* Core */ = { @@ -958,6 +942,17 @@ name = Core; sourceTree = ""; }; + 8720AD644706BBFC191C9DCA7897643A /* Moya */ = { + isa = PBXGroup; + children = ( + 3913DB7B3519A3E923E5A287EC3E64C6 /* Core */, + 9C42B8CE146641E728A0BF72D6F934E3 /* RxSwift */, + 5D602395AB4DEC005B9848BD20FFA36E /* Support Files */, + ); + name = Moya; + path = Moya; + sourceTree = ""; + }; 88471F3BE7758FA187A04552A5DDD27F /* Cacheable */ = { isa = PBXGroup; children = ( @@ -970,17 +965,19 @@ name = Cacheable; sourceTree = ""; }; - 89AE5EC295C1ED718C177B98463F11BA /* Frameworks */ = { + 8D0B84232D8DDF0DA1C25047FBD72B31 /* Products */ = { isa = PBXGroup; children = ( - A18BFC90176B7DAAF108031606624D89 /* Alamofire.framework */, - E3F372C200DAA39C7197524D94DAE1BA /* Moya.framework */, - 3E5A5C37017BD8385DC0314BA6CF25BE /* Result.framework */, - 2B473CA79DC00D5023F081186B253959 /* RxSwift.framework */, - D7C0B8547E454B8775051C20634B04D6 /* Storable.framework */, - DFAB92880206F4696AD04772BA07293D /* iOS */, + 5D797E9A5C5782CE845840781FA1CC81 /* Alamofire.framework */, + D9B8AA14A5BB1D0CE3A003CB6A566265 /* CleanJSON.framework */, + 3756A9BBE41ABEE8DCBF5BCA6972C4DA /* Moya.framework */, + 779C3CE97C4D1D629211A0D71656A0EF /* Pods_RxNetwork_Example.framework */, + 09B3AB5E5543F51A3C3E4EA4B410EC5D /* Pods_RxNetwork_Tests.framework */, + 0535CEBD31800342D461C28837CFCC26 /* RxNetwork.framework */, + 809C5FAB588354C9BA37DC3EAB8CB45C /* RxSwift.framework */, + EBF9E916529EE3C7D211886F849EBE1F /* Storable.framework */, ); - name = Frameworks; + name = Products; sourceTree = ""; }; 97362DF41331F624AD20379D106DECF8 /* Development Pods */ = { @@ -991,67 +988,255 @@ name = "Development Pods"; sourceTree = ""; }; - A846D19D7D59F77CBF2F8759F96BBEA9 /* Support Files */ = { + 9C42B8CE146641E728A0BF72D6F934E3 /* RxSwift */ = { + isa = PBXGroup; + children = ( + 356880B4C0B320DE90D2184D116E44D2 /* MoyaProvider+Rx.swift */, + 3366E923B08356C8F918DB061CEE17F6 /* Observable+Response.swift */, + FB72F82649E5D6FCD8D105BF6E7DD562 /* Single+Response.swift */, + ); + name = RxSwift; + sourceTree = ""; + }; + 9F09D6A1C8668D8D92B15D57D2B09B24 /* Support Files */ = { isa = PBXGroup; children = ( - BC11B17C35ABE0EAAEC50E6CAB038C72 /* Result.modulemap */, - 813B32AAA3627675D2FFEFD165B45D06 /* Result.xcconfig */, - 33A6A208C28E271BEB4503B134F03402 /* Result-dummy.m */, - FFB962BADE4367249060B9E6112D240C /* Result-Info.plist */, - 9A624CF82AD4E2325D88C723898AB911 /* Result-prefix.pch */, - 6A1657C8E1E54D4E9C0A1F291FDD728F /* Result-umbrella.h */, + 1EA8F908DF549986F05C0056D23F4DCF /* Alamofire.modulemap */, + 532E2616914679E24F3935C6BA666020 /* Alamofire.xcconfig */, + 114BFEAEE83F72DCF8BF6D418C63EC48 /* Alamofire-dummy.m */, + F9F1F93233495F2A608D818473C99A9B /* Alamofire-Info.plist */, + E224D5FA50E8F9A78C3C35F72CF74EC6 /* Alamofire-prefix.pch */, + C3D522855F74589774A16C6462EFD9DF /* Alamofire-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/Result"; + path = "../Target Support Files/Alamofire"; sourceTree = ""; }; - C57B39B531F3FCD7FD77E66E18B40FF5 /* Pods */ = { + C5476BEA77B58535E76AF262458C22E8 /* Alamofire */ = { isa = PBXGroup; children = ( - 300060B47C907EDD61E114A2282A6535 /* Alamofire */, - 6A028F07057D6171FFA1C063B83C7C42 /* CleanJSON */, - D3E7EF5A24B06B46FC5D3AB8A6293245 /* Moya */, - FD47C325D809B3038FC43666B66AEB02 /* Result */, - E4DCC062628E5019702BF4C1D651A47F /* RxSwift */, - 0723690676F3E8047D2EBBAB5C0ECD13 /* Storable */, + 9F4F1DCDF05BEB3F04B44C57826B6E9D /* AFError.swift */, + 2D5EF00E0D75C20FB6320A6B8BEFFA89 /* Alamofire.swift */, + B99FCD857F9FC1E1732BF85DE8B0DAF3 /* AlamofireExtended.swift */, + B4046BB44E989FA26661B6373203DFCA /* CachedResponseHandler.swift */, + CDC2A567AC43E17B1DC674A5CF3F39F2 /* DispatchQueue+Alamofire.swift */, + C52CC70AAC72FD95F6F5224EC49CB335 /* EventMonitor.swift */, + 8330A5B5A3E68AD688C14ED063E1C812 /* HTTPHeaders.swift */, + DE2B8FDD8649116A6423B52C08577481 /* HTTPMethod.swift */, + 5CF15DD381BEDD5C680457A3A3C8E7B8 /* MultipartFormData.swift */, + 45262C79144217A26F50B3D6B87321CC /* MultipartUpload.swift */, + 9563564A7E1F9DEEC3E8617471D512A7 /* NetworkReachabilityManager.swift */, + B7A3B49D4F7F2FC9AEECDD6F8CF67056 /* Notifications.swift */, + 656236B3BDCA7C4269F4C0012B871A72 /* OperationQueue+Alamofire.swift */, + 07DD9FCDFEDD2558F85CFCFD728C8254 /* ParameterEncoder.swift */, + 7199297E549EDE7B1EB1BC3C8F9B9940 /* ParameterEncoding.swift */, + 7F3A668BE4FDB860BAF96CAF554A6F83 /* Protector.swift */, + 6575CBED40319444DAC29C45231D0ADD /* RedirectHandler.swift */, + 07060027423087C9DEC5DFC4122FF9CE /* Request.swift */, + B47CC1F172167C45762F66717A77796A /* RequestInterceptor.swift */, + 1243248DEF75E4E4DB7DB2960DDBAC6F /* RequestTaskMap.swift */, + 215370AD25F418C81C587020AC9D68B0 /* Response.swift */, + CA20847C685812AF00A79990B6BAA989 /* ResponseSerialization.swift */, + D2617C3A7C5B9307CD29E748E3C8A1BE /* Result+Alamofire.swift */, + BBA48397A5BDA8966A7BA81238CB6A25 /* RetryPolicy.swift */, + 481D7ED739538C7E81FC6264A591FB08 /* ServerTrustEvaluation.swift */, + EEED6A19AADDA66EDB3FB22EFA38154F /* Session.swift */, + FA9ED278802AC08987B98CCBA8938734 /* SessionDelegate.swift */, + 7C331AE4DF911F37FADFBA55C28BDF95 /* URLConvertible+URLRequestConvertible.swift */, + DF781C4124DBCD6FD88F02423A0AD64F /* URLEncodedFormEncoder.swift */, + 7F4A9488DF9841A108295CB07FC0A327 /* URLRequest+Alamofire.swift */, + 5032057E303F4F9BEBFD1A0BBBAF8D2E /* URLSessionConfiguration+Alamofire.swift */, + A61C9FDA9C2DC77CC66404E5DC5F5839 /* Validation.swift */, + 9F09D6A1C8668D8D92B15D57D2B09B24 /* Support Files */, ); - name = Pods; + name = Alamofire; + path = Alamofire; sourceTree = ""; }; - C6D7AA81F31A7E046586085ED0C4979B /* RxSwift */ = { + CF1408CF629C7361332E53B88F7BD30C = { isa = PBXGroup; children = ( - 23FEA0F0B14DBBC27CEF81DF8BBF4CD2 /* MoyaProvider+Rx.swift */, - 3C6C436FF6DC0403E652712E36FECA61 /* Observable+Response.swift */, - EB93829954E8FEB012C904908CF52BD0 /* Single+Response.swift */, + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, + 97362DF41331F624AD20379D106DECF8 /* Development Pods */, + 263288802A0B47814C74B692C694B3B2 /* Frameworks */, + 6FB78F0D3F4B545153139AFA23D78D47 /* Pods */, + 8D0B84232D8DDF0DA1C25047FBD72B31 /* Products */, + 15E2C5C54A631B70BE62623D551165CB /* Targets Support Files */, ); - name = RxSwift; sourceTree = ""; }; - C75A12E15856F5C08BB0E235645C427A /* Support Files */ = { + D1F67AFA3FD23CBD4976415BDB1E7FE7 /* Support Files */ = { isa = PBXGroup; children = ( - 18B94C989BB0DBABAE7B0BB75092C30C /* CleanJSON.modulemap */, - FEEF3368449BA7CE8E53DCAB80DCA93C /* CleanJSON.xcconfig */, - 0E5B94887F68E04765D5DF974982C649 /* CleanJSON-dummy.m */, - A8DF7E8E9EF22AB0A0913E99D314AEDB /* CleanJSON-Info.plist */, - 3CD79C92FCD473A91027762AD434900E /* CleanJSON-prefix.pch */, - 99488A252B958375D5D1E8EE95D9778C /* CleanJSON-umbrella.h */, + 13B53E6A7802B138B3145753A273F12E /* CleanJSON.modulemap */, + 7F8CA8FEF001B39393CE02B01F7ABFEF /* CleanJSON.xcconfig */, + 510B47F966CD35AECBAABBAD4972B870 /* CleanJSON-dummy.m */, + 273C2759CA11D4F23ACEFDD6381C2955 /* CleanJSON-Info.plist */, + A60DF8D4575271044606BEFDCB119757 /* CleanJSON-prefix.pch */, + 4CF25362BD77D1C26F575845566A7A52 /* CleanJSON-umbrella.h */, ); name = "Support Files"; path = "../Target Support Files/CleanJSON"; sourceTree = ""; }; - CF1408CF629C7361332E53B88F7BD30C = { + D20784E1F8F2357A03C3891876802A29 /* RxSwift */ = { isa = PBXGroup; children = ( - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, - 97362DF41331F624AD20379D106DECF8 /* Development Pods */, - 89AE5EC295C1ED718C177B98463F11BA /* Frameworks */, - C57B39B531F3FCD7FD77E66E18B40FF5 /* Pods */, - 796BBC65D314FCE86B1F39F9302D9E24 /* Products */, - 15E2C5C54A631B70BE62623D551165CB /* Targets Support Files */, + 90E8D676117C6EE98E4505BA03AEC218 /* AddRef.swift */, + 7A298A1BD371BDDF1B3E5D7EECC3845E /* Amb.swift */, + D6A7300E9EDE897E98A93A55ED03C320 /* AnonymousDisposable.swift */, + 49A2C1D9C92F53AB8857555AA48D8E4F /* AnonymousObserver.swift */, + 0BC5936508BB7D22682646A8CB85E7D9 /* AnyObserver.swift */, + 1F876C06D7849AF358641FC077567E9D /* AsMaybe.swift */, + FAEFD3E93FCBA179CDE905CC9ECA124D /* AsSingle.swift */, + D8E39A127DC4BE788E64476BC0EA77F1 /* AsyncLock.swift */, + A0A898627D00FE18A307ED2F6139887E /* AsyncSubject.swift */, + 1B3D0937387DF0D74D9ED5F2210527AE /* AtomicInt.swift */, + 175ADB815798C35EAE61A42C01BAF510 /* Bag.swift */, + 24377677E869B58AFF6FC7E269547304 /* Bag+Rx.swift */, + 6AD4F5F29B9F841EDFCC338661F69C29 /* BehaviorSubject.swift */, + D393291DE590C7D1D4D6ABBE9D7D74D7 /* BinaryDisposable.swift */, + 106010F786B00382064BEC7285066EAA /* BooleanDisposable.swift */, + DD5ABA32F80170199772B819D5F85455 /* Buffer.swift */, + CE7C1B6EB782CFC56290F959830E5184 /* Cancelable.swift */, + F2510E4501E12CC029C9B3AAB4684F36 /* Catch.swift */, + 8991A07C83CADA92EC413B79A966B78F /* CombineLatest.swift */, + CAAC62BE6A4E6D668AD1A41F2E42B770 /* CombineLatest+arity.swift */, + 5A44EAF6108B38D69C98B832186F762F /* CombineLatest+Collection.swift */, + 887DA39FFD9CF440698575DBDBB38533 /* CompactMap.swift */, + 8A0C3DC12FBBA8B175445D4B6542FF64 /* Completable.swift */, + BE6017678DC20784DE0E2AD55B4F04DB /* Completable+AndThen.swift */, + 9F466DB24369FFA9C876D1159D3EC7B5 /* CompositeDisposable.swift */, + A42080C29AD328E1CC7E761FF82C78D4 /* Concat.swift */, + 5068721A4B673383C14D763B739D0F6A /* ConcurrentDispatchQueueScheduler.swift */, + 283ED6471DB679456CD734A6E141CF76 /* ConcurrentMainScheduler.swift */, + 80B701110F9D39B161D4B6443680FB85 /* ConnectableObservableType.swift */, + EB2EE2ECC802C16571D0ED08E3A792F3 /* Create.swift */, + FCAE48409BC07F345CD97CC478FAAF4D /* CurrentThreadScheduler.swift */, + 4BF5B5A5394978EC360C135181E91C7B /* Date+Dispatch.swift */, + 6BCF8A34F8736405DCAA50FCD656E99E /* Debounce.swift */, + D8AFA5D5C8CB619386A03ED83164149D /* Debug.swift */, + 91602304913C81BC608AA3B12FA2C240 /* DefaultIfEmpty.swift */, + FBA4C0FF6B181176D9058AE1F6333332 /* Deferred.swift */, + BBB5CEF94FA9266F39DB2722D92DCF0C /* Delay.swift */, + E7D427802B6C9CE0319FB85B28FE4B59 /* DelaySubscription.swift */, + DE2F73C6F49CA4D7DEBEE113F83AE16F /* Dematerialize.swift */, + 837BF293A2A9E426CD22790E32C9C234 /* Deprecated.swift */, + 57E212D5A4117757354B0713D214D3C6 /* DispatchQueue+Extensions.swift */, + B1B3426F7AF9875D93107A68BD88C6C8 /* DispatchQueueConfiguration.swift */, + AE2B47586C4F9A49F712AAF2829C0556 /* Disposable.swift */, + 1D1E4DD19C27C138BBFDE404525C4B82 /* Disposables.swift */, + B2743CDAB975E17560B238D8DA292938 /* DisposeBag.swift */, + CCAA7EFDBD65FDF9746A3F061CFFE23A /* DisposeBase.swift */, + 918C6D8E9812D83F3F978BE83821D354 /* DistinctUntilChanged.swift */, + 3CF66E4C2CB94F6F43B1E691EA0E2231 /* Do.swift */, + AA2F3406F1AB92C229210DB0D09E5C3C /* ElementAt.swift */, + 52044509C05EFC4E338B319064FC119F /* Empty.swift */, + FC9D4F3ACB956DC78AABC7EF7116512B /* Enumerated.swift */, + C65AB0ECD9BE59B36B0D287583B430BA /* Error.swift */, + 6EBD7C3BE2D544889C2C44DA82FF75FE /* Errors.swift */, + 6A6EAEC21684544BD94E4F5F389AE039 /* Event.swift */, + 9F3DF1FD26065AFB41A53B6BC14F6176 /* Filter.swift */, + FCF4F6874FC8B9FD31A50E76BA68867A /* First.swift */, + A8FFF705DCAF8BB6643736848E973DB9 /* Generate.swift */, + 4396A8A94652826C607D41298EF08C74 /* GroupBy.swift */, + 391E68D2C7A74AE68CF263AA0C1AAA66 /* GroupedObservable.swift */, + F59C671B78801B06D8D03CA0F85EE28B /* HistoricalScheduler.swift */, + B1C63393F67222B14B2A6A86BBFB3276 /* HistoricalSchedulerTimeConverter.swift */, + FD67D8AC270144AC44224D8501D46FBE /* ImmediateSchedulerType.swift */, + FFF748A9DE94AF2910A84704E386E7C4 /* InfiniteSequence.swift */, + A2EE4EDA23D55A1A3A024127D814BDEB /* InvocableScheduledItem.swift */, + 872AA3F1C2369C28062BEF17B62AA2AF /* InvocableType.swift */, + D4AE47EF154E4204A4E65751F8F7E839 /* Just.swift */, + E22F8E159844A51D84E34FCCD0B6853C /* Lock.swift */, + DAA477DC2A7EE71C837912B943C66EB9 /* LockOwnerType.swift */, + EB55F8DE2660F9D0DD03968E5A9E3F6E /* MainScheduler.swift */, + FBFB17250A60745076A6C9C95C151B4B /* Map.swift */, + 0CA7D4DC1EE30F6308C2D5F8884C3145 /* Materialize.swift */, + BA41BF945051BA5E92804FFAD6DE5491 /* Maybe.swift */, + C9B8D43335230764364E9B128FBFEE9C /* Merge.swift */, + 68BCEA9418E28101583E11BC73556B8B /* Multicast.swift */, + D3AF5CD080B1A13647A5A3DED40F55A7 /* Never.swift */, + 48176300B238876EC6C9D40BFA40DCF4 /* NopDisposable.swift */, + 3F741BA7A1003FC8E14528AEE8234E45 /* Observable.swift */, + B26AB0C4DE622914CDFEC21B825AA420 /* ObservableConvertibleType.swift */, + 261441859064F36E20C60F6022EDD26C /* ObservableType.swift */, + BD129BB4BC4BEFA673CE5337EDE59F16 /* ObservableType+Extensions.swift */, + 6E0C66DF27398C5D3096DDAE92D4736D /* ObservableType+PrimitiveSequence.swift */, + 9E860EE8CCAEE984F3560839F7EBB54D /* ObserveOn.swift */, + 23959528143D698F0E7EA5172E01917A /* ObserverBase.swift */, + 263889CE19EB5C22C1DFE6E75BDF5AE9 /* ObserverType.swift */, + 3B8298BE160EB95F5580C850AB10A7AE /* OperationQueueScheduler.swift */, + B558F8F5563D0291BDEB3FECF5DADCBB /* Optional.swift */, + F67147776750363CBFC3DDD46CBFD28D /* Platform.Darwin.swift */, + 464A6A21FCFFC435CEB6FF433C2835B6 /* Platform.Linux.swift */, + 97FE73D2B39572EED263A65F22E19FA2 /* PrimitiveSequence.swift */, + F899E1BF5205E554413060E199938E3E /* PrimitiveSequence+Zip+arity.swift */, + EC60F887979E1A850A662BB6EC3695E2 /* PriorityQueue.swift */, + 9C8E26BC97A8DED0530AFC5BD39829CB /* Producer.swift */, + 6924568E51FA7C86522CA17AE7C24A61 /* PublishSubject.swift */, + 851D5C9B66C1AB6A9593879B3FE3AA69 /* Queue.swift */, + 06ED4CAD705266986228184FEBD4314D /* Range.swift */, + A6E2ADDF97E331AE3D9E7015B9331F2E /* Reactive.swift */, + D0B13F674DBE3EFB389C8FC0E0EEBB4C /* RecursiveLock.swift */, + C44F817E631EEBC40D7A1AE6F76CE096 /* RecursiveScheduler.swift */, + DFE1599E8ADF5C735CC90BFB1D717988 /* Reduce.swift */, + A477CFE1FB1F7D21971FB8489E55038B /* RefCountDisposable.swift */, + 9557CF86C29E2FFA60740C0FCBB997F0 /* Repeat.swift */, + E64F5D693192F855B882C1B714F01BEF /* ReplaySubject.swift */, + 5156953DD1D83F2B9DF2091FCFCDAEA9 /* RetryWhen.swift */, + 957282C5668E6B9BBDC2DC7E772A3CAA /* Rx.swift */, + 4D1EAD5660345F2842931BB2F20B7114 /* RxMutableBox.swift */, + E1F46CEC9A444CD1F2C933728A1A0261 /* Sample.swift */, + CDF5778FD5870156AA7E9BBF3B8AB023 /* Scan.swift */, + D326233DC57411A161CE3F1EC3D8F1E3 /* ScheduledDisposable.swift */, + 65B8757D3ADFD48EAD4CEC21E6CA7506 /* ScheduledItem.swift */, + C4224738F69DE56C01651B8544B7C42F /* ScheduledItemType.swift */, + 1AA6159BDF623D6C60F20E34DCB21069 /* SchedulerServices+Emulation.swift */, + 8609F5716C4E9428EE5B36B89411E31B /* SchedulerType.swift */, + B73D8B762168FDE1579334B98F4B7B6B /* Sequence.swift */, + D23BE0DFB80262E1E54C75F46321DA46 /* SerialDispatchQueueScheduler.swift */, + 038FE19F91DF016528FED78E9115F12F /* SerialDisposable.swift */, + 5F7813E70AFD621E29F61CC11AF7384A /* ShareReplayScope.swift */, + 62A0CE3B22BC0B6704044CE6929E2AAF /* Single.swift */, + 5629A419CA6E7BC96DFC091194F7CCDA /* SingleAssignmentDisposable.swift */, + CC2518C82B77E61DD3E771A90D0E705B /* SingleAsync.swift */, + 5DB0DB0B8DD0BA363E2BADCA7C4EB152 /* Sink.swift */, + DC534BF69BF4BEBF349DCF903F148AF1 /* Skip.swift */, + EB2181CDF5E277CC3BF3776D0DE23568 /* SkipUntil.swift */, + 2B8634B215369599FFBE8D8BEE0A73F0 /* SkipWhile.swift */, + 3710215F4405D61FD1A9C2F0A16B3802 /* StartWith.swift */, + 5A1B471AFBB9EE1592CA2F743A068D13 /* String+Rx.swift */, + C843DC02298710B839ADA338C6B946D9 /* SubjectType.swift */, + 4CB16749A0EBB70E74838BF111C9A79A /* SubscribeOn.swift */, + B056FB16307BDF73A5E862E88073DF61 /* SubscriptionDisposable.swift */, + 01F1F05FFDC43DD6FD101937710A5BC1 /* SwiftSupport.swift */, + 96EF80B4E2AAAB3DE1D4FADFE78D85A1 /* Switch.swift */, + BFCC182F14E626EA6111FE97CE9D3956 /* SwitchIfEmpty.swift */, + A84004A757167A55FF499FBA38C96863 /* SynchronizedDisposeType.swift */, + B6BE32335045023EE6863CA98E374280 /* SynchronizedOnType.swift */, + F1055FDAF365F3DB3904962ECDD1F2F4 /* SynchronizedUnsubscribeType.swift */, + 7783A297EDC6DB81F3E2923068179F39 /* TailRecursiveSink.swift */, + 37B911B1EA77CBDF7B73DBDC7BFD06D5 /* Take.swift */, + F4AB0C164DB64B572E768E1A47AE2A02 /* TakeLast.swift */, + 61D6CA746419B5F8C8A66C4F282B4A16 /* TakeUntil.swift */, + 6C7088BE6AE7DA584C096FA59443665F /* TakeWhile.swift */, + 07EC1ECD525E0CBA56BA47301D8355D0 /* Throttle.swift */, + DEDFBA1EA963A0249C7469CF7238858F /* Timeout.swift */, + 28EFF13A360CFD0623C59A70A02E674D /* Timer.swift */, + D701E95B632E9004418D08A5ADA9C5F9 /* ToArray.swift */, + BD7A90629DB11EC28A169D2F7F3D632E /* Using.swift */, + 026854B499760CAED7E8D0783A1CA04E /* VirtualTimeConverterType.swift */, + 0C7C46029C2CD9B28F287FA23CB5AF4E /* VirtualTimeScheduler.swift */, + 78265D97A9DC9F491966430125C34339 /* Window.swift */, + D914052A2E741D0CEB2EFA59C074014E /* WithLatestFrom.swift */, + A960521EC1AC623495B077564407F5B7 /* Zip.swift */, + 281236BEC6F709D46DB47B4A36EFCB03 /* Zip+arity.swift */, + DB8879EB842575E1579597850C8194E8 /* Zip+Collection.swift */, + 0D57A41272103515A79F3EB3BB355F11 /* Support Files */, ); + name = RxSwift; + path = RxSwift; sourceTree = ""; }; D3671E03E1CF4DA2E197C9564FCBD2DC /* Pods-RxNetwork_Example */ = { @@ -1071,212 +1256,6 @@ path = "Target Support Files/Pods-RxNetwork_Example"; sourceTree = ""; }; - D3E7EF5A24B06B46FC5D3AB8A6293245 /* Moya */ = { - isa = PBXGroup; - children = ( - 64BD3C39A92957F5B8683830C050F986 /* Core */, - C6D7AA81F31A7E046586085ED0C4979B /* RxSwift */, - 64ACBD6E5D3A2768BF256F5C39325B7E /* Support Files */, - ); - name = Moya; - path = Moya; - sourceTree = ""; - }; - DFAB92880206F4696AD04772BA07293D /* iOS */ = { - isa = PBXGroup; - children = ( - 9B66D8C935AC36871C0BD83F0CD6170B /* Foundation.framework */, - ); - name = iOS; - sourceTree = ""; - }; - E4DCC062628E5019702BF4C1D651A47F /* RxSwift */ = { - isa = PBXGroup; - children = ( - E21F54A8CC91AE7213A25860CA923CD5 /* AddRef.swift */, - 7C9837F097BA0661BE725E226C75B0ED /* Amb.swift */, - 051A771AEA1D3CFAB8AC9B0B1B1E2A94 /* AnonymousDisposable.swift */, - 5F07796D7C322F4B1CD81DCD13822283 /* AnonymousObserver.swift */, - 123CE5581310E493B28137A7D1923CB7 /* AnyObserver.swift */, - D04D20A7AC8E838332E87B9CC6072CA4 /* AsMaybe.swift */, - 77D083AC4720957A6E4CFFF8FC6579DB /* AsSingle.swift */, - 4EC249A6A06E11F54D558E5C401554C6 /* AsyncLock.swift */, - 80387FC519E22F2B2B49D3AFA0E212D0 /* AsyncSubject.swift */, - 0175202EBA5B7848CA63FD008999E893 /* AtomicInt.swift */, - 602DE06880AF8D36101AA50B4D6BD1AC /* Bag.swift */, - B4CF6D434F6E074FA598BAA2C4B35459 /* Bag+Rx.swift */, - A39A24B971D6837589328B7242501585 /* BehaviorSubject.swift */, - C07046CE1C8698494AAFDE7CC2AA2546 /* BinaryDisposable.swift */, - D15E658C47E95B25B21E994C0E218A6E /* BooleanDisposable.swift */, - 414641A651CE66CD2533CDAA1B3228B8 /* Buffer.swift */, - 6CC4500F93B4B104E17E70A09776FAFB /* Cancelable.swift */, - 18CA0A28F7BD98494F33E6D3C42B80AD /* Catch.swift */, - 5C53C70334A2566029CA7A1F28C3728A /* CombineLatest.swift */, - 9348EC550C2DE629E2972C26303D8574 /* CombineLatest+arity.swift */, - B9C7FF5091353BEB5B3815670D146F4D /* CombineLatest+Collection.swift */, - 392893BEA86DF791410026FE8221C3AE /* CompactMap.swift */, - E8128A1FF086E2B5F97DF16EC9B0DCC5 /* Completable.swift */, - 862992D9BE5907C7BCD1D1470C36FD9B /* Completable+AndThen.swift */, - 0D57F7C58CAE8463331DAE95C12C191F /* CompositeDisposable.swift */, - 9EB9B86C292DD53F1AE6C75AC618F2E5 /* Concat.swift */, - C1F86D524D03550F673489574B0D775B /* ConcurrentDispatchQueueScheduler.swift */, - 877918F3F6EED6DB6E729EDB9A1411D3 /* ConcurrentMainScheduler.swift */, - 19C84C90E04E14621E48980EA5C9FCCC /* ConnectableObservableType.swift */, - 40621D1C09CEC54AB32D25180619170F /* Create.swift */, - C70C756A73A5373EBA9F35240349A435 /* CurrentThreadScheduler.swift */, - 6E7732F43DC6F5BC613923EE57A5852F /* Date+Dispatch.swift */, - 2A5A2A4DEB1CD2B886870C3B065ECDFE /* Debounce.swift */, - 35167BBAF273C4BD04E0DC6682DA3027 /* Debug.swift */, - 13BBC2F9E5B259AAEAC2D869DFB54EF4 /* DefaultIfEmpty.swift */, - 801227187A38C70B7CD65056C8540660 /* Deferred.swift */, - AA9A9C7AB975B17F9DE9B89754C95017 /* Delay.swift */, - C1699413115460E75FD6A05688F64DDE /* DelaySubscription.swift */, - 4EFCA4D2614BAE878327E5D1CF0E38D9 /* Dematerialize.swift */, - 87358343A5D901F4521FFF81B0B479DF /* Deprecated.swift */, - 1FF0971291DFF3ABDC056FD38C4E26B7 /* DispatchQueue+Extensions.swift */, - B83FC2D2C34F9975CEC708B8B925F398 /* DispatchQueueConfiguration.swift */, - 06F44D0078C5EDC1E5ED1CE2DA94EC3B /* Disposable.swift */, - D46A7DCAECDDEB723B4A208E93DEF41E /* Disposables.swift */, - CA5FE89881BDDFA4543909C57ADDA9E3 /* DisposeBag.swift */, - F0033AA56A9BDB0EE60CBB527DE4F883 /* DisposeBase.swift */, - F15C22431BEC97AE98B57B47E8759CAF /* DistinctUntilChanged.swift */, - F8399DE5B9DFFDEF68FE6474AAD9A53A /* Do.swift */, - 8AE9784D546FC31E0C910427B049FE19 /* ElementAt.swift */, - 5D6B1411D5F87DCC322904F9E8DEBDF5 /* Empty.swift */, - BB2F21E4C09010A901E61FBA57ECB7F7 /* Enumerated.swift */, - 9201C1B93547FA42711EEFC2506420A3 /* Error.swift */, - 38B84F4DDE9EC97C7658466A4F61D8CC /* Errors.swift */, - 826BB238AF8D2DF3C0B3B83BFD8A89C2 /* Event.swift */, - 2B4677E34AE10E0CFC03D558DE92FCBE /* Filter.swift */, - A8178E16A51434E7A26BBD55A6B37C6E /* First.swift */, - 109024142E2C5E7A30BAB7DFF67E4F15 /* Generate.swift */, - 940E0BBF501F4A300D0021046496FE81 /* GroupBy.swift */, - 7DA7CE3FA675C27EC7531424D601E4D6 /* GroupedObservable.swift */, - 3CDE4A389BA3C59497ECC9FFF14C59CB /* HistoricalScheduler.swift */, - B6D197B36BC69B453F44708E10DF6392 /* HistoricalSchedulerTimeConverter.swift */, - F9AD710ADE2C9F54D8D083467AB805DE /* ImmediateSchedulerType.swift */, - 4DB1AC6526927D201E926E7613DB1388 /* InfiniteSequence.swift */, - 0AF0F7CA0945B7D4424DAE1783C38E86 /* InvocableScheduledItem.swift */, - 9F9ABD56A8A5AAA76FA1006C7C0319F9 /* InvocableType.swift */, - CBA0D6C32A9B10D1E69850A7C4871D69 /* Just.swift */, - DAC31522F5455A2C6F4491368CD360D6 /* Lock.swift */, - 03C17192B72F7E3A561BBB7AD859C9C1 /* LockOwnerType.swift */, - 32CD5C54D21440E751214150F0A09075 /* MainScheduler.swift */, - A703EA81C5D80B459B4392FE54E7355A /* Map.swift */, - A627E2E6E7679AACBF174B6B0004910E /* Materialize.swift */, - 43B7BB421B6C3CBA2E8F3B7040236CBB /* Maybe.swift */, - D2C320B56090A8F2C5AF19D07F5AEC4A /* Merge.swift */, - 7712E8FD442517BB8CFC52F650538D1F /* Multicast.swift */, - DCD3C72FA08DDA33A60A64AB444DF824 /* Never.swift */, - 92A3B3C356E05FEB86BFBD27E55708E8 /* NopDisposable.swift */, - EDD0C1DC5FEC301AAEF235118622BF21 /* Observable.swift */, - 08BDA24A302F62194382674EDA0F5421 /* ObservableConvertibleType.swift */, - 1EA4C81F172FE56F2110B4E635A9217A /* ObservableType.swift */, - C28A142256D9C33BCC76AA70E5F9C7F7 /* ObservableType+Extensions.swift */, - 5D677955E7367DD419D9178B1CE932CB /* ObservableType+PrimitiveSequence.swift */, - D5DA72693CDC4D9C9673E59AE87805D8 /* ObserveOn.swift */, - 9DF4296505592B5D0FD5CC5BB0E26389 /* ObserverBase.swift */, - E2C8E894D9A7DA056F8BB7785C13E455 /* ObserverType.swift */, - 22CC88B7046DDBA3D6276B4E2194AD69 /* OperationQueueScheduler.swift */, - DAE93D164F26813DD5276E43F2A9999A /* Optional.swift */, - 98A7E1F3FF08F854BF270ECCE4F89CC6 /* Platform.Darwin.swift */, - F4E5F21CD364F77A83FDF0D2A5655D73 /* Platform.Linux.swift */, - 51D25826B7219C70A28E6D2CD3FBB5C5 /* PrimitiveSequence.swift */, - 4C5CC81D7F7FD374CE8C2EEDE367E7F1 /* PrimitiveSequence+Zip+arity.swift */, - 25EA3890AFB09F00B4C6CBDEDE6A200B /* PriorityQueue.swift */, - EFD965EB47F82C6AE205F4EC8BB9BA63 /* Producer.swift */, - 5E82D8BD9ADE36721105B7BDF95ED385 /* PublishSubject.swift */, - 9C5C3E8FC2320C938515A1D863D28525 /* Queue.swift */, - C6D02DB3C808412802654FEA252DDCE7 /* Range.swift */, - 77889CE0FA23657557BCA936F33AC862 /* Reactive.swift */, - E4DD70AF3E5FD72B8D7B3936B02A41AD /* RecursiveLock.swift */, - 79F4E28F448376837374C53780547EB5 /* RecursiveScheduler.swift */, - 7EBE73A1F581A150871DD7C59A95C51E /* Reduce.swift */, - 9F8AA49B5F9F6A63CF750597EECE1B35 /* RefCountDisposable.swift */, - 3229669159891C612E13B182201E4BDE /* Repeat.swift */, - F9E13D647F8D906A8CFF58E78118ACF9 /* ReplaySubject.swift */, - C67C82C2CFE102B297A324A4E5FD3DF1 /* RetryWhen.swift */, - D77E4E90796539A09CD3F94E2EB07C62 /* Rx.swift */, - 06C186E5D087E4643033F456F9857F6C /* RxMutableBox.swift */, - 0D436E030C2D3F97A16F08D9D699D5E0 /* Sample.swift */, - 1FBF4F372924B7A26D2E873EC5310C52 /* Scan.swift */, - 8B476AADF13F6F0A81082710723A245D /* ScheduledDisposable.swift */, - F19C37AD72A78C0C983C3315B920F431 /* ScheduledItem.swift */, - 070D7D7B9FE72386A08E7ED2EFF2B2A3 /* ScheduledItemType.swift */, - CB53EDF330673B7E3722CEED52EFAA06 /* SchedulerServices+Emulation.swift */, - A01B6FD9971B00B9FC8FA93EFC7C8C67 /* SchedulerType.swift */, - 63ACC09FA3E638CD1B664F2F58A31E75 /* Sequence.swift */, - A4E2055F21CAA6397EDBB7B6A19BD959 /* SerialDispatchQueueScheduler.swift */, - 7E72F41519DA80A3A76E80765092C618 /* SerialDisposable.swift */, - 26D5A18F2DD0172C5BF816F53C0C842E /* ShareReplayScope.swift */, - 5E6A636EE980B3D946A1E9FEEA6C0191 /* Single.swift */, - 13400A45104B01F3E0ACD874EF8D440D /* SingleAssignmentDisposable.swift */, - 67A470C8DC892EBB4DD7FE56F6BA899F /* SingleAsync.swift */, - 8F784C720427150EAA452738E1DB92B1 /* Sink.swift */, - 10DB2F41EF620B1D2DCF82D5814B4CF2 /* Skip.swift */, - B8BA52B58EF201DE49EC2C51C377B61D /* SkipUntil.swift */, - 836C06CF483EE7F9CBBFBF2F596B0385 /* SkipWhile.swift */, - 81C07514150A957CE4AA46A9D5858F37 /* StartWith.swift */, - 99C694C106C4D52B5E35CFC2329515A8 /* String+Rx.swift */, - 9C10F56D87B9C18985D5AAC65395BAAD /* SubjectType.swift */, - 02EF3E2571960553EF676E38AF27D191 /* SubscribeOn.swift */, - F840EF70FDF2E2DEB1C4B08BF75926D5 /* SubscriptionDisposable.swift */, - 581610EDD119727B4B94817B2C112CD5 /* SwiftSupport.swift */, - 588DDC7B8E7AEDB85A2506DEAA9EC743 /* Switch.swift */, - DC52766E964A2DFA0D2EF71F7F2CEED0 /* SwitchIfEmpty.swift */, - 6345095269AD5D0D48D3A7337CBDDD9C /* SynchronizedDisposeType.swift */, - 6A4A37B4CE82143B83531B6D76B00CF8 /* SynchronizedOnType.swift */, - 7789F26C8F2E0496E96A6FE451E8E41A /* SynchronizedUnsubscribeType.swift */, - E376CC266538EDEAA1B5ED6A70AB2D70 /* TailRecursiveSink.swift */, - 42814DB03E511C5C8960096D960A7BF0 /* Take.swift */, - A9460DD6D919A36951EE3D58A709038A /* TakeLast.swift */, - 5BDFF360B4EB3BA2B58427E9CC350B4A /* TakeUntil.swift */, - CD45B63AAE6D93B642C4A51230F46F0E /* TakeWhile.swift */, - 0E506BE877F467668C514BE40A2DFBCE /* Throttle.swift */, - 21A9921E2E8AEDA2A048794AD482B220 /* Timeout.swift */, - A5126BA64BB75B98526D6CDB0962DC82 /* Timer.swift */, - 39892B52048600EFBD4F560E241AAF21 /* ToArray.swift */, - C46EB0A1058A5F883D191CBEF78389F9 /* Using.swift */, - D4BD4A3FB6CD3EDB6D05E397C03034CC /* VirtualTimeConverterType.swift */, - 842A313B38739D79E1F10D268EED6642 /* VirtualTimeScheduler.swift */, - 7DE74457D155859024B48FB2F0BC7F87 /* Window.swift */, - 94EFD16772ABA46690CA8FA249CB903F /* WithLatestFrom.swift */, - 87A947560D4F112C1FD4F882B4031FA6 /* Zip.swift */, - 9D6995DCF5F58FAC14A1A934BDC0A684 /* Zip+arity.swift */, - A217530D24CDC3BA2E0405E7B27526C3 /* Zip+Collection.swift */, - 18E0B8A8E598D1B8F4DF4565A12254D2 /* Support Files */, - ); - name = RxSwift; - path = RxSwift; - sourceTree = ""; - }; - FD11B3D2F0C9E5283D2D4D061BA30DE0 /* Support Files */ = { - isa = PBXGroup; - children = ( - 1A7CB16F3DD845CD538C24BBB40A45B3 /* Alamofire.modulemap */, - FBDE09DDDE11344F0AE6E893F5917C00 /* Alamofire.xcconfig */, - B8DBF4C657F123B7370D7DB32158FFE1 /* Alamofire-dummy.m */, - 3E61E8EC5B750DA96109A7723F2F10A3 /* Alamofire-Info.plist */, - EE5247C4D20D79D921A9801954D3F3EE /* Alamofire-prefix.pch */, - 10CBD6C72C526A158BF5722F417B6D9A /* Alamofire-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/Alamofire"; - sourceTree = ""; - }; - FD47C325D809B3038FC43666B66AEB02 /* Result */ = { - isa = PBXGroup; - children = ( - 788EE0E11F60CA6C5CF81C36BFB8026C /* AnyError.swift */, - 26447F7A81B0685F31D812013E2FD571 /* NoError.swift */, - BD4F6541B3C1185699540F4720830C9A /* Result.swift */, - D6A7FB919EC54999326B0BFDA624B2A7 /* ResultProtocol.swift */, - A846D19D7D59F77CBF2F8759F96BBEA9 /* Support Files */, - ); - name = Result; - path = Result; - sourceTree = ""; - }; FFD34C3F2B1C3FFB00829F261F1CEA4A /* Support Files */ = { isa = PBXGroup; children = ( @@ -1294,6 +1273,14 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ + 1699665B56976CE5784FE86E7B372CF2 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 485E14141484EF943B5921F0C630C4D2 /* Moya-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 1E40659C0D7F98272303BDA940C5303C /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -1302,11 +1289,11 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 2582784E4FA6A1AC5D23FC53AC3F6EE2 /* Headers */ = { + 4C94722D3DF87E9ACD4556F52450EF9D /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - F7B74645E07C39771156A1FA413B98D4 /* Alamofire-umbrella.h in Headers */, + F30644E28EACE951945892FE12E511A8 /* Pods-RxNetwork_Example-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1334,35 +1321,19 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 845710503167EAFE9C830248C6E8C6CA /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - B1BA4E31EDF572FEB7CAF8CDE3E1144F /* RxSwift-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - AA50947524CF4C53517758BC9E98DEDC /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 3EB8928A952A649C6FF9C0545A4F512E /* Result-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E196EACA8F7D6BB54E9A4160583F35F3 /* Headers */ = { + A8E36EA9700124B0E95D0F961520943A /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 511A936C7C9F535B044082D1C5C25E3F /* Pods-RxNetwork_Example-umbrella.h in Headers */, + 1349831CA5836315AB830BB7ECBF90E0 /* RxSwift-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - F5557C3A775856533287A2401AEAF804 /* Headers */ = { + ADDF288DD930A46B5F0F198C225895C9 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - E5F8A66352D49013350C45531BF867D1 /* Moya-umbrella.h in Headers */, + 00FA97D56201027AEB1C7692A2C3CF8B /* Alamofire-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1391,19 +1362,18 @@ }; 17F9141D333DA1A7BE5937F227221070 /* Moya */ = { isa = PBXNativeTarget; - buildConfigurationList = FE3847CDE87A25A0946C62BFEB31DB04 /* Build configuration list for PBXNativeTarget "Moya" */; + buildConfigurationList = 426AA45DD72430F6727D1F1B27EBF289 /* Build configuration list for PBXNativeTarget "Moya" */; buildPhases = ( - F5557C3A775856533287A2401AEAF804 /* Headers */, - 2C3BA39D3849AFECDA8D966862F8C446 /* Sources */, - 679BA631B3A4F8FF9AA6DA016000F7CF /* Frameworks */, - A8B38D1433683F2D53DA874E8AF45CD0 /* Resources */, + 1699665B56976CE5784FE86E7B372CF2 /* Headers */, + 6AD5A39273D9D222360397FE9B2D132B /* Sources */, + 84C1724A7E970F82428096559396D44F /* Frameworks */, + 8CE10F6529A4B25CCCFB3B2418F2CA0B /* Resources */, ); buildRules = ( ); dependencies = ( - FCAF6321E4FDC57C5CBB9BE63C14B8FF /* PBXTargetDependency */, - 39CD27440CA8B40FAEF42269175DFF20 /* PBXTargetDependency */, - 2561EDC42ABE6474987AA47F144D5D4F /* PBXTargetDependency */, + A15A57AB00599F21C12A7E2DEFFF853C /* PBXTargetDependency */, + 7F31606A128F84643A4BF80583F81524 /* PBXTargetDependency */, ); name = Moya; productName = Moya; @@ -1449,23 +1419,22 @@ }; 8E13C526B33E1AD69D45907AC0ED80E5 /* Pods-RxNetwork_Example */ = { isa = PBXNativeTarget; - buildConfigurationList = 2960A084E465A5A4FF2747127F91E2E2 /* Build configuration list for PBXNativeTarget "Pods-RxNetwork_Example" */; + buildConfigurationList = 278A8DCB634E7A42979AA196F859E78B /* Build configuration list for PBXNativeTarget "Pods-RxNetwork_Example" */; buildPhases = ( - E196EACA8F7D6BB54E9A4160583F35F3 /* Headers */, - 829CF8CA7B597F13C74BB7248E241C49 /* Sources */, - 0A5AA148AD9F0CB648B38F1EC4F518CA /* Frameworks */, - 0FACDC80D6E646D3A4A503736FC3D42D /* Resources */, + 4C94722D3DF87E9ACD4556F52450EF9D /* Headers */, + F00C232490417506900E127ED7344503 /* Sources */, + 8D244E0946A438F1C49031A309164420 /* Frameworks */, + 4481DEDCB6B2A3941F3226994974795C /* Resources */, ); buildRules = ( ); dependencies = ( - DB6956E54A390E505A46145276E3F196 /* PBXTargetDependency */, - AA358EC118BB520BAE0A4C67468D060B /* PBXTargetDependency */, - 847282497F51B89DC241933A517B7EAA /* PBXTargetDependency */, - 3ECBB86B9B72AFF95B0149B6AF5C2E53 /* PBXTargetDependency */, - A08C17CB6C55C87FA67F62B5AF4F7FA4 /* PBXTargetDependency */, - C205002A11C4ACA79644BFB4B67F918B /* PBXTargetDependency */, - 11169C5E476662F50D19236D3BDD10EF /* PBXTargetDependency */, + FCA358A555CE5E1A32A69B2FE809712A /* PBXTargetDependency */, + 8A89C6DB95BCAFC2F7C5E58CB2DFB7EF /* PBXTargetDependency */, + 382A8440DD2B4609A5EF8A645D84B9C8 /* PBXTargetDependency */, + 6DDBA74C3772E032B73B91ABD36FA5B3 /* PBXTargetDependency */, + 83585899D592A272A6EBC62EDE1ED7B2 /* PBXTargetDependency */, + 2824E3B970C49D9345435CB62E86D265 /* PBXTargetDependency */, ); name = "Pods-RxNetwork_Example"; productName = "Pods-RxNetwork_Example"; @@ -1490,32 +1459,14 @@ productReference = EBF9E916529EE3C7D211886F849EBE1F /* Storable.framework */; productType = "com.apple.product-type.framework"; }; - E163AC315AD24CFBD60C178D602BFC83 /* Result */ = { - isa = PBXNativeTarget; - buildConfigurationList = FB22EB4257A9F0A4C06D35F1D86DF753 /* Build configuration list for PBXNativeTarget "Result" */; - buildPhases = ( - AA50947524CF4C53517758BC9E98DEDC /* Headers */, - 865B39F882D59259F9342FEB5F941039 /* Sources */, - 1FF9744A7F4E80DD595206C76328C5EB /* Frameworks */, - 9234D931DD8C30A844A2361ABE959CB8 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Result; - productName = Result; - productReference = 0461B3F80FC05957690727254D64DB36 /* Result.framework */; - productType = "com.apple.product-type.framework"; - }; EA9EA43B3B503823EE36C60D9C8A865F /* RxSwift */ = { isa = PBXNativeTarget; - buildConfigurationList = ACD6CA1BC3D37278DE13305A287F8E5B /* Build configuration list for PBXNativeTarget "RxSwift" */; + buildConfigurationList = 82AEBBC70AA17D65EDC8947EED57F401 /* Build configuration list for PBXNativeTarget "RxSwift" */; buildPhases = ( - 845710503167EAFE9C830248C6E8C6CA /* Headers */, - 2BD2024D7110419A8BE452FD416EC2B7 /* Sources */, - E750003F14C6BB2EC651239DB1A5F779 /* Frameworks */, - C5E1AC0A525476178F6073AF6411DB7B /* Resources */, + A8E36EA9700124B0E95D0F961520943A /* Headers */, + DD179D41E901A4D40F9B6639899A1DD6 /* Sources */, + 7D0E474D62025CE5F16E392E7D87AF3A /* Frameworks */, + DA58BC30DB29990B56348603EF9B1F29 /* Resources */, ); buildRules = ( ); @@ -1528,12 +1479,12 @@ }; EAAA1AD3A8A1B59AB91319EE40752C6D /* Alamofire */ = { isa = PBXNativeTarget; - buildConfigurationList = E4A5194ABAF7A4780609E0E581DA6B54 /* Build configuration list for PBXNativeTarget "Alamofire" */; + buildConfigurationList = 6B2B8EC7E21CDBFF2BDA26B1B4AC4C0D /* Build configuration list for PBXNativeTarget "Alamofire" */; buildPhases = ( - 2582784E4FA6A1AC5D23FC53AC3F6EE2 /* Headers */, - 2DDFD9AC10F181CD7130BDF5F9E0502B /* Sources */, - 090C1D63463ACF622287EFF9D5C9392D /* Frameworks */, - 473D3E892ABB6C798CFF290644259B34 /* Resources */, + ADDF288DD930A46B5F0F198C225895C9 /* Headers */, + 7349DB0E9BEBE664696F1DCC25226F26 /* Sources */, + 8B0D8633F410345F93419B8C3D7B6916 /* Frameworks */, + 28FC0024B79C28A420D7C4FEBB9E3AEB /* Resources */, ); buildRules = ( ); @@ -1561,7 +1512,7 @@ en, ); mainGroup = CF1408CF629C7361332E53B88F7BD30C; - productRefGroup = 796BBC65D314FCE86B1F39F9302D9E24 /* Products */; + productRefGroup = 8D0B84232D8DDF0DA1C25047FBD72B31 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( @@ -1570,7 +1521,6 @@ 17F9141D333DA1A7BE5937F227221070 /* Moya */, 8E13C526B33E1AD69D45907AC0ED80E5 /* Pods-RxNetwork_Example */, 2000C3DA92C48C77680A1D6D8572AD4B /* Pods-RxNetwork_Tests */, - E163AC315AD24CFBD60C178D602BFC83 /* Result */, 045F970D8042EC014BA1BCBAD66DD876 /* RxNetwork */, EA9EA43B3B503823EE36C60D9C8A865F /* RxSwift */, 9F445FA5AE809C9022E2F9A48325E6AB /* Storable */, @@ -1579,7 +1529,7 @@ /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 0FACDC80D6E646D3A4A503736FC3D42D /* Resources */ = { + 28FC0024B79C28A420D7C4FEBB9E3AEB /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -1607,21 +1557,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 473D3E892ABB6C798CFF290644259B34 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9234D931DD8C30A844A2361ABE959CB8 /* Resources */ = { + 4481DEDCB6B2A3941F3226994974795C /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - A8B38D1433683F2D53DA874E8AF45CD0 /* Resources */ = { + 8CE10F6529A4B25CCCFB3B2418F2CA0B /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -1635,7 +1578,7 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - C5E1AC0A525476178F6073AF6411DB7B /* Resources */ = { + DA58BC30DB29990B56348603EF9B1F29 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -1662,223 +1605,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 2BD2024D7110419A8BE452FD416EC2B7 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8AE19DFFB83AF98D68E251DF652CCEED /* AddRef.swift in Sources */, - 655146CB233D90C2C9C1CE8CCDBA84A7 /* Amb.swift in Sources */, - 6FB77EC3AF24C0111F49D835C594B342 /* AnonymousDisposable.swift in Sources */, - D74F1CA811CF11909630F335E3D5DDFC /* AnonymousObserver.swift in Sources */, - 4DC36B93D7B6572E946D298D2B971E2B /* AnyObserver.swift in Sources */, - AF71BBA2FE0A68D53748DC34D423F912 /* AsMaybe.swift in Sources */, - E653C3820C34F794AB28E408DF81BCF8 /* AsSingle.swift in Sources */, - F8A64BE8DB59945D8ACBC94E882A37DC /* AsyncLock.swift in Sources */, - 27A0F69DDF9E5EA1BD522EBDFD03686A /* AsyncSubject.swift in Sources */, - 827A587C5001B0F60A00DA4FD4840596 /* AtomicInt.swift in Sources */, - 11241FCB6F537AA4A61B09428CD8224B /* Bag+Rx.swift in Sources */, - D48FB7C636DA126D247030ECE76E5392 /* Bag.swift in Sources */, - 9C360AF2D7B1DAAD0312FBC12314ACFB /* BehaviorSubject.swift in Sources */, - A85C8671039BF811BF62EB81D21A1F7C /* BinaryDisposable.swift in Sources */, - 73A593930C35A1A369D4C069B3D29161 /* BooleanDisposable.swift in Sources */, - 7499334C0277A6B598411A71FC4558E4 /* Buffer.swift in Sources */, - 136C2E9BF723164C92173621D65ABEE7 /* Cancelable.swift in Sources */, - EADFFBF37FD717FE99EC8CD475EA99C4 /* Catch.swift in Sources */, - AD49638A04455980DC909159D2B4E523 /* CombineLatest+arity.swift in Sources */, - 9985B3D69A3155B391C1157E2341764C /* CombineLatest+Collection.swift in Sources */, - A4D1DC406B5E5AA6F3F7AF43C5CC1441 /* CombineLatest.swift in Sources */, - 353B5E8857906440A1C34CD745BCAB28 /* CompactMap.swift in Sources */, - 121869235B8005EC2E00F5D76C8D01ED /* Completable+AndThen.swift in Sources */, - 6BC4701328F7A1742F3BDE79C0765AB1 /* Completable.swift in Sources */, - 51E52E2FD35BC764AC307F78F5A2F586 /* CompositeDisposable.swift in Sources */, - 0F8FEE9B0E5BC0C3EE472E65C2859C5D /* Concat.swift in Sources */, - 46AC93DD8F10B64A012884BADE831B04 /* ConcurrentDispatchQueueScheduler.swift in Sources */, - 1314BCDBCF99A827D5F02AC78E2E8289 /* ConcurrentMainScheduler.swift in Sources */, - 6918A61C5276DD8BB5F9A317081E04D7 /* ConnectableObservableType.swift in Sources */, - 771EC26513B70F9414E185D89BC76846 /* Create.swift in Sources */, - 82C7792740F127355253176808A72D70 /* CurrentThreadScheduler.swift in Sources */, - 09595DBC0E98BF1329B4455CDB05DC8E /* Date+Dispatch.swift in Sources */, - 4DBDC234147229C02A8D379242E17038 /* Debounce.swift in Sources */, - D5BD48DC2036961497EBC93FE657A688 /* Debug.swift in Sources */, - 7C0E7BD4B015BC2A112597C611294CE2 /* DefaultIfEmpty.swift in Sources */, - 0B1F0F2E26C82AD9ECD28EC6D9D4C5E7 /* Deferred.swift in Sources */, - 1678953586828BD7DF98D5C6589496AF /* Delay.swift in Sources */, - F717CEC6857DA0BD27D471BC1540CCD0 /* DelaySubscription.swift in Sources */, - 4B4B9439D5E14B9233B18E66715153D4 /* Dematerialize.swift in Sources */, - 08E05C4FFAE31D52C2D29D644C47A48A /* Deprecated.swift in Sources */, - 7886F4A62850202F06BADD4A517CBA9B /* DispatchQueue+Extensions.swift in Sources */, - D354B854B9E34E6286BD13BCA62548D8 /* DispatchQueueConfiguration.swift in Sources */, - 7493D30AC0FCEAD143DA3B319C7B8F50 /* Disposable.swift in Sources */, - BBD2558D69F9DE7866B755E189D14573 /* Disposables.swift in Sources */, - 09E46E8940BAD71075B691A59ACF8025 /* DisposeBag.swift in Sources */, - 3786FA53442C441AB02BF1E03462BF03 /* DisposeBase.swift in Sources */, - 5C134EA5D0824F1502BEAF139EBB6511 /* DistinctUntilChanged.swift in Sources */, - E9D02B7009E3BF2B23303CF80CEB84AA /* Do.swift in Sources */, - C602D02C572632A3CED6635C06274329 /* ElementAt.swift in Sources */, - 1BC4D6D2C03C49C29FEEE4E62F6FD110 /* Empty.swift in Sources */, - B452D153D9753E4193DAADB45456DDB8 /* Enumerated.swift in Sources */, - 4F5B6E658FB0D8A9456FACD1A7B9C0D1 /* Error.swift in Sources */, - 4B91CEDF27A50F8D344281A4FF43D107 /* Errors.swift in Sources */, - 304348ADBB6B73EB136AA692F5EE2CEA /* Event.swift in Sources */, - E54153CC14A91DFDA6336E5FB10F5FFF /* Filter.swift in Sources */, - D8A18F7E0070BA0A3771DBFFEF2923FA /* First.swift in Sources */, - 3156598674F07E566AC294693D811920 /* Generate.swift in Sources */, - 36DD088342598DF3C033711008D6ED32 /* GroupBy.swift in Sources */, - 38F78B05357CE8FE5B2DF694FF52AA89 /* GroupedObservable.swift in Sources */, - 9F6D91CACBE96A65769DF1BDF4E702B0 /* HistoricalScheduler.swift in Sources */, - 549171A00FBEA590B5B21BC0FDB2E372 /* HistoricalSchedulerTimeConverter.swift in Sources */, - 9B02DE52BDFEE672F4D0653DE76590BF /* ImmediateSchedulerType.swift in Sources */, - A2110CCE97DB10FDDE5ADBA0D43D7091 /* InfiniteSequence.swift in Sources */, - A4B783A510E39EEF7EEA0FA602A8E6B6 /* InvocableScheduledItem.swift in Sources */, - D1321494A1DC342947D9199B3564947F /* InvocableType.swift in Sources */, - 4CC203C24C555389A532542053666F57 /* Just.swift in Sources */, - 8737708F27205F1DA90D31F130C8A102 /* Lock.swift in Sources */, - 5AB424D0E299093D1F496695E1189B43 /* LockOwnerType.swift in Sources */, - 41E1193E9078A609684A15A3E4ED2E8F /* MainScheduler.swift in Sources */, - 7805949D9B4F03271B54EA5F37804BE0 /* Map.swift in Sources */, - 449B237EF52A78C7ADFC3F0A8BA4C043 /* Materialize.swift in Sources */, - 96346A11B1649C8F4DA41EE2C4E06ADC /* Maybe.swift in Sources */, - 2471127079F04AE182AF5498E85EB4B8 /* Merge.swift in Sources */, - CC6E75A6150633B7B69C961E82995F7D /* Multicast.swift in Sources */, - AA39B15CCFB83EE63ABD6076EE210E2E /* Never.swift in Sources */, - 425340CA98D6F944B1112D62B6C0A1D7 /* NopDisposable.swift in Sources */, - 3E38D1C50CFAD4E26E72D1ABC0C58B07 /* Observable.swift in Sources */, - E111C885E1606D84DC0EB8D0268CE6A6 /* ObservableConvertibleType.swift in Sources */, - C6EA8FD1471481D054058D69E9B34729 /* ObservableType+Extensions.swift in Sources */, - E245C5EFDFB200C2AB4F3B114F81B364 /* ObservableType+PrimitiveSequence.swift in Sources */, - 83A4F36D291ECB6C479A884977F4AD66 /* ObservableType.swift in Sources */, - D58F0CE218B00680A9DA435A6D96D2CF /* ObserveOn.swift in Sources */, - 11820EBFA8A95FEB359CD8AB71B33BFB /* ObserverBase.swift in Sources */, - 23DCBBC6529D2DF91372B281BF0D7A02 /* ObserverType.swift in Sources */, - CFE6D7D4FFED0A13B3A2BA4D128E7577 /* OperationQueueScheduler.swift in Sources */, - 29432DBDCD23EF640DAFF2962E45E8B5 /* Optional.swift in Sources */, - 48708EFA55C27A9B9D3AE64EE0249218 /* Platform.Darwin.swift in Sources */, - 0CAB824B623CBEFAD7EC8AF1082E7BF8 /* Platform.Linux.swift in Sources */, - CC220803A2B87B0D86650E779CD1CA23 /* PrimitiveSequence+Zip+arity.swift in Sources */, - D5FB6B8BDFC460ADA8967843EDF62164 /* PrimitiveSequence.swift in Sources */, - 23246CF823DCA603DDB27F912B9A789D /* PriorityQueue.swift in Sources */, - 42535C9035B77B20A7CA41E71D2FE57B /* Producer.swift in Sources */, - 324E989418751271D45A425315FF2A1D /* PublishSubject.swift in Sources */, - 0323A61C53801A428D6EE1392673AA64 /* Queue.swift in Sources */, - 2E6293FB04BED169AD1B614152353B1C /* Range.swift in Sources */, - 439542740E764BFA1F48D274C22E3BF3 /* Reactive.swift in Sources */, - 614876F4E2A5F65779C7EEFE09B5010E /* RecursiveLock.swift in Sources */, - AC3F90F52F73A13B720EB7EA191F5499 /* RecursiveScheduler.swift in Sources */, - E0F121E7FAD26855E5EE5A5E30EC790D /* Reduce.swift in Sources */, - DA0F2EA8E3FC92E1E78808787246A5AF /* RefCountDisposable.swift in Sources */, - E1E08DC362294456ED241ED3EAA886E4 /* Repeat.swift in Sources */, - C4D595D5D0286F56BAFD564A22CC9CEE /* ReplaySubject.swift in Sources */, - E8B2184C46353D00C15784066DD3ECC1 /* RetryWhen.swift in Sources */, - 5380058DAC0302E4C17D73438C75C2D9 /* Rx.swift in Sources */, - DB1E2BD92AD9DB23A2D1B2D80A995FBB /* RxMutableBox.swift in Sources */, - 34E1BC9D1970D804A5D837C86224ABE1 /* RxSwift-dummy.m in Sources */, - 434AFF6CA325C4EE81DF5F3430116ABD /* Sample.swift in Sources */, - 3F847052B495858D45CA26176A8B3FD0 /* Scan.swift in Sources */, - F0FB5F0D46EA7C4A3386E24321BB72C1 /* ScheduledDisposable.swift in Sources */, - 1F46CCA1815FF46F59AB203EF1A8525D /* ScheduledItem.swift in Sources */, - 9075C371CABA10F9F80789F3FDA4AD24 /* ScheduledItemType.swift in Sources */, - 4A648768EE519CD63B393490AA6AAB3E /* SchedulerServices+Emulation.swift in Sources */, - CC9A2A080AD7C44E4AB1D8F9FCA4F0C7 /* SchedulerType.swift in Sources */, - D10F142288593BD0B04A5C9AE3ACB077 /* Sequence.swift in Sources */, - F481E26B1DF1754ABD31213BA933D502 /* SerialDispatchQueueScheduler.swift in Sources */, - 88F77A310F6EF8D5A8F73E32750B8CD7 /* SerialDisposable.swift in Sources */, - 1F31FA4CAAA1E818C08B5C545EAE6F7F /* ShareReplayScope.swift in Sources */, - ADE32263AC3857A1E2C45ED96F058468 /* Single.swift in Sources */, - A7DD66D69DC12E18E0214E338E0D4AE9 /* SingleAssignmentDisposable.swift in Sources */, - 0B881EBE3D58E0F705BF76D3D42958ED /* SingleAsync.swift in Sources */, - F62F0E993778E9D76D4E580D49FA2AD6 /* Sink.swift in Sources */, - BE6980F49CE2EF9B4D556AFE33DD2159 /* Skip.swift in Sources */, - E7592B57F83C191814EF14372C578B9C /* SkipUntil.swift in Sources */, - 6F451FF13AA5A3AD4645BFDFB7C2E4ED /* SkipWhile.swift in Sources */, - 6AE59C8B0A70042EF7BDAD49F2BEDA90 /* StartWith.swift in Sources */, - 58C5C23A286C6E7ECC37356BD09770FE /* String+Rx.swift in Sources */, - E15422635F741E5FA093036E742EDAA5 /* SubjectType.swift in Sources */, - 9234ECCE484AA40145644A492A887522 /* SubscribeOn.swift in Sources */, - 72C0F16476393E0A471B708F88C7FFE1 /* SubscriptionDisposable.swift in Sources */, - E54109F9FA43A4AC965F74DE11CA5C13 /* SwiftSupport.swift in Sources */, - 978DFE1042F33DE92F8757E404E2B398 /* Switch.swift in Sources */, - 443C92502E3FAB86A304206C1B46201A /* SwitchIfEmpty.swift in Sources */, - 7213F88AF4702E6DED1E24AA195EA6C5 /* SynchronizedDisposeType.swift in Sources */, - A135CE538F7816739D4DAC06443DB712 /* SynchronizedOnType.swift in Sources */, - 285F7999321325C156441650B0539084 /* SynchronizedUnsubscribeType.swift in Sources */, - BD33731A322FCD83E774BA10733A8602 /* TailRecursiveSink.swift in Sources */, - 7E7C19622366738BB2DA0F088C7F1CCF /* Take.swift in Sources */, - 332E55685B00BBB30DCEE7B7F03ED694 /* TakeLast.swift in Sources */, - 77416321649E85E452388097F17949EC /* TakeUntil.swift in Sources */, - E7C9A90601ABD0F0AA4CA1B28533EEF1 /* TakeWhile.swift in Sources */, - FAB3E6C7229344C485BC8D34F0086535 /* Throttle.swift in Sources */, - 7570CAF273B4C37FAE77398E54A2A94C /* Timeout.swift in Sources */, - A102E67776094FDA2E2783464B31C203 /* Timer.swift in Sources */, - 5D8DAD2E93EE4AE8FB9671D7517BB383 /* ToArray.swift in Sources */, - 47B7C3430E561BFE798B4F001B0B16B2 /* Using.swift in Sources */, - 6872B9E11F1AA180A93CDF92E14F8D9E /* VirtualTimeConverterType.swift in Sources */, - DB0926187C913F181B19B3DB49939FA9 /* VirtualTimeScheduler.swift in Sources */, - EA35F8C81EF439B21DB573B008995118 /* Window.swift in Sources */, - EB536542B5291C3FE62DBAA84C39D917 /* WithLatestFrom.swift in Sources */, - 89FD2F0D9C82B4C997080A7C3CF09045 /* Zip+arity.swift in Sources */, - 02D833D04B41753246FD50FFDD847344 /* Zip+Collection.swift in Sources */, - EF7C295499D56DA225649E28864A7DBC /* Zip.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2C3BA39D3849AFECDA8D966862F8C446 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6190E03E117858C0DE78A6416D8A4D9D /* AccessTokenPlugin.swift in Sources */, - FD24425EA86517248535F8BCD813D572 /* AnyEncodable.swift in Sources */, - A9EAF387CD5B2FEC8F03407E4C5032F7 /* Cancellable.swift in Sources */, - A535E68C4D89F9F0E2917C60719CC617 /* CredentialsPlugin.swift in Sources */, - FB031DDE393DE0D6487473DC23080C49 /* Endpoint.swift in Sources */, - 80BE5E30D412DD4936FB1DC880A5D6ED /* Image.swift in Sources */, - 329CD2AFDE8484F6307A82C3565B3747 /* Moya+Alamofire.swift in Sources */, - D14C3C5ABA61ACBEFCFFB903F6A09720 /* Moya-dummy.m in Sources */, - 32DE376DCFCB87B29020CD3E29F81BF1 /* MoyaError.swift in Sources */, - 16395D90A7735D8F4E0C19FF10F5B619 /* MoyaProvider+Defaults.swift in Sources */, - FD619C44738C9EC5FF0A484816B5F361 /* MoyaProvider+Internal.swift in Sources */, - 7F355A340130CA2D85BA491EF9CEC8F4 /* MoyaProvider+Rx.swift in Sources */, - DED57E4610DEC696C6CAB7495918A5A6 /* MoyaProvider.swift in Sources */, - 338F84A5A46770FB148E7E4677275F2E /* MultipartFormData.swift in Sources */, - 120338CA7F41E1D063EAE5F0A3FCB85E /* MultiTarget.swift in Sources */, - D484A277E9CAA9CDCDE27683D6713ED0 /* NetworkActivityPlugin.swift in Sources */, - CDD6BD84CB084A10EAB6F141ED393719 /* NetworkLoggerPlugin.swift in Sources */, - EAC682EC13AA7DF2BB24825C505E000E /* Observable+Response.swift in Sources */, - 5B86E408D9160DBC6337FD2D12EBA516 /* Plugin.swift in Sources */, - C6F3963FC210E4264B1C9C3444105D40 /* Response.swift in Sources */, - B617FF75A8D15CD7D5B66AD64D8FCCD9 /* Single+Response.swift in Sources */, - 2E265640FBE3959C1429D6F47C9ED01C /* TargetType.swift in Sources */, - DF43FCBD6B7EEA020B0CE98C22141832 /* Task.swift in Sources */, - 3E1656CAA01EF828DF429E152BF70A12 /* URL+Moya.swift in Sources */, - E75142340368B349DAFFA89FEA288FF3 /* URLRequest+Encoding.swift in Sources */, - 065795F57759EFC15C83A75677E68056 /* ValidationType.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2DDFD9AC10F181CD7130BDF5F9E0502B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 83956E20859CDBBE7BC38ABADE0170FB /* AFError.swift in Sources */, - 1945CD5D63A1C164AEAAA9A33E85571E /* Alamofire-dummy.m in Sources */, - BEE6B677416CA71C981D1D3F60B18C96 /* Alamofire.swift in Sources */, - D3D8C379C6E4FB487E5ABD6800AD7B7E /* DispatchQueue+Alamofire.swift in Sources */, - 1986B50C74F1697EA43F68335C93CEB3 /* MultipartFormData.swift in Sources */, - 3571F958A3907B3A806E62D50C2550D4 /* NetworkReachabilityManager.swift in Sources */, - 132E0F619E4338E5D1B27E4C72076B3F /* Notifications.swift in Sources */, - 0C5E11DE24DAA737704B355F5F2F3426 /* ParameterEncoding.swift in Sources */, - 98A929C8E9012AB167672714FFD2113C /* Request.swift in Sources */, - D65C254F5ABF2CB5ECEE50FE8F8E1A80 /* Response.swift in Sources */, - E3747EC31FCCA97D75A81FC700CF7E24 /* ResponseSerialization.swift in Sources */, - 64744C911253C3E01461FAD7C935C8D7 /* Result.swift in Sources */, - F13F2AA7F2E6D95A181CAB99B900D531 /* ServerTrustPolicy.swift in Sources */, - 2C61B040BA6A9A7AE66C4D9BA26D5520 /* SessionDelegate.swift in Sources */, - 931BBB8230A25161D5C37528A8F9FECF /* SessionManager.swift in Sources */, - AFC64B1097F7355FF423D6A73E9C7210 /* TaskDelegate.swift in Sources */, - 933FDA5970AA525D6CB92BFEBA2BAB4A /* Timeline.swift in Sources */, - 53791F5E5F07400F92CFDFC89A432305 /* Validation.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 4AFA60E5280C8187659BBDF794943795 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -1903,31 +1629,85 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 79638B2057C9B4D6EF460B0FA6BC18A8 /* Sources */ = { + 6AD5A39273D9D222360397FE9B2D132B /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - E0AF946766FBB7F3FDB2AB58FEF36C70 /* Pods-RxNetwork_Tests-dummy.m in Sources */, + A6E54693F4FE0F37FF016CA6F1A4D78B /* AccessTokenPlugin.swift in Sources */, + D8C089847634E593119461FC5006A302 /* AnyEncodable.swift in Sources */, + A7C9DE2DBD28F5122541FD9F11FEEEC6 /* Cancellable.swift in Sources */, + E8FD96EBDB36F2BE905D05F74B0906E5 /* CredentialsPlugin.swift in Sources */, + 648BEC3D1E2FC89ED7487960646A2672 /* Endpoint.swift in Sources */, + 53DF164D8ED7CE192538270A6E44BC5D /* Image.swift in Sources */, + 4A58926B25B353762E5C5E9DDC3663B1 /* Moya+Alamofire.swift in Sources */, + 2F536C2AF3B103298C6C094BB4A7FD37 /* Moya-dummy.m in Sources */, + EF796E0D6E10A60D7B888D1F8F7A0DDE /* MoyaError.swift in Sources */, + A0984EC68B044E44BC79B12DAB62A450 /* MoyaProvider+Defaults.swift in Sources */, + 6E500E09797E690AF9AC5B9511BAC789 /* MoyaProvider+Internal.swift in Sources */, + 4FB1B6D22195C720218293530FB1EF0E /* MoyaProvider+Rx.swift in Sources */, + F913C5A285AC68CF66368D4F804EA6D3 /* MoyaProvider.swift in Sources */, + AABC56D2B22A94FD4F2ACFA194D29FF3 /* MultipartFormData.swift in Sources */, + 7FD07B719F3C7BD7BDEDE04BFC68906A /* MultiTarget.swift in Sources */, + 3D72F53B4DEF14B79BDE94196F072F42 /* NetworkActivityPlugin.swift in Sources */, + B80CE38A2CF000C91F9BEC252DD44B25 /* NetworkLoggerPlugin.swift in Sources */, + 6671D72BE96F05F0BC070530123C1D0E /* Observable+Response.swift in Sources */, + F7679B14121D8747BF7A256A5EBE4EC1 /* Plugin.swift in Sources */, + F41B2EE22AC7AD5EA0546BBBBE51AC5D /* RequestTypeWrapper.swift in Sources */, + 2D64BC669DA212DBF33189D9A750521A /* Response.swift in Sources */, + 3E07E92EB47EDF27A84D979A1A537983 /* Single+Response.swift in Sources */, + F37BECF2D90C729642BC497E89CFA0D4 /* TargetType.swift in Sources */, + 32BE7904E1C29B3CE8C38F9692B75EBC /* Task.swift in Sources */, + 20533020B628BCC085D1E0CBC0FF8455 /* URL+Moya.swift in Sources */, + 73C5F7A686893DD40BC9F5F67539A78B /* URLRequest+Encoding.swift in Sources */, + 5E626665812F7610667D81C73F448189 /* ValidationType.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 829CF8CA7B597F13C74BB7248E241C49 /* Sources */ = { + 7349DB0E9BEBE664696F1DCC25226F26 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2E93082DE5C3CA63C18B656872776C93 /* Pods-RxNetwork_Example-dummy.m in Sources */, + 17953A9CF2E354B3E69B9ABC2F367AD9 /* AFError.swift in Sources */, + B1C58F6CED7B3E45170711D9ADF878AF /* Alamofire-dummy.m in Sources */, + B788B3354CCEBE56DFDB963CAFD7F6C2 /* Alamofire.swift in Sources */, + 44127C4B989C9CC6A90D78B66A929A5E /* AlamofireExtended.swift in Sources */, + 0AE06C3AEA6CA45342BA703230ABD2CB /* CachedResponseHandler.swift in Sources */, + E9A5AC2F471699CCA516952A5FEB990B /* DispatchQueue+Alamofire.swift in Sources */, + CACBD166E573774FB5613C34AA6DA7A7 /* EventMonitor.swift in Sources */, + 56EC8ED1535DAB987F3D2B71D4C05773 /* HTTPHeaders.swift in Sources */, + B23E9A5CDA31534491226F4C2EE8F8E6 /* HTTPMethod.swift in Sources */, + 5C4A0685B5A201436AB52EF25829B333 /* MultipartFormData.swift in Sources */, + E07BD425C4EA9ADF15DDFCDB10D0B2FB /* MultipartUpload.swift in Sources */, + 7CF8362BA31492053F5CB165637AE117 /* NetworkReachabilityManager.swift in Sources */, + C7369563F6946D8984124E1A546B6425 /* Notifications.swift in Sources */, + 92811AC5CD9A5004116AE43C4E8FD955 /* OperationQueue+Alamofire.swift in Sources */, + 5D61C8ED0DDCC9F8B576B6514B19EE50 /* ParameterEncoder.swift in Sources */, + 14AB7976E100075ADEA0AB1DB833E72D /* ParameterEncoding.swift in Sources */, + 0419772A87B16DB7DCF405A9E77D671F /* Protector.swift in Sources */, + C64AF152F7928CDB59385528DB65FE19 /* RedirectHandler.swift in Sources */, + 6A22C46CB1EDE471794D9AB2AC10327F /* Request.swift in Sources */, + AD9899986955B2EC1EC20818C860C971 /* RequestInterceptor.swift in Sources */, + 48D97BE7D5CAED273BD2341C239CC934 /* RequestTaskMap.swift in Sources */, + F71789DC91A75033EFB79DB828676451 /* Response.swift in Sources */, + 13457FE4E607509A3B9527B0711033D5 /* ResponseSerialization.swift in Sources */, + 4082513A35C682F2193D002C80F72B79 /* Result+Alamofire.swift in Sources */, + D6B2983389480F48F27A0704EEB5DC81 /* RetryPolicy.swift in Sources */, + 0CC43FF0E31AA320ACFEB0FE6239DF34 /* ServerTrustEvaluation.swift in Sources */, + 69ACE4EEE5A8C1C618B22CC1F7B8EF01 /* Session.swift in Sources */, + 42CDB5C986C78BBC8E5C0185F746CABF /* SessionDelegate.swift in Sources */, + 70517C3BAC2D6614347DEAC15299EB84 /* URLConvertible+URLRequestConvertible.swift in Sources */, + 5D12235D061AEE7459279AAF8C348DFE /* URLEncodedFormEncoder.swift in Sources */, + E4E12208D5246E64B7E6CCAE987ADB03 /* URLRequest+Alamofire.swift in Sources */, + AF92602937CA016548022C600B8CDC16 /* URLSessionConfiguration+Alamofire.swift in Sources */, + 06507A26118BA5ACFBBC8C225776920E /* Validation.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 865B39F882D59259F9342FEB5F941039 /* Sources */ = { + 79638B2057C9B4D6EF460B0FA6BC18A8 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - B48ED012465B31B5AAADAEB1E1A1EC96 /* AnyError.swift in Sources */, - 2D4CE23A0975D977928C79D381DD79BE /* NoError.swift in Sources */, - D4495024CB69E81D87A2F5FFD95057DE /* Result-dummy.m in Sources */, - 2614F337EEC1F3C522BF5C8213F67CBB /* Result.swift in Sources */, - E3692924E6A50E2D4560D89F4190EFD3 /* ResultProtocol.swift in Sources */, + E0AF946766FBB7F3FDB2AB58FEF36C70 /* Pods-RxNetwork_Tests-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1943,6 +1723,173 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + DD179D41E901A4D40F9B6639899A1DD6 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D018312354706A06A0A1D14B36F261E0 /* AddRef.swift in Sources */, + 39032686C6699D0C73F6624B2353153B /* Amb.swift in Sources */, + 72BCCB00F4313283460E23F82D9C03EB /* AnonymousDisposable.swift in Sources */, + 386C181A96676A4F379C4CF2F2630CDB /* AnonymousObserver.swift in Sources */, + 15DE050167BCFC5A853464091B9AA007 /* AnyObserver.swift in Sources */, + 690CADA27732BFA5FC50E02C9DEC59CB /* AsMaybe.swift in Sources */, + 5AFA1C90693120F18B64A46697EFE3E9 /* AsSingle.swift in Sources */, + C7B19143F080448BBA1DCDE85190E987 /* AsyncLock.swift in Sources */, + ACEEAB591378F919B3C3B73ABBB644D4 /* AsyncSubject.swift in Sources */, + 836193127A436104FABBC1A1666CA5EC /* AtomicInt.swift in Sources */, + 58B49162649FA9E9D9488581E8C4C8CC /* Bag+Rx.swift in Sources */, + 238E56DC535790541C2F3579A5A05AE8 /* Bag.swift in Sources */, + 427A0635A2E6E28B4A3A816E242B4E37 /* BehaviorSubject.swift in Sources */, + 89CF1DF0CAF754571AACBDEFF789074F /* BinaryDisposable.swift in Sources */, + 40C99AD4D80E7AE683F69BD28F77864A /* BooleanDisposable.swift in Sources */, + D054281638C6770D95265DC499C0ED96 /* Buffer.swift in Sources */, + 16B528E1AC9C664E75440FE4A34497E2 /* Cancelable.swift in Sources */, + AD196E6B5826847D4CD2CF688F0670B4 /* Catch.swift in Sources */, + ECFC62A33C1002B1AD46222513ED9FEF /* CombineLatest+arity.swift in Sources */, + 2B5F202260E63B8BA44425778ADFC4B5 /* CombineLatest+Collection.swift in Sources */, + DB4AC9C9764AB262D9E2629768BD59DA /* CombineLatest.swift in Sources */, + 3AE2A890E38BBF1090C56D1F71DD7BEC /* CompactMap.swift in Sources */, + 4DBEBC1C46655FE4482E162B0F962E7C /* Completable+AndThen.swift in Sources */, + EB2566DE832D8CBCF4A1C9EEFB5E4D6C /* Completable.swift in Sources */, + 43FDF5ABE2F18F0B5C933E70C17A809C /* CompositeDisposable.swift in Sources */, + A8921779A0B03A8843F04CB531310210 /* Concat.swift in Sources */, + 450C5E66131BFB4BC0C131E5A59116F6 /* ConcurrentDispatchQueueScheduler.swift in Sources */, + FE00C77F24CDC030F41AAFC3F6762470 /* ConcurrentMainScheduler.swift in Sources */, + 24D8CBA3A7CE6C4670EF7C46D057C55C /* ConnectableObservableType.swift in Sources */, + AC3CB3488A34461DAD252DE4A373C4CB /* Create.swift in Sources */, + 35AAA0FF9EC67EAB5504B30080B271B8 /* CurrentThreadScheduler.swift in Sources */, + 61C0D630EB56761025C8642CC43430C4 /* Date+Dispatch.swift in Sources */, + 9CF9C6A4350CE1B03447B5247F84C2E8 /* Debounce.swift in Sources */, + 6730DF6ABF6A785543DA3001108F5749 /* Debug.swift in Sources */, + 04796344A7C95D584655C5566DEACC6C /* DefaultIfEmpty.swift in Sources */, + CE9E7F1B6C1023ABFD65C8E82C04C13C /* Deferred.swift in Sources */, + C7A9B57B2343036C600D088D5F8FF536 /* Delay.swift in Sources */, + 36E9AAC8889EAE48797EA35F978BABFE /* DelaySubscription.swift in Sources */, + D0D4408146D541C73AF89DC5A18EAAF8 /* Dematerialize.swift in Sources */, + 20ABCF3A27659A9F98E3B2DF11A3E6FC /* Deprecated.swift in Sources */, + 3CAC4510987ECD76E66C8436897B7E5E /* DispatchQueue+Extensions.swift in Sources */, + 162E961BCA06B5856EBE1128F5B578CD /* DispatchQueueConfiguration.swift in Sources */, + C940142C7BF894844C1732C987EB3A65 /* Disposable.swift in Sources */, + F667BEF21A2A6AB70F186E8941B01A81 /* Disposables.swift in Sources */, + C76CF711EC8ED2795A3E431CE9125EB1 /* DisposeBag.swift in Sources */, + BEA9AC162B40BA3879ECE9D7CD49133C /* DisposeBase.swift in Sources */, + 9E0E8CA8EF7D5975C391DFCC303F72C3 /* DistinctUntilChanged.swift in Sources */, + 20006DEED67151188A24C6723CF7B230 /* Do.swift in Sources */, + 8D008A4A3B54969F4FFE915C65C9066D /* ElementAt.swift in Sources */, + B10BAC99F09C0D1E119B11DAAF9F4F2E /* Empty.swift in Sources */, + 69D4126F929F0FDB43A0F44D653FF09F /* Enumerated.swift in Sources */, + B306FA316BF5EECF582CAF821E0696DE /* Error.swift in Sources */, + D2E4CA856C232F0C1ED1E3FAF6A67FE8 /* Errors.swift in Sources */, + 4347316F35AE1AE0AC7A6BE5C92E885B /* Event.swift in Sources */, + EF87506B5CB7A49F7ACE0CB35B79B8E8 /* Filter.swift in Sources */, + B5AB337ACA26EB58FE7ED9A13F3402D1 /* First.swift in Sources */, + F9290AB41C51A32A32F046108AE6DA57 /* Generate.swift in Sources */, + 74AA78DE1FABC94DA40AE8E40A76087F /* GroupBy.swift in Sources */, + 471D3D6EDE67F8F777383DC780F4EB47 /* GroupedObservable.swift in Sources */, + EA766C3FABE829E8249206FE33266C0D /* HistoricalScheduler.swift in Sources */, + 8805B3A385FF612893183012DF14AA9B /* HistoricalSchedulerTimeConverter.swift in Sources */, + 537150742875A0BC7F10C7AEA95E90A0 /* ImmediateSchedulerType.swift in Sources */, + E2D712F3F96DB7FDB9AB571FA4547707 /* InfiniteSequence.swift in Sources */, + 5398591055AC984105B2FC37BCD5C635 /* InvocableScheduledItem.swift in Sources */, + C4962311BA5AD3FB8E0AFA1A5BC969BA /* InvocableType.swift in Sources */, + 2679D07BD27F89352BA304303224430D /* Just.swift in Sources */, + FA800BAF1EDAAD0F282025D829C6EEC7 /* Lock.swift in Sources */, + 21B0F16982CCF2E0C9D290177BB1F095 /* LockOwnerType.swift in Sources */, + 08C0D8E4EE5E91B97FDA34C8B1B84AC2 /* MainScheduler.swift in Sources */, + D1DB16A8ADF6F23A90784AE6D0F48371 /* Map.swift in Sources */, + CEF522F304C821113FA3C11E91D33802 /* Materialize.swift in Sources */, + 5595FBEF79641901DEF6630C8B3E44D0 /* Maybe.swift in Sources */, + 807F55A7D4A09A2DCD5FB64D59AF7FB1 /* Merge.swift in Sources */, + 2FF96A3B5939EC3BF89F1B6EA7839065 /* Multicast.swift in Sources */, + 67C3B90FFD52B59583EFDF7A34559C5C /* Never.swift in Sources */, + BDA6A52A11AA3D5962391C1EFFE2B09D /* NopDisposable.swift in Sources */, + C77C88909376758350D2DFA86B5FFDCE /* Observable.swift in Sources */, + E79031377EE6EBE1EF70ED35CFFE96EF /* ObservableConvertibleType.swift in Sources */, + 73C77120B878115966FC5AA9AF36E91A /* ObservableType+Extensions.swift in Sources */, + 398F7FA52F7E61329E0874F5668BF5EF /* ObservableType+PrimitiveSequence.swift in Sources */, + 884CB47932E14ADFBC8C13061807316A /* ObservableType.swift in Sources */, + B1282BAF91224397F6AAFB577C341E6A /* ObserveOn.swift in Sources */, + C1356059527754C583D52890E12D9255 /* ObserverBase.swift in Sources */, + 22E5874E46AC1CE4CBC8FC662CC55C0C /* ObserverType.swift in Sources */, + 995FBC0C424C25F7FA6F2BF1245A8D4C /* OperationQueueScheduler.swift in Sources */, + AE9A449328CF627474BC5A22DD12ADEB /* Optional.swift in Sources */, + B72D290CF07850A2B7CF41CEF3FDF3E0 /* Platform.Darwin.swift in Sources */, + 567943E7E3072AC8F5ADAA9E66E21F92 /* Platform.Linux.swift in Sources */, + 6810CEB9E126BD33B8A01E79B7D9301D /* PrimitiveSequence+Zip+arity.swift in Sources */, + BD65127B566C666A67DA98E0AF329A15 /* PrimitiveSequence.swift in Sources */, + 6C5C7C4BB1EFDA1970D4F47C1193399F /* PriorityQueue.swift in Sources */, + 15CB34CE32F8F418ADA0AFEB4586C4AF /* Producer.swift in Sources */, + 846AF5592D7EBDCB05E9AB0879BF1342 /* PublishSubject.swift in Sources */, + 9F264F1A2FF3521FD1F62A4539DC1FAB /* Queue.swift in Sources */, + 5F59200B0DD426BE83DEC34E67AAE564 /* Range.swift in Sources */, + 61D67D39B1D51B9D51B8B9F4D1911428 /* Reactive.swift in Sources */, + 52C34E90DCA475F252D13959B66066EB /* RecursiveLock.swift in Sources */, + B03D2733E568FB51D6C8B0F23F5C3AAD /* RecursiveScheduler.swift in Sources */, + 1C387C185F4BBBE1283A5BED5ABA27DF /* Reduce.swift in Sources */, + 4B66393BC7CD9C62F326692C1B4E5358 /* RefCountDisposable.swift in Sources */, + CC822EB8650E011340BDAD6708E10E74 /* Repeat.swift in Sources */, + 0382B21403508B99FF3327D56E0AF692 /* ReplaySubject.swift in Sources */, + 482971279D142473EEE3991BDE7BA1CE /* RetryWhen.swift in Sources */, + 0532D2ACCD5650B6FBF59C260047C3F5 /* Rx.swift in Sources */, + 3C49040F90772F3D25A7967CB2244A97 /* RxMutableBox.swift in Sources */, + E839BCEAF6403EA464B4B2EF0518FA3D /* RxSwift-dummy.m in Sources */, + 2FD5653F8A16107C1CF16BD0016D464B /* Sample.swift in Sources */, + 577F13C1954C9B6A65959FA98CC84FCD /* Scan.swift in Sources */, + 7337FA6C4A3F6F1FC203606E918BA5F4 /* ScheduledDisposable.swift in Sources */, + BD12A82F374994FCD0AAE6ACA3533A8A /* ScheduledItem.swift in Sources */, + C3EA56C32F615BD7A8917A776DDAE597 /* ScheduledItemType.swift in Sources */, + 90C9147FE061B924EAF20E15E79E543C /* SchedulerServices+Emulation.swift in Sources */, + 3C948C15D45C1ACB43D0109AD150DD37 /* SchedulerType.swift in Sources */, + 67098130C1E0A29A2767D913D6B521EE /* Sequence.swift in Sources */, + 7AED67E1C3B95CF7A4628FBB5335ECC2 /* SerialDispatchQueueScheduler.swift in Sources */, + 167BAD406FED0F1C1E58A64F5D4AAE6E /* SerialDisposable.swift in Sources */, + 9199D578DD7861D9874762A1226074DA /* ShareReplayScope.swift in Sources */, + 2374D677D92A5059C3149F389B92CA5D /* Single.swift in Sources */, + 5A7D72019BD3B4DCB3123D94F69AB898 /* SingleAssignmentDisposable.swift in Sources */, + 599F0F563C3326C12B41D933F5F80C51 /* SingleAsync.swift in Sources */, + BDB2620B10B258173458D6E1B6F871E2 /* Sink.swift in Sources */, + 1F9AA48E0CE3132EAA10C2778F554B7E /* Skip.swift in Sources */, + 4C9F9203E47771CF126244603AC7010E /* SkipUntil.swift in Sources */, + B8CBBB4C1BE72997572539B3B23CDD7E /* SkipWhile.swift in Sources */, + 2A0B7C366BEF1DA021BBF70D5024627E /* StartWith.swift in Sources */, + B7340AE5CCDA0D48032E76FD2EACABD1 /* String+Rx.swift in Sources */, + AC991769A1E70432F1438665B7A20D3C /* SubjectType.swift in Sources */, + B6B5DD46569F622E8065D405F8F8B124 /* SubscribeOn.swift in Sources */, + 5856209957EE2833E86DB346D25BAB3A /* SubscriptionDisposable.swift in Sources */, + DA30B0D76146C936010244CCEEA3E7E6 /* SwiftSupport.swift in Sources */, + E45A738555CB47EDFF9F8F1336E44205 /* Switch.swift in Sources */, + DC1C500659E2AAF20EF85D4E49666A66 /* SwitchIfEmpty.swift in Sources */, + 40BAAA426379DB35F2487D7074F4F7A1 /* SynchronizedDisposeType.swift in Sources */, + 10B973D93FB221BD387B7C658F77D443 /* SynchronizedOnType.swift in Sources */, + EFC3E2419DC3305F2BBF3082B92BBD1F /* SynchronizedUnsubscribeType.swift in Sources */, + B9BCC87C90F47AD8B8FE81CF3F1F251A /* TailRecursiveSink.swift in Sources */, + 445F4CB3833C4C1858A745645C25AD2C /* Take.swift in Sources */, + D358A8F8B661F0355556D2EF36E67A78 /* TakeLast.swift in Sources */, + 2F0D3D2291277275F604063A788360FA /* TakeUntil.swift in Sources */, + F53C290D4F59A0DCF5F9C7E19DFE6378 /* TakeWhile.swift in Sources */, + 99AE91F0464A31E006B4DF77EF20893E /* Throttle.swift in Sources */, + B45AA223B98773B1565A927496E07F51 /* Timeout.swift in Sources */, + 7E5D7EB916869F933BE3C5B7EA96980C /* Timer.swift in Sources */, + 9826034176E96C9E474E072E83C8A358 /* ToArray.swift in Sources */, + 7EA2F5473AFD81C74A2876C2C978FB02 /* Using.swift in Sources */, + 9834C2A01D4C3A7727BE17AA6A5512CD /* VirtualTimeConverterType.swift in Sources */, + 7BD6C758E1C3B0DA760A112A98FD921D /* VirtualTimeScheduler.swift in Sources */, + 4E324C8232C73ACE88495E322AF4A10D /* Window.swift in Sources */, + E25BE67AB5EAAAB182751B0A5DE2B9F2 /* WithLatestFrom.swift in Sources */, + 5977E90645BBB23BBEAF8FA758A855AC /* Zip+arity.swift in Sources */, + ED6455829FB837C6D4E391C2A9827C93 /* Zip+Collection.swift in Sources */, + F938315E9DD7AA367E34CEB718392F0A /* Zip.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F00C232490417506900E127ED7344503 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F0A03B5B54EF60731A50C987341D6294 /* Pods-RxNetwork_Example-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -1952,17 +1899,11 @@ target = 17F9141D333DA1A7BE5937F227221070 /* Moya */; targetProxy = 41256A3178444B09D7B6DF807B1BA3EF /* PBXContainerItemProxy */; }; - 11169C5E476662F50D19236D3BDD10EF /* PBXTargetDependency */ = { + 2824E3B970C49D9345435CB62E86D265 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Storable; target = 9F445FA5AE809C9022E2F9A48325E6AB /* Storable */; - targetProxy = 850075BA6F502CFE9A62C08CC0823B8A /* PBXContainerItemProxy */; - }; - 2561EDC42ABE6474987AA47F144D5D4F /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RxSwift; - target = EA9EA43B3B503823EE36C60D9C8A865F /* RxSwift */; - targetProxy = 4205D999BE73E66041D185EE4F8558FE /* PBXContainerItemProxy */; + targetProxy = C6A90E2682DBF1616B2A2982CDC8C53E /* PBXContainerItemProxy */; }; 343ED74D8B890C2DDF090999B1DC6029 /* PBXTargetDependency */ = { isa = PBXTargetDependency; @@ -1970,17 +1911,17 @@ target = 9F445FA5AE809C9022E2F9A48325E6AB /* Storable */; targetProxy = 42E97C6CD26A108F4872386DFF21D7F2 /* PBXContainerItemProxy */; }; - 39CD27440CA8B40FAEF42269175DFF20 /* PBXTargetDependency */ = { + 382A8440DD2B4609A5EF8A645D84B9C8 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = Result; - target = E163AC315AD24CFBD60C178D602BFC83 /* Result */; - targetProxy = F9BE30A673A8C8DE58C039CE4AF60E2C /* PBXContainerItemProxy */; - }; - 3ECBB86B9B72AFF95B0149B6AF5C2E53 /* PBXTargetDependency */ = { + name = Moya; + target = 17F9141D333DA1A7BE5937F227221070 /* Moya */; + targetProxy = 6DC199D91DC93068F7D082ECDD6820BA /* PBXContainerItemProxy */; + }; + 6DDBA74C3772E032B73B91ABD36FA5B3 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = Result; - target = E163AC315AD24CFBD60C178D602BFC83 /* Result */; - targetProxy = 1BF7896FCDCB84A7359C41415E504215 /* PBXContainerItemProxy */; + name = RxNetwork; + target = 045F970D8042EC014BA1BCBAD66DD876 /* RxNetwork */; + targetProxy = 158F96E735057F8A56F852DE86F4763F /* PBXContainerItemProxy */; }; 6F67A69BE5B15A058254AA1ABC37E564 /* PBXTargetDependency */ = { isa = PBXTargetDependency; @@ -1988,48 +1929,42 @@ target = 8E13C526B33E1AD69D45907AC0ED80E5 /* Pods-RxNetwork_Example */; targetProxy = 712FF6E752334487A0F27CDEAB2DE7B2 /* PBXContainerItemProxy */; }; - 847282497F51B89DC241933A517B7EAA /* PBXTargetDependency */ = { + 7F31606A128F84643A4BF80583F81524 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = Moya; - target = 17F9141D333DA1A7BE5937F227221070 /* Moya */; - targetProxy = 0D48BA996BCC0A55189AD41FDF2AA5A7 /* PBXContainerItemProxy */; + name = RxSwift; + target = EA9EA43B3B503823EE36C60D9C8A865F /* RxSwift */; + targetProxy = EDF9F4D0C960DCFB830C799EFBA7B1D7 /* PBXContainerItemProxy */; }; - A08C17CB6C55C87FA67F62B5AF4F7FA4 /* PBXTargetDependency */ = { + 83585899D592A272A6EBC62EDE1ED7B2 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = RxNetwork; - target = 045F970D8042EC014BA1BCBAD66DD876 /* RxNetwork */; - targetProxy = 802363BF4FC5E12CC87511F43CCEFE93 /* PBXContainerItemProxy */; + name = RxSwift; + target = EA9EA43B3B503823EE36C60D9C8A865F /* RxSwift */; + targetProxy = 1B4B49F2AAC6FD8E2902B164286D43C9 /* PBXContainerItemProxy */; }; - AA358EC118BB520BAE0A4C67468D060B /* PBXTargetDependency */ = { + 8A89C6DB95BCAFC2F7C5E58CB2DFB7EF /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = CleanJSON; target = 300904838EEDDC3BB8242817D8F97CB6 /* CleanJSON */; - targetProxy = 11541F84D7B6ED2E187F0EE61C2EDD25 /* PBXContainerItemProxy */; - }; - C205002A11C4ACA79644BFB4B67F918B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RxSwift; - target = EA9EA43B3B503823EE36C60D9C8A865F /* RxSwift */; - targetProxy = 21B360D5D43F12BA0676E55F974234C8 /* PBXContainerItemProxy */; + targetProxy = 59A4ED76495FD39A306A578DBBDFF562 /* PBXContainerItemProxy */; }; - DB6956E54A390E505A46145276E3F196 /* PBXTargetDependency */ = { + A15A57AB00599F21C12A7E2DEFFF853C /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Alamofire; target = EAAA1AD3A8A1B59AB91319EE40752C6D /* Alamofire */; - targetProxy = 7595F335BB9A9CF46F3789FD83389FDE /* PBXContainerItemProxy */; + targetProxy = 5210E18E803B371F006D469F7283F550 /* PBXContainerItemProxy */; }; - FCAF6321E4FDC57C5CBB9BE63C14B8FF /* PBXTargetDependency */ = { + FCA358A555CE5E1A32A69B2FE809712A /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Alamofire; target = EAAA1AD3A8A1B59AB91319EE40752C6D /* Alamofire */; - targetProxy = 1749E85D34D25C22423E92478E361B72 /* PBXContainerItemProxy */; + targetProxy = DAE2B239DDE1BA2B07400D39A108057F /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 0271F93A77CEDCDE9E4DE6BB7FC2239E /* Debug */ = { + 00319A2330DC739FCBFBB6CFB0C5F58D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B44AA8B4D28EFEDF548D76837E9809A7 /* RxNetwork.xcconfig */; + baseConfigurationReference = 532E2616914679E24F3935C6BA666020 /* Alamofire.xcconfig */; buildSettings = { CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; @@ -2041,29 +1976,28 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/RxNetwork/RxNetwork-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxNetwork/RxNetwork-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Alamofire/Alamofire-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/RxNetwork/RxNetwork.modulemap"; - PRODUCT_MODULE_NAME = RxNetwork; - PRODUCT_NAME = RxNetwork; + MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; + PRODUCT_MODULE_NAME = Alamofire; + PRODUCT_NAME = Alamofire; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 5.1; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 0582F4263E260BE2ED193AB5BE1204BA /* Debug */ = { + 0271F93A77CEDCDE9E4DE6BB7FC2239E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 609EA9D4146C3002A053FD732F25F5C9 /* Pods-RxNetwork_Tests.debug.xcconfig */; + baseConfigurationReference = B44AA8B4D28EFEDF548D76837E9809A7 /* RxNetwork.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2074,29 +2008,30 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/RxNetwork/RxNetwork-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/RxNetwork/RxNetwork-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + MODULEMAP_FILE = "Target Support Files/RxNetwork/RxNetwork.modulemap"; + PRODUCT_MODULE_NAME = RxNetwork; + PRODUCT_NAME = RxNetwork; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 0BE8C1F8AF623488AA04D932312903DD /* Debug */ = { + 0582F4263E260BE2ED193AB5BE1204BA /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 813B32AAA3627675D2FFEFD165B45D06 /* Result.xcconfig */; + baseConfigurationReference = 609EA9D4146C3002A053FD732F25F5C9 /* Pods-RxNetwork_Tests.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*]" = ""; @@ -2106,18 +2041,19 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Result/Result-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Result/Result-Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-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"; - PRODUCT_MODULE_NAME = Result; - PRODUCT_NAME = Result; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.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_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -2188,41 +2124,9 @@ }; name = Debug; }; - 22CB495827DF57CB867348728B8B8C38 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 64B0A939B603CEF8DFEC39D2BF35E3C6 /* Moya.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/Moya/Moya-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Moya/Moya-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/Moya/Moya.modulemap"; - PRODUCT_MODULE_NAME = Moya; - PRODUCT_NAME = Moya; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; 22E675D42EEF580A1C7066470F23EDBA /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F3FEE127DA61F1ABA988876C6138084C /* Storable.xcconfig */; + baseConfigurationReference = C22E1442CDC1AC958D56F7A1D91D12E2 /* Storable.xcconfig */; buildSettings = { CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; @@ -2252,9 +2156,9 @@ }; name = Debug; }; - 26E9A7B7CC36D753291E2D3570A8DB18 /* Release */ = { + 23012773EE73B2C30ECC302A8AC15B9F /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FBDE09DDDE11344F0AE6E893F5917C00 /* Alamofire.xcconfig */; + baseConfigurationReference = F435A009553E50262C9ADAE649CF4F06 /* RxSwift.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2265,28 +2169,27 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Alamofire-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/RxSwift/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/Alamofire/Alamofire.modulemap"; - PRODUCT_MODULE_NAME = Alamofire; - PRODUCT_NAME = Alamofire; + 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 = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; 3630C930522572B8ED7CB6238B8B2BE2 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FEEF3368449BA7CE8E53DCAB80DCA93C /* CleanJSON.xcconfig */; + baseConfigurationReference = 7F8CA8FEF001B39393CE02B01F7ABFEF /* CleanJSON.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2315,11 +2218,10 @@ }; name = Debug; }; - 387D357D7F69B68A20F0786639F44792 /* Release */ = { + 4E1F17CEAB0B61D7B56146A3CB42AC7F /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = ED823EC216935E3D6BF084F242AEE0CF /* Pods-RxNetwork_Example.release.xcconfig */; + baseConfigurationReference = B44AA8B4D28EFEDF548D76837E9809A7 /* RxNetwork.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2330,19 +2232,18 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/RxNetwork/RxNetwork-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/RxNetwork/RxNetwork-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + MODULEMAP_FILE = "Target Support Files/RxNetwork/RxNetwork.modulemap"; + PRODUCT_MODULE_NAME = RxNetwork; + PRODUCT_NAME = RxNetwork; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -2350,11 +2251,10 @@ }; name = Release; }; - 4E1F17CEAB0B61D7B56146A3CB42AC7F /* Release */ = { + 4FC89E54D80D64E72FD431BC306367BA /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B44AA8B4D28EFEDF548D76837E9809A7 /* RxNetwork.xcconfig */; + baseConfigurationReference = F435A009553E50262C9ADAE649CF4F06 /* RxSwift.xcconfig */; buildSettings = { - CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2364,14 +2264,14 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/RxNetwork/RxNetwork-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxNetwork/RxNetwork-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/RxSwift/RxSwift-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"; - MODULEMAP_FILE = "Target Support Files/RxNetwork/RxNetwork.modulemap"; - PRODUCT_MODULE_NAME = RxNetwork; - PRODUCT_NAME = RxNetwork; + 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) "; @@ -2383,10 +2283,11 @@ }; name = Release; }; - 60DF385FE35E022030C4099A5650C89E /* Debug */ = { + 5808F9277B53A1AFD414F3BB0BF8EE91 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 64B0A939B603CEF8DFEC39D2BF35E3C6 /* Moya.xcconfig */; + baseConfigurationReference = 93351B9F2D4D05A8B32289A223198FC4 /* Moya.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2399,7 +2300,7 @@ GCC_PREFIX_HEADER = "Target Support Files/Moya/Moya-prefix.pch"; INFOPLIST_FILE = "Target Support Files/Moya/Moya-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/Moya/Moya.modulemap"; PRODUCT_MODULE_NAME = Moya; @@ -2451,7 +2352,7 @@ }; 79085CD6D45B169B6777024E9F0E3D16 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F3FEE127DA61F1ABA988876C6138084C /* Storable.xcconfig */; + baseConfigurationReference = C22E1442CDC1AC958D56F7A1D91D12E2 /* Storable.xcconfig */; buildSettings = { CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; @@ -2482,10 +2383,12 @@ }; name = Release; }; - A9696872BB4E38A707CC739EDE55552C /* Release */ = { + 7D0AE6E5C8E143FC4413C4E9A9C67CDC /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DEC6126FA23A77F14AF3E120DE4F9C59 /* RxSwift.xcconfig */; + baseConfigurationReference = ED823EC216935E3D6BF084F242AEE0CF /* Pods-RxNetwork_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*]" = ""; @@ -2495,14 +2398,48 @@ 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/RxSwift-Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_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"; - PRODUCT_MODULE_NAME = RxSwift; - PRODUCT_NAME = RxSwift; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_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; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 86BE0EAD36B62FDE298458F0F08B3781 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 93351B9F2D4D05A8B32289A223198FC4 /* Moya.xcconfig */; + buildSettings = { + 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; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/Moya/Moya-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Moya/Moya-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/Moya/Moya.modulemap"; + PRODUCT_MODULE_NAME = Moya; + PRODUCT_NAME = Moya; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; @@ -2574,9 +2511,9 @@ }; name = Release; }; - B63B8B9A3DC0B86B8560A3526C388A7C /* Debug */ = { + E071E8876C6FA81059B4FE1CD4615E7B /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FBDE09DDDE11344F0AE6E893F5917C00 /* Alamofire.xcconfig */; + baseConfigurationReference = 7F8CA8FEF001B39393CE02B01F7ABFEF /* CleanJSON.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2587,60 +2524,31 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Alamofire-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/CleanJSON/CleanJSON-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/CleanJSON/CleanJSON-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - PRODUCT_MODULE_NAME = Alamofire; - PRODUCT_NAME = Alamofire; + MODULEMAP_FILE = "Target Support Files/CleanJSON/CleanJSON.modulemap"; + PRODUCT_MODULE_NAME = CleanJSON; + PRODUCT_NAME = CleanJSON; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - B71DB581EBE515D2DB990015C65B5C7E /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 813B32AAA3627675D2FFEFD165B45D06 /* 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; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Result/Result-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Result/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"; - PRODUCT_MODULE_NAME = Result; - PRODUCT_NAME = Result; - 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; }; - DEA59BBE8C9AE376101F919E5AE10831 /* Debug */ = { + E5428602B41E0CEE86891AC5E51E9846 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DEC6126FA23A77F14AF3E120DE4F9C59 /* RxSwift.xcconfig */; + baseConfigurationReference = CA39BBC6D19BBC768D9855F31B730801 /* Pods-RxNetwork_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*]" = ""; @@ -2650,28 +2558,30 @@ 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/RxSwift-Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_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"; - PRODUCT_MODULE_NAME = RxSwift; - PRODUCT_NAME = RxSwift; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_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_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - E071E8876C6FA81059B4FE1CD4615E7B /* Release */ = { + F659822BFF3B3C20B29B76B89800A5E9 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FEEF3368449BA7CE8E53DCAB80DCA93C /* CleanJSON.xcconfig */; + baseConfigurationReference = 532E2616914679E24F3935C6BA666020 /* Alamofire.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2681,18 +2591,18 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/CleanJSON/CleanJSON-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/CleanJSON/CleanJSON-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Alamofire/Alamofire-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/CleanJSON/CleanJSON.modulemap"; - PRODUCT_MODULE_NAME = CleanJSON; - PRODUCT_NAME = CleanJSON; + MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; + PRODUCT_MODULE_NAME = Alamofire; + PRODUCT_NAME = Alamofire; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 5.1; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -2700,48 +2610,23 @@ }; name = Release; }; - F8C340A34B441CCE97C31014BD527622 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = CA39BBC6D19BBC768D9855F31B730801 /* Pods-RxNetwork_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; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_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; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 2960A084E465A5A4FF2747127F91E2E2 /* Build configuration list for PBXNativeTarget "Pods-RxNetwork_Example" */ = { + 278A8DCB634E7A42979AA196F859E78B /* Build configuration list for PBXNativeTarget "Pods-RxNetwork_Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - F8C340A34B441CCE97C31014BD527622 /* Debug */, - 387D357D7F69B68A20F0786639F44792 /* Release */, + E5428602B41E0CEE86891AC5E51E9846 /* Debug */, + 7D0AE6E5C8E143FC4413C4E9A9C67CDC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 426AA45DD72430F6727D1F1B27EBF289 /* Build configuration list for PBXNativeTarget "Moya" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5808F9277B53A1AFD414F3BB0BF8EE91 /* Debug */, + 86BE0EAD36B62FDE298458F0F08B3781 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2764,38 +2649,38 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - AB031934812F833108688EFC9BABBC3B /* Build configuration list for PBXNativeTarget "Storable" */ = { + 6B2B8EC7E21CDBFF2BDA26B1B4AC4C0D /* Build configuration list for PBXNativeTarget "Alamofire" */ = { isa = XCConfigurationList; buildConfigurations = ( - 22E675D42EEF580A1C7066470F23EDBA /* Debug */, - 79085CD6D45B169B6777024E9F0E3D16 /* Release */, + 00319A2330DC739FCBFBB6CFB0C5F58D /* Debug */, + F659822BFF3B3C20B29B76B89800A5E9 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - ACD6CA1BC3D37278DE13305A287F8E5B /* Build configuration list for PBXNativeTarget "RxSwift" */ = { + 82AEBBC70AA17D65EDC8947EED57F401 /* Build configuration list for PBXNativeTarget "RxSwift" */ = { isa = XCConfigurationList; buildConfigurations = ( - DEA59BBE8C9AE376101F919E5AE10831 /* Debug */, - A9696872BB4E38A707CC739EDE55552C /* Release */, + 23012773EE73B2C30ECC302A8AC15B9F /* Debug */, + 4FC89E54D80D64E72FD431BC306367BA /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - D526726212F21C255A4B53300EC1A763 /* Build configuration list for PBXNativeTarget "RxNetwork" */ = { + AB031934812F833108688EFC9BABBC3B /* Build configuration list for PBXNativeTarget "Storable" */ = { isa = XCConfigurationList; buildConfigurations = ( - 0271F93A77CEDCDE9E4DE6BB7FC2239E /* Debug */, - 4E1F17CEAB0B61D7B56146A3CB42AC7F /* Release */, + 22E675D42EEF580A1C7066470F23EDBA /* Debug */, + 79085CD6D45B169B6777024E9F0E3D16 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - E4A5194ABAF7A4780609E0E581DA6B54 /* Build configuration list for PBXNativeTarget "Alamofire" */ = { + D526726212F21C255A4B53300EC1A763 /* Build configuration list for PBXNativeTarget "RxNetwork" */ = { isa = XCConfigurationList; buildConfigurations = ( - B63B8B9A3DC0B86B8560A3526C388A7C /* Debug */, - 26E9A7B7CC36D753291E2D3570A8DB18 /* Release */, + 0271F93A77CEDCDE9E4DE6BB7FC2239E /* Debug */, + 4E1F17CEAB0B61D7B56146A3CB42AC7F /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2809,24 +2694,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - FB22EB4257A9F0A4C06D35F1D86DF753 /* Build configuration list for PBXNativeTarget "Result" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0BE8C1F8AF623488AA04D932312903DD /* Debug */, - B71DB581EBE515D2DB990015C65B5C7E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - FE3847CDE87A25A0946C62BFEB31DB04 /* Build configuration list for PBXNativeTarget "Moya" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 60DF385FE35E022030C4099A5650C89E /* Debug */, - 22CB495827DF57CB867348728B8B8C38 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ }; rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; diff --git a/Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata old mode 100644 new mode 100755 diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Alamofire.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Alamofire.xcscheme old mode 100644 new mode 100755 diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Cache.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Cache.xcscheme old mode 100644 new mode 100755 diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Moya.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Moya.xcscheme old mode 100644 new mode 100755 diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Result.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Result.xcscheme old mode 100644 new mode 100755 diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/RxNetwork.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/RxNetwork.xcscheme old mode 100644 new mode 100755 diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/RxSwift.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/RxSwift.xcscheme old mode 100644 new mode 100755 diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Alamofire.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Alamofire.xcscheme old mode 100644 new mode 100755 diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/CleanJSON.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/CleanJSON.xcscheme old mode 100644 new mode 100755 diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Moya.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Moya.xcscheme old mode 100644 new mode 100755 diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Example.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Example.xcscheme old mode 100644 new mode 100755 diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Tests.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Tests.xcscheme old mode 100644 new mode 100755 diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Result.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Result.xcscheme old mode 100644 new mode 100755 diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/RxNetwork.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/RxNetwork.xcscheme old mode 100644 new mode 100755 diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/RxSwift.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/RxSwift.xcscheme old mode 100644 new mode 100755 diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Storable.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Storable.xcscheme old mode 100644 new mode 100755 diff --git a/Example/Pods/Result/LICENSE b/Example/Pods/Result/LICENSE deleted file mode 100644 index 3026ee1..0000000 --- a/Example/Pods/Result/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Rob Rix - -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/Result/README.md b/Example/Pods/Result/README.md deleted file mode 100644 index c030316..0000000 --- a/Example/Pods/Result/README.md +++ /dev/null @@ -1,112 +0,0 @@ -# Result - -[![Build Status](https://travis-ci.org/antitypical/Result.svg?branch=master)](https://travis-ci.org/antitypical/Result) -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![CocoaPods](https://img.shields.io/cocoapods/v/Result.svg)](https://cocoapods.org/) -[![Reference Status](https://www.versioneye.com/objective-c/result/reference_badge.svg?style=flat)](https://www.versioneye.com/objective-c/result/references) - -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 `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`. - -## Use - -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: Any] - -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)) - } - - guard let value = value as? String else { - return .failure(.typeMismatch) - } - - return .success(value) -} -``` - -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): - print("The email is \(email)") - -case let .failure(.noSuchKey(key)): - print("\(key) is not a valid key") - -case .failure(.typeMismatch): - print("Didn't have the right type") -} -``` - -Using a `switch` statement allows powerful pattern matching, and ensures all possible results are covered. Swift 2.0 offers new ways to deconstruct enums like the `if-case` statement, but be wary as such methods do not ensure errors are handled. - -Other methods available for processing `Result` are detailed in the [API documentation](http://cocoadocs.org/docsets/Result/). - -## Result vs. Throws - -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`. - -## Higher Order Functions - -`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`. - -```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. - -`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', '~> 4.0.0' -``` - -### Swift Package Manager - -```swift -import PackageDescription - -let package = Package( - name: "MyProject", - targets: [], - dependencies: [ - .Package(url: "https://github.com/antitypical/Result.git", - majorVersion: 4) - ] -) -``` diff --git a/Example/Pods/Result/Result/AnyError.swift b/Example/Pods/Result/Result/AnyError.swift deleted file mode 100644 index ee018d2..0000000 --- a/Example/Pods/Result/Result/AnyError.swift +++ /dev/null @@ -1,46 +0,0 @@ -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 deleted file mode 100644 index a919f51..0000000 --- a/Example/Pods/Result/Result/NoError.swift +++ /dev/null @@ -1,10 +0,0 @@ -/// 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 deleted file mode 100644 index 7576838..0000000 --- a/Example/Pods/Result/Result/Result.swift +++ /dev/null @@ -1,229 +0,0 @@ -// 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(Value) - case failure(Error) - - /// The compatibility alias for the Swift 5's `Result` in the standard library. - /// - /// See https://github.com/apple/swift-evolution/blob/master/proposals/0235-add-result.md - /// and https://forums.swift.org/t/accepted-with-modifications-se-0235-add-result-to-the-standard-library/18603 - /// for the details. - public typealias Success = Value - /// The compatibility alias for the Swift 5's `Result` in the standard library. - /// - /// See https://github.com/apple/swift-evolution/blob/master/proposals/0235-add-result.md - /// and https://forums.swift.org/t/accepted-with-modifications-se-0235-add-result-to-the-standard-library/18603 - /// for the details. - public typealias Failure = Error - - // MARK: Constructors - - /// Constructs a success wrapping a `value`. - public init(value: Value) { - self = .success(value) - } - - /// Constructs a failure wrapping an `error`. - public init(error: Error) { - self = .failure(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 -> Value) { - self.init(catching: f) - } - - /// Constructs a result from a function that uses `throw`, failing with `Error` if throws. - @available(*, deprecated, renamed: "init(catching:)") - public init(attempt f: () throws -> Value) { - self.init(catching: f) - } - - /// The same as `init(attempt:)` aiming for the compatibility with the Swift 5's `Result` in the standard library. - /// - /// See https://github.com/apple/swift-evolution/blob/master/proposals/0235-add-result.md - /// and https://forums.swift.org/t/accepted-with-modifications-se-0235-add-result-to-the-standard-library/18603 - /// for the details. - public init(catching body: () throws -> Success) { - do { - self = .success(try body()) - } 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. - @available(*, deprecated, renamed: "get()") - public func dematerialize() throws -> Value { - return try get() - } - - /// The same as `dematerialize()` aiming for the compatibility with the Swift 5's `Result` in the standard library. - /// - /// See https://github.com/apple/swift-evolution/blob/master/proposals/0235-add-result.md - /// and https://forums.swift.org/t/accepted-with-modifications-se-0235-add-result-to-the-standard-library/18603 - /// for the details. - public func get() throws -> Success { - switch self { - case let .success(value): - return value - case let .failure(error): - throw error - } - } - - /// Case analysis for 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) - case let .failure(value): - return ifFailure(value) - } - } - - // MARK: Errors - - /// The domain for errors constructed by Result. - public static var errorDomain: String { return "com.antitypical.Result" } - - /// The userInfo key for source functions in errors constructed by Result. - public static var functionKey: String { return "\(errorDomain).function" } - - /// The userInfo key for source file paths in errors constructed by Result. - public static var fileKey: String { return "\(errorDomain).file" } - - /// The userInfo key for source file line numbers in errors constructed by Result. - public static var lineKey: String { return "\(errorDomain).line" } - - /// Constructs an error. - public static func error(_ message: String? = nil, function: String = #function, file: String = #file, line: Int = #line) -> NSError { - var userInfo: [String: Any] = [ - functionKey: function, - fileKey: file, - lineKey: line, - ] - - if let message = message { - userInfo[NSLocalizedDescriptionKey] = message - } - - return NSError(domain: errorDomain, code: 0, userInfo: userInfo) - } - - - // MARK: CustomStringConvertible - - public var description: String { - switch self { - case let .success(value): return ".success(\(value))" - case let .failure(error): return ".failure(\(error))" - } - } - - - // MARK: CustomDebugStringConvertible - - public var debugDescription: String { - return description - } - - // MARK: ResultProtocol - public var result: Result { - return self - } -} - -extension Result where Result.Failure == 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) - } - - /// 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)) - } - } -} - -// MARK: - Derive result from failable closure - -@available(*, deprecated, renamed: "Result.init(attempt:)") -public func materialize(_ f: () throws -> T) -> Result { - return Result(attempt: f) -} - -@available(*, deprecated, renamed: "Result.init(_:)") -public func materialize(_ f: @autoclosure () throws -> T) -> Result { - return Result(try f()) -} - -// MARK: - ErrorConvertible conformance - -extension NSError: ErrorConvertible { - public static func error(from error: Swift.Error) -> Self { - func cast(_ error: Swift.Error) -> T { - return error as! T - } - - return cast(error) - } -} - -// MARK: - migration support - -@available(*, unavailable, message: "Use the overload which returns `Result` instead") -public func materialize(_ f: () throws -> T) -> Result { - fatalError() -} - -@available(*, unavailable, message: "Use the overload which returns `Result` instead") -public func materialize(_ f: @autoclosure () throws -> T) -> 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() -} - -/// 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 deleted file mode 100644 index e3ad022..0000000 --- a/Example/Pods/Result/Result/ResultProtocol.swift +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) 2015 Rob Rix. All rights reserved. - -/// A protocol that can be used to constrain associated types as `Result`. -public protocol ResultProtocol { - associatedtype Value - associatedtype Error: Swift.Error - - init(value: Value) - init(error: Error) - - var result: Result { get } -} - -extension Result { - /// Returns the value if self represents a success, `nil` otherwise. - public var value: Value? { - 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? { - 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. - public func map(_ transform: (Value) -> U) -> Result { - return flatMap { .success(transform($0)) } - } - - /// Returns the result of applying `transform` to `Success`es’ values, or re-wrapping `Failure`’s errors. - public func flatMap(_ transform: (Value) -> Result) -> Result { - 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. - public func mapError(_ transform: (Error) -> Error2) -> Result { - return flatMapError { .failure(transform($0)) } - } - - /// Returns the result of applying `transform` to `Failure`’s errors, or re-wrapping `Success`es’ values. - public func flatMapError(_ transform: (Error) -> Result) -> Result { - 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)) - } - } -} - -extension Result { - - // MARK: Higher-order functions - - /// Returns `self.value` if this result is a .Success, or the given value otherwise. Equivalent with `??` - public func recover(_ value: @autoclosure () -> Value) -> Value { - return self.value ?? value() - } - - /// Returns this result if it is a .Success, or the given result otherwise. Equivalent with `??` - 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 ErrorConvertible: Swift.Error { - static func error(from error: Swift.Error) -> Self -} - -extension Result where Result.Failure: ErrorConvertible { - - /// Returns the result of applying `transform` to `Success`es’ values, or wrapping thrown errors. - public func tryMap(_ transform: (Value) throws -> U) -> Result { - return flatMap { value in - do { - return .success(try transform(value)) - } - catch { - let convertedError = Error.error(from: error) - // Revisit this in a future version of Swift. https://twitter.com/jckarter/status/672931114944696321 - return .failure(convertedError) - } - } - } -} - -// MARK: - Operators - -extension Result where Result.Success: Equatable, Result.Failure: 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 - } -} - -#if swift(>=4.1) - extension Result: Equatable where Result.Success: Equatable, Result.Failure: Equatable { } -#else - extension Result where Result.Success: Equatable, Result.Failure: 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 - -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 static func ??(left: Result, right: @autoclosure () -> Result) -> Result { - return left.recover(with: right()) - } -} - -// MARK: - migration support - -@available(*, unavailable, renamed: "ErrorConvertible") -public protocol ErrorProtocolConvertible: ErrorConvertible {} diff --git a/Example/Pods/RxSwift/LICENSE.md b/Example/Pods/RxSwift/LICENSE.md old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/Platform/AtomicInt.swift b/Example/Pods/RxSwift/Platform/AtomicInt.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/Platform/DataStructures/Bag.swift b/Example/Pods/RxSwift/Platform/DataStructures/Bag.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift b/Example/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift b/Example/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/Platform/DataStructures/Queue.swift b/Example/Pods/RxSwift/Platform/DataStructures/Queue.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift b/Example/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/Platform/Platform.Darwin.swift b/Example/Pods/RxSwift/Platform/Platform.Darwin.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/Platform/Platform.Linux.swift b/Example/Pods/RxSwift/Platform/Platform.Linux.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/Platform/RecursiveLock.swift b/Example/Pods/RxSwift/Platform/RecursiveLock.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/README.md b/Example/Pods/RxSwift/README.md old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/AnyObserver.swift b/Example/Pods/RxSwift/RxSwift/AnyObserver.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Cancelable.swift b/Example/Pods/RxSwift/RxSwift/Cancelable.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift b/Example/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Concurrency/Lock.swift b/Example/Pods/RxSwift/RxSwift/Concurrency/Lock.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift b/Example/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift b/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift b/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift b/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/ConnectableObservableType.swift b/Example/Pods/RxSwift/RxSwift/ConnectableObservableType.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Date+Dispatch.swift b/Example/Pods/RxSwift/RxSwift/Date+Dispatch.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Deprecated.swift b/Example/Pods/RxSwift/RxSwift/Deprecated.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Disposable.swift b/Example/Pods/RxSwift/RxSwift/Disposable.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/Disposables.swift b/Example/Pods/RxSwift/RxSwift/Disposables/Disposables.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift b/Example/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift b/Example/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Errors.swift b/Example/Pods/RxSwift/RxSwift/Errors.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Event.swift b/Example/Pods/RxSwift/RxSwift/Event.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift b/Example/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift b/Example/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/GroupedObservable.swift b/Example/Pods/RxSwift/RxSwift/GroupedObservable.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift b/Example/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observable.swift b/Example/Pods/RxSwift/RxSwift/Observable.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift b/Example/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift b/Example/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/ObservableType.swift b/Example/Pods/RxSwift/RxSwift/ObservableType.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/AddRef.swift b/Example/Pods/RxSwift/RxSwift/Observables/AddRef.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Amb.swift b/Example/Pods/RxSwift/RxSwift/Observables/Amb.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift b/Example/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/AsSingle.swift b/Example/Pods/RxSwift/RxSwift/Observables/AsSingle.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Buffer.swift b/Example/Pods/RxSwift/RxSwift/Observables/Buffer.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Catch.swift b/Example/Pods/RxSwift/RxSwift/Observables/Catch.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift b/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift b/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift b/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/CompactMap.swift b/Example/Pods/RxSwift/RxSwift/Observables/CompactMap.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Concat.swift b/Example/Pods/RxSwift/RxSwift/Observables/Concat.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Create.swift b/Example/Pods/RxSwift/RxSwift/Observables/Create.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Debounce.swift b/Example/Pods/RxSwift/RxSwift/Observables/Debounce.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Debug.swift b/Example/Pods/RxSwift/RxSwift/Observables/Debug.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift b/Example/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Deferred.swift b/Example/Pods/RxSwift/RxSwift/Observables/Deferred.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Delay.swift b/Example/Pods/RxSwift/RxSwift/Observables/Delay.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift b/Example/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift b/Example/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift b/Example/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Do.swift b/Example/Pods/RxSwift/RxSwift/Observables/Do.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/ElementAt.swift b/Example/Pods/RxSwift/RxSwift/Observables/ElementAt.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Empty.swift b/Example/Pods/RxSwift/RxSwift/Observables/Empty.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Enumerated.swift b/Example/Pods/RxSwift/RxSwift/Observables/Enumerated.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Error.swift b/Example/Pods/RxSwift/RxSwift/Observables/Error.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Filter.swift b/Example/Pods/RxSwift/RxSwift/Observables/Filter.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/First.swift b/Example/Pods/RxSwift/RxSwift/Observables/First.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Generate.swift b/Example/Pods/RxSwift/RxSwift/Observables/Generate.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/GroupBy.swift b/Example/Pods/RxSwift/RxSwift/Observables/GroupBy.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Just.swift b/Example/Pods/RxSwift/RxSwift/Observables/Just.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Map.swift b/Example/Pods/RxSwift/RxSwift/Observables/Map.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Materialize.swift b/Example/Pods/RxSwift/RxSwift/Observables/Materialize.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Merge.swift b/Example/Pods/RxSwift/RxSwift/Observables/Merge.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Multicast.swift b/Example/Pods/RxSwift/RxSwift/Observables/Multicast.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Never.swift b/Example/Pods/RxSwift/RxSwift/Observables/Never.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift b/Example/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Optional.swift b/Example/Pods/RxSwift/RxSwift/Observables/Optional.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Producer.swift b/Example/Pods/RxSwift/RxSwift/Observables/Producer.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Range.swift b/Example/Pods/RxSwift/RxSwift/Observables/Range.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Reduce.swift b/Example/Pods/RxSwift/RxSwift/Observables/Reduce.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Repeat.swift b/Example/Pods/RxSwift/RxSwift/Observables/Repeat.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift b/Example/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Sample.swift b/Example/Pods/RxSwift/RxSwift/Observables/Sample.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Scan.swift b/Example/Pods/RxSwift/RxSwift/Observables/Scan.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Sequence.swift b/Example/Pods/RxSwift/RxSwift/Observables/Sequence.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift b/Example/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift b/Example/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Sink.swift b/Example/Pods/RxSwift/RxSwift/Observables/Sink.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Skip.swift b/Example/Pods/RxSwift/RxSwift/Observables/Skip.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift b/Example/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift b/Example/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/StartWith.swift b/Example/Pods/RxSwift/RxSwift/Observables/StartWith.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift b/Example/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Switch.swift b/Example/Pods/RxSwift/RxSwift/Observables/Switch.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift b/Example/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Take.swift b/Example/Pods/RxSwift/RxSwift/Observables/Take.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/TakeLast.swift b/Example/Pods/RxSwift/RxSwift/Observables/TakeLast.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift b/Example/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift b/Example/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Throttle.swift b/Example/Pods/RxSwift/RxSwift/Observables/Throttle.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Timeout.swift b/Example/Pods/RxSwift/RxSwift/Observables/Timeout.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Timer.swift b/Example/Pods/RxSwift/RxSwift/Observables/Timer.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/ToArray.swift b/Example/Pods/RxSwift/RxSwift/Observables/ToArray.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Using.swift b/Example/Pods/RxSwift/RxSwift/Observables/Using.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Window.swift b/Example/Pods/RxSwift/RxSwift/Observables/Window.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift b/Example/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift b/Example/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift b/Example/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Zip.swift b/Example/Pods/RxSwift/RxSwift/Observables/Zip.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/ObserverType.swift b/Example/Pods/RxSwift/RxSwift/ObserverType.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift b/Example/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift b/Example/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift b/Example/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Reactive.swift b/Example/Pods/RxSwift/RxSwift/Reactive.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Rx.swift b/Example/Pods/RxSwift/RxSwift/Rx.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/RxMutableBox.swift b/Example/Pods/RxSwift/RxSwift/RxMutableBox.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/SchedulerType.swift b/Example/Pods/RxSwift/RxSwift/SchedulerType.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Subjects/AsyncSubject.swift b/Example/Pods/RxSwift/RxSwift/Subjects/AsyncSubject.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Subjects/BehaviorSubject.swift b/Example/Pods/RxSwift/RxSwift/Subjects/BehaviorSubject.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Subjects/PublishSubject.swift b/Example/Pods/RxSwift/RxSwift/Subjects/PublishSubject.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Subjects/ReplaySubject.swift b/Example/Pods/RxSwift/RxSwift/Subjects/ReplaySubject.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift b/Example/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/SwiftSupport/SwiftSupport.swift b/Example/Pods/RxSwift/RxSwift/SwiftSupport/SwiftSupport.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Traits/Completable+AndThen.swift b/Example/Pods/RxSwift/RxSwift/Traits/Completable+AndThen.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Traits/Completable.swift b/Example/Pods/RxSwift/RxSwift/Traits/Completable.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Traits/Maybe.swift b/Example/Pods/RxSwift/RxSwift/Traits/Maybe.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Traits/ObservableType+PrimitiveSequence.swift b/Example/Pods/RxSwift/RxSwift/Traits/ObservableType+PrimitiveSequence.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence+Zip+arity.swift b/Example/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence+Zip+arity.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence.swift b/Example/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/RxSwift/RxSwift/Traits/Single.swift b/Example/Pods/RxSwift/RxSwift/Traits/Single.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/Storable/LICENSE b/Example/Pods/Storable/LICENSE old mode 100644 new mode 100755 diff --git a/Example/Pods/Storable/Storable/Classes/Expirable.swift b/Example/Pods/Storable/Storable/Classes/Expirable.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/Storable/Storable/Classes/Expiry.swift b/Example/Pods/Storable/Storable/Classes/Expiry.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/Storable/Storable/Classes/Storable.swift b/Example/Pods/Storable/Storable/Classes/Storable.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/Storable/Storable/Classes/StoringKey.swift b/Example/Pods/Storable/Storable/Classes/StoringKey.swift old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Alamofire/Alamofire-Info.plist b/Example/Pods/Target Support Files/Alamofire/Alamofire-Info.plist old mode 100644 new mode 100755 index b287f84..e2771ff --- a/Example/Pods/Target Support Files/Alamofire/Alamofire-Info.plist +++ b/Example/Pods/Target Support Files/Alamofire/Alamofire-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.8.2 + 5.0.0 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/Alamofire/Alamofire-dummy.m b/Example/Pods/Target Support Files/Alamofire/Alamofire-dummy.m old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch b/Example/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h b/Example/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Alamofire/Alamofire.modulemap b/Example/Pods/Target Support Files/Alamofire/Alamofire.modulemap old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig b/Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig old mode 100644 new mode 100755 index 12a1450..d95b883 --- a/Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig +++ b/Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig @@ -1,5 +1,6 @@ CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Alamofire GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_LDFLAGS = $(inherited) -framework "CFNetwork" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) diff --git a/Example/Pods/Target Support Files/CleanJSON/CleanJSON-Info.plist b/Example/Pods/Target Support Files/CleanJSON/CleanJSON-Info.plist old mode 100644 new mode 100755 index b8a90bb..2243fe6 --- a/Example/Pods/Target Support Files/CleanJSON/CleanJSON-Info.plist +++ b/Example/Pods/Target Support Files/CleanJSON/CleanJSON-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.9.3 + 1.0.0 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/CleanJSON/CleanJSON-dummy.m b/Example/Pods/Target Support Files/CleanJSON/CleanJSON-dummy.m old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/CleanJSON/CleanJSON-prefix.pch b/Example/Pods/Target Support Files/CleanJSON/CleanJSON-prefix.pch old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/CleanJSON/CleanJSON-umbrella.h b/Example/Pods/Target Support Files/CleanJSON/CleanJSON-umbrella.h old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/CleanJSON/CleanJSON.modulemap b/Example/Pods/Target Support Files/CleanJSON/CleanJSON.modulemap old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/CleanJSON/CleanJSON.xcconfig b/Example/Pods/Target Support Files/CleanJSON/CleanJSON.xcconfig old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Moya/Moya-Info.plist b/Example/Pods/Target Support Files/Moya/Moya-Info.plist old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Moya/Moya-dummy.m b/Example/Pods/Target Support Files/Moya/Moya-dummy.m old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Moya/Moya-prefix.pch b/Example/Pods/Target Support Files/Moya/Moya-prefix.pch old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Moya/Moya-umbrella.h b/Example/Pods/Target Support Files/Moya/Moya-umbrella.h old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Moya/Moya.modulemap b/Example/Pods/Target Support Files/Moya/Moya.modulemap old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Moya/Moya.xcconfig b/Example/Pods/Target Support Files/Moya/Moya.xcconfig old mode 100644 new mode 100755 index 79a4dbf..a88724c --- a/Example/Pods/Target Support Files/Moya/Moya.xcconfig +++ b/Example/Pods/Target Support Files/Moya/Moya.xcconfig @@ -1,5 +1,5 @@ CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Moya -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/Result" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 OTHER_LDFLAGS = $(inherited) -framework "Foundation" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Info.plist b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Info.plist old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-Info.plist b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-Info.plist old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.markdown old mode 100644 new mode 100755 index 02daaa1..3be78b8 --- a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.markdown +++ b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.markdown @@ -3,7 +3,7 @@ This application makes use of the following third party libraries: ## Alamofire -Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) +Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -72,30 +72,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -## Result - -The MIT License (MIT) - -Copyright (c) 2014 Rob Rix - -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. - ## RxNetwork Copyright (c) 2018 Pircate diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.plist old mode 100644 new mode 100755 index e5a2363..f516440 --- a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.plist +++ b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.plist @@ -14,7 +14,7 @@ FooterText - Copyright (c) 2014 Alamofire Software Foundation (http://alamofire.org/) + Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -101,36 +101,6 @@ SOFTWARE. Type PSGroupSpecifier - - FooterText - The MIT License (MIT) - -Copyright (c) 2014 Rob Rix - -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. - License - MIT - Title - Result - Type - PSGroupSpecifier - FooterText Copyright (c) 2018 Pircate <gao497868860@163.com> diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-dummy.m b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-dummy.m old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-frameworks.sh b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-frameworks.sh index d0001dc..aadcc9b 100755 --- a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-frameworks.sh +++ b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-frameworks.sh @@ -164,7 +164,6 @@ if [[ "$CONFIGURATION" == "Debug" ]]; then install_framework "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework" install_framework "${BUILT_PRODUCTS_DIR}/CleanJSON/CleanJSON.framework" install_framework "${BUILT_PRODUCTS_DIR}/Moya/Moya.framework" - install_framework "${BUILT_PRODUCTS_DIR}/Result/Result.framework" install_framework "${BUILT_PRODUCTS_DIR}/RxNetwork/RxNetwork.framework" install_framework "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework" install_framework "${BUILT_PRODUCTS_DIR}/Storable/Storable.framework" @@ -173,7 +172,6 @@ if [[ "$CONFIGURATION" == "Release" ]]; then install_framework "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework" install_framework "${BUILT_PRODUCTS_DIR}/CleanJSON/CleanJSON.framework" install_framework "${BUILT_PRODUCTS_DIR}/Moya/Moya.framework" - install_framework "${BUILT_PRODUCTS_DIR}/Result/Result.framework" install_framework "${BUILT_PRODUCTS_DIR}/RxNetwork/RxNetwork.framework" install_framework "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework" install_framework "${BUILT_PRODUCTS_DIR}/Storable/Storable.framework" diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-umbrella.h b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-umbrella.h old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.debug.xcconfig old mode 100644 new mode 100755 index 2b31ca8..c33e883 --- a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.debug.xcconfig @@ -1,9 +1,9 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/Result" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Storable" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Storable" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON/CleanJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Result/Result.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork/RxNetwork.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Storable/Storable.framework/Headers" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON/CleanJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork/RxNetwork.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Storable/Storable.framework/Headers" LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CleanJSON" -framework "Foundation" -framework "Moya" -framework "Result" -framework "RxNetwork" -framework "RxSwift" -framework "Storable" +OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CFNetwork" -framework "CleanJSON" -framework "Foundation" -framework "Moya" -framework "RxNetwork" -framework "RxSwift" -framework "Storable" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.modulemap b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.modulemap old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.release.xcconfig old mode 100644 new mode 100755 index 2b31ca8..c33e883 --- a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.release.xcconfig @@ -1,9 +1,9 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/Result" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Storable" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Storable" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON/CleanJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Result/Result.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork/RxNetwork.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Storable/Storable.framework/Headers" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON/CleanJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork/RxNetwork.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Storable/Storable.framework/Headers" LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CleanJSON" -framework "Foundation" -framework "Moya" -framework "Result" -framework "RxNetwork" -framework "RxSwift" -framework "Storable" +OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CFNetwork" -framework "CleanJSON" -framework "Foundation" -framework "Moya" -framework "RxNetwork" -framework "RxSwift" -framework "Storable" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Info.plist b/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Info.plist old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-Info.plist b/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-Info.plist old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-acknowledgements.markdown old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-acknowledgements.plist old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-dummy.m b/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-dummy.m old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-umbrella.h b/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-umbrella.h old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.debug.xcconfig b/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.debug.xcconfig old mode 100644 new mode 100755 index ce1cba6..a39ee46 --- a/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.debug.xcconfig @@ -1,7 +1,7 @@ -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/Result" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Storable" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Storable" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON/CleanJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Result/Result.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork/RxNetwork.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Storable/Storable.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CleanJSON" -framework "Foundation" -framework "Moya" -framework "Result" -framework "RxNetwork" -framework "RxSwift" -framework "Storable" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON/CleanJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork/RxNetwork.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Storable/Storable.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CFNetwork" -framework "CleanJSON" -framework "Foundation" -framework "Moya" -framework "RxNetwork" -framework "RxSwift" -framework "Storable" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.modulemap b/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.modulemap old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.release.xcconfig b/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.release.xcconfig old mode 100644 new mode 100755 index ce1cba6..a39ee46 --- a/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.release.xcconfig @@ -1,7 +1,7 @@ -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/Result" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Storable" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Storable" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON/CleanJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Result/Result.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork/RxNetwork.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Storable/Storable.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CleanJSON" -framework "Foundation" -framework "Moya" -framework "Result" -framework "RxNetwork" -framework "RxSwift" -framework "Storable" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON/CleanJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork/RxNetwork.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Storable/Storable.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CFNetwork" -framework "CleanJSON" -framework "Foundation" -framework "Moya" -framework "RxNetwork" -framework "RxSwift" -framework "Storable" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. diff --git a/Example/Pods/Target Support Files/Result/Result-Info.plist b/Example/Pods/Target Support Files/Result/Result-Info.plist deleted file mode 100644 index c26f36f..0000000 --- a/Example/Pods/Target Support Files/Result/Result-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 4.1.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Example/Pods/Target Support Files/Result/Result-dummy.m b/Example/Pods/Target Support Files/Result/Result-dummy.m deleted file mode 100644 index ba47f61..0000000 --- a/Example/Pods/Target Support Files/Result/Result-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Result : NSObject -@end -@implementation PodsDummy_Result -@end diff --git a/Example/Pods/Target Support Files/Result/Result-prefix.pch b/Example/Pods/Target Support Files/Result/Result-prefix.pch deleted file mode 100644 index beb2a24..0000000 --- a/Example/Pods/Target Support Files/Result/Result-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Example/Pods/Target Support Files/Result/Result-umbrella.h b/Example/Pods/Target Support Files/Result/Result-umbrella.h deleted file mode 100644 index 25f5eb1..0000000 --- a/Example/Pods/Target Support Files/Result/Result-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double ResultVersionNumber; -FOUNDATION_EXPORT const unsigned char ResultVersionString[]; - diff --git a/Example/Pods/Target Support Files/Result/Result.modulemap b/Example/Pods/Target Support Files/Result/Result.modulemap deleted file mode 100644 index c5e6a4a..0000000 --- a/Example/Pods/Target Support Files/Result/Result.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Result { - umbrella header "Result-umbrella.h" - - export * - module * { export * } -} diff --git a/Example/Pods/Target Support Files/Result/Result.xcconfig b/Example/Pods/Target Support Files/Result/Result.xcconfig deleted file mode 100644 index 4ca6b3d..0000000 --- a/Example/Pods/Target Support Files/Result/Result.xcconfig +++ /dev/null @@ -1,9 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Result -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Result -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/Example/Pods/Target Support Files/RxNetwork/Info.plist b/Example/Pods/Target Support Files/RxNetwork/Info.plist old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/RxNetwork/RxNetwork-Info.plist b/Example/Pods/Target Support Files/RxNetwork/RxNetwork-Info.plist old mode 100644 new mode 100755 index 2243fe6..3c175b6 --- a/Example/Pods/Target Support Files/RxNetwork/RxNetwork-Info.plist +++ b/Example/Pods/Target Support Files/RxNetwork/RxNetwork-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.0 + 1.0.1 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/RxNetwork/RxNetwork-dummy.m b/Example/Pods/Target Support Files/RxNetwork/RxNetwork-dummy.m old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/RxNetwork/RxNetwork-prefix.pch b/Example/Pods/Target Support Files/RxNetwork/RxNetwork-prefix.pch old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/RxNetwork/RxNetwork-umbrella.h b/Example/Pods/Target Support Files/RxNetwork/RxNetwork-umbrella.h old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/RxNetwork/RxNetwork.modulemap b/Example/Pods/Target Support Files/RxNetwork/RxNetwork.modulemap old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/RxNetwork/RxNetwork.xcconfig b/Example/Pods/Target Support Files/RxNetwork/RxNetwork.xcconfig old mode 100644 new mode 100755 index 694d8d7..33f312f --- a/Example/Pods/Target Support Files/RxNetwork/RxNetwork.xcconfig +++ b/Example/Pods/Target Support Files/RxNetwork/RxNetwork.xcconfig @@ -1,5 +1,5 @@ CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/Result" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Storable" +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Storable" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} diff --git a/Example/Pods/Target Support Files/RxSwift/RxSwift-Info.plist b/Example/Pods/Target Support Files/RxSwift/RxSwift-Info.plist old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/RxSwift/RxSwift-dummy.m b/Example/Pods/Target Support Files/RxSwift/RxSwift-dummy.m old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/RxSwift/RxSwift-prefix.pch b/Example/Pods/Target Support Files/RxSwift/RxSwift-prefix.pch old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/RxSwift/RxSwift-umbrella.h b/Example/Pods/Target Support Files/RxSwift/RxSwift-umbrella.h old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/RxSwift/RxSwift.modulemap b/Example/Pods/Target Support Files/RxSwift/RxSwift.modulemap old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/RxSwift/RxSwift.xcconfig b/Example/Pods/Target Support Files/RxSwift/RxSwift.xcconfig old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Storable/Storable-Info.plist b/Example/Pods/Target Support Files/Storable/Storable-Info.plist old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Storable/Storable-dummy.m b/Example/Pods/Target Support Files/Storable/Storable-dummy.m old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Storable/Storable-prefix.pch b/Example/Pods/Target Support Files/Storable/Storable-prefix.pch old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Storable/Storable-umbrella.h b/Example/Pods/Target Support Files/Storable/Storable-umbrella.h old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Storable/Storable.modulemap b/Example/Pods/Target Support Files/Storable/Storable.modulemap old mode 100644 new mode 100755 diff --git a/Example/Pods/Target Support Files/Storable/Storable.xcconfig b/Example/Pods/Target Support Files/Storable/Storable.xcconfig old mode 100644 new mode 100755 diff --git a/Example/RxNetwork.xcodeproj/project.pbxproj b/Example/RxNetwork.xcodeproj/project.pbxproj old mode 100644 new mode 100755 diff --git a/Example/RxNetwork.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/RxNetwork.xcodeproj/project.xcworkspace/contents.xcworkspacedata old mode 100644 new mode 100755 diff --git a/Example/RxNetwork.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/RxNetwork-Example.xcscheme b/Example/RxNetwork.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/RxNetwork-Example.xcscheme old mode 100644 new mode 100755 diff --git a/Example/RxNetwork.xcworkspace/contents.xcworkspacedata b/Example/RxNetwork.xcworkspace/contents.xcworkspacedata old mode 100644 new mode 100755 diff --git a/Example/RxNetwork.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/RxNetwork.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Example/RxNetwork.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/RxNetwork/AppDelegate.swift b/Example/RxNetwork/AppDelegate.swift old mode 100644 new mode 100755 index 0fb0b2b..ef6f42e --- a/Example/RxNetwork/AppDelegate.swift +++ b/Example/RxNetwork/AppDelegate.swift @@ -15,32 +15,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. + window = UIWindow(frame: UIScreen.main.bounds) + window?.backgroundColor = UIColor.white + + let vc = UINavigationController(rootViewController: ViewController()) + window?.rootViewController = vc + + window?.makeKeyAndVisible() return true } - - func applicationWillResignActive(_ application: UIApplication) { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. - } - - func applicationDidEnterBackground(_ application: UIApplication) { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - } - - func applicationWillEnterForeground(_ application: UIApplication) { - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. - } - - func applicationDidBecomeActive(_ application: UIApplication) { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - } - - func applicationWillTerminate(_ application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - } - - } diff --git a/Example/RxNetwork/BannerAPI.swift b/Example/RxNetwork/BannerAPI.swift old mode 100644 new mode 100755 diff --git a/Example/RxNetwork/BannerModel.swift b/Example/RxNetwork/BannerModel.swift old mode 100644 new mode 100755 index 0206601..7df0a89 --- a/Example/RxNetwork/BannerModel.swift +++ b/Example/RxNetwork/BannerModel.swift @@ -8,7 +8,17 @@ import Foundation +enum StoryType: Int, Codable, MyCaseDefaultable { + static var defaultCase: StoryType = .east + + case east = 0 + case sourth + case west + case north +} + struct BannerModel: Codable { let name: String - let id: String + let id: Int + let noKey: Int } diff --git a/Example/RxNetwork/Base.lproj/LaunchScreen.xib b/Example/RxNetwork/Base.lproj/LaunchScreen.xib old mode 100644 new mode 100755 diff --git a/Example/RxNetwork/Base.lproj/Main.storyboard b/Example/RxNetwork/Base.lproj/Main.storyboard old mode 100644 new mode 100755 diff --git a/Example/RxNetwork/CleanJSON.swift b/Example/RxNetwork/CleanJSON.swift old mode 100644 new mode 100755 diff --git a/Example/RxNetwork/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/RxNetwork/Images.xcassets/AppIcon.appiconset/Contents.json old mode 100644 new mode 100755 diff --git a/Example/RxNetwork/Info.plist b/Example/RxNetwork/Info.plist old mode 100644 new mode 100755 diff --git a/Example/RxNetwork/Network+Cache.swift b/Example/RxNetwork/Network+Cache.swift old mode 100644 new mode 100755 diff --git a/Example/RxNetwork/Network+Demo.swift b/Example/RxNetwork/Network+Demo.swift old mode 100644 new mode 100755 diff --git a/Example/RxNetwork/OnCache+Demo.swift b/Example/RxNetwork/OnCache+Demo.swift old mode 100644 new mode 100755 index 95d8188..1a00ca3 --- a/Example/RxNetwork/OnCache+Demo.swift +++ b/Example/RxNetwork/OnCache+Demo.swift @@ -8,13 +8,14 @@ import RxSwift import RxNetwork +import CleanJSON extension OnCache { public func requestObject() -> Single { return target.request() .storeCachedResponse(for: target) - .map(Network.Response.self) + .map(Network.Response.self, using: CleanJSONDecoder()) .map { if $0.success { return $0.data } throw Network.Error.status(code: $0.code, message: $0.message) diff --git a/Example/RxNetwork/Response+Demo.swift b/Example/RxNetwork/Response+Demo.swift old mode 100644 new mode 100755 index 371df2a..5fa9cca --- a/Example/RxNetwork/Response+Demo.swift +++ b/Example/RxNetwork/Response+Demo.swift @@ -18,6 +18,11 @@ public extension Response { throw Network.Error.status(code: response.code, message: response.message) } + func mapRawObject(_ type: T.Type, atKeyPath: String? = nil) throws -> T { + let model = try map(type, atKeyPath: atKeyPath, using: CleanJSONDecoder(), failsOnEmptyData: true) + return model + } + func mapCode() throws -> Int { return try map(Int.self, atKeyPath: "code") } diff --git a/Example/RxNetwork/RxNetwork+Demo.swift b/Example/RxNetwork/RxNetwork+Demo.swift old mode 100644 new mode 100755 index ca030a3..50c7321 --- a/Example/RxNetwork/RxNetwork+Demo.swift +++ b/Example/RxNetwork/RxNetwork+Demo.swift @@ -9,16 +9,26 @@ import Moya import RxSwift +// MARK: - 不缓存的请求用 public extension PrimitiveSequence where Trait == SingleTrait, Element == Response { func mapObject(_ type: T.Type) -> Single { return map { try $0.mapObject(type) } } + + func mapRawObject(_ type: T.Type, atKeyPath: String? = nil) -> Single { + return map { try $0.mapRawObject(type, atKeyPath: atKeyPath) } + } } +// MARK: - 需要缓存的请求用 public extension ObservableType where Element == Response { func mapObject(_ type: T.Type) -> Observable { return map { try $0.mapObject(type) } } + + func mapRawObject(_ type: T.Type, atKeyPath: String? = nil) -> Observable { + return map { try $0.mapRawObject(type, atKeyPath: atKeyPath) } + } } diff --git a/Example/RxNetwork/StoryAPI.swift b/Example/RxNetwork/StoryAPI.swift old mode 100644 new mode 100755 diff --git a/Example/RxNetwork/StoryModel.swift b/Example/RxNetwork/StoryModel.swift old mode 100644 new mode 100755 index 4527888..c93a5b8 --- a/Example/RxNetwork/StoryModel.swift +++ b/Example/RxNetwork/StoryModel.swift @@ -7,17 +7,33 @@ // import Foundation +import CleanJSON + +typealias MyCaseDefaultable = CaseDefaultable + +enum StoryItemType: Int, Codable, MyCaseDefaultable { + static var defaultCase: StoryItemType = .east + + case sourth = 0 + case east + case west + case north +} struct StoryListModel: Codable { let topStories: [StoryItemModel] + let stories: [StoryItemModel] enum CodingKeys: String, CodingKey { case topStories = "top_stories" + ,stories } } struct StoryItemModel: Codable { - let id: String + let id: Int let title: String let image: String + let type: StoryItemType + let noKey: Int } diff --git a/Example/RxNetwork/ViewController.swift b/Example/RxNetwork/ViewController.swift old mode 100644 new mode 100755 index b9e94f6..4e7833d --- a/Example/RxNetwork/ViewController.swift +++ b/Example/RxNetwork/ViewController.swift @@ -13,27 +13,89 @@ import Moya import Alamofire import CleanJSON -protocol Retryable { - var retry: Bool { get } +//protocol Retryable { +// var retry: Bool { get } +//} + +enum DataType { + case storyAPI + case storyAPICache + case storiAPICleanJSON + case storyAPIMapJSON + + case bannerAPI + case bannerAPICache + case bannerAPIMapObject + case bannerAPIMapJSON + case bannerAPIOriginalModel + case bannerAPIOriginalModelKeyPath +} + +struct DataModel { + let type: DataType + let title: String } class ViewController: UIViewController { - - private lazy var startButton: UIButton = { - let button = UIButton(type: .custom) - button.frame = CGRect(x: 0, y: 0, width: 80, height: 30) - button.center = view.center - button.backgroundColor = UIColor.blue - button.setTitle("Start", for: .normal) - button.addTarget(self, action: #selector(startButtonAction), for: .touchUpInside) - return button - }() - + // MARK: - Property private let disposeBag = DisposeBag() - + private let datas = [ + DataModel(type: .storyAPI, title: "无缓存: StoryAPI.latest"), + DataModel(type: .storyAPICache, title: "有缓存:StoryAPI.latest"), + DataModel(type: .storiAPICleanJSON, title: "StoryAPI: CleanJSON"), + DataModel(type: .storyAPIMapJSON, title: "storyAPI: MapJSON"), + + DataModel(type: .bannerAPI, title: "bannerAPI: 无缓存"), + DataModel(type: .bannerAPICache, title: "bannerAPI: 缓存"), + DataModel(type: .bannerAPIMapObject, title: "bannerAPI: MapObject"), + DataModel(type: .bannerAPIMapJSON, title: "bannerAPI: mapJSON"), + DataModel(type: .bannerAPIOriginalModel, title: "bannerAPI: OriginalModel"), + DataModel(type: .bannerAPIOriginalModelKeyPath, title: "bannerAPI: OriginalModelKeyPath"), + + ] + let cellID = "Cell" + + // MARK: - LifeCycle override func viewDidLoad() { super.viewDidLoad() + makeUI() + } + + + // MARK: - Action + + + // MARK: - Lazy + /// 懒加载tv + private lazy var tableView: UITableView = { + let tableView = UITableView(frame: .zero, style: .plain) + tableView.tableFooterView = UIView(frame: CGRect(origin: .zero, size: CGSize(width: 0, height: 0))) + tableView.dataSource = self + tableView.delegate = self + tableView.register(UITableViewCell.self, forCellReuseIdentifier: cellID) + + return tableView + }() +} + +// MARK: - Private Method +private extension ViewController { + func makeUI() { + navigationItem.title = "网络测试" + + view.addSubview(tableView) + + tableView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + tableView.topAnchor.constraint(equalTo: view.topAnchor, constant: UIApplication.shared.statusBarFrame.height + 44), + tableView.leftAnchor.constraint(equalTo: view.leftAnchor), + tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor), + tableView.rightAnchor.constraint(equalTo: view.rightAnchor) + ]) + } + + func configNetwork() { Network.Configuration.default.timeoutInterval = 20 Network.Configuration.default.plugins = [NetworkIndicatorPlugin()] Network.Configuration.default.replacingTask = { target in @@ -51,70 +113,128 @@ class ViewController: UIViewController { if target.path.contains("user") { return ["userId": "123456789"] } return [:] } - - view.addSubview(startButton) } +} - @objc private func startButtonAction() { - - // MARK: - request with cache - /* - { - "top_stories": [] - } - */ - StoryAPI.latest - .onCache(StoryListModel.self, using: CleanJSONDecoder(), { (model) in - debugPrint("onCache:", model.topStories.first?.title ?? "") - }) - .request() - .subscribe(onSuccess: { (model) in - debugPrint("onSuccess:", model.topStories.first?.title ?? "") - }) - .disposed(by: disposeBag) - - StoryAPI.latest - .cache - .request() - .map(StoryListModel.self, using: CleanJSONDecoder()) - .subscribe(onNext: { (model) in - - }).disposed(by: disposeBag) +extension ViewController: UITableViewDataSource, UITableViewDelegate { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return datas.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = tableView.dequeueReusableCell(withIdentifier: cellID, for: indexPath) - // or + cell.textLabel?.text = datas[indexPath.row].title - /* - { - "code": 2000, - "message": "Ok", - "result": [] - } - */ - BannerAPI.test(count: 10) - .onCache([BannerModel].self, { (models) in - - }) - .requestObject() - .subscribe(onSuccess: { (models) in - - }) - .disposed(by: disposeBag) + return cell + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + tableView.deselectRow(at: indexPath, animated: true) - BannerAPI.test(count: 10) - .cache - .request() - .mapObject([BannerModel].self) - .subscribe(onNext: { (models) in - debugPrint("onNext:", models.first?.name ?? "") - }) + let data = datas[indexPath.row] + switch data.type { + case .storyAPI: + /* + { + "top_stories": [] + } + */ + StoryAPI.latest + .onCache(StoryListModel.self, using: CleanJSONDecoder(), { (model) in + debugPrint("onCache:", model) + }) + .request() + .subscribe(onSuccess: { (model) in + debugPrint("onSuccess:", model) + }) + .disposed(by: disposeBag) + + case .storyAPICache: + StoryAPI.latest + .cache + .request() + .map(StoryListModel.self, using: CleanJSONDecoder()) + .subscribe(onNext: { (model) in + debugPrint(model) + }).disposed(by: disposeBag) + + case .storiAPICleanJSON: + StoryAPI.latest.request() + .map(StoryListModel.self, using: CleanJSONDecoder()) + .subscribe(onSuccess: { (model) in + debugPrint(model) + }) .disposed(by: disposeBag) - - // MARK: - request without cache - BannerAPI.test(count: 10).request() - .mapObject([BannerModel].self) - .subscribe(onSuccess: { (models) in - debugPrint("without cache:", models.first?.name ?? "") - }).disposed(by: disposeBag) + + case .storyAPIMapJSON: + StoryAPI.latest.request() + .mapJSON() + .subscribe(onSuccess: { (json) in + debugPrint(json) + }) + .disposed(by: disposeBag) + + case .bannerAPI: + /* + { + "code": 2000, + "message": "Ok", + "result": [] + } + */ + BannerAPI.test(count: 10) + .onCache([BannerModel].self, atKeyPath: "result", { (models) in + debugPrint(models) + }) + .requestObject() + .subscribe(onSuccess: { (models) in + debugPrint(models) + }) + .disposed(by: disposeBag) + + case .bannerAPICache: + BannerAPI.test(count: 10) + .cache + .request() + .mapObject([BannerModel].self) + .subscribe(onNext: { (models) in + debugPrint("onNext:", models) + }) + .disposed(by: disposeBag) + + case .bannerAPIMapObject: + // 项目最外层已经处理 + BannerAPI.test(count: 10).request() + .mapObject([BannerModel].self) + .subscribe(onSuccess: { (models) in + debugPrint("without cache:", models) + }).disposed(by: disposeBag) + + case .bannerAPIMapJSON: + BannerAPI.test(count: 10).request() + .mapJSON() + .subscribe(onSuccess: { (json) in + debugPrint(json) + }).disposed(by: disposeBag) + + case .bannerAPIOriginalModel: + // 非约定接口,最外层结构和项目不一样 + StoryAPI.latest.request() + .mapRawObject(StoryListModel.self, atKeyPath: nil) + .subscribe(onSuccess: { (model) in + debugPrint(model) + }) + .disposed(by: disposeBag) + + case .bannerAPIOriginalModelKeyPath: + StoryAPI.latest.request() + .mapRawObject([StoryItemModel].self, atKeyPath: "top_stories") + .subscribe(onSuccess: { (models) in + debugPrint(models) + }) + .disposed(by: disposeBag) + + } } } - diff --git a/Example/Tests/Info.plist b/Example/Tests/Info.plist old mode 100644 new mode 100755 diff --git a/Example/Tests/Tests.swift b/Example/Tests/Tests.swift old mode 100644 new mode 100755 diff --git a/Example/build/Pods.build/Release-iphoneos/Alamofire.build/dgph b/Example/build/Pods.build/Release-iphoneos/Alamofire.build/dgph old mode 100644 new mode 100755 diff --git a/Example/build/Pods.build/Release-iphoneos/Cache.build/dgph b/Example/build/Pods.build/Release-iphoneos/Cache.build/dgph old mode 100644 new mode 100755 diff --git a/Example/build/Pods.build/Release-iphoneos/Moya.build/dgph b/Example/build/Pods.build/Release-iphoneos/Moya.build/dgph old mode 100644 new mode 100755 diff --git a/Example/build/Pods.build/Release-iphoneos/Result.build/dgph b/Example/build/Pods.build/Release-iphoneos/Result.build/dgph old mode 100644 new mode 100755 diff --git a/Example/build/Pods.build/Release-iphoneos/RxNetwork.build/dgph b/Example/build/Pods.build/Release-iphoneos/RxNetwork.build/dgph old mode 100644 new mode 100755 diff --git a/Example/build/Pods.build/Release-iphoneos/RxSwift.build/dgph b/Example/build/Pods.build/Release-iphoneos/RxSwift.build/dgph old mode 100644 new mode 100755 diff --git a/Gemfile b/Gemfile old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/RxNetwork.podspec b/RxNetwork.podspec old mode 100644 new mode 100755 index ebacc81..190d2bc --- a/RxNetwork.podspec +++ b/RxNetwork.podspec @@ -14,7 +14,7 @@ Pod::Spec.new do |s| s.subspec 'Core' do |ss| ss.source_files = 'RxNetwork/Classes/Core' - ss.dependency 'Moya/RxSwift', '14.0.0-alpha.1' + ss.dependency 'Moya/RxSwift', '14.0.0-beta2' end s.subspec 'Cacheable' do |ss| diff --git a/RxNetwork/Assets/.gitkeep b/RxNetwork/Assets/.gitkeep old mode 100644 new mode 100755 diff --git a/RxNetwork/Classes/.gitkeep b/RxNetwork/Classes/.gitkeep old mode 100644 new mode 100755 diff --git a/RxNetwork/Classes/Cacheable/CachingKey+Moya.swift b/RxNetwork/Classes/Cacheable/CachingKey+Moya.swift old mode 100644 new mode 100755 diff --git a/RxNetwork/Classes/Cacheable/Observable+Cache.swift b/RxNetwork/Classes/Cacheable/Observable+Cache.swift old mode 100644 new mode 100755 diff --git a/RxNetwork/Classes/Cacheable/OnCache.swift b/RxNetwork/Classes/Cacheable/OnCache.swift old mode 100644 new mode 100755 diff --git a/RxNetwork/Classes/Cacheable/Single+Cache.swift b/RxNetwork/Classes/Cacheable/Single+Cache.swift old mode 100644 new mode 100755 diff --git a/RxNetwork/Classes/Cacheable/TargetType+Cache.swift b/RxNetwork/Classes/Cacheable/TargetType+Cache.swift old mode 100644 new mode 100755 diff --git a/RxNetwork/Classes/Core/Configuration.swift b/RxNetwork/Classes/Core/Configuration.swift old mode 100644 new mode 100755 diff --git a/RxNetwork/Classes/Core/Network.swift b/RxNetwork/Classes/Core/Network.swift old mode 100644 new mode 100755 index a8bbae7..4d5eb48 --- a/RxNetwork/Classes/Core/Network.swift +++ b/RxNetwork/Classes/Core/Network.swift @@ -7,7 +7,6 @@ // import Moya -import Result open class Network { diff --git a/RxNetwork/Classes/Core/NetworkIndicatorPlugin.swift b/RxNetwork/Classes/Core/NetworkIndicatorPlugin.swift old mode 100644 new mode 100755 index 19318fc..b288388 --- a/RxNetwork/Classes/Core/NetworkIndicatorPlugin.swift +++ b/RxNetwork/Classes/Core/NetworkIndicatorPlugin.swift @@ -7,7 +7,6 @@ // import Moya -import Result public final class NetworkIndicatorPlugin: PluginType { diff --git a/RxNetwork/Classes/Core/TargetType+Rx.swift b/RxNetwork/Classes/Core/TargetType+Rx.swift old mode 100644 new mode 100755 diff --git a/fastlane/Fastfile b/fastlane/Fastfile old mode 100644 new mode 100755 From 34fc724a25f4baf1d6505e2186632259c17ca437 Mon Sep 17 00:00:00 2001 From: duke Date: Mon, 23 Sep 2019 11:14:36 +0800 Subject: [PATCH 2/7] pod file delete --- Example/Pods/Alamofire/LICENSE | 19 - Example/Pods/Alamofire/README.md | 202 -- Example/Pods/Alamofire/Source/AFError.swift | 833 ----- Example/Pods/Alamofire/Source/Alamofire.swift | 520 ---- .../Source/DispatchQueue+Alamofire.swift | 37 - .../Alamofire/Source/MultipartFormData.swift | 544 ---- .../Source/NetworkReachabilityManager.swift | 266 -- .../Pods/Alamofire/Source/Notifications.swift | 115 - .../Alamofire/Source/ParameterEncoding.swift | 314 -- Example/Pods/Alamofire/Source/Request.swift | 1453 --------- Example/Pods/Alamofire/Source/Response.swift | 399 --- .../Source/ResponseSerialization.swift | 779 ----- .../Alamofire/Source/SessionDelegate.swift | 305 -- .../Pods/Alamofire/Source/Validation.swift | 247 -- .../CleanJSON/Classes/CaseDefaultable.swift | 52 - .../CleanJSON/Classes/CleanDecoder.swift | 126 - .../CleanJSON/Classes/CleanJSONDecoder.swift | 75 - .../Classes/CleanJSONDecodingStorage.swift | 41 - .../CleanJSON/Classes/CleanJSONKey.swift | 38 - .../CleanJSONKeyedDecodingContainer.swift | 883 ------ .../CleanJSONUnkeyedDecodingContainer.swift | 496 --- .../Classes/DecodingError+CleanJSON.swift | 111 - .../CleanJSON/Classes/DecodingStrategy.swift | 61 - .../CleanJSON/Classes/Defaultable.swift | 122 - .../CleanJSON/Classes/JSONAdapter.swift | 302 -- .../CleanJSON/CleanJSON/Classes/ToJSON.swift | 22 - .../Classes/_CleanJSONDecoder+Decode.swift | 150 - ...Decoder+SingleValueDecodingContainer.swift | 218 -- .../Classes/_CleanJSONDecoder+Unbox.swift | 458 --- .../CleanJSON/Classes/_CleanJSONDecoder.swift | 101 - Example/Pods/CleanJSON/LICENSE | 19 - .../Local Podspecs/RxNetwork.podspec.json | 47 - Example/Pods/Manifest.lock | 43 - Example/Pods/Moya/License.md | 21 - Example/Pods/Moya/Readme.md | 328 -- .../Pods/Moya/Sources/Moya/AnyEncodable.swift | 14 - .../Pods/Moya/Sources/Moya/Cancellable.swift | 26 - Example/Pods/Moya/Sources/Moya/Endpoint.swift | 140 - Example/Pods/Moya/Sources/Moya/Image.swift | 10 - .../Moya/Sources/Moya/Moya+Alamofire.swift | 124 - .../Pods/Moya/Sources/Moya/MoyaError.swift | 102 - .../Sources/Moya/MoyaProvider+Defaults.swift | 34 - .../Sources/Moya/MoyaProvider+Internal.swift | 283 -- .../Pods/Moya/Sources/Moya/MoyaProvider.swift | 212 -- .../Pods/Moya/Sources/Moya/MultiTarget.swift | 54 - .../Moya/Sources/Moya/MultipartFormData.swift | 73 - Example/Pods/Moya/Sources/Moya/Plugin.swift | 49 - .../Moya/Plugins/AccessTokenPlugin.swift | 92 - .../Moya/Plugins/CredentialsPlugin.swift | 21 - .../Moya/Plugins/NetworkActivityPlugin.swift | 30 - .../Moya/Plugins/NetworkLoggerPlugin.swift | 232 -- Example/Pods/Moya/Sources/Moya/Response.swift | 192 -- .../Pods/Moya/Sources/Moya/TargetType.swift | 34 - Example/Pods/Moya/Sources/Moya/Task.swift | 41 - Example/Pods/Moya/Sources/Moya/URL+Moya.swift | 16 - .../Sources/Moya/URLRequest+Encoding.swift | 28 - .../Moya/Sources/Moya/ValidationType.swift | 47 - .../Moya/Sources/RxMoya/MoyaProvider+Rx.swift | 64 - .../Sources/RxMoya/Observable+Response.swift | 84 - .../Moya/Sources/RxMoya/Single+Response.swift | 55 - Example/Pods/Pods.xcodeproj/project.pbxproj | 2700 ----------------- .../contents.xcworkspacedata | 7 - .../xcshareddata/xcschemes/Alamofire.xcscheme | 80 - .../xcshareddata/xcschemes/Cache.xcscheme | 80 - .../xcshareddata/xcschemes/Moya.xcscheme | 80 - .../xcshareddata/xcschemes/Result.xcscheme | 80 - .../xcshareddata/xcschemes/RxNetwork.xcscheme | 80 - .../xcshareddata/xcschemes/RxSwift.xcscheme | 80 - .../xcschemes/Alamofire.xcscheme | 60 - .../xcschemes/CleanJSON.xcscheme | 60 - .../xcschemes/Moya.xcscheme | 60 - .../xcschemes/Pods-RxNetwork_Example.xcscheme | 71 - .../xcschemes/Pods-RxNetwork_Tests.xcscheme | 71 - .../xcschemes/Result.xcscheme | 60 - .../xcschemes/RxNetwork.xcscheme | 60 - .../xcschemes/RxSwift.xcscheme | 60 - .../xcschemes/Storable.xcscheme | 60 - Example/Pods/RxSwift/LICENSE.md | 9 - Example/Pods/RxSwift/Platform/AtomicInt.swift | 71 - .../RxSwift/Platform/DataStructures/Bag.swift | 181 -- .../DataStructures/InfiniteSequence.swift | 25 - .../DataStructures/PriorityQueue.swift | 111 - .../Platform/DataStructures/Queue.swift | 152 - .../Platform/DispatchQueue+Extensions.swift | 21 - .../RxSwift/Platform/Platform.Darwin.swift | 36 - .../RxSwift/Platform/Platform.Linux.swift | 32 - .../Pods/RxSwift/Platform/RecursiveLock.swift | 34 - Example/Pods/RxSwift/README.md | 232 -- .../Pods/RxSwift/RxSwift/AnyObserver.swift | 69 - Example/Pods/RxSwift/RxSwift/Cancelable.swift | 13 - .../RxSwift/Concurrency/AsyncLock.swift | 102 - .../RxSwift/RxSwift/Concurrency/Lock.swift | 36 - .../RxSwift/Concurrency/LockOwnerType.swift | 21 - .../Concurrency/SynchronizedDisposeType.swift | 18 - .../Concurrency/SynchronizedOnType.swift | 18 - .../SynchronizedUnsubscribeType.swift | 13 - .../RxSwift/ConnectableObservableType.swift | 19 - .../Pods/RxSwift/RxSwift/Date+Dispatch.swift | 65 - Example/Pods/RxSwift/RxSwift/Deprecated.swift | 581 ---- Example/Pods/RxSwift/RxSwift/Disposable.swift | 13 - .../Disposables/AnonymousDisposable.swift | 59 - .../Disposables/BinaryDisposable.swift | 53 - .../Disposables/BooleanDisposable.swift | 33 - .../Disposables/CompositeDisposable.swift | 151 - .../RxSwift/Disposables/Disposables.swift | 13 - .../RxSwift/Disposables/DisposeBag.swift | 114 - .../RxSwift/Disposables/DisposeBase.swift | 22 - .../RxSwift/Disposables/NopDisposable.swift | 32 - .../Disposables/RefCountDisposable.swift | 113 - .../Disposables/ScheduledDisposable.swift | 50 - .../Disposables/SerialDisposable.swift | 75 - .../SingleAssignmentDisposable.swift | 70 - .../Disposables/SubscriptionDisposable.swift | 21 - Example/Pods/RxSwift/RxSwift/Errors.swift | 52 - Example/Pods/RxSwift/RxSwift/Event.swift | 109 - .../RxSwift/RxSwift/Extensions/Bag+Rx.swift | 50 - .../RxSwift/Extensions/String+Rx.swift | 22 - .../RxSwift/RxSwift/GroupedObservable.swift | 35 - .../RxSwift/ImmediateSchedulerType.swift | 36 - Example/Pods/RxSwift/RxSwift/Observable.swift | 41 - .../RxSwift/ObservableConvertibleType.swift | 21 - .../RxSwift/ObservableType+Extensions.swift | 131 - .../Pods/RxSwift/RxSwift/ObservableType.swift | 47 - .../RxSwift/RxSwift/Observables/AddRef.swift | 44 - .../RxSwift/RxSwift/Observables/Amb.swift | 157 - .../RxSwift/RxSwift/Observables/AsMaybe.swift | 48 - .../RxSwift/Observables/AsSingle.swift | 51 - .../RxSwift/RxSwift/Observables/Buffer.swift | 138 - .../RxSwift/RxSwift/Observables/Catch.swift | 235 -- .../CombineLatest+Collection.swift | 166 - .../Observables/CombineLatest+arity.swift | 843 ----- .../RxSwift/Observables/CombineLatest.swift | 131 - .../RxSwift/Observables/CompactMap.swift | 82 - .../RxSwift/RxSwift/Observables/Concat.swift | 131 - .../RxSwift/RxSwift/Observables/Create.swift | 78 - .../RxSwift/Observables/Debounce.swift | 118 - .../RxSwift/RxSwift/Observables/Debug.swift | 103 - .../RxSwift/Observables/DefaultIfEmpty.swift | 66 - .../RxSwift/Observables/Deferred.swift | 75 - .../RxSwift/RxSwift/Observables/Delay.swift | 176 -- .../Observables/DelaySubscription.swift | 58 - .../RxSwift/Observables/Dematerialize.swift | 51 - .../Observables/DistinctUntilChanged.swift | 125 - .../Pods/RxSwift/RxSwift/Observables/Do.swift | 112 - .../RxSwift/Observables/ElementAt.swift | 92 - .../RxSwift/RxSwift/Observables/Empty.swift | 27 - .../RxSwift/Observables/Enumerated.swift | 61 - .../RxSwift/RxSwift/Observables/Error.swift | 33 - .../RxSwift/RxSwift/Observables/Filter.swift | 90 - .../RxSwift/RxSwift/Observables/First.swift | 41 - .../RxSwift/Observables/Generate.swift | 87 - .../RxSwift/RxSwift/Observables/GroupBy.swift | 133 - .../RxSwift/RxSwift/Observables/Just.swift | 87 - .../RxSwift/RxSwift/Observables/Map.swift | 108 - .../RxSwift/Observables/Materialize.swift | 44 - .../RxSwift/RxSwift/Observables/Merge.swift | 598 ---- .../RxSwift/Observables/Multicast.swift | 409 --- .../RxSwift/RxSwift/Observables/Never.swift | 27 - .../RxSwift/Observables/ObserveOn.swift | 231 -- .../RxSwift/Observables/Optional.swift | 95 - .../RxSwift/Observables/Producer.swift | 92 - .../RxSwift/RxSwift/Observables/Range.swift | 73 - .../RxSwift/RxSwift/Observables/Reduce.swift | 109 - .../RxSwift/RxSwift/Observables/Repeat.swift | 57 - .../RxSwift/Observables/RetryWhen.swift | 182 -- .../RxSwift/RxSwift/Observables/Sample.swift | 133 - .../RxSwift/RxSwift/Observables/Scan.swift | 100 - .../RxSwift/Observables/Sequence.swift | 89 - .../Observables/ShareReplayScope.swift | 456 --- .../RxSwift/Observables/SingleAsync.swift | 104 - .../RxSwift/RxSwift/Observables/Sink.swift | 75 - .../RxSwift/RxSwift/Observables/Skip.swift | 158 - .../RxSwift/Observables/SkipUntil.swift | 139 - .../RxSwift/Observables/SkipWhile.swift | 75 - .../RxSwift/Observables/StartWith.swift | 42 - .../RxSwift/Observables/SubscribeOn.swift | 83 - .../RxSwift/RxSwift/Observables/Switch.swift | 234 -- .../RxSwift/Observables/SwitchIfEmpty.swift | 104 - .../RxSwift/RxSwift/Observables/Take.swift | 179 -- .../RxSwift/Observables/TakeLast.swift | 78 - .../RxSwift/Observables/TakeUntil.swift | 227 -- .../RxSwift/Observables/TakeWhile.swift | 85 - .../RxSwift/Observables/Throttle.swift | 159 - .../RxSwift/RxSwift/Observables/Timeout.swift | 151 - .../RxSwift/RxSwift/Observables/Timer.swift | 116 - .../RxSwift/RxSwift/Observables/ToArray.swift | 66 - .../RxSwift/RxSwift/Observables/Using.swift | 90 - .../RxSwift/RxSwift/Observables/Window.swift | 168 - .../RxSwift/Observables/WithLatestFrom.swift | 149 - .../RxSwift/Observables/Zip+Collection.swift | 169 -- .../RxSwift/Observables/Zip+arity.swift | 934 ------ .../RxSwift/RxSwift/Observables/Zip.swift | 136 - .../Pods/RxSwift/RxSwift/ObserverType.swift | 43 - .../RxSwift/Observers/AnonymousObserver.swift | 30 - .../RxSwift/Observers/ObserverBase.swift | 32 - .../RxSwift/Observers/TailRecursiveSink.swift | 151 - Example/Pods/RxSwift/RxSwift/Reactive.swift | 77 - Example/Pods/RxSwift/RxSwift/Rx.swift | 141 - .../Pods/RxSwift/RxSwift/RxMutableBox.swift | 53 - .../Pods/RxSwift/RxSwift/SchedulerType.swift | 71 - .../ConcurrentDispatchQueueScheduler.swift | 84 - .../Schedulers/ConcurrentMainScheduler.swift | 88 - .../Schedulers/CurrentThreadScheduler.swift | 138 - .../Schedulers/HistoricalScheduler.swift | 22 - .../HistoricalSchedulerTimeConverter.swift | 67 - .../Internal/DispatchQueueConfiguration.swift | 97 - .../Internal/InvocableScheduledItem.swift | 22 - .../Schedulers/Internal/InvocableType.swift | 17 - .../Schedulers/Internal/ScheduledItem.swift | 35 - .../Internal/ScheduledItemType.swift | 13 - .../RxSwift/Schedulers/MainScheduler.swift | 80 - .../Schedulers/OperationQueueScheduler.swift | 56 - .../Schedulers/RecursiveScheduler.swift | 220 -- .../SchedulerServices+Emulation.swift | 61 - .../SerialDispatchQueueScheduler.swift | 132 - .../Schedulers/VirtualTimeConverterType.swift | 97 - .../Schedulers/VirtualTimeScheduler.swift | 269 -- .../RxSwift/Subjects/AsyncSubject.swift | 155 - .../RxSwift/Subjects/BehaviorSubject.swift | 166 - .../RxSwift/Subjects/PublishSubject.swift | 150 - .../RxSwift/Subjects/ReplaySubject.swift | 281 -- .../RxSwift/Subjects/SubjectType.swift | 24 - .../RxSwift/SwiftSupport/SwiftSupport.swift | 18 - .../RxSwift/Traits/Completable+AndThen.swift | 132 - .../RxSwift/RxSwift/Traits/Completable.swift | 268 -- .../Pods/RxSwift/RxSwift/Traits/Maybe.swift | 302 -- .../ObservableType+PrimitiveSequence.swift | 55 - .../Traits/PrimitiveSequence+Zip+arity.swift | 521 ---- .../RxSwift/Traits/PrimitiveSequence.swift | 266 -- .../Pods/RxSwift/RxSwift/Traits/Single.swift | 314 -- Example/Pods/Storable/LICENSE | 19 - .../Storable/Storable/Classes/Expirable.swift | 62 - .../Storable/Storable/Classes/Expiry.swift | 42 - .../Storable/Storable/Classes/Storable.swift | 41 - .../Storable/Classes/StoringKey.swift | 12 - .../Alamofire/Alamofire-Info.plist | 26 - .../Alamofire/Alamofire-dummy.m | 5 - .../Alamofire/Alamofire-prefix.pch | 12 - .../Alamofire/Alamofire-umbrella.h | 16 - .../Alamofire/Alamofire.modulemap | 6 - .../Alamofire/Alamofire.xcconfig | 10 - .../CleanJSON/CleanJSON-Info.plist | 26 - .../CleanJSON/CleanJSON-dummy.m | 5 - .../CleanJSON/CleanJSON-prefix.pch | 12 - .../CleanJSON/CleanJSON-umbrella.h | 16 - .../CleanJSON/CleanJSON.modulemap | 6 - .../CleanJSON/CleanJSON.xcconfig | 9 - .../Target Support Files/Moya/Moya-Info.plist | 26 - .../Target Support Files/Moya/Moya-dummy.m | 5 - .../Target Support Files/Moya/Moya-prefix.pch | 12 - .../Target Support Files/Moya/Moya-umbrella.h | 16 - .../Target Support Files/Moya/Moya.modulemap | 6 - .../Target Support Files/Moya/Moya.xcconfig | 11 - .../Pods-RxNetwork_Example/Info.plist | 26 - .../Pods-RxNetwork_Example-Info.plist | 26 - ...xNetwork_Example-acknowledgements.markdown | 132 - ...s-RxNetwork_Example-acknowledgements.plist | 194 -- .../Pods-RxNetwork_Example-dummy.m | 5 - .../Pods-RxNetwork_Example-frameworks.sh | 181 -- .../Pods-RxNetwork_Example-resources.sh | 118 - .../Pods-RxNetwork_Example-umbrella.h | 16 - .../Pods-RxNetwork_Example.debug.xcconfig | 11 - .../Pods-RxNetwork_Example.modulemap | 6 - .../Pods-RxNetwork_Example.release.xcconfig | 11 - .../Pods-RxNetwork_Tests/Info.plist | 26 - .../Pods-RxNetwork_Tests-Info.plist | 26 - ...-RxNetwork_Tests-acknowledgements.markdown | 3 - ...ods-RxNetwork_Tests-acknowledgements.plist | 29 - .../Pods-RxNetwork_Tests-dummy.m | 5 - .../Pods-RxNetwork_Tests-frameworks.sh | 146 - .../Pods-RxNetwork_Tests-resources.sh | 118 - .../Pods-RxNetwork_Tests-umbrella.h | 16 - .../Pods-RxNetwork_Tests.debug.xcconfig | 8 - .../Pods-RxNetwork_Tests.modulemap | 6 - .../Pods-RxNetwork_Tests.release.xcconfig | 8 - .../Target Support Files/RxNetwork/Info.plist | 26 - .../RxNetwork/RxNetwork-Info.plist | 26 - .../RxNetwork/RxNetwork-dummy.m | 5 - .../RxNetwork/RxNetwork-prefix.pch | 12 - .../RxNetwork/RxNetwork-umbrella.h | 16 - .../RxNetwork/RxNetwork.modulemap | 6 - .../RxNetwork/RxNetwork.xcconfig | 10 - .../RxSwift/RxSwift-Info.plist | 26 - .../RxSwift/RxSwift-dummy.m | 5 - .../RxSwift/RxSwift-prefix.pch | 12 - .../RxSwift/RxSwift-umbrella.h | 16 - .../RxSwift/RxSwift.modulemap | 6 - .../RxSwift/RxSwift.xcconfig | 9 - .../Storable/Storable-Info.plist | 26 - .../Storable/Storable-dummy.m | 5 - .../Storable/Storable-prefix.pch | 12 - .../Storable/Storable-umbrella.h | 16 - .../Storable/Storable.modulemap | 6 - .../Storable/Storable.xcconfig | 9 - 294 files changed, 35453 deletions(-) delete mode 100644 Example/Pods/Alamofire/LICENSE delete mode 100644 Example/Pods/Alamofire/README.md delete mode 100644 Example/Pods/Alamofire/Source/AFError.swift delete mode 100644 Example/Pods/Alamofire/Source/Alamofire.swift delete mode 100644 Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift delete mode 100644 Example/Pods/Alamofire/Source/MultipartFormData.swift delete mode 100644 Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift delete mode 100644 Example/Pods/Alamofire/Source/Notifications.swift delete mode 100644 Example/Pods/Alamofire/Source/ParameterEncoding.swift delete mode 100644 Example/Pods/Alamofire/Source/Request.swift delete mode 100644 Example/Pods/Alamofire/Source/Response.swift delete mode 100644 Example/Pods/Alamofire/Source/ResponseSerialization.swift delete mode 100644 Example/Pods/Alamofire/Source/SessionDelegate.swift delete mode 100644 Example/Pods/Alamofire/Source/Validation.swift delete mode 100644 Example/Pods/CleanJSON/CleanJSON/Classes/CaseDefaultable.swift delete mode 100644 Example/Pods/CleanJSON/CleanJSON/Classes/CleanDecoder.swift delete mode 100644 Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONDecoder.swift delete mode 100644 Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONDecodingStorage.swift delete mode 100644 Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONKey.swift delete mode 100644 Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONKeyedDecodingContainer.swift delete mode 100644 Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONUnkeyedDecodingContainer.swift delete mode 100644 Example/Pods/CleanJSON/CleanJSON/Classes/DecodingError+CleanJSON.swift delete mode 100644 Example/Pods/CleanJSON/CleanJSON/Classes/DecodingStrategy.swift delete mode 100644 Example/Pods/CleanJSON/CleanJSON/Classes/Defaultable.swift delete mode 100644 Example/Pods/CleanJSON/CleanJSON/Classes/JSONAdapter.swift delete mode 100644 Example/Pods/CleanJSON/CleanJSON/Classes/ToJSON.swift delete mode 100644 Example/Pods/CleanJSON/CleanJSON/Classes/_CleanJSONDecoder+Decode.swift delete mode 100644 Example/Pods/CleanJSON/CleanJSON/Classes/_CleanJSONDecoder+SingleValueDecodingContainer.swift delete mode 100644 Example/Pods/CleanJSON/CleanJSON/Classes/_CleanJSONDecoder+Unbox.swift delete mode 100644 Example/Pods/CleanJSON/CleanJSON/Classes/_CleanJSONDecoder.swift delete mode 100644 Example/Pods/CleanJSON/LICENSE delete mode 100755 Example/Pods/Local Podspecs/RxNetwork.podspec.json delete mode 100755 Example/Pods/Manifest.lock delete mode 100644 Example/Pods/Moya/License.md delete mode 100644 Example/Pods/Moya/Readme.md delete mode 100644 Example/Pods/Moya/Sources/Moya/AnyEncodable.swift delete mode 100644 Example/Pods/Moya/Sources/Moya/Cancellable.swift delete mode 100755 Example/Pods/Moya/Sources/Moya/Endpoint.swift delete mode 100644 Example/Pods/Moya/Sources/Moya/Image.swift delete mode 100644 Example/Pods/Moya/Sources/Moya/Moya+Alamofire.swift delete mode 100644 Example/Pods/Moya/Sources/Moya/MoyaError.swift delete mode 100644 Example/Pods/Moya/Sources/Moya/MoyaProvider+Defaults.swift delete mode 100644 Example/Pods/Moya/Sources/Moya/MoyaProvider+Internal.swift delete mode 100755 Example/Pods/Moya/Sources/Moya/MoyaProvider.swift delete mode 100644 Example/Pods/Moya/Sources/Moya/MultiTarget.swift delete mode 100644 Example/Pods/Moya/Sources/Moya/MultipartFormData.swift delete mode 100644 Example/Pods/Moya/Sources/Moya/Plugin.swift delete mode 100644 Example/Pods/Moya/Sources/Moya/Plugins/AccessTokenPlugin.swift delete mode 100644 Example/Pods/Moya/Sources/Moya/Plugins/CredentialsPlugin.swift delete mode 100644 Example/Pods/Moya/Sources/Moya/Plugins/NetworkActivityPlugin.swift delete mode 100644 Example/Pods/Moya/Sources/Moya/Plugins/NetworkLoggerPlugin.swift delete mode 100644 Example/Pods/Moya/Sources/Moya/Response.swift delete mode 100644 Example/Pods/Moya/Sources/Moya/TargetType.swift delete mode 100644 Example/Pods/Moya/Sources/Moya/Task.swift delete mode 100644 Example/Pods/Moya/Sources/Moya/URL+Moya.swift delete mode 100644 Example/Pods/Moya/Sources/Moya/URLRequest+Encoding.swift delete mode 100644 Example/Pods/Moya/Sources/Moya/ValidationType.swift delete mode 100644 Example/Pods/Moya/Sources/RxMoya/MoyaProvider+Rx.swift delete mode 100644 Example/Pods/Moya/Sources/RxMoya/Observable+Response.swift delete mode 100644 Example/Pods/Moya/Sources/RxMoya/Single+Response.swift delete mode 100644 Example/Pods/Pods.xcodeproj/project.pbxproj delete mode 100755 Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100755 Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Alamofire.xcscheme delete mode 100755 Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Cache.xcscheme delete mode 100755 Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Moya.xcscheme delete mode 100755 Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Result.xcscheme delete mode 100755 Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/RxNetwork.xcscheme delete mode 100755 Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/RxSwift.xcscheme delete mode 100755 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Alamofire.xcscheme delete mode 100755 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/CleanJSON.xcscheme delete mode 100755 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Moya.xcscheme delete mode 100755 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Example.xcscheme delete mode 100755 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Tests.xcscheme delete mode 100755 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Result.xcscheme delete mode 100755 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/RxNetwork.xcscheme delete mode 100755 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/RxSwift.xcscheme delete mode 100755 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Storable.xcscheme delete mode 100755 Example/Pods/RxSwift/LICENSE.md delete mode 100755 Example/Pods/RxSwift/Platform/AtomicInt.swift delete mode 100755 Example/Pods/RxSwift/Platform/DataStructures/Bag.swift delete mode 100755 Example/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift delete mode 100755 Example/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift delete mode 100755 Example/Pods/RxSwift/Platform/DataStructures/Queue.swift delete mode 100755 Example/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift delete mode 100755 Example/Pods/RxSwift/Platform/Platform.Darwin.swift delete mode 100755 Example/Pods/RxSwift/Platform/Platform.Linux.swift delete mode 100755 Example/Pods/RxSwift/Platform/RecursiveLock.swift delete mode 100755 Example/Pods/RxSwift/README.md delete mode 100755 Example/Pods/RxSwift/RxSwift/AnyObserver.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Cancelable.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Concurrency/Lock.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/ConnectableObservableType.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Date+Dispatch.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Deprecated.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Disposable.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Disposables/Disposables.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Errors.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Event.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/GroupedObservable.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observable.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/ObservableType.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/AddRef.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Amb.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/AsSingle.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Buffer.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Catch.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/CompactMap.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Concat.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Create.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Debounce.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Debug.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Deferred.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Delay.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Do.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/ElementAt.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Empty.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Enumerated.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Error.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Filter.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/First.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Generate.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/GroupBy.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Just.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Map.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Materialize.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Merge.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Multicast.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Never.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Optional.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Producer.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Range.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Reduce.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Repeat.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Sample.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Scan.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Sequence.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Sink.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Skip.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/StartWith.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Switch.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Take.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/TakeLast.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Throttle.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Timeout.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Timer.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/ToArray.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Using.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Window.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observables/Zip.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/ObserverType.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Reactive.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Rx.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/RxMutableBox.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/SchedulerType.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Subjects/AsyncSubject.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Subjects/BehaviorSubject.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Subjects/PublishSubject.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Subjects/ReplaySubject.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/SwiftSupport/SwiftSupport.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Traits/Completable+AndThen.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Traits/Completable.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Traits/Maybe.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Traits/ObservableType+PrimitiveSequence.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence+Zip+arity.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence.swift delete mode 100755 Example/Pods/RxSwift/RxSwift/Traits/Single.swift delete mode 100755 Example/Pods/Storable/LICENSE delete mode 100755 Example/Pods/Storable/Storable/Classes/Expirable.swift delete mode 100755 Example/Pods/Storable/Storable/Classes/Expiry.swift delete mode 100755 Example/Pods/Storable/Storable/Classes/Storable.swift delete mode 100755 Example/Pods/Storable/Storable/Classes/StoringKey.swift delete mode 100755 Example/Pods/Target Support Files/Alamofire/Alamofire-Info.plist delete mode 100755 Example/Pods/Target Support Files/Alamofire/Alamofire-dummy.m delete mode 100755 Example/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch delete mode 100755 Example/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h delete mode 100755 Example/Pods/Target Support Files/Alamofire/Alamofire.modulemap delete mode 100755 Example/Pods/Target Support Files/Alamofire/Alamofire.xcconfig delete mode 100755 Example/Pods/Target Support Files/CleanJSON/CleanJSON-Info.plist delete mode 100755 Example/Pods/Target Support Files/CleanJSON/CleanJSON-dummy.m delete mode 100755 Example/Pods/Target Support Files/CleanJSON/CleanJSON-prefix.pch delete mode 100755 Example/Pods/Target Support Files/CleanJSON/CleanJSON-umbrella.h delete mode 100755 Example/Pods/Target Support Files/CleanJSON/CleanJSON.modulemap delete mode 100755 Example/Pods/Target Support Files/CleanJSON/CleanJSON.xcconfig delete mode 100755 Example/Pods/Target Support Files/Moya/Moya-Info.plist delete mode 100755 Example/Pods/Target Support Files/Moya/Moya-dummy.m delete mode 100755 Example/Pods/Target Support Files/Moya/Moya-prefix.pch delete mode 100755 Example/Pods/Target Support Files/Moya/Moya-umbrella.h delete mode 100755 Example/Pods/Target Support Files/Moya/Moya.modulemap delete mode 100755 Example/Pods/Target Support Files/Moya/Moya.xcconfig delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Info.plist delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-Info.plist delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.markdown delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.plist delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-dummy.m delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-frameworks.sh delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-resources.sh delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-umbrella.h delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.debug.xcconfig delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.modulemap delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.release.xcconfig delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Info.plist delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-Info.plist delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-acknowledgements.markdown delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-acknowledgements.plist delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-dummy.m delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-frameworks.sh delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-resources.sh delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-umbrella.h delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.debug.xcconfig delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.modulemap delete mode 100755 Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.release.xcconfig delete mode 100755 Example/Pods/Target Support Files/RxNetwork/Info.plist delete mode 100755 Example/Pods/Target Support Files/RxNetwork/RxNetwork-Info.plist delete mode 100755 Example/Pods/Target Support Files/RxNetwork/RxNetwork-dummy.m delete mode 100755 Example/Pods/Target Support Files/RxNetwork/RxNetwork-prefix.pch delete mode 100755 Example/Pods/Target Support Files/RxNetwork/RxNetwork-umbrella.h delete mode 100755 Example/Pods/Target Support Files/RxNetwork/RxNetwork.modulemap delete mode 100755 Example/Pods/Target Support Files/RxNetwork/RxNetwork.xcconfig delete mode 100755 Example/Pods/Target Support Files/RxSwift/RxSwift-Info.plist delete mode 100755 Example/Pods/Target Support Files/RxSwift/RxSwift-dummy.m delete mode 100755 Example/Pods/Target Support Files/RxSwift/RxSwift-prefix.pch delete mode 100755 Example/Pods/Target Support Files/RxSwift/RxSwift-umbrella.h delete mode 100755 Example/Pods/Target Support Files/RxSwift/RxSwift.modulemap delete mode 100755 Example/Pods/Target Support Files/RxSwift/RxSwift.xcconfig delete mode 100755 Example/Pods/Target Support Files/Storable/Storable-Info.plist delete mode 100755 Example/Pods/Target Support Files/Storable/Storable-dummy.m delete mode 100755 Example/Pods/Target Support Files/Storable/Storable-prefix.pch delete mode 100755 Example/Pods/Target Support Files/Storable/Storable-umbrella.h delete mode 100755 Example/Pods/Target Support Files/Storable/Storable.modulemap delete mode 100755 Example/Pods/Target Support Files/Storable/Storable.xcconfig diff --git a/Example/Pods/Alamofire/LICENSE b/Example/Pods/Alamofire/LICENSE deleted file mode 100644 index 2ec3cb1..0000000 --- a/Example/Pods/Alamofire/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) - -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. diff --git a/Example/Pods/Alamofire/README.md b/Example/Pods/Alamofire/README.md deleted file mode 100644 index da7503f..0000000 --- a/Example/Pods/Alamofire/README.md +++ /dev/null @@ -1,202 +0,0 @@ -![Alamofire: Elegant Networking in Swift](https://raw.githubusercontent.com/Alamofire/Alamofire/master/alamofire.png) - -[![Build Status](https://travis-ci.org/Alamofire/Alamofire.svg?branch=master)](https://travis-ci.org/Alamofire/Alamofire) -[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Alamofire.svg)](https://img.shields.io/cocoapods/v/Alamofire.svg) -[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Platform](https://img.shields.io/cocoapods/p/Alamofire.svg?style=flat)](https://alamofire.github.io/Alamofire) -[![Twitter](https://img.shields.io/badge/twitter-@AlamofireSF-blue.svg?style=flat)](https://twitter.com/AlamofireSF) -[![Gitter](https://badges.gitter.im/Alamofire/Alamofire.svg)](https://gitter.im/Alamofire/Alamofire?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -[![Open Source Helpers](https://www.codetriage.com/alamofire/alamofire/badges/users.svg)](https://www.codetriage.com/alamofire/alamofire) - -Alamofire is an HTTP networking library written in Swift. - -**⚠️⚠️⚠️ WARNING ⚠️⚠️⚠️** This documentation is out of date during the Alamofire 5 beta process. - -- [Features](#features) -- [Component Libraries](#component-libraries) -- [Requirements](#requirements) -- [Migration Guides](#migration-guides) -- [Communication](#communication) -- [Installation](#installation) -- [Usage](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#using-alamofire) - - [**Introduction -**](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#introduction) [Making Requests](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#making-requests), [Response Handling](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-handling), [Response Validation](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-validation), [Response Caching](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-caching) - - **HTTP -** [HTTP Methods](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#http-methods), [Parameters and Parameter Encoder](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md##request-parameters-and-parameter-encoders), [HTTP Headers](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#http-headers), [Authentication](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#authentication) - - **Large Data -** [Downloading Data to a File](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#downloading-data-to-a-file), [Uploading Data to a Server](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#uploading-data-to-a-server) - - **Tools -** [Statistical Metrics](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#statistical-metrics), [cURL Command Output](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#curl-command-output) -- [Advanced Usage](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md) - - **URL Session -** [Session Manager](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#session-manager), [Session Delegate](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#session-delegate), [Request](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#request) - - **Routing -** [Routing Requests](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#routing-requests), [Adapting and Retrying Requests](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#adapting-and-retrying-requests) - - **Model Objects -** [Custom Response Serialization](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#custom-response-serialization) - - **Connection -** [Security](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#security), [Network Reachability](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#network-reachability) -- [Open Radars](#open-radars) -- [FAQ](#faq) -- [Credits](#credits) -- [Donations](#donations) -- [License](#license) - -## Features - -- [x] Chainable Request / Response Methods -- [x] URL / JSON / plist Parameter Encoding -- [x] Upload File / Data / Stream / MultipartFormData -- [x] Download File using Request or Resume Data -- [x] Authentication with URLCredential -- [x] HTTP Response Validation -- [x] Upload and Download Progress Closures with Progress -- [x] cURL Command Output -- [x] Dynamically Adapt and Retry Requests -- [x] TLS Certificate and Public Key Pinning -- [x] Network Reachability -- [x] Comprehensive Unit and Integration Test Coverage -- [x] [Complete Documentation](https://alamofire.github.io/Alamofire) - -## Component Libraries - -In order to keep Alamofire focused specifically on core networking implementations, additional component libraries have been created by the [Alamofire Software Foundation](https://github.com/Alamofire/Foundation) to bring additional functionality to the Alamofire ecosystem. - -- [AlamofireImage](https://github.com/Alamofire/AlamofireImage) - An image library including image response serializers, `UIImage` and `UIImageView` extensions, custom image filters, an auto-purging in-memory cache and a priority-based image downloading system. -- [AlamofireNetworkActivityIndicator](https://github.com/Alamofire/AlamofireNetworkActivityIndicator) - Controls the visibility of the network activity indicator on iOS using Alamofire. It contains configurable delay timers to help mitigate flicker and can support `URLSession` instances not managed by Alamofire. - -## Requirements - -- iOS 10.0+ / macOS 10.12+ / tvOS 10.0+ / watchOS 3.0+ -- Xcode 10.2+ -- Swift 5+ - -## Migration Guides - -- Alamofire 5.0 Migration Guide: To be written! -- [Alamofire 4.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%204.0%20Migration%20Guide.md) -- [Alamofire 3.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%203.0%20Migration%20Guide.md) -- [Alamofire 2.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%202.0%20Migration%20Guide.md) - -## Communication -- If you **need help with making network requests** using Alamofire, use [Stack Overflow](https://stackoverflow.com/questions/tagged/alamofire) and tag `alamofire`. -- If you need to **find or understand an API**, check [our documentation](http://alamofire.github.io/Alamofire/) or [Apple's documentation for `URLSession`](https://developer.apple.com/documentation/foundation/url_loading_system), on top of which Alamofire is built. -- If you need **help with an Alamofire feature**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire). -- If you'd like to **discuss Alamofire best practices**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire). -- If you'd like to **discuss a feature request**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire). -- If you **found a bug**, open an issue here on GitHub and follow the guide. The more detail the better! -- If you **want to contribute**, submit a pull request. - -## Installation - -### CocoaPods - -[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`: - -```ruby -pod 'Alamofire', '~> 5.0.0-rc.2' -``` - -### Carthage - -[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`: - -```ogdl -github "Alamofire/Alamofire" "5.0.0-rc.2" -``` - -### Swift Package Manager - -The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It is in early development, but Alamofire does support its use on supported platforms. - -Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`. - -```swift -dependencies: [ - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "5.0.0-rc.2") -] -``` - -### Manually - -If you prefer not to use any of the aforementioned dependency managers, you can integrate Alamofire into your project manually. - -#### Embedded Framework - -- Open up Terminal, `cd` into your top-level project directory, and run the following command "if" your project is not initialized as a git repository: - - ```bash - $ git init - ``` - -- Add Alamofire as a git [submodule](https://git-scm.com/docs/git-submodule) by running the following command: - - ```bash - $ git submodule add https://github.com/Alamofire/Alamofire.git - ``` - -- Open the new `Alamofire` folder, and drag the `Alamofire.xcodeproj` into the Project Navigator of your application's Xcode project. - - > It should appear nested underneath your application's blue project icon. Whether it is above or below all the other Xcode groups does not matter. - -- Select the `Alamofire.xcodeproj` in the Project Navigator and verify the deployment target matches that of your application target. -- Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar. -- In the tab bar at the top of that window, open the "General" panel. -- Click on the `+` button under the "Embedded Binaries" section. -- You will see two different `Alamofire.xcodeproj` folders each with two different versions of the `Alamofire.framework` nested inside a `Products` folder. - - > It does not matter which `Products` folder you choose from, but it does matter whether you choose the top or bottom `Alamofire.framework`. - -- Select the top `Alamofire.framework` for iOS and the bottom one for macOS. - - > You can verify which one you selected by inspecting the build log for your project. The build target for `Alamofire` will be listed as either `Alamofire iOS`, `Alamofire macOS`, `Alamofire tvOS` or `Alamofire watchOS`. - -- And that's it! - - > The `Alamofire.framework` is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device. - -## Open Radars - -The following radars have some effect on the current implementation of Alamofire. - -- [`rdar://21349340`](http://www.openradar.me/radar?id=5517037090635776) - Compiler throwing warning due to toll-free bridging issue in test case -- `rdar://26870455` - Background URL Session Configurations do not work in the simulator -- `rdar://26849668` - Some URLProtocol APIs do not properly handle `URLRequest` - -## Resolved Radars - -The following radars have been resolved over time after being filed against the Alamofire project. - -- [`rdar://26761490`](http://www.openradar.me/radar?id=5010235949318144) - Swift string interpolation causing memory leak with common usage. - - (Resolved): 9/1/17 in Xcode 9 beta 6. -- [`rdar://36082113`](http://openradar.appspot.com/radar?id=4942308441063424) - `URLSessionTaskMetrics` failing to link on watchOS 3.0+ - - (Resolved): Just add `CFNetwork` to your linked frameworks. - -## FAQ - -### What's the origin of the name Alamofire? - -Alamofire is named after the [Alamo Fire flower](https://aggie-horticulture.tamu.edu/wildseed/alamofire.html), a hybrid variant of the Bluebonnet, the official state flower of Texas. - -## Credits - -Alamofire is owned and maintained by the [Alamofire Software Foundation](http://alamofire.org). You can follow them on Twitter at [@AlamofireSF](https://twitter.com/AlamofireSF) for project updates and releases. - -### Security Disclosure - -If you believe you have identified a security vulnerability with Alamofire, you should report it as soon as possible via email to security@alamofire.org. Please do not post it to a public issue tracker. - -## Donations - -The [ASF](https://github.com/Alamofire/Foundation#members) is looking to raise money to officially stay registered as a federal non-profit organization. -Registering will allow us members to gain some legal protections and also allow us to put donations to use, tax free. -Donating to the ASF will enable us to: - -- Pay our yearly legal fees to keep the non-profit in good status -- Pay for our mail servers to help us stay on top of all questions and security issues -- Potentially fund test servers to make it easier for us to test the edge cases -- Potentially fund developers to work on one of our projects full-time - -The community adoption of the ASF libraries has been amazing. -We are greatly humbled by your enthusiasm around the projects, and want to continue to do everything we can to move the needle forward. -With your continued support, the ASF will be able to improve its reach and also provide better legal safety for the core members. -If you use any of our libraries for work, see if your employers would be interested in donating. -Any amount you can donate today to help us reach our goal would be greatly appreciated. - -[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W34WPEE74APJQ) - -## License - -Alamofire is released under the MIT license. [See LICENSE](https://github.com/Alamofire/Alamofire/blob/master/LICENSE) for details. diff --git a/Example/Pods/Alamofire/Source/AFError.swift b/Example/Pods/Alamofire/Source/AFError.swift deleted file mode 100644 index b8adbdc..0000000 --- a/Example/Pods/Alamofire/Source/AFError.swift +++ /dev/null @@ -1,833 +0,0 @@ -// -// AFError.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. -// - -import Foundation - -/// `AFError` is the error type returned by Alamofire. It encompasses a few different types of errors, each with -/// their own associated reasons. -public enum AFError: Error { - /// The underlying reason the `.multipartEncodingFailed` error occurred. - public enum MultipartEncodingFailureReason { - /// The `fileURL` provided for reading an encodable body part isn't a file `URL`. - case bodyPartURLInvalid(url: URL) - /// The filename of the `fileURL` provided has either an empty `lastPathComponent` or `pathExtension. - case bodyPartFilenameInvalid(in: URL) - /// The file at the `fileURL` provided was not reachable. - case bodyPartFileNotReachable(at: URL) - /// Attempting to check the reachability of the `fileURL` provided threw an error. - case bodyPartFileNotReachableWithError(atURL: URL, error: Error) - /// The file at the `fileURL` provided is actually a directory. - case bodyPartFileIsDirectory(at: URL) - /// The size of the file at the `fileURL` provided was not returned by the system. - case bodyPartFileSizeNotAvailable(at: URL) - /// The attempt to find the size of the file at the `fileURL` provided threw an error. - case bodyPartFileSizeQueryFailedWithError(forURL: URL, error: Error) - /// An `InputStream` could not be created for the provided `fileURL`. - case bodyPartInputStreamCreationFailed(for: URL) - /// An `OutputStream` could not be created when attempting to write the encoded data to disk. - case outputStreamCreationFailed(for: URL) - /// The encoded body data could not be written to disk because a file already exists at the provided `fileURL`. - case outputStreamFileAlreadyExists(at: URL) - /// The `fileURL` provided for writing the encoded body data to disk is not a file `URL`. - case outputStreamURLInvalid(url: URL) - /// The attempt to write the encoded body data to disk failed with an underlying error. - case outputStreamWriteFailed(error: Error) - /// The attempt to read an encoded body part `InputStream` failed with underlying system error. - case inputStreamReadFailed(error: Error) - } - - /// The underlying reason the `.parameterEncodingFailed` error occurred. - public enum ParameterEncodingFailureReason { - /// The `URLRequest` did not have a `URL` to encode. - case missingURL - /// JSON serialization failed with an underlying system error during the encoding process. - case jsonEncodingFailed(error: Error) - /// Custom parameter encoding failed due to the associated `Error`. - case customEncodingFailed(error: Error) - } - - /// The underlying reason the `.parameterEncoderFailed` error occurred. - public enum ParameterEncoderFailureReason { - /// Possible missing components. - public enum RequiredComponent { - /// The `URL` was missing or unable to be extracted from the passed `URLRequest` or during encoding. - case url - /// The `HTTPMethod` could not be extracted from the passed `URLRequest`. - case httpMethod(rawValue: String) - } - - /// A `RequiredComponent` was missing during encoding. - case missingRequiredComponent(RequiredComponent) - /// The underlying encoder failed with the associated error. - case encoderFailed(error: Error) - } - - /// The underlying reason the `.responseValidationFailed` error occurred. - public enum ResponseValidationFailureReason { - /// The data file containing the server response did not exist. - case dataFileNil - /// The data file containing the server response at the associated `URL` could not be read. - case dataFileReadFailed(at: URL) - /// The response did not contain a `Content-Type` and the `acceptableContentTypes` provided did not contain a - /// wildcard type. - case missingContentType(acceptableContentTypes: [String]) - /// The response `Content-Type` did not match any type in the provided `acceptableContentTypes`. - case unacceptableContentType(acceptableContentTypes: [String], responseContentType: String) - /// The response status code was not acceptable. - case unacceptableStatusCode(code: Int) - /// Custom response validation failed due to the associated `Error`. - case customValidationFailed(error: Error) - } - - /// The underlying reason the response serialization error occurred. - public enum ResponseSerializationFailureReason { - /// The server response contained no data or the data was zero length. - case inputDataNilOrZeroLength - /// The file containing the server response did not exist. - case inputFileNil - /// The file containing the server response could not be read from the associated `URL`. - case inputFileReadFailed(at: URL) - /// String serialization failed using the provided `String.Encoding`. - case stringSerializationFailed(encoding: String.Encoding) - /// JSON serialization failed with an underlying system error. - case jsonSerializationFailed(error: Error) - /// A `DataDecoder` failed to decode the response due to the associated `Error`. - case decodingFailed(error: Error) - /// A custom response serializer failed due to the associated `Error`. - case customSerializationFailed(error: Error) - /// Generic serialization failed for an empty response that wasn't type `Empty` but instead the associated type. - case invalidEmptyResponse(type: String) - } - - /// Underlying reason a server trust evaluation error occurred. - public enum ServerTrustFailureReason { - /// The output of a server trust evaluation. - public struct Output { - /// The host for which the evaluation was performed. - public let host: String - /// The `SecTrust` value which was evaluated. - public let trust: SecTrust - /// The `OSStatus` of evaluation operation. - public let status: OSStatus - /// The result of the evaluation operation. - public let result: SecTrustResultType - - /// Creates an `Output` value from the provided values. - init(_ host: String, _ trust: SecTrust, _ status: OSStatus, _ result: SecTrustResultType) { - self.host = host - self.trust = trust - self.status = status - self.result = result - } - } - - /// No `ServerTrustEvaluator` was found for the associated host. - case noRequiredEvaluator(host: String) - /// No certificates were found with which to perform the trust evaluation. - case noCertificatesFound - /// No public keys were found with which to perform the trust evaluation. - case noPublicKeysFound - /// During evaluation, application of the associated `SecPolicy` failed. - case policyApplicationFailed(trust: SecTrust, policy: SecPolicy, status: OSStatus) - /// During evaluation, setting the associated anchor certificates failed. - case settingAnchorCertificatesFailed(status: OSStatus, certificates: [SecCertificate]) - /// During evaluation, creation of the revocation policy failed. - case revocationPolicyCreationFailed - /// Default evaluation failed with the associated `Output`. - case defaultEvaluationFailed(output: Output) - /// Host validation failed with the associated `Output`. - case hostValidationFailed(output: Output) - /// Revocation check failed with the associated `Output` and options. - case revocationCheckFailed(output: Output, options: RevocationTrustEvaluator.Options) - /// Certificate pinning failed. - case certificatePinningFailed(host: String, trust: SecTrust, pinnedCertificates: [SecCertificate], serverCertificates: [SecCertificate]) - /// Public key pinning failed. - case publicKeyPinningFailed(host: String, trust: SecTrust, pinnedKeys: [SecKey], serverKeys: [SecKey]) - /// Custom server trust evaluation failed due to the associated `Error`. - case customEvaluationFailed(error: Error) - } - - /// The underlying reason the `.urlRequestValidationFailed` - public enum URLRequestValidationFailureReason { - /// URLRequest with GET method had body data. - case bodyDataInGETRequest(Data) - } - - /// `UploadableConvertible` threw an error in `createUploadable()`. - case createUploadableFailed(error: Error) - /// `URLRequestConvertible` threw an error in `asURLRequest()`. - case createURLRequestFailed(error: Error) - /// `SessionDelegate` threw an error while attempting to move downloaded file to destination URL. - case downloadedFileMoveFailed(error: Error, source: URL, destination: URL) - /// `Request` was explicitly cancelled. - case explicitlyCancelled - /// `URLConvertible` type failed to create a valid `URL`. - case invalidURL(url: URLConvertible) - /// Multipart form encoding failed. - case multipartEncodingFailed(reason: MultipartEncodingFailureReason) - /// `ParameterEncoding` threw an error during the encoding process. - case parameterEncodingFailed(reason: ParameterEncodingFailureReason) - /// `ParameterEncoder` threw an error while running the encoder. - case parameterEncoderFailed(reason: ParameterEncoderFailureReason) - /// `RequestAdapter` threw an error during adaptation. - case requestAdaptationFailed(error: Error) - /// `RequestRetrier` threw an error during the request retry process. - case requestRetryFailed(retryError: Error, originalError: Error) - /// Response validation failed. - case responseValidationFailed(reason: ResponseValidationFailureReason) - /// Response serialization failed. - case responseSerializationFailed(reason: ResponseSerializationFailureReason) - /// `ServerTrustEvaluating` instance threw an error during trust evaluation. - case serverTrustEvaluationFailed(reason: ServerTrustFailureReason) - /// `Session` which issued the `Request` was deinitialized, most likely because its reference went out of scope. - case sessionDeinitialized - /// `Session` was explicitly invalidated, possibly with the `Error` produced by the underlying `URLSession`. - case sessionInvalidated(error: Error?) - /// `URLSessionTask` completed with error. - case sessionTaskFailed(error: Error) - /// `URLRequest` failed validation. - case urlRequestValidationFailed(reason: URLRequestValidationFailureReason) -} - -extension Error { - /// Returns the instance cast as an `AFError`. - public var asAFError: AFError? { - return self as? AFError - } - - /// Returns the instance cast as an `AFError`. If casting fails, a `fatalError` with the specified `message` is thrown. - public func asAFError(orFailWith message: @autoclosure () -> String, file: StaticString = #file, line: UInt = #line) -> AFError { - guard let afError = self as? AFError else { - fatalError(message(), file: file, line: line) - } - return afError - } - - /// Casts the instance as `AFError` or returns `defaultAFError` - func asAFError(or defaultAFError: @autoclosure () -> AFError) -> AFError { - return self as? AFError ?? defaultAFError() - } -} - -// MARK: - Error Booleans - -extension AFError { - /// Returns whether the instance is `.sessionDeinitialized`. - public var isSessionDeinitializedError: Bool { - if case .sessionDeinitialized = self { return true } - return false - } - - /// Returns whether the instance is `.sessionInvalidated`. - public var isSessionInvalidatedError: Bool { - if case .sessionInvalidated = self { return true } - return false - } - - /// Returns whether the instance is `.explicitlyCancelled`. - public var isExplicitlyCancelledError: Bool { - if case .explicitlyCancelled = self { return true } - return false - } - - /// Returns whether the instance is `.invalidURL`. - public var isInvalidURLError: Bool { - if case .invalidURL = self { return true } - return false - } - - /// Returns whether the instance is `.parameterEncodingFailed`. When `true`, the `underlyingError` property will - /// contain the associated value. - public var isParameterEncodingError: Bool { - if case .parameterEncodingFailed = self { return true } - return false - } - - /// Returns whether the instance is `.parameterEncoderFailed`. When `true`, the `underlyingError` property will - /// contain the associated value. - public var isParameterEncoderError: Bool { - if case .parameterEncoderFailed = self { return true } - return false - } - - /// Returns whether the instance is `.multipartEncodingFailed`. When `true`, the `url` and `underlyingError` - /// properties will contain the associated values. - public var isMultipartEncodingError: Bool { - if case .multipartEncodingFailed = self { return true } - return false - } - - /// Returns whether the instance is `.requestAdaptationFailed`. When `true`, the `underlyingError` property will - /// contain the associated value. - public var isRequestAdaptationError: Bool { - if case .requestAdaptationFailed = self { return true } - return false - } - - /// Returns whether the instance is `.responseValidationFailed`. When `true`, the `acceptableContentTypes`, - /// `responseContentType`, `responseCode`, and `underlyingError` properties will contain the associated values. - public var isResponseValidationError: Bool { - if case .responseValidationFailed = self { return true } - return false - } - - /// Returns whether the instance is `.responseSerializationFailed`. When `true`, the `failedStringEncoding` and - /// `underlyingError` properties will contain the associated values. - public var isResponseSerializationError: Bool { - if case .responseSerializationFailed = self { return true } - return false - } - - /// Returns whether the instance is `.serverTrustEvaluationFailed`. When `true`, the `underlyingError` property will - /// contain the associated value. - public var isServerTrustEvaluationError: Bool { - if case .serverTrustEvaluationFailed = self { return true } - return false - } - - /// Returns whether the instance is `requestRetryFailed`. When `true`, the `underlyingError` property will - /// contain the associated value. - public var isRequestRetryError: Bool { - if case .requestRetryFailed = self { return true } - return false - } - - /// Returns whether the instance is `createUploadableFailed`. When `true`, the `underlyingError` property will - /// contain the associated value. - public var isCreateUploadableError: Bool { - if case .createUploadableFailed = self { return true } - return false - } - - /// Returns whether the instance is `createURLRequestFailed`. When `true`, the `underlyingError` property will - /// contain the associated value. - public var isCreateURLRequestError: Bool { - if case .createURLRequestFailed = self { return true } - return false - } - - /// Returns whether the instance is `downloadedFileMoveFailed`. When `true`, the `destination` and `underlyingError` properties will - /// contain the associated values. - public var isDownloadedFileMoveError: Bool { - if case .downloadedFileMoveFailed = self { return true } - return false - } - - /// Returns whether the instance is `createURLRequestFailed`. When `true`, the `underlyingError` property will - /// contain the associated value. - public var isSessionTaskError: Bool { - if case .sessionTaskFailed = self { return true } - return false - } -} - -// MARK: - Convenience Properties - -extension AFError { - /// The `URLConvertible` associated with the error. - public var urlConvertible: URLConvertible? { - guard case let .invalidURL(url) = self else { return nil } - return url - } - - /// The `URL` associated with the error. - public var url: URL? { - guard case let .multipartEncodingFailed(reason) = self else { return nil } - return reason.url - } - - /// The underlying `Error` responsible for generating the failure associated with `.sessionInvalidated`, - /// `.parameterEncodingFailed`, `.parameterEncoderFailed`, `.multipartEncodingFailed`, `.requestAdaptationFailed`, - /// `.responseSerializationFailed`, `.requestRetryFailed` errors. - public var underlyingError: Error? { - switch self { - case let .multipartEncodingFailed(reason): - return reason.underlyingError - case let .parameterEncodingFailed(reason): - return reason.underlyingError - case let .parameterEncoderFailed(reason): - return reason.underlyingError - case let .requestAdaptationFailed(error): - return error - case let .requestRetryFailed(retryError, _): - return retryError - case let .responseValidationFailed(reason): - return reason.underlyingError - case let .responseSerializationFailed(reason): - return reason.underlyingError - case let .serverTrustEvaluationFailed(reason): - return reason.underlyingError - case let .sessionInvalidated(error): - return error - case let .createUploadableFailed(error): - return error - case let .createURLRequestFailed(error): - return error - case let .downloadedFileMoveFailed(error, _, _): - return error - case let .sessionTaskFailed(error): - return error - case .explicitlyCancelled, - .invalidURL, - .sessionDeinitialized, - .urlRequestValidationFailed: - return nil - } - } - - /// The acceptable `Content-Type`s of a `.responseValidationFailed` error. - public var acceptableContentTypes: [String]? { - guard case let .responseValidationFailed(reason) = self else { return nil } - return reason.acceptableContentTypes - } - - /// The response `Content-Type` of a `.responseValidationFailed` error. - public var responseContentType: String? { - guard case let .responseValidationFailed(reason) = self else { return nil } - return reason.responseContentType - } - - /// The response code of a `.responseValidationFailed` error. - public var responseCode: Int? { - guard case let .responseValidationFailed(reason) = self else { return nil } - return reason.responseCode - } - - /// The `String.Encoding` associated with a failed `.stringResponse()` call. - public var failedStringEncoding: String.Encoding? { - guard case let .responseSerializationFailed(reason) = self else { return nil } - return reason.failedStringEncoding - } - - /// The `source` URL of a `.downloadedFileMoveFailed` error. - public var sourceURL: URL? { - guard case .downloadedFileMoveFailed(_, let source, _) = self else { return nil } - return source - } - - /// The `destination` URL of a `.downloadedFileMoveFailed` error. - public var destinationURL: URL? { - guard case let .downloadedFileMoveFailed(_, _, destination) = self else { return nil } - return destination - } -} - -extension AFError.ParameterEncodingFailureReason { - var underlyingError: Error? { - switch self { - case let .jsonEncodingFailed(error), - let .customEncodingFailed(error): - return error - case .missingURL: - return nil - } - } -} - -extension AFError.ParameterEncoderFailureReason { - var underlyingError: Error? { - switch self { - case let .encoderFailed(error): - return error - case .missingRequiredComponent: - return nil - } - } -} - -extension AFError.MultipartEncodingFailureReason { - var url: URL? { - switch self { - case let .bodyPartURLInvalid(url), - let .bodyPartFilenameInvalid(url), - let .bodyPartFileNotReachable(url), - let .bodyPartFileIsDirectory(url), - let .bodyPartFileSizeNotAvailable(url), - let .bodyPartInputStreamCreationFailed(url), - let .outputStreamCreationFailed(url), - let .outputStreamFileAlreadyExists(url), - let .outputStreamURLInvalid(url), - let .bodyPartFileNotReachableWithError(url, _), - let .bodyPartFileSizeQueryFailedWithError(url, _): - return url - case .outputStreamWriteFailed, - .inputStreamReadFailed: - return nil - } - } - - var underlyingError: Error? { - switch self { - case let .bodyPartFileNotReachableWithError(_, error), - let .bodyPartFileSizeQueryFailedWithError(_, error), - let .outputStreamWriteFailed(error), - let .inputStreamReadFailed(error): - return error - case .bodyPartURLInvalid, - .bodyPartFilenameInvalid, - .bodyPartFileNotReachable, - .bodyPartFileIsDirectory, - .bodyPartFileSizeNotAvailable, - .bodyPartInputStreamCreationFailed, - .outputStreamCreationFailed, - .outputStreamFileAlreadyExists, - .outputStreamURLInvalid: - return nil - } - } -} - -extension AFError.ResponseValidationFailureReason { - var acceptableContentTypes: [String]? { - switch self { - case let .missingContentType(types), - let .unacceptableContentType(types, _): - return types - case .dataFileNil, - .dataFileReadFailed, - .unacceptableStatusCode, - .customValidationFailed: - return nil - } - } - - var responseContentType: String? { - switch self { - case let .unacceptableContentType(_, responseType): - return responseType - case .dataFileNil, - .dataFileReadFailed, - .missingContentType, - .unacceptableStatusCode, - .customValidationFailed: - return nil - } - } - - var responseCode: Int? { - switch self { - case let .unacceptableStatusCode(code): - return code - case .dataFileNil, - .dataFileReadFailed, - .missingContentType, - .unacceptableContentType, - .customValidationFailed: - return nil - } - } - - var underlyingError: Error? { - switch self { - case let .customValidationFailed(error): - return error - case .dataFileNil, - .dataFileReadFailed, - .missingContentType, - .unacceptableContentType, - .unacceptableStatusCode: - return nil - } - } -} - -extension AFError.ResponseSerializationFailureReason { - var failedStringEncoding: String.Encoding? { - switch self { - case let .stringSerializationFailed(encoding): - return encoding - case .inputDataNilOrZeroLength, - .inputFileNil, - .inputFileReadFailed(_), - .jsonSerializationFailed(_), - .decodingFailed(_), - .customSerializationFailed(_), - .invalidEmptyResponse: - return nil - } - } - - var underlyingError: Error? { - switch self { - case let .jsonSerializationFailed(error), - let .decodingFailed(error), - let .customSerializationFailed(error): - return error - case .inputDataNilOrZeroLength, - .inputFileNil, - .inputFileReadFailed, - .stringSerializationFailed, - .invalidEmptyResponse: - return nil - } - } -} - -extension AFError.ServerTrustFailureReason { - var output: AFError.ServerTrustFailureReason.Output? { - switch self { - case let .defaultEvaluationFailed(output), - let .hostValidationFailed(output), - let .revocationCheckFailed(output, _): - return output - case .noRequiredEvaluator, - .noCertificatesFound, - .noPublicKeysFound, - .policyApplicationFailed, - .settingAnchorCertificatesFailed, - .revocationPolicyCreationFailed, - .certificatePinningFailed, - .publicKeyPinningFailed, - .customEvaluationFailed: - return nil - } - } - - var underlyingError: Error? { - switch self { - case let .customEvaluationFailed(error): - return error - case .noRequiredEvaluator, - .noCertificatesFound, - .noPublicKeysFound, - .policyApplicationFailed, - .settingAnchorCertificatesFailed, - .revocationPolicyCreationFailed, - .defaultEvaluationFailed, - .hostValidationFailed, - .revocationCheckFailed, - .certificatePinningFailed, - .publicKeyPinningFailed: - return nil - } - } -} - -// MARK: - Error Descriptions - -extension AFError: LocalizedError { - public var errorDescription: String? { - switch self { - case .explicitlyCancelled: - return "Request explicitly cancelled." - case let .invalidURL(url): - return "URL is not valid: \(url)" - case let .parameterEncodingFailed(reason): - return reason.localizedDescription - case let .parameterEncoderFailed(reason): - return reason.localizedDescription - case let .multipartEncodingFailed(reason): - return reason.localizedDescription - case let .requestAdaptationFailed(error): - return "Request adaption failed with error: \(error.localizedDescription)" - case let .responseValidationFailed(reason): - return reason.localizedDescription - case let .responseSerializationFailed(reason): - return reason.localizedDescription - case let .requestRetryFailed(retryError, originalError): - return """ - Request retry failed with retry error: \(retryError.localizedDescription), \ - original error: \(originalError.localizedDescription) - """ - case .sessionDeinitialized: - return """ - Session was invalidated without error, so it was likely deinitialized unexpectedly. \ - Be sure to retain a reference to your Session for the duration of your requests. - """ - case let .sessionInvalidated(error): - return "Session was invalidated with error: \(error?.localizedDescription ?? "No description.")" - case .serverTrustEvaluationFailed: - return "Server trust evaluation failed." - case let .urlRequestValidationFailed(reason): - return "URLRequest validation failed due to reason: \(reason.localizedDescription)" - case let .createUploadableFailed(error): - return "Uploadable creation failed with error: \(error.localizedDescription)" - case let .createURLRequestFailed(error): - return "URLRequest creation failed with error: \(error.localizedDescription)" - case let .downloadedFileMoveFailed(error, source, destination): - return "Moving downloaded file from: \(source) to: \(destination) failed with error: \(error.localizedDescription)" - case let .sessionTaskFailed(error): - return "URLSessionTask failed with error: \(error.localizedDescription)" - } - } -} - -extension AFError.ParameterEncodingFailureReason { - var localizedDescription: String { - switch self { - case .missingURL: - return "URL request to encode was missing a URL" - case let .jsonEncodingFailed(error): - return "JSON could not be encoded because of error:\n\(error.localizedDescription)" - case let .customEncodingFailed(error): - return "Custom parameter encoder failed with error: \(error.localizedDescription)" - } - } -} - -extension AFError.ParameterEncoderFailureReason { - var localizedDescription: String { - switch self { - case let .missingRequiredComponent(component): - return "Encoding failed due to a missing request component: \(component)" - case let .encoderFailed(error): - return "The underlying encoder failed with the error: \(error)" - } - } -} - -extension AFError.MultipartEncodingFailureReason { - var localizedDescription: String { - switch self { - case let .bodyPartURLInvalid(url): - return "The URL provided is not a file URL: \(url)" - case let .bodyPartFilenameInvalid(url): - return "The URL provided does not have a valid filename: \(url)" - case let .bodyPartFileNotReachable(url): - return "The URL provided is not reachable: \(url)" - case let .bodyPartFileNotReachableWithError(url, error): - return """ - The system returned an error while checking the provided URL for reachability. - URL: \(url) - Error: \(error) - """ - case let .bodyPartFileIsDirectory(url): - return "The URL provided is a directory: \(url)" - case let .bodyPartFileSizeNotAvailable(url): - return "Could not fetch the file size from the provided URL: \(url)" - case let .bodyPartFileSizeQueryFailedWithError(url, error): - return """ - The system returned an error while attempting to fetch the file size from the provided URL. - URL: \(url) - Error: \(error) - """ - case let .bodyPartInputStreamCreationFailed(url): - return "Failed to create an InputStream for the provided URL: \(url)" - case let .outputStreamCreationFailed(url): - return "Failed to create an OutputStream for URL: \(url)" - case let .outputStreamFileAlreadyExists(url): - return "A file already exists at the provided URL: \(url)" - case let .outputStreamURLInvalid(url): - return "The provided OutputStream URL is invalid: \(url)" - case let .outputStreamWriteFailed(error): - return "OutputStream write failed with error: \(error)" - case let .inputStreamReadFailed(error): - return "InputStream read failed with error: \(error)" - } - } -} - -extension AFError.ResponseSerializationFailureReason { - var localizedDescription: String { - switch self { - case .inputDataNilOrZeroLength: - return "Response could not be serialized, input data was nil or zero length." - case .inputFileNil: - return "Response could not be serialized, input file was nil." - case let .inputFileReadFailed(url): - return "Response could not be serialized, input file could not be read: \(url)." - case let .stringSerializationFailed(encoding): - return "String could not be serialized with encoding: \(encoding)." - case let .jsonSerializationFailed(error): - return "JSON could not be serialized because of error:\n\(error.localizedDescription)" - case let .invalidEmptyResponse(type): - return """ - Empty response could not be serialized to type: \(type). \ - Use Empty as the expected type for such responses. - """ - case let .decodingFailed(error): - return "Response could not be decoded because of error:\n\(error.localizedDescription)" - case let .customSerializationFailed(error): - return "Custom response serializer failed with error:\n\(error.localizedDescription)" - } - } -} - -extension AFError.ResponseValidationFailureReason { - var localizedDescription: String { - switch self { - case .dataFileNil: - return "Response could not be validated, data file was nil." - case let .dataFileReadFailed(url): - return "Response could not be validated, data file could not be read: \(url)." - case let .missingContentType(types): - return """ - Response Content-Type was missing and acceptable content types \ - (\(types.joined(separator: ","))) do not match "*/*". - """ - case let .unacceptableContentType(acceptableTypes, responseType): - return """ - Response Content-Type "\(responseType)" does not match any acceptable types: \ - \(acceptableTypes.joined(separator: ",")). - """ - case let .unacceptableStatusCode(code): - return "Response status code was unacceptable: \(code)." - case let .customValidationFailed(error): - return "Custom response validation failed with error: \(error.localizedDescription)" - } - } -} - -extension AFError.ServerTrustFailureReason { - var localizedDescription: String { - switch self { - case let .noRequiredEvaluator(host): - return "A ServerTrustEvaluating value is required for host \(host) but none was found." - case .noCertificatesFound: - return "No certificates were found or provided for evaluation." - case .noPublicKeysFound: - return "No public keys were found or provided for evaluation." - case .policyApplicationFailed: - return "Attempting to set a SecPolicy failed." - case .settingAnchorCertificatesFailed: - return "Attempting to set the provided certificates as anchor certificates failed." - case .revocationPolicyCreationFailed: - return "Attempting to create a revocation policy failed." - case let .defaultEvaluationFailed(output): - return "Default evaluation failed for host \(output.host)." - case let .hostValidationFailed(output): - return "Host validation failed for host \(output.host)." - case .revocationCheckFailed(let output, _): - return "Revocation check failed for host \(output.host)." - case .certificatePinningFailed(let host, _, _, _): - return "Certificate pinning failed for host \(host)." - case .publicKeyPinningFailed(let host, _, _, _): - return "Public key pinning failed for host \(host)." - case let .customEvaluationFailed(error): - return "Custom trust evaluation failed with error: \(error.localizedDescription)" - } - } -} - -extension AFError.URLRequestValidationFailureReason { - var localizedDescription: String { - switch self { - case let .bodyDataInGETRequest(data): - return """ - Invalid URLRequest: Requests with GET method cannot have body data: - \(String(decoding: data, as: UTF8.self)) - """ - } - } -} diff --git a/Example/Pods/Alamofire/Source/Alamofire.swift b/Example/Pods/Alamofire/Source/Alamofire.swift deleted file mode 100644 index 549922d..0000000 --- a/Example/Pods/Alamofire/Source/Alamofire.swift +++ /dev/null @@ -1,520 +0,0 @@ -// -// Alamofire.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. -// - -import Foundation - -/// Global namespace containing API for the `default` `Session` instance. -public enum AF { - /// Current Alamofire version. Necessary since SPM doesn't use dynamic libraries. Plus this will be more accurate. - static let version = "5.0.0-rc.2" - - // MARK: - Data Request - - /// Creates a `DataRequest` using `Session.default` to retrieve the contents of the specified `url` using the - /// `method`, `parameters`, `encoding`, and `headers` provided. - /// - /// - Parameters: - /// - url: The `URLConvertible` value. - /// - method: The `HTTPMethod`, `.get` by default. - /// - parameters: The `Parameters`, `nil` by default. - /// - encoding: The `ParameterEncoding`, `URLEncoding.default` by default. - /// - headers: The `HTTPHeaders`, `nil` by default. - /// - interceptor: The `RequestInterceptor`, `nil` by default. - /// - /// - Returns: The created `DataRequest`. - public static func request(_ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil, - interceptor: RequestInterceptor? = nil) -> DataRequest { - return Session.default.request(url, - method: method, - parameters: parameters, - encoding: encoding, - headers: headers, - interceptor: interceptor) - } - - /// Creates a `DataRequest` using `Session.default` to retrieve the contents of the specified `url` using the - /// `method`, `parameters`, `encoding`, and `headers` provided. - /// - /// - Parameters: - /// - url: The `URLConvertible` value. - /// - method: The `HTTPMethod`, `.get` by default. - /// - parameters: The `Encodable` parameters, `nil` by default. - /// - encoding: The `ParameterEncoder`, `URLEncodedFormParameterEncoder.default` by default. - /// - headers: The `HTTPHeaders`, `nil` by default. - /// - interceptor: The `RequestInterceptor`, `nil` by default. - /// - /// - Returns: The created `DataRequest`. - public static func request(_ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoder: ParameterEncoder = URLEncodedFormParameterEncoder.default, - headers: HTTPHeaders? = nil, - interceptor: RequestInterceptor? = nil) -> DataRequest { - return Session.default.request(url, - method: method, - parameters: parameters, - encoder: encoder, - headers: headers, - interceptor: interceptor) - } - - /// Creates a `DataRequest` using `Session.default` to execute the specified `urlRequest`. - /// - /// - Parameters: - /// - urlRequest: The `URLRequestConvertible` value. - /// - interceptor: The `RequestInterceptor`, `nil` by default. - /// - /// - Returns: The created `DataRequest`. - public static func request(_ urlRequest: URLRequestConvertible, interceptor: RequestInterceptor? = nil) -> DataRequest { - return Session.default.request(urlRequest, interceptor: interceptor) - } - - // MARK: - Download Request - - /// Creates a `DownloadRequest` using `Session.default` to download the contents of the specified `url` to - /// the provided `destination` using the `method`, `parameters`, `encoding`, and `headers` provided. - /// - /// If `destination` is not specified, the download will be moved to a temporary location determined by Alamofire. - /// - /// - Parameters: - /// - url: The `URLConvertible` value. - /// - method: The `HTTPMethod`, `.get` by default. - /// - parameters: The `Parameters`, `nil` by default. - /// - encoding: The `ParameterEncoding`, `URLEncoding.default` by default. - /// - headers: The `HTTPHeaders`, `nil` by default. - /// - interceptor: The `RequestInterceptor`, `nil` by default. - /// - destination: The `DownloadRequest.Destination` closure used the determine the destination of the - /// downloaded file. `nil` by default. - /// - /// - Returns: The created `DownloadRequest`. - public static func download(_ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil, - interceptor: RequestInterceptor? = nil, - to destination: DownloadRequest.Destination? = nil) -> DownloadRequest { - return Session.default.download(url, - method: method, - parameters: parameters, - encoding: encoding, - headers: headers, - interceptor: interceptor, - to: destination) - } - - /// Creates a `DownloadRequest` using `Session.default` to download the contents of the specified `url` to the - /// provided `destination` using the `method`, encodable `parameters`, `encoder`, and `headers` provided. - /// - /// - Note: If `destination` is not specified, the download will be moved to a temporary location determined by - /// Alamofire. - /// - /// - Parameters: - /// - url: The `URLConvertible` value. - /// - method: The `HTTPMethod`, `.get` by default. - /// - parameters: The `Encodable` parameters, `nil` by default. - /// - encoder: The `ParameterEncoder`, `URLEncodedFormParameterEncoder.default` by default. - /// - headers: The `HTTPHeaders`, `nil` by default. - /// - interceptor: The `RequestInterceptor`, `nil` by default. - /// - destination: The `DownloadRequest.Destination` closure used the determine the destination of the - /// downloaded file. `nil` by default. - /// - /// - Returns: The created `DownloadRequest`. - public static func download(_ url: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoder: ParameterEncoder = URLEncodedFormParameterEncoder.default, - headers: HTTPHeaders? = nil, - interceptor: RequestInterceptor? = nil, - to destination: DownloadRequest.Destination? = nil) -> DownloadRequest { - return Session.default.download(url, - method: method, - parameters: parameters, - encoder: encoder, - headers: headers, - interceptor: interceptor, - to: destination) - } - - // MARK: URLRequest - - /// Creates a `DownloadRequest` using `Session.default` to execute the specified `urlRequest` and download - /// the result to the provided `destination`. - /// - /// - Parameters: - /// - urlRequest: The `URLRequestConvertible` value. - /// - interceptor: The `RequestInterceptor`, `nil` by default. - /// - destination: The `DownloadRequest.Destination` closure used the determine the destination of the - /// downloaded file. `nil` by default. - /// - /// - Returns: The created `DownloadRequest`. - public static func download(_ urlRequest: URLRequestConvertible, - interceptor: RequestInterceptor? = nil, - to destination: DownloadRequest.Destination? = nil) -> DownloadRequest { - return Session.default.download(urlRequest, interceptor: interceptor, to: destination) - } - - // MARK: Resume Data - - /// Creates a `DownloadRequest` using the `Session.default` from the `resumeData` produced from a previous - /// `DownloadRequest` cancellation to retrieve the contents of the original request and save them to the `destination`. - /// - /// - Note: If `destination` is not specified, the download will be moved to a temporary location determined by - /// Alamofire. - /// - /// - Note: On some versions of all Apple platforms (iOS 10 - 10.2, macOS 10.12 - 10.12.2, tvOS 10 - 10.1, watchOS 3 - 3.1.1), - /// `resumeData` is broken on background URL session configurations. There's an underlying bug in the `resumeData` - /// generation logic where the data is written incorrectly and will always fail to resume the download. For more - /// information about the bug and possible workarounds, please refer to the [this Stack Overflow post](http://stackoverflow.com/a/39347461/1342462). - /// - /// - Parameters: - /// - resumeData: The resume `Data`. This is an opaque blob produced by `URLSessionDownloadTask` when a task is - /// cancelled. See [Apple's documentation](https://developer.apple.com/documentation/foundation/urlsessiondownloadtask/1411634-cancel) - /// for more information. - /// - interceptor: The `RequestInterceptor`, `nil` by default. - /// - destination: The `DownloadRequest.Destination` closure used to determine the destination of the downloaded - /// file. `nil` by default. - /// - /// - Returns: The created `DownloadRequest`. - public static func download(resumingWith resumeData: Data, - interceptor: RequestInterceptor? = nil, - to destination: DownloadRequest.Destination? = nil) -> DownloadRequest { - return Session.default.download(resumingWith: resumeData, interceptor: interceptor, to: destination) - } - - // MARK: - Upload Request - - // MARK: Data - - /// Creates an `UploadRequest` for the given `Data`, `URLRequest` components, and `RequestInterceptor`. - /// - /// - Parameters: - /// - data: The `Data` to upload. - /// - convertible: `URLConvertible` value to be used as the `URLRequest`'s `URL`. - /// - method: `HTTPMethod` for the `URLRequest`. `.post` by default. - /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by - /// default. - /// - /// - Returns: The created `UploadRequest`. - public static func upload(_ data: Data, - to convertible: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default) -> UploadRequest { - return Session.default.upload(data, - to: convertible, - method: method, - headers: headers, - interceptor: interceptor, - fileManager: fileManager) - } - - /// Creates an `UploadRequest` for the given `Data` using the `URLRequestConvertible` value and `RequestInterceptor`. - /// - /// - Parameters: - /// - data: The `Data` to upload. - /// - convertible: `URLRequestConvertible` value to be used to create the `URLRequest`. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by - /// default. - /// - /// - Returns: The created `UploadRequest`. - public static func upload(_ data: Data, - with convertible: URLRequestConvertible, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default) -> UploadRequest { - return Session.default.upload(data, with: convertible, interceptor: interceptor, fileManager: fileManager) - } - - // MARK: File - - /// Creates an `UploadRequest` for the file at the given file `URL`, using a `URLRequest` from the provided - /// components and `RequestInterceptor`. - /// - /// - Parameters: - /// - fileURL: The `URL` of the file to upload. - /// - convertible: `URLConvertible` value to be used as the `URLRequest`'s `URL`. - /// - method: `HTTPMethod` for the `URLRequest`. `.post` by default. - /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `UploadRequest`. `nil` by default. - /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by - /// default. - /// - /// - Returns: The created `UploadRequest`. - public static func upload(_ fileURL: URL, - to convertible: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default) -> UploadRequest { - return Session.default.upload(fileURL, - to: convertible, - method: method, - headers: headers, - interceptor: interceptor, - fileManager: fileManager) - } - - /// Creates an `UploadRequest` for the file at the given file `URL` using the `URLRequestConvertible` value and - /// `RequestInterceptor`. - /// - /// - Parameters: - /// - fileURL: The `URL` of the file to upload. - /// - convertible: `URLRequestConvertible` value to be used to create the `URLRequest`. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by - /// default. - /// - /// - Returns: The created `UploadRequest`. - public static func upload(_ fileURL: URL, - with convertible: URLRequestConvertible, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default) -> UploadRequest { - return Session.default.upload(fileURL, with: convertible, interceptor: interceptor, fileManager: fileManager) - } - - // MARK: InputStream - - /// Creates an `UploadRequest` from the `InputStream` provided using a `URLRequest` from the provided components and - /// `RequestInterceptor`. - /// - /// - Parameters: - /// - stream: The `InputStream` that provides the data to upload. - /// - convertible: `URLConvertible` value to be used as the `URLRequest`'s `URL`. - /// - method: `HTTPMethod` for the `URLRequest`. `.post` by default. - /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by - /// default. - /// - /// - Returns: The created `UploadRequest`. - public static func upload(_ stream: InputStream, - to convertible: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default) -> UploadRequest { - return Session.default.upload(stream, - to: convertible, - method: method, - headers: headers, - interceptor: interceptor, - fileManager: fileManager) - } - - /// Creates an `UploadRequest` from the provided `InputStream` using the `URLRequestConvertible` value and - /// `RequestInterceptor`. - /// - /// - Parameters: - /// - stream: The `InputStream` that provides the data to upload. - /// - convertible: `URLRequestConvertible` value to be used to create the `URLRequest`. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by - /// default. - /// - /// - Returns: The created `UploadRequest`. - public static func upload(_ stream: InputStream, - with convertible: URLRequestConvertible, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default) -> UploadRequest { - return Session.default.upload(stream, with: convertible, interceptor: interceptor, fileManager: fileManager) - } - - // MARK: MultipartFormData - - /// Creates an `UploadRequest` for the multipart form data built using a closure and sent using the provided - /// `URLRequest` components and `RequestInterceptor`. - /// - /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cumulative - /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - /// used for larger payloads such as video content. - /// - /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - /// technique was used. - /// - /// - Parameters: - /// - multipartFormData: `MultipartFormData` building closure. - /// - convertible: `URLConvertible` value to be used as the `URLRequest`'s `URL`. - /// - encodingMemoryThreshold: Byte threshold used to determine whether the form data is encoded into memory or - /// onto disk before being uploaded. `MultipartFormData.encodingMemoryThreshold` by - /// default. - /// - method: `HTTPMethod` for the `URLRequest`. `.post` by default. - /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - fileManager: `FileManager` to be used if the form data exceeds the memory threshold and is - /// written to disk before being uploaded. `.default` instance by default. - /// - /// - Returns: The created `UploadRequest`. - public static func upload(multipartFormData: @escaping (MultipartFormData) -> Void, - to url: URLConvertible, - usingThreshold encodingMemoryThreshold: UInt64 = MultipartFormData.encodingMemoryThreshold, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default) -> UploadRequest { - return Session.default.upload(multipartFormData: multipartFormData, - to: url, - usingThreshold: encodingMemoryThreshold, - method: method, - headers: headers, - interceptor: interceptor, - fileManager: fileManager) - } - - /// Creates an `UploadRequest` using a `MultipartFormData` building closure, the provided `URLRequestConvertible` - /// value, and a `RequestInterceptor`. - /// - /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cumulative - /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - /// used for larger payloads such as video content. - /// - /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - /// technique was used. - /// - /// - Parameters: - /// - multipartFormData: `MultipartFormData` building closure. - /// - request: `URLRequestConvertible` value to be used to create the `URLRequest`. - /// - encodingMemoryThreshold: Byte threshold used to determine whether the form data is encoded into memory or - /// onto disk before being uploaded. `MultipartFormData.encodingMemoryThreshold` by - /// default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - fileManager: `FileManager` to be used if the form data exceeds the memory threshold and is - /// written to disk before being uploaded. `.default` instance by default. - /// - /// - Returns: The created `UploadRequest`. - public static func upload(multipartFormData: @escaping (MultipartFormData) -> Void, - with request: URLRequestConvertible, - usingThreshold encodingMemoryThreshold: UInt64 = MultipartFormData.encodingMemoryThreshold, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default) -> UploadRequest { - return Session.default.upload(multipartFormData: multipartFormData, - with: request, - usingThreshold: encodingMemoryThreshold, - interceptor: interceptor, - fileManager: fileManager) - } - - /// Creates an `UploadRequest` for the prebuilt `MultipartFormData` value using the provided `URLRequest` components - /// and `RequestInterceptor`. - /// - /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cumulative - /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - /// used for larger payloads such as video content. - /// - /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - /// technique was used. - /// - /// - Parameters: - /// - multipartFormData: `MultipartFormData` instance to upload. - /// - url: `URLConvertible` value to be used as the `URLRequest`'s `URL`. - /// - encodingMemoryThreshold: Byte threshold used to determine whether the form data is encoded into memory or - /// onto disk before being uploaded. `MultipartFormData.encodingMemoryThreshold` by - /// default. - /// - method: `HTTPMethod` for the `URLRequest`. `.post` by default. - /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - fileManager: `FileManager` to be used if the form data exceeds the memory threshold and is - /// written to disk before being uploaded. `.default` instance by default. - /// - /// - Returns: The created `UploadRequest`. - public static func upload(multipartFormData: MultipartFormData, - to url: URLConvertible, - usingThreshold encodingMemoryThreshold: UInt64 = MultipartFormData.encodingMemoryThreshold, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default) -> UploadRequest { - return Session.default.upload(multipartFormData: multipartFormData, - to: url, - usingThreshold: encodingMemoryThreshold, - method: method, - headers: headers, - interceptor: interceptor, - fileManager: fileManager) - } - - /// Creates an `UploadRequest` for the prebuilt `MultipartFormData` value using the providing `URLRequestConvertible` - /// value and `RequestInterceptor`. - /// - /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cumulative - /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - /// used for larger payloads such as video content. - /// - /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - /// technique was used. - /// - /// - Parameters: - /// - multipartFormData: `MultipartFormData` instance to upload. - /// - request: `URLRequestConvertible` value to be used to create the `URLRequest`. - /// - encodingMemoryThreshold: Byte threshold used to determine whether the form data is encoded into memory or - /// onto disk before being uploaded. `MultipartFormData.encodingMemoryThreshold` by - /// default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by - /// default. - /// - /// - Returns: The created `UploadRequest`. - public static func upload(multipartFormData: MultipartFormData, - with request: URLRequestConvertible, - usingThreshold encodingMemoryThreshold: UInt64 = MultipartFormData.encodingMemoryThreshold, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default) -> UploadRequest { - return Session.default.upload(multipartFormData: multipartFormData, - with: request, - usingThreshold: encodingMemoryThreshold, - interceptor: interceptor, - fileManager: fileManager) - } -} diff --git a/Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift b/Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift deleted file mode 100644 index 10cd273..0000000 --- a/Example/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// DispatchQueue+Alamofire.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. -// - -import Dispatch -import Foundation - -extension DispatchQueue { - /// Execute the provided closure after a `TimeInterval`. - /// - /// - Parameters: - /// - delay: `TimeInterval` to delay execution. - /// - closure: Closure to execute. - func after(_ delay: TimeInterval, execute closure: @escaping () -> Void) { - asyncAfter(deadline: .now() + delay, execute: closure) - } -} diff --git a/Example/Pods/Alamofire/Source/MultipartFormData.swift b/Example/Pods/Alamofire/Source/MultipartFormData.swift deleted file mode 100644 index 4ef54aa..0000000 --- a/Example/Pods/Alamofire/Source/MultipartFormData.swift +++ /dev/null @@ -1,544 +0,0 @@ -// -// MultipartFormData.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. -// - -import Foundation - -#if os(iOS) || os(watchOS) || os(tvOS) -import MobileCoreServices -#elseif os(macOS) -import CoreServices -#endif - -/// Constructs `multipart/form-data` for uploads within an HTTP or HTTPS body. There are currently two ways to encode -/// multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead -/// to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the -/// data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for -/// larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset. -/// -/// For more information on `multipart/form-data` in general, please refer to the RFC-2388 and RFC-2045 specs as well -/// and the w3 form documentation. -/// -/// - https://www.ietf.org/rfc/rfc2388.txt -/// - https://www.ietf.org/rfc/rfc2045.txt -/// - https://www.w3.org/TR/html401/interact/forms.html#h-17.13 -open class MultipartFormData { - // MARK: - Helper Types - - struct EncodingCharacters { - static let crlf = "\r\n" - } - - struct BoundaryGenerator { - enum BoundaryType { - case initial, encapsulated, final - } - - static func randomBoundary() -> String { - return String(format: "alamofire.boundary.%08x%08x", arc4random(), arc4random()) - } - - static func boundaryData(forBoundaryType boundaryType: BoundaryType, boundary: String) -> Data { - let boundaryText: String - - switch boundaryType { - case .initial: - boundaryText = "--\(boundary)\(EncodingCharacters.crlf)" - case .encapsulated: - boundaryText = "\(EncodingCharacters.crlf)--\(boundary)\(EncodingCharacters.crlf)" - case .final: - boundaryText = "\(EncodingCharacters.crlf)--\(boundary)--\(EncodingCharacters.crlf)" - } - - return Data(boundaryText.utf8) - } - } - - class BodyPart { - let headers: HTTPHeaders - let bodyStream: InputStream - let bodyContentLength: UInt64 - var hasInitialBoundary = false - var hasFinalBoundary = false - - init(headers: HTTPHeaders, bodyStream: InputStream, bodyContentLength: UInt64) { - self.headers = headers - self.bodyStream = bodyStream - self.bodyContentLength = bodyContentLength - } - } - - // MARK: - Properties - - /// Default memory threshold used when encoding `MultipartFormData`, in bytes. - public static let encodingMemoryThreshold: UInt64 = 10_000_000 - - /// The `Content-Type` header value containing the boundary used to generate the `multipart/form-data`. - open lazy var contentType: String = "multipart/form-data; boundary=\(self.boundary)" - - /// The content length of all body parts used to generate the `multipart/form-data` not including the boundaries. - public var contentLength: UInt64 { return bodyParts.reduce(0) { $0 + $1.bodyContentLength } } - - /// The boundary used to separate the body parts in the encoded form data. - public let boundary: String - - let fileManager: FileManager - - private var bodyParts: [BodyPart] - private var bodyPartError: AFError? - private let streamBufferSize: Int - - // MARK: - Lifecycle - - /// Creates an instance. - /// - /// - Parameters: - /// - fileManager: `FileManager` to use for file operations, if needed. - /// - boundary: Boundary `String` used to separate body parts. - public init(fileManager: FileManager = .default, boundary: String? = nil) { - self.fileManager = fileManager - self.boundary = boundary ?? BoundaryGenerator.randomBoundary() - bodyParts = [] - - // - // The optimal read/write buffer size in bytes for input and output streams is 1024 (1KB). For more - // information, please refer to the following article: - // - https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Streams/Articles/ReadingInputStreams.html - // - streamBufferSize = 1024 - } - - // MARK: - Body Parts - - /// Creates a body part from the data and appends it to the instance. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) - /// - `Content-Type: #{mimeType}` (HTTP Header) - /// - Encoded file data - /// - Multipart form boundary - /// - /// - Parameters: - /// - data: `Data` to encoding into the instance. - /// - name: Name to associate with the `Data` in the `Content-Disposition` HTTP header. - /// - fileName: Filename to associate with the `Data` in the `Content-Disposition` HTTP header. - /// - mimeType: MIME type to associate with the data in the `Content-Type` HTTP header. - public func append(_ data: Data, withName name: String, fileName: String? = nil, mimeType: String? = nil) { - let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) - let stream = InputStream(data: data) - let length = UInt64(data.count) - - append(stream, withLength: length, headers: headers) - } - - /// Creates a body part from the file and appends it to the instance. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}; filename=#{generated filename}` (HTTP Header) - /// - `Content-Type: #{generated mimeType}` (HTTP Header) - /// - Encoded file data - /// - Multipart form boundary - /// - /// The filename in the `Content-Disposition` HTTP header is generated from the last path component of the - /// `fileURL`. The `Content-Type` HTTP header MIME type is generated by mapping the `fileURL` extension to the - /// system associated MIME type. - /// - /// - Parameters: - /// - fileURL: `URL` of the file whose content will be encoded into the instance. - /// - name: Name to associate with the file content in the `Content-Disposition` HTTP header. - public func append(_ fileURL: URL, withName name: String) { - let fileName = fileURL.lastPathComponent - let pathExtension = fileURL.pathExtension - - if !fileName.isEmpty && !pathExtension.isEmpty { - let mime = mimeType(forPathExtension: pathExtension) - append(fileURL, withName: name, fileName: fileName, mimeType: mime) - } else { - setBodyPartError(withReason: .bodyPartFilenameInvalid(in: fileURL)) - } - } - - /// Creates a body part from the file and appends it to the instance. - /// - /// The body part data will be encoded using the following format: - /// - /// - Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header) - /// - Content-Type: #{mimeType} (HTTP Header) - /// - Encoded file data - /// - Multipart form boundary - /// - /// - Parameters: - /// - fileURL: `URL` of the file whose content will be encoded into the instance. - /// - name: Name to associate with the file content in the `Content-Disposition` HTTP header. - /// - fileName: Filename to associate with the file content in the `Content-Disposition` HTTP header. - /// - mimeType: MIME type to associate with the file content in the `Content-Type` HTTP header. - public func append(_ fileURL: URL, withName name: String, fileName: String, mimeType: String) { - let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) - - //============================================================ - // Check 1 - is file URL? - //============================================================ - - guard fileURL.isFileURL else { - setBodyPartError(withReason: .bodyPartURLInvalid(url: fileURL)) - return - } - - //============================================================ - // Check 2 - is file URL reachable? - //============================================================ - - do { - let isReachable = try fileURL.checkPromisedItemIsReachable() - guard isReachable else { - setBodyPartError(withReason: .bodyPartFileNotReachable(at: fileURL)) - return - } - } catch { - setBodyPartError(withReason: .bodyPartFileNotReachableWithError(atURL: fileURL, error: error)) - return - } - - //============================================================ - // Check 3 - is file URL a directory? - //============================================================ - - var isDirectory: ObjCBool = false - let path = fileURL.path - - guard fileManager.fileExists(atPath: path, isDirectory: &isDirectory) && !isDirectory.boolValue else { - setBodyPartError(withReason: .bodyPartFileIsDirectory(at: fileURL)) - return - } - - //============================================================ - // Check 4 - can the file size be extracted? - //============================================================ - - let bodyContentLength: UInt64 - - do { - guard let fileSize = try fileManager.attributesOfItem(atPath: path)[.size] as? NSNumber else { - setBodyPartError(withReason: .bodyPartFileSizeNotAvailable(at: fileURL)) - return - } - - bodyContentLength = fileSize.uint64Value - } catch { - setBodyPartError(withReason: .bodyPartFileSizeQueryFailedWithError(forURL: fileURL, error: error)) - return - } - - //============================================================ - // Check 5 - can a stream be created from file URL? - //============================================================ - - guard let stream = InputStream(url: fileURL) else { - setBodyPartError(withReason: .bodyPartInputStreamCreationFailed(for: fileURL)) - return - } - - append(stream, withLength: bodyContentLength, headers: headers) - } - - /// Creates a body part from the stream and appends it to the instance. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) - /// - `Content-Type: #{mimeType}` (HTTP Header) - /// - Encoded stream data - /// - Multipart form boundary - /// - /// - Parameters: - /// - stream: `InputStream` to encode into the instance. - /// - length: Length, in bytes, of the stream. - /// - name: Name to associate with the stream content in the `Content-Disposition` HTTP header. - /// - fileName: Filename to associate with the stream content in the `Content-Disposition` HTTP header. - /// - mimeType: MIME type to associate with the stream content in the `Content-Type` HTTP header. - public func append(_ stream: InputStream, - withLength length: UInt64, - name: String, - fileName: String, - mimeType: String) { - let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) - append(stream, withLength: length, headers: headers) - } - - /// Creates a body part with the stream, length, and headers and appends it to the instance. - /// - /// The body part data will be encoded using the following format: - /// - /// - HTTP headers - /// - Encoded stream data - /// - Multipart form boundary - /// - /// - Parameters: - /// - stream: `InputStream` to encode into the instance. - /// - length: Length, in bytes, of the stream. - /// - headers: `HTTPHeaders` for the body part. - public func append(_ stream: InputStream, withLength length: UInt64, headers: HTTPHeaders) { - let bodyPart = BodyPart(headers: headers, bodyStream: stream, bodyContentLength: length) - bodyParts.append(bodyPart) - } - - // MARK: - Data Encoding - - /// Encodes all appended body parts into a single `Data` value. - /// - /// - Note: This method will load all the appended body parts into memory all at the same time. This method should - /// only be used when the encoded data will have a small memory footprint. For large data cases, please use - /// the `writeEncodedData(to:))` method. - /// - /// - Returns: The encoded `Data`, if encoding is successful. - /// - Throws: An `AFError` if encoding encounters an error. - public func encode() throws -> Data { - if let bodyPartError = bodyPartError { - throw bodyPartError - } - - var encoded = Data() - - bodyParts.first?.hasInitialBoundary = true - bodyParts.last?.hasFinalBoundary = true - - for bodyPart in bodyParts { - let encodedData = try encode(bodyPart) - encoded.append(encodedData) - } - - return encoded - } - - /// Writes all appended body parts to the given file `URL`. - /// - /// This process is facilitated by reading and writing with input and output streams, respectively. Thus, - /// this approach is very memory efficient and should be used for large body part data. - /// - /// - Parameter fileURL: File `URL` to which to write the form data. - /// - Throws: An `AFError` if encoding encounters an error. - public func writeEncodedData(to fileURL: URL) throws { - if let bodyPartError = bodyPartError { - throw bodyPartError - } - - if fileManager.fileExists(atPath: fileURL.path) { - throw AFError.multipartEncodingFailed(reason: .outputStreamFileAlreadyExists(at: fileURL)) - } else if !fileURL.isFileURL { - throw AFError.multipartEncodingFailed(reason: .outputStreamURLInvalid(url: fileURL)) - } - - guard let outputStream = OutputStream(url: fileURL, append: false) else { - throw AFError.multipartEncodingFailed(reason: .outputStreamCreationFailed(for: fileURL)) - } - - outputStream.open() - defer { outputStream.close() } - - bodyParts.first?.hasInitialBoundary = true - bodyParts.last?.hasFinalBoundary = true - - for bodyPart in bodyParts { - try write(bodyPart, to: outputStream) - } - } - - // MARK: - Private - Body Part Encoding - - private func encode(_ bodyPart: BodyPart) throws -> Data { - var encoded = Data() - - let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() - encoded.append(initialData) - - let headerData = encodeHeaders(for: bodyPart) - encoded.append(headerData) - - let bodyStreamData = try encodeBodyStream(for: bodyPart) - encoded.append(bodyStreamData) - - if bodyPart.hasFinalBoundary { - encoded.append(finalBoundaryData()) - } - - return encoded - } - - private func encodeHeaders(for bodyPart: BodyPart) -> Data { - let headerText = bodyPart.headers.map { "\($0.name): \($0.value)\(EncodingCharacters.crlf)" } - .joined() - + EncodingCharacters.crlf - - return Data(headerText.utf8) - } - - private func encodeBodyStream(for bodyPart: BodyPart) throws -> Data { - let inputStream = bodyPart.bodyStream - inputStream.open() - defer { inputStream.close() } - - var encoded = Data() - - while inputStream.hasBytesAvailable { - var buffer = [UInt8](repeating: 0, count: streamBufferSize) - let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) - - if let error = inputStream.streamError { - throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: error)) - } - - if bytesRead > 0 { - encoded.append(buffer, count: bytesRead) - } else { - break - } - } - - return encoded - } - - // MARK: - Private - Writing Body Part to Output Stream - - private func write(_ bodyPart: BodyPart, to outputStream: OutputStream) throws { - try writeInitialBoundaryData(for: bodyPart, to: outputStream) - try writeHeaderData(for: bodyPart, to: outputStream) - try writeBodyStream(for: bodyPart, to: outputStream) - try writeFinalBoundaryData(for: bodyPart, to: outputStream) - } - - private func writeInitialBoundaryData(for bodyPart: BodyPart, to outputStream: OutputStream) throws { - let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() - return try write(initialData, to: outputStream) - } - - private func writeHeaderData(for bodyPart: BodyPart, to outputStream: OutputStream) throws { - let headerData = encodeHeaders(for: bodyPart) - return try write(headerData, to: outputStream) - } - - private func writeBodyStream(for bodyPart: BodyPart, to outputStream: OutputStream) throws { - let inputStream = bodyPart.bodyStream - - inputStream.open() - defer { inputStream.close() } - - while inputStream.hasBytesAvailable { - var buffer = [UInt8](repeating: 0, count: streamBufferSize) - let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) - - if let streamError = inputStream.streamError { - throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: streamError)) - } - - if bytesRead > 0 { - if buffer.count != bytesRead { - buffer = Array(buffer[0.. 0, outputStream.hasSpaceAvailable { - let bytesWritten = outputStream.write(buffer, maxLength: bytesToWrite) - - if let error = outputStream.streamError { - throw AFError.multipartEncodingFailed(reason: .outputStreamWriteFailed(error: error)) - } - - bytesToWrite -= bytesWritten - - if bytesToWrite > 0 { - buffer = Array(buffer[bytesWritten.. String { - if - let id = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as CFString, nil)?.takeRetainedValue(), - let contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?.takeRetainedValue() { - return contentType as String - } - - return "application/octet-stream" - } - - // MARK: - Private - Content Headers - - private func contentHeaders(withName name: String, fileName: String? = nil, mimeType: String? = nil) -> HTTPHeaders { - var disposition = "form-data; name=\"\(name)\"" - if let fileName = fileName { disposition += "; filename=\"\(fileName)\"" } - - var headers: HTTPHeaders = [.contentDisposition(disposition)] - if let mimeType = mimeType { headers.add(.contentType(mimeType)) } - - return headers - } - - // MARK: - Private - Boundary Encoding - - private func initialBoundaryData() -> Data { - return BoundaryGenerator.boundaryData(forBoundaryType: .initial, boundary: boundary) - } - - private func encapsulatedBoundaryData() -> Data { - return BoundaryGenerator.boundaryData(forBoundaryType: .encapsulated, boundary: boundary) - } - - private func finalBoundaryData() -> Data { - return BoundaryGenerator.boundaryData(forBoundaryType: .final, boundary: boundary) - } - - // MARK: - Private - Errors - - private func setBodyPartError(withReason reason: AFError.MultipartEncodingFailureReason) { - guard bodyPartError == nil else { return } - bodyPartError = AFError.multipartEncodingFailed(reason: reason) - } -} diff --git a/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift b/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift deleted file mode 100644 index d2c4338..0000000 --- a/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift +++ /dev/null @@ -1,266 +0,0 @@ -// -// NetworkReachabilityManager.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. -// - -#if !(os(watchOS) || os(Linux)) - -import Foundation -import SystemConfiguration - -/// The `NetworkReachabilityManager` class listens for reachability changes of hosts and addresses for both cellular and -/// WiFi network interfaces. -/// -/// Reachability can be used to determine background information about why a network operation failed, or to retry -/// network requests when a connection is established. It should not be used to prevent a user from initiating a network -/// request, as it's possible that an initial request may be required to establish reachability. -open class NetworkReachabilityManager { - /// Defines the various states of network reachability. - public enum NetworkReachabilityStatus { - /// It is unknown whether the network is reachable. - case unknown - /// The network is not reachable. - case notReachable - /// The network is reachable on the associated `ConnectionType`. - case reachable(ConnectionType) - - init(_ flags: SCNetworkReachabilityFlags) { - guard flags.isActuallyReachable else { self = .notReachable; return } - - var networkStatus: NetworkReachabilityStatus = .reachable(.ethernetOrWiFi) - - if flags.isCellular { networkStatus = .reachable(.cellular) } - - self = networkStatus - } - - /// Defines the various connection types detected by reachability flags. - public enum ConnectionType { - /// The connection type is either over Ethernet or WiFi. - case ethernetOrWiFi - /// The connection type is a cellular connection. - case cellular - } - } - - /// A closure executed when the network reachability status changes. The closure takes a single argument: the - /// network reachability status. - public typealias Listener = (NetworkReachabilityStatus) -> Void - - /// Default `NetworkReachabilityManager` for the zero address and a `listenerQueue` of `.main`. - public static let `default` = NetworkReachabilityManager() - - // MARK: - Properties - - /// Whether the network is currently reachable. - open var isReachable: Bool { return isReachableOnCellular || isReachableOnEthernetOrWiFi } - - /// Whether the network is currently reachable over the cellular interface. - /// - /// - Note: Using this property to decide whether to make a high or low bandwidth request is not recommended. - /// Instead, set the `allowsCellularAccess` on any `URLRequest`s being issued. - /// - open var isReachableOnCellular: Bool { return status == .reachable(.cellular) } - - /// Whether the network is currently reachable over Ethernet or WiFi interface. - open var isReachableOnEthernetOrWiFi: Bool { return status == .reachable(.ethernetOrWiFi) } - - /// `DispatchQueue` on which reachability will update. - public let reachabilityQueue = DispatchQueue(label: "org.alamofire.reachabilityQueue") - - /// Flags of the current reachability type, if any. - open var flags: SCNetworkReachabilityFlags? { - var flags = SCNetworkReachabilityFlags() - - return (SCNetworkReachabilityGetFlags(reachability, &flags)) ? flags : nil - } - - /// The current network reachability status. - open var status: NetworkReachabilityStatus { - return flags.map(NetworkReachabilityStatus.init) ?? .unknown - } - - /// Mutable state storage. - struct MutableState { - /// A closure executed when the network reachability status changes. - var listener: Listener? - /// `DispatchQueue` on which listeners will be called. - var listenerQueue: DispatchQueue? - /// Previously calculated status. - var previousStatus: NetworkReachabilityStatus? - } - - /// `SCNetworkReachability` instance providing notifications. - private let reachability: SCNetworkReachability - - /// Protected storage for mutable state. - private let mutableState = Protector(MutableState()) - - // MARK: - Initialization - - /// Creates an instance with the specified host. - /// - /// - Note: The `host` value must *not* contain a scheme, just the hostname. - /// - /// - Parameters: - /// - host: Host used to evaluate network reachability. Must *not* include the scheme (e.g. `https`). - public convenience init?(host: String) { - guard let reachability = SCNetworkReachabilityCreateWithName(nil, host) else { return nil } - - self.init(reachability: reachability) - } - - /// Creates an instance that monitors the address 0.0.0.0. - /// - /// Reachability treats the 0.0.0.0 address as a special token that causes it to monitor the general routing - /// status of the device, both IPv4 and IPv6. - public convenience init?() { - var zero = sockaddr() - zero.sa_len = UInt8(MemoryLayout.size) - zero.sa_family = sa_family_t(AF_INET) - - guard let reachability = SCNetworkReachabilityCreateWithAddress(nil, &zero) else { return nil } - - self.init(reachability: reachability) - } - - private init(reachability: SCNetworkReachability) { - self.reachability = reachability - } - - deinit { - stopListening() - } - - // MARK: - Listening - - /// Starts listening for changes in network reachability status. - /// - /// - Note: Stops and removes any existing listener. - /// - /// - Parameters: - /// - queue: `DispatchQueue` on which to call the `listener` closure. `.main` by default. - /// - listener: `Listener` closure called when reachability changes. - /// - /// - Returns: `true` if listening was started successfully, `false` otherwise. - @discardableResult - open func startListening(onQueue queue: DispatchQueue = .main, - onUpdatePerforming listener: @escaping Listener) -> Bool { - stopListening() - - mutableState.write { state in - state.listenerQueue = queue - state.listener = listener - } - - var context = SCNetworkReachabilityContext(version: 0, - info: Unmanaged.passRetained(self).toOpaque(), - retain: nil, - release: nil, - copyDescription: nil) - let callback: SCNetworkReachabilityCallBack = { _, flags, info in - guard let info = info else { return } - - let instance = Unmanaged.fromOpaque(info).takeUnretainedValue() - instance.notifyListener(flags) - } - - let queueAdded = SCNetworkReachabilitySetDispatchQueue(reachability, reachabilityQueue) - let callbackAdded = SCNetworkReachabilitySetCallback(reachability, callback, &context) - - // Manually call listener to give initial state, since the framework may not. - if let currentFlags = flags { - reachabilityQueue.async { - self.notifyListener(currentFlags) - } - } - - return callbackAdded && queueAdded - } - - /// Stops listening for changes in network reachability status. - open func stopListening() { - SCNetworkReachabilitySetCallback(reachability, nil, nil) - SCNetworkReachabilitySetDispatchQueue(reachability, nil) - mutableState.write { state in - state.listener = nil - state.listenerQueue = nil - state.previousStatus = nil - } - } - - // MARK: - Internal - Listener Notification - - /// Calls the `listener` closure of the `listenerQueue` if the computed status hasn't changed. - /// - /// - Note: Should only be called from the `reachabilityQueue`. - /// - /// - Parameter flags: `SCNetworkReachabilityFlags` to use to calculate the status. - func notifyListener(_ flags: SCNetworkReachabilityFlags) { - let newStatus = NetworkReachabilityStatus(flags) - - mutableState.write { state in - guard state.previousStatus != newStatus else { return } - - state.previousStatus = newStatus - - let listener = state.listener - state.listenerQueue?.async { listener?(newStatus) } - } - } -} - -// MARK: - - -extension NetworkReachabilityManager.NetworkReachabilityStatus: Equatable {} - -extension SCNetworkReachabilityFlags { - var isReachable: Bool { return contains(.reachable) } - var isConnectionRequired: Bool { return contains(.connectionRequired) } - var canConnectAutomatically: Bool { return contains(.connectionOnDemand) || contains(.connectionOnTraffic) } - var canConnectWithoutUserInteraction: Bool { return canConnectAutomatically && !contains(.interventionRequired) } - var isActuallyReachable: Bool { return isReachable && (!isConnectionRequired || canConnectWithoutUserInteraction) } - var isCellular: Bool { -#if os(iOS) || os(tvOS) - return contains(.isWWAN) -#else - return false -#endif - } - - /// Human readable `String` for all states, to help with debugging. - var readableDescription: String { - let W = isCellular ? "W" : "-" - let R = isReachable ? "R" : "-" - let c = isConnectionRequired ? "c" : "-" - let t = contains(.transientConnection) ? "t" : "-" - let i = contains(.interventionRequired) ? "i" : "-" - let C = contains(.connectionOnTraffic) ? "C" : "-" - let D = contains(.connectionOnDemand) ? "D" : "-" - let l = contains(.isLocalAddress) ? "l" : "-" - let d = contains(.isDirect) ? "d" : "-" - let a = contains(.connectionAutomatic) ? "a" : "-" - - return "\(W)\(R) \(c)\(t)\(i)\(C)\(D)\(l)\(d)\(a)" - } -} -#endif diff --git a/Example/Pods/Alamofire/Source/Notifications.swift b/Example/Pods/Alamofire/Source/Notifications.swift deleted file mode 100644 index 4a4b25a..0000000 --- a/Example/Pods/Alamofire/Source/Notifications.swift +++ /dev/null @@ -1,115 +0,0 @@ -// -// Notifications.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. -// - -import Foundation - -public extension Request { - /// Posted when a `Request` is resumed. The `Notification` contains the resumed `Request`. - static let didResumeNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didResume") - /// Posted when a `Request` is suspended. The `Notification` contains the suspended `Request`. - static let didSuspendNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didSuspend") - /// Posted when a `Request` is cancelled. The `Notification` contains the cancelled `Request`. - static let didCancelNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didCancel") - /// Posted when a `Request` is finished. The `Notification` contains the completed `Request`. - static let didFinishNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didFinish") - - /// Posted when a `URLSessionTask` is resumed. The `Notification` contains the `Request` associated with the `URLSessionTask`. - static let didResumeTaskNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didResumeTask") - /// Posted when a `URLSessionTask` is suspended. The `Notification` contains the `Request` associated with the `URLSessionTask`. - static let didSuspendTaskNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didSuspendTask") - /// Posted when a `URLSessionTask` is cancelled. The `Notification` contains the `Request` associated with the `URLSessionTask`. - static let didCancelTaskNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didCancelTask") - /// Posted when a `URLSessionTask` is completed. The `Notification` contains the `Request` associated with the `URLSessionTask`. - static let didCompleteTaskNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didCompleteTask") -} - -// MARK: - - -extension Notification { - /// The `Request` contained by the instance's `userInfo`, `nil` otherwise. - public var request: Request? { - return userInfo?[String.requestKey] as? Request - } - - /// Convenience initializer for a `Notification` containing a `Request` payload. - /// - /// - Parameters: - /// - name: The name of the notification. - /// - request: The `Request` payload. - init(name: Notification.Name, request: Request) { - self.init(name: name, object: nil, userInfo: [String.requestKey: request]) - } -} - -extension NotificationCenter { - /// Convenience function for posting notifications with `Request` payloads. - /// - /// - Parameters: - /// - name: The name of the notification. - /// - request: The `Request` payload. - func postNotification(named name: Notification.Name, with request: Request) { - let notification = Notification(name: name, request: request) - post(notification) - } -} - -extension String { - /// User info dictionary key representing the `Request` associated with the notification. - fileprivate static let requestKey = "org.alamofire.notification.key.request" -} - -/// `EventMonitor` that provides Alamofire's notifications. -public final class AlamofireNotifications: EventMonitor { - public func requestDidResume(_ request: Request) { - NotificationCenter.default.postNotification(named: Request.didResumeNotification, with: request) - } - - public func requestDidSuspend(_ request: Request) { - NotificationCenter.default.postNotification(named: Request.didSuspendNotification, with: request) - } - - public func requestDidCancel(_ request: Request) { - NotificationCenter.default.postNotification(named: Request.didCancelNotification, with: request) - } - - public func requestDidFinish(_ request: Request) { - NotificationCenter.default.postNotification(named: Request.didFinishNotification, with: request) - } - - public func request(_ request: Request, didResumeTask task: URLSessionTask) { - NotificationCenter.default.postNotification(named: Request.didResumeTaskNotification, with: request) - } - - public func request(_ request: Request, didSuspendTask task: URLSessionTask) { - NotificationCenter.default.postNotification(named: Request.didSuspendTaskNotification, with: request) - } - - public func request(_ request: Request, didCancelTask task: URLSessionTask) { - NotificationCenter.default.postNotification(named: Request.didCancelTaskNotification, with: request) - } - - public func request(_ request: Request, didCompleteTask task: URLSessionTask, with error: AFError?) { - NotificationCenter.default.postNotification(named: Request.didCompleteTaskNotification, with: request) - } -} diff --git a/Example/Pods/Alamofire/Source/ParameterEncoding.swift b/Example/Pods/Alamofire/Source/ParameterEncoding.swift deleted file mode 100644 index fbf1701..0000000 --- a/Example/Pods/Alamofire/Source/ParameterEncoding.swift +++ /dev/null @@ -1,314 +0,0 @@ -// -// ParameterEncoding.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. -// - -import Foundation - -/// A dictionary of parameters to apply to a `URLRequest`. -public typealias Parameters = [String: Any] - -/// A type used to define how a set of parameters are applied to a `URLRequest`. -public protocol ParameterEncoding { - /// Creates a `URLRequest` by encoding parameters and applying them on the passed request. - /// - /// - Parameters: - /// - urlRequest: `URLRequestConvertible` value onto which parameters will be encoded. - /// - parameters: `Parameters` to encode onto the request. - /// - /// - Returns: The encoded `URLRequest`. - /// - Throws: Any `Error` produced during parameter encoding. - func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest -} - -// MARK: - - -/// Creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP -/// body of the URL request. Whether the query string is set or appended to any existing URL query string or set as -/// the HTTP body depends on the destination of the encoding. -/// -/// The `Content-Type` HTTP header field of an encoded request with HTTP body is set to -/// `application/x-www-form-urlencoded; charset=utf-8`. -/// -/// There is no published specification for how to encode collection types. By default the convention of appending -/// `[]` to the key for array values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for -/// nested dictionary values (`foo[bar]=baz`) is used. Optionally, `ArrayEncoding` can be used to omit the -/// square brackets appended to array keys. -/// -/// `BoolEncoding` can be used to configure how boolean values are encoded. The default behavior is to encode -/// `true` as 1 and `false` as 0. -public struct URLEncoding: ParameterEncoding { - // MARK: Helper Types - - /// Defines whether the url-encoded query string is applied to the existing query string or HTTP body of the - /// resulting URL request. - public enum Destination { - /// Applies encoded query string result to existing query string for `GET`, `HEAD` and `DELETE` requests and - /// sets as the HTTP body for requests with any other HTTP method. - case methodDependent - /// Sets or appends encoded query string result to existing query string. - case queryString - /// Sets encoded query string result as the HTTP body of the URL request. - case httpBody - - func encodesParametersInURL(for method: HTTPMethod) -> Bool { - switch self { - case .methodDependent: return [.get, .head, .delete].contains(method) - case .queryString: return true - case .httpBody: return false - } - } - } - - /// Configures how `Array` parameters are encoded. - public enum ArrayEncoding { - /// An empty set of square brackets is appended to the key for every value. This is the default behavior. - case brackets - /// No brackets are appended. The key is encoded as is. - case noBrackets - - func encode(key: String) -> String { - switch self { - case .brackets: - return "\(key)[]" - case .noBrackets: - return key - } - } - } - - /// Configures how `Bool` parameters are encoded. - public enum BoolEncoding { - /// Encode `true` as `1` and `false` as `0`. This is the default behavior. - case numeric - /// Encode `true` and `false` as string literals. - case literal - - func encode(value: Bool) -> String { - switch self { - case .numeric: - return value ? "1" : "0" - case .literal: - return value ? "true" : "false" - } - } - } - - // MARK: Properties - - /// Returns a default `URLEncoding` instance with a `.methodDependent` destination. - public static var `default`: URLEncoding { return URLEncoding() } - - /// Returns a `URLEncoding` instance with a `.queryString` destination. - public static var queryString: URLEncoding { return URLEncoding(destination: .queryString) } - - /// Returns a `URLEncoding` instance with an `.httpBody` destination. - public static var httpBody: URLEncoding { return URLEncoding(destination: .httpBody) } - - /// The destination defining where the encoded query string is to be applied to the URL request. - public let destination: Destination - - /// The encoding to use for `Array` parameters. - public let arrayEncoding: ArrayEncoding - - /// The encoding to use for `Bool` parameters. - public let boolEncoding: BoolEncoding - - // MARK: Initialization - - /// Creates an instance using the specified parameters. - /// - /// - Parameters: - /// - destination: `Destination` defining where the encoded query string will be applied. `.methodDependent` by - /// default. - /// - arrayEncoding: `ArrayEncoding` to use. `.brackets` by default. - /// - boolEncoding: `BoolEncoding` to use. `.numeric` by default. - public init(destination: Destination = .methodDependent, - arrayEncoding: ArrayEncoding = .brackets, - boolEncoding: BoolEncoding = .numeric) { - self.destination = destination - self.arrayEncoding = arrayEncoding - self.boolEncoding = boolEncoding - } - - // MARK: Encoding - - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let parameters = parameters else { return urlRequest } - - if let method = urlRequest.method, destination.encodesParametersInURL(for: method) { - guard let url = urlRequest.url else { - throw AFError.parameterEncodingFailed(reason: .missingURL) - } - - if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { - let percentEncodedQuery = (urlComponents.percentEncodedQuery.map { $0 + "&" } ?? "") + query(parameters) - urlComponents.percentEncodedQuery = percentEncodedQuery - urlRequest.url = urlComponents.url - } - } else { - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/x-www-form-urlencoded; charset=utf-8", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = Data(query(parameters).utf8) - } - - return urlRequest - } - - /// Creates a percent-escaped, URL encoded query string components from the given key-value pair recursively. - /// - /// - Parameters: - /// - key: Key of the query component. - /// - value: Value of the query component. - /// - /// - Returns: The percent-escaped, URL encoded query string components. - public func queryComponents(fromKey key: String, value: Any) -> [(String, String)] { - var components: [(String, String)] = [] - - if let dictionary = value as? [String: Any] { - for (nestedKey, value) in dictionary { - components += queryComponents(fromKey: "\(key)[\(nestedKey)]", value: value) - } - } else if let array = value as? [Any] { - for value in array { - components += queryComponents(fromKey: arrayEncoding.encode(key: key), value: value) - } - } else if let value = value as? NSNumber { - if value.isBool { - components.append((escape(key), escape(boolEncoding.encode(value: value.boolValue)))) - } else { - components.append((escape(key), escape("\(value)"))) - } - } else if let bool = value as? Bool { - components.append((escape(key), escape(boolEncoding.encode(value: bool)))) - } else { - components.append((escape(key), escape("\(value)"))) - } - - return components - } - - /// Creates a percent-escaped string following RFC 3986 for a query string key or value. - /// - /// - Parameter string: `String` to be percent-escaped. - /// - /// - Returns: The percent-escaped `String`. - public func escape(_ string: String) -> String { - return string.addingPercentEncoding(withAllowedCharacters: .afURLQueryAllowed) ?? string - } - - private func query(_ parameters: [String: Any]) -> String { - var components: [(String, String)] = [] - - for key in parameters.keys.sorted(by: <) { - let value = parameters[key]! - components += queryComponents(fromKey: key, value: value) - } - return components.map { "\($0)=\($1)" }.joined(separator: "&") - } -} - -// MARK: - - -/// Uses `JSONSerialization` to create a JSON representation of the parameters object, which is set as the body of the -/// request. The `Content-Type` HTTP header field of an encoded request is set to `application/json`. -public struct JSONEncoding: ParameterEncoding { - // MARK: Properties - - /// Returns a `JSONEncoding` instance with default writing options. - public static var `default`: JSONEncoding { return JSONEncoding() } - - /// Returns a `JSONEncoding` instance with `.prettyPrinted` writing options. - public static var prettyPrinted: JSONEncoding { return JSONEncoding(options: .prettyPrinted) } - - /// The options for writing the parameters as JSON data. - public let options: JSONSerialization.WritingOptions - - // MARK: Initialization - - /// Creates an instance using the specified `WritingOptions`. - /// - /// - Parameter options: `JSONSerialization.WritingOptions` to use. - public init(options: JSONSerialization.WritingOptions = []) { - self.options = options - } - - // MARK: Encoding - - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let parameters = parameters else { return urlRequest } - - do { - let data = try JSONSerialization.data(withJSONObject: parameters, options: options) - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = data - } catch { - throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: error)) - } - - return urlRequest - } - - /// Encodes any JSON compatible object into a `URLRequest`. - /// - /// - Parameters: - /// - urlRequest: `URLRequestConvertible` value into which the object will be encoded. - /// - jsonObject: `Any` value (must be JSON compatible` to be encoded into the `URLRequest`. `nil` by default. - /// - /// - Returns: The encoded `URLRequest`. - /// - Throws: Any `Error` produced during encoding. - public func encode(_ urlRequest: URLRequestConvertible, withJSONObject jsonObject: Any? = nil) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let jsonObject = jsonObject else { return urlRequest } - - do { - let data = try JSONSerialization.data(withJSONObject: jsonObject, options: options) - - if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil { - urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type") - } - - urlRequest.httpBody = data - } catch { - throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: error)) - } - - return urlRequest - } -} - -// MARK: - - -extension NSNumber { - fileprivate var isBool: Bool { return CFBooleanGetTypeID() == CFGetTypeID(self) } -} diff --git a/Example/Pods/Alamofire/Source/Request.swift b/Example/Pods/Alamofire/Source/Request.swift deleted file mode 100644 index e640f61..0000000 --- a/Example/Pods/Alamofire/Source/Request.swift +++ /dev/null @@ -1,1453 +0,0 @@ -// -// Request.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. -// - -import Foundation - -/// `Request` is the common superclass of all Alamofire request types and provides common state, delegate, and callback -/// handling. -public class Request { - /// State of the `Request`, with managed transitions between states set when calling `resume()`, `suspend()`, or - /// `cancel()` on the `Request`. - public enum State { - /// Initial state of the `Request`. - case initialized - /// `State` set when `resume()` is called. Any tasks created for the `Request` will have `resume()` called on - /// them in this state. - case resumed - /// `State` set when `suspend()` is called. Any tasks created for the `Request` will have `suspend()` called on - /// them in this state. - case suspended - /// `State` set when `cancel()` is called. Any tasks created for the `Request` will have `cancel()` called on - /// them. Unlike `resumed` or `suspended`, once in the `cancelled` state, the `Request` can no longer transition - /// to any other state. - case cancelled - /// `State` set when all response serialization completion closures have been cleared on the `Request` and - /// enqueued on their respective queues. - case finished - - /// Determines whether `self` can be transitioned to the provided `State`. - func canTransitionTo(_ state: State) -> Bool { - switch (self, state) { - case (.initialized, _): - return true - case (_, .initialized), (.cancelled, _), (.finished, _): - return false - case (.resumed, .cancelled), (.suspended, .cancelled), (.resumed, .suspended), (.suspended, .resumed): - return true - case (.suspended, .suspended), (.resumed, .resumed): - return false - case (_, .finished): - return true - } - } - } - - // MARK: - Initial State - - /// `UUID` prividing a unique identifier for the `Request`, used in the `Hashable` and `Equatable` conformances. - public let id: UUID - /// The serial queue for all internal async actions. - public let underlyingQueue: DispatchQueue - /// The queue used for all serialization actions. By default it's a serial queue that targets `underlyingQueue`. - public let serializationQueue: DispatchQueue - /// `EventMonitor` used for event callbacks. - public let eventMonitor: EventMonitor? - /// The `Request`'s interceptor. - public let interceptor: RequestInterceptor? - /// The `Request`'s delegate. - public private(set) weak var delegate: RequestDelegate? - - // MARK: - Mutable State - - /// Type encapsulating all mutable state that may need to be accessed from anything other than the `underlyingQueue`. - struct MutableState { - /// State of the `Request`. - var state: State = .initialized - /// `ProgressHandler` and `DispatchQueue` provided for upload progress callbacks. - var uploadProgressHandler: (handler: ProgressHandler, queue: DispatchQueue)? - /// `ProgressHandler` and `DispatchQueue` provided for download progress callbacks. - var downloadProgressHandler: (handler: ProgressHandler, queue: DispatchQueue)? - /// `RedirectHandler` provided for to handle request redirection. - var redirectHandler: RedirectHandler? - /// `CachedResponseHandler` provided to handle response caching. - var cachedResponseHandler: CachedResponseHandler? - /// Closure called when the `Request` is able to create a cURL description of itself. - var cURLHandler: ((String) -> Void)? - /// Response serialization closures that handle response parsing. - var responseSerializers: [() -> Void] = [] - /// Response serialization completion closures executed once all response serializers are complete. - var responseSerializerCompletions: [() -> Void] = [] - /// Whether response serializer processing is finished. - var responseSerializerProcessingFinished = false - /// `URLCredential` used for authentication challenges. - var credential: URLCredential? - /// All `URLRequest`s created by Alamofire on behalf of the `Request`. - var requests: [URLRequest] = [] - /// All `URLSessionTask`s created by Alamofire on behalf of the `Request`. - var tasks: [URLSessionTask] = [] - /// All `URLSessionTaskMetrics` values gathered by Alamofire on behalf of the `Request`. Should correspond - /// exactly the the `tasks` created. - var metrics: [URLSessionTaskMetrics] = [] - /// Number of times any retriers provided retried the `Request`. - var retryCount = 0 - /// Final `AFError` for the `Request`, whether from various internal Alamofire calls or as a result of a `task`. - var error: AFError? - } - - /// Protected `MutableState` value that provides threadsafe access to state values. - fileprivate let protectedMutableState: Protector = Protector(MutableState()) - - /// `State` of the `Request`. - public var state: State { return protectedMutableState.directValue.state } - /// Returns whether `state` is `.initialized`. - public var isInitialized: Bool { return state == .initialized } - /// Returns whether `state is `.resumed`. - public var isResumed: Bool { return state == .resumed } - /// Returns whether `state` is `.suspended`. - public var isSuspended: Bool { return state == .suspended } - /// Returns whether `state` is `.cancelled`. - public var isCancelled: Bool { return state == .cancelled } - /// Returns whether `state` is `.finished`. - public var isFinished: Bool { return state == .finished } - - // MARK: Progress - - /// Closure type executed when monitoring the upload or download progress of a request. - public typealias ProgressHandler = (Progress) -> Void - - /// `Progress` of the upload of the body of the executed `URLRequest`. Reset to `0` if the `Request` is retried. - public let uploadProgress = Progress(totalUnitCount: 0) - /// `Progress` of the download of any response data. Reset to `0` if the `Request` is retried. - public let downloadProgress = Progress(totalUnitCount: 0) - /// `ProgressHandler` called when `uploadProgress` is updated, on the provided `DispatchQueue`. - fileprivate var uploadProgressHandler: (handler: ProgressHandler, queue: DispatchQueue)? { - get { return protectedMutableState.directValue.uploadProgressHandler } - set { protectedMutableState.write { $0.uploadProgressHandler = newValue } } - } - - /// `ProgressHandler` called when `downloadProgress` is updated, on the provided `DispatchQueue`. - fileprivate var downloadProgressHandler: (handler: ProgressHandler, queue: DispatchQueue)? { - get { return protectedMutableState.directValue.downloadProgressHandler } - set { protectedMutableState.write { $0.downloadProgressHandler = newValue } } - } - - // MARK: Redirect Handling - - /// `RedirectHandler` set on the instance. - public private(set) var redirectHandler: RedirectHandler? { - get { return protectedMutableState.directValue.redirectHandler } - set { protectedMutableState.write { $0.redirectHandler = newValue } } - } - - // MARK: Cached Response Handling - - /// `CachedResponseHandler` set on the instance. - public private(set) var cachedResponseHandler: CachedResponseHandler? { - get { return protectedMutableState.directValue.cachedResponseHandler } - set { protectedMutableState.write { $0.cachedResponseHandler = newValue } } - } - - // MARK: URLCredential - - /// `URLCredential` used for authentication challenges. Created by calling one of the `authenticate` methods. - public private(set) var credential: URLCredential? { - get { return protectedMutableState.directValue.credential } - set { protectedMutableState.write { $0.credential = newValue } } - } - - // MARK: Validators - - /// `Validator` callback closures that store the validation calls enqueued. - fileprivate var protectedValidators: Protector<[() -> Void]> = Protector([]) - - // MARK: URLRequests - - /// All `URLRequests` created on behalf of the `Request`, including original and adapted requests. - public var requests: [URLRequest] { return protectedMutableState.directValue.requests } - /// First `URLRequest` created on behalf of the `Request`. May not be the first one actually executed. - public var firstRequest: URLRequest? { return requests.first } - /// Last `URLRequest` created on behalf of the `Request`. - public var lastRequest: URLRequest? { return requests.last } - /// Current `URLRequest` created on behalf of the `Request`. - public var request: URLRequest? { return lastRequest } - - /// `URLRequest`s from all of the `URLSessionTask`s executed on behalf of the `Request`. May be different from - /// `requests` due to `URLSession` manipulation. - public var performedRequests: [URLRequest] { - return protectedMutableState.read { $0.tasks.compactMap { $0.currentRequest } } - } - - // MARK: HTTPURLResponse - - /// `HTTPURLResponse` received from the server, if any. If the `Request` was retried, this is the response of the - /// last `URLSessionTask`. - public var response: HTTPURLResponse? { return lastTask?.response as? HTTPURLResponse } - - // MARK: Tasks - - /// All `URLSessionTask`s created on behalf of the `Request`. - public var tasks: [URLSessionTask] { return protectedMutableState.directValue.tasks } - /// First `URLSessionTask` created on behalf of the `Request`. - public var firstTask: URLSessionTask? { return tasks.first } - /// Last `URLSessionTask` crated on behalf of the `Request`. - public var lastTask: URLSessionTask? { return tasks.last } - /// Current `URLSessionTask` created on behalf of the `Request`. - public var task: URLSessionTask? { return lastTask } - - // MARK: Metrics - - /// All `URLSessionTaskMetrics` gathered on behalf of the `Request`. Should correspond to the `tasks` created. - public var allMetrics: [URLSessionTaskMetrics] { return protectedMutableState.directValue.metrics } - /// First `URLSessionTaskMetrics` gathered on behalf of the `Request`. - public var firstMetrics: URLSessionTaskMetrics? { return allMetrics.first } - /// Last `URLSessionTaskMetrics` gathered on behalf of the `Request`. - public var lastMetrics: URLSessionTaskMetrics? { return allMetrics.last } - /// Current `URLSessionTaskMetrics` gathered on behalf of the `Request`. - public var metrics: URLSessionTaskMetrics? { return lastMetrics } - - // MARK: Retry Count - - /// Number of times the `Request` has been retried. - public var retryCount: Int { return protectedMutableState.directValue.retryCount } - - // MARK: Error - - /// `Error` returned from Alamofire internally, from the network request directly, or any validators executed. - public fileprivate(set) var error: AFError? { - get { return protectedMutableState.directValue.error } - set { protectedMutableState.write { $0.error = newValue } } - } - - /// Default initializer for the `Request` superclass. - /// - /// - Parameters: - /// - id: `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` by default. - /// - underlyingQueue: `DispatchQueue` on which all internal `Request` work is performed. - /// - serializationQueue: `DispatchQueue` on which all serialization work is performed. By default targets - /// `underlyingQueue`, but can be passed another queue from a `Session`. - /// - eventMonitor: `EventMonitor` called for event callbacks from internal `Request` actions. - /// - interceptor: `RequestInterceptor` used throughout the request lifecycle. - /// - delegate: `RequestDelegate` that provides an interface to actions not performed by the `Request`. - init(id: UUID = UUID(), - underlyingQueue: DispatchQueue, - serializationQueue: DispatchQueue, - eventMonitor: EventMonitor?, - interceptor: RequestInterceptor?, - delegate: RequestDelegate) { - self.id = id - self.underlyingQueue = underlyingQueue - self.serializationQueue = serializationQueue - self.eventMonitor = eventMonitor - self.interceptor = interceptor - self.delegate = delegate - } - - // MARK: - Internal Event API - - // All API must be called from underlyingQueue. - - /// Called when a initial `URLRequest` has been created on behalf of the instance. If a `RequestAdapter` is active, - /// the `URLRequest` will be adapted before being issued. - /// - /// - Parameter request: The `URLRequest` created. - func didCreateInitialURLRequest(_ request: URLRequest) { - protectedMutableState.write { $0.requests.append(request) } - - eventMonitor?.request(self, didCreateInitialURLRequest: request) - } - - /// Called when initial `URLRequest` creation has failed, typically through a `URLRequestConvertible`. - /// - /// - Note: Triggers retry. - /// - /// - Parameter error: `AFError` thrown from the failed creation. - func didFailToCreateURLRequest(with error: AFError) { - self.error = error - - eventMonitor?.request(self, didFailToCreateURLRequestWithError: error) - - callCURLHandlerIfNecessary() - - retryOrFinish(error: error) - } - - /// Called when a `RequestAdapter` has successfully adapted a `URLRequest`. - /// - /// - Parameters: - /// - initialRequest: The `URLRequest` that was adapted. - /// - adaptedRequest: The `URLRequest` returned by the `RequestAdapter`. - func didAdaptInitialRequest(_ initialRequest: URLRequest, to adaptedRequest: URLRequest) { - protectedMutableState.write { $0.requests.append(adaptedRequest) } - - eventMonitor?.request(self, didAdaptInitialRequest: initialRequest, to: adaptedRequest) - } - - /// Called when a `RequestAdapter` fails to adapt a `URLRequest`. - /// - /// - Note: Triggers retry. - /// - /// - Parameters: - /// - request: The `URLRequest` the adapter was called with. - /// - error: The `AFError` returned by the `RequestAdapter`. - func didFailToAdaptURLRequest(_ request: URLRequest, withError error: AFError) { - self.error = error - - eventMonitor?.request(self, didFailToAdaptURLRequest: request, withError: error) - - callCURLHandlerIfNecessary() - - retryOrFinish(error: error) - } - - /// Final `URLRequest` has been created for the instance. - /// - /// - Parameter request: The `URLRequest` created. - func didCreateURLRequest(_ request: URLRequest) { - eventMonitor?.request(self, didCreateURLRequest: request) - - callCURLHandlerIfNecessary() - } - - /// Asynchronously calls any stored `cURLHandler` and then removes it from `mutableState`. - private func callCURLHandlerIfNecessary() { - protectedMutableState.write { mutableState in - guard let cURLHandler = mutableState.cURLHandler else { return } - - self.underlyingQueue.async { cURLHandler(self.cURLDescription()) } - mutableState.cURLHandler = nil - } - } - - /// Called when a `URLSessionTask` is created on behalf of the instance. - /// - /// - Parameter task: The `URLSessionTask` created. - func didCreateTask(_ task: URLSessionTask) { - protectedMutableState.write { $0.tasks.append(task) } - - eventMonitor?.request(self, didCreateTask: task) - } - - /// Called when resumption is completed. - func didResume() { - eventMonitor?.requestDidResume(self) - } - - /// Called when a `URLSessionTask` is resumed on behalf of the instance. - /// - /// - Parameter task: The `URLSessionTask` resumed. - func didResumeTask(_ task: URLSessionTask) { - eventMonitor?.request(self, didResumeTask: task) - } - - /// Called when suspension is completed. - func didSuspend() { - eventMonitor?.requestDidSuspend(self) - } - - /// Called when a `URLSessionTask` is suspended on behalf of the instance. - /// - /// - Parameter task: The `URLSessionTask` suspended. - func didSuspendTask(_ task: URLSessionTask) { - eventMonitor?.request(self, didSuspendTask: task) - } - - /// Called when cancellation is completed, sets `error` to `AFError.explicitlyCancelled`. - func didCancel() { - error = AFError.explicitlyCancelled - - eventMonitor?.requestDidCancel(self) - } - - /// Called when a `URLSessionTask` is cancelled on behalf of the instance. - /// - /// - Parameter task: The `URLSessionTask` cancelled. - func didCancelTask(_ task: URLSessionTask) { - eventMonitor?.request(self, didCancelTask: task) - } - - /// Called when a `URLSessionTaskMetrics` value is gathered on behalf of the instance. - /// - /// - Parameter metrics: The `URLSessionTaskMetrics` gathered. - func didGatherMetrics(_ metrics: URLSessionTaskMetrics) { - protectedMutableState.write { $0.metrics.append(metrics) } - - eventMonitor?.request(self, didGatherMetrics: metrics) - } - - /// Called when a `URLSessionTask` fails before it is finished, typically during certificate pinning. - /// - /// - Parameters: - /// - task: The `URLSessionTask` which failed. - /// - error: The early failure `AFError`. - func didFailTask(_ task: URLSessionTask, earlyWithError error: AFError) { - self.error = error - - // Task will still complete, so didCompleteTask(_:with:) will handle retry. - eventMonitor?.request(self, didFailTask: task, earlyWithError: error) - } - - /// Called when a `URLSessionTask` completes. All tasks will eventually call this method. - /// - /// - Note: Response validation is synchronously triggered in this step. - /// - /// - Parameters: - /// - task: The `URLSessionTask` which completed. - /// - error: The `AFError` `task` may have completed with. If `error` has already been set on the instance, this - /// value is ignored. - func didCompleteTask(_ task: URLSessionTask, with error: AFError?) { - self.error = self.error ?? error - protectedValidators.directValue.forEach { $0() } - - eventMonitor?.request(self, didCompleteTask: task, with: error) - - retryOrFinish(error: self.error) - } - - /// Called when the `RequestDelegate` is going to retry this `Request`. Calls `reset()`. - func prepareForRetry() { - protectedMutableState.write { $0.retryCount += 1 } - - reset() - - eventMonitor?.requestIsRetrying(self) - } - - /// Called to determine whether retry will be triggered for the particular error, or whether the instance should - /// call `finish()`. - /// - /// - Parameter error: The possible `AFError` which may trigger retry. - func retryOrFinish(error: AFError?) { - guard let error = error, let delegate = delegate else { finish(); return } - - delegate.retryResult(for: self, dueTo: error) { retryResult in - switch retryResult { - case .doNotRetry: - self.finish() - case let .doNotRetryWithError(retryError): - self.finish(error: retryError.asAFError(orFailWith: "Received retryError was not already AFError")) - case .retry, .retryWithDelay: - delegate.retryRequest(self, withDelay: retryResult.delay) - } - } - } - - /// Finishes this `Request` and starts the response serializers. - /// - /// - Parameter error: The possible `Error` with which the instance will finish. - func finish(error: AFError? = nil) { - if let error = error { self.error = error } - - // Start response handlers - processNextResponseSerializer() - - eventMonitor?.requestDidFinish(self) - } - - /// Appends the response serialization closure to the instance. - /// - /// - Parameter closure: The closure containing the response serialization call. - func appendResponseSerializer(_ closure: @escaping () -> Void) { - protectedMutableState.write { mutableState in - mutableState.responseSerializers.append(closure) - - if mutableState.state == .finished { - mutableState.state = .resumed - } - - if mutableState.responseSerializerProcessingFinished { - underlyingQueue.async { self.processNextResponseSerializer() } - } - } - } - - /// Returns the next response serializer closure to execute if there's one left. - /// - /// - Returns: The next response serialization closure, if there is one. - func nextResponseSerializer() -> (() -> Void)? { - var responseSerializer: (() -> Void)? - - protectedMutableState.write { mutableState in - let responseSerializerIndex = mutableState.responseSerializerCompletions.count - - if responseSerializerIndex < mutableState.responseSerializers.count { - responseSerializer = mutableState.responseSerializers[responseSerializerIndex] - } - } - - return responseSerializer - } - - /// Processes the next response serializer and calls all completions if response serialization is complete. - func processNextResponseSerializer() { - guard let responseSerializer = nextResponseSerializer() else { - // Execute all response serializer completions and clear them - var completions: [() -> Void] = [] - - protectedMutableState.write { mutableState in - completions = mutableState.responseSerializerCompletions - - // Clear out all response serializers and response serializer completions in mutable state since the - // request is complete. It's important to do this prior to calling the completion closures in case - // the completions call back into the request triggering a re-processing of the response serializers. - // An example of how this can happen is by calling cancel inside a response completion closure. - mutableState.responseSerializers.removeAll() - mutableState.responseSerializerCompletions.removeAll() - - if mutableState.state.canTransitionTo(.finished) { - mutableState.state = .finished - } - - mutableState.responseSerializerProcessingFinished = true - } - - completions.forEach { $0() } - - // Cleanup the request - cleanup() - - return - } - - serializationQueue.async { responseSerializer() } - } - - /// Notifies the `Request` that the response serializer is complete. - /// - /// - Parameter completion: The completion handler provided with the response serilizer, called when all serializers - /// are complete. - func responseSerializerDidComplete(completion: @escaping () -> Void) { - protectedMutableState.write { $0.responseSerializerCompletions.append(completion) } - processNextResponseSerializer() - } - - /// Resets all task and response serializer related state for retry. - func reset() { - error = nil - - uploadProgress.totalUnitCount = 0 - uploadProgress.completedUnitCount = 0 - downloadProgress.totalUnitCount = 0 - downloadProgress.completedUnitCount = 0 - - protectedMutableState.write { $0.responseSerializerCompletions = [] } - } - - /// Called when updating the upload progress. - /// - /// - Parameters: - /// - totalBytesSent: Total bytes sent so far. - /// - totalBytesExpectedToSend: Total bytes expected to send. - func updateUploadProgress(totalBytesSent: Int64, totalBytesExpectedToSend: Int64) { - uploadProgress.totalUnitCount = totalBytesExpectedToSend - uploadProgress.completedUnitCount = totalBytesSent - - uploadProgressHandler?.queue.async { self.uploadProgressHandler?.handler(self.uploadProgress) } - } - - /// Perform a closure on the current `state` while locked. - /// - /// - Parameter perform: The closure to perform. - func withState(perform: (State) -> Void) { - protectedMutableState.withState(perform: perform) - } - - // MARK: Task Creation - - /// Called when creating a `URLSessionTask` for this `Request`. Subclasses must override. - /// - /// - Parameters: - /// - request: `URLRequest` to use to create the `URLSessionTask`. - /// - session: `URLSession` which creates the `URLSessionTask`. - /// - /// - Returns: The `URLSessionTask` created. - func task(for request: URLRequest, using session: URLSession) -> URLSessionTask { - fatalError("Subclasses must override.") - } - - // MARK: - Public API - - // These APIs are callable from any queue. - - // MARK: State - - /// Cancels the instance. Once cancelled, a `Request` can no longer be resumed or suspended. - /// - /// - Returns: The instance. - @discardableResult - public func cancel() -> Self { - protectedMutableState.write { mutableState in - guard mutableState.state.canTransitionTo(.cancelled) else { return } - - mutableState.state = .cancelled - - underlyingQueue.async { self.didCancel() } - - guard let task = mutableState.tasks.last, task.state != .completed else { - underlyingQueue.async { self.finish() } - return - } - - // Resume to ensure metrics are gathered. - task.resume() - task.cancel() - underlyingQueue.async { self.didCancelTask(task) } - } - - return self - } - - /// Suspends the instance. - /// - /// - Returns: The instance. - @discardableResult - public func suspend() -> Self { - protectedMutableState.write { mutableState in - guard mutableState.state.canTransitionTo(.suspended) else { return } - - mutableState.state = .suspended - - underlyingQueue.async { self.didSuspend() } - - guard let task = mutableState.tasks.last, task.state != .completed else { return } - - task.suspend() - underlyingQueue.async { self.didSuspendTask(task) } - } - - return self - } - - /// Resumes the instance. - /// - /// - Returns: The instance. - @discardableResult - public func resume() -> Self { - protectedMutableState.write { mutableState in - guard mutableState.state.canTransitionTo(.resumed) else { return } - - mutableState.state = .resumed - - underlyingQueue.async { self.didResume() } - - guard let task = mutableState.tasks.last, task.state != .completed else { return } - - task.resume() - underlyingQueue.async { self.didResumeTask(task) } - } - - return self - } - - // MARK: - Closure API - - /// Associates a credential using the provided values with the instance. - /// - /// - Parameters: - /// - username: The username. - /// - password: The password. - /// - persistence: The `URLCredential.Persistence` for the created `URLCredential`. `.forSession` by default. - /// - /// - Returns: The instance. - @discardableResult - public func authenticate(username: String, password: String, persistence: URLCredential.Persistence = .forSession) -> Self { - let credential = URLCredential(user: username, password: password, persistence: persistence) - - return authenticate(with: credential) - } - - /// Associates the provided credential with the instance. - /// - /// - Parameter credential: The `URLCredential`. - /// - /// - Returns: The instance. - @discardableResult - public func authenticate(with credential: URLCredential) -> Self { - protectedMutableState.write { $0.credential = credential } - - return self - } - - /// Sets a closure to be called periodically during the lifecycle of the instance as data is read from the server. - /// - /// - Note: Only the last closure provided is used. - /// - /// - Parameters: - /// - queue: The `DispatchQueue` to execute the closure on. `.main` by default. - /// - closure: The closure to be executed periodically as data is read from the server. - /// - /// - Returns: The instance. - @discardableResult - public func downloadProgress(queue: DispatchQueue = .main, closure: @escaping ProgressHandler) -> Self { - protectedMutableState.write { $0.downloadProgressHandler = (handler: closure, queue: queue) } - - return self - } - - /// Sets a closure to be called periodically during the lifecycle of the instance as data is sent to the server. - /// - /// - Note: Only the last closure provided is used. - /// - /// - Parameters: - /// - queue: The `DispatchQueue` to execute the closure on. `.main` by default. - /// - closure: The closure to be executed periodically as data is sent to the server. - /// - /// - Returns: The instance. - @discardableResult - public func uploadProgress(queue: DispatchQueue = .main, closure: @escaping ProgressHandler) -> Self { - protectedMutableState.write { $0.uploadProgressHandler = (handler: closure, queue: queue) } - - return self - } - - // MARK: Redirects - - /// Sets the redirect handler for the instance which will be used if a redirect response is encountered. - /// - /// - Note: Attempting to set the redirect handler more than once is a logic error and will crash. - /// - /// - Parameter handler: The `RedirectHandler`. - /// - /// - Returns: The instance. - @discardableResult - public func redirect(using handler: RedirectHandler) -> Self { - protectedMutableState.write { mutableState in - precondition(mutableState.redirectHandler == nil, "Redirect handler has already been set.") - mutableState.redirectHandler = handler - } - - return self - } - - // MARK: Cached Responses - - /// Sets the cached response handler for the `Request` which will be used when attempting to cache a response. - /// - /// - Note: Attempting to set the cache handler more than once is a logic error and will crash. - /// - /// - Parameter handler: The `CachedResponseHandler`. - /// - /// - Returns: The instance. - @discardableResult - public func cacheResponse(using handler: CachedResponseHandler) -> Self { - protectedMutableState.write { mutableState in - precondition(mutableState.cachedResponseHandler == nil, "Cached response handler has already been set.") - mutableState.cachedResponseHandler = handler - } - - return self - } - - /// Sets a handler to be called when the cURL description of the request is available. - /// - /// - Note: When waiting for a `Request`'s `URLRequest` to be created, only the last `handler` will be called. - /// - /// - Parameter handler: Closure to be called when the cURL description is available. - /// - /// - Returns: The instance. - @discardableResult - public func cURLDescription(calling handler: @escaping (String) -> Void) -> Self { - protectedMutableState.write { mutableState in - if mutableState.requests.last != nil { - underlyingQueue.async { handler(self.cURLDescription()) } - } else { - mutableState.cURLHandler = handler - } - } - - return self - } - - // MARK: Cleanup - - /// Final cleanup step executed when the instance finishes response serialization. - func cleanup() { - delegate?.cleanup(after: self) - // No-op: override in subclass - } -} - -// MARK: - Protocol Conformances - -extension Request: Equatable { - public static func ==(lhs: Request, rhs: Request) -> Bool { - return lhs.id == rhs.id - } -} - -extension Request: Hashable { - public func hash(into hasher: inout Hasher) { - hasher.combine(id) - } -} - -extension Request: CustomStringConvertible { - /// A textual representation of this instance, including the `HTTPMethod` and `URL` if the `URLRequest` has been - /// created, as well as the response status code, if a response has been received. - public var description: String { - guard let request = performedRequests.last ?? lastRequest, - let url = request.url, - let method = request.httpMethod else { return "No request created yet." } - - let requestDescription = "\(method) \(url.absoluteString)" - - return response.map { "\(requestDescription) (\($0.statusCode))" } ?? requestDescription - } -} - -extension Request { - /// cURL representation of the instance. - /// - /// - Returns: The cURL equivalent of the instance. - public func cURLDescription() -> String { - guard - let request = lastRequest, - let url = request.url, - let host = url.host, - let method = request.httpMethod else { return "$ curl command could not be created" } - - var components = ["$ curl -v"] - - components.append("-X \(method)") - - if let credentialStorage = delegate?.sessionConfiguration.urlCredentialStorage { - let protectionSpace = URLProtectionSpace(host: host, - port: url.port ?? 0, - protocol: url.scheme, - realm: host, - authenticationMethod: NSURLAuthenticationMethodHTTPBasic) - - if let credentials = credentialStorage.credentials(for: protectionSpace)?.values { - for credential in credentials { - guard let user = credential.user, let password = credential.password else { continue } - components.append("-u \(user):\(password)") - } - } else { - if let credential = credential, let user = credential.user, let password = credential.password { - components.append("-u \(user):\(password)") - } - } - } - - if let configuration = delegate?.sessionConfiguration, configuration.httpShouldSetCookies { - if - let cookieStorage = configuration.httpCookieStorage, - let cookies = cookieStorage.cookies(for: url), !cookies.isEmpty { - let allCookies = cookies.map { "\($0.name)=\($0.value)" }.joined(separator: ";") - - components.append("-b \"\(allCookies)\"") - } - } - - var headers: [String: String] = [:] - - if let additionalHeaders = delegate?.sessionConfiguration.httpAdditionalHeaders as? [String: String] { - for (field, value) in additionalHeaders where field != "Cookie" { - headers[field] = value - } - } - - if let headerFields = request.allHTTPHeaderFields { - for (field, value) in headerFields where field != "Cookie" { - headers[field] = value - } - } - - for (field, value) in headers { - let escapedValue = value.replacingOccurrences(of: "\"", with: "\\\"") - components.append("-H \"\(field): \(escapedValue)\"") - } - - if let httpBodyData = request.httpBody, let httpBody = String(data: httpBodyData, encoding: .utf8) { - var escapedBody = httpBody.replacingOccurrences(of: "\\\"", with: "\\\\\"") - escapedBody = escapedBody.replacingOccurrences(of: "\"", with: "\\\"") - - components.append("-d \"\(escapedBody)\"") - } - - components.append("\"\(url.absoluteString)\"") - - return components.joined(separator: " \\\n\t") - } -} - -/// Protocol abstraction for `Request`'s communication back to the `SessionDelegate`. -public protocol RequestDelegate: AnyObject { - /// `URLSessionConfiguration` used to create the underlying `URLSessionTask`s. - var sessionConfiguration: URLSessionConfiguration { get } - - /// Notifies the delegate the `Request` has reached a point where it needs cleanup. - /// - /// - Parameter request: The `Request` to cleanup after. - func cleanup(after request: Request) - - /// Asynchronously ask the delegate whether a `Request` will be retried. - /// - /// - Parameters: - /// - request: `Request` which failed. - /// - error: `Error` which produced the failure. - /// - completion: Closure taking the `RetryResult` for evaluation. - func retryResult(for request: Request, dueTo error: AFError, completion: @escaping (RetryResult) -> Void) - - /// Asynchronously retry the `Request`. - /// - /// - Parameters: - /// - request: `Request` which will be retried. - /// - timeDelay: `TimeInterval` after which the retry will be triggered. - func retryRequest(_ request: Request, withDelay timeDelay: TimeInterval?) -} - -// MARK: - Subclasses - -// MARK: - DataRequest - -/// `Request` subclass which handles in-memory `Data` download using `URLSessionDataTask`. -public class DataRequest: Request { - /// `URLRequestConvertible` value used to create `URLRequest`s for this instance. - public let convertible: URLRequestConvertible - /// `Data` read from the server so far. - public var data: Data? { return protectedData.directValue } - - /// Protected storage for the `Data` read by the instance. - private var protectedData: Protector = Protector(nil) - - /// Creates a `DataRequest` using the provided parameters. - /// - /// - Parameters: - /// - id: `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` by default. - /// - convertible: `URLRequestConvertible` value used to create `URLRequest`s for this instance. - /// - underlyingQueue: `DispatchQueue` on which all internal `Request` work is performed. - /// - serializationQueue: `DispatchQueue` on which all serialization work is performed. By default targets - /// `underlyingQueue`, but can be passed another queue from a `Session`. - /// - eventMonitor: `EventMonitor` called for event callbacks from internal `Request` actions. - /// - interceptor: `RequestInterceptor` used throughout the request lifecycle. - /// - delegate: `RequestDelegate` that provides an interface to actions not performed by the `Request`. - init(id: UUID = UUID(), - convertible: URLRequestConvertible, - underlyingQueue: DispatchQueue, - serializationQueue: DispatchQueue, - eventMonitor: EventMonitor?, - interceptor: RequestInterceptor?, - delegate: RequestDelegate) { - self.convertible = convertible - - super.init(id: id, - underlyingQueue: underlyingQueue, - serializationQueue: serializationQueue, - eventMonitor: eventMonitor, - interceptor: interceptor, - delegate: delegate) - } - - override func reset() { - super.reset() - - protectedData.directValue = nil - } - - /// Called when `Data` is received by this instance. - /// - /// - Note: Also calls `updateDownloadProgress`. - /// - /// - Parameter data: The `Data` received. - func didReceive(data: Data) { - if self.data == nil { - protectedData.directValue = data - } else { - protectedData.append(data) - } - - updateDownloadProgress() - } - - override func task(for request: URLRequest, using session: URLSession) -> URLSessionTask { - let copiedRequest = request - return session.dataTask(with: copiedRequest) - } - - /// Called to updated the `downloadProgress` of the instance. - func updateDownloadProgress() { - let totalBytesReceived = Int64(data?.count ?? 0) - let totalBytesExpected = task?.response?.expectedContentLength ?? NSURLSessionTransferSizeUnknown - - downloadProgress.totalUnitCount = totalBytesExpected - downloadProgress.completedUnitCount = totalBytesReceived - - downloadProgressHandler?.queue.async { self.downloadProgressHandler?.handler(self.downloadProgress) } - } - - /// Validates the request, using the specified closure. - /// - /// - Note: If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - Parameter validation: `Validation` closure used to validate the response. - /// - /// - Returns: The instance. - @discardableResult - public func validate(_ validation: @escaping Validation) -> Self { - let validator: () -> Void = { [unowned self] in - guard self.error == nil, let response = self.response else { return } - - let result = validation(self.request, response, self.data) - - if case let .failure(error) = result { self.error = error.asAFError(or: .responseValidationFailed(reason: .customValidationFailed(error: error))) } - - self.eventMonitor?.request(self, - didValidateRequest: self.request, - response: response, - data: self.data, - withResult: result) - } - - protectedValidators.append(validator) - - return self - } -} - -// MARK: - DownloadRequest - -/// `Request` subclass which downloads `Data` to a file on disk using `URLSessionDownloadTask`. -public class DownloadRequest: Request { - /// A set of options to be executed prior to moving a downloaded file from the temporary `URL` to the destination - /// `URL`. - public struct Options: OptionSet { - /// Specifies that intermediate directories for the destination URL should be created. - public static let createIntermediateDirectories = Options(rawValue: 1 << 0) - /// Specifies that any previous file at the destination `URL` should be removed. - public static let removePreviousFile = Options(rawValue: 1 << 1) - - /// Returns the raw bitmask value of the option and satisfies the `RawRepresentable` protocol. - public let rawValue: Int - - public init(rawValue: Int) { - self.rawValue = rawValue - } - } - - // MARK: Destination - - /// A closure executed once a download request has successfully completed in order to determine where to move the - /// temporary file written to during the download process. The closure takes two arguments: the temporary file URL - /// and the URL response, and returns a two arguments: the file URL where the temporary file should be moved and - /// the options defining how the file should be moved. - public typealias Destination = (_ temporaryURL: URL, - _ response: HTTPURLResponse) -> (destinationURL: URL, options: Options) - - // MARK: Destination - - /// Creates a download file destination closure which uses the default file manager to move the temporary file to a - /// file URL in the first available directory with the specified search path directory and search path domain mask. - /// - /// - Parameters: - /// - directory: The search path directory. `.documentDirectory` by default. - /// - domain: The search path domain mask. `.userDomainMask` by default. - /// - options: `DownloadRequest.Options` used when moving the downloaded file to its destination. None by - /// default. - /// - Returns: The `Destination` closure. - public class func suggestedDownloadDestination(for directory: FileManager.SearchPathDirectory = .documentDirectory, - in domain: FileManager.SearchPathDomainMask = .userDomainMask, - options: Options = []) -> Destination { - return { temporaryURL, response in - let directoryURLs = FileManager.default.urls(for: directory, in: domain) - let url = directoryURLs.first?.appendingPathComponent(response.suggestedFilename!) ?? temporaryURL - - return (url, options) - } - } - - /// Default `Destination` used by Alamofire to ensure all downloads persist. This `Destination` prepends - /// `Alamofire_` to the automatically generated download name and moves it within the temporary directory. Files - /// with this destination must be additionally moved if they should survive the system reclamation of temporary - /// space. - static let defaultDestination: Destination = { url, _ in - let filename = "Alamofire_\(url.lastPathComponent)" - let destination = url.deletingLastPathComponent().appendingPathComponent(filename) - - return (destination, []) - } - - /// Type describing the source used to create the underlying `URLSessionDownloadTask`. - public enum Downloadable { - /// Download should be started from the `URLRequest` produced by the associated `URLRequestConvertible` value. - case request(URLRequestConvertible) - /// Download should be started from the associated resume `Data` value. - case resumeData(Data) - } - - // MARK: Mutable State - - /// Type containing all mutable state for `DownloadRequest` instances. - private struct DownloadRequestMutableState { - /// Possible resume `Data` produced when cancelling the instance. - var resumeData: Data? - /// `URL` to which `Data` is being downloaded. - var fileURL: URL? - } - - /// Protected mutable state specific to `DownloadRequest`. - private let protectedDownloadMutableState: Protector = Protector(DownloadRequestMutableState()) - - /// If the download is resumable and eventually cancelled, this value may be used to resume the download using the - /// `download(resumingWith data:)` API. - /// - /// - Note: For more information about `resumeData`, see [Apple's documentation](https://developer.apple.com/documentation/foundation/urlsessiondownloadtask/1411634-cancel). - public var resumeData: Data? { return protectedDownloadMutableState.directValue.resumeData } - /// If the download is successful, the `URL` where the file was downloaded. - public var fileURL: URL? { return protectedDownloadMutableState.directValue.fileURL } - - // MARK: Initial State - - /// `Downloadable` value used for this instance. - public let downloadable: Downloadable - /// The `Destination` to which the downloaded file is moved. - let destination: Destination - - /// Creates a `DownloadRequest` using the provided parameters. - /// - /// - Parameters: - /// - id: `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` by default. - /// - downloadable: `Downloadable` value used to create `URLSessionDownloadTasks` for the instance. - /// - underlyingQueue: `DispatchQueue` on which all internal `Request` work is performed. - /// - serializationQueue: `DispatchQueue` on which all serialization work is performed. By default targets - /// `underlyingQueue`, but can be passed another queue from a `Session`. - /// - eventMonitor: `EventMonitor` called for event callbacks from internal `Request` actions. - /// - interceptor: `RequestInterceptor` used throughout the request lifecycle. - /// - delegate: `RequestDelegate` that provides an interface to actions not performed by the `Request` - /// - destination: `Destination` closure used to move the downloaded file to its final location. - init(id: UUID = UUID(), - downloadable: Downloadable, - underlyingQueue: DispatchQueue, - serializationQueue: DispatchQueue, - eventMonitor: EventMonitor?, - interceptor: RequestInterceptor?, - delegate: RequestDelegate, - destination: @escaping Destination) { - self.downloadable = downloadable - self.destination = destination - - super.init(id: id, - underlyingQueue: underlyingQueue, - serializationQueue: serializationQueue, - eventMonitor: eventMonitor, - interceptor: interceptor, - delegate: delegate) - } - - override func reset() { - super.reset() - - protectedDownloadMutableState.write { - $0.resumeData = nil - $0.fileURL = nil - } - } - - /// Called when a download has finished. - /// - /// - Parameters: - /// - task: `URLSessionTask` that finished the download. - /// - result: `Result` of the automatic move to `destination`. - func didFinishDownloading(using task: URLSessionTask, with result: Result) { - eventMonitor?.request(self, didFinishDownloadingUsing: task, with: result) - - switch result { - case let .success(url): protectedDownloadMutableState.write { $0.fileURL = url } - case let .failure(error): self.error = error - } - } - - /// Updates the `downloadProgress` using the provided values. - /// - /// - Parameters: - /// - bytesWritten: Total bytes written so far. - /// - totalBytesExpectedToWrite: Total bytes expected to write. - func updateDownloadProgress(bytesWritten: Int64, totalBytesExpectedToWrite: Int64) { - downloadProgress.totalUnitCount = totalBytesExpectedToWrite - downloadProgress.completedUnitCount += bytesWritten - - downloadProgressHandler?.queue.async { self.downloadProgressHandler?.handler(self.downloadProgress) } - } - - override func task(for request: URLRequest, using session: URLSession) -> URLSessionTask { - return session.downloadTask(with: request) - } - - /// Creates a `URLSessionTask` from the provided resume data. - /// - /// - Parameters: - /// - data: `Data` used to resume the download. - /// - session: `URLSession` used to create the `URLSessionTask`. - /// - /// - Returns: The `URLSessionTask` created. - public func task(forResumeData data: Data, using session: URLSession) -> URLSessionTask { - return session.downloadTask(withResumeData: data) - } - - /// Cancels the instance. Once cancelled, a `DownloadRequest` can no longer be resumed or suspended. - /// - /// - Note: This method will NOT produce resume data. If you wish to cancel and produce resume data, use - /// `cancel(producingResumeData:)` or `cancel(byProducingResumeData:)`. - /// - /// - Returns: The instance. - @discardableResult - public override func cancel() -> Self { - return cancel(producingResumeData: false) - } - - /// Cancels the instance, optionally producing resume data. Once cancelled, a `DownloadRequest` can no longer be - /// resumed or suspended. - /// - /// - Note: If `producingResumeData` is `true`, the `resumeData` property will be populated with any resume data, if - /// available. - /// - /// - Returns: The instance. - @discardableResult - public func cancel(producingResumeData shouldProduceResumeData: Bool) -> Self { - return cancel(optionallyProducingResumeData: shouldProduceResumeData ? { _ in } : nil) - } - - /// Cancels the instance while producing resume data. Once cancelled, a `DownloadRequest` can no longer be resumed - /// or suspended. - /// - /// - Note: The resume data passed to the completion handler will also be available on the instance's `resumeData` - /// property. - /// - /// - Parameter completionHandler: The completion handler that is called when the download has been successfully - /// cancelled. It is not guaranteed to be called on a particular queue, so you may - /// want use an appropriate queue to perform your work. - /// - /// - Returns: The instance. - @discardableResult - public func cancel(byProducingResumeData completionHandler: @escaping (_ data: Data?) -> Void) -> Self { - return cancel(optionallyProducingResumeData: completionHandler) - } - - /// Internal implementation of cancellation that optionally takes a resume data handler. If no handler is passed, - /// cancellation is performed without producing resume data. - /// - /// - Parameter completionHandler: Optional resume data handler. - /// - /// - Returns: The instance. - private func cancel(optionallyProducingResumeData completionHandler: ((_ resumeData: Data?) -> Void)?) -> Self { - protectedMutableState.write { mutableState in - guard mutableState.state.canTransitionTo(.cancelled) else { return } - - mutableState.state = .cancelled - - underlyingQueue.async { self.didCancel() } - - guard let task = mutableState.tasks.last as? URLSessionDownloadTask, task.state != .completed else { - underlyingQueue.async { self.finish() } - return - } - - if let completionHandler = completionHandler { - // Resume to ensure metrics are gathered. - task.resume() - task.cancel { resumeData in - self.protectedDownloadMutableState.write { $0.resumeData = resumeData } - self.underlyingQueue.async { self.didCancelTask(task) } - completionHandler(resumeData) - } - } else { - // Resume to ensure metrics are gathered. - task.resume() - task.cancel() - self.underlyingQueue.async { self.didCancelTask(task) } - } - } - - return self - } - - /// Validates the request, using the specified closure. - /// - /// - Note: If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - Parameter validation: `Validation` closure to validate the response. - /// - /// - Returns: The instance. - @discardableResult - public func validate(_ validation: @escaping Validation) -> Self { - let validator: () -> Void = { [unowned self] in - guard self.error == nil, let response = self.response else { return } - - let result = validation(self.request, response, self.fileURL) - - if case let .failure(error) = result { self.error = error.asAFError(or: .responseValidationFailed(reason: .customValidationFailed(error: error))) } - - self.eventMonitor?.request(self, - didValidateRequest: self.request, - response: response, - fileURL: self.fileURL, - withResult: result) - } - - protectedValidators.append(validator) - - return self - } -} - -// MARK: - UploadRequest - -/// `DataRequest` subclass which handles `Data` upload from memory, file, or stream using `URLSessionUploadTask`. -public class UploadRequest: DataRequest { - /// Type describing the origin of the upload, whether `Data`, file, or stream. - public enum Uploadable { - /// Upload from the provided `Data` value. - case data(Data) - /// Upload from the provided file `URL`, as well as a `Bool` determining whether the source file should be - /// automatically removed once uploaded. - case file(URL, shouldRemove: Bool) - /// Upload from the provided `InputStream`. - case stream(InputStream) - } - - // MARK: Initial State - - /// The `UploadableConvertible` value used to produce the `Uploadable` value for this instance. - public let upload: UploadableConvertible - - /// `FileManager` used to perform cleanup tasks, including the removal of multipart form encoded payloads written - /// to disk. - public let fileManager: FileManager - - // MARK: Mutable State - - /// `Uploadable` value used by the instance. - public var uploadable: Uploadable? - - /// Creates an `UploadRequest` using the provided parameters. - /// - /// - Parameters: - /// - id: `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` by default. - /// - convertible: `UploadConvertible` value used to determine the type of upload to be performed. - /// - underlyingQueue: `DispatchQueue` on which all internal `Request` work is performed. - /// - serializationQueue: `DispatchQueue` on which all serialization work is performed. By default targets - /// `underlyingQueue`, but can be passed another queue from a `Session`. - /// - eventMonitor: `EventMonitor` called for event callbacks from internal `Request` actions. - /// - interceptor: `RequestInterceptor` used throughout the request lifecycle. - /// - delegate: `RequestDelegate` that provides an interface to actions not performed by the `Request`. - init(id: UUID = UUID(), - convertible: UploadConvertible, - underlyingQueue: DispatchQueue, - serializationQueue: DispatchQueue, - eventMonitor: EventMonitor?, - interceptor: RequestInterceptor?, - fileManager: FileManager, - delegate: RequestDelegate) { - upload = convertible - self.fileManager = fileManager - - super.init(id: id, - convertible: convertible, - underlyingQueue: underlyingQueue, - serializationQueue: serializationQueue, - eventMonitor: eventMonitor, - interceptor: interceptor, - delegate: delegate) - } - - /// Called when the `Uploadable` value has been created from the `UploadConvertible`. - /// - /// - Parameter uploadable: The `Uploadable` that was created. - func didCreateUploadable(_ uploadable: Uploadable) { - self.uploadable = uploadable - - eventMonitor?.request(self, didCreateUploadable: uploadable) - } - - /// Called when the `Uploadable` value could not be created. - /// - /// - Parameter error: `AFError` produced by the failure. - func didFailToCreateUploadable(with error: AFError) { - self.error = error - - eventMonitor?.request(self, didFailToCreateUploadableWithError: error) - - retryOrFinish(error: error) - } - - override func task(for request: URLRequest, using session: URLSession) -> URLSessionTask { - guard let uploadable = uploadable else { - fatalError("Attempting to create a URLSessionUploadTask when Uploadable value doesn't exist.") - } - - switch uploadable { - case let .data(data): return session.uploadTask(with: request, from: data) - case let .file(url, _): return session.uploadTask(with: request, fromFile: url) - case .stream: return session.uploadTask(withStreamedRequest: request) - } - } - - /// Produces the `InputStream` from `uploadable`, if it can. - /// - /// - Note: Calling this method with a non-`.stream` `Uploadable` is a logic error and will crash. - /// - /// - Returns: The `InputStream`. - func inputStream() -> InputStream { - guard let uploadable = uploadable else { - fatalError("Attempting to access the input stream but the uploadable doesn't exist.") - } - - guard case let .stream(stream) = uploadable else { - fatalError("Attempted to access the stream of an UploadRequest that wasn't created with one.") - } - - eventMonitor?.request(self, didProvideInputStream: stream) - - return stream - } - - public override func cleanup() { - defer { super.cleanup() } - - guard - let uploadable = self.uploadable, - case let .file(url, shouldRemove) = uploadable, - shouldRemove - else { return } - - try? fileManager.removeItem(at: url) - } -} - -/// A type that can produce an `UploadRequest.Uploadable` value. -public protocol UploadableConvertible { - /// Produces an `UploadRequest.Uploadable` value from the instance. - /// - /// - Returns: The `UploadRequest.Uploadable`. - /// - Throws: Any `Error` produced during creation. - func createUploadable() throws -> UploadRequest.Uploadable -} - -extension UploadRequest.Uploadable: UploadableConvertible { - public func createUploadable() throws -> UploadRequest.Uploadable { - return self - } -} - -/// A type that can be converted to an upload, whether from an `UploadRequest.Uploadable` or `URLRequestConvertible`. -public protocol UploadConvertible: UploadableConvertible & URLRequestConvertible {} diff --git a/Example/Pods/Alamofire/Source/Response.swift b/Example/Pods/Alamofire/Source/Response.swift deleted file mode 100644 index 5874b28..0000000 --- a/Example/Pods/Alamofire/Source/Response.swift +++ /dev/null @@ -1,399 +0,0 @@ -// -// Response.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. -// - -import Foundation - -/// Default type of `DataResponse` returned by Alamofire, with an `AFError` `Failure` type. -public typealias AFDataResponse = DataResponse -/// Default type of `DownloadResponse` returned by Alamofire, with an `AFError` `Failure` type. -public typealias AFDownloadResponse = DownloadResponse - -/// Type used to store all values associated with a serialized response of a `DataRequest` or `UploadRequest`. -public struct DataResponse { - /// The URL request sent to the server. - public let request: URLRequest? - - /// The server's response to the URL request. - public let response: HTTPURLResponse? - - /// The data returned by the server. - public let data: Data? - - /// The final metrics of the response. - public let metrics: URLSessionTaskMetrics? - - /// The time taken to serialize the response. - public let serializationDuration: TimeInterval - - /// The result of response serialization. - public let result: Result - - /// Returns the associated value of the result if it is a success, `nil` otherwise. - public var value: Success? { return result.success } - - /// Returns the associated error value if the result if it is a failure, `nil` otherwise. - public var error: Failure? { return result.failure } - - /// Creates a `DataResponse` instance with the specified parameters derived from the response serialization. - /// - /// - Parameters: - /// - request: The `URLRequest` sent to the server. - /// - response: The `HTTPURLResponse` from the server. - /// - data: The `Data` returned by the server. - /// - metrics: The `URLSessionTaskMetrics` of the `DataRequest` or `UploadRequest`. - /// - serializationDuration: The duration taken by serialization. - /// - result: The `Result` of response serialization. - public init(request: URLRequest?, - response: HTTPURLResponse?, - data: Data?, - metrics: URLSessionTaskMetrics?, - serializationDuration: TimeInterval, - result: Result) { - self.request = request - self.response = response - self.data = data - self.metrics = metrics - self.serializationDuration = serializationDuration - self.result = result - } -} - -// MARK: - - -extension DataResponse: CustomStringConvertible, CustomDebugStringConvertible { - /// The textual representation used when written to an output stream, which includes whether the result was a - /// success or failure. - public var description: String { - return "\(result)" - } - - /// The debug textual representation used when written to an output stream, which includes the URL request, the URL - /// response, the server data, the duration of the network and serialization actions, and the response serialization - /// result. - public var debugDescription: String { - let requestDescription = request.map { "\($0.httpMethod!) \($0)" } ?? "nil" - let requestBody = request?.httpBody.map { String(decoding: $0, as: UTF8.self) } ?? "None" - let responseDescription = response.map { response in - let sortedHeaders = response.headers.sorted() - - return """ - [Status Code]: \(response.statusCode) - [Headers]: - \(sortedHeaders) - """ - } ?? "nil" - let responseBody = data.map { String(decoding: $0, as: UTF8.self) } ?? "None" - let metricsDescription = metrics.map { "\($0.taskInterval.duration)s" } ?? "None" - - return """ - [Request]: \(requestDescription) - [Request Body]: \n\(requestBody) - [Response]: \n\(responseDescription) - [Response Body]: \n\(responseBody) - [Data]: \(data?.description ?? "None") - [Network Duration]: \(metricsDescription) - [Serialization Duration]: \(serializationDuration)s - [Result]: \(result) - """ - } -} - -// MARK: - - -extension DataResponse { - /// Evaluates the specified closure when the result of this `DataResponse` is a success, passing the unwrapped - /// result value as a parameter. - /// - /// Use the `map` method with a closure that does not throw. For example: - /// - /// let possibleData: DataResponse = ... - /// let possibleInt = possibleData.map { $0.count } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A `DataResponse` whose result wraps the value returned by the given closure. If this instance's - /// result is a failure, returns a response wrapping the same failure. - public func map(_ transform: (Success) -> NewSuccess) -> DataResponse { - return DataResponse(request: request, - response: response, - data: data, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.map(transform)) - } - - /// Evaluates the given closure when the result of this `DataResponse` is a success, passing the unwrapped result - /// value as a parameter. - /// - /// Use the `tryMap` method with a closure that may throw an error. For example: - /// - /// let possibleData: DataResponse = ... - /// let possibleObject = possibleData.tryMap { - /// try JSONSerialization.jsonObject(with: $0) - /// } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A success or failure `DataResponse` depending on the result of the given closure. If this instance's - /// result is a failure, returns the same failure. - public func tryMap(_ transform: (Success) throws -> NewSuccess) -> DataResponse { - return DataResponse(request: request, - response: response, - data: data, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.tryMap(transform)) - } - - /// Evaluates the specified closure when the `DataResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `mapError` function with a closure that does not throw. For example: - /// - /// let possibleData: DataResponse = ... - /// let withMyError = possibleData.mapError { MyError.error($0) } - /// - /// - Parameter transform: A closure that takes the error of the instance. - /// - /// - Returns: A `DataResponse` instance containing the result of the transform. - public func mapError(_ transform: (Failure) -> NewFailure) -> DataResponse { - return DataResponse(request: request, - response: response, - data: data, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.mapError(transform)) - } - - /// Evaluates the specified closure when the `DataResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `tryMapError` function with a closure that may throw an error. For example: - /// - /// let possibleData: DataResponse = ... - /// let possibleObject = possibleData.tryMapError { - /// try someFailableFunction(taking: $0) - /// } - /// - /// - Parameter transform: A throwing closure that takes the error of the instance. - /// - /// - Returns: A `DataResponse` instance containing the result of the transform. - public func tryMapError(_ transform: (Failure) throws -> NewFailure) -> DataResponse { - return DataResponse(request: request, - response: response, - data: data, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.tryMapError(transform)) - } -} - -// MARK: - - -/// Used to store all data associated with a serialized response of a download request. -public struct DownloadResponse { - /// The URL request sent to the server. - public let request: URLRequest? - - /// The server's response to the URL request. - public let response: HTTPURLResponse? - - /// The final destination URL of the data returned from the server after it is moved. - public let fileURL: URL? - - /// The resume data generated if the request was cancelled. - public let resumeData: Data? - - /// The final metrics of the response. - public let metrics: URLSessionTaskMetrics? - - /// The time taken to serialize the response. - public let serializationDuration: TimeInterval - - /// The result of response serialization. - public let result: Result - - /// Returns the associated value of the result if it is a success, `nil` otherwise. - public var value: Success? { return result.success } - - /// Returns the associated error value if the result if it is a failure, `nil` otherwise. - public var error: Failure? { return result.failure } - - /// Creates a `DownloadResponse` instance with the specified parameters derived from response serialization. - /// - /// - Parameters: - /// - request: The `URLRequest` sent to the server. - /// - response: The `HTTPURLResponse` from the server. - /// - temporaryURL: The temporary destination `URL` of the data returned from the server. - /// - destinationURL: The final destination `URL` of the data returned from the server, if it was moved. - /// - resumeData: The resume `Data` generated if the request was cancelled. - /// - metrics: The `URLSessionTaskMetrics` of the `DownloadRequest`. - /// - serializationDuration: The duration taken by serialization. - /// - result: The `Result` of response serialization. - public init(request: URLRequest?, - response: HTTPURLResponse?, - fileURL: URL?, - resumeData: Data?, - metrics: URLSessionTaskMetrics?, - serializationDuration: TimeInterval, - result: Result) { - self.request = request - self.response = response - self.fileURL = fileURL - self.resumeData = resumeData - self.metrics = metrics - self.serializationDuration = serializationDuration - self.result = result - } -} - -// MARK: - - -extension DownloadResponse: CustomStringConvertible, CustomDebugStringConvertible { - /// The textual representation used when written to an output stream, which includes whether the result was a - /// success or failure. - public var description: String { - return "\(result)" - } - - /// The debug textual representation used when written to an output stream, which includes the URL request, the URL - /// response, the temporary and destination URLs, the resume data, the durations of the network and serialization - /// actions, and the response serialization result. - public var debugDescription: String { - let requestDescription = request.map { "\($0.httpMethod!) \($0)" } ?? "nil" - let requestBody = request?.httpBody.map { String(decoding: $0, as: UTF8.self) } ?? "None" - let responseDescription = response.map { response in - let sortedHeaders = response.headers.sorted() - - return """ - [Status Code]: \(response.statusCode) - [Headers]: - \(sortedHeaders) - """ - } ?? "nil" - let metricsDescription = metrics.map { "\($0.taskInterval.duration)s" } ?? "None" - let resumeDataDescription = resumeData.map { "\($0)" } ?? "None" - - return """ - [Request]: \(requestDescription) - [Request Body]: \n\(requestBody) - [Response]: \n\(responseDescription) - [File URL]: \(fileURL?.path ?? "nil") - [ResumeData]: \(resumeDataDescription) - [Network Duration]: \(metricsDescription) - [Serialization Duration]: \(serializationDuration)s - [Result]: \(result) - """ - } -} - -// MARK: - - -extension DownloadResponse { - /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped - /// result value as a parameter. - /// - /// Use the `map` method with a closure that does not throw. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let possibleInt = possibleData.map { $0.count } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A `DownloadResponse` whose result wraps the value returned by the given closure. If this instance's - /// result is a failure, returns a response wrapping the same failure. - public func map(_ transform: (Success) -> NewSuccess) -> DownloadResponse { - return DownloadResponse(request: request, - response: response, - fileURL: fileURL, - resumeData: resumeData, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.map(transform)) - } - - /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped - /// result value as a parameter. - /// - /// Use the `tryMap` method with a closure that may throw an error. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let possibleObject = possibleData.tryMap { - /// try JSONSerialization.jsonObject(with: $0) - /// } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A success or failure `DownloadResponse` depending on the result of the given closure. If this - /// instance's result is a failure, returns the same failure. - public func tryMap(_ transform: (Success) throws -> NewSuccess) -> DownloadResponse { - return DownloadResponse(request: request, - response: response, - fileURL: fileURL, - resumeData: resumeData, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.tryMap(transform)) - } - - /// Evaluates the specified closure when the `DownloadResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `mapError` function with a closure that does not throw. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let withMyError = possibleData.mapError { MyError.error($0) } - /// - /// - Parameter transform: A closure that takes the error of the instance. - /// - /// - Returns: A `DownloadResponse` instance containing the result of the transform. - public func mapError(_ transform: (Failure) -> NewFailure) -> DownloadResponse { - return DownloadResponse(request: request, - response: response, - fileURL: fileURL, - resumeData: resumeData, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.mapError(transform)) - } - - /// Evaluates the specified closure when the `DownloadResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `tryMapError` function with a closure that may throw an error. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let possibleObject = possibleData.tryMapError { - /// try someFailableFunction(taking: $0) - /// } - /// - /// - Parameter transform: A throwing closure that takes the error of the instance. - /// - /// - Returns: A `DownloadResponse` instance containing the result of the transform. - public func tryMapError(_ transform: (Failure) throws -> NewFailure) -> DownloadResponse { - return DownloadResponse(request: request, - response: response, - fileURL: fileURL, - resumeData: resumeData, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.tryMapError(transform)) - } -} diff --git a/Example/Pods/Alamofire/Source/ResponseSerialization.swift b/Example/Pods/Alamofire/Source/ResponseSerialization.swift deleted file mode 100644 index fd235f2..0000000 --- a/Example/Pods/Alamofire/Source/ResponseSerialization.swift +++ /dev/null @@ -1,779 +0,0 @@ -// -// ResponseSerialization.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. -// - -import Foundation - -// MARK: Protocols - -/// The type to which all data response serializers must conform in order to serialize a response. -public protocol DataResponseSerializerProtocol { - /// The type of serialized object to be created. - associatedtype SerializedObject - - /// Serialize the response `Data` into the provided type.. - /// - /// - Parameters: - /// - request: `URLRequest` which was used to perform the request, if any. - /// - response: `HTTPURLResponse` received from the server, if any. - /// - data: `Data` returned from the server, if any. - /// - error: `Error` produced by Alamofire or the underlying `URLSession` during the request. - /// - /// - Returns: The `SerializedObject`. - /// - Throws: Any `Error` produced during serialization. - func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> SerializedObject -} - -/// The type to which all download response serializers must conform in order to serialize a response. -public protocol DownloadResponseSerializerProtocol { - /// The type of serialized object to be created. - associatedtype SerializedObject - - /// Serialize the downloaded response `Data` from disk into the provided type.. - /// - /// - Parameters: - /// - request: `URLRequest` which was used to perform the request, if any. - /// - response: `HTTPURLResponse` received from the server, if any. - /// - fileURL: File `URL` to which the response data was downloaded. - /// - error: `Error` produced by Alamofire or the underlying `URLSession` during the request. - /// - /// - Returns: The `SerializedObject`. - /// - Throws: Any `Error` produced during serialization. - func serializeDownload(request: URLRequest?, response: HTTPURLResponse?, fileURL: URL?, error: Error?) throws -> SerializedObject -} - -/// A serializer that can handle both data and download responses. -public protocol ResponseSerializer: DataResponseSerializerProtocol & DownloadResponseSerializerProtocol { - /// `DataPreprocessor` used to prepare incoming `Data` for serialization. - var dataPreprocessor: DataPreprocessor { get } - /// `HTTPMethod`s for which empty response bodies are considered appropriate. - var emptyRequestMethods: Set { get } - /// HTTP response codes for which empty response bodies are considered appropriate. - var emptyResponseCodes: Set { get } -} - -/// Type used to preprocess `Data` before it handled by a serializer. -public protocol DataPreprocessor { - /// Process `Data` before it's handled by a serializer. - /// - Parameter data: The raw `Data` to process. - func preprocess(_ data: Data) throws -> Data -} - -/// `DataPreprocessor` that returns passed `Data` without any transform. -public struct PassthroughPreprocessor: DataPreprocessor { - public init() {} - - public func preprocess(_ data: Data) throws -> Data { return data } -} - -/// `DataPreprocessor` that trims Google's typical `)]}',\n` XSSI JSON header. -public struct GoogleXSSIPreprocessor: DataPreprocessor { - public init() {} - - public func preprocess(_ data: Data) throws -> Data { - return (data.prefix(6) == Data(")]}',\n".utf8)) ? data.dropFirst(6) : data - } -} - -extension ResponseSerializer { - /// Default `DataPreprocessor`. `PassthroughPreprocessor` by default. - public static var defaultDataPreprocessor: DataPreprocessor { return PassthroughPreprocessor() } - /// Default `HTTPMethod`s for which empty response bodies are considered appropriate. `[.head]` by default. - public static var defaultEmptyRequestMethods: Set { return [.head] } - /// HTTP response codes for which empty response bodies are considered appropriate. `[204, 205]` by default. - public static var defaultEmptyResponseCodes: Set { return [204, 205] } - - public var dataPreprocessor: DataPreprocessor { return Self.defaultDataPreprocessor } - public var emptyRequestMethods: Set { return Self.defaultEmptyRequestMethods } - public var emptyResponseCodes: Set { return Self.defaultEmptyResponseCodes } - - /// Determines whether the `request` allows empty response bodies, if `request` exists. - /// - /// - Parameter request: `URLRequest` to evaluate. - /// - /// - Returns: `Bool` representing the outcome of the evaluation, or `nil` if `request` was `nil`. - public func requestAllowsEmptyResponseData(_ request: URLRequest?) -> Bool? { - return request.flatMap { $0.httpMethod } - .flatMap(HTTPMethod.init) - .map { emptyRequestMethods.contains($0) } - } - - /// Determines whether the `response` allows empty response bodies, if `response` exists`. - /// - /// - Parameter response: `HTTPURLResponse` to evaluate. - /// - /// - Returns: `Bool` representing the outcome of the evaluation, or `nil` if `response` was `nil`. - public func responseAllowsEmptyResponseData(_ response: HTTPURLResponse?) -> Bool? { - return response.flatMap { $0.statusCode } - .map { emptyResponseCodes.contains($0) } - } - - /// Determines whether `request` and `response` allow empty response bodies. - /// - /// - Parameters: - /// - request: `URLRequest` to evaluate. - /// - response: `HTTPURLResponse` to evaluate. - /// - /// - Returns: `true` if `request` or `response` allow empty bodies, `false` otherwise. - public func emptyResponseAllowed(forRequest request: URLRequest?, response: HTTPURLResponse?) -> Bool { - return (requestAllowsEmptyResponseData(request) == true) || (responseAllowsEmptyResponseData(response) == true) - } -} - -/// By default, any serializer declared to conform to both types will get file serialization for free, as it just feeds -/// the data read from disk into the data response serializer. -public extension DownloadResponseSerializerProtocol where Self: DataResponseSerializerProtocol { - func serializeDownload(request: URLRequest?, response: HTTPURLResponse?, fileURL: URL?, error: Error?) throws -> Self.SerializedObject { - guard error == nil else { throw error! } - - guard let fileURL = fileURL else { - throw AFError.responseSerializationFailed(reason: .inputFileNil) - } - - let data: Data - do { - data = try Data(contentsOf: fileURL) - } catch { - throw AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL)) - } - - do { - return try serialize(request: request, response: response, data: data, error: error) - } catch { - throw error - } - } -} - -// MARK: - Default - -extension DataRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - completionHandler: The code to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func response(queue: DispatchQueue = .main, completionHandler: @escaping (AFDataResponse) -> Void) -> Self { - appendResponseSerializer { - // Start work that should be on the serialization queue. - let result = AFResult(value: self.data, error: self.error) - // End work that should be on the serialization queue. - - self.underlyingQueue.async { - let response = DataResponse(request: self.request, - response: self.response, - data: self.data, - metrics: self.metrics, - serializationDuration: 0, - result: result) - - self.eventMonitor?.request(self, didParseResponse: response) - - self.responseSerializerDidComplete { queue.async { completionHandler(response) } } - } - } - - return self - } - - /// Adds a handler to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is dispatched. `.main` by default - /// - responseSerializer: The response serializer responsible for serializing the request, response, and data. - /// - completionHandler: The code to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func response(queue: DispatchQueue = .main, - responseSerializer: Serializer, - completionHandler: @escaping (AFDataResponse) -> Void) - -> Self { - appendResponseSerializer { - // Start work that should be on the serialization queue. - let start = CFAbsoluteTimeGetCurrent() - let result: AFResult = Result { - try responseSerializer.serialize(request: self.request, - response: self.response, - data: self.data, - error: self.error) - }.mapError { error in - error.asAFError(or: .responseSerializationFailed(reason: .customSerializationFailed(error: error))) - } - - let end = CFAbsoluteTimeGetCurrent() - // End work that should be on the serialization queue. - - self.underlyingQueue.async { - let response = DataResponse(request: self.request, - response: self.response, - data: self.data, - metrics: self.metrics, - serializationDuration: end - start, - result: result) - - self.eventMonitor?.request(self, didParseResponse: response) - - guard let serializerError = result.failure, let delegate = self.delegate else { - self.responseSerializerDidComplete { queue.async { completionHandler(response) } } - return - } - - delegate.retryResult(for: self, dueTo: serializerError) { retryResult in - var didComplete: (() -> Void)? - - defer { - if let didComplete = didComplete { - self.responseSerializerDidComplete { queue.async { didComplete() } } - } - } - - switch retryResult { - case .doNotRetry: - didComplete = { completionHandler(response) } - - case let .doNotRetryWithError(retryError): - let result: AFResult = .failure(retryError.asAFError(orFailWith: "Received retryError was not already AFError")) - - let response = DataResponse(request: self.request, - response: self.response, - data: self.data, - metrics: self.metrics, - serializationDuration: end - start, - result: result) - - didComplete = { completionHandler(response) } - - case .retry, .retryWithDelay: - delegate.retryRequest(self, withDelay: retryResult.delay) - } - } - } - } - - return self - } -} - -extension DownloadRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - completionHandler: The code to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func response(queue: DispatchQueue = .main, - completionHandler: @escaping (AFDownloadResponse) -> Void) - -> Self { - appendResponseSerializer { - // Start work that should be on the serialization queue. - let result = AFResult(value: self.fileURL, error: self.error) - // End work that should be on the serialization queue. - - self.underlyingQueue.async { - let response = DownloadResponse(request: self.request, - response: self.response, - fileURL: self.fileURL, - resumeData: self.resumeData, - metrics: self.metrics, - serializationDuration: 0, - result: result) - - self.eventMonitor?.request(self, didParseResponse: response) - - self.responseSerializerDidComplete { queue.async { completionHandler(response) } } - } - } - - return self - } - - /// Adds a handler to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - responseSerializer: The response serializer responsible for serializing the request, response, and data - /// contained in the destination `URL`. - /// - completionHandler: The code to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func response(queue: DispatchQueue = .main, - responseSerializer: T, - completionHandler: @escaping (AFDownloadResponse) -> Void) - -> Self { - appendResponseSerializer { - // Start work that should be on the serialization queue. - let start = CFAbsoluteTimeGetCurrent() - let result: AFResult = Result { - try responseSerializer.serializeDownload(request: self.request, - response: self.response, - fileURL: self.fileURL, - error: self.error) - }.mapError { error in - error.asAFError(or: .responseSerializationFailed(reason: .customSerializationFailed(error: error))) - } - let end = CFAbsoluteTimeGetCurrent() - // End work that should be on the serialization queue. - - self.underlyingQueue.async { - let response = DownloadResponse(request: self.request, - response: self.response, - fileURL: self.fileURL, - resumeData: self.resumeData, - metrics: self.metrics, - serializationDuration: end - start, - result: result) - - self.eventMonitor?.request(self, didParseResponse: response) - - guard let serializerError = result.failure, let delegate = self.delegate else { - self.responseSerializerDidComplete { queue.async { completionHandler(response) } } - return - } - - delegate.retryResult(for: self, dueTo: serializerError) { retryResult in - var didComplete: (() -> Void)? - - defer { - if let didComplete = didComplete { - self.responseSerializerDidComplete { queue.async { didComplete() } } - } - } - - switch retryResult { - case .doNotRetry: - didComplete = { completionHandler(response) } - - case let .doNotRetryWithError(retryError): - let result: AFResult = .failure(retryError.asAFError(orFailWith: "Received retryError was not already AFError")) - - let response = DownloadResponse(request: self.request, - response: self.response, - fileURL: self.fileURL, - resumeData: self.resumeData, - metrics: self.metrics, - serializationDuration: end - start, - result: result) - - didComplete = { completionHandler(response) } - - case .retry, .retryWithDelay: - delegate.retryRequest(self, withDelay: retryResult.delay) - } - } - } - } - - return self - } -} - -// MARK: - Data - -extension DataRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - completionHandler: The code to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func responseData(queue: DispatchQueue = .main, - completionHandler: @escaping (AFDataResponse) -> Void) - -> Self { - return response(queue: queue, - responseSerializer: DataResponseSerializer(), - completionHandler: completionHandler) - } -} - -/// A `ResponseSerializer` that performs minimal response checking and returns any response data as-is. By default, a -/// request returning `nil` or no data is considered an error. However, if the response is has a status code valid for -/// empty responses (`204`, `205`), then an empty `Data` value is returned. -public final class DataResponseSerializer: ResponseSerializer { - public let dataPreprocessor: DataPreprocessor - public let emptyResponseCodes: Set - public let emptyRequestMethods: Set - - /// Creates an instance using the provided values. - /// - /// - Parameters: - /// - dataPreprocessor: `DataPreprocessor` used to prepare the received `Data` for serialization. - /// - emptyResponseCodes: The HTTP response codes for which empty responses are allowed. `[204, 205]` by default. - /// - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default. - public init(dataPreprocessor: DataPreprocessor = DataResponseSerializer.defaultDataPreprocessor, - emptyResponseCodes: Set = DataResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = DataResponseSerializer.defaultEmptyRequestMethods) { - self.dataPreprocessor = dataPreprocessor - self.emptyResponseCodes = emptyResponseCodes - self.emptyRequestMethods = emptyRequestMethods - } - - public func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> Data { - guard error == nil else { throw error! } - - guard var data = data, !data.isEmpty else { - guard emptyResponseAllowed(forRequest: request, response: response) else { - throw AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength) - } - - return Data() - } - - data = try dataPreprocessor.preprocess(data) - - return data - } -} - -extension DownloadRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - completionHandler: The code to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func responseData(queue: DispatchQueue = .main, - completionHandler: @escaping (AFDownloadResponse) -> Void) - -> Self { - return response(queue: queue, - responseSerializer: DataResponseSerializer(), - completionHandler: completionHandler) - } -} - -// MARK: - String - -/// A `ResponseSerializer` that decodes the response data as a `String`. By default, a request returning `nil` or no -/// data is considered an error. However, if the response is has a status code valid for empty responses (`204`, `205`), -/// then an empty `String` is returned. -public final class StringResponseSerializer: ResponseSerializer { - public let dataPreprocessor: DataPreprocessor - /// Optional string encoding used to validate the response. - public let encoding: String.Encoding? - public let emptyResponseCodes: Set - public let emptyRequestMethods: Set - - /// Creates an instance with the provided values. - /// - /// - Parameters: - /// - dataPreprocessor: `DataPreprocessor` used to prepare the received `Data` for serialization. - /// - encoding: A string encoding. Defaults to `nil`, in which case the encoding will be determined - /// from the server response, falling back to the default HTTP character set, `ISO-8859-1`. - /// - emptyResponseCodes: The HTTP response codes for which empty responses are allowed. `[204, 205]` by default. - /// - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default. - public init(dataPreprocessor: DataPreprocessor = StringResponseSerializer.defaultDataPreprocessor, - encoding: String.Encoding? = nil, - emptyResponseCodes: Set = StringResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = StringResponseSerializer.defaultEmptyRequestMethods) { - self.dataPreprocessor = dataPreprocessor - self.encoding = encoding - self.emptyResponseCodes = emptyResponseCodes - self.emptyRequestMethods = emptyRequestMethods - } - - public func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> String { - guard error == nil else { throw error! } - - guard var data = data, !data.isEmpty else { - guard emptyResponseAllowed(forRequest: request, response: response) else { - throw AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength) - } - - return "" - } - - data = try dataPreprocessor.preprocess(data) - - var convertedEncoding = encoding - - if let encodingName = response?.textEncodingName as CFString?, convertedEncoding == nil { - let ianaCharSet = CFStringConvertIANACharSetNameToEncoding(encodingName) - let nsStringEncoding = CFStringConvertEncodingToNSStringEncoding(ianaCharSet) - convertedEncoding = String.Encoding(rawValue: nsStringEncoding) - } - - let actualEncoding = convertedEncoding ?? .isoLatin1 - - guard let string = String(data: data, encoding: actualEncoding) else { - throw AFError.responseSerializationFailed(reason: .stringSerializationFailed(encoding: actualEncoding)) - } - - return string - } -} - -extension DataRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - encoding: The string encoding. Defaults to `nil`, in which case the encoding will be determined from - /// the server response, falling back to the default HTTP character set, `ISO-8859-1`. - /// - completionHandler: A closure to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func responseString(queue: DispatchQueue = .main, - encoding: String.Encoding? = nil, - completionHandler: @escaping (AFDataResponse) -> Void) -> Self { - return response(queue: queue, - responseSerializer: StringResponseSerializer(encoding: encoding), - completionHandler: completionHandler) - } -} - -extension DownloadRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - encoding: The string encoding. Defaults to `nil`, in which case the encoding will be determined from - /// the server response, falling back to the default HTTP character set, `ISO-8859-1`. - /// - completionHandler: A closure to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func responseString(queue: DispatchQueue = .main, - encoding: String.Encoding? = nil, - completionHandler: @escaping (AFDownloadResponse) -> Void) - -> Self { - return response(queue: queue, - responseSerializer: StringResponseSerializer(encoding: encoding), - completionHandler: completionHandler) - } -} - -// MARK: - JSON - -/// A `ResponseSerializer` that decodes the response data using `JSONSerialization`. By default, a request returning -/// `nil` or no data is considered an error. However, if the response is has a status code valid for empty responses -/// (`204`, `205`), then an `NSNull` value is returned. -public final class JSONResponseSerializer: ResponseSerializer { - public let dataPreprocessor: DataPreprocessor - public let emptyResponseCodes: Set - public let emptyRequestMethods: Set - /// `JSONSerialization.ReadingOptions` used when serializing a response. - public let options: JSONSerialization.ReadingOptions - - /// Creates an instance with the provided values. - /// - /// - Parameters: - /// - dataPreprocessor: `DataPreprocessor` used to prepare the received `Data` for serialization. - /// - emptyResponseCodes: The HTTP response codes for which empty responses are allowed. `[204, 205]` by default. - /// - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default. - /// - options: The options to use. `.allowFragments` by default. - public init(dataPreprocessor: DataPreprocessor = JSONResponseSerializer.defaultDataPreprocessor, - emptyResponseCodes: Set = JSONResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = JSONResponseSerializer.defaultEmptyRequestMethods, - options: JSONSerialization.ReadingOptions = .allowFragments) { - self.dataPreprocessor = dataPreprocessor - self.emptyResponseCodes = emptyResponseCodes - self.emptyRequestMethods = emptyRequestMethods - self.options = options - } - - public func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> Any { - guard error == nil else { throw error! } - - guard var data = data, !data.isEmpty else { - guard emptyResponseAllowed(forRequest: request, response: response) else { - throw AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength) - } - - return NSNull() - } - - data = try dataPreprocessor.preprocess(data) - - do { - return try JSONSerialization.jsonObject(with: data, options: options) - } catch { - throw AFError.responseSerializationFailed(reason: .jsonSerializationFailed(error: error)) - } - } -} - -extension DataRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - options: The JSON serialization reading options. `.allowFragments` by default. - /// - completionHandler: A closure to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func responseJSON(queue: DispatchQueue = .main, - options: JSONSerialization.ReadingOptions = .allowFragments, - completionHandler: @escaping (AFDataResponse) -> Void) -> Self { - return response(queue: queue, - responseSerializer: JSONResponseSerializer(options: options), - completionHandler: completionHandler) - } -} - -extension DownloadRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - options: The JSON serialization reading options. `.allowFragments` by default. - /// - completionHandler: A closure to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func responseJSON(queue: DispatchQueue = .main, - options: JSONSerialization.ReadingOptions = .allowFragments, - completionHandler: @escaping (AFDownloadResponse) -> Void) - -> Self { - return response(queue: queue, - responseSerializer: JSONResponseSerializer(options: options), - completionHandler: completionHandler) - } -} - -// MARK: - Empty - -/// Protocol representing an empty response. Use `T.emptyValue()` to get an instance. -public protocol EmptyResponse { - /// Empty value for the conforming type. - /// - /// - Returns: Value of `Self` to use for empty values. - static func emptyValue() -> Self -} - -/// Type representing an empty response. Use `Empty.value` to get the static instance. -public struct Empty: Decodable { - /// Static `Empty` instance used for all `Empty` responses. - public static let value = Empty() -} - -extension Empty: EmptyResponse { - public static func emptyValue() -> Empty { - return value - } -} - -// MARK: - DataDecoder Protocol - -/// Any type which can decode `Data` into a `Decodable` type. -public protocol DataDecoder { - /// Decode `Data` into the provided type. - /// - /// - Parameters: - /// - type: The `Type` to be decoded. - /// - data: The `Data` to be decoded. - /// - /// - Returns: The decoded value of type `D`. - /// - Throws: Any error that occurs during decode. - func decode(_ type: D.Type, from data: Data) throws -> D -} - -/// `JSONDecoder` automatically conforms to `DataDecoder`. -extension JSONDecoder: DataDecoder {} - -// MARK: - Decodable - -/// A `ResponseSerializer` that decodes the response data as a generic value using any type that conforms to -/// `DataDecoder`. By default, this is an instance of `JSONDecoder`. Additionally, a request returning `nil` or no data -/// is considered an error. However, if the response is has a status code valid for empty responses (`204`, `205`), then -/// the `Empty.value` value is returned. -public final class DecodableResponseSerializer: ResponseSerializer { - public let dataPreprocessor: DataPreprocessor - /// The `DataDecoder` instance used to decode responses. - public let decoder: DataDecoder - public let emptyResponseCodes: Set - public let emptyRequestMethods: Set - - /// Creates an instance using the values provided. - /// - /// - Parameters: - /// - dataPreprocessor: `DataPreprocessor` used to prepare the received `Data` for serialization. - /// - decoder: The `DataDecoder`. `JSONDecoder()` by default. - /// - emptyResponseCodes: The HTTP response codes for which empty responses are allowed. `[204, 205]` by default. - /// - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default. - public init(dataPreprocessor: DataPreprocessor = DecodableResponseSerializer.defaultDataPreprocessor, - decoder: DataDecoder = JSONDecoder(), - emptyResponseCodes: Set = DecodableResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = DecodableResponseSerializer.defaultEmptyRequestMethods) { - self.dataPreprocessor = dataPreprocessor - self.decoder = decoder - self.emptyResponseCodes = emptyResponseCodes - self.emptyRequestMethods = emptyRequestMethods - } - - public func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> T { - guard error == nil else { throw error! } - - guard var data = data, !data.isEmpty else { - guard emptyResponseAllowed(forRequest: request, response: response) else { - throw AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength) - } - - guard let emptyResponseType = T.self as? EmptyResponse.Type, let emptyValue = emptyResponseType.emptyValue() as? T else { - throw AFError.responseSerializationFailed(reason: .invalidEmptyResponse(type: "\(T.self)")) - } - - return emptyValue - } - - data = try dataPreprocessor.preprocess(data) - - do { - return try decoder.decode(T.self, from: data) - } catch { - throw AFError.responseSerializationFailed(reason: .decodingFailed(error: error)) - } - } -} - -extension DataRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - Parameters: - /// - type: `Decodable` type to decode from response data. - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - decoder: `DataDecoder` to use to decode the response. `JSONDecoder()` by default. - /// - completionHandler: A closure to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func responseDecodable(of type: T.Type = T.self, - queue: DispatchQueue = .main, - decoder: DataDecoder = JSONDecoder(), - completionHandler: @escaping (AFDataResponse) -> Void) -> Self { - return response(queue: queue, - responseSerializer: DecodableResponseSerializer(decoder: decoder), - completionHandler: completionHandler) - } -} diff --git a/Example/Pods/Alamofire/Source/SessionDelegate.swift b/Example/Pods/Alamofire/Source/SessionDelegate.swift deleted file mode 100644 index 1cc2b3d..0000000 --- a/Example/Pods/Alamofire/Source/SessionDelegate.swift +++ /dev/null @@ -1,305 +0,0 @@ -// -// SessionDelegate.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. -// - -import Foundation - -/// Class which implements the various `URLSessionDelegate` methods to connect various Alamofire features. -open class SessionDelegate: NSObject { - private let fileManager: FileManager - - weak var stateProvider: SessionStateProvider? - var eventMonitor: EventMonitor? - - /// Creates an instance from the given `FileManager`. - /// - /// - Parameter fileManager: `FileManager` to use for underlying file management, such as moving downloaded files. - /// `.default` by default. - public init(fileManager: FileManager = .default) { - self.fileManager = fileManager - } -} - -/// Type which provides various `Session` state values. -protocol SessionStateProvider: AnyObject { - var serverTrustManager: ServerTrustManager? { get } - var redirectHandler: RedirectHandler? { get } - var cachedResponseHandler: CachedResponseHandler? { get } - - func request(for task: URLSessionTask) -> Request? - func didGatherMetricsForTask(_ task: URLSessionTask) - func didCompleteTask(_ task: URLSessionTask) - func credential(for task: URLSessionTask, in protectionSpace: URLProtectionSpace) -> URLCredential? - func cancelRequestsForSessionInvalidation(with error: Error?) -} - -// MARK: URLSessionDelegate - -extension SessionDelegate: URLSessionDelegate { - open func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) { - eventMonitor?.urlSession(session, didBecomeInvalidWithError: error) - - stateProvider?.cancelRequestsForSessionInvalidation(with: error) - } -} - -// MARK: URLSessionTaskDelegate - -extension SessionDelegate: URLSessionTaskDelegate { - /// Result of a `URLAuthenticationChallenge` evaluation. - typealias ChallengeEvaluation = (disposition: URLSession.AuthChallengeDisposition, credential: URLCredential?, error: AFError?) - - open func urlSession(_ session: URLSession, - task: URLSessionTask, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { - eventMonitor?.urlSession(session, task: task, didReceive: challenge) - - let evaluation: ChallengeEvaluation - switch challenge.protectionSpace.authenticationMethod { - case NSURLAuthenticationMethodServerTrust: - evaluation = attemptServerTrustAuthentication(with: challenge) - case NSURLAuthenticationMethodHTTPBasic, NSURLAuthenticationMethodHTTPDigest: - evaluation = attemptHTTPAuthentication(for: challenge, belongingTo: task) - // case NSURLAuthenticationMethodClientCertificate: - // Alamofire doesn't currently support client certificate validation. - default: - evaluation = (.performDefaultHandling, nil, nil) - } - - if let error = evaluation.error { - stateProvider?.request(for: task)?.didFailTask(task, earlyWithError: error) - } - - completionHandler(evaluation.disposition, evaluation.credential) - } - - /// Evaluates the server trust `URLAuthenticationChallenge` received. - /// - /// - Parameter challenge: The `URLAuthenticationChallenge`. - /// - /// - Returns: The `ChallengeEvaluation`. - func attemptServerTrustAuthentication(with challenge: URLAuthenticationChallenge) -> ChallengeEvaluation { - let host = challenge.protectionSpace.host - - guard challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust, - let trust = challenge.protectionSpace.serverTrust - else { - return (.performDefaultHandling, nil, nil) - } - - do { - guard let evaluator = try stateProvider?.serverTrustManager?.serverTrustEvaluator(forHost: host) else { - return (.performDefaultHandling, nil, nil) - } - - try evaluator.evaluate(trust, forHost: host) - - return (.useCredential, URLCredential(trust: trust), nil) - } catch { - return (.cancelAuthenticationChallenge, nil, error.asAFError(or: .serverTrustEvaluationFailed(reason: .customEvaluationFailed(error: error)))) - } - } - - /// Evaluates the HTTP authentication `URLAuthenticationChallenge` received for `task`. - /// - /// - Parameters: - /// - challenge: The `URLAuthenticationChallenge`. - /// - task: The `URLSessionTask` which received the challenge. - /// - /// - Returns: The `ChallengeEvaluation`. - func attemptHTTPAuthentication(for challenge: URLAuthenticationChallenge, - belongingTo task: URLSessionTask) -> ChallengeEvaluation { - guard challenge.previousFailureCount == 0 else { - return (.rejectProtectionSpace, nil, nil) - } - - guard let credential = stateProvider?.credential(for: task, in: challenge.protectionSpace) else { - return (.performDefaultHandling, nil, nil) - } - - return (.useCredential, credential, nil) - } - - open func urlSession(_ session: URLSession, - task: URLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) { - eventMonitor?.urlSession(session, - task: task, - didSendBodyData: bytesSent, - totalBytesSent: totalBytesSent, - totalBytesExpectedToSend: totalBytesExpectedToSend) - - stateProvider?.request(for: task)?.updateUploadProgress(totalBytesSent: totalBytesSent, - totalBytesExpectedToSend: totalBytesExpectedToSend) - } - - open func urlSession(_ session: URLSession, - task: URLSessionTask, - needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) { - eventMonitor?.urlSession(session, taskNeedsNewBodyStream: task) - - guard let request = stateProvider?.request(for: task) as? UploadRequest else { - fatalError("needNewBodyStream for request that isn't UploadRequest.") - } - - completionHandler(request.inputStream()) - } - - open func urlSession(_ session: URLSession, - task: URLSessionTask, - willPerformHTTPRedirection response: HTTPURLResponse, - newRequest request: URLRequest, - completionHandler: @escaping (URLRequest?) -> Void) { - eventMonitor?.urlSession(session, task: task, willPerformHTTPRedirection: response, newRequest: request) - - if let redirectHandler = stateProvider?.request(for: task)?.redirectHandler ?? stateProvider?.redirectHandler { - redirectHandler.task(task, willBeRedirectedTo: request, for: response, completion: completionHandler) - } else { - completionHandler(request) - } - } - - open func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics) { - eventMonitor?.urlSession(session, task: task, didFinishCollecting: metrics) - - stateProvider?.request(for: task)?.didGatherMetrics(metrics) - - stateProvider?.didGatherMetricsForTask(task) - } - - open func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { - eventMonitor?.urlSession(session, task: task, didCompleteWithError: error) - - stateProvider?.request(for: task)?.didCompleteTask(task, with: error.map { $0.asAFError(or: .sessionTaskFailed(error: $0)) }) - - stateProvider?.didCompleteTask(task) - } - - @available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) - open func urlSession(_ session: URLSession, taskIsWaitingForConnectivity task: URLSessionTask) { - eventMonitor?.urlSession(session, taskIsWaitingForConnectivity: task) - } -} - -// MARK: URLSessionDataDelegate - -extension SessionDelegate: URLSessionDataDelegate { - open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { - eventMonitor?.urlSession(session, dataTask: dataTask, didReceive: data) - - guard let request = stateProvider?.request(for: dataTask) as? DataRequest else { - fatalError("dataTask received data for incorrect Request subclass: \(String(describing: stateProvider?.request(for: dataTask)))") - } - - request.didReceive(data: data) - } - - open func urlSession(_ session: URLSession, - dataTask: URLSessionDataTask, - willCacheResponse proposedResponse: CachedURLResponse, - completionHandler: @escaping (CachedURLResponse?) -> Void) { - eventMonitor?.urlSession(session, dataTask: dataTask, willCacheResponse: proposedResponse) - - if let handler = stateProvider?.request(for: dataTask)?.cachedResponseHandler ?? stateProvider?.cachedResponseHandler { - handler.dataTask(dataTask, willCacheResponse: proposedResponse, completion: completionHandler) - } else { - completionHandler(proposedResponse) - } - } -} - -// MARK: URLSessionDownloadDelegate - -extension SessionDelegate: URLSessionDownloadDelegate { - open func urlSession(_ session: URLSession, - downloadTask: URLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) { - eventMonitor?.urlSession(session, - downloadTask: downloadTask, - didResumeAtOffset: fileOffset, - expectedTotalBytes: expectedTotalBytes) - - guard let downloadRequest = stateProvider?.request(for: downloadTask) as? DownloadRequest else { - fatalError("No DownloadRequest found for downloadTask: \(downloadTask)") - } - - downloadRequest.updateDownloadProgress(bytesWritten: fileOffset, - totalBytesExpectedToWrite: expectedTotalBytes) - } - - open func urlSession(_ session: URLSession, - downloadTask: URLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) { - eventMonitor?.urlSession(session, - downloadTask: downloadTask, - didWriteData: bytesWritten, - totalBytesWritten: totalBytesWritten, - totalBytesExpectedToWrite: totalBytesExpectedToWrite) - - guard let downloadRequest = stateProvider?.request(for: downloadTask) as? DownloadRequest else { - fatalError("No DownloadRequest found for downloadTask: \(downloadTask)") - } - - downloadRequest.updateDownloadProgress(bytesWritten: bytesWritten, - totalBytesExpectedToWrite: totalBytesExpectedToWrite) - } - - open func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) { - eventMonitor?.urlSession(session, downloadTask: downloadTask, didFinishDownloadingTo: location) - - guard let request = stateProvider?.request(for: downloadTask) as? DownloadRequest else { - fatalError("Download finished but either no request found or request wasn't DownloadRequest") - } - - guard let response = request.response else { - fatalError("URLSessionDownloadTask finished downloading with no response.") - } - - let (destination, options) = (request.destination)(location, response) - - eventMonitor?.request(request, didCreateDestinationURL: destination) - - do { - if options.contains(.removePreviousFile), fileManager.fileExists(atPath: destination.path) { - try fileManager.removeItem(at: destination) - } - - if options.contains(.createIntermediateDirectories) { - let directory = destination.deletingLastPathComponent() - try fileManager.createDirectory(at: directory, withIntermediateDirectories: true) - } - - try fileManager.moveItem(at: location, to: destination) - - request.didFinishDownloading(using: downloadTask, with: .success(destination)) - } catch { - request.didFinishDownloading(using: downloadTask, with: .failure(.downloadedFileMoveFailed(error: error, source: location, destination: destination))) - } - } -} diff --git a/Example/Pods/Alamofire/Source/Validation.swift b/Example/Pods/Alamofire/Source/Validation.swift deleted file mode 100644 index 1f702b9..0000000 --- a/Example/Pods/Alamofire/Source/Validation.swift +++ /dev/null @@ -1,247 +0,0 @@ -// -// Validation.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// 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. -// - -import Foundation - -extension Request { - // MARK: Helper Types - - fileprivate typealias ErrorReason = AFError.ResponseValidationFailureReason - - /// Used to represent whether a validation succeeded or failed. - public typealias ValidationResult = Result - - fileprivate struct MIMEType { - let type: String - let subtype: String - - var isWildcard: Bool { return type == "*" && subtype == "*" } - - init?(_ string: String) { - let components: [String] = { - let stripped = string.trimmingCharacters(in: .whitespacesAndNewlines) - let split = stripped[..<(stripped.range(of: ";")?.lowerBound ?? stripped.endIndex)] - - return split.components(separatedBy: "/") - }() - - if let type = components.first, let subtype = components.last { - self.type = type - self.subtype = subtype - } else { - return nil - } - } - - func matches(_ mime: MIMEType) -> Bool { - switch (type, subtype) { - case (mime.type, mime.subtype), (mime.type, "*"), ("*", mime.subtype), ("*", "*"): - return true - default: - return false - } - } - } - - // MARK: Properties - - fileprivate var acceptableStatusCodes: Range { return 200..<300 } - - fileprivate var acceptableContentTypes: [String] { - if let accept = request?.value(forHTTPHeaderField: "Accept") { - return accept.components(separatedBy: ",") - } - - return ["*/*"] - } - - // MARK: Status Code - - fileprivate func validate(statusCode acceptableStatusCodes: S, - response: HTTPURLResponse) - -> ValidationResult - where S.Iterator.Element == Int { - if acceptableStatusCodes.contains(response.statusCode) { - return .success(Void()) - } else { - let reason: ErrorReason = .unacceptableStatusCode(code: response.statusCode) - return .failure(AFError.responseValidationFailed(reason: reason)) - } - } - - // MARK: Content Type - - fileprivate func validate(contentType acceptableContentTypes: S, - response: HTTPURLResponse, - data: Data?) - -> ValidationResult - where S.Iterator.Element == String { - guard let data = data, data.count > 0 else { return .success(Void()) } - - guard - let responseContentType = response.mimeType, - let responseMIMEType = MIMEType(responseContentType) - else { - for contentType in acceptableContentTypes { - if let mimeType = MIMEType(contentType), mimeType.isWildcard { - return .success(Void()) - } - } - - let error: AFError = { - let reason: ErrorReason = .missingContentType(acceptableContentTypes: Array(acceptableContentTypes)) - return AFError.responseValidationFailed(reason: reason) - }() - - return .failure(error) - } - - for contentType in acceptableContentTypes { - if let acceptableMIMEType = MIMEType(contentType), acceptableMIMEType.matches(responseMIMEType) { - return .success(Void()) - } - } - - let error: AFError = { - let reason: ErrorReason = .unacceptableContentType(acceptableContentTypes: Array(acceptableContentTypes), - responseContentType: responseContentType) - - return AFError.responseValidationFailed(reason: reason) - }() - - return .failure(error) - } -} - -// MARK: - - -extension DataRequest { - /// A closure used to validate a request that takes a URL request, a URL response and data, and returns whether the - /// request was valid. - public typealias Validation = (URLRequest?, HTTPURLResponse, Data?) -> ValidationResult - - /// Validates that the response has a status code in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter range: The range of acceptable status codes. - /// - /// - returns: The request. - @discardableResult - public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { - return validate { [unowned self] _, response, _ in - self.validate(statusCode: acceptableStatusCodes, response: response) - } - } - - /// Validates that the response has a content type in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. - /// - /// - returns: The request. - @discardableResult - public func validate(contentType acceptableContentTypes: @escaping @autoclosure () -> S) -> Self where S.Iterator.Element == String { - return validate { [unowned self] _, response, data in - self.validate(contentType: acceptableContentTypes(), response: response, data: data) - } - } - - /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content - /// type matches any specified in the Accept HTTP header field. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - returns: The request. - @discardableResult - public func validate() -> Self { - let contentTypes: () -> [String] = { [unowned self] in - self.acceptableContentTypes - } - return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes()) - } -} - -// MARK: - - -extension DownloadRequest { - /// A closure used to validate a request that takes a URL request, a URL response, a temporary URL and a - /// destination URL, and returns whether the request was valid. - public typealias Validation = (_ request: URLRequest?, - _ response: HTTPURLResponse, - _ fileURL: URL?) - -> ValidationResult - - /// Validates that the response has a status code in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter range: The range of acceptable status codes. - /// - /// - returns: The request. - @discardableResult - public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { - return validate { [unowned self] _, response, _ in - self.validate(statusCode: acceptableStatusCodes, response: response) - } - } - - /// Validates that the response has a content type in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. - /// - /// - returns: The request. - @discardableResult - public func validate(contentType acceptableContentTypes: @escaping @autoclosure () -> S) -> Self where S.Iterator.Element == String { - return validate { [unowned self] _, response, fileURL in - guard let validFileURL = fileURL else { - return .failure(AFError.responseValidationFailed(reason: .dataFileNil)) - } - - do { - let data = try Data(contentsOf: validFileURL) - return self.validate(contentType: acceptableContentTypes(), response: response, data: data) - } catch { - return .failure(AFError.responseValidationFailed(reason: .dataFileReadFailed(at: validFileURL))) - } - } - } - - /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content - /// type matches any specified in the Accept HTTP header field. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - returns: The request. - @discardableResult - public func validate() -> Self { - let contentTypes = { [unowned self] in - self.acceptableContentTypes - } - return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes()) - } -} diff --git a/Example/Pods/CleanJSON/CleanJSON/Classes/CaseDefaultable.swift b/Example/Pods/CleanJSON/CleanJSON/Classes/CaseDefaultable.swift deleted file mode 100644 index 2e48645..0000000 --- a/Example/Pods/CleanJSON/CleanJSON/Classes/CaseDefaultable.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// CaseDefaultable.swift -// CleanJSON -// -// Created by Pircate(swifter.dev@gmail.com) on 2018/11/30 -// Copyright © 2018 Pircate. All rights reserved. -// -// Reference: https://github.com/line/line-sdk-ios-swift/blob/master/LineSDK/LineSDK/Networking/Model/CustomizeCoding/CodingExtension.swift - -public protocol CaseDefaultable: RawRepresentable { - - static var defaultCase: Self { get } -} - -public extension CaseDefaultable where Self: Decodable, Self.RawValue: Decodable { - - init(from decoder: Decoder) throws { - guard let _decoder = decoder as? _CleanJSONDecoder else { - let container = try decoder.singleValueContainer() - let rawValue = try container.decode(RawValue.self) - self = Self.init(rawValue: rawValue) ?? Self.defaultCase - return - } - - self = try _decoder.decodeCase(Self.self) - } -} - -private extension _CleanJSONDecoder { - - func decodeCase(_ type: T.Type) throws -> T - where T: CaseDefaultable, - T: Decodable, - T.RawValue: Decodable - { - guard !decodeNil(), !codingPath.isEmpty, storage.topContainer is T.RawValue else { - return T.defaultCase - } - - if let number = storage.topContainer as? NSNumber, - (number === kCFBooleanTrue || number === kCFBooleanFalse) { - guard let rawValue = number.boolValue as? T.RawValue else { - return T.defaultCase - } - - return T.init(rawValue: rawValue) ?? T.defaultCase - } - - let rawValue = try decode(T.RawValue.self) - return T.init(rawValue: rawValue) ?? T.defaultCase - } -} diff --git a/Example/Pods/CleanJSON/CleanJSON/Classes/CleanDecoder.swift b/Example/Pods/CleanJSON/CleanJSON/Classes/CleanDecoder.swift deleted file mode 100644 index 2927129..0000000 --- a/Example/Pods/CleanJSON/CleanJSON/Classes/CleanDecoder.swift +++ /dev/null @@ -1,126 +0,0 @@ -// -// CleanDecoder.swift -// CleanJSON -// -// Created by Pircate(swifter.dev@gmail.com) on 2018/12/10 -// Copyright © 2018 Pircate. All rights reserved. -// - -import Foundation - -public protocol CleanDecoder: Decoder { - - func decodeNil() -> Bool - - func decodeIfPresent(_ type: Bool.Type) throws -> Bool? - - func decodeIfPresent(_ type: Int.Type) throws -> Int? - - func decodeIfPresent(_ type: Int8.Type) throws -> Int8? - - func decodeIfPresent(_ type: Int16.Type) throws -> Int16? - - func decodeIfPresent(_ type: Int32.Type) throws -> Int32? - - func decodeIfPresent(_ type: Int64.Type) throws -> Int64? - - func decodeIfPresent(_ type: UInt.Type) throws -> UInt? - - func decodeIfPresent(_ type: UInt8.Type) throws -> UInt8? - - func decodeIfPresent(_ type: UInt16.Type) throws -> UInt16? - - func decodeIfPresent(_ type: UInt32.Type) throws -> UInt32? - - func decodeIfPresent(_ type: UInt64.Type) throws -> UInt64? - - func decodeIfPresent(_ type: Float.Type) throws -> Float? - - func decodeIfPresent(_ type: Double.Type) throws -> Double? - - func decodeIfPresent(_ type: String.Type) throws -> String? - - func decodeIfPresent(_ type: Date.Type) throws -> Date? - - func decodeIfPresent(_ type: Data.Type) throws -> Data? - - func decodeIfPresent(_ type: Decimal.Type) throws -> Decimal? - - func decodeIfPresent(_ type: T.Type) throws -> T? -} - -// MARK: CleanDecoder Methods -extension _CleanJSONDecoder { - - func decodeIfPresent(_ type: Bool.Type) throws -> Bool? { - return try unbox(storage.topContainer, as: type) - } - - func decodeIfPresent(_ type: Int.Type) throws -> Int? { - return try unbox(storage.topContainer, as: type) - } - - func decodeIfPresent(_ type: Int8.Type) throws -> Int8? { - return try unbox(storage.topContainer, as: type) - } - - func decodeIfPresent(_ type: Int16.Type) throws -> Int16? { - return try unbox(storage.topContainer, as: type) - } - - func decodeIfPresent(_ type: Int32.Type) throws -> Int32? { - return try unbox(storage.topContainer, as: type) - } - - func decodeIfPresent(_ type: Int64.Type) throws -> Int64? { - return try unbox(storage.topContainer, as: type) - } - - func decodeIfPresent(_ type: UInt.Type) throws -> UInt? { - return try unbox(storage.topContainer, as: type) - } - - func decodeIfPresent(_ type: UInt8.Type) throws -> UInt8? { - return try unbox(storage.topContainer, as: type) - } - - func decodeIfPresent(_ type: UInt16.Type) throws -> UInt16? { - return try unbox(storage.topContainer, as: type) - } - - func decodeIfPresent(_ type: UInt32.Type) throws -> UInt32? { - return try unbox(storage.topContainer, as: type) - } - - func decodeIfPresent(_ type: UInt64.Type) throws -> UInt64? { - return try unbox(storage.topContainer, as: type) - } - - func decodeIfPresent(_ type: Float.Type) throws -> Float? { - return try unbox(storage.topContainer, as: type) - } - - func decodeIfPresent(_ type: Double.Type) throws -> Double? { - return try unbox(storage.topContainer, as: type) - } - - func decodeIfPresent(_ type: String.Type) throws -> String? { - return try unbox(storage.topContainer, as: type) - } - - func decodeIfPresent(_ type: Date.Type) throws -> Date? { - return try unbox(storage.topContainer, as: type) - } - - func decodeIfPresent(_ type: Data.Type) throws -> Data? { - return try unbox(storage.topContainer, as: type) - } - - func decodeIfPresent(_ type: Decimal.Type) throws -> Decimal? { - return try unbox(storage.topContainer, as: type) - } - - func decodeIfPresent(_ type: T.Type) throws -> T? { - return try unbox(storage.topContainer, as: type) - } -} diff --git a/Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONDecoder.swift b/Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONDecoder.swift deleted file mode 100644 index ab64c44..0000000 --- a/Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONDecoder.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// CleanJSONDecoder.swift -// CleanJSON -// -// Created by Pircate(swifter.dev@gmail.com) on 2018/10/10 -// Copyright © 2018 Pircate. All rights reserved. -// - -import Foundation - -open class CleanJSONDecoder: JSONDecoder { - - /// Options set on the top-level encoder to pass down the decoding hierarchy. - struct Options { - let dateDecodingStrategy: DateDecodingStrategy - let dataDecodingStrategy: DataDecodingStrategy - let nonConformingFloatDecodingStrategy: NonConformingFloatDecodingStrategy - let keyDecodingStrategy: KeyDecodingStrategy - let keyNotFoundDecodingStrategy: KeyNotFoundDecodingStrategy - let valueNotFoundDecodingStrategy: ValueNotFoundDecodingStrategy - let nestedContainerDecodingStrategy: NestedContainerDecodingStrategy - let jsonStringDecodingStrategy: JSONStringDecodingStrategy - let userInfo: [CodingUserInfoKey : Any] - } - - /// The options set on the top-level decoder. - var options: Options { - return Options(dateDecodingStrategy: dateDecodingStrategy, - dataDecodingStrategy: dataDecodingStrategy, - nonConformingFloatDecodingStrategy: nonConformingFloatDecodingStrategy, - keyDecodingStrategy: keyDecodingStrategy, - keyNotFoundDecodingStrategy: keyNotFoundDecodingStrategy, - valueNotFoundDecodingStrategy: valueNotFoundDecodingStrategy, - nestedContainerDecodingStrategy: nestedContainerDecodingStrategy, - jsonStringDecodingStrategy: jsonStringDecodingStrategy, - userInfo: userInfo) - } - - /// The strategy to use for decoding when key not found. Defaults to `.useDefaultValue`. - open var keyNotFoundDecodingStrategy: KeyNotFoundDecodingStrategy = .useDefaultValue - - /// The strategy to use for decoding when value not found. Defaults to `.custom`. - open var valueNotFoundDecodingStrategy: ValueNotFoundDecodingStrategy = .custom(Adapter()) - - /// The strategy to use for decoding nested container. - open var nestedContainerDecodingStrategy: NestedContainerDecodingStrategy = .init() - - /// The strategy to use for decoding JSON string. - open var jsonStringDecodingStrategy: JSONStringDecodingStrategy = .containsKeys([]) - - // MARK: - Decoding Values - - /// Decodes a top-level value of the given type from the given JSON representation. - /// - /// - parameter type: The type of the value to decode. - /// - parameter data: The data to decode from. - /// - returns: A value of the requested type. - /// - throws: `DecodingError.dataCorrupted` if values requested from the payload are corrupted, or if the given data is not valid JSON. - /// - throws: An error if any value throws an error during decoding. - open override func decode(_ type: T.Type, from data: Data) throws -> T { - let topLevel: Any - do { - topLevel = try JSONSerialization.jsonObject(with: data) - } catch { - throw DecodingError.dataCorrupted(DecodingError.Context(codingPath: [], debugDescription: "The given data was not valid JSON.", underlyingError: error)) - } - - let decoder = _CleanJSONDecoder(referencing: topLevel, options: self.options) - guard let value = try decoder.unbox(topLevel, as: type) else { - throw DecodingError.valueNotFound(type, DecodingError.Context(codingPath: [], debugDescription: "The given data did not contain a top-level value.")) - } - - return value - } -} diff --git a/Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONDecodingStorage.swift b/Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONDecodingStorage.swift deleted file mode 100644 index c5ce571..0000000 --- a/Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONDecodingStorage.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// CleanJSONDecodingStorage.swift -// CleanJSON -// -// Created by Pircate(swifter.dev@gmail.com) on 2018/10/10 -// Copyright © 2018 Pircate. All rights reserved. -// - -import Foundation - -struct CleanJSONDecodingStorage { - - /// The container stack. - /// Elements may be any one of the JSON types (NSNull, NSNumber, String, Array, [String : Any]). - private(set) fileprivate var containers: [Any] = [] - - // MARK: - Initialization - - /// Initializes `self` with no containers. - init() {} - - // MARK: - Modifying the Stack - - var count: Int { - return self.containers.count - } - - var topContainer: Any { - precondition(!self.containers.isEmpty, "Empty container stack.") - return self.containers.last! - } - - mutating func push(container: Any) { - self.containers.append(container) - } - - mutating func popContainer() { - precondition(!self.containers.isEmpty, "Empty container stack.") - self.containers.removeLast() - } -} diff --git a/Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONKey.swift b/Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONKey.swift deleted file mode 100644 index cda19e6..0000000 --- a/Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONKey.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// CleanJSONKey.swift -// CleanJSON -// -// Created by Pircate(swifter.dev@gmail.com) on 2018/10/11 -// Copyright © 2018 Pircate. All rights reserved. -// - -import Foundation - -struct CleanJSONKey : CodingKey { - - public var stringValue: String - - public var intValue: Int? - - public init?(stringValue: String) { - self.stringValue = stringValue - self.intValue = nil - } - - public init?(intValue: Int) { - self.stringValue = "\(intValue)" - self.intValue = intValue - } - - public init(stringValue: String, intValue: Int?) { - self.stringValue = stringValue - self.intValue = intValue - } - - init(index: Int) { - self.stringValue = "Index \(index)" - self.intValue = index - } - - static let `super` = CleanJSONKey(stringValue: "super")! -} diff --git a/Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONKeyedDecodingContainer.swift b/Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONKeyedDecodingContainer.swift deleted file mode 100644 index 77cc45f..0000000 --- a/Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONKeyedDecodingContainer.swift +++ /dev/null @@ -1,883 +0,0 @@ -// -// CleanJSONKeyedDecodingContainer.swift -// CleanJSON -// -// Created by Pircate(swifter.dev@gmail.com) on 2018/10/10 -// Copyright © 2018 Pircate. All rights reserved. -// - -import Foundation - -struct CleanJSONKeyedDecodingContainer: KeyedDecodingContainerProtocol { - - typealias Key = K - - // MARK: Properties - - /// A reference to the decoder we're reading from. - private let decoder: _CleanJSONDecoder - - /// A reference to the container we're reading from. - private let container: [String : Any] - - /// The path of coding keys taken to get to this point in decoding. - private(set) public var codingPath: [CodingKey] - - // MARK: - Initialization - - /// Initializes `self` by referencing the given decoder and container. - init(referencing decoder: _CleanJSONDecoder, wrapping container: [String : Any]) { - self.decoder = decoder - switch decoder.options.keyDecodingStrategy { - case .useDefaultKeys: - self.container = container - case .convertFromSnakeCase: - // Convert the snake case keys in the container to camel case. - // If we hit a duplicate key after conversion, then we'll use the first one we saw. Effectively an undefined behavior with JSON dictionaries. - self.container = Dictionary(container.map { - dict in (CleanJSONDecoder.KeyDecodingStrategy._convertFromSnakeCase(dict.key), dict.value) - }, uniquingKeysWith: { (first, _) in first }) - case .custom(let converter): - self.container = Dictionary(container.map { - key, value in (converter(decoder.codingPath + [CleanJSONKey(stringValue: key, intValue: nil)]).stringValue, value) - }, uniquingKeysWith: { (first, _) in first }) - @unknown default: - self.container = container - } - self.codingPath = decoder.codingPath - } - - // MARK: - KeyedDecodingContainerProtocol Methods - - public var allKeys: [Key] { - return self.container.keys.compactMap { Key(stringValue: $0) } - } - - public func contains(_ key: Key) -> Bool { - return self.container[key.stringValue] != nil - } - - public func decodeNil(forKey key: Key) throws -> Bool { - guard let entry = self.container[key.stringValue] else { - throw DecodingError.Keyed.keyNotFound(key, codingPath: decoder.codingPath) - } - - return entry is NSNull - } - - @inline(__always) - public func decode(_ type: Bool.Type, forKey key: Key) throws -> Bool { - guard let entry = self.container[key.stringValue] else { - return try decodeIfKeyNotFound(key) - } - - self.decoder.codingPath.append(key) - defer { self.decoder.codingPath.removeLast() } - - guard let value = try self.decoder.unbox(entry, as: Bool.self) else { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: decoder.codingPath) - case .useDefaultValue: - return Bool.defaultValue - case .custom(let adapter): - decoder.storage.push(container: entry) - defer { decoder.storage.popContainer() } - return try adapter.adapt(decoder) - } - } - - return value - } - - @inline(__always) - public func decode(_ type: Int.Type, forKey key: Key) throws -> Int { - guard let entry = self.container[key.stringValue] else { - return try decodeIfKeyNotFound(key) - } - - self.decoder.codingPath.append(key) - defer { self.decoder.codingPath.removeLast() } - - guard let value = try self.decoder.unbox(entry, as: Int.self) else { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: decoder.codingPath) - case .useDefaultValue: - return Int.defaultValue - case .custom(let adapter): - decoder.storage.push(container: entry) - defer { decoder.storage.popContainer() } - return try adapter.adapt(decoder) - } - } - - return value - } - - @inline(__always) - public func decode(_ type: Int8.Type, forKey key: Key) throws -> Int8 { - guard let entry = self.container[key.stringValue] else { - return try decodeIfKeyNotFound(key) - } - - self.decoder.codingPath.append(key) - defer { self.decoder.codingPath.removeLast() } - - guard let value = try self.decoder.unbox(entry, as: Int8.self) else { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: decoder.codingPath) - case .useDefaultValue: - return Int8.defaultValue - case .custom(let adapter): - decoder.storage.push(container: entry) - defer { decoder.storage.popContainer() } - return try adapter.adapt(decoder) - } - } - - return value - } - - @inline(__always) - public func decode(_ type: Int16.Type, forKey key: Key) throws -> Int16 { - guard let entry = self.container[key.stringValue] else { - return try decodeIfKeyNotFound(key) - } - - self.decoder.codingPath.append(key) - defer { self.decoder.codingPath.removeLast() } - - guard let value = try self.decoder.unbox(entry, as: Int16.self) else { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: decoder.codingPath) - case .useDefaultValue: - return Int16.defaultValue - case .custom(let adapter): - decoder.storage.push(container: entry) - defer { decoder.storage.popContainer() } - return try adapter.adapt(decoder) - } - } - - return value - } - - @inline(__always) - public func decode(_ type: Int32.Type, forKey key: Key) throws -> Int32 { - guard let entry = self.container[key.stringValue] else { - return try decodeIfKeyNotFound(key) - } - - self.decoder.codingPath.append(key) - defer { self.decoder.codingPath.removeLast() } - - guard let value = try self.decoder.unbox(entry, as: Int32.self) else { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: decoder.codingPath) - case .useDefaultValue: - return Int32.defaultValue - case .custom(let adapter): - decoder.storage.push(container: entry) - defer { decoder.storage.popContainer() } - return try adapter.adapt(decoder) - } - } - - return value - } - - @inline(__always) - public func decode(_ type: Int64.Type, forKey key: Key) throws -> Int64 { - guard let entry = self.container[key.stringValue] else { - return try decodeIfKeyNotFound(key) - } - - self.decoder.codingPath.append(key) - defer { self.decoder.codingPath.removeLast() } - - guard let value = try self.decoder.unbox(entry, as: Int64.self) else { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: decoder.codingPath) - case .useDefaultValue: - return Int64.defaultValue - case .custom(let adapter): - decoder.storage.push(container: entry) - defer { decoder.storage.popContainer() } - return try adapter.adapt(decoder) - } - } - - return value - } - - @inline(__always) - public func decode(_ type: UInt.Type, forKey key: Key) throws -> UInt { - guard let entry = self.container[key.stringValue] else { - return try decodeIfKeyNotFound(key) - } - - self.decoder.codingPath.append(key) - defer { self.decoder.codingPath.removeLast() } - - guard let value = try self.decoder.unbox(entry, as: UInt.self) else { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: decoder.codingPath) - case .useDefaultValue: - return UInt.defaultValue - case .custom(let adapter): - decoder.storage.push(container: entry) - defer { decoder.storage.popContainer() } - return try adapter.adapt(decoder) - } - } - - return value - } - - @inline(__always) - public func decode(_ type: UInt8.Type, forKey key: Key) throws -> UInt8 { - guard let entry = self.container[key.stringValue] else { - return try decodeIfKeyNotFound(key) - } - - self.decoder.codingPath.append(key) - defer { self.decoder.codingPath.removeLast() } - - guard let value = try self.decoder.unbox(entry, as: UInt8.self) else { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: decoder.codingPath) - case .useDefaultValue: - return UInt8.defaultValue - case .custom(let adapter): - decoder.storage.push(container: entry) - defer { decoder.storage.popContainer() } - return try adapter.adapt(decoder) - } - } - - return value - } - - @inline(__always) - public func decode(_ type: UInt16.Type, forKey key: Key) throws -> UInt16 { - guard let entry = self.container[key.stringValue] else { - return try decodeIfKeyNotFound(key) - } - - self.decoder.codingPath.append(key) - defer { self.decoder.codingPath.removeLast() } - - guard let value = try self.decoder.unbox(entry, as: UInt16.self) else { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: decoder.codingPath) - case .useDefaultValue: - return UInt16.defaultValue - case .custom(let adapter): - decoder.storage.push(container: entry) - defer { decoder.storage.popContainer() } - return try adapter.adapt(decoder) - } - } - - return value - } - - @inline(__always) - public func decode(_ type: UInt32.Type, forKey key: Key) throws -> UInt32 { - guard let entry = self.container[key.stringValue] else { - return try decodeIfKeyNotFound(key) - } - - self.decoder.codingPath.append(key) - defer { self.decoder.codingPath.removeLast() } - - guard let value = try self.decoder.unbox(entry, as: UInt32.self) else { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: decoder.codingPath) - case .useDefaultValue: - return UInt32.defaultValue - case .custom(let adapter): - decoder.storage.push(container: entry) - defer { decoder.storage.popContainer() } - return try adapter.adapt(decoder) - } - } - - return value - } - - @inline(__always) - public func decode(_ type: UInt64.Type, forKey key: Key) throws -> UInt64 { - guard let entry = self.container[key.stringValue] else { - return try decodeIfKeyNotFound(key) - } - - self.decoder.codingPath.append(key) - defer { self.decoder.codingPath.removeLast() } - - guard let value = try self.decoder.unbox(entry, as: UInt64.self) else { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: decoder.codingPath) - case .useDefaultValue: - return UInt64.defaultValue - case .custom(let adapter): - decoder.storage.push(container: entry) - defer { decoder.storage.popContainer() } - return try adapter.adapt(decoder) - } - } - - return value - } - - @inline(__always) - public func decode(_ type: Float.Type, forKey key: Key) throws -> Float { - guard let entry = self.container[key.stringValue] else { - return try decodeIfKeyNotFound(key) - } - - self.decoder.codingPath.append(key) - defer { self.decoder.codingPath.removeLast() } - - guard let value = try self.decoder.unbox(entry, as: Float.self) else { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: decoder.codingPath) - case .useDefaultValue: - return Float.defaultValue - case .custom(let adapter): - decoder.storage.push(container: entry) - defer { decoder.storage.popContainer() } - return try adapter.adapt(decoder) - } - } - - return value - } - - @inline(__always) - public func decode(_ type: Double.Type, forKey key: Key) throws -> Double { - guard let entry = self.container[key.stringValue] else { - return try decodeIfKeyNotFound(key) - } - - self.decoder.codingPath.append(key) - defer { self.decoder.codingPath.removeLast() } - - guard let value = try self.decoder.unbox(entry, as: Double.self) else { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: decoder.codingPath) - case .useDefaultValue: - return Double.defaultValue - case .custom(let adapter): - decoder.storage.push(container: entry) - defer { decoder.storage.popContainer() } - return try adapter.adapt(decoder) - } - } - - return value - } - - @inline(__always) - public func decode(_ type: String.Type, forKey key: Key) throws -> String { - guard let entry = self.container[key.stringValue] else { - return try decodeIfKeyNotFound(key) - } - - self.decoder.codingPath.append(key) - defer { self.decoder.codingPath.removeLast() } - - guard let value = try self.decoder.unbox(entry, as: String.self) else { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: decoder.codingPath) - case .useDefaultValue: - return String.defaultValue - case .custom(let adapter): - decoder.storage.push(container: entry) - defer { decoder.storage.popContainer() } - return try adapter.adapt(decoder) - } - } - - return value - } - - @inline(__always) - public func decode(_ type: T.Type, forKey key: Key) throws -> T { - guard let entry = container[key.stringValue] else { - switch decoder.options.keyNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: decoder.codingPath) - case .useDefaultValue: - decoder.codingPath.append(key) - defer { decoder.codingPath.removeLast() } - return try decoder.decodeAsDefaultValue() - } - } - - decoder.codingPath.append(key) - defer { decoder.codingPath.removeLast() } - - let decodeObject = { (decoder: _CleanJSONDecoder) -> T in - if let value = try decoder.unbox(entry, as: type) { return value } - - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: decoder.codingPath) - case .useDefaultValue: - return try decoder.decodeAsDefaultValue() - case .custom: - decoder.storage.push(container: entry) - defer { decoder.storage.popContainer() } - return try decoder.decode(type) - } - } - - let decodeJSONString = { (decoder: _CleanJSONDecoder) -> T in - if let _ = String.defaultValue as? T { return try decodeObject(decoder) } - - if let string = try decoder.unbox(entry, as: String.self), - let object = string.decode(to: type, options: decoder.options) { - return object - } - - return try decodeObject(decoder) - } - - switch decoder.options.jsonStringDecodingStrategy { - case .containsKeys(let keys): - guard !keys.isEmpty else { return try decodeObject(decoder) } - - guard keys.contains(where: { $0.stringValue == key.stringValue }) else { - return try decodeObject(decoder) - } - - return try decodeJSONString(decoder) - case .all: - return try decodeJSONString(decoder) - } - } - - @inline(__always) - public func nestedContainer(keyedBy type: NestedKey.Type, forKey key: Key) throws -> KeyedDecodingContainer { - self.decoder.codingPath.append(key) - defer { self.decoder.codingPath.removeLast() } - - guard let value = self.container[key.stringValue] else { - switch decoder.options.nestedContainerDecodingStrategy.keyNotFound { - case .throw: - throw DecodingError.Nested.keyNotFound(key, codingPath: codingPath) - case .useEmptyContainer: - return nestedContainer() - } - } - - guard let dictionary = value as? [String : Any] else { - switch decoder.options.nestedContainerDecodingStrategy.typeMismatch { - case .throw: - throw DecodingError._typeMismatch( - at: self.codingPath, - expectation: [String : Any].self, - reality: value) - case .useEmptyContainer: - return nestedContainer() - } - } - - return nestedContainer(wrapping: dictionary) - } - - @inline(__always) - private func nestedContainer(wrapping dictionary: [String: Any] = [:]) - -> KeyedDecodingContainer { - let container = CleanJSONKeyedDecodingContainer( - referencing: decoder, - wrapping: dictionary) - return KeyedDecodingContainer(container) - } - - @inline(__always) - public func nestedUnkeyedContainer(forKey key: Key) throws -> UnkeyedDecodingContainer { - self.decoder.codingPath.append(key) - defer { self.decoder.codingPath.removeLast() } - - guard let value = self.container[key.stringValue] else { - switch decoder.options.nestedContainerDecodingStrategy.keyNotFound { - case .throw: - throw DecodingError.Nested.keyNotFound(key, codingPath: codingPath, isUnkeyed: true) - case .useEmptyContainer: - return CleanJSONUnkeyedDecodingContainer(referencing: self.decoder, wrapping: []) - } - } - - guard let array = value as? [Any] else { - switch decoder.options.nestedContainerDecodingStrategy.typeMismatch { - case .throw: - throw DecodingError._typeMismatch( - at: self.codingPath, - expectation: [Any].self, reality: value) - case .useEmptyContainer: - return CleanJSONUnkeyedDecodingContainer(referencing: self.decoder, wrapping: []) - } - } - - return CleanJSONUnkeyedDecodingContainer(referencing: self.decoder, wrapping: array) - } - - @inline(__always) - private func _superDecoder(forKey key: CodingKey) throws -> Decoder { - self.decoder.codingPath.append(key) - defer { self.decoder.codingPath.removeLast() } - - let value: Any = self.container[key.stringValue] ?? NSNull() - return _CleanJSONDecoder(referencing: value, at: self.decoder.codingPath, options: self.decoder.options) - } - - @inline(__always) - public func superDecoder() throws -> Decoder { - return try _superDecoder(forKey: CleanJSONKey.super) - } - - @inline(__always) - public func superDecoder(forKey key: Key) throws -> Decoder { - return try _superDecoder(forKey: key) - } -} - -extension CleanJSONKeyedDecodingContainer { - - @inline(__always) - func decodeIfPresent(_ type: Bool.Type, forKey key: K) throws -> Bool? { - guard contains(key), let entry = container[key.stringValue] else { return nil } - - if let value = try decoder.unbox(entry, as: type) { return value } - - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: decoder.codingPath) - case .useDefaultValue: - return nil - case .custom(let adapter): - return try adapter.adaptIfPresent(decoder) - } - } - - @inline(__always) - func decodeIfPresent(_ type: Int.Type, forKey key: K) throws -> Int? { - guard contains(key), let entry = container[key.stringValue] else { return nil } - - if let value = try decoder.unbox(entry, as: type) { return value } - - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: decoder.codingPath) - case .useDefaultValue: - return nil - case .custom(let adapter): - return try adapter.adaptIfPresent(decoder) - } - } - - @inline(__always) - func decodeIfPresent(_ type: Int8.Type, forKey key: K) throws -> Int8? { - guard contains(key), let entry = container[key.stringValue] else { return nil } - - if let value = try decoder.unbox(entry, as: type) { return value } - - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: decoder.codingPath) - case .useDefaultValue: - return nil - case .custom(let adapter): - return try adapter.adaptIfPresent(decoder) - } - } - - @inline(__always) - func decodeIfPresent(_ type: Int16.Type, forKey key: K) throws -> Int16? { - guard contains(key), let entry = container[key.stringValue] else { return nil } - - if let value = try decoder.unbox(entry, as: type) { return value } - - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: decoder.codingPath) - case .useDefaultValue: - return nil - case .custom(let adapter): - return try adapter.adaptIfPresent(decoder) - } - } - - @inline(__always) - func decodeIfPresent(_ type: Int32.Type, forKey key: K) throws -> Int32? { - guard contains(key), let entry = container[key.stringValue] else { return nil } - - if let value = try decoder.unbox(entry, as: type) { return value } - - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: decoder.codingPath) - case .useDefaultValue: - return nil - case .custom(let adapter): - return try adapter.adaptIfPresent(decoder) - } - } - - @inline(__always) - func decodeIfPresent(_ type: Int64.Type, forKey key: K) throws -> Int64? { - guard contains(key), let entry = container[key.stringValue] else { return nil } - - if let value = try decoder.unbox(entry, as: type) { return value } - - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: decoder.codingPath) - case .useDefaultValue: - return nil - case .custom(let adapter): - return try adapter.adaptIfPresent(decoder) - } - } - - @inline(__always) - func decodeIfPresent(_ type: UInt.Type, forKey key: K) throws -> UInt? { - guard contains(key), let entry = container[key.stringValue] else { return nil } - - if let value = try decoder.unbox(entry, as: type) { return value } - - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: decoder.codingPath) - case .useDefaultValue: - return nil - case .custom(let adapter): - return try adapter.adaptIfPresent(decoder) - } - } - - @inline(__always) - func decodeIfPresent(_ type: UInt8.Type, forKey key: K) throws -> UInt8? { - guard contains(key), let entry = container[key.stringValue] else { return nil } - - if let value = try decoder.unbox(entry, as: type) { return value } - - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: decoder.codingPath) - case .useDefaultValue: - return nil - case .custom(let adapter): - return try adapter.adaptIfPresent(decoder) - } - } - - @inline(__always) - func decodeIfPresent(_ type: UInt16.Type, forKey key: K) throws -> UInt16? { - guard contains(key), let entry = container[key.stringValue] else { return nil } - - if let value = try decoder.unbox(entry, as: type) { return value } - - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: decoder.codingPath) - case .useDefaultValue: - return nil - case .custom(let adapter): - return try adapter.adaptIfPresent(decoder) - } - } - - @inline(__always) - func decodeIfPresent(_ type: UInt32.Type, forKey key: K) throws -> UInt32? { - guard contains(key), let entry = container[key.stringValue] else { return nil } - - if let value = try decoder.unbox(entry, as: type) { return value } - - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: decoder.codingPath) - case .useDefaultValue: - return nil - case .custom(let adapter): - return try adapter.adaptIfPresent(decoder) - } - } - - @inline(__always) - func decodeIfPresent(_ type: UInt64.Type, forKey key: K) throws -> UInt64? { - guard contains(key), let entry = container[key.stringValue] else { return nil } - - if let value = try decoder.unbox(entry, as: type) { return value } - - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: decoder.codingPath) - case .useDefaultValue: - return nil - case .custom(let adapter): - return try adapter.adaptIfPresent(decoder) - } - } - - @inline(__always) - func decodeIfPresent(_ type: Float.Type, forKey key: K) throws -> Float? { - guard contains(key), let entry = container[key.stringValue] else { return nil } - - if let value = try decoder.unbox(entry, as: type) { return value } - - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: decoder.codingPath) - case .useDefaultValue: - return nil - case .custom(let adapter): - return try adapter.adaptIfPresent(decoder) - } - } - - @inline(__always) - func decodeIfPresent(_ type: Double.Type, forKey key: K) throws -> Double? { - guard contains(key), let entry = container[key.stringValue] else { return nil } - - if let value = try decoder.unbox(entry, as: type) { return value } - - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: decoder.codingPath) - case .useDefaultValue: - return nil - case .custom(let adapter): - return try adapter.adaptIfPresent(decoder) - } - } - - @inline(__always) - func decodeIfPresent(_ type: String.Type, forKey key: K) throws -> String? { - guard contains(key), let entry = container[key.stringValue] else { return nil } - - if let value = try decoder.unbox(entry, as: type) { return value } - - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: decoder.codingPath) - case .useDefaultValue: - return nil - case .custom(let adapter): - return try adapter.adaptIfPresent(decoder) - } - } - - @inline(__always) - func decodeIfPresent(_ type: T.Type, forKey key: K) throws -> T? where T : Decodable { - guard contains(key), let entry = container[key.stringValue] else { return nil } - - if type == Date.self || type == NSDate.self { - return try decoder.decodeIfPresent(entry, as: Date.self, forKey: key) as? T - } else if type == Data.self || type == NSData.self { - return try decoder.decodeIfPresent(entry, as: Data.self, forKey: key) as? T - } else if type == URL.self || type == NSURL.self { - return try decoder.decodeIfPresent(entry, as: URL.self, forKey: key) as? T - } else if type == Decimal.self || type == NSDecimalNumber.self { - return try decoder.decodeIfPresent(entry, as: Decimal.self, forKey: key) as? T - } - - if try decodeNil(forKey: key) { return nil } - - return try decoder.unbox(entry, as: type) - } -} - -private extension CleanJSONDecoder.KeyDecodingStrategy { - - static func _convertFromSnakeCase(_ stringKey: String) -> String { - guard !stringKey.isEmpty else { return stringKey } - - // Find the first non-underscore character - guard let firstNonUnderscore = stringKey.firstIndex(where: { $0 != "_" }) else { - // Reached the end without finding an _ - return stringKey - } - - // Find the last non-underscore character - var lastNonUnderscore = stringKey.index(before: stringKey.endIndex) - while lastNonUnderscore > firstNonUnderscore && stringKey[lastNonUnderscore] == "_" { - stringKey.formIndex(before: &lastNonUnderscore) - } - - let keyRange = firstNonUnderscore...lastNonUnderscore - let leadingUnderscoreRange = stringKey.startIndex..(_ key: Key) throws -> T where T: Decodable, T: Defaultable { - switch decoder.options.keyNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: decoder.codingPath) - case .useDefaultValue: - return T.defaultValue - } - } -} - -private extension String { - - func decode(to type: T.Type, options: CleanJSONDecoder.Options) -> T? { - guard hasPrefix("{") || hasPrefix("[") else { return nil } - - guard let data = data(using: .utf8), - let topLevel = try? JSONSerialization.jsonObject(with: data) else { return nil } - - let decoder = _CleanJSONDecoder(referencing: topLevel, options: options) - #if swift(<5) - guard let obj = try? decoder.unbox(topLevel, as: type) else { return nil } - - return obj - #else - return try? decoder.unbox(topLevel, as: type) - #endif - } -} diff --git a/Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONUnkeyedDecodingContainer.swift b/Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONUnkeyedDecodingContainer.swift deleted file mode 100644 index 41637d8..0000000 --- a/Example/Pods/CleanJSON/CleanJSON/Classes/CleanJSONUnkeyedDecodingContainer.swift +++ /dev/null @@ -1,496 +0,0 @@ -// -// CleanJSONUnkeyedDecodingContainer.swift -// CleanJSON -// -// Created by Pircate(swifter.dev@gmail.com) on 2018/10/11 -// Copyright © 2018 Pircate. All rights reserved. -// - -import Foundation - -struct CleanJSONUnkeyedDecodingContainer : UnkeyedDecodingContainer { - // MARK: Properties - - /// A reference to the decoder we're reading from. - private let decoder: _CleanJSONDecoder - - /// A reference to the container we're reading from. - private let container: [Any] - - /// The path of coding keys taken to get to this point in decoding. - private(set) public var codingPath: [CodingKey] - - /// The index of the element we're about to decode. - private(set) public var currentIndex: Int - - // MARK: - Initialization - - /// Initializes `self` by referencing the given decoder and container. - init(referencing decoder: _CleanJSONDecoder, wrapping container: [Any]) { - self.decoder = decoder - self.container = container - self.codingPath = decoder.codingPath - self.currentIndex = 0 - } - - // MARK: - UnkeyedDecodingContainer Methods - - public var count: Int? { - return self.container.count - } - - public var isAtEnd: Bool { - return self.currentIndex >= self.count! - } - - public mutating func decodeNil() throws -> Bool { - guard !self.isAtEnd else { - throw DecodingError.valueNotFound(Any?.self, DecodingError.Context(codingPath: self.decoder.codingPath + [CleanJSONKey(index: self.currentIndex)], debugDescription: "Unkeyed container is at end.")) - } - - if self.container[self.currentIndex] is NSNull { - self.currentIndex += 1 - return true - } else { - return false - } - } - - public mutating func decode(_ type: Bool.Type) throws -> Bool { - guard !self.isAtEnd else { - return try decode(isAtEnd: true) - } - - self.decoder.codingPath.append(CleanJSONKey(index: self.currentIndex)) - defer { self.decoder.codingPath.removeLast() } - - guard let decoded = try self.decoder.unbox(self.container[self.currentIndex], as: Bool.self) else { - return try decode() - } - - self.currentIndex += 1 - return decoded - } - - private mutating func decode(isAtEnd: Bool = false) throws -> Bool { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Unkeyed.valueNotFound( - Bool.self, - codingPath: decoder.codingPath, - currentIndex: currentIndex, - isAtEnd: isAtEnd) - case .useDefaultValue: - self.currentIndex += 1 - return Bool.defaultValue - case .custom(let adapter): - self.currentIndex += 1 - return try adapter.adapt(decoder) - } - } - - public mutating func decode(_ type: Int.Type) throws -> Int { - guard !self.isAtEnd else { - return try decode(isAtEnd: true) - } - - self.decoder.codingPath.append(CleanJSONKey(index: self.currentIndex)) - defer { self.decoder.codingPath.removeLast() } - - guard let decoded = try self.decoder.unbox(self.container[self.currentIndex], as: Int.self) else { - return try decode() - } - - self.currentIndex += 1 - return decoded - } - - private mutating func decode(isAtEnd: Bool = false) throws -> Int { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Unkeyed.valueNotFound( - Int.self, - codingPath: decoder.codingPath, - currentIndex: currentIndex, - isAtEnd: isAtEnd) - case .useDefaultValue: - self.currentIndex += 1 - return Int.defaultValue - case .custom(let adapter): - self.currentIndex += 1 - return try adapter.adapt(decoder) - } - } - - public mutating func decode(_ type: Int8.Type) throws -> Int8 { - guard !self.isAtEnd else { - return Int8.defaultValue - } - - self.decoder.codingPath.append(CleanJSONKey(index: self.currentIndex)) - defer { self.decoder.codingPath.removeLast() } - - guard let decoded = try self.decoder.unbox(self.container[self.currentIndex], as: Int8.self) else { - return Int8.defaultValue - } - - self.currentIndex += 1 - return decoded - } - - public mutating func decode(_ type: Int16.Type) throws -> Int16 { - guard !self.isAtEnd else { - return Int16.defaultValue - } - - self.decoder.codingPath.append(CleanJSONKey(index: self.currentIndex)) - defer { self.decoder.codingPath.removeLast() } - - guard let decoded = try self.decoder.unbox(self.container[self.currentIndex], as: Int16.self) else { - return Int16.defaultValue - } - - self.currentIndex += 1 - return decoded - } - - public mutating func decode(_ type: Int32.Type) throws -> Int32 { - guard !self.isAtEnd else { - return Int32.defaultValue - } - - self.decoder.codingPath.append(CleanJSONKey(index: self.currentIndex)) - defer { self.decoder.codingPath.removeLast() } - - guard let decoded = try self.decoder.unbox(self.container[self.currentIndex], as: Int32.self) else { - return Int32.defaultValue - } - - self.currentIndex += 1 - return decoded - } - - public mutating func decode(_ type: Int64.Type) throws -> Int64 { - guard !self.isAtEnd else { - return Int64.defaultValue - } - - self.decoder.codingPath.append(CleanJSONKey(index: self.currentIndex)) - defer { self.decoder.codingPath.removeLast() } - - guard let decoded = try self.decoder.unbox(self.container[self.currentIndex], as: Int64.self) else { - return Int64.defaultValue - } - - self.currentIndex += 1 - return decoded - } - - public mutating func decode(_ type: UInt.Type) throws -> UInt { - guard !self.isAtEnd else { - return try decode(isAtEnd: true) - } - - self.decoder.codingPath.append(CleanJSONKey(index: self.currentIndex)) - defer { self.decoder.codingPath.removeLast() } - - guard let decoded = try self.decoder.unbox(self.container[self.currentIndex], as: UInt.self) else { - return try decode() - } - - self.currentIndex += 1 - return decoded - } - - private mutating func decode(isAtEnd: Bool = false) throws -> UInt { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Unkeyed.valueNotFound( - UInt.self, - codingPath: decoder.codingPath, - currentIndex: currentIndex, - isAtEnd: isAtEnd) - case .useDefaultValue: - self.currentIndex += 1 - return UInt.defaultValue - case .custom(let adapter): - self.currentIndex += 1 - return try adapter.adapt(decoder) - } - } - - public mutating func decode(_ type: UInt8.Type) throws -> UInt8 { - guard !self.isAtEnd else { - return UInt8.defaultValue - } - - self.decoder.codingPath.append(CleanJSONKey(index: self.currentIndex)) - defer { self.decoder.codingPath.removeLast() } - - guard let decoded = try self.decoder.unbox(self.container[self.currentIndex], as: UInt8.self) else { - return UInt8.defaultValue - } - - self.currentIndex += 1 - return decoded - } - - public mutating func decode(_ type: UInt16.Type) throws -> UInt16 { - guard !self.isAtEnd else { - return UInt16.defaultValue - } - - self.decoder.codingPath.append(CleanJSONKey(index: self.currentIndex)) - defer { self.decoder.codingPath.removeLast() } - - guard let decoded = try self.decoder.unbox(self.container[self.currentIndex], as: UInt16.self) else { - return UInt16.defaultValue - } - - self.currentIndex += 1 - return decoded - } - - public mutating func decode(_ type: UInt32.Type) throws -> UInt32 { - guard !self.isAtEnd else { - return UInt32.defaultValue - } - - self.decoder.codingPath.append(CleanJSONKey(index: self.currentIndex)) - defer { self.decoder.codingPath.removeLast() } - - guard let decoded = try self.decoder.unbox(self.container[self.currentIndex], as: UInt32.self) else { - return UInt32.defaultValue - } - - self.currentIndex += 1 - return decoded - } - - public mutating func decode(_ type: UInt64.Type) throws -> UInt64 { - guard !self.isAtEnd else { - return UInt64.defaultValue - } - - self.decoder.codingPath.append(CleanJSONKey(index: self.currentIndex)) - defer { self.decoder.codingPath.removeLast() } - - guard let decoded = try self.decoder.unbox(self.container[self.currentIndex], as: UInt64.self) else { - return UInt64.defaultValue - } - - self.currentIndex += 1 - return decoded - } - - public mutating func decode(_ type: Float.Type) throws -> Float { - guard !self.isAtEnd else { - return try decode(isAtEnd: true) - } - - self.decoder.codingPath.append(CleanJSONKey(index: self.currentIndex)) - defer { self.decoder.codingPath.removeLast() } - - guard let decoded = try self.decoder.unbox(self.container[self.currentIndex], as: Float.self) else { - return try decode() - } - - self.currentIndex += 1 - return decoded - } - - private mutating func decode(isAtEnd: Bool = false) throws -> Float { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Unkeyed.valueNotFound( - Float.self, - codingPath: decoder.codingPath, - currentIndex: currentIndex, - isAtEnd: isAtEnd) - case .useDefaultValue: - self.currentIndex += 1 - return Float.defaultValue - case .custom(let adapter): - self.currentIndex += 1 - return try adapter.adapt(decoder) - } - } - - public mutating func decode(_ type: Double.Type) throws -> Double { - guard !self.isAtEnd else { - return try decode(isAtEnd: true) - } - - self.decoder.codingPath.append(CleanJSONKey(index: self.currentIndex)) - defer { self.decoder.codingPath.removeLast() } - - guard let decoded = try self.decoder.unbox(self.container[self.currentIndex], as: Double.self) else { - return try decode() - } - - self.currentIndex += 1 - return decoded - } - - private mutating func decode(isAtEnd: Bool = false) throws -> Double { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Unkeyed.valueNotFound( - Double.self, - codingPath: decoder.codingPath, - currentIndex: currentIndex, - isAtEnd: isAtEnd) - case .useDefaultValue: - self.currentIndex += 1 - return Double.defaultValue - case .custom(let adapter): - self.currentIndex += 1 - return try adapter.adapt(decoder) - } - } - - public mutating func decode(_ type: String.Type) throws -> String { - guard !self.isAtEnd else { - return try decode(isAtEnd: true) - } - - self.decoder.codingPath.append(CleanJSONKey(index: self.currentIndex)) - defer { self.decoder.codingPath.removeLast() } - - guard let decoded = try self.decoder.unbox(self.container[self.currentIndex], as: String.self) else { - return try decode() - } - - self.currentIndex += 1 - return decoded - } - - private mutating func decode(isAtEnd: Bool = false) throws -> String { - switch decoder.options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Unkeyed.valueNotFound( - String.self, - codingPath: decoder.codingPath, - currentIndex: currentIndex, - isAtEnd: isAtEnd) - case .useDefaultValue: - self.currentIndex += 1 - return String.defaultValue - case .custom(let adapter): - self.currentIndex += 1 - return try adapter.adapt(decoder) - } - } - - public mutating func decode(_ type: T.Type) throws -> T { - guard !self.isAtEnd else { - throw DecodingError.valueNotFound(type, DecodingError.Context(codingPath: self.decoder.codingPath + [CleanJSONKey(index: self.currentIndex)], debugDescription: "Unkeyed container is at end.")) - } - - self.decoder.codingPath.append(CleanJSONKey(index: self.currentIndex)) - defer { self.decoder.codingPath.removeLast() } - - guard let decoded = try self.decoder.unbox(self.container[self.currentIndex], as: type) else { - throw DecodingError.valueNotFound(type, DecodingError.Context(codingPath: self.decoder.codingPath + [CleanJSONKey(index: self.currentIndex)], debugDescription: "Expected \(type) but found null instead.")) - } - - self.currentIndex += 1 - return decoded - } - - public mutating func nestedContainer(keyedBy type: NestedKey.Type) throws -> KeyedDecodingContainer { - self.decoder.codingPath.append(CleanJSONKey(index: self.currentIndex)) - defer { self.decoder.codingPath.removeLast() } - - guard !self.isAtEnd else { - throw DecodingError.valueNotFound(KeyedDecodingContainer.self, - DecodingError.Context(codingPath: self.codingPath, - debugDescription: "Cannot get nested keyed container -- unkeyed container is at end.")) - } - - let value = self.container[self.currentIndex] - guard !(value is NSNull) else { - switch decoder.options.nestedContainerDecodingStrategy.valueNotFound { - case .throw: - throw DecodingError.Nested.valueNotFound( - KeyedDecodingContainer.self, - codingPath: codingPath, - debugDescription: "Cannot get keyed decoding container -- found null value instead.") - case .useEmptyContainer: - self.currentIndex += 1 - return nestedContainer() - } - } - - guard let dictionary = value as? [String : Any] else { - switch decoder.options.nestedContainerDecodingStrategy.typeMismatch { - case .throw: - throw DecodingError._typeMismatch(at: self.codingPath, expectation: [String : Any].self, reality: value) - case .useEmptyContainer: - self.currentIndex += 1 - return nestedContainer() - } - } - - self.currentIndex += 1 - return nestedContainer(wrapping: dictionary) - } - - private func nestedContainer(wrapping dictionary: [String: Any] = [:]) -> KeyedDecodingContainer { - let container = CleanJSONKeyedDecodingContainer(referencing: self.decoder, wrapping: dictionary) - return KeyedDecodingContainer(container) - } - - public mutating func nestedUnkeyedContainer() throws -> UnkeyedDecodingContainer { - self.decoder.codingPath.append(CleanJSONKey(index: self.currentIndex)) - defer { self.decoder.codingPath.removeLast() } - - guard !self.isAtEnd else { - throw DecodingError.valueNotFound(UnkeyedDecodingContainer.self, - DecodingError.Context(codingPath: self.codingPath, - debugDescription: "Cannot get nested keyed container -- unkeyed container is at end.")) - } - - let value = self.container[self.currentIndex] - guard !(value is NSNull) else { - switch decoder.options.nestedContainerDecodingStrategy.valueNotFound { - case .throw: - throw DecodingError.Nested.valueNotFound( - UnkeyedDecodingContainer.self, - codingPath: codingPath, - debugDescription: "Cannot get keyed decoding container -- found null value instead.") - case .useEmptyContainer: - self.currentIndex += 1 - return CleanJSONUnkeyedDecodingContainer(referencing: self.decoder, wrapping: []) - } - } - - guard let array = value as? [Any] else { - switch decoder.options.nestedContainerDecodingStrategy.typeMismatch { - case .throw: - throw DecodingError._typeMismatch(at: self.codingPath, expectation: [Any].self, reality: value) - case .useEmptyContainer: - self.currentIndex += 1 - return CleanJSONUnkeyedDecodingContainer(referencing: self.decoder, wrapping: []) - } - } - - self.currentIndex += 1 - return CleanJSONUnkeyedDecodingContainer(referencing: self.decoder, wrapping: array) - } - - public mutating func superDecoder() throws -> Decoder { - self.decoder.codingPath.append(CleanJSONKey(index: self.currentIndex)) - defer { self.decoder.codingPath.removeLast() } - - guard !self.isAtEnd else { - throw DecodingError.valueNotFound(Decoder.self, - DecodingError.Context(codingPath: self.codingPath, - debugDescription: "Cannot get superDecoder() -- unkeyed container is at end.")) - } - - let value = self.container[self.currentIndex] - self.currentIndex += 1 - return _CleanJSONDecoder(referencing: value, at: self.decoder.codingPath, options: self.decoder.options) - } -} diff --git a/Example/Pods/CleanJSON/CleanJSON/Classes/DecodingError+CleanJSON.swift b/Example/Pods/CleanJSON/CleanJSON/Classes/DecodingError+CleanJSON.swift deleted file mode 100644 index c45a2e3..0000000 --- a/Example/Pods/CleanJSON/CleanJSON/Classes/DecodingError+CleanJSON.swift +++ /dev/null @@ -1,111 +0,0 @@ -// -// DecodingError+CleanJSON.swift -// CleanJSON -// -// Created by Pircate(swifter.dev@gmail.com) on 2018/10/11 -// Copyright © 2018 Pircate. All rights reserved. -// - -import Foundation - -extension DecodingError { - /// Returns a `.typeMismatch` error describing the expected type. - /// - /// - parameter path: The path of `CodingKey`s taken to decode a value of this type. - /// - parameter expectation: The type expected to be encountered. - /// - parameter reality: The value that was encountered instead of the expected type. - /// - returns: A `DecodingError` with the appropriate path and debug description. - static func _typeMismatch(at path: [CodingKey], expectation: Any.Type, reality: Any) -> DecodingError { - let description = "Expected to decode \(expectation) but found \(_typeDescription(of: reality)) instead." - return .typeMismatch(expectation, Context(codingPath: path, debugDescription: description)) - } - - /// Returns a description of the type of `value` appropriate for an error message. - /// - /// - parameter value: The value whose type to describe. - /// - returns: A string describing `value`. - /// - precondition: `value` is one of the types below. - fileprivate static func _typeDescription(of value: Any) -> String { - if value is NSNull { - return "a null value" - } else if value is NSNumber /* FIXME: If swift-corelibs-foundation isn't updated to use NSNumber, this check will be necessary: || value is Int || value is Double */ { - return "a number" - } else if value is String { - return "a string/data" - } else if value is [Any] { - return "an array" - } else if value is [String : Any] { - return "a dictionary" - } else { - return "\(type(of: value))" - } - } -} - -extension DecodingError { - - struct Keyed { - - static func keyNotFound(_ key: Key, codingPath: [CodingKey]) -> DecodingError { - return .keyNotFound( - key, - DecodingError.Context( - codingPath: codingPath, - debugDescription: "No value associated with key \("\(key) (\"\(key.stringValue)\")").")) - } - - static func valueNotFound(_ type: Any.Type, codingPath: [CodingKey]) -> DecodingError { - return DecodingError.valueNotFound( - type, - DecodingError.Context( - codingPath: codingPath, - debugDescription: "Expected \(type) value but found null instead.")) - } - } -} - -extension DecodingError { - - struct Unkeyed { - - static func valueNotFound( - _ type: Any.Type, - codingPath: [CodingKey], - currentIndex: Int, - isAtEnd: Bool = false) -> DecodingError { - let debugDescription = isAtEnd - ? "Unkeyed container is at end." - : "Expected \(type) but found null instead." - return DecodingError.valueNotFound( - type, - DecodingError.Context( - codingPath: codingPath + [CleanJSONKey(index: currentIndex)], - debugDescription: debugDescription)) - } - } -} - -extension DecodingError { - - struct Nested { - - static func keyNotFound(_ key: Key, codingPath: [CodingKey], isUnkeyed: Bool = false) -> DecodingError { - let debugDescription = isUnkeyed - ? "Cannot get UnkeyedDecodingContainer -- no value found for key \("\(key) (\"\(key.stringValue)\")")" - : "Cannot get \(KeyedDecodingContainer.self) -- no value found for key \("\(key) (\"\(key.stringValue)\")")" - return DecodingError.keyNotFound( - key, - DecodingError.Context( - codingPath: codingPath, - debugDescription: debugDescription)) - } - - static func valueNotFound(_ type: Any.Type, codingPath: [CodingKey], debugDescription: String) -> DecodingError { - return DecodingError.valueNotFound( - type, - DecodingError.Context( - codingPath: codingPath, - debugDescription: debugDescription)) - } - } -} diff --git a/Example/Pods/CleanJSON/CleanJSON/Classes/DecodingStrategy.swift b/Example/Pods/CleanJSON/CleanJSON/Classes/DecodingStrategy.swift deleted file mode 100644 index 804615d..0000000 --- a/Example/Pods/CleanJSON/CleanJSON/Classes/DecodingStrategy.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// DecodingStrategy.swift -// CleanJSON -// -// Created by Pircate(swifter.dev@gmail.com) on 2018/12/10 -// Copyright © 2018 Pircate. All rights reserved. -// - -extension CleanJSONDecoder { - - public enum KeyNotFoundDecodingStrategy { - case `throw` - case useDefaultValue - } - - public enum ValueNotFoundDecodingStrategy { - case `throw` - case useDefaultValue - case custom(JSONAdapter) - } - - public enum JSONStringDecodingStrategy { - case containsKeys([CodingKey]) - case all - } -} - -extension CleanJSONDecoder { - - public struct NestedContainerDecodingStrategy { - - public enum KeyNotFound { - case `throw` - case useEmptyContainer - } - - public enum ValueNotFound { - case `throw` - case useEmptyContainer - } - - public enum TypeMismatch { - case `throw` - case useEmptyContainer - } - - public var keyNotFound: KeyNotFound - - public var valueNotFound: ValueNotFound - - public var typeMismatch: TypeMismatch - - public init(keyNotFound: KeyNotFound = .useEmptyContainer, - valueNotFound: ValueNotFound = .useEmptyContainer, - typeMismatch: TypeMismatch = .useEmptyContainer) { - self.keyNotFound = keyNotFound - self.valueNotFound = valueNotFound - self.typeMismatch = typeMismatch - } - } -} diff --git a/Example/Pods/CleanJSON/CleanJSON/Classes/Defaultable.swift b/Example/Pods/CleanJSON/CleanJSON/Classes/Defaultable.swift deleted file mode 100644 index b28f3b2..0000000 --- a/Example/Pods/CleanJSON/CleanJSON/Classes/Defaultable.swift +++ /dev/null @@ -1,122 +0,0 @@ -// -// Defaultable.swift -// CleanJSON -// -// Created by Pircate(swifter.dev@gmail.com) on 2018/12/14 -// Copyright © 2018 Pircate. All rights reserved. -// - -protocol Defaultable { - static var defaultValue: Self { get } -} - -extension Bool: Defaultable { - static var defaultValue: Bool { - return false - } -} - -extension Int: Defaultable { - static var defaultValue: Int { - return 0 - } -} - -extension Int8: Defaultable { - static var defaultValue: Int8 { - return 0 - } -} - -extension Int16: Defaultable { - static var defaultValue: Int16 { - return 0 - } -} - -extension Int32: Defaultable { - static var defaultValue: Int32 { - return 0 - } -} - -extension Int64: Defaultable { - static var defaultValue: Int64 { - return 0 - } -} - -extension UInt: Defaultable { - static var defaultValue: UInt { - return 0 - } -} - -extension UInt8: Defaultable { - static var defaultValue: UInt8 { - return 0 - } -} - -extension UInt16: Defaultable { - static var defaultValue: UInt16 { - return 0 - } -} - -extension UInt32: Defaultable { - static var defaultValue: UInt32 { - return 0 - } -} - -extension UInt64: Defaultable { - static var defaultValue: UInt64 { - return 0 - } -} - -extension Float: Defaultable { - static var defaultValue: Float { - return 0 - } -} - -extension Double: Defaultable { - static var defaultValue: Double { - return 0 - } -} - -extension String: Defaultable { - static var defaultValue: String { - return "" - } -} - -extension Date: Defaultable { - static var defaultValue: Date { - return Date(timeIntervalSinceReferenceDate: 0) - } - - static func defaultValue(for strategy: JSONDecoder.DateDecodingStrategy) -> Date { - switch strategy { - case .secondsSince1970, .millisecondsSince1970: - return Date(timeIntervalSince1970: 0) - default: - return defaultValue - } - } -} - -extension Data: Defaultable { - static var defaultValue: Data { - return Data() - } -} - -extension Decimal: Defaultable { - static var defaultValue: Decimal { - return Decimal(0) - } -} diff --git a/Example/Pods/CleanJSON/CleanJSON/Classes/JSONAdapter.swift b/Example/Pods/CleanJSON/CleanJSON/Classes/JSONAdapter.swift deleted file mode 100644 index 36459c9..0000000 --- a/Example/Pods/CleanJSON/CleanJSON/Classes/JSONAdapter.swift +++ /dev/null @@ -1,302 +0,0 @@ -// -// JSONAdapter.swift -// CleanJSON -// -// Created by Pircate(swifter.dev@gmail.com) on 2018/12/13 -// Copyright © 2018 Pircate. All rights reserved. -// - -public protocol JSONAdapter { - - func adapt(_ decoder: CleanDecoder) throws -> Bool - - func adapt(_ decoder: CleanDecoder) throws -> Int - - func adapt(_ decoder: CleanDecoder) throws -> Int8 - - func adapt(_ decoder: CleanDecoder) throws -> Int16 - - func adapt(_ decoder: CleanDecoder) throws -> Int32 - - func adapt(_ decoder: CleanDecoder) throws -> Int64 - - func adapt(_ decoder: CleanDecoder) throws -> UInt - - func adapt(_ decoder: CleanDecoder) throws -> UInt8 - - func adapt(_ decoder: CleanDecoder) throws -> UInt16 - - func adapt(_ decoder: CleanDecoder) throws -> UInt32 - - func adapt(_ decoder: CleanDecoder) throws -> UInt64 - - func adapt(_ decoder: CleanDecoder) throws -> Float - - func adapt(_ decoder: CleanDecoder) throws -> Double - - func adapt(_ decoder: CleanDecoder) throws -> String - - func adapt(_ decoder: CleanDecoder) throws -> Date - - func adapt(_ decoder: CleanDecoder) throws -> Data - - func adapt(_ decoder: CleanDecoder) throws -> Decimal - - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Bool? - - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Int? - - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Int8? - - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Int16? - - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Int32? - - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Int64? - - func adaptIfPresent(_ decoder: CleanDecoder) throws -> UInt? - - func adaptIfPresent(_ decoder: CleanDecoder) throws -> UInt8? - - func adaptIfPresent(_ decoder: CleanDecoder) throws -> UInt16? - - func adaptIfPresent(_ decoder: CleanDecoder) throws -> UInt32? - - func adaptIfPresent(_ decoder: CleanDecoder) throws -> UInt64? - - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Float? - - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Double? - - func adaptIfPresent(_ decoder: CleanDecoder) throws -> String? - - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Date? - - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Data? - - func adaptIfPresent(_ decoder: CleanDecoder) throws -> URL? - - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Decimal? -} - -public extension JSONAdapter { - - @inline(__always) - func adapt(_ decoder: CleanDecoder) throws -> Bool { - return Bool.defaultValue - } - - @inline(__always) - func adapt(_ decoder: CleanDecoder) throws -> Int { - guard !decoder.decodeNil() else { return Int.defaultValue } - - guard let stringValue = try decoder.decodeIfPresent(String.self) else { - return Int.defaultValue - } - - return Int(stringValue) ?? Int.defaultValue - } - - @inline(__always) - func adapt(_ decoder: CleanDecoder) throws -> Int8 { - return Int8.defaultValue - } - - @inline(__always) - func adapt(_ decoder: CleanDecoder) throws -> Int16 { - return Int16.defaultValue - } - - @inline(__always) - func adapt(_ decoder: CleanDecoder) throws -> Int32 { - return Int32.defaultValue - } - - @inline(__always) - func adapt(_ decoder: CleanDecoder) throws -> Int64 { - return Int64.defaultValue - } - - @inline(__always) - func adapt(_ decoder: CleanDecoder) throws -> UInt { - guard !decoder.decodeNil() else { return UInt.defaultValue } - - guard let stringValue = try decoder.decodeIfPresent(String.self) else { - return UInt.defaultValue - } - - return UInt(stringValue) ?? UInt.defaultValue - } - - @inline(__always) - func adapt(_ decoder: CleanDecoder) throws -> UInt8 { - return UInt8.defaultValue - } - - @inline(__always) - func adapt(_ decoder: CleanDecoder) throws -> UInt16 { - return UInt16.defaultValue - } - - @inline(__always) - func adapt(_ decoder: CleanDecoder) throws -> UInt32 { - return UInt32.defaultValue - } - - @inline(__always) - func adapt(_ decoder: CleanDecoder) throws -> UInt64 { - return UInt64.defaultValue - } - - @inline(__always) - func adapt(_ decoder: CleanDecoder) throws -> Float { - guard !decoder.decodeNil() else { return Float.defaultValue } - - guard let stringValue = try decoder.decodeIfPresent(String.self) else { - return Float.defaultValue - } - - return Float(stringValue) ?? Float.defaultValue - } - - @inline(__always) - func adapt(_ decoder: CleanDecoder) throws -> Double { - guard !decoder.decodeNil() else { return Double.defaultValue } - - guard let stringValue = try decoder.decodeIfPresent(String.self) else { - return Double.defaultValue - } - - return Double(stringValue) ?? Double.defaultValue - } - - @inline(__always) - func adapt(_ decoder: CleanDecoder) throws -> String { - guard !decoder.decodeNil() else { return String.defaultValue } - - if let intValue = try decoder.decodeIfPresent(Int.self) { - return String(intValue) - } else if let doubleValue = try decoder.decodeIfPresent(Double.self) { - return String(doubleValue) - } else if let boolValue = try decoder.decodeIfPresent(Bool.self) { - return String(boolValue) - } - - return String.defaultValue - } - - @inline(__always) - func adapt(_ decoder: CleanDecoder) throws -> Date { - guard let decoder = decoder as? _CleanJSONDecoder else { return Date.defaultValue } - - return Date.defaultValue(for: decoder.options.dateDecodingStrategy) - } - - @inline(__always) - func adapt(_ decoder: CleanDecoder) throws -> Data { - return Data.defaultValue - } - - @inline(__always) - func adapt(_ decoder: CleanDecoder) throws -> Decimal { - return Decimal.defaultValue - } -} - -public extension JSONAdapter { - - @inline(__always) - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Bool? { - return nil - } - - @inline(__always) - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Int? { - return nil - } - - @inline(__always) - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Int8? { - return nil - } - - @inline(__always) - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Int16? { - return nil - } - - @inline(__always) - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Int32? { - return nil - } - - @inline(__always) - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Int64? { - return nil - } - - @inline(__always) - func adaptIfPresent(_ decoder: CleanDecoder) throws -> UInt? { - return nil - } - - @inline(__always) - func adaptIfPresent(_ decoder: CleanDecoder) throws -> UInt8? { - return nil - } - - @inline(__always) - func adaptIfPresent(_ decoder: CleanDecoder) throws -> UInt16? { - return nil - } - - @inline(__always) - func adaptIfPresent(_ decoder: CleanDecoder) throws -> UInt32? { - return nil - } - - @inline(__always) - func adaptIfPresent(_ decoder: CleanDecoder) throws -> UInt64? { - return nil - } - - @inline(__always) - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Float? { - return nil - } - - @inline(__always) - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Double? { - return nil - } - - @inline(__always) - func adaptIfPresent(_ decoder: CleanDecoder) throws -> String? { - return nil - } - - @inline(__always) - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Date? { - return nil - } - - @inline(__always) - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Data? { - return nil - } - - @inline(__always) - func adaptIfPresent(_ decoder: CleanDecoder) throws -> URL? { - return nil - } - - @inline(__always) - func adaptIfPresent(_ decoder: CleanDecoder) throws -> Decimal? { - return nil - } -} - -extension CleanJSONDecoder { - - struct Adapter: JSONAdapter {} -} diff --git a/Example/Pods/CleanJSON/CleanJSON/Classes/ToJSON.swift b/Example/Pods/CleanJSON/CleanJSON/Classes/ToJSON.swift deleted file mode 100644 index 6a26dc2..0000000 --- a/Example/Pods/CleanJSON/CleanJSON/Classes/ToJSON.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// ToJSON.swift -// CleanJSON -// -// Created by Pircate(swifter.dev@gmail.com) on 2018/10/23 -// Copyright © 2018 Pircate. All rights reserved. -// - -public extension Encodable { - - @inline(__always) - func toJSON(using encoder: JSONEncoder = .init()) throws -> Data { - return try encoder.encode(self) - } - - @inline(__always) - func toJSONString(using encoder: JSONEncoder = .init()) -> String? { - guard let data = try? toJSON(using: encoder) else { return nil } - - return String(data: data, encoding: .utf8) - } -} diff --git a/Example/Pods/CleanJSON/CleanJSON/Classes/_CleanJSONDecoder+Decode.swift b/Example/Pods/CleanJSON/CleanJSON/Classes/_CleanJSONDecoder+Decode.swift deleted file mode 100644 index 11c4b34..0000000 --- a/Example/Pods/CleanJSON/CleanJSON/Classes/_CleanJSONDecoder+Decode.swift +++ /dev/null @@ -1,150 +0,0 @@ -// -// _CleanJSONDecoder+Decode.swift -// CleanJSON -// -// Created by Pircate(swifter.dev@gmail.com) on 2019/5/27 -// Copyright © 2019 Pircate. All rights reserved. -// - -extension _CleanJSONDecoder { - - func decodeAsDefaultValue() throws -> T { - if let array = [] as? T { - return array - } else if let string = String.defaultValue as? T { - return string - } else if let bool = Bool.defaultValue as? T { - return bool - } else if let int = Int.defaultValue as? T { - return int - }else if let double = Double.defaultValue as? T { - return double - } else if let date = Date.defaultValue(for: options.dateDecodingStrategy) as? T { - return date - } else if let data = Data.defaultValue as? T { - return data - } else if let decimal = Decimal.defaultValue as? T { - return decimal - } else if let object = try? unbox([:], as: T.self) { - #if swift(<5) - if let obj = object { return obj } - #else - return object - #endif - } - - let context = DecodingError.Context( - codingPath: codingPath, - debugDescription: "Key: <\(codingPath)> cannot be decoded as default value.") - throw DecodingError.dataCorrupted(context) - } -} - -extension _CleanJSONDecoder { - - func decode(as type: Date.Type) throws -> Date { - if let date = try unbox(storage.topContainer, as: type) { return date } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: codingPath) - case .useDefaultValue: - return Date.defaultValue(for: options.dateDecodingStrategy) - case .custom(let adapter): - return try adapter.adapt(self) - } - } - - func decode(as type: Data.Type) throws -> Data { - if let data = try unbox(storage.topContainer, as: type) { return data } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: codingPath) - case .useDefaultValue: - return Data.defaultValue - case .custom(let adapter): - return try adapter.adapt(self) - } - } - - func decode(as type: Decimal.Type) throws -> Decimal { - if let decimal = try unbox(storage.topContainer, as: type) { return decimal } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: codingPath) - case .useDefaultValue: - return Decimal.defaultValue - case .custom(let adapter): - return try adapter.adapt(self) - } - } -} - -extension _CleanJSONDecoder { - - func decodeIfPresent( - _ value: Any, - as type: Date.Type, - forKey key: K) throws -> Date? { - if let date = try unbox(value, as: type) { return date } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: codingPath) - case .useDefaultValue: - return nil - case .custom(let adapter): - return try adapter.adaptIfPresent(self) - } - } - - func decodeIfPresent( - _ value: Any, - as type: Data.Type, - forKey key: K) throws -> Data? { - if let data = try unbox(value, as: type) { return data } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: codingPath) - case .useDefaultValue: - return nil - case .custom(let adapter): - return try adapter.adaptIfPresent(self) - } - } - - func decodeIfPresent( - _ value: Any, - as type: URL.Type, - forKey key: K) throws -> URL? { - if let url = try unbox(value, as: type) { return url } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: codingPath) - case .useDefaultValue: - return nil - case .custom(let adapter): - return try adapter.adaptIfPresent(self) - } - } - - func decodeIfPresent( - _ value: Any, - as type: Decimal.Type, - forKey key: K) throws -> Decimal? { - if let decimal = try unbox(value, as: type) { return decimal } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.keyNotFound(key, codingPath: codingPath) - case .useDefaultValue: - return nil - case .custom(let adapter): - return try adapter.adaptIfPresent(self) - } - } -} diff --git a/Example/Pods/CleanJSON/CleanJSON/Classes/_CleanJSONDecoder+SingleValueDecodingContainer.swift b/Example/Pods/CleanJSON/CleanJSON/Classes/_CleanJSONDecoder+SingleValueDecodingContainer.swift deleted file mode 100644 index 246ca02..0000000 --- a/Example/Pods/CleanJSON/CleanJSON/Classes/_CleanJSONDecoder+SingleValueDecodingContainer.swift +++ /dev/null @@ -1,218 +0,0 @@ -// -// _CleanJSONDecoder+SingleValueDecodingContainer.swift -// CleanJSON -// -// Created by Pircate(swifter.dev@gmail.com) on 2018/10/11 -// Copyright © 2018 Pircate. All rights reserved. -// - -import Foundation - -extension _CleanJSONDecoder : SingleValueDecodingContainer { - // MARK: SingleValueDecodingContainer Methods - - public func decodeNil() -> Bool { - return storage.topContainer is NSNull - } - - public func decode(_ type: Bool.Type) throws -> Bool { - if let value = try unbox(storage.topContainer, as: Bool.self) { return value } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: codingPath) - case .useDefaultValue: - return Bool.defaultValue - case .custom(let adapter): - return try adapter.adapt(self) - } - } - - public func decode(_ type: Int.Type) throws -> Int { - if let value = try unbox(storage.topContainer, as: Int.self) { return value } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: codingPath) - case .useDefaultValue: - return Int.defaultValue - case .custom(let adapter): - return try adapter.adapt(self) - } - } - - public func decode(_ type: Int8.Type) throws -> Int8 { - if let value = try unbox(storage.topContainer, as: Int8.self) { return value } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: codingPath) - case .useDefaultValue: - return Int8.defaultValue - case .custom(let adapter): - return try adapter.adapt(self) - } - } - - public func decode(_ type: Int16.Type) throws -> Int16 { - if let value = try unbox(storage.topContainer, as: Int16.self) { return value } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: codingPath) - case .useDefaultValue: - return Int16.defaultValue - case .custom(let adapter): - return try adapter.adapt(self) - } - } - - public func decode(_ type: Int32.Type) throws -> Int32 { - if let value = try unbox(storage.topContainer, as: Int32.self) { return value } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: codingPath) - case .useDefaultValue: - return Int32.defaultValue - case .custom(let adapter): - return try adapter.adapt(self) - } - } - - public func decode(_ type: Int64.Type) throws -> Int64 { - if let value = try unbox(storage.topContainer, as: Int64.self) { return value } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: codingPath) - case .useDefaultValue: - return Int64.defaultValue - case .custom(let adapter): - return try adapter.adapt(self) - } - } - - public func decode(_ type: UInt.Type) throws -> UInt { - if let value = try unbox(storage.topContainer, as: UInt.self) { return value } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: codingPath) - case .useDefaultValue: - return UInt.defaultValue - case .custom(let adapter): - return try adapter.adapt(self) - } - } - - public func decode(_ type: UInt8.Type) throws -> UInt8 { - if let value = try unbox(storage.topContainer, as: UInt8.self) { return value } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: codingPath) - case .useDefaultValue: - return UInt8.defaultValue - case .custom(let adapter): - return try adapter.adapt(self) - } - } - - public func decode(_ type: UInt16.Type) throws -> UInt16 { - if let value = try unbox(storage.topContainer, as: UInt16.self) { return value } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: codingPath) - case .useDefaultValue: - return UInt16.defaultValue - case .custom(let adapter): - return try adapter.adapt(self) - } - } - - public func decode(_ type: UInt32.Type) throws -> UInt32 { - if let value = try unbox(storage.topContainer, as: UInt32.self) { return value } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: codingPath) - case .useDefaultValue: - return UInt32.defaultValue - case .custom(let adapter): - return try adapter.adapt(self) - } - } - - public func decode(_ type: UInt64.Type) throws -> UInt64 { - if let value = try unbox(storage.topContainer, as: UInt64.self) { return value } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: codingPath) - case .useDefaultValue: - return UInt64.defaultValue - case .custom(let adapter): - return try adapter.adapt(self) - } - } - - public func decode(_ type: Float.Type) throws -> Float { - if let value = try unbox(storage.topContainer, as: Float.self) { return value } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: codingPath) - case .useDefaultValue: - return Float.defaultValue - case .custom(let adapter): - return try adapter.adapt(self) - } - } - - public func decode(_ type: Double.Type) throws -> Double { - if let value = try unbox(storage.topContainer, as: Double.self) { return value } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: codingPath) - case .useDefaultValue: - return Double.defaultValue - case .custom(let adapter): - return try adapter.adapt(self) - } - } - - public func decode(_ type: String.Type) throws -> String { - if let value = try unbox(storage.topContainer, as: String.self) { return value } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: codingPath) - case .useDefaultValue: - return String.defaultValue - case .custom(let adapter): - return try adapter.adapt(self) - } - } - - public func decode(_ type: T.Type) throws -> T { - if type == Date.self || type == NSDate.self { - return try decode(as: Date.self) as! T - } else if type == Data.self || type == NSData.self { - return try decode(as: Data.self) as! T - } else if type == Decimal.self || type == NSDecimalNumber.self { - return try decode(as: Decimal.self) as! T - } - - if let value = try unbox(storage.topContainer, as: type) { return value } - - switch options.valueNotFoundDecodingStrategy { - case .throw: - throw DecodingError.Keyed.valueNotFound(type, codingPath: codingPath) - case .useDefaultValue, .custom: - return try decodeAsDefaultValue() - } - } -} diff --git a/Example/Pods/CleanJSON/CleanJSON/Classes/_CleanJSONDecoder+Unbox.swift b/Example/Pods/CleanJSON/CleanJSON/Classes/_CleanJSONDecoder+Unbox.swift deleted file mode 100644 index 750073e..0000000 --- a/Example/Pods/CleanJSON/CleanJSON/Classes/_CleanJSONDecoder+Unbox.swift +++ /dev/null @@ -1,458 +0,0 @@ -// -// _CleanJSONDecoder+Unbox.swift -// CleanJSON -// -// Created by Pircate(swifter.dev@gmail.com) on 2018/10/10 -// Copyright © 2018 Pircate. All rights reserved. -// - -import Foundation - -extension _CleanJSONDecoder { - - /// Returns the given value unboxed from a container. - func unbox(_ value: Any, as type: Bool.Type) throws -> Bool? { - guard !(value is NSNull) else { return nil } - - if let number = value as? NSNumber { - // TODO: Add a flag to coerce non-boolean numbers into Bools? - if number === kCFBooleanTrue as NSNumber { - return true - } else if number === kCFBooleanFalse as NSNumber { - return false - } - - /* FIXME: If swift-corelibs-foundation doesn't change to use NSNumber, this code path will need to be included and tested: - } else if let bool = value as? Bool { - return bool - */ - - } - - return nil - } - - func unbox(_ value: Any, as type: Int.Type) throws -> Int? { - guard !(value is NSNull) else { return nil } - - guard let number = value as? NSNumber, - number !== kCFBooleanTrue, - number !== kCFBooleanFalse else { - return nil - } - - let int = number.intValue - guard NSNumber(value: int) == number else { - return nil - } - - return int - } - - func unbox(_ value: Any, as type: Int8.Type) throws -> Int8? { - guard !(value is NSNull) else { return nil } - - guard let number = value as? NSNumber, - number !== kCFBooleanTrue, - number !== kCFBooleanFalse else { - return nil - } - - let int8 = number.int8Value - guard NSNumber(value: int8) == number else { - return nil - } - - return int8 - } - - func unbox(_ value: Any, as type: Int16.Type) throws -> Int16? { - guard !(value is NSNull) else { return nil } - - guard let number = value as? NSNumber, - number !== kCFBooleanTrue, - number !== kCFBooleanFalse else { - return nil - } - - let int16 = number.int16Value - guard NSNumber(value: int16) == number else { - return nil - } - - return int16 - } - - func unbox(_ value: Any, as type: Int32.Type) throws -> Int32? { - guard !(value is NSNull) else { return nil } - - guard let number = value as? NSNumber, - number !== kCFBooleanTrue, - number !== kCFBooleanFalse else { - return nil - } - - let int32 = number.int32Value - guard NSNumber(value: int32) == number else { - return nil - } - - return int32 - } - - func unbox(_ value: Any, as type: Int64.Type) throws -> Int64? { - guard !(value is NSNull) else { return nil } - - guard let number = value as? NSNumber, - number !== kCFBooleanTrue, - number !== kCFBooleanFalse else { - return nil - } - - let int64 = number.int64Value - guard NSNumber(value: int64) == number else { - return nil - } - - return int64 - } - - func unbox(_ value: Any, as type: UInt.Type) throws -> UInt? { - guard !(value is NSNull) else { return nil } - - guard let number = value as? NSNumber, - number !== kCFBooleanTrue, - number !== kCFBooleanFalse else { - return nil - } - - let uint = number.uintValue - guard NSNumber(value: uint) == number else { - return nil - } - - return uint - } - - func unbox(_ value: Any, as type: UInt8.Type) throws -> UInt8? { - guard !(value is NSNull) else { return nil } - - guard let number = value as? NSNumber, - number !== kCFBooleanTrue, - number !== kCFBooleanFalse else { - return nil - } - - let uint8 = number.uint8Value - guard NSNumber(value: uint8) == number else { - return nil - } - - return uint8 - } - - func unbox(_ value: Any, as type: UInt16.Type) throws -> UInt16? { - guard !(value is NSNull) else { return nil } - - guard let number = value as? NSNumber, - number !== kCFBooleanTrue, - number !== kCFBooleanFalse else { - return nil - } - - let uint16 = number.uint16Value - guard NSNumber(value: uint16) == number else { - return nil - } - - return uint16 - } - - func unbox(_ value: Any, as type: UInt32.Type) throws -> UInt32? { - guard !(value is NSNull) else { return nil } - - guard let number = value as? NSNumber, - number !== kCFBooleanTrue, - number !== kCFBooleanFalse else { - return nil - } - - let uint32 = number.uint32Value - guard NSNumber(value: uint32) == number else { - return nil - } - - return uint32 - } - - func unbox(_ value: Any, as type: UInt64.Type) throws -> UInt64? { - guard !(value is NSNull) else { return nil } - - guard let number = value as? NSNumber, - number !== kCFBooleanTrue, - number !== kCFBooleanFalse else { - return nil - } - - let uint64 = number.uint64Value - guard NSNumber(value: uint64) == number else { - return nil - } - - return uint64 - } - - func unbox(_ value: Any, as type: Float.Type) throws -> Float? { - guard !(value is NSNull) else { return nil } - - if let number = value as? NSNumber, - number !== kCFBooleanTrue, - number !== kCFBooleanFalse { - // We are willing to return a Float by losing precision: - // * If the original value was integral, - // * and the integral value was > Float.greatestFiniteMagnitude, we will fail - // * and the integral value was <= Float.greatestFiniteMagnitude, we are willing to lose precision past 2^24 - // * If it was a Float, you will get back the precise value - // * If it was a Double or Decimal, you will get back the nearest approximation if it will fit - let double = number.doubleValue - guard abs(double) <= Double(Float.greatestFiniteMagnitude) else { - return nil - } - - return Float(double) - - /* FIXME: If swift-corelibs-foundation doesn't change to use NSNumber, this code path will need to be included and tested: - } else if let double = value as? Double { - if abs(double) <= Double(Float.max) { - return Float(double) - } - - overflow = true - } else if let int = value as? Int { - if let float = Float(exactly: int) { - return float - } - - overflow = true - */ - - } else if let string = value as? String, - case .convertFromString(let posInfString, let negInfString, let nanString) = self.options.nonConformingFloatDecodingStrategy { - if string == posInfString { - return Float.infinity - } else if string == negInfString { - return -Float.infinity - } else if string == nanString { - return Float.nan - } - } - - return nil - } - - func unbox(_ value: Any, as type: Double.Type) throws -> Double? { - guard !(value is NSNull) else { return nil } - - if let number = value as? NSNumber, - number !== kCFBooleanTrue, - number !== kCFBooleanFalse { - // We are always willing to return the number as a Double: - // * If the original value was integral, it is guaranteed to fit in a Double; we are willing to lose precision past 2^53 if you encoded a UInt64 but requested a Double - // * If it was a Float or Double, you will get back the precise value - // * If it was Decimal, you will get back the nearest approximation - return number.doubleValue - - /* FIXME: If swift-corelibs-foundation doesn't change to use NSNumber, this code path will need to be included and tested: - } else if let double = value as? Double { - return double - } else if let int = value as? Int { - if let double = Double(exactly: int) { - return double - } - - overflow = true - */ - - } else if let string = value as? String, - case .convertFromString(let posInfString, let negInfString, let nanString) = self.options.nonConformingFloatDecodingStrategy { - if string == posInfString { - return Double.infinity - } else if string == negInfString { - return -Double.infinity - } else if string == nanString { - return Double.nan - } - } - - return nil - } - - func unbox(_ value: Any, as type: String.Type) throws -> String? { - guard !(value is NSNull) else { return nil } - - guard let string = value as? String else { return nil } - - return string - } - - func unbox(_ value: Any, as type: Date.Type) throws -> Date? { - guard !(value is NSNull) else { return nil } - - switch self.options.dateDecodingStrategy { - case .deferredToDate: - self.storage.push(container: value) - defer { self.storage.popContainer() } - guard let double = try self.unbox(value, as: Double.self) else { return nil } - - return Date(timeIntervalSinceReferenceDate: double) - - case .secondsSince1970: - guard let double = try self.unbox(value, as: Double.self) else { return nil } - - return Date(timeIntervalSince1970: double) - - case .millisecondsSince1970: - guard let double = try self.unbox(value, as: Double.self) else { return nil } - - return Date(timeIntervalSince1970: double / 1000.0) - - case .iso8601: - if #available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *) { - guard let string = try self.unbox(value, as: String.self) else { return nil } - guard let date = _iso8601Formatter.date(from: string) else { - throw DecodingError.dataCorrupted(DecodingError.Context(codingPath: self.codingPath, debugDescription: "Expected date string to be ISO8601-formatted.")) - } - - return date - } else { - fatalError("ISO8601DateFormatter is unavailable on this platform.") - } - - case .formatted(let formatter): - guard let string = try self.unbox(value, as: String.self) else { return nil } - - return formatter.date(from: string) - - case .custom(let closure): - self.storage.push(container: value) - defer { self.storage.popContainer() } - - return try closure(self) - - @unknown default: - self.storage.push(container: value) - defer { self.storage.popContainer() } - guard let double = try self.unbox(value, as: Double.self) else { return nil } - - return Date(timeIntervalSinceReferenceDate: double) - } - } - - func unbox(_ value: Any, as type: Data.Type) throws -> Data? { - guard !(value is NSNull) else { return nil } - - switch self.options.dataDecodingStrategy { - case .deferredToData: - self.storage.push(container: value) - defer { self.storage.popContainer() } - return try Data(from: self) - - case .base64: - guard let string = value as? String else { return nil } - - guard let data = Data(base64Encoded: string) else { return nil } - - return data - - case .custom(let closure): - self.storage.push(container: value) - defer { self.storage.popContainer() } - return try closure(self) - @unknown default: - self.storage.push(container: value) - defer { self.storage.popContainer() } - return try Data(from: self) - } - } - - func unbox(_ value: Any, as type: URL.Type) throws -> URL? { - guard let string = try unbox(value, as: String.self) else { return nil } - - return URL(string: string) - } - - func unbox(_ value: Any, as type: Decimal.Type) throws -> Decimal? { - guard !(value is NSNull) else { return nil } - - // Attempt to bridge from NSDecimalNumber. - if let decimal = value as? Decimal { - return decimal - } else { - guard let doubleValue = try self.unbox(value, as: Double.self) else { return nil } - - return Decimal(doubleValue) - } - } - - func unbox(_ value: Any, as type: _JSONStringDictionaryDecodableMarker.Type) throws -> T? { - guard !(value is NSNull) else { return nil } - - guard let dict = value as? NSDictionary else { return nil } - - var result = [String : Any]() - let elementType = type.elementType - for (key, value) in dict { - let key = key as! String - self.codingPath.append(CleanJSONKey(stringValue: key, intValue: nil)) - defer { self.codingPath.removeLast() } - - result[key] = try unbox_(value, as: elementType) - } - - return result as? T - } - - func unbox(_ value: Any, as type: T.Type) throws -> T? { - return try unbox_(value, as: type) as? T - } - - func unbox_(_ value: Any, as type: Decodable.Type) throws -> Any? { - if type == Date.self || type == NSDate.self { - return try unbox(value, as: Date.self) - } else if type == Data.self || type == NSData.self { - return try unbox(value, as: Data.self) - } else if type == URL.self || type == NSURL.self { - return try unbox(value, as: URL.self) - } else if type == Decimal.self || type == NSDecimalNumber.self { - return try unbox(value, as: Decimal.self) - } else if let stringKeyedDictType = type as? _JSONStringDictionaryDecodableMarker.Type { - return try unbox(value, as: stringKeyedDictType) - } else { - storage.push(container: value) - defer { storage.popContainer() } - return try type.init(from: self) - } - } -} - -// MARK: - helper -#if arch(i386) || arch(arm) -protocol _JSONStringDictionaryDecodableMarker { - static var elementType: Decodable.Type { get } -} -#else -protocol _JSONStringDictionaryDecodableMarker { - static var elementType: Decodable.Type { get } -} -#endif - -extension Dictionary : _JSONStringDictionaryDecodableMarker where Key == String, Value: Decodable { - static var elementType: Decodable.Type { return Value.self } -} - -@available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *) -fileprivate var _iso8601Formatter: ISO8601DateFormatter = { - let formatter = ISO8601DateFormatter() - formatter.formatOptions = .withInternetDateTime - return formatter -}() diff --git a/Example/Pods/CleanJSON/CleanJSON/Classes/_CleanJSONDecoder.swift b/Example/Pods/CleanJSON/CleanJSON/Classes/_CleanJSONDecoder.swift deleted file mode 100644 index 7895297..0000000 --- a/Example/Pods/CleanJSON/CleanJSON/Classes/_CleanJSONDecoder.swift +++ /dev/null @@ -1,101 +0,0 @@ -// -// _CleanJSONDecoder.swift -// CleanJSON -// -// Created by Pircate(swifter.dev@gmail.com) on 2018/10/10 -// Copyright © 2018 Pircate. All rights reserved. -// - -import Foundation - -final class _CleanJSONDecoder: CleanDecoder { - - /// The decoder's storage. - var storage: CleanJSONDecodingStorage - - /// Options set on the top-level decoder. - let options: CleanJSONDecoder.Options - - /// The path to the current point in encoding. - public var codingPath: [CodingKey] - - /// Contextual user-provided information for use during encoding. - public var userInfo: [CodingUserInfoKey : Any] { - return self.options.userInfo - } - - // MARK: - Initialization - - /// Initializes `self` with the given top-level container and options. - init(referencing container: Any, at codingPath: [CodingKey] = [], options: CleanJSONDecoder.Options) { - self.storage = CleanJSONDecodingStorage() - self.storage.push(container: container) - self.codingPath = codingPath - self.options = options - } - - // MARK: - Decoder Methods - - public func container(keyedBy type: Key.Type) throws -> KeyedDecodingContainer { - guard !(self.storage.topContainer is NSNull) else { - switch options.nestedContainerDecodingStrategy.valueNotFound { - case .throw: - throw DecodingError.Nested.valueNotFound( - KeyedDecodingContainer.self, - codingPath: codingPath, - debugDescription: "Cannot get keyed decoding container -- found null value instead.") - case .useEmptyContainer: - let container = CleanJSONKeyedDecodingContainer(referencing: self, wrapping: [:]) - return KeyedDecodingContainer(container) - } - } - - guard let topContainer = self.storage.topContainer as? [String : Any] else { - switch options.nestedContainerDecodingStrategy.typeMismatch { - case .throw: - throw DecodingError._typeMismatch( - at: codingPath, - expectation: [String : Any].self, - reality: storage.topContainer) - case .useEmptyContainer: - let container = CleanJSONKeyedDecodingContainer(referencing: self, wrapping: [:]) - return KeyedDecodingContainer(container) - } - } - - let container = CleanJSONKeyedDecodingContainer(referencing: self, wrapping: topContainer) - return KeyedDecodingContainer(container) - } - - public func unkeyedContainer() throws -> UnkeyedDecodingContainer { - guard !(self.storage.topContainer is NSNull) else { - switch options.nestedContainerDecodingStrategy.valueNotFound { - case .throw: - throw DecodingError.Nested.valueNotFound( - UnkeyedDecodingContainer.self, - codingPath: codingPath, - debugDescription: "Cannot get unkeyed decoding container -- found null value instead.") - case .useEmptyContainer: - return CleanJSONUnkeyedDecodingContainer(referencing: self, wrapping: []) - } - } - - guard let topContainer = self.storage.topContainer as? [Any] else { - switch options.nestedContainerDecodingStrategy.typeMismatch { - case .throw: - throw DecodingError._typeMismatch( - at: codingPath, - expectation: [Any].self, - reality: storage.topContainer) - case .useEmptyContainer: - return CleanJSONUnkeyedDecodingContainer(referencing: self, wrapping: []) - } - } - - return CleanJSONUnkeyedDecodingContainer(referencing: self, wrapping: topContainer) - } - - public func singleValueContainer() throws -> SingleValueDecodingContainer { - return self - } -} diff --git a/Example/Pods/CleanJSON/LICENSE b/Example/Pods/CleanJSON/LICENSE deleted file mode 100644 index 4ce7385..0000000 --- a/Example/Pods/CleanJSON/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018 Pircate - -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. diff --git a/Example/Pods/Local Podspecs/RxNetwork.podspec.json b/Example/Pods/Local Podspecs/RxNetwork.podspec.json deleted file mode 100755 index 54c2d0d..0000000 --- a/Example/Pods/Local Podspecs/RxNetwork.podspec.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "RxNetwork", - "version": "1.0.1-beta", - "summary": "A swift network library based on Moya/RxSwift.", - "homepage": "https://github.com/Pircate/RxNetwork", - "license": { - "type": "MIT", - "file": "LICENSE" - }, - "authors": { - "Pircate": "gao497868860@163.com" - }, - "source": { - "git": "https://github.com/Pircate/RxNetwork.git", - "tag": "1.0.1-beta" - }, - "platforms": { - "ios": "10.0" - }, - "requires_arc": true, - "swift_versions": "5.0", - "default_subspecs": "Core", - "subspecs": [ - { - "name": "Core", - "source_files": "RxNetwork/Classes/Core", - "dependencies": { - "Moya/RxSwift": [ - "14.0.0-beta2" - ] - } - }, - { - "name": "Cacheable", - "source_files": "RxNetwork/Classes/Cacheable", - "dependencies": { - "RxNetwork/Core": [ - - ], - "Storable": [ - - ] - } - } - ], - "swift_version": "5.0" -} diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock deleted file mode 100755 index ce8b193..0000000 --- a/Example/Pods/Manifest.lock +++ /dev/null @@ -1,43 +0,0 @@ -PODS: - - Alamofire (5.0.0-rc.2) - - CleanJSON (1.0.0) - - Moya/Core (14.0.0-beta.2): - - Alamofire (= 5.0.0-rc.2) - - Moya/RxSwift (14.0.0-beta.2): - - Moya/Core - - RxSwift (~> 5.0) - - RxNetwork/Cacheable (1.0.1-beta): - - RxNetwork/Core - - Storable - - RxNetwork/Core (1.0.1-beta): - - Moya/RxSwift (= 14.0.0-beta2) - - RxSwift (5.0.0) - - Storable (0.1.1) - -DEPENDENCIES: - - CleanJSON - - RxNetwork/Cacheable (from `../`) - -SPEC REPOS: - https://github.com/cocoapods/specs.git: - - Alamofire - - CleanJSON - - Moya - - RxSwift - - Storable - -EXTERNAL SOURCES: - RxNetwork: - :path: "../" - -SPEC CHECKSUMS: - Alamofire: f9450d3c7f6bea2ad62e7a541c3e9b186c7991d6 - CleanJSON: 702dd619e1329c6399a579aa19af311acf47e461 - Moya: 788e592b92fadb10e30d350ed1a9f75c91eb1368 - RxNetwork: a48c6f96a5737620aab43ac53de5ec4382a08903 - RxSwift: 8b0671caa829a763bbce7271095859121cbd895f - Storable: 31d19a4f897d68d1f1843604b60e12e5c2e1db5f - -PODFILE CHECKSUM: 22eef8d19050091620bf8737b6cdd9363d3cd8ef - -COCOAPODS: 1.7.5 diff --git a/Example/Pods/Moya/License.md b/Example/Pods/Moya/License.md deleted file mode 100644 index 58ef14f..0000000 --- a/Example/Pods/Moya/License.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-present Artsy, Ash Furrow - -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. diff --git a/Example/Pods/Moya/Readme.md b/Example/Pods/Moya/Readme.md deleted file mode 100644 index d55105a..0000000 --- a/Example/Pods/Moya/Readme.md +++ /dev/null @@ -1,328 +0,0 @@ -

- -

- -# Moya - -[![CircleCI](https://img.shields.io/circleci/project/github/Moya/Moya/master.svg)](https://circleci.com/gh/Moya/Moya/tree/master) -[![codecov.io](https://codecov.io/github/Moya/Moya/coverage.svg?branch=master)](https://codecov.io/github/Moya/Moya?branch=master) -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Accio supported](https://img.shields.io/badge/Accio-supported-0A7CF5.svg?style=flat)](https://github.com/JamitLabs/Accio) -[![CocoaPods compatible](https://img.shields.io/cocoapods/v/Moya.svg)](https://cocoapods.org/pods/Moya) -[![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager) - -*A Chinese version of this document can be found [here](https://github.com/Moya/Moya/blob/master/Readme_CN.md).* - -You're a smart developer. You probably use [Alamofire](https://github.com/Alamofire/Alamofire) to abstract away access to -`URLSession` and all those nasty details you don't really care about. But then, -like lots of smart developers, you write ad hoc network abstraction layers. They -are probably called "APIManager" or "NetworkModel", and they always end in tears. - -![Moya Overview](web/diagram.png) - -Ad hoc network layers are common in iOS apps. They're bad for a few reasons: - -- Makes it hard to write new apps ("where do I begin?") -- Makes it hard to maintain existing apps ("oh my god, this mess...") -- Makes it hard to write unit tests ("how do I do this again?") - -So the basic idea of Moya is that we want some network abstraction layer that -sufficiently encapsulates actually calling Alamofire directly. It should be simple -enough that common things are easy, but comprehensive enough that complicated things -are also easy. - -> If you use Alamofire to abstract away `URLSession`, why not use something -to abstract away the nitty gritty of URLs, parameters, etc? - -Some awesome features of Moya: - -- Compile-time checking for correct API endpoint accesses. -- Lets you define a clear usage of different endpoints with associated enum values. -- Treats test stubs as first-class citizens so unit testing is super-easy. - -You can check out more about the project direction in the [vision document](https://github.com/Moya/Moya/blob/master/Vision.md). - -## Sample Projects - -We have provided two sample projects in the repository. To use it download the repo, run `carthage update` to download the required libraries and open [Moya.xcodeproj](https://github.com/Moya/Moya/tree/master/Moya.xcodeproj). You'll see two schemes: `Basic` and `Multi-Target` - select one and then build & run! Source files for these are in the `Examples` directory in project navigator. Have fun! - -## Project Status - -This project is actively under development, and is being used in [Artsy's -new auction app](https://github.com/Artsy/eidolon). We consider it -ready for production use. - -## Installation - -### Moya version vs Swift version. - -Below is a table that shows which version of Moya you should use for -your Swift version. - -| Swift | Moya | RxMoya | ReactiveMoya | -| ----- | -------------- |---------------- |--------------- | -| 5.X | >= 13.0.0 | >= 13.0.0 | >= 13.0.0 | -| 4.X | 9.0.0 - 12.0.1 | 10.0.0 - 12.0.1 | 9.0.0 - 12.0.1 | -| 3.X | 8.0.0 - 8.0.5 | 8.0.0 - 8.0.5 | 8.0.0 - 8.0.5 | -| 2.3 | 7.0.2 - 7.0.4 | 7.0.2 - 7.0.4 | 7.0.2 - 7.0.4 | -| 2.2 | <= 7.0.1 | <= 7.0.1 | <= 7.0.1 | - -_Note: If you are using Swift 4.2 in your project, but you are using Xcode 10.2, Moya 13 should work correctly even though we use Swift 5.0._ - -**Upgrading to a new major version of Moya? Check out our [migration guides](https://github.com/Moya/Moya/blob/master/docs/MigrationGuides).** - -### Swift Package Manager - -To integrate using Apple's Swift package manager, add the following as a dependency to your `Package.swift`: - -```swift -.package(url: "https://github.com/Moya/Moya.git", .upToNextMajor(from: "13.0.0")) -``` - -and then specify `"Moya"` as a dependency of the Target in which you wish to use Moya. -If you want to use reactive extensions, add also `"ReactiveMoya"` or `"RxMoya"` as your Target dependency respectively. -Here's an example `PackageDescription`: - -```swift -// swift-tools-version:5.0 -import PackageDescription - -let package = Package( - name: "MyPackage", - products: [ - .library( - name: "MyPackage", - targets: ["MyPackage"]), - ], - dependencies: [ - .package(url: "https://github.com/Moya/Moya.git", .upToNextMajor(from: "13.0.0")) - ], - targets: [ - .target( - name: "MyPackage", - dependencies: ["ReactiveMoya"]) - ] -) -``` - -Note that as of Moya 10, SPM only works with Swift 4 toolchain and greater. - -### Accio - -[Accio](https://github.com/JamitLabs/Accio) is a dependency manager based on SwiftPM which can build frameworks for iOS/macOS/tvOS/watchOS. Therefore the integration steps of Moya are exactly the same as described above. Once your `Package.swift` file is configured, run `accio update` instead of `swift package update`. - -### CocoaPods - -For Moya, use the following entry in your Podfile: - -```rb -pod 'Moya', '~> 13.0' - -# or - -pod 'Moya/RxSwift', '~> 13.0' - -# or - -pod 'Moya/ReactiveSwift', '~> 13.0' -``` - -Then run `pod install`. - -In any file you'd like to use Moya in, don't forget to -import the framework with `import Moya`. - -### Carthage - -Carthage users can point to this repository and use whichever -generated framework they'd like, `Moya`, `RxMoya`, or `ReactiveMoya`. - -Make the following entry in your Cartfile: - -``` -github "Moya/Moya" ~> 13.0 -``` - -Then run `carthage update`. - -If this is your first time using Carthage in the project, you'll need to go through some additional steps as explained [over at Carthage](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application). - -> NOTE: At this time, Carthage does not provide a way to build only specific repository submodules. All submodules and their dependencies will be built with the above command. However, you don't need to copy frameworks you aren't using into your project. For instance, if you aren't using `ReactiveSwift`, feel free to delete that framework along with `ReactiveMoya` from the Carthage Build directory after `carthage update` completes. Or if you are using `ReactiveSwift` but not `RxSwift`, then `RxMoya`, `RxTest`, `RxCocoa`, etc. can safely be deleted. - -### Manually - -- Open up Terminal, `cd` into your top-level project directory, and run the following command *if* your project is not initialized as a git repository: - -```bash -$ git init -``` - -- Add Alamofire, Result & Moya as a git [submodule](http://git-scm.com/docs/git-submodule) by running the following commands: - -```bash -$ git submodule add https://github.com/Alamofire/Alamofire.git -$ git submodule add https://github.com/antitypical/Result.git -$ git submodule add https://github.com/Moya/Moya.git -``` - -- Open the new `Alamofire` folder, and drag the `Alamofire.xcodeproj` into the Project Navigator of your application's Xcode project. Do the same with the `Result.xcodeproj` in the `Result` folder and `Moya.xcodeproj` in the `Moya` folder. - -> They should appear nested underneath your application's blue project icon. Whether it is above or below all the other Xcode groups does not matter. - -- Verify that the deployment targets of the `xcodeproj`s match that of your application target in the Project Navigator. -- Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar. -- In the tab bar at the top of that window, open the "General" panel. -- Click on the `+` button under the "Embedded Binaries" section. -- You will see two different `Alamofire.xcodeproj` folders each with two different versions of the `Alamofire.framework` nested inside a `Products` folder. - -> It does not matter which `Products` folder you choose from, but it does matter whether you choose the top or bottom `Alamofire.framework`. - -- Select the top `Alamofire.framework` for iOS and the bottom one for macOS. - -> You can verify which one you selected by inspecting the build log for your project. The build target for `Alamofire` will be listed as either `Alamofire iOS`, `Alamofire macOS`, `Alamofire tvOS` or `Alamofire watchOS`. - -- Click on the `+` button under "Embedded Binaries" again and add the build target you need for `Result`. -- Click on the `+` button again and add the correct build target for `Moya`. - -- And that's it! - -> The three frameworks are automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device. - -## Usage - -After [some setup](https://github.com/Moya/Moya/blob/master/docs/Examples/Basic.md), using Moya is really simple. You can access an API like this: - -```swift -provider = MoyaProvider() -provider.request(.zen) { result in - switch result { - case let .success(moyaResponse): - let data = moyaResponse.data - let statusCode = moyaResponse.statusCode - // do something with the response data or statusCode - case let .failure(error): - // this means there was a network failure - either the request - // wasn't sent (connectivity), or no response was received (server - // timed out). If the server responds with a 4xx or 5xx error, that - // will be sent as a ".success"-ful response. - } -} -``` - -That's a basic example. Many API requests need parameters. Moya encodes these -into the enum you use to access the endpoint, like this: - -```swift -provider = MoyaProvider() -provider.request(.userProfile("ashfurrow")) { result in - // do something with the result -} -``` - -No more typos in URLs. No more missing parameter values. No more messing with -parameter encoding. - -For more examples, see the [documentation](https://github.com/Moya/Moya/blob/master/docs/Examples). - -## Reactive Extensions - -Even cooler are the reactive extensions. Moya provides reactive extensions for -[ReactiveSwift](https://github.com/ReactiveCocoa/ReactiveSwift) and -[RxSwift](https://github.com/ReactiveX/RxSwift). - -### ReactiveSwift - -[`ReactiveSwift` extension](https://github.com/Moya/Moya/blob/master/docs/ReactiveSwift.md) provides both `reactive.request(:callbackQueue:)` and -`reactive.requestWithProgress(:callbackQueue:)` methods that immediately return -`SignalProducer`s that you can start, bind, map, or whatever you want to do. -To handle errors, for instance, we could do the following: - -```swift -provider = MoyaProvider() -provider.reactive.request(.userProfile("ashfurrow")).start { event in - switch event { - case let .value(response): - image = UIImage(data: response.data) - case let .failed(error): - print(error) - default: - break - } -} -``` - -### RxSwift - -[`RxSwift` extension](https://github.com/Moya/Moya/blob/master/docs/RxSwift.md) also provide both `rx.request(:callbackQueue:)` and -`rx.requestWithProgress(:callbackQueue:)` methods, but return type is -different for both. In case of a normal `rx.request(:callbackQueue)`, the -return type is `Single` which emits either single element or an -error. In case of a `rx.requestWithProgress(:callbackQueue:)`, the return -type is `Observable`, since we may get multiple events -from progress and one last event which is a response. - -To handle errors, for instance, we could do the following: - -```swift -provider = MoyaProvider() -provider.rx.request(.userProfile("ashfurrow")).subscribe { event in - switch event { - case let .success(response): - image = UIImage(data: response.data) - case let .error(error): - print(error) - } -} -``` - -In addition to the option of using signals instead of callback blocks, there are -also a series of signal operators for RxSwift and ReactiveSwift that will attempt -to map the data received from the network response into either an image, some JSON, -or a string, with `mapImage()`, `mapJSON()`, and `mapString()`, respectively. If the mapping is unsuccessful, you'll get an error on the signal. You also get handy methods -for filtering out certain status codes. This means that you can place your code for -handling API errors like 400's in the same places as code for handling invalid -responses. - -## Community Projects - -[Moya has a great community around it and some people have created some very helpful extensions](https://github.com/Moya/Moya/blob/master/docs/CommunityProjects.md). - -## Contributing - -Hey! Do you like Moya? Awesome! We could actually really use your help! - -Open source isn't just writing code. Moya could use your help with any of the -following: - -- Finding (and reporting!) bugs. -- New feature suggestions. -- Answering questions on issues. -- Documentation improvements. -- Reviewing pull requests. -- Helping to manage issue priorities. -- Fixing bugs/new features. - -If any of that sounds cool to you, send a pull request! After your first -contribution, we will add you as a member to the repo so you can merge pull -requests and help steer the ship :ship: You can read more details about that [in our contributor guidelines](https://github.com/Moya/Moya/blob/master/Contributing.md). - -Moya's community has a tremendous positive energy, and the maintainers are committed to keeping things awesome. Like [in the CocoaPods community](https://github.com/CocoaPods/CocoaPods/wiki/Communication-&-Design-Rules), always assume positive intent; even if a comment sounds mean-spirited, give the person the benefit of the doubt. - -Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by [its terms](https://github.com/Moya/Moya/blob/master/Code%20of%20Conduct.md). - -### Adding new source files - -If you add or remove a source file from Moya, a corresponding change needs to be made to the `Moya.xcodeproj` project at the root of this repository. This project is used for Carthage. Don't worry, you'll get an automated warning when submitting a pull request if you forget. - -### Help us improve Moya documentation -Whether you’re a core member or a user trying it out for the first time, you can make a valuable contribution to Moya by improving the documentation. Help us by: - -- sending us feedback about something you thought was confusing or simply missing -- suggesting better wording or ways of explaining certain topics -- sending us a pull request via GitHub -- improving the [Chinese documentation](https://github.com/Moya/Moya/blob/master/Readme_CN.md) - - -## License - -Moya is released under an MIT license. See [License.md](https://github.com/Moya/Moya/blob/master/License.md) for more information. diff --git a/Example/Pods/Moya/Sources/Moya/AnyEncodable.swift b/Example/Pods/Moya/Sources/Moya/AnyEncodable.swift deleted file mode 100644 index 15c7128..0000000 --- a/Example/Pods/Moya/Sources/Moya/AnyEncodable.swift +++ /dev/null @@ -1,14 +0,0 @@ -import Foundation - -struct AnyEncodable: Encodable { - - private let encodable: Encodable - - public init(_ encodable: Encodable) { - self.encodable = encodable - } - - func encode(to encoder: Encoder) throws { - try encodable.encode(to: encoder) - } -} diff --git a/Example/Pods/Moya/Sources/Moya/Cancellable.swift b/Example/Pods/Moya/Sources/Moya/Cancellable.swift deleted file mode 100644 index 9a9c783..0000000 --- a/Example/Pods/Moya/Sources/Moya/Cancellable.swift +++ /dev/null @@ -1,26 +0,0 @@ -/// Protocol to define the opaque type returned from a request. -public protocol Cancellable { - - /// A Boolean value stating whether a request is cancelled. - var isCancelled: Bool { get } - - /// Cancels the represented request. - func cancel() -} - -internal class CancellableWrapper: Cancellable { - internal var innerCancellable: Cancellable = SimpleCancellable() - - var isCancelled: Bool { return innerCancellable.isCancelled } - - internal func cancel() { - innerCancellable.cancel() - } -} - -internal class SimpleCancellable: Cancellable { - var isCancelled = false - func cancel() { - isCancelled = true - } -} diff --git a/Example/Pods/Moya/Sources/Moya/Endpoint.swift b/Example/Pods/Moya/Sources/Moya/Endpoint.swift deleted file mode 100755 index dae0504..0000000 --- a/Example/Pods/Moya/Sources/Moya/Endpoint.swift +++ /dev/null @@ -1,140 +0,0 @@ -import Foundation - -/// Used for stubbing responses. -public enum EndpointSampleResponse { - - /// The network returned a response, including status code and data. - case networkResponse(Int, Data) - - /// The network returned response which can be fully customized. - case response(HTTPURLResponse, Data) - - /// The network failed to send the request, or failed to retrieve a response (eg a timeout). - case networkError(NSError) -} - -/// Class for reifying a target of the `Target` enum unto a concrete `Endpoint`. -/// - Note: As of Moya 11.0.0 Endpoint is no longer generic. -/// Existing code should work as is after removing the generic. -/// See #1529 and #1524 for the discussion. -open class Endpoint { - public typealias SampleResponseClosure = () -> EndpointSampleResponse - - /// A string representation of the URL for the request. - public let url: String - - /// A closure responsible for returning an `EndpointSampleResponse`. - public let sampleResponseClosure: SampleResponseClosure - - /// The HTTP method for the request. - public let method: Moya.Method - - /// The `Task` for the request. - public let task: Task - - /// The HTTP header fields for the request. - public let httpHeaderFields: [String: String]? - - public init(url: String, - sampleResponseClosure: @escaping SampleResponseClosure, - method: Moya.Method, - task: Task, - httpHeaderFields: [String: String]?) { - - self.url = url - self.sampleResponseClosure = sampleResponseClosure - self.method = method - self.task = task - self.httpHeaderFields = httpHeaderFields - } - - /// Convenience method for creating a new `Endpoint` with the same properties as the receiver, but with added HTTP header fields. - open func adding(newHTTPHeaderFields: [String: String]) -> Endpoint { - return Endpoint(url: url, sampleResponseClosure: sampleResponseClosure, method: method, task: task, httpHeaderFields: add(httpHeaderFields: newHTTPHeaderFields)) - } - - /// Convenience method for creating a new `Endpoint` with the same properties as the receiver, but with replaced `task` parameter. - open func replacing(task: Task) -> Endpoint { - return Endpoint(url: url, sampleResponseClosure: sampleResponseClosure, method: method, task: task, httpHeaderFields: httpHeaderFields) - } - - fileprivate func add(httpHeaderFields headers: [String: String]?) -> [String: String]? { - guard let unwrappedHeaders = headers, unwrappedHeaders.isEmpty == false else { - return self.httpHeaderFields - } - - var newHTTPHeaderFields = self.httpHeaderFields ?? [:] - unwrappedHeaders.forEach { key, value in - newHTTPHeaderFields[key] = value - } - return newHTTPHeaderFields - } -} - -/// Extension for converting an `Endpoint` into a `URLRequest`. -public extension Endpoint { - // swiftlint:disable cyclomatic_complexity - /// Returns the `Endpoint` converted to a `URLRequest` if valid. Throws an error otherwise. - func urlRequest() throws -> URLRequest { - guard let requestURL = Foundation.URL(string: url) else { - throw MoyaError.requestMapping(url) - } - - var request = URLRequest(url: requestURL) - request.httpMethod = method.rawValue - request.allHTTPHeaderFields = httpHeaderFields - - switch task { - case .requestPlain, .uploadFile, .uploadMultipart, .downloadDestination: - return request - case .requestData(let data): - request.httpBody = data - return request - case let .requestJSONEncodable(encodable): - return try request.encoded(encodable: encodable) - case let .requestCustomJSONEncodable(encodable, encoder: encoder): - return try request.encoded(encodable: encodable, encoder: encoder) - case let .requestParameters(parameters, parameterEncoding): - return try request.encoded(parameters: parameters, parameterEncoding: parameterEncoding) - case let .uploadCompositeMultipart(_, urlParameters): - let parameterEncoding = URLEncoding(destination: .queryString) - return try request.encoded(parameters: urlParameters, parameterEncoding: parameterEncoding) - case let .downloadParameters(parameters, parameterEncoding, _): - return try request.encoded(parameters: parameters, parameterEncoding: parameterEncoding) - case let .requestCompositeData(bodyData: bodyData, urlParameters: urlParameters): - request.httpBody = bodyData - let parameterEncoding = URLEncoding(destination: .queryString) - return try request.encoded(parameters: urlParameters, parameterEncoding: parameterEncoding) - case let .requestCompositeParameters(bodyParameters: bodyParameters, bodyEncoding: bodyParameterEncoding, urlParameters: urlParameters): - if let bodyParameterEncoding = bodyParameterEncoding as? URLEncoding, bodyParameterEncoding.destination != .httpBody { - fatalError("Only URLEncoding that `bodyEncoding` accepts is URLEncoding.httpBody. Others like `default`, `queryString` or `methodDependent` are prohibited - if you want to use them, add your parameters to `urlParameters` instead.") - } - let bodyfulRequest = try request.encoded(parameters: bodyParameters, parameterEncoding: bodyParameterEncoding) - let urlEncoding = URLEncoding(destination: .queryString) - return try bodyfulRequest.encoded(parameters: urlParameters, parameterEncoding: urlEncoding) - } - } - // swiftlint:enable cyclomatic_complexity -} - -/// Required for using `Endpoint` as a key type in a `Dictionary`. -extension Endpoint: Equatable, Hashable { - public func hash(into hasher: inout Hasher) { - guard let request = try? urlRequest() else { - hasher.combine(url) - return - } - hasher.combine(request) - } - - /// Note: If both Endpoints fail to produce a URLRequest the comparison will - /// fall back to comparing each Endpoint's hashValue. - public static func == (lhs: Endpoint, rhs: Endpoint) -> Bool { - let lhsRequest = try? lhs.urlRequest() - let rhsRequest = try? rhs.urlRequest() - if lhsRequest != nil, rhsRequest == nil { return false } - if lhsRequest == nil, rhsRequest != nil { return false } - if lhsRequest == nil, rhsRequest == nil { return lhs.hashValue == rhs.hashValue } - return (lhsRequest == rhsRequest) - } -} diff --git a/Example/Pods/Moya/Sources/Moya/Image.swift b/Example/Pods/Moya/Sources/Moya/Image.swift deleted file mode 100644 index b57b472..0000000 --- a/Example/Pods/Moya/Sources/Moya/Image.swift +++ /dev/null @@ -1,10 +0,0 @@ -#if canImport(UIKit) - import UIKit.UIImage - public typealias ImageType = UIImage -#elseif canImport(AppKit) - import AppKit.NSImage - public typealias ImageType = NSImage -#endif - -/// An alias for the SDK's image type. -public typealias Image = ImageType diff --git a/Example/Pods/Moya/Sources/Moya/Moya+Alamofire.swift b/Example/Pods/Moya/Sources/Moya/Moya+Alamofire.swift deleted file mode 100644 index 4781317..0000000 --- a/Example/Pods/Moya/Sources/Moya/Moya+Alamofire.swift +++ /dev/null @@ -1,124 +0,0 @@ -import Foundation -import Alamofire - -public typealias Session = Alamofire.Session -internal typealias Request = Alamofire.Request -internal typealias DownloadRequest = Alamofire.DownloadRequest -internal typealias UploadRequest = Alamofire.UploadRequest -internal typealias DataRequest = Alamofire.DataRequest - -internal typealias URLRequestConvertible = Alamofire.URLRequestConvertible - -/// Represents an HTTP method. -public typealias Method = Alamofire.HTTPMethod - -/// Choice of parameter encoding. -public typealias ParameterEncoding = Alamofire.ParameterEncoding -public typealias JSONEncoding = Alamofire.JSONEncoding -public typealias URLEncoding = Alamofire.URLEncoding - -/// Multipart form. -public typealias RequestMultipartFormData = Alamofire.MultipartFormData - -/// Multipart form data encoding result. -public typealias DownloadDestination = Alamofire.DownloadRequest.Destination - -/// Make the Alamofire Request type conform to our type, to prevent leaking Alamofire to plugins. -extension Request: RequestType { - public var sessionHeaders: [String: String] { - return delegate?.sessionConfiguration.httpAdditionalHeaders as? [String: String] ?? [:] - } -} - -/// Represents Request interceptor type that can modify/act on Request -public typealias RequestInterceptor = Alamofire.RequestInterceptor - -/// Internal token that can be used to cancel requests -public final class CancellableToken: Cancellable, CustomDebugStringConvertible { - let cancelAction: () -> Void - let request: Request? - - public fileprivate(set) var isCancelled = false - - fileprivate var lock: DispatchSemaphore = DispatchSemaphore(value: 1) - - public func cancel() { - _ = lock.wait(timeout: DispatchTime.distantFuture) - defer { lock.signal() } - guard !isCancelled else { return } - isCancelled = true - cancelAction() - } - - public init(action: @escaping () -> Void) { - self.cancelAction = action - self.request = nil - } - - init(request: Request) { - self.request = request - self.cancelAction = { - request.cancel() - } - } - - /// A textual representation of this instance, suitable for debugging. - public var debugDescription: String { - guard let request = self.request else { - return "Empty Request" - } - return request.cURLDescription() - } - -} - -internal typealias RequestableCompletion = (HTTPURLResponse?, URLRequest?, Data?, Swift.Error?) -> Void - -internal protocol Requestable { - func response(callbackQueue: DispatchQueue?, completionHandler: @escaping RequestableCompletion) -> Self -} - -extension DataRequest: Requestable { - internal func response(callbackQueue: DispatchQueue?, completionHandler: @escaping RequestableCompletion) -> Self { - if let callbackQueue = callbackQueue { - return response(queue: callbackQueue) { handler in - completionHandler(handler.response, handler.request, handler.data, handler.error) - } - } else { - return response { handler in - completionHandler(handler.response, handler.request, handler.data, handler.error) - } - } - } -} - -extension DownloadRequest: Requestable { - internal func response(callbackQueue: DispatchQueue?, completionHandler: @escaping RequestableCompletion) -> Self { - if let callbackQueue = callbackQueue { - return response(queue: callbackQueue) { handler in - completionHandler(handler.response, handler.request, nil, handler.error) - } - } else { - return response { handler in - completionHandler(handler.response, handler.request, nil, handler.error) - } - } - } -} - -final class MoyaRequestInterceptor: RequestInterceptor { - - var prepare: ((URLRequest) -> URLRequest)? - var willSend: ((URLRequest) -> Void)? - - init(prepare: ((URLRequest) -> URLRequest)? = nil, willSend: ((URLRequest) -> Void)? = nil) { - self.prepare = prepare - self.willSend = willSend - } - - func adapt(_ urlRequest: URLRequest, for session: Alamofire.Session, completion: @escaping (Result) -> Void) { - let request = prepare?(urlRequest) ?? urlRequest - willSend?(request) - completion(.success(request)) - } -} diff --git a/Example/Pods/Moya/Sources/Moya/MoyaError.swift b/Example/Pods/Moya/Sources/Moya/MoyaError.swift deleted file mode 100644 index 4b16bd2..0000000 --- a/Example/Pods/Moya/Sources/Moya/MoyaError.swift +++ /dev/null @@ -1,102 +0,0 @@ -import Foundation - -/// A type representing possible errors Moya can throw. -public enum MoyaError: Swift.Error { - - /// Indicates a response failed to map to an image. - case imageMapping(Response) - - /// Indicates a response failed to map to a JSON structure. - case jsonMapping(Response) - - /// Indicates a response failed to map to a String. - case stringMapping(Response) - - /// Indicates a response failed to map to a Decodable object. - case objectMapping(Swift.Error, Response) - - /// Indicates that Encodable couldn't be encoded into Data - case encodableMapping(Swift.Error) - - /// Indicates a response failed with an invalid HTTP status code. - case statusCode(Response) - - /// Indicates a response failed due to an underlying `Error`. - case underlying(Swift.Error, Response?) - - /// Indicates that an `Endpoint` failed to map to a `URLRequest`. - case requestMapping(String) - - /// Indicates that an `Endpoint` failed to encode the parameters for the `URLRequest`. - case parameterEncoding(Swift.Error) -} - -public extension MoyaError { - /// Depending on error type, returns a `Response` object. - var response: Moya.Response? { - switch self { - case .imageMapping(let response): return response - case .jsonMapping(let response): return response - case .stringMapping(let response): return response - case .objectMapping(_, let response): return response - case .encodableMapping: return nil - case .statusCode(let response): return response - case .underlying(_, let response): return response - case .requestMapping: return nil - case .parameterEncoding: return nil - } - } - - /// Depending on error type, returns an underlying `Error`. - internal var underlyingError: Swift.Error? { - switch self { - case .imageMapping: return nil - case .jsonMapping: return nil - case .stringMapping: return nil - case .objectMapping(let error, _): return error - case .encodableMapping(let error): return error - case .statusCode: return nil - case .underlying(let error, _): return error - case .requestMapping: return nil - case .parameterEncoding(let error): return error - } - } -} - -// MARK: - Error Descriptions - -extension MoyaError: LocalizedError { - public var errorDescription: String? { - switch self { - case .imageMapping: - return "Failed to map data to an Image." - case .jsonMapping: - return "Failed to map data to JSON." - case .stringMapping: - return "Failed to map data to a String." - case .objectMapping: - return "Failed to map data to a Decodable object." - case .encodableMapping: - return "Failed to encode Encodable object into data." - case .statusCode: - return "Status code didn't fall within the given range." - case .underlying(let error, _): - return error.localizedDescription - case .requestMapping: - return "Failed to map Endpoint to a URLRequest." - case .parameterEncoding(let error): - return "Failed to encode parameters for URLRequest. \(error.localizedDescription)" - } - } -} - -// MARK: - Error User Info - -extension MoyaError: CustomNSError { - public var errorUserInfo: [String: Any] { - var userInfo: [String: Any] = [:] - userInfo[NSLocalizedDescriptionKey] = errorDescription - userInfo[NSUnderlyingErrorKey] = underlyingError - return userInfo - } -} diff --git a/Example/Pods/Moya/Sources/Moya/MoyaProvider+Defaults.swift b/Example/Pods/Moya/Sources/Moya/MoyaProvider+Defaults.swift deleted file mode 100644 index 0f97f69..0000000 --- a/Example/Pods/Moya/Sources/Moya/MoyaProvider+Defaults.swift +++ /dev/null @@ -1,34 +0,0 @@ -import Foundation - -/// These functions are default mappings to `MoyaProvider`'s properties: endpoints, requests, session etc. -public extension MoyaProvider { - final class func defaultEndpointMapping(for target: Target) -> Endpoint { - return Endpoint( - url: URL(target: target).absoluteString, - sampleResponseClosure: { .networkResponse(200, target.sampleData) }, - method: target.method, - task: target.task, - httpHeaderFields: target.headers - ) - } - - final class func defaultRequestMapping(for endpoint: Endpoint, closure: RequestResultClosure) { - do { - let urlRequest = try endpoint.urlRequest() - closure(.success(urlRequest)) - } catch MoyaError.requestMapping(let url) { - closure(.failure(MoyaError.requestMapping(url))) - } catch MoyaError.parameterEncoding(let error) { - closure(.failure(MoyaError.parameterEncoding(error))) - } catch { - closure(.failure(MoyaError.underlying(error, nil))) - } - } - - final class func defaultAlamofireSession() -> Session { - let configuration = URLSessionConfiguration.default - configuration.headers = .default - - return Session(configuration: configuration, startRequestsImmediately: false) - } -} diff --git a/Example/Pods/Moya/Sources/Moya/MoyaProvider+Internal.swift b/Example/Pods/Moya/Sources/Moya/MoyaProvider+Internal.swift deleted file mode 100644 index 5493bce..0000000 --- a/Example/Pods/Moya/Sources/Moya/MoyaProvider+Internal.swift +++ /dev/null @@ -1,283 +0,0 @@ -import Foundation - -// MARK: - Method - -public extension Method { - /// A Boolean value determining whether the request supports multipart. - var supportsMultipart: Bool { - switch self { - case .post, .put, .patch, .connect: - return true - default: - return false - } - } -} - -// MARK: - MoyaProvider - -/// Internal extension to keep the inner-workings outside the main Moya.swift file. -public extension MoyaProvider { - /// Performs normal requests. - func requestNormal(_ target: Target, callbackQueue: DispatchQueue?, progress: Moya.ProgressBlock?, completion: @escaping Moya.Completion) -> Cancellable { - let endpoint = self.endpoint(target) - let stubBehavior = self.stubClosure(target) - let cancellableToken = CancellableWrapper() - - // Allow plugins to modify response - let pluginsWithCompletion: Moya.Completion = { result in - let processedResult = self.plugins.reduce(result) { $1.process($0, target: target) } - completion(processedResult) - } - - if trackInflights { - objc_sync_enter(self) - var inflightCompletionBlocks = self.inflightRequests[endpoint] - inflightCompletionBlocks?.append(pluginsWithCompletion) - self.inflightRequests[endpoint] = inflightCompletionBlocks - objc_sync_exit(self) - - if inflightCompletionBlocks != nil { - return cancellableToken - } else { - objc_sync_enter(self) - self.inflightRequests[endpoint] = [pluginsWithCompletion] - objc_sync_exit(self) - } - } - - let performNetworking = { (requestResult: Result) in - if cancellableToken.isCancelled { - self.cancelCompletion(pluginsWithCompletion, target: target) - return - } - - var request: URLRequest! - - switch requestResult { - case .success(let urlRequest): - request = urlRequest - case .failure(let error): - pluginsWithCompletion(.failure(error)) - return - } - - let networkCompletion: Moya.Completion = { result in - if self.trackInflights { - self.inflightRequests[endpoint]?.forEach { $0(result) } - - objc_sync_enter(self) - self.inflightRequests.removeValue(forKey: endpoint) - objc_sync_exit(self) - } else { - pluginsWithCompletion(result) - } - } - - cancellableToken.innerCancellable = self.performRequest(target, request: request, callbackQueue: callbackQueue, progress: progress, completion: networkCompletion, endpoint: endpoint, stubBehavior: stubBehavior) - } - - requestClosure(endpoint, performNetworking) - - return cancellableToken - } - - // swiftlint:disable:next function_parameter_count - private func performRequest(_ target: Target, request: URLRequest, callbackQueue: DispatchQueue?, progress: Moya.ProgressBlock?, completion: @escaping Moya.Completion, endpoint: Endpoint, stubBehavior: Moya.StubBehavior) -> Cancellable { - switch stubBehavior { - case .never: - switch endpoint.task { - case .requestPlain, .requestData, .requestJSONEncodable, .requestCustomJSONEncodable, .requestParameters, .requestCompositeData, .requestCompositeParameters: - return self.sendRequest(target, request: request, callbackQueue: callbackQueue, progress: progress, completion: completion) - case .uploadFile(let file): - return self.sendUploadFile(target, request: request, callbackQueue: callbackQueue, file: file, progress: progress, completion: completion) - case .uploadMultipart(let multipartBody), .uploadCompositeMultipart(let multipartBody, _): - guard !multipartBody.isEmpty && endpoint.method.supportsMultipart else { - fatalError("\(target) is not a multipart upload target.") - } - return self.sendUploadMultipart(target, request: request, callbackQueue: callbackQueue, multipartBody: multipartBody, progress: progress, completion: completion) - case .downloadDestination(let destination), .downloadParameters(_, _, let destination): - return self.sendDownloadRequest(target, request: request, callbackQueue: callbackQueue, destination: destination, progress: progress, completion: completion) - } - default: - return self.stubRequest(target, request: request, callbackQueue: callbackQueue, completion: completion, endpoint: endpoint, stubBehavior: stubBehavior) - } - } - - func cancelCompletion(_ completion: Moya.Completion, target: Target) { - let error = MoyaError.underlying(NSError(domain: NSURLErrorDomain, code: NSURLErrorCancelled, userInfo: nil), nil) - plugins.forEach { $0.didReceive(.failure(error), target: target) } - completion(.failure(error)) - } - - /// Creates a function which, when called, executes the appropriate stubbing behavior for the given parameters. - final func createStubFunction(_ token: CancellableToken, forTarget target: Target, withCompletion completion: @escaping Moya.Completion, endpoint: Endpoint, plugins: [PluginType], request: URLRequest) -> (() -> Void) { // swiftlint:disable:this function_parameter_count - return { - if token.isCancelled { - self.cancelCompletion(completion, target: target) - return - } - - let validate = { (response: Moya.Response) -> Result in - let validCodes = target.validationType.statusCodes - guard !validCodes.isEmpty else { return .success(response) } - if validCodes.contains(response.statusCode) { - return .success(response) - } else { - let statusError = MoyaError.statusCode(response) - let error = MoyaError.underlying(statusError, response) - return .failure(error) - } - } - - switch endpoint.sampleResponseClosure() { - case .networkResponse(let statusCode, let data): - let response = Moya.Response(statusCode: statusCode, data: data, request: request, response: nil) - let result = validate(response) - plugins.forEach { $0.didReceive(result, target: target) } - completion(result) - case .response(let customResponse, let data): - let response = Moya.Response(statusCode: customResponse.statusCode, data: data, request: request, response: customResponse) - let result = validate(response) - plugins.forEach { $0.didReceive(result, target: target) } - completion(result) - case .networkError(let error): - let error = MoyaError.underlying(error, nil) - plugins.forEach { $0.didReceive(.failure(error), target: target) } - completion(.failure(error)) - } - } - } - - /// Notify all plugins that a stub is about to be performed. You must call this if overriding `stubRequest`. - final func notifyPluginsOfImpendingStub(for request: URLRequest, target: Target) { - let alamoRequest = session.request(request) - let preparedRequest = plugins.reduce(request) { $1.prepare($0, target: target) } - - let stubbedAlamoRequest = RequestTypeWrapper(request: alamoRequest, urlRequest: preparedRequest) - plugins.forEach { $0.willSend(stubbedAlamoRequest, target: target) } - } -} - -private extension MoyaProvider { - private func interceptor(target: Target) -> MoyaRequestInterceptor { - return MoyaRequestInterceptor(prepare: { [weak self] urlRequest in - return self?.plugins.reduce(urlRequest) { $1.prepare($0, target: target) } ?? urlRequest - }) - } - - private func setup(interceptor: MoyaRequestInterceptor, with target: Target, and request: Request) { - interceptor.willSend = { [weak self, weak request] urlRequest in - guard let self = self, let request = request else { return } - - let stubbedAlamoRequest = RequestTypeWrapper(request: request, urlRequest: urlRequest) - self.plugins.forEach { $0.willSend(stubbedAlamoRequest, target: target) } - } - } - - func sendUploadMultipart(_ target: Target, request: URLRequest, callbackQueue: DispatchQueue?, multipartBody: [MultipartFormData], progress: Moya.ProgressBlock? = nil, completion: @escaping Moya.Completion) -> CancellableToken { - let formData = RequestMultipartFormData() - formData.applyMoyaMultipartFormData(multipartBody) - - let interceptor = self.interceptor(target: target) - let request = session.upload(multipartFormData: formData, with: request, interceptor: interceptor) - setup(interceptor: interceptor, with: target, and: request) - - let validationCodes = target.validationType.statusCodes - let validatedRequest = validationCodes.isEmpty ? request : request.validate(statusCode: validationCodes) - return sendAlamofireRequest(validatedRequest, target: target, callbackQueue: callbackQueue, progress: progress, completion: completion) - } - - func sendUploadFile(_ target: Target, request: URLRequest, callbackQueue: DispatchQueue?, file: URL, progress: ProgressBlock? = nil, completion: @escaping Completion) -> CancellableToken { - let interceptor = self.interceptor(target: target) - let uploadRequest = session.upload(file, with: request, interceptor: interceptor) - setup(interceptor: interceptor, with: target, and: uploadRequest) - - let validationCodes = target.validationType.statusCodes - let alamoRequest = validationCodes.isEmpty ? uploadRequest : uploadRequest.validate(statusCode: validationCodes) - return sendAlamofireRequest(alamoRequest, target: target, callbackQueue: callbackQueue, progress: progress, completion: completion) - } - - func sendDownloadRequest(_ target: Target, request: URLRequest, callbackQueue: DispatchQueue?, destination: @escaping DownloadDestination, progress: ProgressBlock? = nil, completion: @escaping Completion) -> CancellableToken { - let interceptor = self.interceptor(target: target) - let downloadRequest = session.download(request, interceptor: interceptor, to: destination) - setup(interceptor: interceptor, with: target, and: downloadRequest) - - let validationCodes = target.validationType.statusCodes - let alamoRequest = validationCodes.isEmpty ? downloadRequest : downloadRequest.validate(statusCode: validationCodes) - return sendAlamofireRequest(alamoRequest, target: target, callbackQueue: callbackQueue, progress: progress, completion: completion) - } - - func sendRequest(_ target: Target, request: URLRequest, callbackQueue: DispatchQueue?, progress: Moya.ProgressBlock?, completion: @escaping Moya.Completion) -> CancellableToken { - let interceptor = self.interceptor(target: target) - let initialRequest = session.request(request, interceptor: interceptor) - setup(interceptor: interceptor, with: target, and: initialRequest) - - let validationCodes = target.validationType.statusCodes - let alamoRequest = validationCodes.isEmpty ? initialRequest : initialRequest.validate(statusCode: validationCodes) - return sendAlamofireRequest(alamoRequest, target: target, callbackQueue: callbackQueue, progress: progress, completion: completion) - } - - // swiftlint:disable:next cyclomatic_complexity - func sendAlamofireRequest(_ alamoRequest: T, target: Target, callbackQueue: DispatchQueue?, progress progressCompletion: Moya.ProgressBlock?, completion: @escaping Moya.Completion) -> CancellableToken where T: Requestable, T: Request { - // Give plugins the chance to alter the outgoing request - let plugins = self.plugins - var progressAlamoRequest = alamoRequest - let progressClosure: (Progress) -> Void = { progress in - let sendProgress: () -> Void = { - progressCompletion?(ProgressResponse(progress: progress)) - } - - if let callbackQueue = callbackQueue { - callbackQueue.async(execute: sendProgress) - } else { - sendProgress() - } - } - - // Perform the actual request - if progressCompletion != nil { - switch progressAlamoRequest { - case let downloadRequest as DownloadRequest: - if let downloadRequest = downloadRequest.downloadProgress(closure: progressClosure) as? T { - progressAlamoRequest = downloadRequest - } - case let uploadRequest as UploadRequest: - if let uploadRequest = uploadRequest.uploadProgress(closure: progressClosure) as? T { - progressAlamoRequest = uploadRequest - } - case let dataRequest as DataRequest: - if let dataRequest = dataRequest.downloadProgress(closure: progressClosure) as? T { - progressAlamoRequest = dataRequest - } - default: break - } - } - - let completionHandler: RequestableCompletion = { response, request, data, error in - let result = convertResponseToResult(response, request: request, data: data, error: error) - // Inform all plugins about the response - plugins.forEach { $0.didReceive(result, target: target) } - if let progressCompletion = progressCompletion { - let value = try? result.get() - switch progressAlamoRequest { - case let downloadRequest as DownloadRequest: - progressCompletion(ProgressResponse(progress: downloadRequest.downloadProgress, response: value)) - case let uploadRequest as UploadRequest: - progressCompletion(ProgressResponse(progress: uploadRequest.uploadProgress, response: value)) - case let dataRequest as DataRequest: - progressCompletion(ProgressResponse(progress: dataRequest.downloadProgress, response: value)) - default: - progressCompletion(ProgressResponse(response: value)) - } - } - completion(result) - } - - progressAlamoRequest = progressAlamoRequest.response(callbackQueue: callbackQueue, completionHandler: completionHandler) - - progressAlamoRequest.resume() - - return CancellableToken(request: progressAlamoRequest) - } -} diff --git a/Example/Pods/Moya/Sources/Moya/MoyaProvider.swift b/Example/Pods/Moya/Sources/Moya/MoyaProvider.swift deleted file mode 100755 index 2fa8c96..0000000 --- a/Example/Pods/Moya/Sources/Moya/MoyaProvider.swift +++ /dev/null @@ -1,212 +0,0 @@ -import Foundation - -/// Closure to be executed when a request has completed. -public typealias Completion = (_ result: Result) -> Void - -/// Closure to be executed when progress changes. -public typealias ProgressBlock = (_ progress: ProgressResponse) -> Void - -/// A type representing the progress of a request. -public struct ProgressResponse { - - /// The optional response of the request. - public let response: Response? - - /// An object that conveys ongoing progress for a given request. - public let progressObject: Progress? - - /// Initializes a `ProgressResponse`. - public init(progress: Progress? = nil, response: Response? = nil) { - self.progressObject = progress - self.response = response - } - - /// The fraction of the overall work completed by the progress object. - public var progress: Double { - if completed { - return 1.0 - } else if let progressObject = progressObject, progressObject.totalUnitCount > 0 { - // if the Content-Length is specified we can rely on `fractionCompleted` - return progressObject.fractionCompleted - } else { - // if the Content-Length is not specified, return progress 0.0 until it's completed - return 0.0 - } - } - - /// A Boolean value stating whether the request is completed. - public var completed: Bool { - return response != nil - } -} - -/// A protocol representing a minimal interface for a MoyaProvider. -/// Used by the reactive provider extensions. -public protocol MoyaProviderType: AnyObject { - - associatedtype Target: TargetType - - /// Designated request-making method. Returns a `Cancellable` token to cancel the request later. - func request(_ target: Target, callbackQueue: DispatchQueue?, progress: Moya.ProgressBlock?, completion: @escaping Moya.Completion) -> Cancellable -} - -/// Request provider class. Requests should be made through this class only. -open class MoyaProvider: MoyaProviderType { - - /// Closure that defines the endpoints for the provider. - public typealias EndpointClosure = (Target) -> Endpoint - - /// Closure that decides if and what request should be performed. - public typealias RequestResultClosure = (Result) -> Void - - /// Closure that resolves an `Endpoint` into a `RequestResult`. - public typealias RequestClosure = (Endpoint, @escaping RequestResultClosure) -> Void - - /// Closure that decides if/how a request should be stubbed. - public typealias StubClosure = (Target) -> Moya.StubBehavior - - /// A closure responsible for mapping a `TargetType` to an `EndPoint`. - public let endpointClosure: EndpointClosure - - /// A closure deciding if and what request should be performed. - public let requestClosure: RequestClosure - - /// A closure responsible for determining the stubbing behavior - /// of a request for a given `TargetType`. - public let stubClosure: StubClosure - - public let session: Session - - /// A list of plugins. - /// e.g. for logging, network activity indicator or credentials. - public let plugins: [PluginType] - - public let trackInflights: Bool - - open internal(set) var inflightRequests: [Endpoint: [Moya.Completion]] = [:] - - /// Propagated to Alamofire as callback queue. If nil - the Alamofire default (as of their API in 2017 - the main queue) will be used. - let callbackQueue: DispatchQueue? - - /// Initializes a provider. - public init(endpointClosure: @escaping EndpointClosure = MoyaProvider.defaultEndpointMapping, - requestClosure: @escaping RequestClosure = MoyaProvider.defaultRequestMapping, - stubClosure: @escaping StubClosure = MoyaProvider.neverStub, - callbackQueue: DispatchQueue? = nil, - session: Session = MoyaProvider.defaultAlamofireSession(), - plugins: [PluginType] = [], - trackInflights: Bool = false) { - - self.endpointClosure = endpointClosure - self.requestClosure = requestClosure - self.stubClosure = stubClosure - self.session = session - self.plugins = plugins - self.trackInflights = trackInflights - self.callbackQueue = callbackQueue - } - - /// Returns an `Endpoint` based on the token, method, and parameters by invoking the `endpointClosure`. - open func endpoint(_ token: Target) -> Endpoint { - return endpointClosure(token) - } - - /// Designated request-making method. Returns a `Cancellable` token to cancel the request later. - @discardableResult - open func request(_ target: Target, - callbackQueue: DispatchQueue? = .none, - progress: ProgressBlock? = .none, - completion: @escaping Completion) -> Cancellable { - - let callbackQueue = callbackQueue ?? self.callbackQueue - return requestNormal(target, callbackQueue: callbackQueue, progress: progress, completion: completion) - } - - // swiftlint:disable function_parameter_count - /// When overriding this method, take care to `notifyPluginsOfImpendingStub` and to perform the stub using the `createStubFunction` method. - /// Note: this was previously in an extension, however it must be in the original class declaration to allow subclasses to override. - @discardableResult - open func stubRequest(_ target: Target, request: URLRequest, callbackQueue: DispatchQueue?, completion: @escaping Moya.Completion, endpoint: Endpoint, stubBehavior: Moya.StubBehavior) -> CancellableToken { - let callbackQueue = callbackQueue ?? self.callbackQueue - let cancellableToken = CancellableToken { } - notifyPluginsOfImpendingStub(for: request, target: target) - let plugins = self.plugins - let stub: () -> Void = createStubFunction(cancellableToken, forTarget: target, withCompletion: completion, endpoint: endpoint, plugins: plugins, request: request) - switch stubBehavior { - case .immediate: - switch callbackQueue { - case .none: - stub() - case .some(let callbackQueue): - callbackQueue.async(execute: stub) - } - case .delayed(let delay): - let killTimeOffset = Int64(CDouble(delay) * CDouble(NSEC_PER_SEC)) - let killTime = DispatchTime.now() + Double(killTimeOffset) / Double(NSEC_PER_SEC) - (callbackQueue ?? DispatchQueue.main).asyncAfter(deadline: killTime) { - stub() - } - case .never: - fatalError("Method called to stub request when stubbing is disabled.") - } - - return cancellableToken - } - // swiftlint:enable function_parameter_count -} - -/// Mark: Stubbing - -/// Controls how stub responses are returned. -public enum StubBehavior { - - /// Do not stub. - case never - - /// Return a response immediately. - case immediate - - /// Return a response after a delay. - case delayed(seconds: TimeInterval) -} - -public extension MoyaProvider { - - // Swift won't let us put the StubBehavior enum inside the provider class, so we'll - // at least add some class functions to allow easy access to common stubbing closures. - - /// Do not stub. - final class func neverStub(_: Target) -> Moya.StubBehavior { - return .never - } - - /// Return a response immediately. - final class func immediatelyStub(_: Target) -> Moya.StubBehavior { - return .immediate - } - - /// Return a response after a delay. - final class func delayedStub(_ seconds: TimeInterval) -> (Target) -> Moya.StubBehavior { - return { _ in return .delayed(seconds: seconds) } - } -} - -/// A public function responsible for converting the result of a `URLRequest` to a Result. -public func convertResponseToResult(_ response: HTTPURLResponse?, request: URLRequest?, data: Data?, error: Swift.Error?) -> - Result { - switch (response, data, error) { - case let (.some(response), data, .none): - let response = Moya.Response(statusCode: response.statusCode, data: data ?? Data(), request: request, response: response) - return .success(response) - case let (.some(response), _, .some(error)): - let response = Moya.Response(statusCode: response.statusCode, data: data ?? Data(), request: request, response: response) - let error = MoyaError.underlying(error, response) - return .failure(error) - case let (_, _, .some(error)): - let error = MoyaError.underlying(error, nil) - return .failure(error) - default: - let error = MoyaError.underlying(NSError(domain: NSURLErrorDomain, code: NSURLErrorUnknown, userInfo: nil), nil) - return .failure(error) - } -} diff --git a/Example/Pods/Moya/Sources/Moya/MultiTarget.swift b/Example/Pods/Moya/Sources/Moya/MultiTarget.swift deleted file mode 100644 index 7b813e4..0000000 --- a/Example/Pods/Moya/Sources/Moya/MultiTarget.swift +++ /dev/null @@ -1,54 +0,0 @@ -import Foundation - -/// A `TargetType` used to enable `MoyaProvider` to process multiple `TargetType`s. -public enum MultiTarget: TargetType { - /// The embedded `TargetType`. - case target(TargetType) - - /// Initializes a `MultiTarget`. - public init(_ target: TargetType) { - self = MultiTarget.target(target) - } - - /// The embedded target's base `URL`. - public var path: String { - return target.path - } - - /// The baseURL of the embedded target. - public var baseURL: URL { - return target.baseURL - } - - /// The HTTP method of the embedded target. - public var method: Moya.Method { - return target.method - } - - /// The sampleData of the embedded target. - public var sampleData: Data { - return target.sampleData - } - - /// The `Task` of the embedded target. - public var task: Task { - return target.task - } - - /// The `ValidationType` of the embedded target. - public var validationType: ValidationType { - return target.validationType - } - - /// The headers of the embedded target. - public var headers: [String: String]? { - return target.headers - } - - /// The embedded `TargetType`. - public var target: TargetType { - switch self { - case .target(let target): return target - } - } -} diff --git a/Example/Pods/Moya/Sources/Moya/MultipartFormData.swift b/Example/Pods/Moya/Sources/Moya/MultipartFormData.swift deleted file mode 100644 index 418cae2..0000000 --- a/Example/Pods/Moya/Sources/Moya/MultipartFormData.swift +++ /dev/null @@ -1,73 +0,0 @@ -import Foundation -import Alamofire - -/// Represents "multipart/form-data" for an upload. -public struct MultipartFormData { - - /// Method to provide the form data. - public enum FormDataProvider { - case data(Foundation.Data) - case file(URL) - case stream(InputStream, UInt64) - } - - public init(provider: FormDataProvider, name: String, fileName: String? = nil, mimeType: String? = nil) { - self.provider = provider - self.name = name - self.fileName = fileName - self.mimeType = mimeType - } - - /// The method being used for providing form data. - public let provider: FormDataProvider - - /// The name. - public let name: String - - /// The file name. - public let fileName: String? - - /// The MIME type - public let mimeType: String? - -} - -// MARK: RequestMultipartFormData appending -internal extension RequestMultipartFormData { - func append(data: Data, bodyPart: MultipartFormData) { - if let mimeType = bodyPart.mimeType { - if let fileName = bodyPart.fileName { - append(data, withName: bodyPart.name, fileName: fileName, mimeType: mimeType) - } else { - append(data, withName: bodyPart.name, mimeType: mimeType) - } - } else { - append(data, withName: bodyPart.name) - } - } - - func append(fileURL url: URL, bodyPart: MultipartFormData) { - if let fileName = bodyPart.fileName, let mimeType = bodyPart.mimeType { - append(url, withName: bodyPart.name, fileName: fileName, mimeType: mimeType) - } else { - append(url, withName: bodyPart.name) - } - } - - func append(stream: InputStream, length: UInt64, bodyPart: MultipartFormData) { - append(stream, withLength: length, name: bodyPart.name, fileName: bodyPart.fileName ?? "", mimeType: bodyPart.mimeType ?? "") - } - - func applyMoyaMultipartFormData(_ multipartBody: [Moya.MultipartFormData]) { - for bodyPart in multipartBody { - switch bodyPart.provider { - case .data(let data): - append(data: data, bodyPart: bodyPart) - case .file(let url): - append(fileURL: url, bodyPart: bodyPart) - case .stream(let stream, let length): - append(stream: stream, length: length, bodyPart: bodyPart) - } - } - } -} diff --git a/Example/Pods/Moya/Sources/Moya/Plugin.swift b/Example/Pods/Moya/Sources/Moya/Plugin.swift deleted file mode 100644 index 47943f7..0000000 --- a/Example/Pods/Moya/Sources/Moya/Plugin.swift +++ /dev/null @@ -1,49 +0,0 @@ -import Foundation - -/// A Moya Plugin receives callbacks to perform side effects wherever a request is sent or received. -/// -/// for example, a plugin may be used to -/// - log network requests -/// - hide and show a network activity indicator -/// - inject additional information into a request -public protocol PluginType { - /// Called to modify a request before sending. - func prepare(_ request: URLRequest, target: TargetType) -> URLRequest - - /// Called immediately before a request is sent over the network (or stubbed). - func willSend(_ request: RequestType, target: TargetType) - - /// Called after a response has been received, but before the MoyaProvider has invoked its completion handler. - func didReceive(_ result: Result, target: TargetType) - - /// Called to modify a result before completion. - func process(_ result: Result, target: TargetType) -> Result -} - -public extension PluginType { - func prepare(_ request: URLRequest, target: TargetType) -> URLRequest { return request } - func willSend(_ request: RequestType, target: TargetType) { } - func didReceive(_ result: Result, target: TargetType) { } - func process(_ result: Result, target: TargetType) -> Result { return result } -} - -/// Request type used by `willSend` plugin function. -public protocol RequestType { - - // Note: - // - // We use this protocol instead of the Alamofire request to avoid leaking that abstraction. - // A plugin should not know about Alamofire at all. - - /// Retrieve an `NSURLRequest` representation. - var request: URLRequest? { get } - - /// Additional headers appended to the request when added to the session. - var sessionHeaders: [String: String] { get } - - /// Authenticates the request with a username and password. - func authenticate(username: String, password: String, persistence: URLCredential.Persistence) -> Self - - /// Authenticates the request with an `NSURLCredential` instance. - func authenticate(with credential: URLCredential) -> Self -} diff --git a/Example/Pods/Moya/Sources/Moya/Plugins/AccessTokenPlugin.swift b/Example/Pods/Moya/Sources/Moya/Plugins/AccessTokenPlugin.swift deleted file mode 100644 index 1929fac..0000000 --- a/Example/Pods/Moya/Sources/Moya/Plugins/AccessTokenPlugin.swift +++ /dev/null @@ -1,92 +0,0 @@ -import Foundation - -// MARK: - AccessTokenAuthorizable - -/// A protocol for controlling the behavior of `AccessTokenPlugin`. -public protocol AccessTokenAuthorizable { - - /// Represents the authorization header to use for requests. - var authorizationType: AuthorizationType { get } -} - -// MARK: - AuthorizationType - -/// An enum representing the header to use with an `AccessTokenPlugin` -public enum AuthorizationType { - /// No header. - case none - - /// The `"Basic"` header. - case basic - - /// The `"Bearer"` header. - case bearer - - /// Custom header implementation. - case custom(String) - - public var value: String? { - switch self { - case .none: return nil - case .basic: return "Basic" - case .bearer: return "Bearer" - case .custom(let customValue): return customValue - } - } -} - -// MARK: - AccessTokenPlugin - -/** - A plugin for adding basic or bearer-type authorization headers to requests. Example: - - ``` - Authorization: Basic - Authorization: Bearer - Authorization: <Сustom> - ``` - -*/ -public struct AccessTokenPlugin: PluginType { - - /// A closure returning the access token to be applied in the header. - public let tokenClosure: () -> String - - /** - Initialize a new `AccessTokenPlugin`. - - - parameters: - - tokenClosure: A closure returning the token to be applied in the pattern `Authorization: ` - */ - public init(tokenClosure: @escaping () -> String) { - self.tokenClosure = tokenClosure - } - - /** - Prepare a request by adding an authorization header if necessary. - - - parameters: - - request: The request to modify. - - target: The target of the request. - - returns: The modified `URLRequest`. - */ - public func prepare(_ request: URLRequest, target: TargetType) -> URLRequest { - - guard let authorizable = target as? AccessTokenAuthorizable else { return request } - - let authorizationType = authorizable.authorizationType - var request = request - - switch authorizationType { - case .basic, .bearer, .custom: - if let value = authorizationType.value { - let authValue = value + " " + tokenClosure() - request.addValue(authValue, forHTTPHeaderField: "Authorization") - } - case .none: - break - } - - return request - } -} diff --git a/Example/Pods/Moya/Sources/Moya/Plugins/CredentialsPlugin.swift b/Example/Pods/Moya/Sources/Moya/Plugins/CredentialsPlugin.swift deleted file mode 100644 index 88e1015..0000000 --- a/Example/Pods/Moya/Sources/Moya/Plugins/CredentialsPlugin.swift +++ /dev/null @@ -1,21 +0,0 @@ -import Foundation - -/// Provides each request with optional URLCredentials. -public final class CredentialsPlugin: PluginType { - - public typealias CredentialClosure = (TargetType) -> URLCredential? - let credentialsClosure: CredentialClosure - - /// Initializes a CredentialsPlugin. - public init(credentialsClosure: @escaping CredentialClosure) { - self.credentialsClosure = credentialsClosure - } - - // MARK: Plugin - - public func willSend(_ request: RequestType, target: TargetType) { - if let credentials = credentialsClosure(target) { - _ = request.authenticate(with: credentials) - } - } -} diff --git a/Example/Pods/Moya/Sources/Moya/Plugins/NetworkActivityPlugin.swift b/Example/Pods/Moya/Sources/Moya/Plugins/NetworkActivityPlugin.swift deleted file mode 100644 index 988e90f..0000000 --- a/Example/Pods/Moya/Sources/Moya/Plugins/NetworkActivityPlugin.swift +++ /dev/null @@ -1,30 +0,0 @@ -import Foundation - -/// Network activity change notification type. -public enum NetworkActivityChangeType { - case began, ended -} - -/// Notify a request's network activity changes (request begins or ends). -public final class NetworkActivityPlugin: PluginType { - - public typealias NetworkActivityClosure = (_ change: NetworkActivityChangeType, _ target: TargetType) -> Void - let networkActivityClosure: NetworkActivityClosure - - /// Initializes a NetworkActivityPlugin. - public init(networkActivityClosure: @escaping NetworkActivityClosure) { - self.networkActivityClosure = networkActivityClosure - } - - // MARK: Plugin - - /// Called by the provider as soon as the request is about to start - public func willSend(_ request: RequestType, target: TargetType) { - networkActivityClosure(.began, target) - } - - /// Called by the provider as soon as a response arrives, even if the request is canceled. - public func didReceive(_ result: Result, target: TargetType) { - networkActivityClosure(.ended, target) - } -} diff --git a/Example/Pods/Moya/Sources/Moya/Plugins/NetworkLoggerPlugin.swift b/Example/Pods/Moya/Sources/Moya/Plugins/NetworkLoggerPlugin.swift deleted file mode 100644 index 7b937e4..0000000 --- a/Example/Pods/Moya/Sources/Moya/Plugins/NetworkLoggerPlugin.swift +++ /dev/null @@ -1,232 +0,0 @@ -import Foundation - -/// Logs network activity (outgoing requests and incoming responses). -public final class NetworkLoggerPlugin { - - public var configuration: Configuration - - /// Initializes a NetworkLoggerPlugin. - public init(configuration: Configuration = Configuration()) { - self.configuration = configuration - } -} - -// MARK: - PluginType -extension NetworkLoggerPlugin: PluginType { - public func willSend(_ request: RequestType, target: TargetType) { - configuration.output(target, logNetworkRequest(request, target: target)) - } - - public func didReceive(_ result: Result, target: TargetType) { - switch result { - case .success(let response): - configuration.output(target, logNetworkResponse(response, target: target, isFromError: false)) - case let .failure(error): - configuration.output(target, logNetworkError(error, target: target)) - } - } -} - -// MARK: - Logging -private extension NetworkLoggerPlugin { - - func logNetworkRequest(_ request: RequestType, target: TargetType) -> [String] { - - //cURL formatting - if configuration.logOptions.contains(.formatRequestAscURL), - let request = request as? CustomDebugStringConvertible { - return [configuration.formatter.entry("Request", request.debugDescription, target)] - } - - //Request presence check - guard let httpRequest = request.request else { - return [configuration.formatter.entry("Request", "(invalid request)", target)] - } - - // Adding log entries for each given log option - var output = [String]() - - output.append(configuration.formatter.entry("Request", httpRequest.description, target)) - - if configuration.logOptions.contains(.requestHeaders) { - var allHeaders = request.sessionHeaders - if let httpRequestHeaders = httpRequest.allHTTPHeaderFields { - allHeaders.merge(httpRequestHeaders) { $1 } - } - output.append(configuration.formatter.entry("Request Headers", allHeaders.description, target)) - } - - if configuration.logOptions.contains(.requestBody) { - if let bodyStream = httpRequest.httpBodyStream { - output.append(configuration.formatter.entry("Request Body Stream", bodyStream.description, target)) - } - - if let body = httpRequest.httpBody { - let stringOutput = configuration.formatter.requestData(body) - output.append(configuration.formatter.entry("Request Body", stringOutput, target)) - } - } - - if configuration.logOptions.contains(.requestMethod), - let httpMethod = httpRequest.httpMethod { - output.append(configuration.formatter.entry("HTTP Request Method", httpMethod, target)) - } - - return output - } - - func logNetworkResponse(_ response: Response, target: TargetType, isFromError: Bool) -> [String] { - - //Response presence check - guard let httpResponse = response.response else { - return [configuration.formatter.entry("Response", "Received empty network response for \(target).", target)] - } - - // Adding log entries for each given log option - var output = [String]() - - output.append(configuration.formatter.entry("Response", httpResponse.description, target)) - - if (isFromError && configuration.logOptions.contains(.errorResponseBody)) - || configuration.logOptions.contains(.successResponseBody) { - - let stringOutput = configuration.formatter.responseData(response.data) - output.append(configuration.formatter.entry("Response Body", stringOutput, target)) - } - - return output - } - - func logNetworkError(_ error: MoyaError, target: TargetType) -> [String] { - //Some errors will still have a response, like errors due to Alamofire's HTTP code validation. - if let moyaResponse = error.response { - return logNetworkResponse(moyaResponse, target: target, isFromError: true) - } - - //Errors without an HTTPURLResponse are those due to connectivity, time-out and such. - return [configuration.formatter.entry("Error", "Error calling \(target) : \(error)", target)] - } -} - -// MARK: - Configuration -public extension NetworkLoggerPlugin { - struct Configuration { - - // MARK: - Typealiases - // swiftlint:disable nesting - public typealias OutputType = (_ target: TargetType, _ items: [String]) -> Void - // swiftlint:enable nesting - - // MARK: - Properties - - public var formatter: Formatter - public var output: OutputType - public var logOptions: LogOptions - - /// The designated way to instanciate a Configuration. - /// - /// - Parameters: - /// - formatter: An object holding all formatter closures available for customization. - /// - output: A closure responsible for writing the given log entries into your log system. - /// The default value writes entries to the debug console. - /// - logOptions: A set of options you can use to customize which request component is logged. - public init(formatter: Formatter = Formatter(), - output: @escaping OutputType = defaultOutput, - logOptions: LogOptions = .default) { - self.formatter = formatter - self.output = output - self.logOptions = logOptions - } - - // MARK: - Defaults - - public static func defaultOutput(target: TargetType, items: [String]) { - for item in items { - print(item, separator: ",", terminator: "\n") - } - } - } -} - -public extension NetworkLoggerPlugin.Configuration { - struct LogOptions: OptionSet { - public let rawValue: Int - public init(rawValue: Int) { self.rawValue = rawValue } - - /// The request's method will be logged. - public static let requestMethod: LogOptions = LogOptions(rawValue: 1 << 0) - /// The request's body will be logged. - public static let requestBody: LogOptions = LogOptions(rawValue: 1 << 1) - /// The request's headers will be logged. - public static let requestHeaders: LogOptions = LogOptions(rawValue: 1 << 2) - /// The request will be logged in the cURL format. - /// - /// If this option is used, the following components will be logged regardless of their respective options being set: - /// - request's method - /// - request's headers - /// - request's body. - public static let formatRequestAscURL: LogOptions = LogOptions(rawValue: 1 << 3) - /// The body of a response that is a success will be logged. - public static let successResponseBody: LogOptions = LogOptions(rawValue: 1 << 4) - /// The body of a response that is an error will be logged. - public static let errorResponseBody: LogOptions = LogOptions(rawValue: 1 << 5) - - //Aggregate options - /// Only basic components will be logged. - public static let `default`: LogOptions = [requestMethod, requestHeaders] - /// All components will be logged. - public static let verbose: LogOptions = [requestMethod, requestHeaders, requestBody, - successResponseBody, errorResponseBody] - } -} - -public extension NetworkLoggerPlugin.Configuration { - struct Formatter { - - // MARK: Typealiases - // swiftlint:disable nesting - public typealias DataFormatterType = (Data) -> (String) - public typealias EntryFormatterType = (_ identifier: String, _ message: String, _ target: TargetType) -> String - // swiftlint:enable nesting - - // MARK: Properties - - public var entry: EntryFormatterType - public var requestData: DataFormatterType - public var responseData: DataFormatterType - - /// The designated way to instanciate a Formatter. - /// - /// - Parameters: - /// - entry: The closure formatting a message into a new log entry. - /// - requestData: The closure converting HTTP request's body into a String. - /// The default value assumes the body's data is an utf8 String. - /// - responseData: The closure converting HTTP response's body into a String. - /// The default value assumes the body's data is an utf8 String. - public init(entry: @escaping EntryFormatterType = defaultEntryFormatter, - requestData: @escaping DataFormatterType = defaultDataFormatter, - responseData: @escaping DataFormatterType = defaultDataFormatter) { - self.entry = entry - self.requestData = requestData - self.responseData = responseData - } - - // MARK: Defaults - - public static func defaultDataFormatter(_ data: Data) -> String { - return String(data: data, encoding: .utf8) ?? "## Cannot map data to String ##" - } - - public static func defaultEntryFormatter(identifier: String, message: String, target: TargetType) -> String { - let date = defaultEntryDateFormatter.string(from: Date()) - return "Moya_Logger: [\(date)] \(identifier): \(message)" - } - - static var defaultEntryDateFormatter: DateFormatter = { - let formatter = DateFormatter() - formatter.timeStyle = .short - formatter.dateStyle = .short - return formatter - }() - } -} diff --git a/Example/Pods/Moya/Sources/Moya/Response.swift b/Example/Pods/Moya/Sources/Moya/Response.swift deleted file mode 100644 index df338cc..0000000 --- a/Example/Pods/Moya/Sources/Moya/Response.swift +++ /dev/null @@ -1,192 +0,0 @@ -import Foundation - -/// Represents a response to a `MoyaProvider.request`. -public final class Response: CustomDebugStringConvertible, Equatable { - - /// The status code of the response. - public let statusCode: Int - - /// The response data. - public let data: Data - - /// The original URLRequest for the response. - public let request: URLRequest? - - /// The HTTPURLResponse object. - public let response: HTTPURLResponse? - - public init(statusCode: Int, data: Data, request: URLRequest? = nil, response: HTTPURLResponse? = nil) { - self.statusCode = statusCode - self.data = data - self.request = request - self.response = response - } - - /// A text description of the `Response`. - public var description: String { - return "Status Code: \(statusCode), Data Length: \(data.count)" - } - - /// A text description of the `Response`. Suitable for debugging. - public var debugDescription: String { - return description - } - - public static func == (lhs: Response, rhs: Response) -> Bool { - return lhs.statusCode == rhs.statusCode - && lhs.data == rhs.data - && lhs.response == rhs.response - } -} - -public extension Response { - - /** - Returns the `Response` if the `statusCode` falls within the specified range. - - - parameters: - - statusCodes: The range of acceptable status codes. - - throws: `MoyaError.statusCode` when others are encountered. - */ - func filter(statusCodes: R) throws -> Response where R.Bound == Int { - guard statusCodes.contains(statusCode) else { - throw MoyaError.statusCode(self) - } - return self - } - - /** - Returns the `Response` if it has the specified `statusCode`. - - - parameters: - - statusCode: The acceptable status code. - - throws: `MoyaError.statusCode` when others are encountered. - */ - func filter(statusCode: Int) throws -> Response { - return try filter(statusCodes: statusCode...statusCode) - } - - /** - Returns the `Response` if the `statusCode` falls within the range 200 - 299. - - - throws: `MoyaError.statusCode` when others are encountered. - */ - func filterSuccessfulStatusCodes() throws -> Response { - return try filter(statusCodes: 200...299) - } - - /** - Returns the `Response` if the `statusCode` falls within the range 200 - 399. - - - throws: `MoyaError.statusCode` when others are encountered. - */ - func filterSuccessfulStatusAndRedirectCodes() throws -> Response { - return try filter(statusCodes: 200...399) - } - - /// Maps data received from the signal into an Image. - func mapImage() throws -> Image { - guard let image = Image(data: data) else { - throw MoyaError.imageMapping(self) - } - return image - } - - /// Maps data received from the signal into a JSON object. - /// - /// - parameter failsOnEmptyData: A Boolean value determining - /// whether the mapping should fail if the data is empty. - func mapJSON(failsOnEmptyData: Bool = true) throws -> Any { - do { - return try JSONSerialization.jsonObject(with: data, options: .allowFragments) - } catch { - if data.count < 1 && !failsOnEmptyData { - return NSNull() - } - throw MoyaError.jsonMapping(self) - } - } - - /// Maps data received from the signal into a String. - /// - /// - parameter atKeyPath: Optional key path at which to parse string. - func mapString(atKeyPath keyPath: String? = nil) throws -> String { - if let keyPath = keyPath { - // Key path was provided, try to parse string at key path - guard let jsonDictionary = try mapJSON() as? NSDictionary, - let string = jsonDictionary.value(forKeyPath: keyPath) as? String else { - throw MoyaError.stringMapping(self) - } - return string - } else { - // Key path was not provided, parse entire response as string - guard let string = String(data: data, encoding: .utf8) else { - throw MoyaError.stringMapping(self) - } - return string - } - } - - /// Maps data received from the signal into a Decodable object. - /// - /// - parameter atKeyPath: Optional key path at which to parse object. - /// - parameter using: A `JSONDecoder` instance which is used to decode data to an object. - func map(_ type: D.Type, atKeyPath keyPath: String? = nil, using decoder: JSONDecoder = JSONDecoder(), failsOnEmptyData: Bool = true) throws -> D { - let serializeToData: (Any) throws -> Data? = { (jsonObject) in - guard JSONSerialization.isValidJSONObject(jsonObject) else { - return nil - } - do { - return try JSONSerialization.data(withJSONObject: jsonObject) - } catch { - throw MoyaError.jsonMapping(self) - } - } - let jsonData: Data - keyPathCheck: if let keyPath = keyPath { - guard let jsonObject = (try mapJSON(failsOnEmptyData: failsOnEmptyData) as? NSDictionary)?.value(forKeyPath: keyPath) else { - if failsOnEmptyData { - throw MoyaError.jsonMapping(self) - } else { - jsonData = data - break keyPathCheck - } - } - - if let data = try serializeToData(jsonObject) { - jsonData = data - } else { - let wrappedJsonObject = ["value": jsonObject] - let wrappedJsonData: Data - if let data = try serializeToData(wrappedJsonObject) { - wrappedJsonData = data - } else { - throw MoyaError.jsonMapping(self) - } - do { - return try decoder.decode(DecodableWrapper.self, from: wrappedJsonData).value - } catch let error { - throw MoyaError.objectMapping(error, self) - } - } - } else { - jsonData = data - } - do { - if jsonData.count < 1 && !failsOnEmptyData { - if let emptyJSONObjectData = "{}".data(using: .utf8), let emptyDecodableValue = try? decoder.decode(D.self, from: emptyJSONObjectData) { - return emptyDecodableValue - } else if let emptyJSONArrayData = "[{}]".data(using: .utf8), let emptyDecodableValue = try? decoder.decode(D.self, from: emptyJSONArrayData) { - return emptyDecodableValue - } - } - return try decoder.decode(D.self, from: jsonData) - } catch let error { - throw MoyaError.objectMapping(error, self) - } - } -} - -private struct DecodableWrapper: Decodable { - let value: T -} diff --git a/Example/Pods/Moya/Sources/Moya/TargetType.swift b/Example/Pods/Moya/Sources/Moya/TargetType.swift deleted file mode 100644 index d247491..0000000 --- a/Example/Pods/Moya/Sources/Moya/TargetType.swift +++ /dev/null @@ -1,34 +0,0 @@ -import Foundation - -/// The protocol used to define the specifications necessary for a `MoyaProvider`. -public protocol TargetType { - - /// The target's base `URL`. - var baseURL: URL { get } - - /// The path to be appended to `baseURL` to form the full `URL`. - var path: String { get } - - /// The HTTP method used in the request. - var method: Moya.Method { get } - - /// Provides stub data for use in testing. - var sampleData: Data { get } - - /// The type of HTTP task to be performed. - var task: Task { get } - - /// The type of validation to perform on the request. Default is `.none`. - var validationType: ValidationType { get } - - /// The headers to be used in the request. - var headers: [String: String]? { get } -} - -public extension TargetType { - - /// The type of validation to perform on the request. Default is `.none`. - var validationType: ValidationType { - return .none - } -} diff --git a/Example/Pods/Moya/Sources/Moya/Task.swift b/Example/Pods/Moya/Sources/Moya/Task.swift deleted file mode 100644 index 191e259..0000000 --- a/Example/Pods/Moya/Sources/Moya/Task.swift +++ /dev/null @@ -1,41 +0,0 @@ -import Foundation - -/// Represents an HTTP task. -public enum Task { - - /// A request with no additional data. - case requestPlain - - /// A requests body set with data. - case requestData(Data) - - /// A request body set with `Encodable` type - case requestJSONEncodable(Encodable) - - /// A request body set with `Encodable` type and custom encoder - case requestCustomJSONEncodable(Encodable, encoder: JSONEncoder) - - /// A requests body set with encoded parameters. - case requestParameters(parameters: [String: Any], encoding: ParameterEncoding) - - /// A requests body set with data, combined with url parameters. - case requestCompositeData(bodyData: Data, urlParameters: [String: Any]) - - /// A requests body set with encoded parameters combined with url parameters. - case requestCompositeParameters(bodyParameters: [String: Any], bodyEncoding: ParameterEncoding, urlParameters: [String: Any]) - - /// A file upload task. - case uploadFile(URL) - - /// A "multipart/form-data" upload task. - case uploadMultipart([MultipartFormData]) - - /// A "multipart/form-data" upload task combined with url parameters. - case uploadCompositeMultipart([MultipartFormData], urlParameters: [String: Any]) - - /// A file download task to a destination. - case downloadDestination(DownloadDestination) - - /// A file download task to a destination with extra parameters using the given encoding. - case downloadParameters(parameters: [String: Any], encoding: ParameterEncoding, destination: DownloadDestination) -} diff --git a/Example/Pods/Moya/Sources/Moya/URL+Moya.swift b/Example/Pods/Moya/Sources/Moya/URL+Moya.swift deleted file mode 100644 index 9351fa4..0000000 --- a/Example/Pods/Moya/Sources/Moya/URL+Moya.swift +++ /dev/null @@ -1,16 +0,0 @@ -import Foundation - -public extension URL { - - /// Initialize URL from Moya's `TargetType`. - init(target: T) { - // When a TargetType's path is empty, URL.appendingPathComponent may introduce trailing /, which may not be wanted in some cases - // See: https://github.com/Moya/Moya/pull/1053 - // And: https://github.com/Moya/Moya/issues/1049 - if target.path.isEmpty { - self = target.baseURL - } else { - self = target.baseURL.appendingPathComponent(target.path) - } - } -} diff --git a/Example/Pods/Moya/Sources/Moya/URLRequest+Encoding.swift b/Example/Pods/Moya/Sources/Moya/URLRequest+Encoding.swift deleted file mode 100644 index 232d86d..0000000 --- a/Example/Pods/Moya/Sources/Moya/URLRequest+Encoding.swift +++ /dev/null @@ -1,28 +0,0 @@ -import Foundation - -internal extension URLRequest { - - mutating func encoded(encodable: Encodable, encoder: JSONEncoder = JSONEncoder()) throws -> URLRequest { - do { - let encodable = AnyEncodable(encodable) - httpBody = try encoder.encode(encodable) - - let contentTypeHeaderName = "Content-Type" - if value(forHTTPHeaderField: contentTypeHeaderName) == nil { - setValue("application/json", forHTTPHeaderField: contentTypeHeaderName) - } - - return self - } catch { - throw MoyaError.encodableMapping(error) - } - } - - func encoded(parameters: [String: Any], parameterEncoding: ParameterEncoding) throws -> URLRequest { - do { - return try parameterEncoding.encode(self, with: parameters) - } catch { - throw MoyaError.parameterEncoding(error) - } - } -} diff --git a/Example/Pods/Moya/Sources/Moya/ValidationType.swift b/Example/Pods/Moya/Sources/Moya/ValidationType.swift deleted file mode 100644 index ffc8d8f..0000000 --- a/Example/Pods/Moya/Sources/Moya/ValidationType.swift +++ /dev/null @@ -1,47 +0,0 @@ -import Foundation - -/// Represents the status codes to validate through Alamofire. -public enum ValidationType { - - /// No validation. - case none - - /// Validate success codes (only 2xx). - case successCodes - - /// Validate success codes and redirection codes (only 2xx and 3xx). - case successAndRedirectCodes - - /// Validate only the given status codes. - case customCodes([Int]) - - /// The list of HTTP status codes to validate. - var statusCodes: [Int] { - switch self { - case .successCodes: - return Array(200..<300) - case .successAndRedirectCodes: - return Array(200..<400) - case .customCodes(let codes): - return codes - case .none: - return [] - } - } -} - -extension ValidationType: Equatable { - - public static func == (lhs: ValidationType, rhs: ValidationType) -> Bool { - switch (lhs, rhs) { - case (.none, .none), - (.successCodes, .successCodes), - (.successAndRedirectCodes, .successAndRedirectCodes): - return true - case (.customCodes(let code1), .customCodes(let code2)): - return code1 == code2 - default: - return false - } - } -} diff --git a/Example/Pods/Moya/Sources/RxMoya/MoyaProvider+Rx.swift b/Example/Pods/Moya/Sources/RxMoya/MoyaProvider+Rx.swift deleted file mode 100644 index ceb3fcd..0000000 --- a/Example/Pods/Moya/Sources/RxMoya/MoyaProvider+Rx.swift +++ /dev/null @@ -1,64 +0,0 @@ -import Foundation -import RxSwift -#if !COCOAPODS -import Moya -#endif - -extension MoyaProvider: ReactiveCompatible {} - -public extension Reactive where Base: MoyaProviderType { - - /// Designated request-making method. - /// - /// - Parameters: - /// - token: Entity, which provides specifications necessary for a `MoyaProvider`. - /// - callbackQueue: Callback queue. If nil - queue from provider initializer will be used. - /// - Returns: Single response object. - func request(_ token: Base.Target, callbackQueue: DispatchQueue? = nil) -> Single { - return Single.create { [weak base] single in - let cancellableToken = base?.request(token, callbackQueue: callbackQueue, progress: nil) { result in - switch result { - case let .success(response): - single(.success(response)) - case let .failure(error): - single(.error(error)) - } - } - - return Disposables.create { - cancellableToken?.cancel() - } - } - } - - /// Designated request-making method with progress. - func requestWithProgress(_ token: Base.Target, callbackQueue: DispatchQueue? = nil) -> Observable { - let progressBlock: (AnyObserver) -> (ProgressResponse) -> Void = { observer in - return { progress in - observer.onNext(progress) - } - } - - let response: Observable = Observable.create { [weak base] observer in - let cancellableToken = base?.request(token, callbackQueue: callbackQueue, progress: progressBlock(observer)) { result in - switch result { - case .success: - observer.onCompleted() - case let .failure(error): - observer.onError(error) - } - } - - return Disposables.create { - cancellableToken?.cancel() - } - } - - // Accumulate all progress and combine them when the result comes - return response.scan(ProgressResponse()) { last, progress in - let progressObject = progress.progressObject ?? last.progressObject - let response = progress.response ?? last.response - return ProgressResponse(progress: progressObject, response: response) - } - } -} diff --git a/Example/Pods/Moya/Sources/RxMoya/Observable+Response.swift b/Example/Pods/Moya/Sources/RxMoya/Observable+Response.swift deleted file mode 100644 index dfc32a6..0000000 --- a/Example/Pods/Moya/Sources/RxMoya/Observable+Response.swift +++ /dev/null @@ -1,84 +0,0 @@ -import Foundation -import RxSwift -#if !COCOAPODS - import Moya -#endif - -#if canImport(UIKit) - import UIKit.UIImage -#elseif canImport(AppKit) - import AppKit.NSImage -#endif - -/// Extension for processing raw NSData generated by network access. -public extension ObservableType where Element == Response { - - /// Filters out responses that don't fall within the given range, generating errors when others are encountered. - func filter(statusCodes: R) -> Observable where R.Bound == Int { - return flatMap { Observable.just(try $0.filter(statusCodes: statusCodes)) } - } - - /// Filters out responses that has the specified `statusCode`. - func filter(statusCode: Int) -> Observable { - return flatMap { Observable.just(try $0.filter(statusCode: statusCode)) } - } - - /// Filters out responses where `statusCode` falls within the range 200 - 299. - func filterSuccessfulStatusCodes() -> Observable { - return flatMap { Observable.just(try $0.filterSuccessfulStatusCodes()) } - } - - /// Filters out responses where `statusCode` falls within the range 200 - 399 - func filterSuccessfulStatusAndRedirectCodes() -> Observable { - return flatMap { Observable.just(try $0.filterSuccessfulStatusAndRedirectCodes()) } - } - - /// Maps data received from the signal into an Image. If the conversion fails, the signal errors. - func mapImage() -> Observable { - return flatMap { Observable.just(try $0.mapImage()) } - } - - /// Maps data received from the signal into a JSON object. If the conversion fails, the signal errors. - func mapJSON(failsOnEmptyData: Bool = true) -> Observable { - return flatMap { Observable.just(try $0.mapJSON(failsOnEmptyData: failsOnEmptyData)) } - } - - /// Maps received data at key path into a String. If the conversion fails, the signal errors. - func mapString(atKeyPath keyPath: String? = nil) -> Observable { - return flatMap { Observable.just(try $0.mapString(atKeyPath: keyPath)) } - } - - /// Maps received data at key path into a Decodable object. If the conversion fails, the signal errors. - func map(_ type: D.Type, atKeyPath keyPath: String? = nil, using decoder: JSONDecoder = JSONDecoder(), failsOnEmptyData: Bool = true) -> Observable { - return flatMap { Observable.just(try $0.map(type, atKeyPath: keyPath, using: decoder, failsOnEmptyData: failsOnEmptyData)) } - } -} - -public extension ObservableType where Element == ProgressResponse { - - /** - Filter completed progress response and maps to actual response - - - returns: response associated with ProgressResponse object - */ - func filterCompleted() -> Observable { - return self - .filter { $0.completed } - .flatMap { progress -> Observable in - // Just a formatlity to satisfy the compiler (completed progresses have responses). - switch progress.response { - case .some(let response): return .just(response) - case .none: return .empty() - } - } - } - - /** - Filter progress events of current ProgressResponse - - - returns: observable of progress events - */ - func filterProgress() -> Observable { - return self.filter { !$0.completed }.map { $0.progress } - } -} diff --git a/Example/Pods/Moya/Sources/RxMoya/Single+Response.swift b/Example/Pods/Moya/Sources/RxMoya/Single+Response.swift deleted file mode 100644 index 2902203..0000000 --- a/Example/Pods/Moya/Sources/RxMoya/Single+Response.swift +++ /dev/null @@ -1,55 +0,0 @@ -import Foundation -import RxSwift -#if !COCOAPODS - import Moya -#endif - -#if canImport(UIKit) - import UIKit.UIImage -#elseif canImport(AppKit) - import AppKit.NSImage -#endif - -/// Extension for processing raw NSData generated by network access. -public extension PrimitiveSequence where Trait == SingleTrait, Element == Response { - - /// Filters out responses that don't fall within the given closed range, generating errors when others are encountered. - func filter(statusCodes: R) -> Single where R.Bound == Int { - return flatMap { .just(try $0.filter(statusCodes: statusCodes)) } - } - - /// Filters out responses that have the specified `statusCode`. - func filter(statusCode: Int) -> Single { - return flatMap { .just(try $0.filter(statusCode: statusCode)) } - } - - /// Filters out responses where `statusCode` falls within the range 200 - 299. - func filterSuccessfulStatusCodes() -> Single { - return flatMap { .just(try $0.filterSuccessfulStatusCodes()) } - } - - /// Filters out responses where `statusCode` falls within the range 200 - 399 - func filterSuccessfulStatusAndRedirectCodes() -> Single { - return flatMap { .just(try $0.filterSuccessfulStatusAndRedirectCodes()) } - } - - /// Maps data received from the signal into an Image. If the conversion fails, the signal errors. - func mapImage() -> Single { - return flatMap { .just(try $0.mapImage()) } - } - - /// Maps data received from the signal into a JSON object. If the conversion fails, the signal errors. - func mapJSON(failsOnEmptyData: Bool = true) -> Single { - return flatMap { .just(try $0.mapJSON(failsOnEmptyData: failsOnEmptyData)) } - } - - /// Maps received data at key path into a String. If the conversion fails, the signal errors. - func mapString(atKeyPath keyPath: String? = nil) -> Single { - return flatMap { .just(try $0.mapString(atKeyPath: keyPath)) } - } - - /// Maps received data at key path into a Decodable object. If the conversion fails, the signal errors. - func map(_ type: D.Type, atKeyPath keyPath: String? = nil, using decoder: JSONDecoder = JSONDecoder(), failsOnEmptyData: Bool = true) -> Single { - return flatMap { .just(try $0.map(type, atKeyPath: keyPath, using: decoder, failsOnEmptyData: failsOnEmptyData)) } - } -} diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj deleted file mode 100644 index 02315e8..0000000 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ /dev/null @@ -1,2700 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 00FA97D56201027AEB1C7692A2C3CF8B /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C3D522855F74589774A16C6462EFD9DF /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0382B21403508B99FF3327D56E0AF692 /* ReplaySubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = E64F5D693192F855B882C1B714F01BEF /* ReplaySubject.swift */; }; - 0419772A87B16DB7DCF405A9E77D671F /* Protector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F3A668BE4FDB860BAF96CAF554A6F83 /* Protector.swift */; }; - 04796344A7C95D584655C5566DEACC6C /* DefaultIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91602304913C81BC608AA3B12FA2C240 /* DefaultIfEmpty.swift */; }; - 04BE8EBE8919925CD4718D176E2DBDFE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; - 0532D2ACCD5650B6FBF59C260047C3F5 /* Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 957282C5668E6B9BBDC2DC7E772A3CAA /* Rx.swift */; }; - 06507A26118BA5ACFBBC8C225776920E /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = A61C9FDA9C2DC77CC66404E5DC5F5839 /* Validation.swift */; }; - 0774EC3F0D0D32595C320AA3EEEF9422 /* Moya.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33B7AE29589319D1045D96DADFD3BF9D /* Moya.framework */; }; - 08C0D8E4EE5E91B97FDA34C8B1B84AC2 /* MainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB55F8DE2660F9D0DD03968E5A9E3F6E /* MainScheduler.swift */; }; - 091FE0A8C071E11BB7A163E196C2A8CD /* _CleanJSONDecoder+Decode.swift in Sources */ = {isa = PBXBuildFile; fileRef = E35801E05FCED24500A9100CEEFC1717 /* _CleanJSONDecoder+Decode.swift */; }; - 0AE06C3AEA6CA45342BA703230ABD2CB /* CachedResponseHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4046BB44E989FA26661B6373203DFCA /* CachedResponseHandler.swift */; }; - 0B015A56B2FD1136509368B58F130E16 /* Storable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06E4A17B86B13991A06D2DC3AB7F3FA0 /* Storable.swift */; }; - 0CC43FF0E31AA320ACFEB0FE6239DF34 /* ServerTrustEvaluation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 481D7ED739538C7E81FC6264A591FB08 /* ServerTrustEvaluation.swift */; }; - 10B973D93FB221BD387B7C658F77D443 /* SynchronizedOnType.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6BE32335045023EE6863CA98E374280 /* SynchronizedOnType.swift */; }; - 11B8A307A4238186C6D8E733D4A5592F /* Defaultable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 770E07B9D1850E6653372A7CF36A61AA /* Defaultable.swift */; }; - 13457FE4E607509A3B9527B0711033D5 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA20847C685812AF00A79990B6BAA989 /* ResponseSerialization.swift */; }; - 1349831CA5836315AB830BB7ECBF90E0 /* RxSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D26024B8191EBACE7D8A9880B82804A /* RxSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 14AB7976E100075ADEA0AB1DB833E72D /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7199297E549EDE7B1EB1BC3C8F9B9940 /* ParameterEncoding.swift */; }; - 15CB34CE32F8F418ADA0AFEB4586C4AF /* Producer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C8E26BC97A8DED0530AFC5BD39829CB /* Producer.swift */; }; - 15DE050167BCFC5A853464091B9AA007 /* AnyObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BC5936508BB7D22682646A8CB85E7D9 /* AnyObserver.swift */; }; - 162E961BCA06B5856EBE1128F5B578CD /* DispatchQueueConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1B3426F7AF9875D93107A68BD88C6C8 /* DispatchQueueConfiguration.swift */; }; - 167BAD406FED0F1C1E58A64F5D4AAE6E /* SerialDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 038FE19F91DF016528FED78E9115F12F /* SerialDisposable.swift */; }; - 16B528E1AC9C664E75440FE4A34497E2 /* Cancelable.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE7C1B6EB782CFC56290F959830E5184 /* Cancelable.swift */; }; - 17953A9CF2E354B3E69B9ABC2F367AD9 /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F4F1DCDF05BEB3F04B44C57826B6E9D /* AFError.swift */; }; - 1C387C185F4BBBE1283A5BED5ABA27DF /* Reduce.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFE1599E8ADF5C735CC90BFB1D717988 /* Reduce.swift */; }; - 1C4D7D3091D1D3E44980C2B8BAE3430B /* OnCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC2CB346ED4ADE0D3CC2B16D179BC8B1 /* OnCache.swift */; }; - 1F9AA48E0CE3132EAA10C2778F554B7E /* Skip.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC534BF69BF4BEBF349DCF903F148AF1 /* Skip.swift */; }; - 20006DEED67151188A24C6723CF7B230 /* Do.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CF66E4C2CB94F6F43B1E691EA0E2231 /* Do.swift */; }; - 20533020B628BCC085D1E0CBC0FF8455 /* URL+Moya.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1BEF04B058DFE32D41D2ADB0346E7B9 /* URL+Moya.swift */; }; - 20ABCF3A27659A9F98E3B2DF11A3E6FC /* Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 837BF293A2A9E426CD22790E32C9C234 /* Deprecated.swift */; }; - 21B0F16982CCF2E0C9D290177BB1F095 /* LockOwnerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAA477DC2A7EE71C837912B943C66EB9 /* LockOwnerType.swift */; }; - 21EF9008F4B0EB4613C90119946A6551 /* CleanJSON-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CF25362BD77D1C26F575845566A7A52 /* CleanJSON-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22E5874E46AC1CE4CBC8FC662CC55C0C /* ObserverType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 263889CE19EB5C22C1DFE6E75BDF5AE9 /* ObserverType.swift */; }; - 2374D677D92A5059C3149F389B92CA5D /* Single.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62A0CE3B22BC0B6704044CE6929E2AAF /* Single.swift */; }; - 238E56DC535790541C2F3579A5A05AE8 /* Bag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 175ADB815798C35EAE61A42C01BAF510 /* Bag.swift */; }; - 24D8CBA3A7CE6C4670EF7C46D057C55C /* ConnectableObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80B701110F9D39B161D4B6443680FB85 /* ConnectableObservableType.swift */; }; - 2679D07BD27F89352BA304303224430D /* Just.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4AE47EF154E4204A4E65751F8F7E839 /* Just.swift */; }; - 27D17E9A74CD7336DD27E42FE3A20048 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; - 2884BDC6DBADE015FA465D06FA6300F6 /* TargetType+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = D81A3288820421CA37D5D3C9485FF92F /* TargetType+Rx.swift */; }; - 2A0B7C366BEF1DA021BBF70D5024627E /* StartWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3710215F4405D61FD1A9C2F0A16B3802 /* StartWith.swift */; }; - 2AE2ACD4E57C6FF386DEA034A78572D4 /* DecodingStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 621E3483BB03CACA14EA24471EE82988 /* DecodingStrategy.swift */; }; - 2B5F202260E63B8BA44425778ADFC4B5 /* CombineLatest+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A44EAF6108B38D69C98B832186F762F /* CombineLatest+Collection.swift */; }; - 2C1D0CBBA13D012D54497FC3EF998864 /* CleanJSONDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 064C77F2FA7A326D7EA8D53FA1C437D1 /* CleanJSONDecoder.swift */; }; - 2D64BC669DA212DBF33189D9A750521A /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D3427D9F3C5D00EA9CDA4CE91EE091 /* Response.swift */; }; - 2F0D3D2291277275F604063A788360FA /* TakeUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61D6CA746419B5F8C8A66C4F282B4A16 /* TakeUntil.swift */; }; - 2F536C2AF3B103298C6C094BB4A7FD37 /* Moya-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F8BFE4BE4F8B73C513A7AF3690DA5DB /* Moya-dummy.m */; }; - 2FD5653F8A16107C1CF16BD0016D464B /* Sample.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1F46CEC9A444CD1F2C933728A1A0261 /* Sample.swift */; }; - 2FF96A3B5939EC3BF89F1B6EA7839065 /* Multicast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68BCEA9418E28101583E11BC73556B8B /* Multicast.swift */; }; - 32BE7904E1C29B3CE8C38F9692B75EBC /* Task.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFFBEA36FF4978E1AE57BEDB7A2BC0AB /* Task.swift */; }; - 35AAA0FF9EC67EAB5504B30080B271B8 /* CurrentThreadScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCAE48409BC07F345CD97CC478FAAF4D /* CurrentThreadScheduler.swift */; }; - 36E9AAC8889EAE48797EA35F978BABFE /* DelaySubscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7D427802B6C9CE0319FB85B28FE4B59 /* DelaySubscription.swift */; }; - 386C181A96676A4F379C4CF2F2630CDB /* AnonymousObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49A2C1D9C92F53AB8857555AA48D8E4F /* AnonymousObserver.swift */; }; - 38CF07FCADB03926D1044B3E82BEB60D /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D121C06397586C34177246B57D7862B /* Configuration.swift */; }; - 39032686C6699D0C73F6624B2353153B /* Amb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A298A1BD371BDDF1B3E5D7EECC3845E /* Amb.swift */; }; - 398F7FA52F7E61329E0874F5668BF5EF /* ObservableType+PrimitiveSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E0C66DF27398C5D3096DDAE92D4736D /* ObservableType+PrimitiveSequence.swift */; }; - 39E6C55935090828DC10A4AB3730B0F4 /* Storable-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E697A997BFA592B3F42528C00EE3FCC6 /* Storable-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3AE2A890E38BBF1090C56D1F71DD7BEC /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 887DA39FFD9CF440698575DBDBB38533 /* CompactMap.swift */; }; - 3C49040F90772F3D25A7967CB2244A97 /* RxMutableBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D1EAD5660345F2842931BB2F20B7114 /* RxMutableBox.swift */; }; - 3C948C15D45C1ACB43D0109AD150DD37 /* SchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8609F5716C4E9428EE5B36B89411E31B /* SchedulerType.swift */; }; - 3CAC4510987ECD76E66C8436897B7E5E /* DispatchQueue+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57E212D5A4117757354B0713D214D3C6 /* DispatchQueue+Extensions.swift */; }; - 3D72F53B4DEF14B79BDE94196F072F42 /* NetworkActivityPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 959132636FAD71C3E674126894F528C9 /* NetworkActivityPlugin.swift */; }; - 3E07E92EB47EDF27A84D979A1A537983 /* Single+Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB72F82649E5D6FCD8D105BF6E7DD562 /* Single+Response.swift */; }; - 3EBB3E7924CCFE938B76929457BF23CE /* CachingKey+Moya.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AE6037437F12CA130ACE6A16A2CCA06 /* CachingKey+Moya.swift */; }; - 4082513A35C682F2193D002C80F72B79 /* Result+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2617C3A7C5B9307CD29E748E3C8A1BE /* Result+Alamofire.swift */; }; - 40BAAA426379DB35F2487D7074F4F7A1 /* SynchronizedDisposeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A84004A757167A55FF499FBA38C96863 /* SynchronizedDisposeType.swift */; }; - 40C99AD4D80E7AE683F69BD28F77864A /* BooleanDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 106010F786B00382064BEC7285066EAA /* BooleanDisposable.swift */; }; - 427A0635A2E6E28B4A3A816E242B4E37 /* BehaviorSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD4F5F29B9F841EDFCC338661F69C29 /* BehaviorSubject.swift */; }; - 42CDB5C986C78BBC8E5C0185F746CABF /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA9ED278802AC08987B98CCBA8938734 /* SessionDelegate.swift */; }; - 4347316F35AE1AE0AC7A6BE5C92E885B /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A6EAEC21684544BD94E4F5F389AE039 /* Event.swift */; }; - 43FDF5ABE2F18F0B5C933E70C17A809C /* CompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F466DB24369FFA9C876D1159D3EC7B5 /* CompositeDisposable.swift */; }; - 44127C4B989C9CC6A90D78B66A929A5E /* AlamofireExtended.swift in Sources */ = {isa = PBXBuildFile; fileRef = B99FCD857F9FC1E1732BF85DE8B0DAF3 /* AlamofireExtended.swift */; }; - 445F4CB3833C4C1858A745645C25AD2C /* Take.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37B911B1EA77CBDF7B73DBDC7BFD06D5 /* Take.swift */; }; - 450C5E66131BFB4BC0C131E5A59116F6 /* ConcurrentDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5068721A4B673383C14D763B739D0F6A /* ConcurrentDispatchQueueScheduler.swift */; }; - 46C6A873F48B33D0D2BAEF82CF17DFCC /* Single+Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8936BBCF5565CBC7816671C7210C68AC /* Single+Cache.swift */; }; - 471D3D6EDE67F8F777383DC780F4EB47 /* GroupedObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 391E68D2C7A74AE68CF263AA0C1AAA66 /* GroupedObservable.swift */; }; - 482971279D142473EEE3991BDE7BA1CE /* RetryWhen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5156953DD1D83F2B9DF2091FCFCDAEA9 /* RetryWhen.swift */; }; - 485E14141484EF943B5921F0C630C4D2 /* Moya-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 924A2EC1B9F2476BA368A519BC3C894E /* Moya-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 48D97BE7D5CAED273BD2341C239CC934 /* RequestTaskMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1243248DEF75E4E4DB7DB2960DDBAC6F /* RequestTaskMap.swift */; }; - 4A58926B25B353762E5C5E9DDC3663B1 /* Moya+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 166E06420075A86024865085456EB41C /* Moya+Alamofire.swift */; }; - 4B66393BC7CD9C62F326692C1B4E5358 /* RefCountDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A477CFE1FB1F7D21971FB8489E55038B /* RefCountDisposable.swift */; }; - 4C9F9203E47771CF126244603AC7010E /* SkipUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB2181CDF5E277CC3BF3776D0DE23568 /* SkipUntil.swift */; }; - 4DBEBC1C46655FE4482E162B0F962E7C /* Completable+AndThen.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE6017678DC20784DE0E2AD55B4F04DB /* Completable+AndThen.swift */; }; - 4E324C8232C73ACE88495E322AF4A10D /* Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78265D97A9DC9F491966430125C34339 /* Window.swift */; }; - 4FB1B6D22195C720218293530FB1EF0E /* MoyaProvider+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 356880B4C0B320DE90D2184D116E44D2 /* MoyaProvider+Rx.swift */; }; - 52C34E90DCA475F252D13959B66066EB /* RecursiveLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0B13F674DBE3EFB389C8FC0E0EEBB4C /* RecursiveLock.swift */; }; - 537150742875A0BC7F10C7AEA95E90A0 /* ImmediateSchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD67D8AC270144AC44224D8501D46FBE /* ImmediateSchedulerType.swift */; }; - 5398591055AC984105B2FC37BCD5C635 /* InvocableScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2EE4EDA23D55A1A3A024127D814BDEB /* InvocableScheduledItem.swift */; }; - 53BC2F344EACCAE8F097DAA4BE505CF9 /* ToJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3B5139E54D26E6D005B206C90FBC49E /* ToJSON.swift */; }; - 53DF164D8ED7CE192538270A6E44BC5D /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6716FB482B8FB850D691E513742282 /* Image.swift */; }; - 5595FBEF79641901DEF6630C8B3E44D0 /* Maybe.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA41BF945051BA5E92804FFAD6DE5491 /* Maybe.swift */; }; - 567943E7E3072AC8F5ADAA9E66E21F92 /* Platform.Linux.swift in Sources */ = {isa = PBXBuildFile; fileRef = 464A6A21FCFFC435CEB6FF433C2835B6 /* Platform.Linux.swift */; }; - 56EC8ED1535DAB987F3D2B71D4C05773 /* HTTPHeaders.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8330A5B5A3E68AD688C14ED063E1C812 /* HTTPHeaders.swift */; }; - 577F13C1954C9B6A65959FA98CC84FCD /* Scan.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDF5778FD5870156AA7E9BBF3B8AB023 /* Scan.swift */; }; - 5856209957EE2833E86DB346D25BAB3A /* SubscriptionDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B056FB16307BDF73A5E862E88073DF61 /* SubscriptionDisposable.swift */; }; - 58B49162649FA9E9D9488581E8C4C8CC /* Bag+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24377677E869B58AFF6FC7E269547304 /* Bag+Rx.swift */; }; - 593DED6A4AC89E3C71F91E6BC5504B57 /* TargetType+Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33AD91CFFC81D1D4F26F7F9F0FCDE143 /* TargetType+Cache.swift */; }; - 5977E90645BBB23BBEAF8FA758A855AC /* Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 281236BEC6F709D46DB47B4A36EFCB03 /* Zip+arity.swift */; }; - 599F0F563C3326C12B41D933F5F80C51 /* SingleAsync.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC2518C82B77E61DD3E771A90D0E705B /* SingleAsync.swift */; }; - 5A7D72019BD3B4DCB3123D94F69AB898 /* SingleAssignmentDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5629A419CA6E7BC96DFC091194F7CCDA /* SingleAssignmentDisposable.swift */; }; - 5AFA1C90693120F18B64A46697EFE3E9 /* AsSingle.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAEFD3E93FCBA179CDE905CC9ECA124D /* AsSingle.swift */; }; - 5C4A0685B5A201436AB52EF25829B333 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CF15DD381BEDD5C680457A3A3C8E7B8 /* MultipartFormData.swift */; }; - 5D12235D061AEE7459279AAF8C348DFE /* URLEncodedFormEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF781C4124DBCD6FD88F02423A0AD64F /* URLEncodedFormEncoder.swift */; }; - 5D61C8ED0DDCC9F8B576B6514B19EE50 /* ParameterEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07DD9FCDFEDD2558F85CFCFD728C8254 /* ParameterEncoder.swift */; }; - 5E626665812F7610667D81C73F448189 /* ValidationType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 518907B2E3570849B955D56284BE399E /* ValidationType.swift */; }; - 5F59200B0DD426BE83DEC34E67AAE564 /* Range.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06ED4CAD705266986228184FEBD4314D /* Range.swift */; }; - 61C0D630EB56761025C8642CC43430C4 /* Date+Dispatch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BF5B5A5394978EC360C135181E91C7B /* Date+Dispatch.swift */; }; - 61D67D39B1D51B9D51B8B9F4D1911428 /* Reactive.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6E2ADDF97E331AE3D9E7015B9331F2E /* Reactive.swift */; }; - 648BEC3D1E2FC89ED7487960646A2672 /* Endpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = F48B7427BBD228A6A0FA6155DB0C4D33 /* Endpoint.swift */; }; - 6671D72BE96F05F0BC070530123C1D0E /* Observable+Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3366E923B08356C8F918DB061CEE17F6 /* Observable+Response.swift */; }; - 67098130C1E0A29A2767D913D6B521EE /* Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = B73D8B762168FDE1579334B98F4B7B6B /* Sequence.swift */; }; - 6730DF6ABF6A785543DA3001108F5749 /* Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8AFA5D5C8CB619386A03ED83164149D /* Debug.swift */; }; - 67C3B90FFD52B59583EFDF7A34559C5C /* Never.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3AF5CD080B1A13647A5A3DED40F55A7 /* Never.swift */; }; - 6810CEB9E126BD33B8A01E79B7D9301D /* PrimitiveSequence+Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = F899E1BF5205E554413060E199938E3E /* PrimitiveSequence+Zip+arity.swift */; }; - 690CADA27732BFA5FC50E02C9DEC59CB /* AsMaybe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F876C06D7849AF358641FC077567E9D /* AsMaybe.swift */; }; - 69ACE4EEE5A8C1C618B22CC1F7B8EF01 /* Session.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEED6A19AADDA66EDB3FB22EFA38154F /* Session.swift */; }; - 69D4126F929F0FDB43A0F44D653FF09F /* Enumerated.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC9D4F3ACB956DC78AABC7EF7116512B /* Enumerated.swift */; }; - 6A22C46CB1EDE471794D9AB2AC10327F /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07060027423087C9DEC5DFC4122FF9CE /* Request.swift */; }; - 6C5C7C4BB1EFDA1970D4F47C1193399F /* PriorityQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC60F887979E1A850A662BB6EC3695E2 /* PriorityQueue.swift */; }; - 6E500E09797E690AF9AC5B9511BAC789 /* MoyaProvider+Internal.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB3EFDC334F6169C56374A5C825DC7B9 /* MoyaProvider+Internal.swift */; }; - 70517C3BAC2D6614347DEAC15299EB84 /* URLConvertible+URLRequestConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C331AE4DF911F37FADFBA55C28BDF95 /* URLConvertible+URLRequestConvertible.swift */; }; - 72BCCB00F4313283460E23F82D9C03EB /* AnonymousDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6A7300E9EDE897E98A93A55ED03C320 /* AnonymousDisposable.swift */; }; - 7337FA6C4A3F6F1FC203606E918BA5F4 /* ScheduledDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D326233DC57411A161CE3F1EC3D8F1E3 /* ScheduledDisposable.swift */; }; - 73C5F7A686893DD40BC9F5F67539A78B /* URLRequest+Encoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53200B222E5F51E904674C0D4BECC7E6 /* URLRequest+Encoding.swift */; }; - 73C77120B878115966FC5AA9AF36E91A /* ObservableType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD129BB4BC4BEFA673CE5337EDE59F16 /* ObservableType+Extensions.swift */; }; - 74AA78DE1FABC94DA40AE8E40A76087F /* GroupBy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4396A8A94652826C607D41298EF08C74 /* GroupBy.swift */; }; - 7AED67E1C3B95CF7A4628FBB5335ECC2 /* SerialDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = D23BE0DFB80262E1E54C75F46321DA46 /* SerialDispatchQueueScheduler.swift */; }; - 7BD6C758E1C3B0DA760A112A98FD921D /* VirtualTimeScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C7C46029C2CD9B28F287FA23CB5AF4E /* VirtualTimeScheduler.swift */; }; - 7CF8362BA31492053F5CB165637AE117 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9563564A7E1F9DEEC3E8617471D512A7 /* NetworkReachabilityManager.swift */; }; - 7E5D7EB916869F933BE3C5B7EA96980C /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28EFF13A360CFD0623C59A70A02E674D /* Timer.swift */; }; - 7EA2F5473AFD81C74A2876C2C978FB02 /* Using.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7A90629DB11EC28A169D2F7F3D632E /* Using.swift */; }; - 7FD07B719F3C7BD7BDEDE04BFC68906A /* MultiTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1DC8D74B0FA822526096B124124CF0D /* MultiTarget.swift */; }; - 807F55A7D4A09A2DCD5FB64D59AF7FB1 /* Merge.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9B8D43335230764364E9B128FBFEE9C /* Merge.swift */; }; - 836193127A436104FABBC1A1666CA5EC /* AtomicInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B3D0937387DF0D74D9ED5F2210527AE /* AtomicInt.swift */; }; - 846AF5592D7EBDCB05E9AB0879BF1342 /* PublishSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6924568E51FA7C86522CA17AE7C24A61 /* PublishSubject.swift */; }; - 8805B3A385FF612893183012DF14AA9B /* HistoricalSchedulerTimeConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1C63393F67222B14B2A6A86BBFB3276 /* HistoricalSchedulerTimeConverter.swift */; }; - 884CB47932E14ADFBC8C13061807316A /* ObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 261441859064F36E20C60F6022EDD26C /* ObservableType.swift */; }; - 889224D6BE4DDFF5CE706F311BA76BF0 /* Storable-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8812BDA42BE19B2653B9E7F54A6C7D71 /* Storable-dummy.m */; }; - 89CF1DF0CAF754571AACBDEFF789074F /* BinaryDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D393291DE590C7D1D4D6ABBE9D7D74D7 /* BinaryDisposable.swift */; }; - 8D008A4A3B54969F4FFE915C65C9066D /* ElementAt.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA2F3406F1AB92C229210DB0D09E5C3C /* ElementAt.swift */; }; - 90C9147FE061B924EAF20E15E79E543C /* SchedulerServices+Emulation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AA6159BDF623D6C60F20E34DCB21069 /* SchedulerServices+Emulation.swift */; }; - 9199D578DD7861D9874762A1226074DA /* ShareReplayScope.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F7813E70AFD621E29F61CC11AF7384A /* ShareReplayScope.swift */; }; - 92603F31AA22939DDB47C2F1DB98F135 /* RxNetwork-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 384F5AB8528B8290F3E142C2CEFBEC4D /* RxNetwork-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 92811AC5CD9A5004116AE43C4E8FD955 /* OperationQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 656236B3BDCA7C4269F4C0012B871A72 /* OperationQueue+Alamofire.swift */; }; - 95980779C6D9DD12F0BA681545E185AC /* CleanJSON-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 510B47F966CD35AECBAABBAD4972B870 /* CleanJSON-dummy.m */; }; - 97A168DFB6DB61770CE2DBF4FD39AA8D /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9224BCF600D984030DF4BA9B27515E98 /* CFNetwork.framework */; }; - 9826034176E96C9E474E072E83C8A358 /* ToArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = D701E95B632E9004418D08A5ADA9C5F9 /* ToArray.swift */; }; - 9834C2A01D4C3A7727BE17AA6A5512CD /* VirtualTimeConverterType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 026854B499760CAED7E8D0783A1CA04E /* VirtualTimeConverterType.swift */; }; - 995FBC0C424C25F7FA6F2BF1245A8D4C /* OperationQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8298BE160EB95F5580C850AB10A7AE /* OperationQueueScheduler.swift */; }; - 99AE91F0464A31E006B4DF77EF20893E /* Throttle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07EC1ECD525E0CBA56BA47301D8355D0 /* Throttle.swift */; }; - 9BC5B6534BBA3A6E9B5CED29CAC0137F /* Network.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDE9E77D94940D5D7DD20415876A3E16 /* Network.swift */; }; - 9CF9C6A4350CE1B03447B5247F84C2E8 /* Debounce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BCF8A34F8736405DCAA50FCD656E99E /* Debounce.swift */; }; - 9E0E8CA8EF7D5975C391DFCC303F72C3 /* DistinctUntilChanged.swift in Sources */ = {isa = PBXBuildFile; fileRef = 918C6D8E9812D83F3F978BE83821D354 /* DistinctUntilChanged.swift */; }; - 9F264F1A2FF3521FD1F62A4539DC1FAB /* Queue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 851D5C9B66C1AB6A9593879B3FE3AA69 /* Queue.swift */; }; - A0984EC68B044E44BC79B12DAB62A450 /* MoyaProvider+Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 108AC4A14D5252C44424D681EE80F4A3 /* MoyaProvider+Defaults.swift */; }; - A333BD461518BFCF585D068FB6E9C662 /* StoringKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B9DFFBA4375230FEC92CC8AA2FBAC2D /* StoringKey.swift */; }; - A3D6BCEABCC79E04DC1991CB5C3AD3B3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; - A6E54693F4FE0F37FF016CA6F1A4D78B /* AccessTokenPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3551DF262187D1203B83BAF9EA48B1F /* AccessTokenPlugin.swift */; }; - A7C9DE2DBD28F5122541FD9F11FEEEC6 /* Cancellable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E82B2D23DD757B33DD7DFF17FBBD42BC /* Cancellable.swift */; }; - A8921779A0B03A8843F04CB531310210 /* Concat.swift in Sources */ = {isa = PBXBuildFile; fileRef = A42080C29AD328E1CC7E761FF82C78D4 /* Concat.swift */; }; - AABC56D2B22A94FD4F2ACFA194D29FF3 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 435339186260EFAE9AE4DA219F7B2773 /* MultipartFormData.swift */; }; - AB0167F07A236FC1D88BDF28C5DF657B /* CleanJSONKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FCA37674F55BEAA7DB1902D521CB4F7 /* CleanJSONKey.swift */; }; - AC3CB3488A34461DAD252DE4A373C4CB /* Create.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB2EE2ECC802C16571D0ED08E3A792F3 /* Create.swift */; }; - AC991769A1E70432F1438665B7A20D3C /* SubjectType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C843DC02298710B839ADA338C6B946D9 /* SubjectType.swift */; }; - ACEEAB591378F919B3C3B73ABBB644D4 /* AsyncSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0A898627D00FE18A307ED2F6139887E /* AsyncSubject.swift */; }; - AD17EEA35B6F9F92E57C7A81E45C8185 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 57857C02D75DE4B780347BC7585AD918 /* RxSwift.framework */; }; - AD196E6B5826847D4CD2CF688F0670B4 /* Catch.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2510E4501E12CC029C9B3AAB4684F36 /* Catch.swift */; }; - AD9899986955B2EC1EC20818C860C971 /* RequestInterceptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = B47CC1F172167C45762F66717A77796A /* RequestInterceptor.swift */; }; - AE9A449328CF627474BC5A22DD12ADEB /* Optional.swift in Sources */ = {isa = PBXBuildFile; fileRef = B558F8F5563D0291BDEB3FECF5DADCBB /* Optional.swift */; }; - AF92602937CA016548022C600B8CDC16 /* URLSessionConfiguration+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5032057E303F4F9BEBFD1A0BBBAF8D2E /* URLSessionConfiguration+Alamofire.swift */; }; - B03D2733E568FB51D6C8B0F23F5C3AAD /* RecursiveScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = C44F817E631EEBC40D7A1AE6F76CE096 /* RecursiveScheduler.swift */; }; - B10BAC99F09C0D1E119B11DAAF9F4F2E /* Empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52044509C05EFC4E338B319064FC119F /* Empty.swift */; }; - B1282BAF91224397F6AAFB577C341E6A /* ObserveOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E860EE8CCAEE984F3560839F7EBB54D /* ObserveOn.swift */; }; - B1C58F6CED7B3E45170711D9ADF878AF /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 114BFEAEE83F72DCF8BF6D418C63EC48 /* Alamofire-dummy.m */; }; - B23E9A5CDA31534491226F4C2EE8F8E6 /* HTTPMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE2B8FDD8649116A6423B52C08577481 /* HTTPMethod.swift */; }; - B306FA316BF5EECF582CAF821E0696DE /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = C65AB0ECD9BE59B36B0D287583B430BA /* Error.swift */; }; - B45AA223B98773B1565A927496E07F51 /* Timeout.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEDFBA1EA963A0249C7469CF7238858F /* Timeout.swift */; }; - B5AB337ACA26EB58FE7ED9A13F3402D1 /* First.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCF4F6874FC8B9FD31A50E76BA68867A /* First.swift */; }; - B6B5DD46569F622E8065D405F8F8B124 /* SubscribeOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB16749A0EBB70E74838BF111C9A79A /* SubscribeOn.swift */; }; - B72D290CF07850A2B7CF41CEF3FDF3E0 /* Platform.Darwin.swift in Sources */ = {isa = PBXBuildFile; fileRef = F67147776750363CBFC3DDD46CBFD28D /* Platform.Darwin.swift */; }; - B7340AE5CCDA0D48032E76FD2EACABD1 /* String+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A1B471AFBB9EE1592CA2F743A068D13 /* String+Rx.swift */; }; - B788B3354CCEBE56DFDB963CAFD7F6C2 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D5EF00E0D75C20FB6320A6B8BEFFA89 /* Alamofire.swift */; }; - B80CE38A2CF000C91F9BEC252DD44B25 /* NetworkLoggerPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F9B865C569AE9C16A59190E92AE7900 /* NetworkLoggerPlugin.swift */; }; - B8CBBB4C1BE72997572539B3B23CDD7E /* SkipWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B8634B215369599FFBE8D8BEE0A73F0 /* SkipWhile.swift */; }; - B90D2337F2914FE4C357BF9742C11E90 /* Pods-RxNetwork_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = DD446B4044B0702284E4C9270774ADF6 /* Pods-RxNetwork_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B9BCC87C90F47AD8B8FE81CF3F1F251A /* TailRecursiveSink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7783A297EDC6DB81F3E2923068179F39 /* TailRecursiveSink.swift */; }; - BD12A82F374994FCD0AAE6ACA3533A8A /* ScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65B8757D3ADFD48EAD4CEC21E6CA7506 /* ScheduledItem.swift */; }; - BD65127B566C666A67DA98E0AF329A15 /* PrimitiveSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97FE73D2B39572EED263A65F22E19FA2 /* PrimitiveSequence.swift */; }; - BDA6A52A11AA3D5962391C1EFFE2B09D /* NopDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48176300B238876EC6C9D40BFA40DCF4 /* NopDisposable.swift */; }; - BDB2620B10B258173458D6E1B6F871E2 /* Sink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DB0DB0B8DD0BA363E2BADCA7C4EB152 /* Sink.swift */; }; - BE7099C44978FF09B98008BD066C5877 /* Expiry.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7328429742CCF5564A4C089C23BAA1E /* Expiry.swift */; }; - BE82AE980F8C7EE28A6448959194F93A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; - BEA9AC162B40BA3879ECE9D7CD49133C /* DisposeBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCAA7EFDBD65FDF9746A3F061CFFE23A /* DisposeBase.swift */; }; - BFF250A42923627911E09D7AC6DB22DA /* Expirable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F21E6A56EE23C9B87C6B6D7D5F2C93F1 /* Expirable.swift */; }; - C0BF1AEFE6B98C8E2BC20EC6F4A65A3F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; - C1356059527754C583D52890E12D9255 /* ObserverBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23959528143D698F0E7EA5172E01917A /* ObserverBase.swift */; }; - C3EA56C32F615BD7A8917A776DDAE597 /* ScheduledItemType.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4224738F69DE56C01651B8544B7C42F /* ScheduledItemType.swift */; }; - C4962311BA5AD3FB8E0AFA1A5BC969BA /* InvocableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 872AA3F1C2369C28062BEF17B62AA2AF /* InvocableType.swift */; }; - C5487374F304D945EBDC7CB2830BA45A /* CleanJSONUnkeyedDecodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58B1CF188B3F948B2B9F1FBB25FC492D /* CleanJSONUnkeyedDecodingContainer.swift */; }; - C64AF152F7928CDB59385528DB65FE19 /* RedirectHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6575CBED40319444DAC29C45231D0ADD /* RedirectHandler.swift */; }; - C7278758EE3C140A29B404CCD186EB56 /* JSONAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57F11648E65F779A1E00EDA213CED5BF /* JSONAdapter.swift */; }; - C7369563F6946D8984124E1A546B6425 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7A3B49D4F7F2FC9AEECDD6F8CF67056 /* Notifications.swift */; }; - C76CF711EC8ED2795A3E431CE9125EB1 /* DisposeBag.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2743CDAB975E17560B238D8DA292938 /* DisposeBag.swift */; }; - C77C88909376758350D2DFA86B5FFDCE /* Observable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F741BA7A1003FC8E14528AEE8234E45 /* Observable.swift */; }; - C7A9B57B2343036C600D088D5F8FF536 /* Delay.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBB5CEF94FA9266F39DB2722D92DCF0C /* Delay.swift */; }; - C7B19143F080448BBA1DCDE85190E987 /* AsyncLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8E39A127DC4BE788E64476BC0EA77F1 /* AsyncLock.swift */; }; - C940142C7BF894844C1732C987EB3A65 /* Disposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE2B47586C4F9A49F712AAF2829C0556 /* Disposable.swift */; }; - CACBD166E573774FB5613C34AA6DA7A7 /* EventMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = C52CC70AAC72FD95F6F5224EC49CB335 /* EventMonitor.swift */; }; - CAE6B2CAF926F5ADD3A19B7989D2F419 /* CleanJSONDecodingStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6DEEA09CCFDE102C00C37E286327774 /* CleanJSONDecodingStorage.swift */; }; - CC822EB8650E011340BDAD6708E10E74 /* Repeat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9557CF86C29E2FFA60740C0FCBB997F0 /* Repeat.swift */; }; - CE2EE27DA1623D412DCCCF686520F77C /* DecodingError+CleanJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 459C12262C5D16FA761505712BB18C0A /* DecodingError+CleanJSON.swift */; }; - CE9E7F1B6C1023ABFD65C8E82C04C13C /* Deferred.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBA4C0FF6B181176D9058AE1F6333332 /* Deferred.swift */; }; - CEF522F304C821113FA3C11E91D33802 /* Materialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CA7D4DC1EE30F6308C2D5F8884C3145 /* Materialize.swift */; }; - D018312354706A06A0A1D14B36F261E0 /* AddRef.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90E8D676117C6EE98E4505BA03AEC218 /* AddRef.swift */; }; - D054281638C6770D95265DC499C0ED96 /* Buffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5ABA32F80170199772B819D5F85455 /* Buffer.swift */; }; - D0B879B08BA15D877B2B281F90B91D04 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; - D0D4408146D541C73AF89DC5A18EAAF8 /* Dematerialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE2F73C6F49CA4D7DEBEE113F83AE16F /* Dematerialize.swift */; }; - D1DB16A8ADF6F23A90784AE6D0F48371 /* Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBFB17250A60745076A6C9C95C151B4B /* Map.swift */; }; - D1E6F6C0078CEE4ABE98162AD229FF85 /* Storable.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D595591C9104D8297D280F60DB59ED40 /* Storable.framework */; }; - D2704E5203EB1958FF4D12BD149E0AE5 /* _CleanJSONDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24723368CF70A3495D4B622F759CA9EB /* _CleanJSONDecoder.swift */; }; - D2E4CA856C232F0C1ED1E3FAF6A67FE8 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EBD7C3BE2D544889C2C44DA82FF75FE /* Errors.swift */; }; - D358A8F8B661F0355556D2EF36E67A78 /* TakeLast.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4AB0C164DB64B572E768E1A47AE2A02 /* TakeLast.swift */; }; - D62D993A4677807A496ADEB7A52F6072 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E3996058E040B343A27929EBE1CB55BD /* Alamofire.framework */; }; - D6B2983389480F48F27A0704EEB5DC81 /* RetryPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBA48397A5BDA8966A7BA81238CB6A25 /* RetryPolicy.swift */; }; - D87EC13CC802F87DDC6A53F2C1F7B0D3 /* Observable+Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20D9B49CE2793BFBE289FA0F11F11114 /* Observable+Cache.swift */; }; - D8C089847634E593119461FC5006A302 /* AnyEncodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA39293E1B3E2EDE286F008969A48315 /* AnyEncodable.swift */; }; - DA30B0D76146C936010244CCEEA3E7E6 /* SwiftSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01F1F05FFDC43DD6FD101937710A5BC1 /* SwiftSupport.swift */; }; - DB4AC9C9764AB262D9E2629768BD59DA /* CombineLatest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8991A07C83CADA92EC413B79A966B78F /* CombineLatest.swift */; }; - DC1C500659E2AAF20EF85D4E49666A66 /* SwitchIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFCC182F14E626EA6111FE97CE9D3956 /* SwitchIfEmpty.swift */; }; - DD1912BC629BB811B439BAD22E89C665 /* _CleanJSONDecoder+SingleValueDecodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 584F3E4DE3D7704EDA086ED5308DBAFE /* _CleanJSONDecoder+SingleValueDecodingContainer.swift */; }; - DE0326CE1EDFDC40B2FE19D76B043A35 /* _CleanJSONDecoder+Unbox.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0FAC347CF1C5BA6C739BC8A7C1CAD5C /* _CleanJSONDecoder+Unbox.swift */; }; - E07BD425C4EA9ADF15DDFCDB10D0B2FB /* MultipartUpload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45262C79144217A26F50B3D6B87321CC /* MultipartUpload.swift */; }; - E0AF946766FBB7F3FDB2AB58FEF36C70 /* Pods-RxNetwork_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0C53BC94DCE913089EC4A7560728795F /* Pods-RxNetwork_Tests-dummy.m */; }; - E23B21DCFF06D63FF04517AE9D9D79C1 /* CleanJSONKeyedDecodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D7D6D7FF99869C604E595F16D9C25E /* CleanJSONKeyedDecodingContainer.swift */; }; - E25BE67AB5EAAAB182751B0A5DE2B9F2 /* WithLatestFrom.swift in Sources */ = {isa = PBXBuildFile; fileRef = D914052A2E741D0CEB2EFA59C074014E /* WithLatestFrom.swift */; }; - E2D712F3F96DB7FDB9AB571FA4547707 /* InfiniteSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFF748A9DE94AF2910A84704E386E7C4 /* InfiniteSequence.swift */; }; - E395E421A778BCB85DC5450199F8892B /* CaseDefaultable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A35CC6FC2E1BA6BFB7685C3B3FCBF59A /* CaseDefaultable.swift */; }; - E45A738555CB47EDFF9F8F1336E44205 /* Switch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96EF80B4E2AAAB3DE1D4FADFE78D85A1 /* Switch.swift */; }; - E4E12208D5246E64B7E6CCAE987ADB03 /* URLRequest+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F4A9488DF9841A108295CB07FC0A327 /* URLRequest+Alamofire.swift */; }; - E60A5078E790EC5CB37F6FA29495EC3E /* CleanDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 017ED680DB98D60DB2E7143556976543 /* CleanDecoder.swift */; }; - E79031377EE6EBE1EF70ED35CFFE96EF /* ObservableConvertibleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = B26AB0C4DE622914CDFEC21B825AA420 /* ObservableConvertibleType.swift */; }; - E7BE920F4D2E2E0C7073DD5F7C28B8A9 /* RxNetwork-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 628BA3C7E3F624B6229544E2A8FFD05A /* RxNetwork-dummy.m */; }; - E7EEDB6566BB993101A6BD90444F1B6E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; - E839BCEAF6403EA464B4B2EF0518FA3D /* RxSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3FEE588415252F637ABCB92AE18C00F7 /* RxSwift-dummy.m */; }; - E8FD96EBDB36F2BE905D05F74B0906E5 /* CredentialsPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB57BFEB05E3290A7C495F81D4517E5B /* CredentialsPlugin.swift */; }; - E9A5AC2F471699CCA516952A5FEB990B /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDC2A567AC43E17B1DC674A5CF3F39F2 /* DispatchQueue+Alamofire.swift */; }; - EA766C3FABE829E8249206FE33266C0D /* HistoricalScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = F59C671B78801B06D8D03CA0F85EE28B /* HistoricalScheduler.swift */; }; - EB2566DE832D8CBCF4A1C9EEFB5E4D6C /* Completable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A0C3DC12FBBA8B175445D4B6542FF64 /* Completable.swift */; }; - ECFC62A33C1002B1AD46222513ED9FEF /* CombineLatest+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAAC62BE6A4E6D668AD1A41F2E42B770 /* CombineLatest+arity.swift */; }; - ED6455829FB837C6D4E391C2A9827C93 /* Zip+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB8879EB842575E1579597850C8194E8 /* Zip+Collection.swift */; }; - EF796E0D6E10A60D7B888D1F8F7A0DDE /* MoyaError.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE22375883C8BEE55DFC3B2E0D7FA42A /* MoyaError.swift */; }; - EF87506B5CB7A49F7ACE0CB35B79B8E8 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F3DF1FD26065AFB41A53B6BC14F6176 /* Filter.swift */; }; - EFC3E2419DC3305F2BBF3082B92BBD1F /* SynchronizedUnsubscribeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1055FDAF365F3DB3904962ECDD1F2F4 /* SynchronizedUnsubscribeType.swift */; }; - F0A03B5B54EF60731A50C987341D6294 /* Pods-RxNetwork_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BBF5DA155317CA881B91CF1DDE6EF8F /* Pods-RxNetwork_Example-dummy.m */; }; - F30644E28EACE951945892FE12E511A8 /* Pods-RxNetwork_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A4E724893CF26E0AFE980F6D1A1AF727 /* Pods-RxNetwork_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F37BECF2D90C729642BC497E89CFA0D4 /* TargetType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 090295A8960F13E4BF06C7006FE789A3 /* TargetType.swift */; }; - F41B2EE22AC7AD5EA0546BBBBE51AC5D /* RequestTypeWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A9666320D821EBDA842D0CC1AE1614C /* RequestTypeWrapper.swift */; }; - F53C290D4F59A0DCF5F9C7E19DFE6378 /* TakeWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C7088BE6AE7DA584C096FA59443665F /* TakeWhile.swift */; }; - F5B7FF902215E83B19A5E5A4C2085D4B /* NetworkIndicatorPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7BE029CFC14C6B15BC4DC1C7A179303 /* NetworkIndicatorPlugin.swift */; }; - F667BEF21A2A6AB70F186E8941B01A81 /* Disposables.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D1E4DD19C27C138BBFDE404525C4B82 /* Disposables.swift */; }; - F71789DC91A75033EFB79DB828676451 /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 215370AD25F418C81C587020AC9D68B0 /* Response.swift */; }; - F7679B14121D8747BF7A256A5EBE4EC1 /* Plugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EB932F3D2C3F68D7D82D6E64015C283 /* Plugin.swift */; }; - F913C5A285AC68CF66368D4F804EA6D3 /* MoyaProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51FB867A01D55D3BE97F5860C0EBBEBE /* MoyaProvider.swift */; }; - F9290AB41C51A32A32F046108AE6DA57 /* Generate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8FFF705DCAF8BB6643736848E973DB9 /* Generate.swift */; }; - F938315E9DD7AA367E34CEB718392F0A /* Zip.swift in Sources */ = {isa = PBXBuildFile; fileRef = A960521EC1AC623495B077564407F5B7 /* Zip.swift */; }; - FA800BAF1EDAAD0F282025D829C6EEC7 /* Lock.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22F8E159844A51D84E34FCCD0B6853C /* Lock.swift */; }; - FDEFBF068E959E054E80BC587A76AEB9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; - FE00C77F24CDC030F41AAFC3F6762470 /* ConcurrentMainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 283ED6471DB679456CD734A6E141CF76 /* ConcurrentMainScheduler.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 158F96E735057F8A56F852DE86F4763F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 045F970D8042EC014BA1BCBAD66DD876; - remoteInfo = RxNetwork; - }; - 1B4B49F2AAC6FD8E2902B164286D43C9 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = EA9EA43B3B503823EE36C60D9C8A865F; - remoteInfo = RxSwift; - }; - 41256A3178444B09D7B6DF807B1BA3EF /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 17F9141D333DA1A7BE5937F227221070; - remoteInfo = Moya; - }; - 42E97C6CD26A108F4872386DFF21D7F2 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 9F445FA5AE809C9022E2F9A48325E6AB; - remoteInfo = Storable; - }; - 5210E18E803B371F006D469F7283F550 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = EAAA1AD3A8A1B59AB91319EE40752C6D; - remoteInfo = Alamofire; - }; - 59A4ED76495FD39A306A578DBBDFF562 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 300904838EEDDC3BB8242817D8F97CB6; - remoteInfo = CleanJSON; - }; - 6DC199D91DC93068F7D082ECDD6820BA /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 17F9141D333DA1A7BE5937F227221070; - remoteInfo = Moya; - }; - 712FF6E752334487A0F27CDEAB2DE7B2 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 8E13C526B33E1AD69D45907AC0ED80E5; - remoteInfo = "Pods-RxNetwork_Example"; - }; - C6A90E2682DBF1616B2A2982CDC8C53E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 9F445FA5AE809C9022E2F9A48325E6AB; - remoteInfo = Storable; - }; - DAE2B239DDE1BA2B07400D39A108057F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = EAAA1AD3A8A1B59AB91319EE40752C6D; - remoteInfo = Alamofire; - }; - EDF9F4D0C960DCFB830C799EFBA7B1D7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = EA9EA43B3B503823EE36C60D9C8A865F; - remoteInfo = RxSwift; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 00D6C805D75CAD12E0A30E69B3D72E0E /* Pods-RxNetwork_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RxNetwork_Example-acknowledgements.plist"; sourceTree = ""; }; - 017ED680DB98D60DB2E7143556976543 /* CleanDecoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanDecoder.swift; path = CleanJSON/Classes/CleanDecoder.swift; sourceTree = ""; }; - 01F1F05FFDC43DD6FD101937710A5BC1 /* SwiftSupport.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftSupport.swift; path = RxSwift/SwiftSupport/SwiftSupport.swift; sourceTree = ""; }; - 026854B499760CAED7E8D0783A1CA04E /* VirtualTimeConverterType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeConverterType.swift; path = RxSwift/Schedulers/VirtualTimeConverterType.swift; sourceTree = ""; }; - 038FE19F91DF016528FED78E9115F12F /* SerialDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDisposable.swift; path = RxSwift/Disposables/SerialDisposable.swift; sourceTree = ""; }; - 0535CEBD31800342D461C28837CFCC26 /* RxNetwork.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = RxNetwork.framework; path = RxNetwork.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 059C858334C02C23CC187D952CF29A5A /* Storable.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Storable.modulemap; sourceTree = ""; }; - 064C77F2FA7A326D7EA8D53FA1C437D1 /* CleanJSONDecoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONDecoder.swift; path = CleanJSON/Classes/CleanJSONDecoder.swift; sourceTree = ""; }; - 06E4A17B86B13991A06D2DC3AB7F3FA0 /* Storable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Storable.swift; path = Storable/Classes/Storable.swift; sourceTree = ""; }; - 06ED4CAD705266986228184FEBD4314D /* Range.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Range.swift; path = RxSwift/Observables/Range.swift; sourceTree = ""; }; - 07060027423087C9DEC5DFC4122FF9CE /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; - 07DD9FCDFEDD2558F85CFCFD728C8254 /* ParameterEncoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoder.swift; path = Source/ParameterEncoder.swift; sourceTree = ""; }; - 07EC1ECD525E0CBA56BA47301D8355D0 /* Throttle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Throttle.swift; path = RxSwift/Observables/Throttle.swift; sourceTree = ""; }; - 090295A8960F13E4BF06C7006FE789A3 /* TargetType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TargetType.swift; path = Sources/Moya/TargetType.swift; sourceTree = ""; }; - 09AF3614339D8DFBC367756032AFA679 /* Moya-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Moya-Info.plist"; sourceTree = ""; }; - 09B3AB5E5543F51A3C3E4EA4B410EC5D /* Pods_RxNetwork_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_RxNetwork_Tests.framework; path = "Pods-RxNetwork_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 0AE6037437F12CA130ACE6A16A2CCA06 /* CachingKey+Moya.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CachingKey+Moya.swift"; path = "RxNetwork/Classes/Cacheable/CachingKey+Moya.swift"; sourceTree = ""; }; - 0BBF5DA155317CA881B91CF1DDE6EF8F /* Pods-RxNetwork_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-RxNetwork_Example-dummy.m"; sourceTree = ""; }; - 0BC5936508BB7D22682646A8CB85E7D9 /* AnyObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyObserver.swift; path = RxSwift/AnyObserver.swift; sourceTree = ""; }; - 0C53BC94DCE913089EC4A7560728795F /* Pods-RxNetwork_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-RxNetwork_Tests-dummy.m"; sourceTree = ""; }; - 0C7C46029C2CD9B28F287FA23CB5AF4E /* VirtualTimeScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeScheduler.swift; path = RxSwift/Schedulers/VirtualTimeScheduler.swift; sourceTree = ""; }; - 0CA7D4DC1EE30F6308C2D5F8884C3145 /* Materialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Materialize.swift; path = RxSwift/Observables/Materialize.swift; sourceTree = ""; }; - 106010F786B00382064BEC7285066EAA /* BooleanDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BooleanDisposable.swift; path = RxSwift/Disposables/BooleanDisposable.swift; sourceTree = ""; }; - 108AC4A14D5252C44424D681EE80F4A3 /* MoyaProvider+Defaults.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Defaults.swift"; path = "Sources/Moya/MoyaProvider+Defaults.swift"; sourceTree = ""; }; - 114BFEAEE83F72DCF8BF6D418C63EC48 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; - 1243248DEF75E4E4DB7DB2960DDBAC6F /* RequestTaskMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RequestTaskMap.swift; path = Source/RequestTaskMap.swift; sourceTree = ""; }; - 13B53E6A7802B138B3145753A273F12E /* CleanJSON.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = CleanJSON.modulemap; sourceTree = ""; }; - 13D3427D9F3C5D00EA9CDA4CE91EE091 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Sources/Moya/Response.swift; sourceTree = ""; }; - 146C1142C9648D2BEEC2E9D363828B15 /* Pods-RxNetwork_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-RxNetwork_Example.modulemap"; sourceTree = ""; }; - 14B8FBB0B6028D0AFB547A68866504BB /* RxNetwork-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxNetwork-prefix.pch"; sourceTree = ""; }; - 166E06420075A86024865085456EB41C /* Moya+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Moya+Alamofire.swift"; path = "Sources/Moya/Moya+Alamofire.swift"; sourceTree = ""; }; - 175ADB815798C35EAE61A42C01BAF510 /* Bag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bag.swift; path = Platform/DataStructures/Bag.swift; sourceTree = ""; }; - 1AA6159BDF623D6C60F20E34DCB21069 /* SchedulerServices+Emulation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "SchedulerServices+Emulation.swift"; path = "RxSwift/Schedulers/SchedulerServices+Emulation.swift"; sourceTree = ""; }; - 1B3D0937387DF0D74D9ED5F2210527AE /* AtomicInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AtomicInt.swift; path = Platform/AtomicInt.swift; sourceTree = ""; }; - 1B9DFFBA4375230FEC92CC8AA2FBAC2D /* StoringKey.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StoringKey.swift; path = Storable/Classes/StoringKey.swift; sourceTree = ""; }; - 1D121C06397586C34177246B57D7862B /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = RxNetwork/Classes/Core/Configuration.swift; sourceTree = ""; }; - 1D1E4DD19C27C138BBFDE404525C4B82 /* Disposables.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposables.swift; path = RxSwift/Disposables/Disposables.swift; sourceTree = ""; }; - 1E68285C1E15FC2BCBD42B9A22602FF4 /* Pods-RxNetwork_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-RxNetwork_Tests-acknowledgements.markdown"; sourceTree = ""; }; - 1EA8F908DF549986F05C0056D23F4DCF /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Alamofire.modulemap; sourceTree = ""; }; - 1F876C06D7849AF358641FC077567E9D /* AsMaybe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsMaybe.swift; path = RxSwift/Observables/AsMaybe.swift; sourceTree = ""; }; - 1FCA37674F55BEAA7DB1902D521CB4F7 /* CleanJSONKey.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONKey.swift; path = CleanJSON/Classes/CleanJSONKey.swift; sourceTree = ""; }; - 20D9B49CE2793BFBE289FA0F11F11114 /* Observable+Cache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Cache.swift"; path = "RxNetwork/Classes/Cacheable/Observable+Cache.swift"; sourceTree = ""; }; - 215370AD25F418C81C587020AC9D68B0 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; - 23959528143D698F0E7EA5172E01917A /* ObserverBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverBase.swift; path = RxSwift/Observers/ObserverBase.swift; sourceTree = ""; }; - 24377677E869B58AFF6FC7E269547304 /* Bag+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bag+Rx.swift"; path = "RxSwift/Extensions/Bag+Rx.swift"; sourceTree = ""; }; - 24723368CF70A3495D4B622F759CA9EB /* _CleanJSONDecoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = _CleanJSONDecoder.swift; path = CleanJSON/Classes/_CleanJSONDecoder.swift; sourceTree = ""; }; - 261441859064F36E20C60F6022EDD26C /* ObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableType.swift; path = RxSwift/ObservableType.swift; sourceTree = ""; }; - 263889CE19EB5C22C1DFE6E75BDF5AE9 /* ObserverType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverType.swift; path = RxSwift/ObserverType.swift; sourceTree = ""; }; - 273C2759CA11D4F23ACEFDD6381C2955 /* CleanJSON-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "CleanJSON-Info.plist"; sourceTree = ""; }; - 281236BEC6F709D46DB47B4A36EFCB03 /* Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+arity.swift"; path = "RxSwift/Observables/Zip+arity.swift"; sourceTree = ""; }; - 283ED6471DB679456CD734A6E141CF76 /* ConcurrentMainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentMainScheduler.swift; path = RxSwift/Schedulers/ConcurrentMainScheduler.swift; sourceTree = ""; }; - 285B0CBF6658680D66BC9BA5F9369DB2 /* RxSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = RxSwift.modulemap; sourceTree = ""; }; - 28EFF13A360CFD0623C59A70A02E674D /* Timer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timer.swift; path = RxSwift/Observables/Timer.swift; sourceTree = ""; }; - 2B41D0A0D02B46471976E76243A7002B /* Pods-RxNetwork_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-RxNetwork_Tests.modulemap"; sourceTree = ""; }; - 2B8634B215369599FFBE8D8BEE0A73F0 /* SkipWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipWhile.swift; path = RxSwift/Observables/SkipWhile.swift; sourceTree = ""; }; - 2CDAF23ECDB357B6F54E0D5B23707BDA /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; - 2D5EF00E0D75C20FB6320A6B8BEFFA89 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; - 30D7D6D7FF99869C604E595F16D9C25E /* CleanJSONKeyedDecodingContainer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONKeyedDecodingContainer.swift; path = CleanJSON/Classes/CleanJSONKeyedDecodingContainer.swift; sourceTree = ""; }; - 3366E923B08356C8F918DB061CEE17F6 /* Observable+Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Response.swift"; path = "Sources/RxMoya/Observable+Response.swift"; sourceTree = ""; }; - 33AD91CFFC81D1D4F26F7F9F0FCDE143 /* TargetType+Cache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "TargetType+Cache.swift"; path = "RxNetwork/Classes/Cacheable/TargetType+Cache.swift"; sourceTree = ""; }; - 33B7AE29589319D1045D96DADFD3BF9D /* Moya.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Moya.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 356880B4C0B320DE90D2184D116E44D2 /* MoyaProvider+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Rx.swift"; path = "Sources/RxMoya/MoyaProvider+Rx.swift"; sourceTree = ""; }; - 3710215F4405D61FD1A9C2F0A16B3802 /* StartWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StartWith.swift; path = RxSwift/Observables/StartWith.swift; sourceTree = ""; }; - 3756A9BBE41ABEE8DCBF5BCA6972C4DA /* Moya.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Moya.framework; path = Moya.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 37B911B1EA77CBDF7B73DBDC7BFD06D5 /* Take.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Take.swift; path = RxSwift/Observables/Take.swift; sourceTree = ""; }; - 384F5AB8528B8290F3E142C2CEFBEC4D /* RxNetwork-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxNetwork-umbrella.h"; sourceTree = ""; }; - 391E68D2C7A74AE68CF263AA0C1AAA66 /* GroupedObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupedObservable.swift; path = RxSwift/GroupedObservable.swift; sourceTree = ""; }; - 3B8298BE160EB95F5580C850AB10A7AE /* OperationQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OperationQueueScheduler.swift; path = RxSwift/Schedulers/OperationQueueScheduler.swift; sourceTree = ""; }; - 3CF66E4C2CB94F6F43B1E691EA0E2231 /* Do.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Do.swift; path = RxSwift/Observables/Do.swift; sourceTree = ""; }; - 3F741BA7A1003FC8E14528AEE8234E45 /* Observable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Observable.swift; path = RxSwift/Observable.swift; sourceTree = ""; }; - 3FEE588415252F637ABCB92AE18C00F7 /* RxSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxSwift-dummy.m"; sourceTree = ""; }; - 435339186260EFAE9AE4DA219F7B2773 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Sources/Moya/MultipartFormData.swift; sourceTree = ""; }; - 4396A8A94652826C607D41298EF08C74 /* GroupBy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupBy.swift; path = RxSwift/Observables/GroupBy.swift; sourceTree = ""; }; - 45262C79144217A26F50B3D6B87321CC /* MultipartUpload.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartUpload.swift; path = Source/MultipartUpload.swift; sourceTree = ""; }; - 459C12262C5D16FA761505712BB18C0A /* DecodingError+CleanJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DecodingError+CleanJSON.swift"; path = "CleanJSON/Classes/DecodingError+CleanJSON.swift"; sourceTree = ""; }; - 464A6A21FCFFC435CEB6FF433C2835B6 /* Platform.Linux.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Linux.swift; path = Platform/Platform.Linux.swift; sourceTree = ""; }; - 48176300B238876EC6C9D40BFA40DCF4 /* NopDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NopDisposable.swift; path = RxSwift/Disposables/NopDisposable.swift; sourceTree = ""; }; - 481D7ED739538C7E81FC6264A591FB08 /* ServerTrustEvaluation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustEvaluation.swift; path = Source/ServerTrustEvaluation.swift; sourceTree = ""; }; - 49A2C1D9C92F53AB8857555AA48D8E4F /* AnonymousObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousObserver.swift; path = RxSwift/Observers/AnonymousObserver.swift; sourceTree = ""; }; - 4A9666320D821EBDA842D0CC1AE1614C /* RequestTypeWrapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RequestTypeWrapper.swift; path = Sources/Moya/RequestTypeWrapper.swift; sourceTree = ""; }; - 4BF5B5A5394978EC360C135181E91C7B /* Date+Dispatch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Date+Dispatch.swift"; path = "RxSwift/Date+Dispatch.swift"; sourceTree = ""; }; - 4CB16749A0EBB70E74838BF111C9A79A /* SubscribeOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscribeOn.swift; path = RxSwift/Observables/SubscribeOn.swift; sourceTree = ""; }; - 4CF25362BD77D1C26F575845566A7A52 /* CleanJSON-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CleanJSON-umbrella.h"; sourceTree = ""; }; - 4D1EAD5660345F2842931BB2F20B7114 /* RxMutableBox.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxMutableBox.swift; path = RxSwift/RxMutableBox.swift; sourceTree = ""; }; - 5032057E303F4F9BEBFD1A0BBBAF8D2E /* URLSessionConfiguration+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URLSessionConfiguration+Alamofire.swift"; path = "Source/URLSessionConfiguration+Alamofire.swift"; sourceTree = ""; }; - 505A47D6BE973E8F95746B12D01A9805 /* Pods-RxNetwork_Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RxNetwork_Example-Info.plist"; sourceTree = ""; }; - 5068721A4B673383C14D763B739D0F6A /* ConcurrentDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentDispatchQueueScheduler.swift; path = RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift; sourceTree = ""; }; - 510B47F966CD35AECBAABBAD4972B870 /* CleanJSON-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CleanJSON-dummy.m"; sourceTree = ""; }; - 5156953DD1D83F2B9DF2091FCFCDAEA9 /* RetryWhen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RetryWhen.swift; path = RxSwift/Observables/RetryWhen.swift; sourceTree = ""; }; - 518907B2E3570849B955D56284BE399E /* ValidationType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ValidationType.swift; path = Sources/Moya/ValidationType.swift; sourceTree = ""; }; - 51FB867A01D55D3BE97F5860C0EBBEBE /* MoyaProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaProvider.swift; path = Sources/Moya/MoyaProvider.swift; sourceTree = ""; }; - 52044509C05EFC4E338B319064FC119F /* Empty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Empty.swift; path = RxSwift/Observables/Empty.swift; sourceTree = ""; }; - 53200B222E5F51E904674C0D4BECC7E6 /* URLRequest+Encoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URLRequest+Encoding.swift"; path = "Sources/Moya/URLRequest+Encoding.swift"; sourceTree = ""; }; - 532E2616914679E24F3935C6BA666020 /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; - 5629A419CA6E7BC96DFC091194F7CCDA /* SingleAssignmentDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAssignmentDisposable.swift; path = RxSwift/Disposables/SingleAssignmentDisposable.swift; sourceTree = ""; }; - 57857C02D75DE4B780347BC7585AD918 /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 57E212D5A4117757354B0713D214D3C6 /* DispatchQueue+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Extensions.swift"; path = "Platform/DispatchQueue+Extensions.swift"; sourceTree = ""; }; - 57F11648E65F779A1E00EDA213CED5BF /* JSONAdapter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONAdapter.swift; path = CleanJSON/Classes/JSONAdapter.swift; sourceTree = ""; }; - 584F3E4DE3D7704EDA086ED5308DBAFE /* _CleanJSONDecoder+SingleValueDecodingContainer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "_CleanJSONDecoder+SingleValueDecodingContainer.swift"; path = "CleanJSON/Classes/_CleanJSONDecoder+SingleValueDecodingContainer.swift"; sourceTree = ""; }; - 58B1CF188B3F948B2B9F1FBB25FC492D /* CleanJSONUnkeyedDecodingContainer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONUnkeyedDecodingContainer.swift; path = CleanJSON/Classes/CleanJSONUnkeyedDecodingContainer.swift; sourceTree = ""; }; - 5A1B471AFBB9EE1592CA2F743A068D13 /* String+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Rx.swift"; path = "RxSwift/Extensions/String+Rx.swift"; sourceTree = ""; }; - 5A44EAF6108B38D69C98B832186F762F /* CombineLatest+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+Collection.swift"; path = "RxSwift/Observables/CombineLatest+Collection.swift"; sourceTree = ""; }; - 5CF15DD381BEDD5C680457A3A3C8E7B8 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; - 5D797E9A5C5782CE845840781FA1CC81 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 5DB0DB0B8DD0BA363E2BADCA7C4EB152 /* Sink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sink.swift; path = RxSwift/Observables/Sink.swift; sourceTree = ""; }; - 5F7813E70AFD621E29F61CC11AF7384A /* ShareReplayScope.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareReplayScope.swift; path = RxSwift/Observables/ShareReplayScope.swift; sourceTree = ""; }; - 609EA9D4146C3002A053FD732F25F5C9 /* Pods-RxNetwork_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RxNetwork_Tests.debug.xcconfig"; sourceTree = ""; }; - 61D6CA746419B5F8C8A66C4F282B4A16 /* TakeUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeUntil.swift; path = RxSwift/Observables/TakeUntil.swift; sourceTree = ""; }; - 621E3483BB03CACA14EA24471EE82988 /* DecodingStrategy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DecodingStrategy.swift; path = CleanJSON/Classes/DecodingStrategy.swift; sourceTree = ""; }; - 628BA3C7E3F624B6229544E2A8FFD05A /* RxNetwork-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxNetwork-dummy.m"; sourceTree = ""; }; - 62A0CE3B22BC0B6704044CE6929E2AAF /* Single.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Single.swift; path = RxSwift/Traits/Single.swift; sourceTree = ""; }; - 636C1A4840185C5ED791200F21F1D9A8 /* Pods-RxNetwork_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-RxNetwork_Example-frameworks.sh"; sourceTree = ""; }; - 656236B3BDCA7C4269F4C0012B871A72 /* OperationQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "OperationQueue+Alamofire.swift"; path = "Source/OperationQueue+Alamofire.swift"; sourceTree = ""; }; - 6575CBED40319444DAC29C45231D0ADD /* RedirectHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RedirectHandler.swift; path = Source/RedirectHandler.swift; sourceTree = ""; }; - 65B8757D3ADFD48EAD4CEC21E6CA7506 /* ScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItem.swift; path = RxSwift/Schedulers/Internal/ScheduledItem.swift; sourceTree = ""; }; - 67048AB3FF6627D1617A102F4DA46CC4 /* Pods-RxNetwork_Tests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RxNetwork_Tests-Info.plist"; sourceTree = ""; }; - 68BCEA9418E28101583E11BC73556B8B /* Multicast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multicast.swift; path = RxSwift/Observables/Multicast.swift; sourceTree = ""; }; - 6924568E51FA7C86522CA17AE7C24A61 /* PublishSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PublishSubject.swift; path = RxSwift/Subjects/PublishSubject.swift; sourceTree = ""; }; - 6A6EAEC21684544BD94E4F5F389AE039 /* Event.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Event.swift; path = RxSwift/Event.swift; sourceTree = ""; }; - 6AD4F5F29B9F841EDFCC338661F69C29 /* BehaviorSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BehaviorSubject.swift; path = RxSwift/Subjects/BehaviorSubject.swift; sourceTree = ""; }; - 6BCF8A34F8736405DCAA50FCD656E99E /* Debounce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debounce.swift; path = RxSwift/Observables/Debounce.swift; sourceTree = ""; }; - 6C7088BE6AE7DA584C096FA59443665F /* TakeWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeWhile.swift; path = RxSwift/Observables/TakeWhile.swift; sourceTree = ""; }; - 6E0C66DF27398C5D3096DDAE92D4736D /* ObservableType+PrimitiveSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableType+PrimitiveSequence.swift"; path = "RxSwift/Traits/ObservableType+PrimitiveSequence.swift"; sourceTree = ""; }; - 6EBD7C3BE2D544889C2C44DA82FF75FE /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = RxSwift/Errors.swift; sourceTree = ""; }; - 7199297E549EDE7B1EB1BC3C8F9B9940 /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; - 770E07B9D1850E6653372A7CF36A61AA /* Defaultable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Defaultable.swift; path = CleanJSON/Classes/Defaultable.swift; sourceTree = ""; }; - 7783A297EDC6DB81F3E2923068179F39 /* TailRecursiveSink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TailRecursiveSink.swift; path = RxSwift/Observers/TailRecursiveSink.swift; sourceTree = ""; }; - 779C3CE97C4D1D629211A0D71656A0EF /* Pods_RxNetwork_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_RxNetwork_Example.framework; path = "Pods-RxNetwork_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 77A22401803C87B12D0B1802723F1272 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; - 78265D97A9DC9F491966430125C34339 /* Window.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Window.swift; path = RxSwift/Observables/Window.swift; sourceTree = ""; }; - 7A298A1BD371BDDF1B3E5D7EECC3845E /* Amb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Amb.swift; path = RxSwift/Observables/Amb.swift; sourceTree = ""; }; - 7B6716FB482B8FB850D691E513742282 /* Image.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Image.swift; path = Sources/Moya/Image.swift; sourceTree = ""; }; - 7C331AE4DF911F37FADFBA55C28BDF95 /* URLConvertible+URLRequestConvertible.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URLConvertible+URLRequestConvertible.swift"; path = "Source/URLConvertible+URLRequestConvertible.swift"; sourceTree = ""; }; - 7C8EFFA4AD4EBEEEA1A9C774A7B57920 /* Pods-RxNetwork_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RxNetwork_Tests.release.xcconfig"; sourceTree = ""; }; - 7EB932F3D2C3F68D7D82D6E64015C283 /* Plugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Plugin.swift; path = Sources/Moya/Plugin.swift; sourceTree = ""; }; - 7F3A668BE4FDB860BAF96CAF554A6F83 /* Protector.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Protector.swift; path = Source/Protector.swift; sourceTree = ""; }; - 7F4A9488DF9841A108295CB07FC0A327 /* URLRequest+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URLRequest+Alamofire.swift"; path = "Source/URLRequest+Alamofire.swift"; sourceTree = ""; }; - 7F8CA8FEF001B39393CE02B01F7ABFEF /* CleanJSON.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CleanJSON.xcconfig; sourceTree = ""; }; - 7F9B865C569AE9C16A59190E92AE7900 /* NetworkLoggerPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkLoggerPlugin.swift; path = Sources/Moya/Plugins/NetworkLoggerPlugin.swift; sourceTree = ""; }; - 802FEC40A7AD7F1C1828DAC26D5037E7 /* RxSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-prefix.pch"; sourceTree = ""; }; - 809C5FAB588354C9BA37DC3EAB8CB45C /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = RxSwift.framework; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 80B701110F9D39B161D4B6443680FB85 /* ConnectableObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectableObservableType.swift; path = RxSwift/ConnectableObservableType.swift; sourceTree = ""; }; - 8330A5B5A3E68AD688C14ED063E1C812 /* HTTPHeaders.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HTTPHeaders.swift; path = Source/HTTPHeaders.swift; sourceTree = ""; }; - 837BF293A2A9E426CD22790E32C9C234 /* Deprecated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecated.swift; path = RxSwift/Deprecated.swift; sourceTree = ""; }; - 851D5C9B66C1AB6A9593879B3FE3AA69 /* Queue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Queue.swift; path = Platform/DataStructures/Queue.swift; sourceTree = ""; }; - 8609F5716C4E9428EE5B36B89411E31B /* SchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SchedulerType.swift; path = RxSwift/SchedulerType.swift; sourceTree = ""; }; - 87025F53F29324A0B1EFE02C1FF41EFB /* Moya-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-prefix.pch"; sourceTree = ""; }; - 872AA3F1C2369C28062BEF17B62AA2AF /* InvocableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableType.swift; path = RxSwift/Schedulers/Internal/InvocableType.swift; sourceTree = ""; }; - 8812BDA42BE19B2653B9E7F54A6C7D71 /* Storable-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Storable-dummy.m"; sourceTree = ""; }; - 887DA39FFD9CF440698575DBDBB38533 /* CompactMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompactMap.swift; path = RxSwift/Observables/CompactMap.swift; sourceTree = ""; }; - 8936BBCF5565CBC7816671C7210C68AC /* Single+Cache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Single+Cache.swift"; path = "RxNetwork/Classes/Cacheable/Single+Cache.swift"; sourceTree = ""; }; - 8991A07C83CADA92EC413B79A966B78F /* CombineLatest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CombineLatest.swift; path = RxSwift/Observables/CombineLatest.swift; sourceTree = ""; }; - 8A0C3DC12FBBA8B175445D4B6542FF64 /* Completable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Completable.swift; path = RxSwift/Traits/Completable.swift; sourceTree = ""; }; - 8F8BFE4BE4F8B73C513A7AF3690DA5DB /* Moya-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Moya-dummy.m"; sourceTree = ""; }; - 90E8D676117C6EE98E4505BA03AEC218 /* AddRef.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AddRef.swift; path = RxSwift/Observables/AddRef.swift; sourceTree = ""; }; - 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 91602304913C81BC608AA3B12FA2C240 /* DefaultIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DefaultIfEmpty.swift; path = RxSwift/Observables/DefaultIfEmpty.swift; sourceTree = ""; }; - 918C6D8E9812D83F3F978BE83821D354 /* DistinctUntilChanged.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DistinctUntilChanged.swift; path = RxSwift/Observables/DistinctUntilChanged.swift; sourceTree = ""; }; - 9224BCF600D984030DF4BA9B27515E98 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; - 924A2EC1B9F2476BA368A519BC3C894E /* Moya-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-umbrella.h"; sourceTree = ""; }; - 93351B9F2D4D05A8B32289A223198FC4 /* Moya.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Moya.xcconfig; sourceTree = ""; }; - 9557CF86C29E2FFA60740C0FCBB997F0 /* Repeat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Repeat.swift; path = RxSwift/Observables/Repeat.swift; sourceTree = ""; }; - 9563564A7E1F9DEEC3E8617471D512A7 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; - 957282C5668E6B9BBDC2DC7E772A3CAA /* Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rx.swift; path = RxSwift/Rx.swift; sourceTree = ""; }; - 959132636FAD71C3E674126894F528C9 /* NetworkActivityPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkActivityPlugin.swift; path = Sources/Moya/Plugins/NetworkActivityPlugin.swift; sourceTree = ""; }; - 96EF80B4E2AAAB3DE1D4FADFE78D85A1 /* Switch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Switch.swift; path = RxSwift/Observables/Switch.swift; sourceTree = ""; }; - 97FE73D2B39572EED263A65F22E19FA2 /* PrimitiveSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PrimitiveSequence.swift; path = RxSwift/Traits/PrimitiveSequence.swift; sourceTree = ""; }; - 9C8E26BC97A8DED0530AFC5BD39829CB /* Producer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Producer.swift; path = RxSwift/Observables/Producer.swift; sourceTree = ""; }; - 9D26024B8191EBACE7D8A9880B82804A /* RxSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-umbrella.h"; sourceTree = ""; }; - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 9E860EE8CCAEE984F3560839F7EBB54D /* ObserveOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserveOn.swift; path = RxSwift/Observables/ObserveOn.swift; sourceTree = ""; }; - 9F3DF1FD26065AFB41A53B6BC14F6176 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = RxSwift/Observables/Filter.swift; sourceTree = ""; }; - 9F466DB24369FFA9C876D1159D3EC7B5 /* CompositeDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompositeDisposable.swift; path = RxSwift/Disposables/CompositeDisposable.swift; sourceTree = ""; }; - 9F4F1DCDF05BEB3F04B44C57826B6E9D /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; - A0A898627D00FE18A307ED2F6139887E /* AsyncSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncSubject.swift; path = RxSwift/Subjects/AsyncSubject.swift; sourceTree = ""; }; - A2EE4EDA23D55A1A3A024127D814BDEB /* InvocableScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableScheduledItem.swift; path = RxSwift/Schedulers/Internal/InvocableScheduledItem.swift; sourceTree = ""; }; - A35CC6FC2E1BA6BFB7685C3B3FCBF59A /* CaseDefaultable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CaseDefaultable.swift; path = CleanJSON/Classes/CaseDefaultable.swift; sourceTree = ""; }; - A42080C29AD328E1CC7E761FF82C78D4 /* Concat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Concat.swift; path = RxSwift/Observables/Concat.swift; sourceTree = ""; }; - A477CFE1FB1F7D21971FB8489E55038B /* RefCountDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RefCountDisposable.swift; path = RxSwift/Disposables/RefCountDisposable.swift; sourceTree = ""; }; - A4E724893CF26E0AFE980F6D1A1AF727 /* Pods-RxNetwork_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-RxNetwork_Example-umbrella.h"; sourceTree = ""; }; - A60DF8D4575271044606BEFDCB119757 /* CleanJSON-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CleanJSON-prefix.pch"; sourceTree = ""; }; - A61C9FDA9C2DC77CC66404E5DC5F5839 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; - A6E2ADDF97E331AE3D9E7015B9331F2E /* Reactive.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reactive.swift; path = RxSwift/Reactive.swift; sourceTree = ""; }; - A7BE029CFC14C6B15BC4DC1C7A179303 /* NetworkIndicatorPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkIndicatorPlugin.swift; path = RxNetwork/Classes/Core/NetworkIndicatorPlugin.swift; sourceTree = ""; }; - A84004A757167A55FF499FBA38C96863 /* SynchronizedDisposeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedDisposeType.swift; path = RxSwift/Concurrency/SynchronizedDisposeType.swift; sourceTree = ""; }; - A8FFF705DCAF8BB6643736848E973DB9 /* Generate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generate.swift; path = RxSwift/Observables/Generate.swift; sourceTree = ""; }; - A960521EC1AC623495B077564407F5B7 /* Zip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Zip.swift; path = RxSwift/Observables/Zip.swift; sourceTree = ""; }; - A9CD2C883403FED402CEAF86D47F2869 /* RxNetwork.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = RxNetwork.modulemap; sourceTree = ""; }; - AA2F3406F1AB92C229210DB0D09E5C3C /* ElementAt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ElementAt.swift; path = RxSwift/Observables/ElementAt.swift; sourceTree = ""; }; - AA39293E1B3E2EDE286F008969A48315 /* AnyEncodable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyEncodable.swift; path = Sources/Moya/AnyEncodable.swift; sourceTree = ""; }; - AE2B47586C4F9A49F712AAF2829C0556 /* Disposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposable.swift; path = RxSwift/Disposable.swift; sourceTree = ""; }; - AFFBEA36FF4978E1AE57BEDB7A2BC0AB /* Task.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Task.swift; path = Sources/Moya/Task.swift; sourceTree = ""; }; - B056FB16307BDF73A5E862E88073DF61 /* SubscriptionDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscriptionDisposable.swift; path = RxSwift/Disposables/SubscriptionDisposable.swift; sourceTree = ""; }; - B1B3426F7AF9875D93107A68BD88C6C8 /* DispatchQueueConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DispatchQueueConfiguration.swift; path = RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift; sourceTree = ""; }; - B1C63393F67222B14B2A6A86BBFB3276 /* HistoricalSchedulerTimeConverter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalSchedulerTimeConverter.swift; path = RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift; sourceTree = ""; }; - B26AB0C4DE622914CDFEC21B825AA420 /* ObservableConvertibleType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableConvertibleType.swift; path = RxSwift/ObservableConvertibleType.swift; sourceTree = ""; }; - B2743CDAB975E17560B238D8DA292938 /* DisposeBag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBag.swift; path = RxSwift/Disposables/DisposeBag.swift; sourceTree = ""; }; - B3551DF262187D1203B83BAF9EA48B1F /* AccessTokenPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AccessTokenPlugin.swift; path = Sources/Moya/Plugins/AccessTokenPlugin.swift; sourceTree = ""; }; - B4046BB44E989FA26661B6373203DFCA /* CachedResponseHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CachedResponseHandler.swift; path = Source/CachedResponseHandler.swift; sourceTree = ""; }; - B44AA8B4D28EFEDF548D76837E9809A7 /* RxNetwork.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxNetwork.xcconfig; sourceTree = ""; }; - B47CC1F172167C45762F66717A77796A /* RequestInterceptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RequestInterceptor.swift; path = Source/RequestInterceptor.swift; sourceTree = ""; }; - B558F8F5563D0291BDEB3FECF5DADCBB /* Optional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Optional.swift; path = RxSwift/Observables/Optional.swift; sourceTree = ""; }; - B6BE32335045023EE6863CA98E374280 /* SynchronizedOnType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedOnType.swift; path = RxSwift/Concurrency/SynchronizedOnType.swift; sourceTree = ""; }; - B7328429742CCF5564A4C089C23BAA1E /* Expiry.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expiry.swift; path = Storable/Classes/Expiry.swift; sourceTree = ""; }; - B73D8B762168FDE1579334B98F4B7B6B /* Sequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sequence.swift; path = RxSwift/Observables/Sequence.swift; sourceTree = ""; }; - B7A3B49D4F7F2FC9AEECDD6F8CF67056 /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; - B99FCD857F9FC1E1732BF85DE8B0DAF3 /* AlamofireExtended.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AlamofireExtended.swift; path = Source/AlamofireExtended.swift; sourceTree = ""; }; - BA41BF945051BA5E92804FFAD6DE5491 /* Maybe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Maybe.swift; path = RxSwift/Traits/Maybe.swift; sourceTree = ""; }; - BBA48397A5BDA8966A7BA81238CB6A25 /* RetryPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RetryPolicy.swift; path = Source/RetryPolicy.swift; sourceTree = ""; }; - BBB5CEF94FA9266F39DB2722D92DCF0C /* Delay.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Delay.swift; path = RxSwift/Observables/Delay.swift; sourceTree = ""; }; - BC2CB346ED4ADE0D3CC2B16D179BC8B1 /* OnCache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OnCache.swift; path = RxNetwork/Classes/Cacheable/OnCache.swift; sourceTree = ""; }; - BCEB2D380081D5A0846F66CFCDA36C82 /* RxSwift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "RxSwift-Info.plist"; sourceTree = ""; }; - BD129BB4BC4BEFA673CE5337EDE59F16 /* ObservableType+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableType+Extensions.swift"; path = "RxSwift/ObservableType+Extensions.swift"; sourceTree = ""; }; - BD7A90629DB11EC28A169D2F7F3D632E /* Using.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Using.swift; path = RxSwift/Observables/Using.swift; sourceTree = ""; }; - BDE9E77D94940D5D7DD20415876A3E16 /* Network.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Network.swift; path = RxNetwork/Classes/Core/Network.swift; sourceTree = ""; }; - BE6017678DC20784DE0E2AD55B4F04DB /* Completable+AndThen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Completable+AndThen.swift"; path = "RxSwift/Traits/Completable+AndThen.swift"; sourceTree = ""; }; - BFCC182F14E626EA6111FE97CE9D3956 /* SwitchIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwitchIfEmpty.swift; path = RxSwift/Observables/SwitchIfEmpty.swift; sourceTree = ""; }; - C22E1442CDC1AC958D56F7A1D91D12E2 /* Storable.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Storable.xcconfig; sourceTree = ""; }; - C3B5139E54D26E6D005B206C90FBC49E /* ToJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToJSON.swift; path = CleanJSON/Classes/ToJSON.swift; sourceTree = ""; }; - C3D522855F74589774A16C6462EFD9DF /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; - C4224738F69DE56C01651B8544B7C42F /* ScheduledItemType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItemType.swift; path = RxSwift/Schedulers/Internal/ScheduledItemType.swift; sourceTree = ""; }; - C42D6560638F4754D6A1106E2C119DC9 /* Moya.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Moya.modulemap; sourceTree = ""; }; - C44F817E631EEBC40D7A1AE6F76CE096 /* RecursiveScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveScheduler.swift; path = RxSwift/Schedulers/RecursiveScheduler.swift; sourceTree = ""; }; - C52CC70AAC72FD95F6F5224EC49CB335 /* EventMonitor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EventMonitor.swift; path = Source/EventMonitor.swift; sourceTree = ""; }; - C65AB0ECD9BE59B36B0D287583B430BA /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = RxSwift/Observables/Error.swift; sourceTree = ""; }; - C6DEEA09CCFDE102C00C37E286327774 /* CleanJSONDecodingStorage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONDecodingStorage.swift; path = CleanJSON/Classes/CleanJSONDecodingStorage.swift; sourceTree = ""; }; - C843DC02298710B839ADA338C6B946D9 /* SubjectType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubjectType.swift; path = RxSwift/Subjects/SubjectType.swift; sourceTree = ""; }; - C9B8D43335230764364E9B128FBFEE9C /* Merge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Merge.swift; path = RxSwift/Observables/Merge.swift; sourceTree = ""; }; - CA20847C685812AF00A79990B6BAA989 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; - CA39BBC6D19BBC768D9855F31B730801 /* Pods-RxNetwork_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RxNetwork_Example.debug.xcconfig"; sourceTree = ""; }; - CAAC62BE6A4E6D668AD1A41F2E42B770 /* CombineLatest+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+arity.swift"; path = "RxSwift/Observables/CombineLatest+arity.swift"; sourceTree = ""; }; - CB3EFDC334F6169C56374A5C825DC7B9 /* MoyaProvider+Internal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Internal.swift"; path = "Sources/Moya/MoyaProvider+Internal.swift"; sourceTree = ""; }; - CB8D27833ED4C3A77B842960D1232AF0 /* RxNetwork-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "RxNetwork-Info.plist"; sourceTree = ""; }; - CC2518C82B77E61DD3E771A90D0E705B /* SingleAsync.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAsync.swift; path = RxSwift/Observables/SingleAsync.swift; sourceTree = ""; }; - CCAA7EFDBD65FDF9746A3F061CFFE23A /* DisposeBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBase.swift; path = RxSwift/Disposables/DisposeBase.swift; sourceTree = ""; }; - CDC2A567AC43E17B1DC674A5CF3F39F2 /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; - CDF5778FD5870156AA7E9BBF3B8AB023 /* Scan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scan.swift; path = RxSwift/Observables/Scan.swift; sourceTree = ""; }; - CE7C1B6EB782CFC56290F959830E5184 /* Cancelable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancelable.swift; path = RxSwift/Cancelable.swift; sourceTree = ""; }; - D0B13F674DBE3EFB389C8FC0E0EEBB4C /* RecursiveLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveLock.swift; path = Platform/RecursiveLock.swift; sourceTree = ""; }; - D1DC8D74B0FA822526096B124124CF0D /* MultiTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultiTarget.swift; path = Sources/Moya/MultiTarget.swift; sourceTree = ""; }; - D23BE0DFB80262E1E54C75F46321DA46 /* SerialDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDispatchQueueScheduler.swift; path = RxSwift/Schedulers/SerialDispatchQueueScheduler.swift; sourceTree = ""; }; - D2617C3A7C5B9307CD29E748E3C8A1BE /* Result+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Result+Alamofire.swift"; path = "Source/Result+Alamofire.swift"; sourceTree = ""; }; - D2E61A1FAEAD8564B5C86A1530F30C64 /* Pods-RxNetwork_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-RxNetwork_Example-acknowledgements.markdown"; sourceTree = ""; }; - D326233DC57411A161CE3F1EC3D8F1E3 /* ScheduledDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledDisposable.swift; path = RxSwift/Disposables/ScheduledDisposable.swift; sourceTree = ""; }; - D393291DE590C7D1D4D6ABBE9D7D74D7 /* BinaryDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryDisposable.swift; path = RxSwift/Disposables/BinaryDisposable.swift; sourceTree = ""; }; - D3AF5CD080B1A13647A5A3DED40F55A7 /* Never.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Never.swift; path = RxSwift/Observables/Never.swift; sourceTree = ""; }; - D4AE47EF154E4204A4E65751F8F7E839 /* Just.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Just.swift; path = RxSwift/Observables/Just.swift; sourceTree = ""; }; - D595591C9104D8297D280F60DB59ED40 /* Storable.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Storable.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D6A7300E9EDE897E98A93A55ED03C320 /* AnonymousDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousDisposable.swift; path = RxSwift/Disposables/AnonymousDisposable.swift; sourceTree = ""; }; - D701E95B632E9004418D08A5ADA9C5F9 /* ToArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToArray.swift; path = RxSwift/Observables/ToArray.swift; sourceTree = ""; }; - D81A3288820421CA37D5D3C9485FF92F /* TargetType+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "TargetType+Rx.swift"; path = "RxNetwork/Classes/Core/TargetType+Rx.swift"; sourceTree = ""; }; - D8AFA5D5C8CB619386A03ED83164149D /* Debug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debug.swift; path = RxSwift/Observables/Debug.swift; sourceTree = ""; }; - D8E25A7EBE7D5EF10E1251AEBB1E81C3 /* RxNetwork.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = RxNetwork.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - D8E39A127DC4BE788E64476BC0EA77F1 /* AsyncLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncLock.swift; path = RxSwift/Concurrency/AsyncLock.swift; sourceTree = ""; }; - D914052A2E741D0CEB2EFA59C074014E /* WithLatestFrom.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WithLatestFrom.swift; path = RxSwift/Observables/WithLatestFrom.swift; sourceTree = ""; }; - D9B8AA14A5BB1D0CE3A003CB6A566265 /* CleanJSON.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = CleanJSON.framework; path = CleanJSON.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - DAA477DC2A7EE71C837912B943C66EB9 /* LockOwnerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LockOwnerType.swift; path = RxSwift/Concurrency/LockOwnerType.swift; sourceTree = ""; }; - DB8879EB842575E1579597850C8194E8 /* Zip+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+Collection.swift"; path = "RxSwift/Observables/Zip+Collection.swift"; sourceTree = ""; }; - DC534BF69BF4BEBF349DCF903F148AF1 /* Skip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Skip.swift; path = RxSwift/Observables/Skip.swift; sourceTree = ""; }; - DD446B4044B0702284E4C9270774ADF6 /* Pods-RxNetwork_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-RxNetwork_Tests-umbrella.h"; sourceTree = ""; }; - DD5ABA32F80170199772B819D5F85455 /* Buffer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Buffer.swift; path = RxSwift/Observables/Buffer.swift; sourceTree = ""; }; - DE2B8FDD8649116A6423B52C08577481 /* HTTPMethod.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HTTPMethod.swift; path = Source/HTTPMethod.swift; sourceTree = ""; }; - DE2F73C6F49CA4D7DEBEE113F83AE16F /* Dematerialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Dematerialize.swift; path = RxSwift/Observables/Dematerialize.swift; sourceTree = ""; }; - DEDFBA1EA963A0249C7469CF7238858F /* Timeout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeout.swift; path = RxSwift/Observables/Timeout.swift; sourceTree = ""; }; - DF781C4124DBCD6FD88F02423A0AD64F /* URLEncodedFormEncoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = URLEncodedFormEncoder.swift; path = Source/URLEncodedFormEncoder.swift; sourceTree = ""; }; - DF8253EDCD720F8564FA74414D06E608 /* Storable-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Storable-Info.plist"; sourceTree = ""; }; - DFE1599E8ADF5C735CC90BFB1D717988 /* Reduce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reduce.swift; path = RxSwift/Observables/Reduce.swift; sourceTree = ""; }; - E0FAC347CF1C5BA6C739BC8A7C1CAD5C /* _CleanJSONDecoder+Unbox.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "_CleanJSONDecoder+Unbox.swift"; path = "CleanJSON/Classes/_CleanJSONDecoder+Unbox.swift"; sourceTree = ""; }; - E1BEF04B058DFE32D41D2ADB0346E7B9 /* URL+Moya.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URL+Moya.swift"; path = "Sources/Moya/URL+Moya.swift"; sourceTree = ""; }; - E1F46CEC9A444CD1F2C933728A1A0261 /* Sample.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sample.swift; path = RxSwift/Observables/Sample.swift; sourceTree = ""; }; - E224D5FA50E8F9A78C3C35F72CF74EC6 /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; - E22F8E159844A51D84E34FCCD0B6853C /* Lock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Lock.swift; path = RxSwift/Concurrency/Lock.swift; sourceTree = ""; }; - E35801E05FCED24500A9100CEEFC1717 /* _CleanJSONDecoder+Decode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "_CleanJSONDecoder+Decode.swift"; path = "CleanJSON/Classes/_CleanJSONDecoder+Decode.swift"; sourceTree = ""; }; - E3996058E040B343A27929EBE1CB55BD /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E64F5D693192F855B882C1B714F01BEF /* ReplaySubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ReplaySubject.swift; path = RxSwift/Subjects/ReplaySubject.swift; sourceTree = ""; }; - E697A997BFA592B3F42528C00EE3FCC6 /* Storable-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Storable-umbrella.h"; sourceTree = ""; }; - E7CD28F8D69454F80A6232372E0A5CF1 /* Storable-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Storable-prefix.pch"; sourceTree = ""; }; - E7D427802B6C9CE0319FB85B28FE4B59 /* DelaySubscription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DelaySubscription.swift; path = RxSwift/Observables/DelaySubscription.swift; sourceTree = ""; }; - E82B2D23DD757B33DD7DFF17FBBD42BC /* Cancellable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancellable.swift; path = Sources/Moya/Cancellable.swift; sourceTree = ""; }; - EB2181CDF5E277CC3BF3776D0DE23568 /* SkipUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipUntil.swift; path = RxSwift/Observables/SkipUntil.swift; sourceTree = ""; }; - EB2EE2ECC802C16571D0ED08E3A792F3 /* Create.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Create.swift; path = RxSwift/Observables/Create.swift; sourceTree = ""; }; - EB55F8DE2660F9D0DD03968E5A9E3F6E /* MainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MainScheduler.swift; path = RxSwift/Schedulers/MainScheduler.swift; sourceTree = ""; }; - EBF9E916529EE3C7D211886F849EBE1F /* Storable.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Storable.framework; path = Storable.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - EC60F887979E1A850A662BB6EC3695E2 /* PriorityQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PriorityQueue.swift; path = Platform/DataStructures/PriorityQueue.swift; sourceTree = ""; }; - ED823EC216935E3D6BF084F242AEE0CF /* Pods-RxNetwork_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RxNetwork_Example.release.xcconfig"; sourceTree = ""; }; - EE22375883C8BEE55DFC3B2E0D7FA42A /* MoyaError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaError.swift; path = Sources/Moya/MoyaError.swift; sourceTree = ""; }; - EE628C03C63BF1A17121E68547368A8E /* Pods-RxNetwork_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RxNetwork_Tests-acknowledgements.plist"; sourceTree = ""; }; - EEED6A19AADDA66EDB3FB22EFA38154F /* Session.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Session.swift; path = Source/Session.swift; sourceTree = ""; }; - F1055FDAF365F3DB3904962ECDD1F2F4 /* SynchronizedUnsubscribeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedUnsubscribeType.swift; path = RxSwift/Concurrency/SynchronizedUnsubscribeType.swift; sourceTree = ""; }; - F21E6A56EE23C9B87C6B6D7D5F2C93F1 /* Expirable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expirable.swift; path = Storable/Classes/Expirable.swift; sourceTree = ""; }; - F2510E4501E12CC029C9B3AAB4684F36 /* Catch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catch.swift; path = RxSwift/Observables/Catch.swift; sourceTree = ""; }; - F435A009553E50262C9ADAE649CF4F06 /* RxSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxSwift.xcconfig; sourceTree = ""; }; - F48B7427BBD228A6A0FA6155DB0C4D33 /* Endpoint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Endpoint.swift; path = Sources/Moya/Endpoint.swift; sourceTree = ""; }; - F4AB0C164DB64B572E768E1A47AE2A02 /* TakeLast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeLast.swift; path = RxSwift/Observables/TakeLast.swift; sourceTree = ""; }; - F59C671B78801B06D8D03CA0F85EE28B /* HistoricalScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalScheduler.swift; path = RxSwift/Schedulers/HistoricalScheduler.swift; sourceTree = ""; }; - F67147776750363CBFC3DDD46CBFD28D /* Platform.Darwin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Darwin.swift; path = Platform/Platform.Darwin.swift; sourceTree = ""; }; - F899E1BF5205E554413060E199938E3E /* PrimitiveSequence+Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "PrimitiveSequence+Zip+arity.swift"; path = "RxSwift/Traits/PrimitiveSequence+Zip+arity.swift"; sourceTree = ""; }; - F9F1F93233495F2A608D818473C99A9B /* Alamofire-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Alamofire-Info.plist"; sourceTree = ""; }; - FA9ED278802AC08987B98CCBA8938734 /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; - FAEFD3E93FCBA179CDE905CC9ECA124D /* AsSingle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsSingle.swift; path = RxSwift/Observables/AsSingle.swift; sourceTree = ""; }; - FB57BFEB05E3290A7C495F81D4517E5B /* CredentialsPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CredentialsPlugin.swift; path = Sources/Moya/Plugins/CredentialsPlugin.swift; sourceTree = ""; }; - FB72F82649E5D6FCD8D105BF6E7DD562 /* Single+Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Single+Response.swift"; path = "Sources/RxMoya/Single+Response.swift"; sourceTree = ""; }; - FBA4C0FF6B181176D9058AE1F6333332 /* Deferred.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deferred.swift; path = RxSwift/Observables/Deferred.swift; sourceTree = ""; }; - FBFB17250A60745076A6C9C95C151B4B /* Map.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Map.swift; path = RxSwift/Observables/Map.swift; sourceTree = ""; }; - FC9D4F3ACB956DC78AABC7EF7116512B /* Enumerated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Enumerated.swift; path = RxSwift/Observables/Enumerated.swift; sourceTree = ""; }; - FCAE48409BC07F345CD97CC478FAAF4D /* CurrentThreadScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CurrentThreadScheduler.swift; path = RxSwift/Schedulers/CurrentThreadScheduler.swift; sourceTree = ""; }; - FCF4F6874FC8B9FD31A50E76BA68867A /* First.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = First.swift; path = RxSwift/Observables/First.swift; sourceTree = ""; }; - FD67D8AC270144AC44224D8501D46FBE /* ImmediateSchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmediateSchedulerType.swift; path = RxSwift/ImmediateSchedulerType.swift; sourceTree = ""; }; - FFF748A9DE94AF2910A84704E386E7C4 /* InfiniteSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InfiniteSequence.swift; path = Platform/DataStructures/InfiniteSequence.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 5827CF915CFA7933D0174C302E3A46C7 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A3D6BCEABCC79E04DC1991CB5C3AD3B3 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 591829BF0003CFA563EEC001DF4EC49F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 04BE8EBE8919925CD4718D176E2DBDFE /* Foundation.framework in Frameworks */, - 0774EC3F0D0D32595C320AA3EEEF9422 /* Moya.framework in Frameworks */, - D1E6F6C0078CEE4ABE98162AD229FF85 /* Storable.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 60CDB8270DBB3B9C73EA85D172891759 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - C0BF1AEFE6B98C8E2BC20EC6F4A65A3F /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 679A0B3C9CA76C3A293F6FD5A02C7F16 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - D0B879B08BA15D877B2B281F90B91D04 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7D0E474D62025CE5F16E392E7D87AF3A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - FDEFBF068E959E054E80BC587A76AEB9 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 84C1724A7E970F82428096559396D44F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - D62D993A4677807A496ADEB7A52F6072 /* Alamofire.framework in Frameworks */, - E7EEDB6566BB993101A6BD90444F1B6E /* Foundation.framework in Frameworks */, - AD17EEA35B6F9F92E57C7A81E45C8185 /* RxSwift.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8B0D8633F410345F93419B8C3D7B6916 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 97A168DFB6DB61770CE2DBF4FD39AA8D /* CFNetwork.framework in Frameworks */, - BE82AE980F8C7EE28A6448959194F93A /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8D244E0946A438F1C49031A309164420 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 27D17E9A74CD7336DD27E42FE3A20048 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 053A28646D7CB7F1B3B0B60DCD745C36 /* Support Files */ = { - isa = PBXGroup; - children = ( - 059C858334C02C23CC187D952CF29A5A /* Storable.modulemap */, - C22E1442CDC1AC958D56F7A1D91D12E2 /* Storable.xcconfig */, - 8812BDA42BE19B2653B9E7F54A6C7D71 /* Storable-dummy.m */, - DF8253EDCD720F8564FA74414D06E608 /* Storable-Info.plist */, - E7CD28F8D69454F80A6232372E0A5CF1 /* Storable-prefix.pch */, - E697A997BFA592B3F42528C00EE3FCC6 /* Storable-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/Storable"; - sourceTree = ""; - }; - 05C06891358A349995EF1A37F9C6C676 /* iOS */ = { - isa = PBXGroup; - children = ( - 9224BCF600D984030DF4BA9B27515E98 /* CFNetwork.framework */, - 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */, - ); - name = iOS; - sourceTree = ""; - }; - 0884A170C45A02F55F90F52A31DCAEBF /* Storable */ = { - isa = PBXGroup; - children = ( - F21E6A56EE23C9B87C6B6D7D5F2C93F1 /* Expirable.swift */, - B7328429742CCF5564A4C089C23BAA1E /* Expiry.swift */, - 06E4A17B86B13991A06D2DC3AB7F3FA0 /* Storable.swift */, - 1B9DFFBA4375230FEC92CC8AA2FBAC2D /* StoringKey.swift */, - 053A28646D7CB7F1B3B0B60DCD745C36 /* Support Files */, - ); - name = Storable; - path = Storable; - sourceTree = ""; - }; - 0D57A41272103515A79F3EB3BB355F11 /* Support Files */ = { - isa = PBXGroup; - children = ( - 285B0CBF6658680D66BC9BA5F9369DB2 /* RxSwift.modulemap */, - F435A009553E50262C9ADAE649CF4F06 /* RxSwift.xcconfig */, - 3FEE588415252F637ABCB92AE18C00F7 /* RxSwift-dummy.m */, - BCEB2D380081D5A0846F66CFCDA36C82 /* RxSwift-Info.plist */, - 802FEC40A7AD7F1C1828DAC26D5037E7 /* RxSwift-prefix.pch */, - 9D26024B8191EBACE7D8A9880B82804A /* RxSwift-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/RxSwift"; - sourceTree = ""; - }; - 15E2C5C54A631B70BE62623D551165CB /* Targets Support Files */ = { - isa = PBXGroup; - children = ( - D3671E03E1CF4DA2E197C9564FCBD2DC /* Pods-RxNetwork_Example */, - 43BAE8A929CD18C5347CFB602E32EA17 /* Pods-RxNetwork_Tests */, - ); - name = "Targets Support Files"; - sourceTree = ""; - }; - 263288802A0B47814C74B692C694B3B2 /* Frameworks */ = { - isa = PBXGroup; - children = ( - E3996058E040B343A27929EBE1CB55BD /* Alamofire.framework */, - 33B7AE29589319D1045D96DADFD3BF9D /* Moya.framework */, - 57857C02D75DE4B780347BC7585AD918 /* RxSwift.framework */, - D595591C9104D8297D280F60DB59ED40 /* Storable.framework */, - 05C06891358A349995EF1A37F9C6C676 /* iOS */, - ); - name = Frameworks; - sourceTree = ""; - }; - 3913DB7B3519A3E923E5A287EC3E64C6 /* Core */ = { - isa = PBXGroup; - children = ( - B3551DF262187D1203B83BAF9EA48B1F /* AccessTokenPlugin.swift */, - AA39293E1B3E2EDE286F008969A48315 /* AnyEncodable.swift */, - E82B2D23DD757B33DD7DFF17FBBD42BC /* Cancellable.swift */, - FB57BFEB05E3290A7C495F81D4517E5B /* CredentialsPlugin.swift */, - F48B7427BBD228A6A0FA6155DB0C4D33 /* Endpoint.swift */, - 7B6716FB482B8FB850D691E513742282 /* Image.swift */, - 166E06420075A86024865085456EB41C /* Moya+Alamofire.swift */, - EE22375883C8BEE55DFC3B2E0D7FA42A /* MoyaError.swift */, - 51FB867A01D55D3BE97F5860C0EBBEBE /* MoyaProvider.swift */, - 108AC4A14D5252C44424D681EE80F4A3 /* MoyaProvider+Defaults.swift */, - CB3EFDC334F6169C56374A5C825DC7B9 /* MoyaProvider+Internal.swift */, - 435339186260EFAE9AE4DA219F7B2773 /* MultipartFormData.swift */, - D1DC8D74B0FA822526096B124124CF0D /* MultiTarget.swift */, - 959132636FAD71C3E674126894F528C9 /* NetworkActivityPlugin.swift */, - 7F9B865C569AE9C16A59190E92AE7900 /* NetworkLoggerPlugin.swift */, - 7EB932F3D2C3F68D7D82D6E64015C283 /* Plugin.swift */, - 4A9666320D821EBDA842D0CC1AE1614C /* RequestTypeWrapper.swift */, - 13D3427D9F3C5D00EA9CDA4CE91EE091 /* Response.swift */, - 090295A8960F13E4BF06C7006FE789A3 /* TargetType.swift */, - AFFBEA36FF4978E1AE57BEDB7A2BC0AB /* Task.swift */, - E1BEF04B058DFE32D41D2ADB0346E7B9 /* URL+Moya.swift */, - 53200B222E5F51E904674C0D4BECC7E6 /* URLRequest+Encoding.swift */, - 518907B2E3570849B955D56284BE399E /* ValidationType.swift */, - ); - name = Core; - sourceTree = ""; - }; - 428BE2541BA2110F49A350B1B896C949 /* RxNetwork */ = { - isa = PBXGroup; - children = ( - 88471F3BE7758FA187A04552A5DDD27F /* Cacheable */, - 83D5EC5D270C7564285ABAF817E9EFB2 /* Core */, - 43B371D1488BB32AF38C56F81CEC3D0E /* Pod */, - FFD34C3F2B1C3FFB00829F261F1CEA4A /* Support Files */, - ); - name = RxNetwork; - path = ../..; - sourceTree = ""; - }; - 43B371D1488BB32AF38C56F81CEC3D0E /* Pod */ = { - isa = PBXGroup; - children = ( - 77A22401803C87B12D0B1802723F1272 /* LICENSE */, - 2CDAF23ECDB357B6F54E0D5B23707BDA /* README.md */, - D8E25A7EBE7D5EF10E1251AEBB1E81C3 /* RxNetwork.podspec */, - ); - name = Pod; - sourceTree = ""; - }; - 43BAE8A929CD18C5347CFB602E32EA17 /* Pods-RxNetwork_Tests */ = { - isa = PBXGroup; - children = ( - 2B41D0A0D02B46471976E76243A7002B /* Pods-RxNetwork_Tests.modulemap */, - 1E68285C1E15FC2BCBD42B9A22602FF4 /* Pods-RxNetwork_Tests-acknowledgements.markdown */, - EE628C03C63BF1A17121E68547368A8E /* Pods-RxNetwork_Tests-acknowledgements.plist */, - 0C53BC94DCE913089EC4A7560728795F /* Pods-RxNetwork_Tests-dummy.m */, - 67048AB3FF6627D1617A102F4DA46CC4 /* Pods-RxNetwork_Tests-Info.plist */, - DD446B4044B0702284E4C9270774ADF6 /* Pods-RxNetwork_Tests-umbrella.h */, - 609EA9D4146C3002A053FD732F25F5C9 /* Pods-RxNetwork_Tests.debug.xcconfig */, - 7C8EFFA4AD4EBEEEA1A9C774A7B57920 /* Pods-RxNetwork_Tests.release.xcconfig */, - ); - name = "Pods-RxNetwork_Tests"; - path = "Target Support Files/Pods-RxNetwork_Tests"; - sourceTree = ""; - }; - 5D602395AB4DEC005B9848BD20FFA36E /* Support Files */ = { - isa = PBXGroup; - children = ( - C42D6560638F4754D6A1106E2C119DC9 /* Moya.modulemap */, - 93351B9F2D4D05A8B32289A223198FC4 /* Moya.xcconfig */, - 8F8BFE4BE4F8B73C513A7AF3690DA5DB /* Moya-dummy.m */, - 09AF3614339D8DFBC367756032AFA679 /* Moya-Info.plist */, - 87025F53F29324A0B1EFE02C1FF41EFB /* Moya-prefix.pch */, - 924A2EC1B9F2476BA368A519BC3C894E /* Moya-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/Moya"; - sourceTree = ""; - }; - 69AC987079FF3748558F26660B307385 /* CleanJSON */ = { - isa = PBXGroup; - children = ( - 24723368CF70A3495D4B622F759CA9EB /* _CleanJSONDecoder.swift */, - E35801E05FCED24500A9100CEEFC1717 /* _CleanJSONDecoder+Decode.swift */, - 584F3E4DE3D7704EDA086ED5308DBAFE /* _CleanJSONDecoder+SingleValueDecodingContainer.swift */, - E0FAC347CF1C5BA6C739BC8A7C1CAD5C /* _CleanJSONDecoder+Unbox.swift */, - A35CC6FC2E1BA6BFB7685C3B3FCBF59A /* CaseDefaultable.swift */, - 017ED680DB98D60DB2E7143556976543 /* CleanDecoder.swift */, - 064C77F2FA7A326D7EA8D53FA1C437D1 /* CleanJSONDecoder.swift */, - C6DEEA09CCFDE102C00C37E286327774 /* CleanJSONDecodingStorage.swift */, - 1FCA37674F55BEAA7DB1902D521CB4F7 /* CleanJSONKey.swift */, - 30D7D6D7FF99869C604E595F16D9C25E /* CleanJSONKeyedDecodingContainer.swift */, - 58B1CF188B3F948B2B9F1FBB25FC492D /* CleanJSONUnkeyedDecodingContainer.swift */, - 459C12262C5D16FA761505712BB18C0A /* DecodingError+CleanJSON.swift */, - 621E3483BB03CACA14EA24471EE82988 /* DecodingStrategy.swift */, - 770E07B9D1850E6653372A7CF36A61AA /* Defaultable.swift */, - 57F11648E65F779A1E00EDA213CED5BF /* JSONAdapter.swift */, - C3B5139E54D26E6D005B206C90FBC49E /* ToJSON.swift */, - D1F67AFA3FD23CBD4976415BDB1E7FE7 /* Support Files */, - ); - name = CleanJSON; - path = CleanJSON; - sourceTree = ""; - }; - 6FB78F0D3F4B545153139AFA23D78D47 /* Pods */ = { - isa = PBXGroup; - children = ( - C5476BEA77B58535E76AF262458C22E8 /* Alamofire */, - 69AC987079FF3748558F26660B307385 /* CleanJSON */, - 8720AD644706BBFC191C9DCA7897643A /* Moya */, - D20784E1F8F2357A03C3891876802A29 /* RxSwift */, - 0884A170C45A02F55F90F52A31DCAEBF /* Storable */, - ); - name = Pods; - sourceTree = ""; - }; - 83D5EC5D270C7564285ABAF817E9EFB2 /* Core */ = { - isa = PBXGroup; - children = ( - 1D121C06397586C34177246B57D7862B /* Configuration.swift */, - BDE9E77D94940D5D7DD20415876A3E16 /* Network.swift */, - A7BE029CFC14C6B15BC4DC1C7A179303 /* NetworkIndicatorPlugin.swift */, - D81A3288820421CA37D5D3C9485FF92F /* TargetType+Rx.swift */, - ); - name = Core; - sourceTree = ""; - }; - 8720AD644706BBFC191C9DCA7897643A /* Moya */ = { - isa = PBXGroup; - children = ( - 3913DB7B3519A3E923E5A287EC3E64C6 /* Core */, - 9C42B8CE146641E728A0BF72D6F934E3 /* RxSwift */, - 5D602395AB4DEC005B9848BD20FFA36E /* Support Files */, - ); - name = Moya; - path = Moya; - sourceTree = ""; - }; - 88471F3BE7758FA187A04552A5DDD27F /* Cacheable */ = { - isa = PBXGroup; - children = ( - 0AE6037437F12CA130ACE6A16A2CCA06 /* CachingKey+Moya.swift */, - 20D9B49CE2793BFBE289FA0F11F11114 /* Observable+Cache.swift */, - BC2CB346ED4ADE0D3CC2B16D179BC8B1 /* OnCache.swift */, - 8936BBCF5565CBC7816671C7210C68AC /* Single+Cache.swift */, - 33AD91CFFC81D1D4F26F7F9F0FCDE143 /* TargetType+Cache.swift */, - ); - name = Cacheable; - sourceTree = ""; - }; - 8D0B84232D8DDF0DA1C25047FBD72B31 /* Products */ = { - isa = PBXGroup; - children = ( - 5D797E9A5C5782CE845840781FA1CC81 /* Alamofire.framework */, - D9B8AA14A5BB1D0CE3A003CB6A566265 /* CleanJSON.framework */, - 3756A9BBE41ABEE8DCBF5BCA6972C4DA /* Moya.framework */, - 779C3CE97C4D1D629211A0D71656A0EF /* Pods_RxNetwork_Example.framework */, - 09B3AB5E5543F51A3C3E4EA4B410EC5D /* Pods_RxNetwork_Tests.framework */, - 0535CEBD31800342D461C28837CFCC26 /* RxNetwork.framework */, - 809C5FAB588354C9BA37DC3EAB8CB45C /* RxSwift.framework */, - EBF9E916529EE3C7D211886F849EBE1F /* Storable.framework */, - ); - name = Products; - sourceTree = ""; - }; - 97362DF41331F624AD20379D106DECF8 /* Development Pods */ = { - isa = PBXGroup; - children = ( - 428BE2541BA2110F49A350B1B896C949 /* RxNetwork */, - ); - name = "Development Pods"; - sourceTree = ""; - }; - 9C42B8CE146641E728A0BF72D6F934E3 /* RxSwift */ = { - isa = PBXGroup; - children = ( - 356880B4C0B320DE90D2184D116E44D2 /* MoyaProvider+Rx.swift */, - 3366E923B08356C8F918DB061CEE17F6 /* Observable+Response.swift */, - FB72F82649E5D6FCD8D105BF6E7DD562 /* Single+Response.swift */, - ); - name = RxSwift; - sourceTree = ""; - }; - 9F09D6A1C8668D8D92B15D57D2B09B24 /* Support Files */ = { - isa = PBXGroup; - children = ( - 1EA8F908DF549986F05C0056D23F4DCF /* Alamofire.modulemap */, - 532E2616914679E24F3935C6BA666020 /* Alamofire.xcconfig */, - 114BFEAEE83F72DCF8BF6D418C63EC48 /* Alamofire-dummy.m */, - F9F1F93233495F2A608D818473C99A9B /* Alamofire-Info.plist */, - E224D5FA50E8F9A78C3C35F72CF74EC6 /* Alamofire-prefix.pch */, - C3D522855F74589774A16C6462EFD9DF /* Alamofire-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/Alamofire"; - sourceTree = ""; - }; - C5476BEA77B58535E76AF262458C22E8 /* Alamofire */ = { - isa = PBXGroup; - children = ( - 9F4F1DCDF05BEB3F04B44C57826B6E9D /* AFError.swift */, - 2D5EF00E0D75C20FB6320A6B8BEFFA89 /* Alamofire.swift */, - B99FCD857F9FC1E1732BF85DE8B0DAF3 /* AlamofireExtended.swift */, - B4046BB44E989FA26661B6373203DFCA /* CachedResponseHandler.swift */, - CDC2A567AC43E17B1DC674A5CF3F39F2 /* DispatchQueue+Alamofire.swift */, - C52CC70AAC72FD95F6F5224EC49CB335 /* EventMonitor.swift */, - 8330A5B5A3E68AD688C14ED063E1C812 /* HTTPHeaders.swift */, - DE2B8FDD8649116A6423B52C08577481 /* HTTPMethod.swift */, - 5CF15DD381BEDD5C680457A3A3C8E7B8 /* MultipartFormData.swift */, - 45262C79144217A26F50B3D6B87321CC /* MultipartUpload.swift */, - 9563564A7E1F9DEEC3E8617471D512A7 /* NetworkReachabilityManager.swift */, - B7A3B49D4F7F2FC9AEECDD6F8CF67056 /* Notifications.swift */, - 656236B3BDCA7C4269F4C0012B871A72 /* OperationQueue+Alamofire.swift */, - 07DD9FCDFEDD2558F85CFCFD728C8254 /* ParameterEncoder.swift */, - 7199297E549EDE7B1EB1BC3C8F9B9940 /* ParameterEncoding.swift */, - 7F3A668BE4FDB860BAF96CAF554A6F83 /* Protector.swift */, - 6575CBED40319444DAC29C45231D0ADD /* RedirectHandler.swift */, - 07060027423087C9DEC5DFC4122FF9CE /* Request.swift */, - B47CC1F172167C45762F66717A77796A /* RequestInterceptor.swift */, - 1243248DEF75E4E4DB7DB2960DDBAC6F /* RequestTaskMap.swift */, - 215370AD25F418C81C587020AC9D68B0 /* Response.swift */, - CA20847C685812AF00A79990B6BAA989 /* ResponseSerialization.swift */, - D2617C3A7C5B9307CD29E748E3C8A1BE /* Result+Alamofire.swift */, - BBA48397A5BDA8966A7BA81238CB6A25 /* RetryPolicy.swift */, - 481D7ED739538C7E81FC6264A591FB08 /* ServerTrustEvaluation.swift */, - EEED6A19AADDA66EDB3FB22EFA38154F /* Session.swift */, - FA9ED278802AC08987B98CCBA8938734 /* SessionDelegate.swift */, - 7C331AE4DF911F37FADFBA55C28BDF95 /* URLConvertible+URLRequestConvertible.swift */, - DF781C4124DBCD6FD88F02423A0AD64F /* URLEncodedFormEncoder.swift */, - 7F4A9488DF9841A108295CB07FC0A327 /* URLRequest+Alamofire.swift */, - 5032057E303F4F9BEBFD1A0BBBAF8D2E /* URLSessionConfiguration+Alamofire.swift */, - A61C9FDA9C2DC77CC66404E5DC5F5839 /* Validation.swift */, - 9F09D6A1C8668D8D92B15D57D2B09B24 /* Support Files */, - ); - name = Alamofire; - path = Alamofire; - sourceTree = ""; - }; - CF1408CF629C7361332E53B88F7BD30C = { - isa = PBXGroup; - children = ( - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, - 97362DF41331F624AD20379D106DECF8 /* Development Pods */, - 263288802A0B47814C74B692C694B3B2 /* Frameworks */, - 6FB78F0D3F4B545153139AFA23D78D47 /* Pods */, - 8D0B84232D8DDF0DA1C25047FBD72B31 /* Products */, - 15E2C5C54A631B70BE62623D551165CB /* Targets Support Files */, - ); - sourceTree = ""; - }; - D1F67AFA3FD23CBD4976415BDB1E7FE7 /* Support Files */ = { - isa = PBXGroup; - children = ( - 13B53E6A7802B138B3145753A273F12E /* CleanJSON.modulemap */, - 7F8CA8FEF001B39393CE02B01F7ABFEF /* CleanJSON.xcconfig */, - 510B47F966CD35AECBAABBAD4972B870 /* CleanJSON-dummy.m */, - 273C2759CA11D4F23ACEFDD6381C2955 /* CleanJSON-Info.plist */, - A60DF8D4575271044606BEFDCB119757 /* CleanJSON-prefix.pch */, - 4CF25362BD77D1C26F575845566A7A52 /* CleanJSON-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/CleanJSON"; - sourceTree = ""; - }; - D20784E1F8F2357A03C3891876802A29 /* RxSwift */ = { - isa = PBXGroup; - children = ( - 90E8D676117C6EE98E4505BA03AEC218 /* AddRef.swift */, - 7A298A1BD371BDDF1B3E5D7EECC3845E /* Amb.swift */, - D6A7300E9EDE897E98A93A55ED03C320 /* AnonymousDisposable.swift */, - 49A2C1D9C92F53AB8857555AA48D8E4F /* AnonymousObserver.swift */, - 0BC5936508BB7D22682646A8CB85E7D9 /* AnyObserver.swift */, - 1F876C06D7849AF358641FC077567E9D /* AsMaybe.swift */, - FAEFD3E93FCBA179CDE905CC9ECA124D /* AsSingle.swift */, - D8E39A127DC4BE788E64476BC0EA77F1 /* AsyncLock.swift */, - A0A898627D00FE18A307ED2F6139887E /* AsyncSubject.swift */, - 1B3D0937387DF0D74D9ED5F2210527AE /* AtomicInt.swift */, - 175ADB815798C35EAE61A42C01BAF510 /* Bag.swift */, - 24377677E869B58AFF6FC7E269547304 /* Bag+Rx.swift */, - 6AD4F5F29B9F841EDFCC338661F69C29 /* BehaviorSubject.swift */, - D393291DE590C7D1D4D6ABBE9D7D74D7 /* BinaryDisposable.swift */, - 106010F786B00382064BEC7285066EAA /* BooleanDisposable.swift */, - DD5ABA32F80170199772B819D5F85455 /* Buffer.swift */, - CE7C1B6EB782CFC56290F959830E5184 /* Cancelable.swift */, - F2510E4501E12CC029C9B3AAB4684F36 /* Catch.swift */, - 8991A07C83CADA92EC413B79A966B78F /* CombineLatest.swift */, - CAAC62BE6A4E6D668AD1A41F2E42B770 /* CombineLatest+arity.swift */, - 5A44EAF6108B38D69C98B832186F762F /* CombineLatest+Collection.swift */, - 887DA39FFD9CF440698575DBDBB38533 /* CompactMap.swift */, - 8A0C3DC12FBBA8B175445D4B6542FF64 /* Completable.swift */, - BE6017678DC20784DE0E2AD55B4F04DB /* Completable+AndThen.swift */, - 9F466DB24369FFA9C876D1159D3EC7B5 /* CompositeDisposable.swift */, - A42080C29AD328E1CC7E761FF82C78D4 /* Concat.swift */, - 5068721A4B673383C14D763B739D0F6A /* ConcurrentDispatchQueueScheduler.swift */, - 283ED6471DB679456CD734A6E141CF76 /* ConcurrentMainScheduler.swift */, - 80B701110F9D39B161D4B6443680FB85 /* ConnectableObservableType.swift */, - EB2EE2ECC802C16571D0ED08E3A792F3 /* Create.swift */, - FCAE48409BC07F345CD97CC478FAAF4D /* CurrentThreadScheduler.swift */, - 4BF5B5A5394978EC360C135181E91C7B /* Date+Dispatch.swift */, - 6BCF8A34F8736405DCAA50FCD656E99E /* Debounce.swift */, - D8AFA5D5C8CB619386A03ED83164149D /* Debug.swift */, - 91602304913C81BC608AA3B12FA2C240 /* DefaultIfEmpty.swift */, - FBA4C0FF6B181176D9058AE1F6333332 /* Deferred.swift */, - BBB5CEF94FA9266F39DB2722D92DCF0C /* Delay.swift */, - E7D427802B6C9CE0319FB85B28FE4B59 /* DelaySubscription.swift */, - DE2F73C6F49CA4D7DEBEE113F83AE16F /* Dematerialize.swift */, - 837BF293A2A9E426CD22790E32C9C234 /* Deprecated.swift */, - 57E212D5A4117757354B0713D214D3C6 /* DispatchQueue+Extensions.swift */, - B1B3426F7AF9875D93107A68BD88C6C8 /* DispatchQueueConfiguration.swift */, - AE2B47586C4F9A49F712AAF2829C0556 /* Disposable.swift */, - 1D1E4DD19C27C138BBFDE404525C4B82 /* Disposables.swift */, - B2743CDAB975E17560B238D8DA292938 /* DisposeBag.swift */, - CCAA7EFDBD65FDF9746A3F061CFFE23A /* DisposeBase.swift */, - 918C6D8E9812D83F3F978BE83821D354 /* DistinctUntilChanged.swift */, - 3CF66E4C2CB94F6F43B1E691EA0E2231 /* Do.swift */, - AA2F3406F1AB92C229210DB0D09E5C3C /* ElementAt.swift */, - 52044509C05EFC4E338B319064FC119F /* Empty.swift */, - FC9D4F3ACB956DC78AABC7EF7116512B /* Enumerated.swift */, - C65AB0ECD9BE59B36B0D287583B430BA /* Error.swift */, - 6EBD7C3BE2D544889C2C44DA82FF75FE /* Errors.swift */, - 6A6EAEC21684544BD94E4F5F389AE039 /* Event.swift */, - 9F3DF1FD26065AFB41A53B6BC14F6176 /* Filter.swift */, - FCF4F6874FC8B9FD31A50E76BA68867A /* First.swift */, - A8FFF705DCAF8BB6643736848E973DB9 /* Generate.swift */, - 4396A8A94652826C607D41298EF08C74 /* GroupBy.swift */, - 391E68D2C7A74AE68CF263AA0C1AAA66 /* GroupedObservable.swift */, - F59C671B78801B06D8D03CA0F85EE28B /* HistoricalScheduler.swift */, - B1C63393F67222B14B2A6A86BBFB3276 /* HistoricalSchedulerTimeConverter.swift */, - FD67D8AC270144AC44224D8501D46FBE /* ImmediateSchedulerType.swift */, - FFF748A9DE94AF2910A84704E386E7C4 /* InfiniteSequence.swift */, - A2EE4EDA23D55A1A3A024127D814BDEB /* InvocableScheduledItem.swift */, - 872AA3F1C2369C28062BEF17B62AA2AF /* InvocableType.swift */, - D4AE47EF154E4204A4E65751F8F7E839 /* Just.swift */, - E22F8E159844A51D84E34FCCD0B6853C /* Lock.swift */, - DAA477DC2A7EE71C837912B943C66EB9 /* LockOwnerType.swift */, - EB55F8DE2660F9D0DD03968E5A9E3F6E /* MainScheduler.swift */, - FBFB17250A60745076A6C9C95C151B4B /* Map.swift */, - 0CA7D4DC1EE30F6308C2D5F8884C3145 /* Materialize.swift */, - BA41BF945051BA5E92804FFAD6DE5491 /* Maybe.swift */, - C9B8D43335230764364E9B128FBFEE9C /* Merge.swift */, - 68BCEA9418E28101583E11BC73556B8B /* Multicast.swift */, - D3AF5CD080B1A13647A5A3DED40F55A7 /* Never.swift */, - 48176300B238876EC6C9D40BFA40DCF4 /* NopDisposable.swift */, - 3F741BA7A1003FC8E14528AEE8234E45 /* Observable.swift */, - B26AB0C4DE622914CDFEC21B825AA420 /* ObservableConvertibleType.swift */, - 261441859064F36E20C60F6022EDD26C /* ObservableType.swift */, - BD129BB4BC4BEFA673CE5337EDE59F16 /* ObservableType+Extensions.swift */, - 6E0C66DF27398C5D3096DDAE92D4736D /* ObservableType+PrimitiveSequence.swift */, - 9E860EE8CCAEE984F3560839F7EBB54D /* ObserveOn.swift */, - 23959528143D698F0E7EA5172E01917A /* ObserverBase.swift */, - 263889CE19EB5C22C1DFE6E75BDF5AE9 /* ObserverType.swift */, - 3B8298BE160EB95F5580C850AB10A7AE /* OperationQueueScheduler.swift */, - B558F8F5563D0291BDEB3FECF5DADCBB /* Optional.swift */, - F67147776750363CBFC3DDD46CBFD28D /* Platform.Darwin.swift */, - 464A6A21FCFFC435CEB6FF433C2835B6 /* Platform.Linux.swift */, - 97FE73D2B39572EED263A65F22E19FA2 /* PrimitiveSequence.swift */, - F899E1BF5205E554413060E199938E3E /* PrimitiveSequence+Zip+arity.swift */, - EC60F887979E1A850A662BB6EC3695E2 /* PriorityQueue.swift */, - 9C8E26BC97A8DED0530AFC5BD39829CB /* Producer.swift */, - 6924568E51FA7C86522CA17AE7C24A61 /* PublishSubject.swift */, - 851D5C9B66C1AB6A9593879B3FE3AA69 /* Queue.swift */, - 06ED4CAD705266986228184FEBD4314D /* Range.swift */, - A6E2ADDF97E331AE3D9E7015B9331F2E /* Reactive.swift */, - D0B13F674DBE3EFB389C8FC0E0EEBB4C /* RecursiveLock.swift */, - C44F817E631EEBC40D7A1AE6F76CE096 /* RecursiveScheduler.swift */, - DFE1599E8ADF5C735CC90BFB1D717988 /* Reduce.swift */, - A477CFE1FB1F7D21971FB8489E55038B /* RefCountDisposable.swift */, - 9557CF86C29E2FFA60740C0FCBB997F0 /* Repeat.swift */, - E64F5D693192F855B882C1B714F01BEF /* ReplaySubject.swift */, - 5156953DD1D83F2B9DF2091FCFCDAEA9 /* RetryWhen.swift */, - 957282C5668E6B9BBDC2DC7E772A3CAA /* Rx.swift */, - 4D1EAD5660345F2842931BB2F20B7114 /* RxMutableBox.swift */, - E1F46CEC9A444CD1F2C933728A1A0261 /* Sample.swift */, - CDF5778FD5870156AA7E9BBF3B8AB023 /* Scan.swift */, - D326233DC57411A161CE3F1EC3D8F1E3 /* ScheduledDisposable.swift */, - 65B8757D3ADFD48EAD4CEC21E6CA7506 /* ScheduledItem.swift */, - C4224738F69DE56C01651B8544B7C42F /* ScheduledItemType.swift */, - 1AA6159BDF623D6C60F20E34DCB21069 /* SchedulerServices+Emulation.swift */, - 8609F5716C4E9428EE5B36B89411E31B /* SchedulerType.swift */, - B73D8B762168FDE1579334B98F4B7B6B /* Sequence.swift */, - D23BE0DFB80262E1E54C75F46321DA46 /* SerialDispatchQueueScheduler.swift */, - 038FE19F91DF016528FED78E9115F12F /* SerialDisposable.swift */, - 5F7813E70AFD621E29F61CC11AF7384A /* ShareReplayScope.swift */, - 62A0CE3B22BC0B6704044CE6929E2AAF /* Single.swift */, - 5629A419CA6E7BC96DFC091194F7CCDA /* SingleAssignmentDisposable.swift */, - CC2518C82B77E61DD3E771A90D0E705B /* SingleAsync.swift */, - 5DB0DB0B8DD0BA363E2BADCA7C4EB152 /* Sink.swift */, - DC534BF69BF4BEBF349DCF903F148AF1 /* Skip.swift */, - EB2181CDF5E277CC3BF3776D0DE23568 /* SkipUntil.swift */, - 2B8634B215369599FFBE8D8BEE0A73F0 /* SkipWhile.swift */, - 3710215F4405D61FD1A9C2F0A16B3802 /* StartWith.swift */, - 5A1B471AFBB9EE1592CA2F743A068D13 /* String+Rx.swift */, - C843DC02298710B839ADA338C6B946D9 /* SubjectType.swift */, - 4CB16749A0EBB70E74838BF111C9A79A /* SubscribeOn.swift */, - B056FB16307BDF73A5E862E88073DF61 /* SubscriptionDisposable.swift */, - 01F1F05FFDC43DD6FD101937710A5BC1 /* SwiftSupport.swift */, - 96EF80B4E2AAAB3DE1D4FADFE78D85A1 /* Switch.swift */, - BFCC182F14E626EA6111FE97CE9D3956 /* SwitchIfEmpty.swift */, - A84004A757167A55FF499FBA38C96863 /* SynchronizedDisposeType.swift */, - B6BE32335045023EE6863CA98E374280 /* SynchronizedOnType.swift */, - F1055FDAF365F3DB3904962ECDD1F2F4 /* SynchronizedUnsubscribeType.swift */, - 7783A297EDC6DB81F3E2923068179F39 /* TailRecursiveSink.swift */, - 37B911B1EA77CBDF7B73DBDC7BFD06D5 /* Take.swift */, - F4AB0C164DB64B572E768E1A47AE2A02 /* TakeLast.swift */, - 61D6CA746419B5F8C8A66C4F282B4A16 /* TakeUntil.swift */, - 6C7088BE6AE7DA584C096FA59443665F /* TakeWhile.swift */, - 07EC1ECD525E0CBA56BA47301D8355D0 /* Throttle.swift */, - DEDFBA1EA963A0249C7469CF7238858F /* Timeout.swift */, - 28EFF13A360CFD0623C59A70A02E674D /* Timer.swift */, - D701E95B632E9004418D08A5ADA9C5F9 /* ToArray.swift */, - BD7A90629DB11EC28A169D2F7F3D632E /* Using.swift */, - 026854B499760CAED7E8D0783A1CA04E /* VirtualTimeConverterType.swift */, - 0C7C46029C2CD9B28F287FA23CB5AF4E /* VirtualTimeScheduler.swift */, - 78265D97A9DC9F491966430125C34339 /* Window.swift */, - D914052A2E741D0CEB2EFA59C074014E /* WithLatestFrom.swift */, - A960521EC1AC623495B077564407F5B7 /* Zip.swift */, - 281236BEC6F709D46DB47B4A36EFCB03 /* Zip+arity.swift */, - DB8879EB842575E1579597850C8194E8 /* Zip+Collection.swift */, - 0D57A41272103515A79F3EB3BB355F11 /* Support Files */, - ); - name = RxSwift; - path = RxSwift; - sourceTree = ""; - }; - D3671E03E1CF4DA2E197C9564FCBD2DC /* Pods-RxNetwork_Example */ = { - isa = PBXGroup; - children = ( - 146C1142C9648D2BEEC2E9D363828B15 /* Pods-RxNetwork_Example.modulemap */, - D2E61A1FAEAD8564B5C86A1530F30C64 /* Pods-RxNetwork_Example-acknowledgements.markdown */, - 00D6C805D75CAD12E0A30E69B3D72E0E /* Pods-RxNetwork_Example-acknowledgements.plist */, - 0BBF5DA155317CA881B91CF1DDE6EF8F /* Pods-RxNetwork_Example-dummy.m */, - 636C1A4840185C5ED791200F21F1D9A8 /* Pods-RxNetwork_Example-frameworks.sh */, - 505A47D6BE973E8F95746B12D01A9805 /* Pods-RxNetwork_Example-Info.plist */, - A4E724893CF26E0AFE980F6D1A1AF727 /* Pods-RxNetwork_Example-umbrella.h */, - CA39BBC6D19BBC768D9855F31B730801 /* Pods-RxNetwork_Example.debug.xcconfig */, - ED823EC216935E3D6BF084F242AEE0CF /* Pods-RxNetwork_Example.release.xcconfig */, - ); - name = "Pods-RxNetwork_Example"; - path = "Target Support Files/Pods-RxNetwork_Example"; - sourceTree = ""; - }; - FFD34C3F2B1C3FFB00829F261F1CEA4A /* Support Files */ = { - isa = PBXGroup; - children = ( - A9CD2C883403FED402CEAF86D47F2869 /* RxNetwork.modulemap */, - B44AA8B4D28EFEDF548D76837E9809A7 /* RxNetwork.xcconfig */, - 628BA3C7E3F624B6229544E2A8FFD05A /* RxNetwork-dummy.m */, - CB8D27833ED4C3A77B842960D1232AF0 /* RxNetwork-Info.plist */, - 14B8FBB0B6028D0AFB547A68866504BB /* RxNetwork-prefix.pch */, - 384F5AB8528B8290F3E142C2CEFBEC4D /* RxNetwork-umbrella.h */, - ); - name = "Support Files"; - path = "Example/Pods/Target Support Files/RxNetwork"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 1699665B56976CE5784FE86E7B372CF2 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 485E14141484EF943B5921F0C630C4D2 /* Moya-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1E40659C0D7F98272303BDA940C5303C /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - B90D2337F2914FE4C357BF9742C11E90 /* Pods-RxNetwork_Tests-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4C94722D3DF87E9ACD4556F52450EF9D /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - F30644E28EACE951945892FE12E511A8 /* Pods-RxNetwork_Example-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5AD39CA82382897D0C6A370691AF73AA /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 92603F31AA22939DDB47C2F1DB98F135 /* RxNetwork-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5FC5B8B8B4C152F4C40F5360A4A0FBC4 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 21EF9008F4B0EB4613C90119946A6551 /* CleanJSON-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6E69FE77399BEF61F0EAF20369338485 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 39E6C55935090828DC10A4AB3730B0F4 /* Storable-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A8E36EA9700124B0E95D0F961520943A /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 1349831CA5836315AB830BB7ECBF90E0 /* RxSwift-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - ADDF288DD930A46B5F0F198C225895C9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 00FA97D56201027AEB1C7692A2C3CF8B /* Alamofire-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 045F970D8042EC014BA1BCBAD66DD876 /* RxNetwork */ = { - isa = PBXNativeTarget; - buildConfigurationList = D526726212F21C255A4B53300EC1A763 /* Build configuration list for PBXNativeTarget "RxNetwork" */; - buildPhases = ( - 5AD39CA82382897D0C6A370691AF73AA /* Headers */, - 01DBE76455A1B010C61C9261294CF018 /* Sources */, - 591829BF0003CFA563EEC001DF4EC49F /* Frameworks */, - 430E603E6C7F3943FE379F74C2B61647 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 07B37A26A5696618B1BCC77201252758 /* PBXTargetDependency */, - 343ED74D8B890C2DDF090999B1DC6029 /* PBXTargetDependency */, - ); - name = RxNetwork; - productName = RxNetwork; - productReference = 0535CEBD31800342D461C28837CFCC26 /* RxNetwork.framework */; - productType = "com.apple.product-type.framework"; - }; - 17F9141D333DA1A7BE5937F227221070 /* Moya */ = { - isa = PBXNativeTarget; - buildConfigurationList = 426AA45DD72430F6727D1F1B27EBF289 /* Build configuration list for PBXNativeTarget "Moya" */; - buildPhases = ( - 1699665B56976CE5784FE86E7B372CF2 /* Headers */, - 6AD5A39273D9D222360397FE9B2D132B /* Sources */, - 84C1724A7E970F82428096559396D44F /* Frameworks */, - 8CE10F6529A4B25CCCFB3B2418F2CA0B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - A15A57AB00599F21C12A7E2DEFFF853C /* PBXTargetDependency */, - 7F31606A128F84643A4BF80583F81524 /* PBXTargetDependency */, - ); - name = Moya; - productName = Moya; - productReference = 3756A9BBE41ABEE8DCBF5BCA6972C4DA /* Moya.framework */; - productType = "com.apple.product-type.framework"; - }; - 2000C3DA92C48C77680A1D6D8572AD4B /* Pods-RxNetwork_Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5D54543275A434C97EE54D125EED008A /* Build configuration list for PBXNativeTarget "Pods-RxNetwork_Tests" */; - buildPhases = ( - 1E40659C0D7F98272303BDA940C5303C /* Headers */, - 79638B2057C9B4D6EF460B0FA6BC18A8 /* Sources */, - 5827CF915CFA7933D0174C302E3A46C7 /* Frameworks */, - 36AD5FF9EC478DCBF9F86BA167334C63 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 6F67A69BE5B15A058254AA1ABC37E564 /* PBXTargetDependency */, - ); - name = "Pods-RxNetwork_Tests"; - productName = "Pods-RxNetwork_Tests"; - productReference = 09B3AB5E5543F51A3C3E4EA4B410EC5D /* Pods_RxNetwork_Tests.framework */; - productType = "com.apple.product-type.framework"; - }; - 300904838EEDDC3BB8242817D8F97CB6 /* CleanJSON */ = { - isa = PBXNativeTarget; - buildConfigurationList = F0AD0C3C0F97950439F44C2D42C42CB0 /* Build configuration list for PBXNativeTarget "CleanJSON" */; - buildPhases = ( - 5FC5B8B8B4C152F4C40F5360A4A0FBC4 /* Headers */, - 4AFA60E5280C8187659BBDF794943795 /* Sources */, - 60CDB8270DBB3B9C73EA85D172891759 /* Frameworks */, - C528EDDB9CC603A6385C2D6F1506421B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = CleanJSON; - productName = CleanJSON; - productReference = D9B8AA14A5BB1D0CE3A003CB6A566265 /* CleanJSON.framework */; - productType = "com.apple.product-type.framework"; - }; - 8E13C526B33E1AD69D45907AC0ED80E5 /* Pods-RxNetwork_Example */ = { - isa = PBXNativeTarget; - buildConfigurationList = 278A8DCB634E7A42979AA196F859E78B /* Build configuration list for PBXNativeTarget "Pods-RxNetwork_Example" */; - buildPhases = ( - 4C94722D3DF87E9ACD4556F52450EF9D /* Headers */, - F00C232490417506900E127ED7344503 /* Sources */, - 8D244E0946A438F1C49031A309164420 /* Frameworks */, - 4481DEDCB6B2A3941F3226994974795C /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - FCA358A555CE5E1A32A69B2FE809712A /* PBXTargetDependency */, - 8A89C6DB95BCAFC2F7C5E58CB2DFB7EF /* PBXTargetDependency */, - 382A8440DD2B4609A5EF8A645D84B9C8 /* PBXTargetDependency */, - 6DDBA74C3772E032B73B91ABD36FA5B3 /* PBXTargetDependency */, - 83585899D592A272A6EBC62EDE1ED7B2 /* PBXTargetDependency */, - 2824E3B970C49D9345435CB62E86D265 /* PBXTargetDependency */, - ); - name = "Pods-RxNetwork_Example"; - productName = "Pods-RxNetwork_Example"; - productReference = 779C3CE97C4D1D629211A0D71656A0EF /* Pods_RxNetwork_Example.framework */; - productType = "com.apple.product-type.framework"; - }; - 9F445FA5AE809C9022E2F9A48325E6AB /* Storable */ = { - isa = PBXNativeTarget; - buildConfigurationList = AB031934812F833108688EFC9BABBC3B /* Build configuration list for PBXNativeTarget "Storable" */; - buildPhases = ( - 6E69FE77399BEF61F0EAF20369338485 /* Headers */, - 8BBE5F573FA8EB7F30F91A1523513CA2 /* Sources */, - 679A0B3C9CA76C3A293F6FD5A02C7F16 /* Frameworks */, - 40E7517B63DA2267180CE6D6D290E88E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Storable; - productName = Storable; - productReference = EBF9E916529EE3C7D211886F849EBE1F /* Storable.framework */; - productType = "com.apple.product-type.framework"; - }; - EA9EA43B3B503823EE36C60D9C8A865F /* RxSwift */ = { - isa = PBXNativeTarget; - buildConfigurationList = 82AEBBC70AA17D65EDC8947EED57F401 /* Build configuration list for PBXNativeTarget "RxSwift" */; - buildPhases = ( - A8E36EA9700124B0E95D0F961520943A /* Headers */, - DD179D41E901A4D40F9B6639899A1DD6 /* Sources */, - 7D0E474D62025CE5F16E392E7D87AF3A /* Frameworks */, - DA58BC30DB29990B56348603EF9B1F29 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = RxSwift; - productName = RxSwift; - productReference = 809C5FAB588354C9BA37DC3EAB8CB45C /* RxSwift.framework */; - productType = "com.apple.product-type.framework"; - }; - EAAA1AD3A8A1B59AB91319EE40752C6D /* Alamofire */ = { - isa = PBXNativeTarget; - buildConfigurationList = 6B2B8EC7E21CDBFF2BDA26B1B4AC4C0D /* Build configuration list for PBXNativeTarget "Alamofire" */; - buildPhases = ( - ADDF288DD930A46B5F0F198C225895C9 /* Headers */, - 7349DB0E9BEBE664696F1DCC25226F26 /* Sources */, - 8B0D8633F410345F93419B8C3D7B6916 /* Frameworks */, - 28FC0024B79C28A420D7C4FEBB9E3AEB /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Alamofire; - productName = Alamofire; - productReference = 5D797E9A5C5782CE845840781FA1CC81 /* Alamofire.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - BFDFE7DC352907FC980B868725387E98 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 1100; - LastUpgradeCheck = 1100; - }; - buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = CF1408CF629C7361332E53B88F7BD30C; - productRefGroup = 8D0B84232D8DDF0DA1C25047FBD72B31 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - EAAA1AD3A8A1B59AB91319EE40752C6D /* Alamofire */, - 300904838EEDDC3BB8242817D8F97CB6 /* CleanJSON */, - 17F9141D333DA1A7BE5937F227221070 /* Moya */, - 8E13C526B33E1AD69D45907AC0ED80E5 /* Pods-RxNetwork_Example */, - 2000C3DA92C48C77680A1D6D8572AD4B /* Pods-RxNetwork_Tests */, - 045F970D8042EC014BA1BCBAD66DD876 /* RxNetwork */, - EA9EA43B3B503823EE36C60D9C8A865F /* RxSwift */, - 9F445FA5AE809C9022E2F9A48325E6AB /* Storable */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 28FC0024B79C28A420D7C4FEBB9E3AEB /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 36AD5FF9EC478DCBF9F86BA167334C63 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 40E7517B63DA2267180CE6D6D290E88E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 430E603E6C7F3943FE379F74C2B61647 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4481DEDCB6B2A3941F3226994974795C /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8CE10F6529A4B25CCCFB3B2418F2CA0B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - C528EDDB9CC603A6385C2D6F1506421B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DA58BC30DB29990B56348603EF9B1F29 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 01DBE76455A1B010C61C9261294CF018 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 3EBB3E7924CCFE938B76929457BF23CE /* CachingKey+Moya.swift in Sources */, - 38CF07FCADB03926D1044B3E82BEB60D /* Configuration.swift in Sources */, - 9BC5B6534BBA3A6E9B5CED29CAC0137F /* Network.swift in Sources */, - F5B7FF902215E83B19A5E5A4C2085D4B /* NetworkIndicatorPlugin.swift in Sources */, - D87EC13CC802F87DDC6A53F2C1F7B0D3 /* Observable+Cache.swift in Sources */, - 1C4D7D3091D1D3E44980C2B8BAE3430B /* OnCache.swift in Sources */, - E7BE920F4D2E2E0C7073DD5F7C28B8A9 /* RxNetwork-dummy.m in Sources */, - 46C6A873F48B33D0D2BAEF82CF17DFCC /* Single+Cache.swift in Sources */, - 593DED6A4AC89E3C71F91E6BC5504B57 /* TargetType+Cache.swift in Sources */, - 2884BDC6DBADE015FA465D06FA6300F6 /* TargetType+Rx.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 4AFA60E5280C8187659BBDF794943795 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 091FE0A8C071E11BB7A163E196C2A8CD /* _CleanJSONDecoder+Decode.swift in Sources */, - DD1912BC629BB811B439BAD22E89C665 /* _CleanJSONDecoder+SingleValueDecodingContainer.swift in Sources */, - DE0326CE1EDFDC40B2FE19D76B043A35 /* _CleanJSONDecoder+Unbox.swift in Sources */, - D2704E5203EB1958FF4D12BD149E0AE5 /* _CleanJSONDecoder.swift in Sources */, - E395E421A778BCB85DC5450199F8892B /* CaseDefaultable.swift in Sources */, - E60A5078E790EC5CB37F6FA29495EC3E /* CleanDecoder.swift in Sources */, - 95980779C6D9DD12F0BA681545E185AC /* CleanJSON-dummy.m in Sources */, - 2C1D0CBBA13D012D54497FC3EF998864 /* CleanJSONDecoder.swift in Sources */, - CAE6B2CAF926F5ADD3A19B7989D2F419 /* CleanJSONDecodingStorage.swift in Sources */, - AB0167F07A236FC1D88BDF28C5DF657B /* CleanJSONKey.swift in Sources */, - E23B21DCFF06D63FF04517AE9D9D79C1 /* CleanJSONKeyedDecodingContainer.swift in Sources */, - C5487374F304D945EBDC7CB2830BA45A /* CleanJSONUnkeyedDecodingContainer.swift in Sources */, - CE2EE27DA1623D412DCCCF686520F77C /* DecodingError+CleanJSON.swift in Sources */, - 2AE2ACD4E57C6FF386DEA034A78572D4 /* DecodingStrategy.swift in Sources */, - 11B8A307A4238186C6D8E733D4A5592F /* Defaultable.swift in Sources */, - C7278758EE3C140A29B404CCD186EB56 /* JSONAdapter.swift in Sources */, - 53BC2F344EACCAE8F097DAA4BE505CF9 /* ToJSON.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6AD5A39273D9D222360397FE9B2D132B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A6E54693F4FE0F37FF016CA6F1A4D78B /* AccessTokenPlugin.swift in Sources */, - D8C089847634E593119461FC5006A302 /* AnyEncodable.swift in Sources */, - A7C9DE2DBD28F5122541FD9F11FEEEC6 /* Cancellable.swift in Sources */, - E8FD96EBDB36F2BE905D05F74B0906E5 /* CredentialsPlugin.swift in Sources */, - 648BEC3D1E2FC89ED7487960646A2672 /* Endpoint.swift in Sources */, - 53DF164D8ED7CE192538270A6E44BC5D /* Image.swift in Sources */, - 4A58926B25B353762E5C5E9DDC3663B1 /* Moya+Alamofire.swift in Sources */, - 2F536C2AF3B103298C6C094BB4A7FD37 /* Moya-dummy.m in Sources */, - EF796E0D6E10A60D7B888D1F8F7A0DDE /* MoyaError.swift in Sources */, - A0984EC68B044E44BC79B12DAB62A450 /* MoyaProvider+Defaults.swift in Sources */, - 6E500E09797E690AF9AC5B9511BAC789 /* MoyaProvider+Internal.swift in Sources */, - 4FB1B6D22195C720218293530FB1EF0E /* MoyaProvider+Rx.swift in Sources */, - F913C5A285AC68CF66368D4F804EA6D3 /* MoyaProvider.swift in Sources */, - AABC56D2B22A94FD4F2ACFA194D29FF3 /* MultipartFormData.swift in Sources */, - 7FD07B719F3C7BD7BDEDE04BFC68906A /* MultiTarget.swift in Sources */, - 3D72F53B4DEF14B79BDE94196F072F42 /* NetworkActivityPlugin.swift in Sources */, - B80CE38A2CF000C91F9BEC252DD44B25 /* NetworkLoggerPlugin.swift in Sources */, - 6671D72BE96F05F0BC070530123C1D0E /* Observable+Response.swift in Sources */, - F7679B14121D8747BF7A256A5EBE4EC1 /* Plugin.swift in Sources */, - F41B2EE22AC7AD5EA0546BBBBE51AC5D /* RequestTypeWrapper.swift in Sources */, - 2D64BC669DA212DBF33189D9A750521A /* Response.swift in Sources */, - 3E07E92EB47EDF27A84D979A1A537983 /* Single+Response.swift in Sources */, - F37BECF2D90C729642BC497E89CFA0D4 /* TargetType.swift in Sources */, - 32BE7904E1C29B3CE8C38F9692B75EBC /* Task.swift in Sources */, - 20533020B628BCC085D1E0CBC0FF8455 /* URL+Moya.swift in Sources */, - 73C5F7A686893DD40BC9F5F67539A78B /* URLRequest+Encoding.swift in Sources */, - 5E626665812F7610667D81C73F448189 /* ValidationType.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7349DB0E9BEBE664696F1DCC25226F26 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 17953A9CF2E354B3E69B9ABC2F367AD9 /* AFError.swift in Sources */, - B1C58F6CED7B3E45170711D9ADF878AF /* Alamofire-dummy.m in Sources */, - B788B3354CCEBE56DFDB963CAFD7F6C2 /* Alamofire.swift in Sources */, - 44127C4B989C9CC6A90D78B66A929A5E /* AlamofireExtended.swift in Sources */, - 0AE06C3AEA6CA45342BA703230ABD2CB /* CachedResponseHandler.swift in Sources */, - E9A5AC2F471699CCA516952A5FEB990B /* DispatchQueue+Alamofire.swift in Sources */, - CACBD166E573774FB5613C34AA6DA7A7 /* EventMonitor.swift in Sources */, - 56EC8ED1535DAB987F3D2B71D4C05773 /* HTTPHeaders.swift in Sources */, - B23E9A5CDA31534491226F4C2EE8F8E6 /* HTTPMethod.swift in Sources */, - 5C4A0685B5A201436AB52EF25829B333 /* MultipartFormData.swift in Sources */, - E07BD425C4EA9ADF15DDFCDB10D0B2FB /* MultipartUpload.swift in Sources */, - 7CF8362BA31492053F5CB165637AE117 /* NetworkReachabilityManager.swift in Sources */, - C7369563F6946D8984124E1A546B6425 /* Notifications.swift in Sources */, - 92811AC5CD9A5004116AE43C4E8FD955 /* OperationQueue+Alamofire.swift in Sources */, - 5D61C8ED0DDCC9F8B576B6514B19EE50 /* ParameterEncoder.swift in Sources */, - 14AB7976E100075ADEA0AB1DB833E72D /* ParameterEncoding.swift in Sources */, - 0419772A87B16DB7DCF405A9E77D671F /* Protector.swift in Sources */, - C64AF152F7928CDB59385528DB65FE19 /* RedirectHandler.swift in Sources */, - 6A22C46CB1EDE471794D9AB2AC10327F /* Request.swift in Sources */, - AD9899986955B2EC1EC20818C860C971 /* RequestInterceptor.swift in Sources */, - 48D97BE7D5CAED273BD2341C239CC934 /* RequestTaskMap.swift in Sources */, - F71789DC91A75033EFB79DB828676451 /* Response.swift in Sources */, - 13457FE4E607509A3B9527B0711033D5 /* ResponseSerialization.swift in Sources */, - 4082513A35C682F2193D002C80F72B79 /* Result+Alamofire.swift in Sources */, - D6B2983389480F48F27A0704EEB5DC81 /* RetryPolicy.swift in Sources */, - 0CC43FF0E31AA320ACFEB0FE6239DF34 /* ServerTrustEvaluation.swift in Sources */, - 69ACE4EEE5A8C1C618B22CC1F7B8EF01 /* Session.swift in Sources */, - 42CDB5C986C78BBC8E5C0185F746CABF /* SessionDelegate.swift in Sources */, - 70517C3BAC2D6614347DEAC15299EB84 /* URLConvertible+URLRequestConvertible.swift in Sources */, - 5D12235D061AEE7459279AAF8C348DFE /* URLEncodedFormEncoder.swift in Sources */, - E4E12208D5246E64B7E6CCAE987ADB03 /* URLRequest+Alamofire.swift in Sources */, - AF92602937CA016548022C600B8CDC16 /* URLSessionConfiguration+Alamofire.swift in Sources */, - 06507A26118BA5ACFBBC8C225776920E /* Validation.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 79638B2057C9B4D6EF460B0FA6BC18A8 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E0AF946766FBB7F3FDB2AB58FEF36C70 /* Pods-RxNetwork_Tests-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8BBE5F573FA8EB7F30F91A1523513CA2 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - BFF250A42923627911E09D7AC6DB22DA /* Expirable.swift in Sources */, - BE7099C44978FF09B98008BD066C5877 /* Expiry.swift in Sources */, - 889224D6BE4DDFF5CE706F311BA76BF0 /* Storable-dummy.m in Sources */, - 0B015A56B2FD1136509368B58F130E16 /* Storable.swift in Sources */, - A333BD461518BFCF585D068FB6E9C662 /* StoringKey.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DD179D41E901A4D40F9B6639899A1DD6 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D018312354706A06A0A1D14B36F261E0 /* AddRef.swift in Sources */, - 39032686C6699D0C73F6624B2353153B /* Amb.swift in Sources */, - 72BCCB00F4313283460E23F82D9C03EB /* AnonymousDisposable.swift in Sources */, - 386C181A96676A4F379C4CF2F2630CDB /* AnonymousObserver.swift in Sources */, - 15DE050167BCFC5A853464091B9AA007 /* AnyObserver.swift in Sources */, - 690CADA27732BFA5FC50E02C9DEC59CB /* AsMaybe.swift in Sources */, - 5AFA1C90693120F18B64A46697EFE3E9 /* AsSingle.swift in Sources */, - C7B19143F080448BBA1DCDE85190E987 /* AsyncLock.swift in Sources */, - ACEEAB591378F919B3C3B73ABBB644D4 /* AsyncSubject.swift in Sources */, - 836193127A436104FABBC1A1666CA5EC /* AtomicInt.swift in Sources */, - 58B49162649FA9E9D9488581E8C4C8CC /* Bag+Rx.swift in Sources */, - 238E56DC535790541C2F3579A5A05AE8 /* Bag.swift in Sources */, - 427A0635A2E6E28B4A3A816E242B4E37 /* BehaviorSubject.swift in Sources */, - 89CF1DF0CAF754571AACBDEFF789074F /* BinaryDisposable.swift in Sources */, - 40C99AD4D80E7AE683F69BD28F77864A /* BooleanDisposable.swift in Sources */, - D054281638C6770D95265DC499C0ED96 /* Buffer.swift in Sources */, - 16B528E1AC9C664E75440FE4A34497E2 /* Cancelable.swift in Sources */, - AD196E6B5826847D4CD2CF688F0670B4 /* Catch.swift in Sources */, - ECFC62A33C1002B1AD46222513ED9FEF /* CombineLatest+arity.swift in Sources */, - 2B5F202260E63B8BA44425778ADFC4B5 /* CombineLatest+Collection.swift in Sources */, - DB4AC9C9764AB262D9E2629768BD59DA /* CombineLatest.swift in Sources */, - 3AE2A890E38BBF1090C56D1F71DD7BEC /* CompactMap.swift in Sources */, - 4DBEBC1C46655FE4482E162B0F962E7C /* Completable+AndThen.swift in Sources */, - EB2566DE832D8CBCF4A1C9EEFB5E4D6C /* Completable.swift in Sources */, - 43FDF5ABE2F18F0B5C933E70C17A809C /* CompositeDisposable.swift in Sources */, - A8921779A0B03A8843F04CB531310210 /* Concat.swift in Sources */, - 450C5E66131BFB4BC0C131E5A59116F6 /* ConcurrentDispatchQueueScheduler.swift in Sources */, - FE00C77F24CDC030F41AAFC3F6762470 /* ConcurrentMainScheduler.swift in Sources */, - 24D8CBA3A7CE6C4670EF7C46D057C55C /* ConnectableObservableType.swift in Sources */, - AC3CB3488A34461DAD252DE4A373C4CB /* Create.swift in Sources */, - 35AAA0FF9EC67EAB5504B30080B271B8 /* CurrentThreadScheduler.swift in Sources */, - 61C0D630EB56761025C8642CC43430C4 /* Date+Dispatch.swift in Sources */, - 9CF9C6A4350CE1B03447B5247F84C2E8 /* Debounce.swift in Sources */, - 6730DF6ABF6A785543DA3001108F5749 /* Debug.swift in Sources */, - 04796344A7C95D584655C5566DEACC6C /* DefaultIfEmpty.swift in Sources */, - CE9E7F1B6C1023ABFD65C8E82C04C13C /* Deferred.swift in Sources */, - C7A9B57B2343036C600D088D5F8FF536 /* Delay.swift in Sources */, - 36E9AAC8889EAE48797EA35F978BABFE /* DelaySubscription.swift in Sources */, - D0D4408146D541C73AF89DC5A18EAAF8 /* Dematerialize.swift in Sources */, - 20ABCF3A27659A9F98E3B2DF11A3E6FC /* Deprecated.swift in Sources */, - 3CAC4510987ECD76E66C8436897B7E5E /* DispatchQueue+Extensions.swift in Sources */, - 162E961BCA06B5856EBE1128F5B578CD /* DispatchQueueConfiguration.swift in Sources */, - C940142C7BF894844C1732C987EB3A65 /* Disposable.swift in Sources */, - F667BEF21A2A6AB70F186E8941B01A81 /* Disposables.swift in Sources */, - C76CF711EC8ED2795A3E431CE9125EB1 /* DisposeBag.swift in Sources */, - BEA9AC162B40BA3879ECE9D7CD49133C /* DisposeBase.swift in Sources */, - 9E0E8CA8EF7D5975C391DFCC303F72C3 /* DistinctUntilChanged.swift in Sources */, - 20006DEED67151188A24C6723CF7B230 /* Do.swift in Sources */, - 8D008A4A3B54969F4FFE915C65C9066D /* ElementAt.swift in Sources */, - B10BAC99F09C0D1E119B11DAAF9F4F2E /* Empty.swift in Sources */, - 69D4126F929F0FDB43A0F44D653FF09F /* Enumerated.swift in Sources */, - B306FA316BF5EECF582CAF821E0696DE /* Error.swift in Sources */, - D2E4CA856C232F0C1ED1E3FAF6A67FE8 /* Errors.swift in Sources */, - 4347316F35AE1AE0AC7A6BE5C92E885B /* Event.swift in Sources */, - EF87506B5CB7A49F7ACE0CB35B79B8E8 /* Filter.swift in Sources */, - B5AB337ACA26EB58FE7ED9A13F3402D1 /* First.swift in Sources */, - F9290AB41C51A32A32F046108AE6DA57 /* Generate.swift in Sources */, - 74AA78DE1FABC94DA40AE8E40A76087F /* GroupBy.swift in Sources */, - 471D3D6EDE67F8F777383DC780F4EB47 /* GroupedObservable.swift in Sources */, - EA766C3FABE829E8249206FE33266C0D /* HistoricalScheduler.swift in Sources */, - 8805B3A385FF612893183012DF14AA9B /* HistoricalSchedulerTimeConverter.swift in Sources */, - 537150742875A0BC7F10C7AEA95E90A0 /* ImmediateSchedulerType.swift in Sources */, - E2D712F3F96DB7FDB9AB571FA4547707 /* InfiniteSequence.swift in Sources */, - 5398591055AC984105B2FC37BCD5C635 /* InvocableScheduledItem.swift in Sources */, - C4962311BA5AD3FB8E0AFA1A5BC969BA /* InvocableType.swift in Sources */, - 2679D07BD27F89352BA304303224430D /* Just.swift in Sources */, - FA800BAF1EDAAD0F282025D829C6EEC7 /* Lock.swift in Sources */, - 21B0F16982CCF2E0C9D290177BB1F095 /* LockOwnerType.swift in Sources */, - 08C0D8E4EE5E91B97FDA34C8B1B84AC2 /* MainScheduler.swift in Sources */, - D1DB16A8ADF6F23A90784AE6D0F48371 /* Map.swift in Sources */, - CEF522F304C821113FA3C11E91D33802 /* Materialize.swift in Sources */, - 5595FBEF79641901DEF6630C8B3E44D0 /* Maybe.swift in Sources */, - 807F55A7D4A09A2DCD5FB64D59AF7FB1 /* Merge.swift in Sources */, - 2FF96A3B5939EC3BF89F1B6EA7839065 /* Multicast.swift in Sources */, - 67C3B90FFD52B59583EFDF7A34559C5C /* Never.swift in Sources */, - BDA6A52A11AA3D5962391C1EFFE2B09D /* NopDisposable.swift in Sources */, - C77C88909376758350D2DFA86B5FFDCE /* Observable.swift in Sources */, - E79031377EE6EBE1EF70ED35CFFE96EF /* ObservableConvertibleType.swift in Sources */, - 73C77120B878115966FC5AA9AF36E91A /* ObservableType+Extensions.swift in Sources */, - 398F7FA52F7E61329E0874F5668BF5EF /* ObservableType+PrimitiveSequence.swift in Sources */, - 884CB47932E14ADFBC8C13061807316A /* ObservableType.swift in Sources */, - B1282BAF91224397F6AAFB577C341E6A /* ObserveOn.swift in Sources */, - C1356059527754C583D52890E12D9255 /* ObserverBase.swift in Sources */, - 22E5874E46AC1CE4CBC8FC662CC55C0C /* ObserverType.swift in Sources */, - 995FBC0C424C25F7FA6F2BF1245A8D4C /* OperationQueueScheduler.swift in Sources */, - AE9A449328CF627474BC5A22DD12ADEB /* Optional.swift in Sources */, - B72D290CF07850A2B7CF41CEF3FDF3E0 /* Platform.Darwin.swift in Sources */, - 567943E7E3072AC8F5ADAA9E66E21F92 /* Platform.Linux.swift in Sources */, - 6810CEB9E126BD33B8A01E79B7D9301D /* PrimitiveSequence+Zip+arity.swift in Sources */, - BD65127B566C666A67DA98E0AF329A15 /* PrimitiveSequence.swift in Sources */, - 6C5C7C4BB1EFDA1970D4F47C1193399F /* PriorityQueue.swift in Sources */, - 15CB34CE32F8F418ADA0AFEB4586C4AF /* Producer.swift in Sources */, - 846AF5592D7EBDCB05E9AB0879BF1342 /* PublishSubject.swift in Sources */, - 9F264F1A2FF3521FD1F62A4539DC1FAB /* Queue.swift in Sources */, - 5F59200B0DD426BE83DEC34E67AAE564 /* Range.swift in Sources */, - 61D67D39B1D51B9D51B8B9F4D1911428 /* Reactive.swift in Sources */, - 52C34E90DCA475F252D13959B66066EB /* RecursiveLock.swift in Sources */, - B03D2733E568FB51D6C8B0F23F5C3AAD /* RecursiveScheduler.swift in Sources */, - 1C387C185F4BBBE1283A5BED5ABA27DF /* Reduce.swift in Sources */, - 4B66393BC7CD9C62F326692C1B4E5358 /* RefCountDisposable.swift in Sources */, - CC822EB8650E011340BDAD6708E10E74 /* Repeat.swift in Sources */, - 0382B21403508B99FF3327D56E0AF692 /* ReplaySubject.swift in Sources */, - 482971279D142473EEE3991BDE7BA1CE /* RetryWhen.swift in Sources */, - 0532D2ACCD5650B6FBF59C260047C3F5 /* Rx.swift in Sources */, - 3C49040F90772F3D25A7967CB2244A97 /* RxMutableBox.swift in Sources */, - E839BCEAF6403EA464B4B2EF0518FA3D /* RxSwift-dummy.m in Sources */, - 2FD5653F8A16107C1CF16BD0016D464B /* Sample.swift in Sources */, - 577F13C1954C9B6A65959FA98CC84FCD /* Scan.swift in Sources */, - 7337FA6C4A3F6F1FC203606E918BA5F4 /* ScheduledDisposable.swift in Sources */, - BD12A82F374994FCD0AAE6ACA3533A8A /* ScheduledItem.swift in Sources */, - C3EA56C32F615BD7A8917A776DDAE597 /* ScheduledItemType.swift in Sources */, - 90C9147FE061B924EAF20E15E79E543C /* SchedulerServices+Emulation.swift in Sources */, - 3C948C15D45C1ACB43D0109AD150DD37 /* SchedulerType.swift in Sources */, - 67098130C1E0A29A2767D913D6B521EE /* Sequence.swift in Sources */, - 7AED67E1C3B95CF7A4628FBB5335ECC2 /* SerialDispatchQueueScheduler.swift in Sources */, - 167BAD406FED0F1C1E58A64F5D4AAE6E /* SerialDisposable.swift in Sources */, - 9199D578DD7861D9874762A1226074DA /* ShareReplayScope.swift in Sources */, - 2374D677D92A5059C3149F389B92CA5D /* Single.swift in Sources */, - 5A7D72019BD3B4DCB3123D94F69AB898 /* SingleAssignmentDisposable.swift in Sources */, - 599F0F563C3326C12B41D933F5F80C51 /* SingleAsync.swift in Sources */, - BDB2620B10B258173458D6E1B6F871E2 /* Sink.swift in Sources */, - 1F9AA48E0CE3132EAA10C2778F554B7E /* Skip.swift in Sources */, - 4C9F9203E47771CF126244603AC7010E /* SkipUntil.swift in Sources */, - B8CBBB4C1BE72997572539B3B23CDD7E /* SkipWhile.swift in Sources */, - 2A0B7C366BEF1DA021BBF70D5024627E /* StartWith.swift in Sources */, - B7340AE5CCDA0D48032E76FD2EACABD1 /* String+Rx.swift in Sources */, - AC991769A1E70432F1438665B7A20D3C /* SubjectType.swift in Sources */, - B6B5DD46569F622E8065D405F8F8B124 /* SubscribeOn.swift in Sources */, - 5856209957EE2833E86DB346D25BAB3A /* SubscriptionDisposable.swift in Sources */, - DA30B0D76146C936010244CCEEA3E7E6 /* SwiftSupport.swift in Sources */, - E45A738555CB47EDFF9F8F1336E44205 /* Switch.swift in Sources */, - DC1C500659E2AAF20EF85D4E49666A66 /* SwitchIfEmpty.swift in Sources */, - 40BAAA426379DB35F2487D7074F4F7A1 /* SynchronizedDisposeType.swift in Sources */, - 10B973D93FB221BD387B7C658F77D443 /* SynchronizedOnType.swift in Sources */, - EFC3E2419DC3305F2BBF3082B92BBD1F /* SynchronizedUnsubscribeType.swift in Sources */, - B9BCC87C90F47AD8B8FE81CF3F1F251A /* TailRecursiveSink.swift in Sources */, - 445F4CB3833C4C1858A745645C25AD2C /* Take.swift in Sources */, - D358A8F8B661F0355556D2EF36E67A78 /* TakeLast.swift in Sources */, - 2F0D3D2291277275F604063A788360FA /* TakeUntil.swift in Sources */, - F53C290D4F59A0DCF5F9C7E19DFE6378 /* TakeWhile.swift in Sources */, - 99AE91F0464A31E006B4DF77EF20893E /* Throttle.swift in Sources */, - B45AA223B98773B1565A927496E07F51 /* Timeout.swift in Sources */, - 7E5D7EB916869F933BE3C5B7EA96980C /* Timer.swift in Sources */, - 9826034176E96C9E474E072E83C8A358 /* ToArray.swift in Sources */, - 7EA2F5473AFD81C74A2876C2C978FB02 /* Using.swift in Sources */, - 9834C2A01D4C3A7727BE17AA6A5512CD /* VirtualTimeConverterType.swift in Sources */, - 7BD6C758E1C3B0DA760A112A98FD921D /* VirtualTimeScheduler.swift in Sources */, - 4E324C8232C73ACE88495E322AF4A10D /* Window.swift in Sources */, - E25BE67AB5EAAAB182751B0A5DE2B9F2 /* WithLatestFrom.swift in Sources */, - 5977E90645BBB23BBEAF8FA758A855AC /* Zip+arity.swift in Sources */, - ED6455829FB837C6D4E391C2A9827C93 /* Zip+Collection.swift in Sources */, - F938315E9DD7AA367E34CEB718392F0A /* Zip.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F00C232490417506900E127ED7344503 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - F0A03B5B54EF60731A50C987341D6294 /* Pods-RxNetwork_Example-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 07B37A26A5696618B1BCC77201252758 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Moya; - target = 17F9141D333DA1A7BE5937F227221070 /* Moya */; - targetProxy = 41256A3178444B09D7B6DF807B1BA3EF /* PBXContainerItemProxy */; - }; - 2824E3B970C49D9345435CB62E86D265 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Storable; - target = 9F445FA5AE809C9022E2F9A48325E6AB /* Storable */; - targetProxy = C6A90E2682DBF1616B2A2982CDC8C53E /* PBXContainerItemProxy */; - }; - 343ED74D8B890C2DDF090999B1DC6029 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Storable; - target = 9F445FA5AE809C9022E2F9A48325E6AB /* Storable */; - targetProxy = 42E97C6CD26A108F4872386DFF21D7F2 /* PBXContainerItemProxy */; - }; - 382A8440DD2B4609A5EF8A645D84B9C8 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Moya; - target = 17F9141D333DA1A7BE5937F227221070 /* Moya */; - targetProxy = 6DC199D91DC93068F7D082ECDD6820BA /* PBXContainerItemProxy */; - }; - 6DDBA74C3772E032B73B91ABD36FA5B3 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RxNetwork; - target = 045F970D8042EC014BA1BCBAD66DD876 /* RxNetwork */; - targetProxy = 158F96E735057F8A56F852DE86F4763F /* PBXContainerItemProxy */; - }; - 6F67A69BE5B15A058254AA1ABC37E564 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "Pods-RxNetwork_Example"; - target = 8E13C526B33E1AD69D45907AC0ED80E5 /* Pods-RxNetwork_Example */; - targetProxy = 712FF6E752334487A0F27CDEAB2DE7B2 /* PBXContainerItemProxy */; - }; - 7F31606A128F84643A4BF80583F81524 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RxSwift; - target = EA9EA43B3B503823EE36C60D9C8A865F /* RxSwift */; - targetProxy = EDF9F4D0C960DCFB830C799EFBA7B1D7 /* PBXContainerItemProxy */; - }; - 83585899D592A272A6EBC62EDE1ED7B2 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RxSwift; - target = EA9EA43B3B503823EE36C60D9C8A865F /* RxSwift */; - targetProxy = 1B4B49F2AAC6FD8E2902B164286D43C9 /* PBXContainerItemProxy */; - }; - 8A89C6DB95BCAFC2F7C5E58CB2DFB7EF /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = CleanJSON; - target = 300904838EEDDC3BB8242817D8F97CB6 /* CleanJSON */; - targetProxy = 59A4ED76495FD39A306A578DBBDFF562 /* PBXContainerItemProxy */; - }; - A15A57AB00599F21C12A7E2DEFFF853C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Alamofire; - target = EAAA1AD3A8A1B59AB91319EE40752C6D /* Alamofire */; - targetProxy = 5210E18E803B371F006D469F7283F550 /* PBXContainerItemProxy */; - }; - FCA358A555CE5E1A32A69B2FE809712A /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Alamofire; - target = EAAA1AD3A8A1B59AB91319EE40752C6D /* Alamofire */; - targetProxy = DAE2B239DDE1BA2B07400D39A108057F /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 00319A2330DC739FCBFBB6CFB0C5F58D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 532E2616914679E24F3935C6BA666020 /* Alamofire.xcconfig */; - buildSettings = { - 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; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Alamofire-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - PRODUCT_MODULE_NAME = Alamofire; - PRODUCT_NAME = Alamofire; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.1; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 0271F93A77CEDCDE9E4DE6BB7FC2239E /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B44AA8B4D28EFEDF548D76837E9809A7 /* RxNetwork.xcconfig */; - buildSettings = { - 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; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/RxNetwork/RxNetwork-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxNetwork/RxNetwork-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/RxNetwork/RxNetwork.modulemap"; - PRODUCT_MODULE_NAME = RxNetwork; - PRODUCT_NAME = RxNetwork; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 0582F4263E260BE2ED193AB5BE1204BA /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 609EA9D4146C3002A053FD732F25F5C9 /* Pods-RxNetwork_Tests.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; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.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; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 196DFA3E4A09A28224918543529A1885 /* 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; - 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; - 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 = 5.0; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - 22E675D42EEF580A1C7066470F23EDBA /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = C22E1442CDC1AC958D56F7A1D91D12E2 /* Storable.xcconfig */; - buildSettings = { - 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; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Storable/Storable-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Storable/Storable-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Storable/Storable.modulemap"; - PRODUCT_MODULE_NAME = Storable; - PRODUCT_NAME = Storable; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 23012773EE73B2C30ECC302A8AC15B9F /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F435A009553E50262C9ADAE649CF4F06 /* 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; - 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/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 = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 3630C930522572B8ED7CB6238B8B2BE2 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7F8CA8FEF001B39393CE02B01F7ABFEF /* CleanJSON.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/CleanJSON/CleanJSON-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/CleanJSON/CleanJSON-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/CleanJSON/CleanJSON.modulemap"; - PRODUCT_MODULE_NAME = CleanJSON; - PRODUCT_NAME = CleanJSON; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 4E1F17CEAB0B61D7B56146A3CB42AC7F /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B44AA8B4D28EFEDF548D76837E9809A7 /* RxNetwork.xcconfig */; - buildSettings = { - 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; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/RxNetwork/RxNetwork-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxNetwork/RxNetwork-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/RxNetwork/RxNetwork.modulemap"; - PRODUCT_MODULE_NAME = RxNetwork; - PRODUCT_NAME = RxNetwork; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 4FC89E54D80D64E72FD431BC306367BA /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = F435A009553E50262C9ADAE649CF4F06 /* 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; - 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/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 = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 5808F9277B53A1AFD414F3BB0BF8EE91 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 93351B9F2D4D05A8B32289A223198FC4 /* Moya.xcconfig */; - buildSettings = { - 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; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Moya/Moya-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Moya/Moya-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Moya/Moya.modulemap"; - PRODUCT_MODULE_NAME = Moya; - PRODUCT_NAME = Moya; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 76AF589767DEA07382EAB401F6BA30E4 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7C8EFFA4AD4EBEEEA1A9C774A7B57920 /* Pods-RxNetwork_Tests.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; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.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; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 79085CD6D45B169B6777024E9F0E3D16 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = C22E1442CDC1AC958D56F7A1D91D12E2 /* Storable.xcconfig */; - buildSettings = { - 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; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Storable/Storable-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Storable/Storable-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Storable/Storable.modulemap"; - PRODUCT_MODULE_NAME = Storable; - PRODUCT_NAME = Storable; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 7D0AE6E5C8E143FC4413C4E9A9C67CDC /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = ED823EC216935E3D6BF084F242AEE0CF /* Pods-RxNetwork_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; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_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; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 86BE0EAD36B62FDE298458F0F08B3781 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 93351B9F2D4D05A8B32289A223198FC4 /* Moya.xcconfig */; - buildSettings = { - 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; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Moya/Moya-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Moya/Moya-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Moya/Moya.modulemap"; - PRODUCT_MODULE_NAME = Moya; - PRODUCT_NAME = Moya; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - B01D14FDC83DCF9D4BE53066BEA96D05 /* Release */ = { - 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; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - 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_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 = NO; - MTL_FAST_MATH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 5.0; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Release; - }; - E071E8876C6FA81059B4FE1CD4615E7B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7F8CA8FEF001B39393CE02B01F7ABFEF /* CleanJSON.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/CleanJSON/CleanJSON-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/CleanJSON/CleanJSON-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/CleanJSON/CleanJSON.modulemap"; - PRODUCT_MODULE_NAME = CleanJSON; - PRODUCT_NAME = CleanJSON; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - E5428602B41E0CEE86891AC5E51E9846 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = CA39BBC6D19BBC768D9855F31B730801 /* Pods-RxNetwork_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; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_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; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - F659822BFF3B3C20B29B76B89800A5E9 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 532E2616914679E24F3935C6BA666020 /* Alamofire.xcconfig */; - buildSettings = { - 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; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Alamofire-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - PRODUCT_MODULE_NAME = Alamofire; - PRODUCT_NAME = Alamofire; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.1; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 278A8DCB634E7A42979AA196F859E78B /* Build configuration list for PBXNativeTarget "Pods-RxNetwork_Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E5428602B41E0CEE86891AC5E51E9846 /* Debug */, - 7D0AE6E5C8E143FC4413C4E9A9C67CDC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 426AA45DD72430F6727D1F1B27EBF289 /* Build configuration list for PBXNativeTarget "Moya" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5808F9277B53A1AFD414F3BB0BF8EE91 /* Debug */, - 86BE0EAD36B62FDE298458F0F08B3781 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 196DFA3E4A09A28224918543529A1885 /* Debug */, - B01D14FDC83DCF9D4BE53066BEA96D05 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5D54543275A434C97EE54D125EED008A /* Build configuration list for PBXNativeTarget "Pods-RxNetwork_Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0582F4263E260BE2ED193AB5BE1204BA /* Debug */, - 76AF589767DEA07382EAB401F6BA30E4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 6B2B8EC7E21CDBFF2BDA26B1B4AC4C0D /* Build configuration list for PBXNativeTarget "Alamofire" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00319A2330DC739FCBFBB6CFB0C5F58D /* Debug */, - F659822BFF3B3C20B29B76B89800A5E9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 82AEBBC70AA17D65EDC8947EED57F401 /* Build configuration list for PBXNativeTarget "RxSwift" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 23012773EE73B2C30ECC302A8AC15B9F /* Debug */, - 4FC89E54D80D64E72FD431BC306367BA /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - AB031934812F833108688EFC9BABBC3B /* Build configuration list for PBXNativeTarget "Storable" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 22E675D42EEF580A1C7066470F23EDBA /* Debug */, - 79085CD6D45B169B6777024E9F0E3D16 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D526726212F21C255A4B53300EC1A763 /* Build configuration list for PBXNativeTarget "RxNetwork" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0271F93A77CEDCDE9E4DE6BB7FC2239E /* Debug */, - 4E1F17CEAB0B61D7B56146A3CB42AC7F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - F0AD0C3C0F97950439F44C2D42C42CB0 /* Build configuration list for PBXNativeTarget "CleanJSON" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 3630C930522572B8ED7CB6238B8B2BE2 /* Debug */, - E071E8876C6FA81059B4FE1CD4615E7B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; -} diff --git a/Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100755 index 919434a..0000000 --- a/Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Alamofire.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Alamofire.xcscheme deleted file mode 100755 index 21a8166..0000000 --- a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Alamofire.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Cache.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Cache.xcscheme deleted file mode 100755 index f57145b..0000000 --- a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Cache.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Moya.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Moya.xcscheme deleted file mode 100755 index 187c0c5..0000000 --- a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Moya.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Result.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Result.xcscheme deleted file mode 100755 index 0e70be0..0000000 --- a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Result.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/RxNetwork.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/RxNetwork.xcscheme deleted file mode 100755 index 28e2536..0000000 --- a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/RxNetwork.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/RxSwift.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/RxSwift.xcscheme deleted file mode 100755 index 3b228a8..0000000 --- a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/RxSwift.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Alamofire.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Alamofire.xcscheme deleted file mode 100755 index bc06c13..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Alamofire.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/CleanJSON.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/CleanJSON.xcscheme deleted file mode 100755 index 128ecee..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/CleanJSON.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Moya.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Moya.xcscheme deleted file mode 100755 index 990a973..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Moya.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Example.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Example.xcscheme deleted file mode 100755 index 3519cef..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Example.xcscheme +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Tests.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Tests.xcscheme deleted file mode 100755 index 1cd5d01..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Tests.xcscheme +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Result.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Result.xcscheme deleted file mode 100755 index 28950e3..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Result.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/RxNetwork.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/RxNetwork.xcscheme deleted file mode 100755 index 3fd3a86..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/RxNetwork.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/RxSwift.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/RxSwift.xcscheme deleted file mode 100755 index 7b649f0..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/RxSwift.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Storable.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Storable.xcscheme deleted file mode 100755 index 929d296..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Storable.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/RxSwift/LICENSE.md b/Example/Pods/RxSwift/LICENSE.md deleted file mode 100755 index d6765d9..0000000 --- a/Example/Pods/RxSwift/LICENSE.md +++ /dev/null @@ -1,9 +0,0 @@ -**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/RxSwift/Platform/AtomicInt.swift b/Example/Pods/RxSwift/Platform/AtomicInt.swift deleted file mode 100755 index d8d9580..0000000 --- a/Example/Pods/RxSwift/Platform/AtomicInt.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// AtomicInt.swift -// Platform -// -// Created by Krunoslav Zaher on 10/28/18. -// Copyright © 2018 Krunoslav Zaher. All rights reserved. -// - -import class Foundation.NSLock - -final class AtomicInt: NSLock { - fileprivate var value: Int32 - public init(_ value: Int32 = 0) { - self.value = value - } -} - -@discardableResult -@inline(__always) -func add(_ this: AtomicInt, _ value: Int32) -> Int32 { - this.lock() - let oldValue = this.value - this.value += value - this.unlock() - return oldValue -} - -@discardableResult -@inline(__always) -func sub(_ this: AtomicInt, _ value: Int32) -> Int32 { - this.lock() - let oldValue = this.value - this.value -= value - this.unlock() - return oldValue -} - -@discardableResult -@inline(__always) -func fetchOr(_ this: AtomicInt, _ mask: Int32) -> Int32 { - this.lock() - let oldValue = this.value - this.value |= mask - this.unlock() - return oldValue -} - -@inline(__always) -func load(_ this: AtomicInt) -> Int32 { - this.lock() - let oldValue = this.value - this.unlock() - return oldValue -} - -@discardableResult -@inline(__always) -func increment(_ this: AtomicInt) -> Int32 { - return add(this, 1) -} - -@discardableResult -@inline(__always) -func decrement(_ this: AtomicInt) -> Int32 { - return sub(this, 1) -} - -@inline(__always) -func isFlagSet(_ this: AtomicInt, _ mask: Int32) -> Bool { - return (load(this) & mask) != 0 -} diff --git a/Example/Pods/RxSwift/Platform/DataStructures/Bag.swift b/Example/Pods/RxSwift/Platform/DataStructures/Bag.swift deleted file mode 100755 index ec05a41..0000000 --- a/Example/Pods/RxSwift/Platform/DataStructures/Bag.swift +++ /dev/null @@ -1,181 +0,0 @@ -// -// 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? - var _value0: T? - - // then fill "array dictionary" - var _pairs = ContiguousArray() - - // last is sparse dictionary - var _dictionary: [BagKey: T]? - - 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 where _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 { - func hash(into hasher: inout Hasher) { - hasher.combine(rawValue) - } -} - -func ==(lhs: BagKey, rhs: BagKey) -> Bool { - return lhs.rawValue == rhs.rawValue -} diff --git a/Example/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift b/Example/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift deleted file mode 100755 index b6404a7..0000000 --- a/Example/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// InfiniteSequence.swift -// Platform -// -// Created by Krunoslav Zaher on 6/13/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Sequence that repeats `repeatedValue` infinite number of times. -struct InfiniteSequence : Sequence { - typealias Iterator = AnyIterator - - private let _repeatedValue: Element - - init(repeatedValue: Element) { - _repeatedValue = repeatedValue - } - - func makeIterator() -> Iterator { - let repeatedValue = _repeatedValue - return AnyIterator { - return repeatedValue - } - } -} diff --git a/Example/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift b/Example/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift deleted file mode 100755 index f7cb99c..0000000 --- a/Example/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift +++ /dev/null @@ -1,111 +0,0 @@ -// -// PriorityQueue.swift -// Platform -// -// Created by Krunoslav Zaher on 12/27/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -struct PriorityQueue { - private let _hasHigherPriority: (Element, Element) -> Bool - private let _isEqual: (Element, Element) -> Bool - - fileprivate var _elements = [Element]() - - init(hasHigherPriority: @escaping (Element, Element) -> Bool, isEqual: @escaping (Element, Element) -> Bool) { - _hasHigherPriority = hasHigherPriority - _isEqual = isEqual - } - - mutating func enqueue(_ element: Element) { - _elements.append(element) - bubbleToHigherPriority(_elements.count - 1) - } - - func peek() -> Element? { - return _elements.first - } - - var isEmpty: Bool { - return _elements.count == 0 - } - - mutating func dequeue() -> Element? { - guard let front = peek() else { - return nil - } - - removeAt(0) - - return front - } - - mutating func remove(_ element: Element) { - for i in 0 ..< _elements.count { - if _isEqual(_elements[i], element) { - removeAt(i) - return - } - } - } - - private mutating func removeAt(_ index: Int) { - let removingLast = index == _elements.count - 1 - if !removingLast { - _elements.swapAt(index, _elements.count - 1) - } - - _ = _elements.popLast() - - if !removingLast { - bubbleToHigherPriority(index) - bubbleToLowerPriority(index) - } - } - - private mutating func bubbleToHigherPriority(_ initialUnbalancedIndex: Int) { - precondition(initialUnbalancedIndex >= 0) - precondition(initialUnbalancedIndex < _elements.count) - - var unbalancedIndex = initialUnbalancedIndex - - while unbalancedIndex > 0 { - let parentIndex = (unbalancedIndex - 1) / 2 - guard _hasHigherPriority(_elements[unbalancedIndex], _elements[parentIndex]) else { break } - _elements.swapAt(unbalancedIndex, parentIndex) - unbalancedIndex = parentIndex - } - } - - private mutating func bubbleToLowerPriority(_ initialUnbalancedIndex: Int) { - precondition(initialUnbalancedIndex >= 0) - precondition(initialUnbalancedIndex < _elements.count) - - var unbalancedIndex = initialUnbalancedIndex - while true { - let leftChildIndex = unbalancedIndex * 2 + 1 - let rightChildIndex = unbalancedIndex * 2 + 2 - - var highestPriorityIndex = unbalancedIndex - - if leftChildIndex < _elements.count && _hasHigherPriority(_elements[leftChildIndex], _elements[highestPriorityIndex]) { - highestPriorityIndex = leftChildIndex - } - - if rightChildIndex < _elements.count && _hasHigherPriority(_elements[rightChildIndex], _elements[highestPriorityIndex]) { - highestPriorityIndex = rightChildIndex - } - - guard highestPriorityIndex != unbalancedIndex else { break } - _elements.swapAt(highestPriorityIndex, unbalancedIndex) - - unbalancedIndex = highestPriorityIndex - } - } -} - -extension PriorityQueue : CustomDebugStringConvertible { - var debugDescription: String { - return _elements.debugDescription - } -} diff --git a/Example/Pods/RxSwift/Platform/DataStructures/Queue.swift b/Example/Pods/RxSwift/Platform/DataStructures/Queue.swift deleted file mode 100755 index d05726c..0000000 --- a/Example/Pods/RxSwift/Platform/DataStructures/Queue.swift +++ /dev/null @@ -1,152 +0,0 @@ -// -// Queue.swift -// Platform -// -// Created by Krunoslav Zaher on 3/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/** -Data structure that represents queue. - -Complexity of `enqueue`, `dequeue` is O(1) when number of operations is -averaged over N operations. - -Complexity of `peek` is O(1). -*/ -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 let _initialCapacity: Int - - /** - Creates new queue. - - - parameter capacity: Capacity of newly created queue. - */ - init(capacity: Int) { - _initialCapacity = capacity - - _storage = ContiguousArray(repeating: nil, count: capacity) - } - - private var dequeueIndex: Int { - let index = _pushNextIndex - count - return index < 0 ? index + _storage.count : index - } - - /// - returns: Is queue empty. - var isEmpty: Bool { - return count == 0 - } - - /// - returns: Number of elements inside queue. - var count: Int { - return _count - } - - /// - returns: Element in front of a list of elements to `dequeue`. - func peek() -> T { - precondition(count > 0) - - return _storage[dequeueIndex]! - } - - mutating private func resizeTo(_ size: Int) { - var newStorage = ContiguousArray(repeating: nil, count: size) - - let count = _count - - let dequeueIndex = self.dequeueIndex - let spaceToEndOfQueue = _storage.count - dequeueIndex - - // first batch is from dequeue index to end of array - let countElementsInFirstBatch = Swift.min(count, spaceToEndOfQueue) - // second batch is wrapped from start of array to end of queue - let numberOfElementsInSecondBatch = count - countElementsInFirstBatch - - newStorage[0 ..< countElementsInFirstBatch] = _storage[dequeueIndex ..< (dequeueIndex + countElementsInFirstBatch)] - newStorage[countElementsInFirstBatch ..< (countElementsInFirstBatch + numberOfElementsInSecondBatch)] = _storage[0 ..< numberOfElementsInSecondBatch] - - _count = count - _pushNextIndex = count - _storage = newStorage - } - - /// Enqueues `element`. - /// - /// - parameter element: Element to enqueue. - mutating func enqueue(_ element: T) { - if count == _storage.count { - resizeTo(Swift.max(_storage.count, 1) * _resizeFactor) - } - - _storage[_pushNextIndex] = element - _pushNextIndex += 1 - _count += 1 - - if _pushNextIndex >= _storage.count { - _pushNextIndex -= _storage.count - } - } - - private mutating func dequeueElementOnly() -> T { - precondition(count > 0) - - let index = dequeueIndex - - defer { - _storage[index] = nil - _count -= 1 - } - - return _storage[index]! - } - - /// Dequeues element or throws an exception in case queue is empty. - /// - /// - returns: Dequeued element. - mutating func dequeue() -> T? { - if self.count == 0 { - return nil - } - - defer { - let downsizeLimit = _storage.count / (_resizeFactor * _resizeFactor) - if _count < downsizeLimit && downsizeLimit >= _initialCapacity { - resizeTo(_storage.count / _resizeFactor) - } - } - - return dequeueElementOnly() - } - - /// - returns: Generator of contained elements. - func makeIterator() -> AnyIterator { - var i = dequeueIndex - var count = _count - - return AnyIterator { - if count == 0 { - return nil - } - - defer { - count -= 1 - i += 1 - } - - if i >= self._storage.count { - i -= self._storage.count - } - - return self._storage[i] - } - } -} diff --git a/Example/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift b/Example/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift deleted file mode 100755 index 552314a..0000000 --- a/Example/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// 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/Platform/Platform.Darwin.swift b/Example/Pods/RxSwift/Platform/Platform.Darwin.swift deleted file mode 100755 index 6dc36ad..0000000 --- a/Example/Pods/RxSwift/Platform/Platform.Darwin.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// Platform.Darwin.swift -// Platform -// -// Created by Krunoslav Zaher on 12/29/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - - import Darwin - import class Foundation.Thread - import protocol Foundation.NSCopying - - extension Thread { - static func setThreadLocalStorageValue(_ value: T?, forKey key: NSCopying) { - let currentThread = Thread.current - let threadDictionary = currentThread.threadDictionary - - if let newValue = value { - threadDictionary[key] = newValue - } - else { - threadDictionary[key] = nil - } - } - - 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 deleted file mode 100755 index a950e1c..0000000 --- a/Example/Pods/RxSwift/Platform/Platform.Linux.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// 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) { - if let newValue = value { - Thread.current.threadDictionary[key] = newValue - } - else { - Thread.current.threadDictionary[key] = nil - } - } - - 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 deleted file mode 100755 index c03471d..0000000 --- a/Example/Pods/RxSwift/Platform/RecursiveLock.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// 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 deleted file mode 100755 index 83d2f6c..0000000 --- a/Example/Pods/RxSwift/README.md +++ /dev/null @@ -1,232 +0,0 @@ -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)](https://cocoapods.org/pods/RxSwift) [![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) - -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`, and `ControlProperty` ... 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.
[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). - -###### ... understand the structure - -RxSwift comprises five separate components depending on eachother in the following way: - -```none -┌──────────────┐ ┌──────────────┐ -│ RxCocoa ├────▶ RxRelay │ -└───────┬──────┘ └──────┬───────┘ - │ │ -┌───────▼──────────────────▼───────┐ -│ RxSwift │ -└───────▲──────────────────▲───────┘ - │ │ -┌───────┴──────┐ ┌──────┴───────┐ -│ RxTest │ │ RxBlocking │ -└──────────────┘ └──────────────┘ -``` - -* **RxSwift**: The core of RxSwift, providing the Rx standard as (mostly) defined by [ReactiveX](https://reactivex.io). It has no other dependencies. -* **RxCocoa**: Provides Cocoa-specific capabilities for general iOS/macOS/watchOS & tvOS app development, such as Binders, Traits, and much more. It depends on both `RxSwift` and `RxRelay`. -* **RxRelay**: Provides `PublishRelay` and `BehaviorRelay`, two [simple wrappers around Subjects](https://github.com/ReactiveX/RxSwift/blob/master/Documentation/Subjects.md#relays). It depends on `RxSwift`. -* **RxTest** and **RxBlocking**: Provides testing capabilities for Rx-based systems. It depends on `RxSwift`. - -###### ... 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(.milliseconds(300), 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 10.2 -* Swift 5.0 - -For Xcode 10.1 and below, [use RxSwift 4.5](https://github.com/ReactiveX/RxSwift/releases/tag/4.5.0). - -## 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) - -```ruby -# Podfile -use_frameworks! - -target 'YOUR_TARGET_NAME' do - pod 'RxSwift', '~> 5' - pod 'RxCocoa', '~> 5' -end - -# RxTest and RxBlocking make the most sense in the context of unit/integration tests -target 'YOUR_TESTING_TARGET' do - pod 'RxBlocking', '~> 5' - pod 'RxTest', '~> 5' -end -``` - -Replace `YOUR_TARGET_NAME` and then, in the `Podfile` directory, type: - -```bash -$ pod install -``` - -### [Carthage](https://github.com/Carthage/Carthage) - -Officially supported: Carthage 0.33 and up. - -Add this to `Cartfile` - -``` -github "ReactiveX/RxSwift" ~> 5.0 -``` - -```bash -$ carthage update -``` - -### [Swift Package Manager](https://github.com/apple/swift-package-manager) - -Create a `Package.swift` file. - -```swift -// swift-tools-version:5.0 - -import PackageDescription - -let package = Package( - name: "RxTestProject", - dependencies: [ - .package(url: "https://github.com/ReactiveX/RxSwift.git", from: "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`. - -```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/) \ No newline at end of file diff --git a/Example/Pods/RxSwift/RxSwift/AnyObserver.swift b/Example/Pods/RxSwift/RxSwift/AnyObserver.swift deleted file mode 100755 index 42aa09e..0000000 --- a/Example/Pods/RxSwift/RxSwift/AnyObserver.swift +++ /dev/null @@ -1,69 +0,0 @@ -// -// AnyObserver.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/28/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// 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 { - /// Anonymous event handler type. - public typealias EventHandler = (Event) -> Void - - private let observer: EventHandler - - /// 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. - public init(_ observer: Observer) where Observer.Element == Element { - self.observer = observer.on - } - - /// 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. - public func asObserver() -> AnyObserver { - return self - } -} - -extension AnyObserver { - /// Collection of `AnyObserver`s - typealias s = Bag<(Event) -> Void> -} - -extension ObserverType { - /// 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 (Result) throws -> Element) -> 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 deleted file mode 100755 index 1fa7a67..0000000 --- a/Example/Pods/RxSwift/RxSwift/Cancelable.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// Cancelable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents disposable resource with state tracking. -public protocol Cancelable : Disposable { - /// Was resource disposed. - var isDisposed: Bool { get } -} diff --git a/Example/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift b/Example/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift deleted file mode 100755 index 80332db..0000000 --- a/Example/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift +++ /dev/null @@ -1,102 +0,0 @@ -// -// AsyncLock.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/** -In case nobody holds this lock, the work will be queued and executed immediately -on thread that is requesting lock. - -In case there is somebody currently holding that lock, action will be enqueued. -When owned of the lock finishes with it's processing, it will also execute -and pending work. - -That means that enqueued work could possibly be executed later on a different thread. -*/ -final class AsyncLock - : Disposable - , Lock - , SynchronizedDisposeType { - typealias Action = () -> Void - - var _lock = SpinLock() - - private var _queue: Queue = Queue(capacity: 0) - - private var _isExecuting: Bool = false - private var _hasFaulted: Bool = false - - // lock { - func lock() { - self._lock.lock() - } - - func unlock() { - self._lock.unlock() - } - // } - - private func enqueue(_ action: I) -> I? { - self._lock.lock(); defer { self._lock.unlock() } // { - if self._hasFaulted { - return nil - } - - if self._isExecuting { - self._queue.enqueue(action) - return nil - } - - self._isExecuting = true - - return action - // } - } - - private func dequeue() -> I? { - self._lock.lock(); defer { self._lock.unlock() } // { - if !self._queue.isEmpty { - return self._queue.dequeue() - } - else { - self._isExecuting = false - return nil - } - // } - } - - func invoke(_ action: I) { - let firstEnqueuedAction = self.enqueue(action) - - if let firstEnqueuedAction = firstEnqueuedAction { - firstEnqueuedAction.invoke() - } - else { - // action is enqueued, it's somebody else's concern now - return - } - - while true { - let nextAction = self.dequeue() - - if let nextAction = nextAction { - nextAction.invoke() - } - else { - return - } - } - } - - func dispose() { - self.synchronizedDispose() - } - - func _synchronized_dispose() { - self._queue = Queue(capacity: 0) - self._hasFaulted = true - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Concurrency/Lock.swift b/Example/Pods/RxSwift/RxSwift/Concurrency/Lock.swift deleted file mode 100755 index b26f5b7..0000000 --- a/Example/Pods/RxSwift/RxSwift/Concurrency/Lock.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// Lock.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/31/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol Lock { - func lock() - func unlock() -} - -// https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20151214/000321.html -typealias SpinLock = RecursiveLock - -extension RecursiveLock : Lock { - @inline(__always) - final func performLocked(_ action: () -> Void) { - self.lock(); defer { self.unlock() } - action() - } - - @inline(__always) - final func calculateLocked(_ action: () -> T) -> T { - self.lock(); defer { self.unlock() } - return action() - } - - @inline(__always) - final func calculateLockedOrFail(_ action: () throws -> T) throws -> T { - self.lock(); defer { self.unlock() } - let result = try action() - return result - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift b/Example/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift deleted file mode 100755 index ed6b28a..0000000 --- a/Example/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// LockOwnerType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol LockOwnerType : class, Lock { - var _lock: RecursiveLock { get } -} - -extension LockOwnerType { - func lock() { - self._lock.lock() - } - - func unlock() { - self._lock.unlock() - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift b/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift deleted file mode 100755 index 0490a69..0000000 --- a/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// SynchronizedDisposeType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol SynchronizedDisposeType : class, Disposable, Lock { - func _synchronized_dispose() -} - -extension SynchronizedDisposeType { - func synchronizedDispose() { - self.lock(); defer { self.unlock() } - self._synchronized_dispose() - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift b/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift deleted file mode 100755 index bac051b..0000000 --- a/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// SynchronizedOnType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol SynchronizedOnType : class, ObserverType, Lock { - func _synchronized_on(_ event: Event) -} - -extension SynchronizedOnType { - func synchronizedOn(_ event: Event) { - self.lock(); defer { self.unlock() } - self._synchronized_on(event) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift b/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift deleted file mode 100755 index bb1aa7e..0000000 --- a/Example/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// SynchronizedUnsubscribeType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol SynchronizedUnsubscribeType : class { - associatedtype DisposeKey - - func synchronizedUnsubscribe(_ disposeKey: DisposeKey) -} diff --git a/Example/Pods/RxSwift/RxSwift/ConnectableObservableType.swift b/Example/Pods/RxSwift/RxSwift/ConnectableObservableType.swift deleted file mode 100755 index 52bf93c..0000000 --- a/Example/Pods/RxSwift/RxSwift/ConnectableObservableType.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// ConnectableObservableType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/1/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/** -Represents an observable sequence wrapper that can be connected and disconnected from its underlying observable sequence. -*/ -public protocol ConnectableObservableType : ObservableType { - /** - 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. - */ - func connect() -> Disposable -} diff --git a/Example/Pods/RxSwift/RxSwift/Date+Dispatch.swift b/Example/Pods/RxSwift/RxSwift/Date+Dispatch.swift deleted file mode 100755 index 0dc3ac3..0000000 --- a/Example/Pods/RxSwift/RxSwift/Date+Dispatch.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// Date+Dispatch.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/14/19. -// Copyright © 2019 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date -import struct Foundation.TimeInterval -import enum Dispatch.DispatchTimeInterval - -extension DispatchTimeInterval { - var convertToSecondsFactor: Double { - switch self { - case .nanoseconds: return 1_000_000_000.0 - case .microseconds: return 1_000_000.0 - case .milliseconds: return 1_000.0 - case .seconds: return 1.0 - case .never: fatalError() - @unknown default: fatalError() - } - } - - func map(_ transform: (Int, Double) -> Int) -> DispatchTimeInterval { - switch self { - case .nanoseconds(let value): return .nanoseconds(transform(value, 1_000_000_000.0)) - case .microseconds(let value): return .microseconds(transform(value, 1_000_000.0)) - case .milliseconds(let value): return .milliseconds(transform(value, 1_000.0)) - case .seconds(let value): return .seconds(transform(value, 1.0)) - case .never: return .never - @unknown default: fatalError() - } - } - - var isNow: Bool { - switch self { - case .nanoseconds(let value), .microseconds(let value), .milliseconds(let value), .seconds(let value): return value == 0 - case .never: return false - @unknown default: fatalError() - } - } - - internal func reduceWithSpanBetween(earlierDate: Date, laterDate: Date) -> DispatchTimeInterval { - return self.map { value, factor in - let interval = laterDate.timeIntervalSince(earlierDate) - let remainder = Double(value) - interval * factor - guard remainder > 0 else { return 0 } - return Int(remainder.rounded(.toNearestOrAwayFromZero)) - } - } -} - -extension Date { - - internal func addingDispatchInterval(_ dispatchInterval: DispatchTimeInterval) -> Date { - switch dispatchInterval { - case .nanoseconds(let value), .microseconds(let value), .milliseconds(let value), .seconds(let value): - return self.addingTimeInterval(TimeInterval(value) / dispatchInterval.convertToSecondsFactor) - case .never: return Date.distantFuture - @unknown default: fatalError() - } - } - -} diff --git a/Example/Pods/RxSwift/RxSwift/Deprecated.swift b/Example/Pods/RxSwift/RxSwift/Deprecated.swift deleted file mode 100755 index 5cfdf38..0000000 --- a/Example/Pods/RxSwift/RxSwift/Deprecated.swift +++ /dev/null @@ -1,581 +0,0 @@ -// -// Deprecated.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/5/17. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -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: Element?) -> 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: Element?, 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 (Element, Int) throws -> Result) - -> Observable { - return self.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 (Element, Int) throws -> Source) - -> Observable { - return self.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 (Element, Int) throws -> Bool) -> Observable { - return self.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 (Element, Int) throws -> Bool) -> Observable { - return self.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) { - self.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 self.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. -@available(*, deprecated, message: "Variable is deprecated. Please use `BehaviorRelay` as a replacement.") -public final class Variable { - private let _subject: BehaviorSubject - - private var _lock = SpinLock() - - // state - private var _value: Element - - #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: Element { - get { - self._lock.lock(); defer { self._lock.unlock() } - return self._value - } - set(newValue) { - #if DEBUG - self._synchronizationTracker.register(synchronizationErrorMessage: .variable) - defer { self._synchronizationTracker.unregister() } - #endif - self._lock.lock() - self._value = newValue - self._lock.unlock() - - self._subject.on(.next(newValue)) - } - } - - /// Initializes variable with initial value. - /// - /// - parameter value: Initial variable value. - public init(_ value: Element) { - self._value = value - self._subject = BehaviorSubject(value: value) - } - - /// - returns: Canonical interface for push style sequence - public func asObservable() -> Observable { - return self._subject - } - - deinit { - self._subject.on(.completed) - } -} - -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. - */ - @available(*, deprecated, message: "Use DispatchTimeInterval overload instead.", renamed: "delay(_:scheduler:)") - public func delay(_ dueTime: Foundation.TimeInterval, scheduler: SchedulerType) - -> Observable { - return self.delay(.milliseconds(Int(dueTime * 1000.0)), scheduler: scheduler) - } -} - -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 `RxError.timeout` in case of a timeout. - */ - @available(*, deprecated, message: "Use DispatchTimeInterval overload instead.", renamed: "timeout(_:scheduler:)") - public func timeout(_ dueTime: Foundation.TimeInterval, scheduler: SchedulerType) - -> Observable { - return timeout(.milliseconds(Int(dueTime * 1000.0)), 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. - */ - @available(*, deprecated, message: "Use DispatchTimeInterval overload instead.", renamed: "timeout(_:other:scheduler:)") - public func timeout(_ dueTime: Foundation.TimeInterval, other: OtherSource, scheduler: SchedulerType) - -> Observable where Element == OtherSource.Element { - return timeout(.milliseconds(Int(dueTime * 1000.0)), other: other, scheduler: scheduler) - } -} - -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. - */ - @available(*, deprecated, message: "Use DispatchTimeInterval overload instead.", renamed: "skip(_:scheduler:)") - public func skip(_ duration: Foundation.TimeInterval, scheduler: SchedulerType) - -> Observable { - return skip(.milliseconds(Int(duration * 1000.0)), scheduler: scheduler) - } -} - -extension ObservableType where Element : 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. - */ - @available(*, deprecated, message: "Use DispatchTimeInterval overload instead.", renamed: "interval(_:scheduler:)") - public static func interval(_ period: Foundation.TimeInterval, scheduler: SchedulerType) - -> Observable { - return interval(.milliseconds(Int(period * 1000.0)), scheduler: scheduler) - } -} - -extension ObservableType where Element: 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. - */ - @available(*, deprecated, message: "Use DispatchTimeInterval overload instead.", renamed: "timer(_:period:scheduler:)") - public static func timer(_ dueTime: Foundation.TimeInterval, period: Foundation.TimeInterval? = nil, scheduler: SchedulerType) - -> Observable { - return timer(.milliseconds(Int(dueTime * 1000.0)), period: period.map { .milliseconds(Int($0 * 1000.0)) }, scheduler: scheduler) - } -} - -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. - */ - @available(*, deprecated, message: "Use DispatchTimeInterval overload instead.", renamed: "throttle(_:latest:scheduler:)") - public func throttle(_ dueTime: Foundation.TimeInterval, latest: Bool = true, scheduler: SchedulerType) - -> Observable { - return throttle(.milliseconds(Int(dueTime * 1000.0)), latest: latest, scheduler: scheduler) - } -} - -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. - */ - @available(*, deprecated, message: "Use DispatchTimeInterval overload instead.", renamed: "take(_:scheduler:)") - public func take(_ duration: Foundation.TimeInterval, scheduler: SchedulerType) - -> Observable { - return take(.milliseconds(Int(duration * 1000.0)), scheduler: scheduler) - } -} - - -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. - */ - @available(*, deprecated, message: "Use DispatchTimeInterval overload instead.", renamed: "delaySubscription(_:scheduler:)") - public func delaySubscription(_ dueTime: Foundation.TimeInterval, scheduler: SchedulerType) - -> Observable { - return delaySubscription(.milliseconds(Int(dueTime * 1000.0)), scheduler: scheduler) - } -} - -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`). - */ - @available(*, deprecated, message: "Use DispatchTimeInterval overload instead.", renamed: "window(_:)") - public func window(timeSpan: Foundation.TimeInterval, count: Int, scheduler: SchedulerType) - -> Observable> { - return window(timeSpan: .milliseconds(Int(timeSpan * 1000.0)), count: count, scheduler: scheduler) - } -} - - -extension PrimitiveSequence { - /** - 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. - */ - @available(*, deprecated, message: "Use DispatchTimeInterval overload instead.", renamed: "delay(_:scheduler:)") - public func delay(_ dueTime: Foundation.TimeInterval, scheduler: SchedulerType) - -> PrimitiveSequence { - return delay(.milliseconds(Int(dueTime * 1000.0)), scheduler: scheduler) - } - - /** - 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. - */ - @available(*, deprecated, message: "Use DispatchTimeInterval overload instead.", renamed: "delaySubscription(_:scheduler:)") - public func delaySubscription(_ dueTime: Foundation.TimeInterval, scheduler: SchedulerType) - -> PrimitiveSequence { - return delaySubscription(.milliseconds(Int(dueTime * 1000.0)), scheduler: scheduler) - } - - /** - 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. - */ - @available(*, deprecated, message: "Use DispatchTimeInterval overload instead.", renamed: "timeout(_:scheduler:)") - public func timeout(_ dueTime: Foundation.TimeInterval, scheduler: SchedulerType) - -> PrimitiveSequence { - return timeout(.milliseconds(Int(dueTime * 1000.0)), 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. - */ - @available(*, deprecated, message: "Use DispatchTimeInterval overload instead.", renamed: "timeout(_:other:scheduler:)") - public func timeout(_ dueTime: Foundation.TimeInterval, - other: PrimitiveSequence, - scheduler: SchedulerType) -> PrimitiveSequence { - return timeout(.milliseconds(Int(dueTime * 1000.0)), other: other, scheduler: scheduler) - } -} - -extension PrimitiveSequenceType where Trait == SingleTrait { - - /** - 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 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. - */ - @available(*, deprecated, renamed: "do(onSuccess:onError:onSubscribe:onSubscribed:onDispose:)") - public func `do`(onNext: ((Element) throws -> Void)?, - onError: ((Swift.Error) throws -> Void)? = nil, - onSubscribe: (() -> Void)? = nil, - onSubscribed: (() -> Void)? = nil, - onDispose: (() -> Void)? = nil) - -> Single { - return self.`do`( - onSuccess: onNext, - onError: onError, - onSubscribe: onSubscribe, - onSubscribed: onSubscribed, - onDispose: onDispose - ) - } -} - -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. - */ - @available(*, deprecated, message: "Use DispatchTimeInterval overload instead.", renamed: "buffer(timeSpan:count:scheduler:)") - public func buffer(timeSpan: Foundation.TimeInterval, count: Int, scheduler: SchedulerType) - -> Observable<[Element]> { - return buffer(timeSpan: .milliseconds(Int(timeSpan * 1000.0)), count: count, scheduler: scheduler) - } -} - -extension PrimitiveSequenceType where Element: 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 scheduler: Scheduler to run timers on. - - returns: An observable sequence that produces a value after due time has elapsed and then each period. - */ - @available(*, deprecated, message: "Use DispatchTimeInterval overload instead.", renamed: "timer(_:scheduler:)") - public static func timer(_ dueTime: Foundation.TimeInterval, scheduler: SchedulerType) - -> PrimitiveSequence { - return timer(.milliseconds(Int(dueTime * 1000.0)), scheduler: scheduler) - } -} - -extension Completable { - /** - Merges the completion of all Completables from a collection into a single Completable. - - - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) - - - parameter sources: Collection of Completables to merge. - - returns: A Completable that merges the completion of all Completables. - */ - @available(*, deprecated, message: "Use Completable.zip instead.", renamed: "zip") - public static func merge(_ sources: Collection) -> Completable - where Collection.Element == Completable { - return zip(sources) - } - - /** - Merges the completion of all Completables from an array into a single Completable. - - - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) - - - parameter sources: Array of observable sequences to merge. - - returns: A Completable that merges the completion of all Completables. - */ - @available(*, deprecated, message: "Use Completable.zip instead.", renamed: "zip") - public static func merge(_ sources: [Completable]) -> Completable { - return zip(sources) - } - - /** - Merges the completion of all Completables into a single Completable. - - - 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. - */ - @available(*, deprecated, message: "Use Completable.zip instead.", renamed: "zip") - public static func merge(_ sources: Completable...) -> Completable { - return zip(sources) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Disposable.swift b/Example/Pods/RxSwift/RxSwift/Disposable.swift deleted file mode 100755 index b79c77a..0000000 --- a/Example/Pods/RxSwift/RxSwift/Disposable.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// Disposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a disposable resource. -public protocol Disposable { - /// Dispose resource. - func dispose() -} diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift deleted file mode 100755 index 6fbd635..0000000 --- a/Example/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift +++ /dev/null @@ -1,59 +0,0 @@ -// -// AnonymousDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// 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 let _isDisposed = AtomicInt(0) - private var _disposeAction: DisposeAction? - - /// - returns: Was resource disposed. - public var isDisposed: Bool { - return isFlagSet(self._isDisposed, 1) - } - - /// 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) { - self._disposeAction = disposeAction - super.init() - } - - // Non-deprecated version of the constructor, used by `Disposables.create(with:)` - fileprivate init(disposeAction: @escaping DisposeAction) { - self._disposeAction = disposeAction - 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. - fileprivate func dispose() { - if fetchOr(self._isDisposed, 1) == 0 { - if let action = self._disposeAction { - self._disposeAction = nil - action() - } - } - } -} - -extension Disposables { - - /// 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 () -> Void) -> Cancelable { - return AnonymousDisposable(disposeAction: dispose) - } - -} diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift deleted file mode 100755 index 5693268..0000000 --- a/Example/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// BinaryDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents two disposable resources that are disposed together. -private final class BinaryDisposable : DisposeBase, Cancelable { - - private let _isDisposed = AtomicInt(0) - - // state - private var _disposable1: Disposable? - private var _disposable2: Disposable? - - /// - returns: Was resource disposed. - var isDisposed: Bool { - return isFlagSet(self._isDisposed, 1) - } - - /// Constructs new binary disposable from two disposables. - /// - /// - parameter disposable1: First disposable - /// - parameter disposable2: Second disposable - init(_ disposable1: Disposable, _ disposable2: Disposable) { - self._disposable1 = disposable1 - self._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. - func dispose() { - if fetchOr(self._isDisposed, 1) == 0 { - self._disposable1?.dispose() - self._disposable2?.dispose() - self._disposable1 = nil - self._disposable2 = nil - } - } -} - -extension Disposables { - - /// 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 deleted file mode 100755 index a0f5c2f..0000000 --- a/Example/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// BooleanDisposable.swift -// RxSwift -// -// Created by Junior B. on 10/29/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a disposable resource that can be checked for disposal status. -public final class BooleanDisposable : Cancelable { - - internal static let BooleanDisposableTrue = BooleanDisposable(isDisposed: true) - private var _isDisposed = false - - /// Initializes a new instance of the `BooleanDisposable` class - public init() { - } - - /// Initializes a new instance of the `BooleanDisposable` class with given value - public init(isDisposed: Bool) { - self._isDisposed = isDisposed - } - - /// - returns: Was resource disposed. - public var isDisposed: Bool { - return self._isDisposed - } - - /// Sets the status to disposed, which can be observer through the `isDisposed` property. - public func dispose() { - self._isDisposed = true - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift deleted file mode 100755 index ce0da6a..0000000 --- a/Example/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// CompositeDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/20/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// 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 - } - } - - private var _lock = SpinLock() - - // state - private var _disposables: Bag? = Bag() - - public var isDisposed: Bool { - self._lock.lock(); defer { self._lock.unlock() } - return self._disposables == nil - } - - public override init() { - } - - /// 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. - _ = self._disposables!.insert(disposable1) - _ = self._disposables!.insert(disposable2) - } - - /// 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. - _ = self._disposables!.insert(disposable1) - _ = self._disposables!.insert(disposable2) - _ = self._disposables!.insert(disposable3) - } - - /// 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. - _ = self._disposables!.insert(disposable1) - _ = self._disposables!.insert(disposable2) - _ = self._disposables!.insert(disposable3) - _ = self._disposables!.insert(disposable4) - - for disposable in disposables { - _ = self._disposables!.insert(disposable) - } - } - - /// Initializes a new instance of composite disposable with the specified number of disposables. - public init(disposables: [Disposable]) { - for disposable in disposables { - _ = self._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. - */ - public func insert(_ disposable: Disposable) -> DisposeKey? { - let key = self._insert(disposable) - - if key == nil { - disposable.dispose() - } - - return key - } - - private func _insert(_ disposable: Disposable) -> DisposeKey? { - self._lock.lock(); defer { self._lock.unlock() } - - let bagKey = self._disposables?.insert(disposable) - return bagKey.map(DisposeKey.init) - } - - /// - returns: Gets the number of disposables contained in the `CompositeDisposable`. - public var count: Int { - self._lock.lock(); defer { self._lock.unlock() } - return self._disposables?.count ?? 0 - } - - /// 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) { - self._remove(for: disposeKey)?.dispose() - } - - private func _remove(for disposeKey: DisposeKey) -> Disposable? { - self._lock.lock(); defer { self._lock.unlock() } - return self._disposables?.removeKey(disposeKey.key) - } - - /// Disposes all disposables in the group and removes them from the group. - public func dispose() { - if let disposables = self._dispose() { - disposeAll(in: disposables) - } - } - - private func _dispose() -> Bag? { - self._lock.lock(); defer { self._lock.unlock() } - - let disposeBag = self._disposables - self._disposables = nil - - 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 deleted file mode 100755 index 8cd6e28..0000000 --- a/Example/Pods/RxSwift/RxSwift/Disposables/Disposables.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// Disposables.swift -// RxSwift -// -// Created by Mohsen Ramezanpoor on 01/08/2016. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -/// A collection of utility methods for common disposable operations. -public struct Disposables { - private init() {} -} - diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift b/Example/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift deleted file mode 100755 index 22e5cb0..0000000 --- a/Example/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift +++ /dev/null @@ -1,114 +0,0 @@ -// -// DisposeBag.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension Disposable { - /// Adds `self` to `bag` - /// - /// - parameter bag: `DisposeBag` to add `self` to. - public func disposed(by bag: DisposeBag) { - bag.insert(self) - } -} - -/** -Thread safe bag that disposes added disposables on `deinit`. - -This returns ARC (RAII) like resource management to `RxSwift`. - -In case contained disposables need to be disposed, just put a different dispose bag -or create a new one in its place. - - self.existingDisposeBag = DisposeBag() - -In case explicit disposal is necessary, there is also `CompositeDisposable`. -*/ -public final class DisposeBag: DisposeBase { - - private var _lock = SpinLock() - - // state - fileprivate var _disposables = [Disposable]() - fileprivate var _isDisposed = false - - /// 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. - public func insert(_ disposable: Disposable) { - self._insert(disposable)?.dispose() - } - - private func _insert(_ disposable: Disposable) -> Disposable? { - self._lock.lock(); defer { self._lock.unlock() } - if self._isDisposed { - return disposable - } - - self._disposables.append(disposable) - - return nil - } - - /// This is internal on purpose, take a look at `CompositeDisposable` instead. - private func dispose() { - let oldDisposables = self._dispose() - - for disposable in oldDisposables { - disposable.dispose() - } - } - - private func _dispose() -> [Disposable] { - self._lock.lock(); defer { self._lock.unlock() } - - let disposables = self._disposables - - self._disposables.removeAll(keepingCapacity: false) - self._isDisposed = true - - return disposables - } - - deinit { - self.dispose() - } -} - -extension DisposeBag { - - /// Convenience init allows a list of disposables to be gathered for disposal. - public convenience init(disposing disposables: Disposable...) { - self.init() - self._disposables += disposables - } - - /// Convenience init allows an array of disposables to be gathered for disposal. - public convenience init(disposing disposables: [Disposable]) { - self.init() - self._disposables += disposables - } - - /// Convenience function allows a list of disposables to be gathered for disposal. - public func insert(_ disposables: Disposable...) { - self.insert(disposables) - } - - /// Convenience function allows an array of disposables to be gathered for disposal. - public func insert(_ disposables: [Disposable]) { - self._lock.lock(); defer { self._lock.unlock() } - if self._isDisposed { - disposables.forEach { $0.dispose() } - } else { - self._disposables += disposables - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift b/Example/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift deleted file mode 100755 index 0d4b2fb..0000000 --- a/Example/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// DisposeBase.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/4/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Base class for all disposables. -public class DisposeBase { - init() { -#if TRACE_RESOURCES - _ = Resources.incrementTotal() -#endif - } - - deinit { -#if TRACE_RESOURCES - _ = Resources.decrementTotal() -#endif - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift deleted file mode 100755 index 149f866..0000000 --- a/Example/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// NopDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a disposable that does nothing on disposal. -/// -/// Nop = No Operation -fileprivate struct NopDisposable : Disposable { - - fileprivate static let noOp: Disposable = NopDisposable() - - fileprivate init() { - - } - - /// 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 deleted file mode 100755 index 922f20a..0000000 --- a/Example/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift +++ /dev/null @@ -1,113 +0,0 @@ -// -// RefCountDisposable.swift -// RxSwift -// -// Created by Junior B. on 10/29/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// 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. - public var isDisposed: Bool { - self._lock.lock(); defer { self._lock.unlock() } - return self._disposable == nil - } - - /// Initializes a new instance of the `RefCountDisposable`. - public init(disposable: Disposable) { - self._disposable = disposable - super.init() - } - - /** - Holds a dependent disposable that when disposed decreases the refcount on the underlying disposable. - - When getter is called, a dependent disposable contributing to the reference count that manages the underlying disposable's lifetime is returned. - */ - public func retain() -> Disposable { - return self._lock.calculateLocked { - if self._disposable != nil { - do { - _ = try incrementChecked(&self._count) - } catch { - rxFatalError("RefCountDisposable increment failed") - } - - return RefCountInnerDisposable(self) - } else { - return Disposables.create() - } - } - } - - /// Disposes the underlying disposable only when all dependent disposables have been disposed. - public func dispose() { - let oldDisposable: Disposable? = self._lock.calculateLocked { - if let oldDisposable = self._disposable, !self._primaryDisposed { - self._primaryDisposed = true - - if self._count == 0 { - self._disposable = nil - return oldDisposable - } - } - - return nil - } - - if let disposable = oldDisposable { - disposable.dispose() - } - } - - fileprivate func release() { - let oldDisposable: Disposable? = self._lock.calculateLocked { - if let oldDisposable = self._disposable { - do { - _ = try decrementChecked(&self._count) - } catch { - rxFatalError("RefCountDisposable decrement on release failed") - } - - guard self._count >= 0 else { - rxFatalError("RefCountDisposable counter is lower than 0") - } - - if self._primaryDisposed && self._count == 0 { - self._disposable = nil - return oldDisposable - } - } - - return nil - } - - if let disposable = oldDisposable { - disposable.dispose() - } - } -} - -internal final class RefCountInnerDisposable: DisposeBase, Disposable -{ - private let _parent: RefCountDisposable - private let _isDisposed = AtomicInt(0) - - init(_ parent: RefCountDisposable) { - self._parent = parent - super.init() - } - - internal func dispose() - { - if fetchOr(self._isDisposed, 1) == 0 { - self._parent.release() - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift deleted file mode 100755 index c834f5b..0000000 --- a/Example/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// ScheduledDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/13/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. -public final class ScheduledDisposable : Cancelable { - public let scheduler: ImmediateSchedulerType - - private let _isDisposed = AtomicInt(0) - - // state - private var _disposable: Disposable? - - /// - returns: Was resource disposed. - public var isDisposed: Bool { - return isFlagSet(self._isDisposed, 1) - } - - /** - Initializes a new instance of the `ScheduledDisposable` that uses a `scheduler` on which to dispose the `disposable`. - - - parameter scheduler: Scheduler where the disposable resource will be disposed on. - - parameter disposable: Disposable resource to dispose on the given scheduler. - */ - public init(scheduler: ImmediateSchedulerType, disposable: Disposable) { - self.scheduler = scheduler - self._disposable = disposable - } - - /// Disposes the wrapped disposable on the provided scheduler. - public func dispose() { - _ = self.scheduler.schedule(self, action: disposeScheduledDisposable) - } - - func disposeInner() { - if fetchOr(self._isDisposed, 1) == 0 { - self._disposable!.dispose() - self._disposable = nil - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift deleted file mode 100755 index 22dce36..0000000 --- a/Example/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// SerialDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// 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() - - // state - private var _current = nil as Disposable? - private var _isDisposed = false - - /// - returns: Was resource disposed. - public var isDisposed: Bool { - return self._isDisposed - } - - /// Initializes a new instance of the `SerialDisposable`. - override public init() { - super.init() - } - - /** - Gets or sets the underlying disposable. - - Assigning this property disposes the previous disposable object. - - If the `SerialDisposable` has already been disposed, assignment to this property causes immediate disposal of the given disposable object. - */ - public var disposable: Disposable { - get { - return self._lock.calculateLocked { - return self._current ?? Disposables.create() - } - } - set (newDisposable) { - let disposable: Disposable? = self._lock.calculateLocked { - if self._isDisposed { - return newDisposable - } - else { - let toDispose = self._current - self._current = newDisposable - return toDispose - } - } - - if let disposable = disposable { - disposable.dispose() - } - } - } - - /// Disposes the underlying disposable as well as all future replacements. - public func dispose() { - self._dispose()?.dispose() - } - - private func _dispose() -> Disposable? { - self._lock.lock(); defer { self._lock.unlock() } - if self._isDisposed { - return nil - } - else { - self._isDisposed = true - let current = self._current - self._current = nil - return current - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift deleted file mode 100755 index 88d59db..0000000 --- a/Example/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// SingleAssignmentDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/** -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 final class SingleAssignmentDisposable : DisposeBase, Cancelable { - - fileprivate enum DisposeState: Int32 { - case disposed = 1 - case disposableSet = 2 - } - - // state - private let _state = AtomicInt(0) - private var _disposable = nil as Disposable? - - /// - returns: A value that indicates whether the object is disposed. - public var isDisposed: Bool { - return isFlagSet(self._state, DisposeState.disposed.rawValue) - } - - /// 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.** - public func setDisposable(_ disposable: Disposable) { - self._disposable = disposable - - let previousState = fetchOr(self._state, DisposeState.disposableSet.rawValue) - - if (previousState & DisposeState.disposableSet.rawValue) != 0 { - rxFatalError("oldState.disposable != nil") - } - - if (previousState & DisposeState.disposed.rawValue) != 0 { - disposable.dispose() - self._disposable = nil - } - } - - /// Disposes the underlying disposable. - public func dispose() { - let previousState = fetchOr(self._state, DisposeState.disposed.rawValue) - - if (previousState & DisposeState.disposed.rawValue) != 0 { - return - } - - if (previousState & DisposeState.disposableSet.rawValue) != 0 { - guard let disposable = self._disposable else { - rxFatalError("Disposable not set") - } - disposable.dispose() - self._disposable = nil - } - } - -} diff --git a/Example/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift b/Example/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift deleted file mode 100755 index 430e4c6..0000000 --- a/Example/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// SubscriptionDisposable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -struct SubscriptionDisposable : Disposable { - private let _key: T.DisposeKey - private weak var _owner: T? - - init(owner: T, key: T.DisposeKey) { - self._owner = owner - self._key = key - } - - func dispose() { - self._owner?.synchronizedUnsubscribe(self._key) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Errors.swift b/Example/Pods/RxSwift/RxSwift/Errors.swift deleted file mode 100755 index f17b52d..0000000 --- a/Example/Pods/RxSwift/RxSwift/Errors.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// Errors.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/28/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -let RxErrorDomain = "RxErrorDomain" -let RxCompositeFailures = "RxCompositeFailures" - -/// Generic Rx error codes. -public enum RxError - : Swift.Error - , CustomDebugStringConvertible { - /// Unknown error occurred. - case unknown - /// Performing an action on disposed object. - case disposed(object: AnyObject) - /// Aritmetic overflow error. - case overflow - /// Argument out of range error. - case argumentOutOfRange - /// Sequence doesn't contain any elements. - case noElements - /// Sequence contains more than one element. - case moreThanOneElement - /// Timeout error. - case timeout -} - -extension RxError { - /// A textual representation of `self`, suitable for debugging. - public var debugDescription: String { - switch self { - case .unknown: - return "Unknown error occurred." - case .disposed(let object): - return "Object `\(object)` was already disposed." - case .overflow: - return "Arithmetic overflow occurred." - case .argumentOutOfRange: - return "Argument out of range." - case .noElements: - return "Sequence doesn't contain any elements." - case .moreThanOneElement: - return "Sequence contains more than one element." - case .timeout: - return "Sequence timeout." - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Event.swift b/Example/Pods/RxSwift/RxSwift/Event.swift deleted file mode 100755 index 699e3d2..0000000 --- a/Example/Pods/RxSwift/RxSwift/Event.swift +++ /dev/null @@ -1,109 +0,0 @@ -// -// Event.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a sequence event. -/// -/// Sequence grammar: -/// **next\* (error | completed)** -public enum Event { - /// Next element is produced. - case next(Element) - - /// Sequence terminated with an error. - case error(Swift.Error) - - /// Sequence completed successfully. - case completed -} - -extension Event: CustomDebugStringConvertible { - /// Description of event. - public var debugDescription: String { - switch self { - case .next(let value): - return "next(\(value))" - case .error(let error): - return "error(\(error))" - case .completed: - return "completed" - } - } -} - -extension Event { - /// Is `completed` or `error` event. - public var isStopEvent: Bool { - switch self { - case .next: return false - case .error, .completed: return true - } - } - - /// If `next` event, returns element value. - public var element: Element? { - if case .next(let value) = self { - return value - } - return nil - } - - /// 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 Element - - @available(*, deprecated, message: "Use `Element` instead.") - typealias ElementType = Element - - /// 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 deleted file mode 100755 index 9794683..0000000 --- a/Example/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// 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) -> Void>, _ 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 deleted file mode 100755 index 70d4786..0000000 --- a/Example/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// String+Rx.swift -// RxSwift -// -// Created by Krunoslav Zaher on 12/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension String { - /// This is needed because on Linux Swift doesn't have `rangeOfString(..., options: .BackwardsSearch)` - func lastIndexOf(_ character: Character) -> Index? { - var index = self.endIndex - while index > self.startIndex { - index = self.index(before: index) - if self[index] == character { - return index - } - } - - return nil - } -} diff --git a/Example/Pods/RxSwift/RxSwift/GroupedObservable.swift b/Example/Pods/RxSwift/RxSwift/GroupedObservable.swift deleted file mode 100755 index 34a2fc2..0000000 --- a/Example/Pods/RxSwift/RxSwift/GroupedObservable.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// 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 { - /// 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: Observer) -> Disposable where Observer.Element == Element { - return self.source.subscribe(observer) - } - - /// Converts `self` to `Observable` sequence. - public func asObservable() -> Observable { - return self.source - } -} diff --git a/Example/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift b/Example/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift deleted file mode 100755 index 954fbf0..0000000 --- a/Example/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// ImmediateSchedulerType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/31/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents an object that immediately schedules units of work. -public protocol ImmediateSchedulerType { - /** - 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). - */ - func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable -} - -extension ImmediateSchedulerType { - /** - Schedules an action to be executed recursively. - - - parameter state: State passed to the action to be executed. - - parameter action: Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in recursive invocation state. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func scheduleRecursive(_ state: State, action: @escaping (_ state: State, _ recurse: (State) -> Void) -> Void) -> Disposable { - let recursiveScheduler = RecursiveImmediateScheduler(action: action, scheduler: self) - - recursiveScheduler.schedule(state) - - return Disposables.create(with: recursiveScheduler.dispose) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observable.swift b/Example/Pods/RxSwift/RxSwift/Observable.swift deleted file mode 100755 index 5120d23..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observable.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// Observable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// A type-erased `ObservableType`. -/// -/// It represents a push style sequence. -public class Observable : ObservableType { - init() { -#if TRACE_RESOURCES - _ = Resources.incrementTotal() -#endif - } - - public func subscribe(_ observer: Observer) -> Disposable where Observer.Element == Element { - rxAbstractMethod() - } - - public func asObservable() -> Observable { - return self - } - - deinit { -#if TRACE_RESOURCES - _ = 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(_ transform: @escaping (Element) throws -> Result) -> Observable { - return _map(source: self, transform: transform) - } -} - diff --git a/Example/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift b/Example/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift deleted file mode 100755 index 8db16e6..0000000 --- a/Example/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// ObservableConvertibleType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/17/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Type that can be converted to observable sequence (`Observable`). -public protocol ObservableConvertibleType { - /// Type of elements in sequence. - associatedtype Element - - @available(*, deprecated, message: "Use `Element` instead.") - typealias E = Element - - /// 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 deleted file mode 100755 index e8875ea..0000000 --- a/Example/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift +++ /dev/null @@ -1,131 +0,0 @@ -// -// ObservableType+Extensions.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -#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. - */ - public func subscribe(_ on: @escaping (Event) -> Void) - -> Disposable { - let observer = AnonymousObserver { e in - on(e) - } - return self.asObservable().subscribe(observer) - } - - - /** - 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: ((Element) -> 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() - } - - #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() - } - } - return Disposables.create( - self.asObservable().subscribe(observer), - disposable - ) - } -} - -import class Foundation.NSRecursiveLock - -extension Hooks { - public typealias DefaultErrorHandler = (_ subscriptionCallStack: [String], _ error: Error) -> Void - public typealias CustomCaptureSubscriptionCallstack = () -> [String] - - 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 - } - fileprivate static var _customCaptureSubscriptionCallstack: CustomCaptureSubscriptionCallstack = { - #if DEBUG - return Thread.callStackSymbols - #else - return [] - #endif - } - - /// 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 - } - } - - /// 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 - } - } -} - diff --git a/Example/Pods/RxSwift/RxSwift/ObservableType.swift b/Example/Pods/RxSwift/RxSwift/ObservableType.swift deleted file mode 100755 index dea9bfc..0000000 --- a/Example/Pods/RxSwift/RxSwift/ObservableType.swift +++ /dev/null @@ -1,47 +0,0 @@ -// -// ObservableType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents a push style sequence. -public protocol ObservableType: ObservableConvertibleType { - /** - Subscribes `observer` to receive events for this sequence. - - ### Grammar - - **Next\* (Error | Completed)?** - - * sequences can produce zero or more elements so zero or more `Next` events can be sent to `observer` - * once an `Error` or `Completed` event is sent, the sequence terminates and can't produce any other elements - - It is possible that events are sent from different threads, but no two events can be sent concurrently to - `observer`. - - ### Resource Management - - 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 immediately, call `dispose` on returned - subscription. - - - returns: Subscription for `observer` that can be used to cancel production of sequence elements and free resources. - */ - func subscribe(_ observer: Observer) -> Disposable where Observer.Element == Element -} - -extension ObservableType { - - /// Default implementation of converting `ObservableType` to `Observable`. - public func asObservable() -> Observable { - // temporary workaround - //return Observable.create(subscribe: self.subscribe) - return Observable.create { o in - return self.subscribe(o) - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/AddRef.swift b/Example/Pods/RxSwift/RxSwift/Observables/AddRef.swift deleted file mode 100755 index 2c937a4..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/AddRef.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// AddRef.swift -// RxSwift -// -// Created by Junior B. on 30/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class AddRefSink : Sink, ObserverType { - typealias Element = Observer.Element - - override init(observer: Observer, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next: - self.forwardOn(event) - case .completed, .error: - self.forwardOn(event) - self.dispose() - } - } -} - -final class AddRef : Producer { - - private let _source: Observable - private let _refCount: RefCountDisposable - - init(source: Observable, refCount: RefCountDisposable) { - self._source = source - self._refCount = refCount - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let releaseDisposable = self._refCount.retain() - let sink = AddRefSink(observer: observer, cancel: cancel) - let subscription = Disposables.create(releaseDisposable, self._source.subscribe(sink)) - - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Amb.swift b/Example/Pods/RxSwift/RxSwift/Observables/Amb.swift deleted file mode 100755 index f8c1746..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Amb.swift +++ /dev/null @@ -1,157 +0,0 @@ -// -// Amb.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension 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. - */ - public static func amb(_ sequence: Sequence) -> Observable - where Sequence.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.Element == Element { - return Amb(left: self.asObservable(), right: right.asObservable()) - } -} - -fileprivate enum AmbState { - case neither - case left - case right -} - -final private class AmbObserver: ObserverType { - typealias Element = Observer.Element - typealias Parent = AmbSink - typealias This = AmbObserver - typealias Sink = (This, Event) -> Void - - fileprivate let _parent: Parent - fileprivate var _sink: Sink - fileprivate var _cancel: Disposable - - init(parent: Parent, cancel: Disposable, sink: @escaping Sink) { -#if TRACE_RESOURCES - _ = Resources.incrementTotal() -#endif - - self._parent = parent - self._sink = sink - self._cancel = cancel - } - - func on(_ event: Event) { - self._sink(self, event) - if event.isStopEvent { - self._cancel.dispose() - } - } - - deinit { -#if TRACE_RESOURCES - _ = Resources.decrementTotal() -#endif - } -} - -final private class AmbSink: Sink { - typealias Element = Observer.Element - typealias Parent = Amb - typealias AmbObserverType = AmbObserver - - private let _parent: Parent - - private let _lock = RecursiveLock() - // state - private var _choice = AmbState.neither - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let disposeAll = Disposables.create(subscription1, subscription2) - - 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 { - self._choice = me - o._sink = forwardEvent - o._cancel = disposeAll - otherSubscription.dispose() - } - - if self._choice == me { - self.forwardOn(event) - if event.isStopEvent { - self.dispose() - } - } - } - } - - let sink1 = AmbObserver(parent: self, cancel: subscription1) { o, e in - decide(o, e, .left, subscription2) - } - - let sink2 = AmbObserver(parent: self, cancel: subscription1) { o, e in - decide(o, e, .right, subscription1) - } - - subscription1.setDisposable(self._parent._left.subscribe(sink1)) - subscription2.setDisposable(self._parent._right.subscribe(sink2)) - - return disposeAll - } -} - -final private class Amb: Producer { - fileprivate let _left: Observable - fileprivate let _right: Observable - - init(left: Observable, right: Observable) { - self._left = left - self._right = right - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = AmbSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift b/Example/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift deleted file mode 100755 index d8371e5..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/AsMaybe.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// 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 Element = Observer.Element - - private var _element: Event? - - func on(_ event: Event) { - switch event { - case .next: - if self._element != nil { - self.forwardOn(.error(RxError.moreThanOneElement)) - self.dispose() - } - - self._element = event - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - if let element = self._element { - self.forwardOn(element) - } - self.forwardOn(.completed) - self.dispose() - } - } -} - -final class AsMaybe: Producer { - fileprivate let _source: Observable - - init(source: Observable) { - self._source = source - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = AsMaybeSink(observer: observer, cancel: cancel) - let subscription = self._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 deleted file mode 100755 index 00a2686..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/AsSingle.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// 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 Element = Observer.Element - - private var _element: Event? - - func on(_ event: Event) { - switch event { - case .next: - if self._element != nil { - self.forwardOn(.error(RxError.moreThanOneElement)) - self.dispose() - } - - self._element = event - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - if let element = self._element { - self.forwardOn(element) - self.forwardOn(.completed) - } - else { - self.forwardOn(.error(RxError.noElements)) - } - self.dispose() - } - } -} - -final class AsSingle: Producer { - fileprivate let _source: Observable - - init(source: Observable) { - self._source = source - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = AsSingleSink(observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Buffer.swift b/Example/Pods/RxSwift/RxSwift/Observables/Buffer.swift deleted file mode 100755 index 0eb65f3..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Buffer.swift +++ /dev/null @@ -1,138 +0,0 @@ -// -// Buffer.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/13/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. - */ - public func buffer(timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) - -> Observable<[Element]> { - return BufferTimeCount(source: self.asObservable(), timeSpan: timeSpan, count: count, scheduler: scheduler) - } -} - -final private class BufferTimeCount: Producer<[Element]> { - - fileprivate let _timeSpan: RxTimeInterval - fileprivate let _count: Int - fileprivate let _scheduler: SchedulerType - fileprivate let _source: Observable - - init(source: Observable, timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) { - self._source = source - self._timeSpan = timeSpan - self._count = count - self._scheduler = scheduler - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == [Element] { - let sink = BufferTimeCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -final private class BufferTimeCountSink - : Sink - , LockOwnerType - , ObserverType - , SynchronizedOnType where Observer.Element == [Element] { - typealias Parent = BufferTimeCount - - private let _parent: Parent - - let _lock = RecursiveLock() - - // state - private let _timerD = SerialDisposable() - private var _buffer = [Element]() - private var _windowID = 0 - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - self.createTimer(self._windowID) - return Disposables.create(_timerD, _parent._source.subscribe(self)) - } - - func startNewWindowAndSendCurrentOne() { - self._windowID = self._windowID &+ 1 - let windowID = self._windowID - - let buffer = self._buffer - self._buffer = [] - self.forwardOn(.next(buffer)) - - self.createTimer(windowID) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): - self._buffer.append(element) - - if self._buffer.count == self._parent._count { - self.startNewWindowAndSendCurrentOne() - } - - case .error(let error): - self._buffer = [] - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self.forwardOn(.next(self._buffer)) - self.forwardOn(.completed) - self.dispose() - } - } - - func createTimer(_ windowID: Int) { - if self._timerD.isDisposed { - return - } - - if self._windowID != windowID { - return - } - - let nextTimer = SingleAssignmentDisposable() - - self._timerD.disposable = nextTimer - - let disposable = self._parent._scheduler.scheduleRelative(windowID, dueTime: self._parent._timeSpan) { previousWindowID in - self._lock.performLocked { - if previousWindowID != self._windowID { - return - } - - self.startNewWindowAndSendCurrentOne() - } - - return Disposables.create() - } - - nextTimer.setDisposable(disposable) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Catch.swift b/Example/Pods/RxSwift/RxSwift/Observables/Catch.swift deleted file mode 100755 index 84569ec..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Catch.swift +++ /dev/null @@ -1,235 +0,0 @@ -// -// Catch.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/19/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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: self.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: Element) - -> Observable { - return Catch(source: self.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: Sequence) -> Observable - where Sequence.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 - -final private class CatchSinkProxy: ObserverType { - typealias Element = Observer.Element - typealias Parent = CatchSink - - private let _parent: Parent - - init(parent: Parent) { - self._parent = parent - } - - func on(_ event: Event) { - self._parent.forwardOn(event) - - switch event { - case .next: - break - case .error, .completed: - self._parent.dispose() - } - } -} - -final private class CatchSink: Sink, ObserverType { - typealias Element = Observer.Element - typealias Parent = Catch - - private let _parent: Parent - private let _subscription = SerialDisposable() - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let d1 = SingleAssignmentDisposable() - self._subscription.disposable = d1 - d1.setDisposable(self._parent._source.subscribe(self)) - - return self._subscription - } - - func on(_ event: Event) { - switch event { - case .next: - self.forwardOn(event) - case .completed: - self.forwardOn(event) - self.dispose() - case .error(let error): - do { - let catchSequence = try self._parent._handler(error) - - let observer = CatchSinkProxy(parent: self) - - self._subscription.disposable = catchSequence.subscribe(observer) - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - } - } -} - -final private class Catch: Producer { - typealias Handler = (Swift.Error) throws -> Observable - - fileprivate let _source: Observable - fileprivate let _handler: Handler - - init(source: Observable, handler: @escaping Handler) { - self._source = source - self._handler = handler - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = CatchSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -// catch enumerable - -final private class CatchSequenceSink - : TailRecursiveSink - , ObserverType where Sequence.Element: ObservableConvertibleType, Sequence.Element.Element == Observer.Element { - typealias Element = Observer.Element - typealias Parent = CatchSequence - - private var _lastError: Swift.Error? - - override init(observer: Observer, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next: - self.forwardOn(event) - case .error(let error): - self._lastError = error - self.schedule(.moveNext) - case .completed: - self.forwardOn(event) - self.dispose() - } - } - - override func subscribeToNext(_ source: Observable) -> Disposable { - return source.subscribe(self) - } - - override func done() { - if let lastError = self._lastError { - self.forwardOn(.error(lastError)) - } - else { - self.forwardOn(.completed) - } - - self.dispose() - } - - override func extract(_ observable: Observable) -> SequenceGenerator? { - if let onError = observable as? CatchSequence { - return (onError.sources.makeIterator(), nil) - } - else { - return nil - } - } -} - -final private class CatchSequence: Producer where Sequence.Element: ObservableConvertibleType { - typealias Element = Sequence.Element.Element - - let sources: Sequence - - init(sources: Sequence) { - self.sources = sources - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = CatchSequenceSink(observer: observer, cancel: cancel) - let subscription = sink.run((self.sources.makeIterator(), nil)) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift b/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift deleted file mode 100755 index f81c704..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+Collection.swift +++ /dev/null @@ -1,166 +0,0 @@ -// -// CombineLatest+Collection.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/29/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. - - - 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: Collection, resultSelector: @escaping ([Collection.Element.Element]) throws -> Element) -> Observable - where Collection.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: Collection) -> Observable<[Element]> - where Collection.Element: ObservableType, Collection.Element.Element == Element { - return CombineLatestCollectionType(sources: collection, resultSelector: { $0 }) - } -} - -final private class CombineLatestCollectionTypeSink - : Sink where Collection.Element: ObservableConvertibleType { - typealias Result = Observer.Element - typealias Parent = CombineLatestCollectionType - typealias SourceElement = Collection.Element.Element - - let _parent: Parent - - let _lock = RecursiveLock() - - // state - var _numberOfValues = 0 - var _values: [SourceElement?] - var _isDone: [Bool] - var _numberOfDone = 0 - var _subscriptions: [SingleAssignmentDisposable] - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - self._values = [SourceElement?](repeating: nil, count: parent._count) - self._isDone = [Bool](repeating: false, count: parent._count) - self._subscriptions = [SingleAssignmentDisposable]() - self._subscriptions.reserveCapacity(parent._count) - - for _ in 0 ..< parent._count { - self._subscriptions.append(SingleAssignmentDisposable()) - } - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event, atIndex: Int) { - self._lock.lock(); defer { self._lock.unlock() } // { - switch event { - case .next(let element): - if self._values[atIndex] == nil { - self._numberOfValues += 1 - } - - self._values[atIndex] = element - - if self._numberOfValues < self._parent._count { - let numberOfOthersThatAreDone = self._numberOfDone - (self._isDone[atIndex] ? 1 : 0) - if numberOfOthersThatAreDone == self._parent._count - 1 { - self.forwardOn(.completed) - self.dispose() - } - return - } - - do { - let result = try self._parent._resultSelector(self._values.map { $0! }) - self.forwardOn(.next(result)) - } - catch let error { - self.forwardOn(.error(error)) - self.dispose() - } - - case .error(let error): - self.forwardOn(.error(error)) - self.dispose() - case .completed: - if self._isDone[atIndex] { - return - } - - self._isDone[atIndex] = true - self._numberOfDone += 1 - - if self._numberOfDone == self._parent._count { - self.forwardOn(.completed) - self.dispose() - } - else { - self._subscriptions[atIndex].dispose() - } - } - // } - } - - func run() -> Disposable { - var j = 0 - for i in self._parent._sources { - let index = j - let source = i.asObservable() - let disposable = source.subscribe(AnyObserver { event in - self.on(event, atIndex: index) - }) - - self._subscriptions[j].setDisposable(disposable) - - j += 1 - } - - if self._parent._sources.isEmpty { - do { - let result = try self._parent._resultSelector([]) - self.forwardOn(.next(result)) - self.forwardOn(.completed) - self.dispose() - } - catch let error { - self.forwardOn(.error(error)) - self.dispose() - } - } - - return Disposables.create(_subscriptions) - } -} - -final private class CombineLatestCollectionType: Producer where Collection.Element: ObservableConvertibleType { - typealias ResultSelector = ([Collection.Element.Element]) throws -> Result - - let _sources: Collection - let _resultSelector: ResultSelector - let _count: Int - - init(sources: Collection, resultSelector: @escaping ResultSelector) { - self._sources = sources - self._resultSelector = resultSelector - self._count = self._sources.count - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Result { - let sink = CombineLatestCollectionTypeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift b/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift deleted file mode 100755 index ece5802..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest+arity.swift +++ /dev/null @@ -1,843 +0,0 @@ -// This file is autogenerated. Take a look at `Preprocessor` target in RxSwift project -// -// CombineLatest+arity.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/22/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - - - -// 2 - -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. - - - 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 - (_ source1: O1, _ source2: O2, resultSelector: @escaping (O1.Element, O2.Element) throws -> Element) - -> Observable { - return CombineLatest2( - source1: source1.asObservable(), source2: source2.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where Element == 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.Element, O2.Element)> { - return CombineLatest2( - source1: source1.asObservable(), source2: source2.asObservable(), - resultSelector: { ($0, $1) } - ) - } -} - -final class CombineLatestSink2_ : CombineLatestSink { - typealias Result = Observer.Element - typealias Parent = CombineLatest2 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(arity: 2, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: self._lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: self._lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - - subscription1.setDisposable(self._parent._source1.subscribe(observer1)) - subscription2.setDisposable(self._parent._source2.subscribe(observer2)) - - return Disposables.create([ - subscription1, - subscription2 - ]) - } - - override func getResult() throws-> Result { - return try self._parent._resultSelector(self._latestElement1, self._latestElement2) - } -} - -final class CombineLatest2 : Producer { - typealias ResultSelector = (E1, E2) throws -> Result - - let _source1: Observable - let _source2: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, resultSelector: @escaping ResultSelector) { - self._source1 = source1 - self._source2 = source2 - - self._resultSelector = resultSelector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Result { - let sink = CombineLatestSink2_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 3 - -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. - - - 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 - (_ source1: O1, _ source2: O2, _ source3: O3, resultSelector: @escaping (O1.Element, O2.Element, O3.Element) throws -> Element) - -> Observable { - return CombineLatest3( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where Element == 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.Element, O2.Element, O3.Element)> { - return CombineLatest3( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), - resultSelector: { ($0, $1, $2) } - ) - } -} - -final class CombineLatestSink3_ : CombineLatestSink { - typealias Result = Observer.Element - typealias Parent = CombineLatest3 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(arity: 3, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: self._lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: self._lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: self._lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - - subscription1.setDisposable(self._parent._source1.subscribe(observer1)) - subscription2.setDisposable(self._parent._source2.subscribe(observer2)) - subscription3.setDisposable(self._parent._source3.subscribe(observer3)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3 - ]) - } - - override func getResult() throws-> Result { - return try self._parent._resultSelector(self._latestElement1, self._latestElement2, self._latestElement3) - } -} - -final class CombineLatest3 : Producer { - typealias ResultSelector = (E1, E2, E3) throws-> Result - - let _source1: Observable - let _source2: Observable - let _source3: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, resultSelector: @escaping ResultSelector) { - self._source1 = source1 - self._source2 = source2 - self._source3 = source3 - - self._resultSelector = resultSelector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Result { - let sink = CombineLatestSink3_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 4 - -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. - - - 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 - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: @escaping (O1.Element, O2.Element, O3.Element, O4.Element) throws -> Element) - -> Observable { - return CombineLatest4( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where Element == 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.Element, O2.Element, O3.Element, O4.Element)> { - return CombineLatest4( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), - resultSelector: { ($0, $1, $2, $3) } - ) - } -} - -final class CombineLatestSink4_ : CombineLatestSink { - typealias Result = Observer.Element - typealias Parent = CombineLatest4 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - var _latestElement4: E4! = nil - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(arity: 4, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: self._lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: self._lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: self._lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: self._lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - - subscription1.setDisposable(self._parent._source1.subscribe(observer1)) - subscription2.setDisposable(self._parent._source2.subscribe(observer2)) - subscription3.setDisposable(self._parent._source3.subscribe(observer3)) - subscription4.setDisposable(self._parent._source4.subscribe(observer4)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4 - ]) - } - - override func getResult() throws-> Result { - return try self._parent._resultSelector(self._latestElement1, self._latestElement2, self._latestElement3, self._latestElement4) - } -} - -final class CombineLatest4 : Producer { - typealias ResultSelector = (E1, E2, E3, E4) throws-> Result - - let _source1: Observable - let _source2: Observable - let _source3: Observable - let _source4: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, resultSelector: @escaping ResultSelector) { - self._source1 = source1 - self._source2 = source2 - self._source3 = source3 - self._source4 = source4 - - self._resultSelector = resultSelector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Result { - let sink = CombineLatestSink4_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 5 - -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. - - - 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 - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: @escaping (O1.Element, O2.Element, O3.Element, O4.Element, O5.Element) throws -> Element) - -> Observable { - return CombineLatest5( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where Element == 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.Element, O2.Element, O3.Element, O4.Element, O5.Element)> { - 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 Result = Observer.Element - typealias Parent = CombineLatest5 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - var _latestElement4: E4! = nil - var _latestElement5: E5! = nil - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(arity: 5, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: self._lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: self._lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: self._lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: self._lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - let observer5 = CombineLatestObserver(lock: self._lock, parent: self, index: 4, setLatestValue: { (e: E5) -> Void in self._latestElement5 = e }, this: subscription5) - - subscription1.setDisposable(self._parent._source1.subscribe(observer1)) - subscription2.setDisposable(self._parent._source2.subscribe(observer2)) - subscription3.setDisposable(self._parent._source3.subscribe(observer3)) - subscription4.setDisposable(self._parent._source4.subscribe(observer4)) - subscription5.setDisposable(self._parent._source5.subscribe(observer5)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5 - ]) - } - - override func getResult() throws-> Result { - return try self._parent._resultSelector(self._latestElement1, self._latestElement2, self._latestElement3, self._latestElement4, self._latestElement5) - } -} - -final class CombineLatest5 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5) throws-> Result - - let _source1: Observable - let _source2: Observable - let _source3: Observable - let _source4: Observable - let _source5: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, resultSelector: @escaping ResultSelector) { - self._source1 = source1 - self._source2 = source2 - self._source3 = source3 - self._source4 = source4 - self._source5 = source5 - - self._resultSelector = resultSelector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Result { - let sink = CombineLatestSink5_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 6 - -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. - - - 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 - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: @escaping (O1.Element, O2.Element, O3.Element, O4.Element, O5.Element, O6.Element) throws -> Element) - -> Observable { - return CombineLatest6( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where Element == 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.Element, O2.Element, O3.Element, O4.Element, O5.Element, O6.Element)> { - 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 Result = Observer.Element - typealias Parent = CombineLatest6 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - var _latestElement4: E4! = nil - var _latestElement5: E5! = nil - var _latestElement6: E6! = nil - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(arity: 6, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - let subscription6 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: self._lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: self._lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: self._lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: self._lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - let observer5 = CombineLatestObserver(lock: self._lock, parent: self, index: 4, setLatestValue: { (e: E5) -> Void in self._latestElement5 = e }, this: subscription5) - let observer6 = CombineLatestObserver(lock: self._lock, parent: self, index: 5, setLatestValue: { (e: E6) -> Void in self._latestElement6 = e }, this: subscription6) - - subscription1.setDisposable(self._parent._source1.subscribe(observer1)) - subscription2.setDisposable(self._parent._source2.subscribe(observer2)) - subscription3.setDisposable(self._parent._source3.subscribe(observer3)) - subscription4.setDisposable(self._parent._source4.subscribe(observer4)) - subscription5.setDisposable(self._parent._source5.subscribe(observer5)) - subscription6.setDisposable(self._parent._source6.subscribe(observer6)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6 - ]) - } - - override func getResult() throws-> Result { - return try self._parent._resultSelector(self._latestElement1, self._latestElement2, self._latestElement3, self._latestElement4, self._latestElement5, self._latestElement6) - } -} - -final class CombineLatest6 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6) throws-> Result - - let _source1: Observable - let _source2: Observable - let _source3: Observable - let _source4: Observable - let _source5: Observable - let _source6: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, resultSelector: @escaping ResultSelector) { - self._source1 = source1 - self._source2 = source2 - self._source3 = source3 - self._source4 = source4 - self._source5 = source5 - self._source6 = source6 - - self._resultSelector = resultSelector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Result { - let sink = CombineLatestSink6_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 7 - -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. - - - 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 - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: @escaping (O1.Element, O2.Element, O3.Element, O4.Element, O5.Element, O6.Element, O7.Element) throws -> Element) - -> Observable { - return CombineLatest7( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where Element == 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.Element, O2.Element, O3.Element, O4.Element, O5.Element, O6.Element, O7.Element)> { - 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 Result = Observer.Element - typealias Parent = CombineLatest7 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - var _latestElement4: E4! = nil - var _latestElement5: E5! = nil - var _latestElement6: E6! = nil - var _latestElement7: E7! = nil - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(arity: 7, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - let subscription6 = SingleAssignmentDisposable() - let subscription7 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: self._lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: self._lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: self._lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: self._lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - let observer5 = CombineLatestObserver(lock: self._lock, parent: self, index: 4, setLatestValue: { (e: E5) -> Void in self._latestElement5 = e }, this: subscription5) - let observer6 = CombineLatestObserver(lock: self._lock, parent: self, index: 5, setLatestValue: { (e: E6) -> Void in self._latestElement6 = e }, this: subscription6) - let observer7 = CombineLatestObserver(lock: self._lock, parent: self, index: 6, setLatestValue: { (e: E7) -> Void in self._latestElement7 = e }, this: subscription7) - - subscription1.setDisposable(self._parent._source1.subscribe(observer1)) - subscription2.setDisposable(self._parent._source2.subscribe(observer2)) - subscription3.setDisposable(self._parent._source3.subscribe(observer3)) - subscription4.setDisposable(self._parent._source4.subscribe(observer4)) - subscription5.setDisposable(self._parent._source5.subscribe(observer5)) - subscription6.setDisposable(self._parent._source6.subscribe(observer6)) - subscription7.setDisposable(self._parent._source7.subscribe(observer7)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6, - subscription7 - ]) - } - - override func getResult() throws-> Result { - return try self._parent._resultSelector(self._latestElement1, self._latestElement2, self._latestElement3, self._latestElement4, self._latestElement5, self._latestElement6, self._latestElement7) - } -} - -final class CombineLatest7 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7) throws-> Result - - let _source1: Observable - let _source2: Observable - let _source3: Observable - let _source4: Observable - let _source5: Observable - let _source6: Observable - let _source7: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, resultSelector: @escaping ResultSelector) { - self._source1 = source1 - self._source2 = source2 - self._source3 = source3 - self._source4 = source4 - self._source5 = source5 - self._source6 = source6 - self._source7 = source7 - - self._resultSelector = resultSelector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Result { - let sink = CombineLatestSink7_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 8 - -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. - - - 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 - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: @escaping (O1.Element, O2.Element, O3.Element, O4.Element, O5.Element, O6.Element, O7.Element, O8.Element) throws -> Element) - -> Observable { - 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: resultSelector - ) - } -} - -extension ObservableType where Element == 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.Element, O2.Element, O3.Element, O4.Element, O5.Element, O6.Element, O7.Element, O8.Element)> { - 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 Result = Observer.Element - typealias Parent = CombineLatest8 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - var _latestElement4: E4! = nil - var _latestElement5: E5! = nil - var _latestElement6: E6! = nil - var _latestElement7: E7! = nil - var _latestElement8: E8! = nil - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(arity: 8, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - let subscription6 = SingleAssignmentDisposable() - let subscription7 = SingleAssignmentDisposable() - let subscription8 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: self._lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: self._lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: self._lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: self._lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - let observer5 = CombineLatestObserver(lock: self._lock, parent: self, index: 4, setLatestValue: { (e: E5) -> Void in self._latestElement5 = e }, this: subscription5) - let observer6 = CombineLatestObserver(lock: self._lock, parent: self, index: 5, setLatestValue: { (e: E6) -> Void in self._latestElement6 = e }, this: subscription6) - let observer7 = CombineLatestObserver(lock: self._lock, parent: self, index: 6, setLatestValue: { (e: E7) -> Void in self._latestElement7 = e }, this: subscription7) - let observer8 = CombineLatestObserver(lock: self._lock, parent: self, index: 7, setLatestValue: { (e: E8) -> Void in self._latestElement8 = e }, this: subscription8) - - subscription1.setDisposable(self._parent._source1.subscribe(observer1)) - subscription2.setDisposable(self._parent._source2.subscribe(observer2)) - subscription3.setDisposable(self._parent._source3.subscribe(observer3)) - subscription4.setDisposable(self._parent._source4.subscribe(observer4)) - subscription5.setDisposable(self._parent._source5.subscribe(observer5)) - subscription6.setDisposable(self._parent._source6.subscribe(observer6)) - subscription7.setDisposable(self._parent._source7.subscribe(observer7)) - subscription8.setDisposable(self._parent._source8.subscribe(observer8)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6, - subscription7, - subscription8 - ]) - } - - override func getResult() throws-> Result { - return try self._parent._resultSelector(self._latestElement1, self._latestElement2, self._latestElement3, self._latestElement4, self._latestElement5, self._latestElement6, self._latestElement7, self._latestElement8) - } -} - -final class CombineLatest8 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7, E8) throws-> Result - - let _source1: Observable - let _source2: Observable - let _source3: Observable - let _source4: Observable - let _source5: Observable - let _source6: Observable - let _source7: Observable - let _source8: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, source8: Observable, resultSelector: @escaping ResultSelector) { - self._source1 = source1 - self._source2 = source2 - self._source3 = source3 - self._source4 = source4 - self._source5 = source5 - self._source6 = source6 - self._source7 = source7 - self._source8 = source8 - - self._resultSelector = resultSelector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Result { - let sink = CombineLatestSink8_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - diff --git a/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift b/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift deleted file mode 100755 index 7d6fa7f..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/CombineLatest.swift +++ /dev/null @@ -1,131 +0,0 @@ -// -// CombineLatest.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol CombineLatestProtocol : class { - func next(_ index: Int) - func fail(_ error: Swift.Error) - func done(_ index: Int) -} - -class CombineLatestSink - : Sink - , CombineLatestProtocol { - typealias Element = Observer.Element - - let _lock = RecursiveLock() - - private let _arity: Int - private var _numberOfValues = 0 - private var _numberOfDone = 0 - private var _hasValue: [Bool] - private var _isDone: [Bool] - - init(arity: Int, observer: Observer, cancel: Cancelable) { - self._arity = arity - self._hasValue = [Bool](repeating: false, count: arity) - self._isDone = [Bool](repeating: false, count: arity) - - super.init(observer: observer, cancel: cancel) - } - - func getResult() throws -> Element { - rxAbstractMethod() - } - - func next(_ index: Int) { - if !self._hasValue[index] { - self._hasValue[index] = true - self._numberOfValues += 1 - } - - if self._numberOfValues == self._arity { - do { - let result = try self.getResult() - self.forwardOn(.next(result)) - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - } - else { - var allOthersDone = true - - for i in 0 ..< self._arity { - if i != index && !self._isDone[i] { - allOthersDone = false - break - } - } - - if allOthersDone { - self.forwardOn(.completed) - self.dispose() - } - } - } - - func fail(_ error: Swift.Error) { - self.forwardOn(.error(error)) - self.dispose() - } - - func done(_ index: Int) { - if self._isDone[index] { - return - } - - self._isDone[index] = true - self._numberOfDone += 1 - - if self._numberOfDone == self._arity { - self.forwardOn(.completed) - self.dispose() - } - } -} - -final class CombineLatestObserver - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias ValueSetter = (Element) -> Void - - private let _parent: CombineLatestProtocol - - let _lock: RecursiveLock - private let _index: Int - private let _this: Disposable - private let _setLatestValue: ValueSetter - - init(lock: RecursiveLock, parent: CombineLatestProtocol, index: Int, setLatestValue: @escaping ValueSetter, this: Disposable) { - self._lock = lock - self._parent = parent - self._index = index - self._this = this - self._setLatestValue = setLatestValue - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let value): - self._setLatestValue(value) - self._parent.next(self._index) - case .error(let error): - self._this.dispose() - self._parent.fail(error) - case .completed: - self._this.dispose() - self._parent.done(self._index) - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/CompactMap.swift b/Example/Pods/RxSwift/RxSwift/Observables/CompactMap.swift deleted file mode 100755 index 09cd3a9..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/CompactMap.swift +++ /dev/null @@ -1,82 +0,0 @@ -// -// CompactMap.swift -// RxSwift -// -// Created by Michael Long on 04/09/2019. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Projects each element of an observable sequence into an optional form and filters all optional results. - - Equivalent to: - - func compactMap(_ transform: @escaping (Self.E) throws -> Result?) -> RxSwift.Observable { - return self.map { try? transform($0) }.filter { $0 != nil }.map { $0! } - } - - - parameter transform: A transform function to apply to each source element and which returns an element or nil. - - returns: An observable sequence whose elements are the result of filtering the transform function for each element of the source. - - */ - public func compactMap(_ transform: @escaping (Element) throws -> Result?) - -> Observable { - return CompactMap(source: self.asObservable(), transform: transform) - } -} - -final private class CompactMapSink: Sink, ObserverType { - typealias Transform = (SourceType) throws -> ResultType? - - typealias ResultType = Observer.Element - typealias Element = SourceType - - private let _transform: Transform - - init(transform: @escaping Transform, observer: Observer, cancel: Cancelable) { - self._transform = transform - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let element): - do { - if let mappedElement = try self._transform(element) { - self.forwardOn(.next(mappedElement)) - } - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - case .error(let error): - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self.forwardOn(.completed) - self.dispose() - } - } -} - -final private class CompactMap: Producer { - typealias Transform = (SourceType) throws -> ResultType? - - private let _source: Observable - - private let _transform: Transform - - init(source: Observable, transform: @escaping Transform) { - self._source = source - self._transform = transform - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == ResultType { - let sink = CompactMapSink(transform: self._transform, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Concat.swift b/Example/Pods/RxSwift/RxSwift/Observables/Concat.swift deleted file mode 100755 index 6d76a04..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Concat.swift +++ /dev/null @@ -1,131 +0,0 @@ -// -// 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: Source) -> Observable where Source.Element == Element { - 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: Sequence) -> Observable - where Sequence.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: Collection) -> Observable - where Collection.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 private class ConcatSink - : TailRecursiveSink - , ObserverType where Sequence.Element: ObservableConvertibleType, Sequence.Element.Element == Observer.Element { - typealias Element = Observer.Element - - override init(observer: Observer, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event){ - switch event { - case .next: - self.forwardOn(event) - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - self.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 private class Concat: Producer where Sequence.Element: ObservableConvertibleType { - typealias Element = Sequence.Element.Element - - fileprivate let _sources: Sequence - fileprivate let _count: IntMax? - - init(sources: Sequence, count: IntMax?) { - self._sources = sources - self._count = count - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = ConcatSink(observer: observer, cancel: cancel) - let subscription = sink.run((self._sources.makeIterator(), self._count)) - return (sink: sink, subscription: subscription) - } -} - diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Create.swift b/Example/Pods/RxSwift/RxSwift/Observables/Create.swift deleted file mode 100755 index 30eae4c..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Create.swift +++ /dev/null @@ -1,78 +0,0 @@ -// -// Create.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - // 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. - */ - public static func create(_ subscribe: @escaping (AnyObserver) -> Disposable) -> Observable { - return AnonymousObservable(subscribe) - } -} - -final private class AnonymousObservableSink: Sink, ObserverType { - typealias Element = Observer.Element - typealias Parent = AnonymousObservable - - // state - private let _isStopped = AtomicInt(0) - - #if DEBUG - fileprivate let _synchronizationTracker = SynchronizationTracker() - #endif - - override init(observer: Observer, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - #if DEBUG - self._synchronizationTracker.register(synchronizationErrorMessage: .default) - defer { self._synchronizationTracker.unregister() } - #endif - switch event { - case .next: - if load(self._isStopped) == 1 { - return - } - self.forwardOn(event) - case .error, .completed: - if fetchOr(self._isStopped, 1) == 0 { - self.forwardOn(event) - self.dispose() - } - } - } - - func run(_ parent: Parent) -> Disposable { - return parent._subscribeHandler(AnyObserver(self)) - } -} - -final private class AnonymousObservable: Producer { - typealias SubscribeHandler = (AnyObserver) -> Disposable - - let _subscribeHandler: SubscribeHandler - - init(_ subscribeHandler: @escaping SubscribeHandler) { - self._subscribeHandler = subscribeHandler - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = AnonymousObservableSink(observer: observer, cancel: cancel) - let subscription = sink.run(self) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Debounce.swift b/Example/Pods/RxSwift/RxSwift/Observables/Debounce.swift deleted file mode 100755 index 6f84711..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Debounce.swift +++ /dev/null @@ -1,118 +0,0 @@ -// -// Debounce.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/11/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - 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 private class DebounceSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = Observer.Element - typealias ParentType = Debounce - - private let _parent: ParentType - - let _lock = RecursiveLock() - - // state - private var _id = 0 as UInt64 - private var _value: Element? - - let cancellable = SerialDisposable() - - init(parent: ParentType, observer: Observer, cancel: Cancelable) { - self._parent = parent - - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription = self._parent._source.subscribe(self) - - return Disposables.create(subscription, cancellable) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): - self._id = self._id &+ 1 - let currentId = self._id - self._value = element - - - let scheduler = self._parent._scheduler - let dueTime = self._parent._dueTime - - let d = SingleAssignmentDisposable() - self.cancellable.disposable = d - d.setDisposable(scheduler.scheduleRelative(currentId, dueTime: dueTime, action: self.propagate)) - case .error: - self._value = nil - self.forwardOn(event) - self.dispose() - case .completed: - if let value = self._value { - self._value = nil - self.forwardOn(.next(value)) - } - self.forwardOn(.completed) - self.dispose() - } - } - - func propagate(_ currentId: UInt64) -> Disposable { - self._lock.lock(); defer { self._lock.unlock() } // { - let originalValue = self._value - - if let value = originalValue, self._id == currentId { - self._value = nil - self.forwardOn(.next(value)) - } - // } - return Disposables.create() - } -} - -final private class Debounce: Producer { - fileprivate let _source: Observable - fileprivate let _dueTime: RxTimeInterval - fileprivate let _scheduler: SchedulerType - - init(source: Observable, dueTime: RxTimeInterval, scheduler: SchedulerType) { - self._source = source - self._dueTime = dueTime - self._scheduler = scheduler - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = DebounceSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } - -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Debug.swift b/Example/Pods/RxSwift/RxSwift/Observables/Debug.swift deleted file mode 100755 index 103c6e8..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Debug.swift +++ /dev/null @@ -1,103 +0,0 @@ -// -// Debug.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/2/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date -import class Foundation.DateFormatter - -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. - - 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)") -} - -final private class DebugSink: Sink, ObserverType where Observer.Element == Source.Element { - typealias Element = Observer.Element - typealias Parent = Debug - - private let _parent: Parent - private let _timestampFormatter = DateFormatter() - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - self._timestampFormatter.dateFormat = dateFormat - - logEvent(self._parent._identifier, dateFormat: self._timestampFormatter, content: "subscribed") - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - let maxEventTextLength = 40 - let eventText = "\(event)" - - let eventNormalized = (eventText.count > maxEventTextLength) && self._parent._trimOutput - ? String(eventText.prefix(maxEventTextLength / 2)) + "..." + String(eventText.suffix(maxEventTextLength / 2)) - : eventText - - logEvent(self._parent._identifier, dateFormat: self._timestampFormatter, content: "Event \(eventNormalized)") - - self.forwardOn(event) - if event.isStopEvent { - self.dispose() - } - } - - override func dispose() { - if !self.disposed { - logEvent(self._parent._identifier, dateFormat: self._timestampFormatter, content: "isDisposed") - } - super.dispose() - } -} - -final private class Debug: Producer { - fileprivate let _identifier: String - fileprivate let _trimOutput: Bool - fileprivate let _source: Source - - init(source: Source, identifier: String?, trimOutput: Bool, file: String, line: UInt, function: String) { - self._trimOutput = trimOutput - if let identifier = identifier { - self._identifier = identifier - } - else { - let trimmedFile: String - if let lastIndex = file.lastIndexOf("/") { - trimmedFile = String(file[file.index(after: lastIndex) ..< file.endIndex]) - } - else { - trimmedFile = file - } - self._identifier = "\(trimmedFile):\(line) (\(function))" - } - self._source = source - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Source.Element { - let sink = DebugSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift b/Example/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift deleted file mode 100755 index 5ad1bef..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/DefaultIfEmpty.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// 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: Element) -> Observable { - return DefaultIfEmpty(source: self.asObservable(), default: `default`) - } -} - -final private class DefaultIfEmptySink: Sink, ObserverType { - typealias Element = Observer.Element - private let _default: Element - private var _isEmpty = true - - init(default: Element, observer: Observer, cancel: Cancelable) { - self._default = `default` - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next: - self._isEmpty = false - self.forwardOn(event) - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - if self._isEmpty { - self.forwardOn(.next(self._default)) - } - self.forwardOn(.completed) - self.dispose() - } - } -} - -final private class DefaultIfEmpty: Producer { - private let _source: Observable - private let _default: SourceType - - init(source: Observable, `default`: SourceType) { - self._source = source - self._default = `default` - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == SourceType { - let sink = DefaultIfEmptySink(default: self._default, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Deferred.swift b/Example/Pods/RxSwift/RxSwift/Observables/Deferred.swift deleted file mode 100755 index 8152f5c..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Deferred.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// Deferred.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/19/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - 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. - */ - public static func deferred(_ observableFactory: @escaping () throws -> Observable) - -> Observable { - return Deferred(observableFactory: observableFactory) - } -} - -final private class DeferredSink: Sink, ObserverType where Source.Element == Observer.Element { - typealias Element = Observer.Element - - private let _observableFactory: () throws -> Source - - init(observableFactory: @escaping () throws -> Source, observer: Observer, cancel: Cancelable) { - self._observableFactory = observableFactory - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - do { - let result = try self._observableFactory() - return result.subscribe(self) - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - return Disposables.create() - } - } - - func on(_ event: Event) { - self.forwardOn(event) - - switch event { - case .next: - break - case .error: - self.dispose() - case .completed: - self.dispose() - } - } -} - -final private class Deferred: Producer { - typealias Factory = () throws -> Source - - private let _observableFactory : Factory - - init(observableFactory: @escaping Factory) { - self._observableFactory = observableFactory - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) - where Observer.Element == Source.Element { - let sink = DeferredSink(observableFactory: self._observableFactory, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Delay.swift b/Example/Pods/RxSwift/RxSwift/Observables/Delay.swift deleted file mode 100755 index 1c00a49..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Delay.swift +++ /dev/null @@ -1,176 +0,0 @@ -// -// Delay.swift -// RxSwift -// -// Created by tarunon on 2016/02/09. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date - -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 private class DelaySink - : Sink - , ObserverType { - typealias Element = Observer.Element - typealias Source = Observable - typealias DisposeKey = Bag.KeyType - - private let _lock = RecursiveLock() - - private let _dueTime: RxTimeInterval - private let _scheduler: SchedulerType - - private let _sourceSubscription = SingleAssignmentDisposable() - private let _cancelable = SerialDisposable() - - // is scheduled some action - private var _active = false - // is "run loop" on different scheduler running - private var _running = false - private var _errorEvent: Event? - - // state - private var _queue = Queue<(eventTime: RxTime, event: Event)>(capacity: 0) - private var _disposed = false - - init(observer: Observer, dueTime: RxTimeInterval, scheduler: SchedulerType, cancel: Cancelable) { - self._dueTime = dueTime - self._scheduler = scheduler - super.init(observer: observer, cancel: cancel) - } - - // All of these complications in this method are caused by the fact that - // 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. - func drainQueue(state: (), scheduler: AnyRecursiveScheduler<()>) { - - self._lock.lock() // { - let hasFailed = self._errorEvent != nil - if !hasFailed { - self._running = true - } - self._lock.unlock() // } - - if hasFailed { - return - } - - var ranAtLeastOnce = false - - while true { - self._lock.lock() // { - let errorEvent = self._errorEvent - - let eventToForwardImmediately = ranAtLeastOnce ? nil : self._queue.dequeue()?.event - let nextEventToScheduleOriginalTime: Date? = ranAtLeastOnce && !self._queue.isEmpty ? self._queue.peek().eventTime : nil - - if errorEvent == nil { - if eventToForwardImmediately != nil { - } - else if nextEventToScheduleOriginalTime != nil { - self._running = false - } - else { - self._running = false - self._active = false - } - } - self._lock.unlock() // { - - if let errorEvent = errorEvent { - self.forwardOn(errorEvent) - self.dispose() - return - } - else { - if let eventToForwardImmediately = eventToForwardImmediately { - ranAtLeastOnce = true - self.forwardOn(eventToForwardImmediately) - if case .completed = eventToForwardImmediately { - self.dispose() - return - } - } - else if let nextEventToScheduleOriginalTime = nextEventToScheduleOriginalTime { - scheduler.schedule((), dueTime: self._dueTime.reduceWithSpanBetween(earlierDate: nextEventToScheduleOriginalTime, laterDate: self._scheduler.now)) - return - } - else { - return - } - } - } - } - - func on(_ event: Event) { - if event.isStopEvent { - self._sourceSubscription.dispose() - } - - switch event { - case .error: - self._lock.lock() // { - let shouldSendImmediately = !self._running - self._queue = Queue(capacity: 0) - self._errorEvent = event - self._lock.unlock() // } - - if shouldSendImmediately { - self.forwardOn(event) - self.dispose() - } - default: - self._lock.lock() // { - let shouldSchedule = !self._active - self._active = true - self._queue.enqueue((self._scheduler.now, event)) - self._lock.unlock() // } - - if shouldSchedule { - self._cancelable.disposable = self._scheduler.scheduleRecursive((), dueTime: self._dueTime, action: self.drainQueue) - } - } - } - - func run(source: Observable) -> Disposable { - self._sourceSubscription.setDisposable(source.subscribe(self)) - return Disposables.create(_sourceSubscription, _cancelable) - } -} - -final private class Delay: Producer { - private let _source: Observable - private let _dueTime: RxTimeInterval - private let _scheduler: SchedulerType - - init(source: Observable, dueTime: RxTimeInterval, scheduler: SchedulerType) { - self._source = source - self._dueTime = dueTime - self._scheduler = scheduler - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = DelaySink(observer: observer, dueTime: self._dueTime, scheduler: self._scheduler, cancel: cancel) - let subscription = sink.run(source: self._source) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift b/Example/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift deleted file mode 100755 index a329d60..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/DelaySubscription.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// DelaySubscription.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. - */ - public func delaySubscription(_ dueTime: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return DelaySubscription(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) - } -} - -final private class DelaySubscriptionSink - : Sink, ObserverType { - typealias Element = Observer.Element - - func on(_ event: Event) { - self.forwardOn(event) - if event.isStopEvent { - self.dispose() - } - } - -} - -final private class DelaySubscription: Producer { - private let _source: Observable - private let _dueTime: RxTimeInterval - private let _scheduler: SchedulerType - - init(source: Observable, dueTime: RxTimeInterval, scheduler: SchedulerType) { - self._source = source - self._dueTime = dueTime - self._scheduler = scheduler - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = DelaySubscriptionSink(observer: observer, cancel: cancel) - let subscription = self._scheduler.scheduleRelative((), dueTime: self._dueTime) { _ in - return self._source.subscribe(sink) - } - - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift b/Example/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift deleted file mode 100755 index 8337311..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Dematerialize.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// Dematerialize.swift -// RxSwift -// -// Created by Jamie Pinkham on 3/13/17. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType where Element: 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 Observer.Element == T.Element { - fileprivate func on(_ event: Event) { - switch event { - case .next(let element): - self.forwardOn(element.event) - if element.event.isStopEvent { - self.dispose() - } - case .completed: - self.forwardOn(.completed) - self.dispose() - case .error(let error): - self.forwardOn(.error(error)) - self.dispose() - } - } -} - -final private class Dematerialize: Producer { - private let _source: Observable - - init(source: Observable) { - self._source = source - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == T.Element { - let sink = DematerializeSink(observer: observer, cancel: cancel) - let subscription = self._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 deleted file mode 100755 index 5bf38d6..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/DistinctUntilChanged.swift +++ /dev/null @@ -1,125 +0,0 @@ -// -// DistinctUntilChanged.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType where Element: 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 (Element) throws -> Key) - -> 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 (Element, Element) 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 (Element) throws -> K, comparer: @escaping (K, K) throws -> Bool) - -> Observable { - return DistinctUntilChanged(source: self.asObservable(), selector: keySelector, comparer: comparer) - } -} - -final private class DistinctUntilChangedSink: Sink, ObserverType { - typealias Element = Observer.Element - - private let _parent: DistinctUntilChanged - private var _currentKey: Key? - - init(parent: DistinctUntilChanged, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - let key = try self._parent._selector(value) - var areEqual = false - if let currentKey = self._currentKey { - areEqual = try self._parent._comparer(currentKey, key) - } - - if areEqual { - return - } - - self._currentKey = key - - self.forwardOn(event) - } - catch let error { - self.forwardOn(.error(error)) - self.dispose() - } - case .error, .completed: - self.forwardOn(event) - self.dispose() - } - } -} - -final private 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) { - self._source = source - self._selector = selector - self._comparer = comparer - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = DistinctUntilChangedSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._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 deleted file mode 100755 index 8f0c228..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Do.swift +++ /dev/null @@ -1,112 +0,0 @@ -// -// 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 afterNext: Action to invoke for each element after the observable has passed an onNext event along to its downstream. - - parameter onError: Action to invoke upon errored termination of the observable sequence. - - parameter afterError: Action to invoke after errored termination of the observable sequence. - - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. - - parameter afterCompleted: Action to invoke after 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: ((Element) throws -> Void)? = nil, afterNext: ((Element) throws -> Void)? = nil, onError: ((Swift.Error) throws -> Void)? = nil, afterError: ((Swift.Error) throws -> Void)? = nil, onCompleted: (() throws -> Void)? = nil, afterCompleted: (() throws -> Void)? = nil, onSubscribe: (() -> Void)? = nil, onSubscribed: (() -> Void)? = nil, onDispose: (() -> 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?() - } - }, afterEventHandler: { e in - switch e { - case .next(let element): - try afterNext?(element) - case .error(let e): - try afterError?(e) - case .completed: - try afterCompleted?() - } - }, onSubscribe: onSubscribe, onSubscribed: onSubscribed, onDispose: onDispose) - } -} - -final private class DoSink: Sink, ObserverType { - typealias Element = Observer.Element - typealias EventHandler = (Event) throws -> Void - typealias AfterEventHandler = (Event) throws -> Void - - private let _eventHandler: EventHandler - private let _afterEventHandler: AfterEventHandler - - init(eventHandler: @escaping EventHandler, afterEventHandler: @escaping AfterEventHandler, observer: Observer, cancel: Cancelable) { - self._eventHandler = eventHandler - self._afterEventHandler = afterEventHandler - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - do { - try self._eventHandler(event) - self.forwardOn(event) - try self._afterEventHandler(event) - if event.isStopEvent { - self.dispose() - } - } - catch let error { - self.forwardOn(.error(error)) - self.dispose() - } - } -} - -final private class Do: Producer { - typealias EventHandler = (Event) throws -> Void - typealias AfterEventHandler = (Event) throws -> Void - - fileprivate let _source: Observable - fileprivate let _eventHandler: EventHandler - fileprivate let _afterEventHandler: AfterEventHandler - fileprivate let _onSubscribe: (() -> Void)? - fileprivate let _onSubscribed: (() -> Void)? - fileprivate let _onDispose: (() -> Void)? - - init(source: Observable, eventHandler: @escaping EventHandler, afterEventHandler: @escaping AfterEventHandler, onSubscribe: (() -> Void)?, onSubscribed: (() -> Void)?, onDispose: (() -> Void)?) { - self._source = source - self._eventHandler = eventHandler - self._afterEventHandler = afterEventHandler - self._onSubscribe = onSubscribe - self._onSubscribed = onSubscribed - self._onDispose = onDispose - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - self._onSubscribe?() - let sink = DoSink(eventHandler: self._eventHandler, afterEventHandler: self._afterEventHandler, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - self._onSubscribed?() - let onDispose = self._onDispose - let allSubscriptions = Disposables.create { - subscription.dispose() - onDispose?() - } - return (sink: sink, subscription: allSubscriptions) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/ElementAt.swift b/Example/Pods/RxSwift/RxSwift/Observables/ElementAt.swift deleted file mode 100755 index f8750f0..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/ElementAt.swift +++ /dev/null @@ -1,92 +0,0 @@ -// -// ElementAt.swift -// RxSwift -// -// Created by Junior B. on 21/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - Returns a sequence emitting only element _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 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: self.asObservable(), index: index, throwOnEmpty: true) - } -} - -final private class ElementAtSink: Sink, ObserverType { - typealias SourceType = Observer.Element - typealias Parent = ElementAt - - let _parent: Parent - var _i: Int - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - self._i = parent._index - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next: - - if self._i == 0 { - self.forwardOn(event) - self.forwardOn(.completed) - self.dispose() - } - - do { - _ = try decrementChecked(&self._i) - } catch let e { - self.forwardOn(.error(e)) - self.dispose() - return - } - - case .error(let e): - self.forwardOn(.error(e)) - self.dispose() - case .completed: - if self._parent._throwOnEmpty { - self.forwardOn(.error(RxError.argumentOutOfRange)) - } else { - self.forwardOn(.completed) - } - - self.dispose() - } - } -} - -final private class ElementAt: Producer { - let _source: Observable - let _throwOnEmpty: Bool - let _index: Int - - init(source: Observable, index: Int, throwOnEmpty: Bool) { - if index < 0 { - rxFatalError("index can't be negative") - } - - self._source = source - self._index = index - self._throwOnEmpty = throwOnEmpty - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == SourceType { - let sink = ElementAtSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._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 deleted file mode 100755 index 4ea2995..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Empty.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// 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 private class EmptyProducer: Producer { - override func subscribe(_ observer: Observer) -> Disposable where Observer.Element == 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 deleted file mode 100755 index bd92381..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Enumerated.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// 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: Element)> { - return Enumerated(source: self.asObservable()) - } -} - -final private class EnumeratedSink: Sink, ObserverType where Observer.Element == (index: Int, element: Element) { - var index = 0 - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - let nextIndex = try incrementChecked(&self.index) - let next = (index: nextIndex, element: value) - self.forwardOn(.next(next)) - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - case .completed: - self.forwardOn(.completed) - self.dispose() - case .error(let error): - self.forwardOn(.error(error)) - self.dispose() - } - } -} - -final private class Enumerated: Producer<(index: Int, element: Element)> { - private let _source: Observable - - init(source: Observable) { - self._source = source - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == (index: Int, element: Element) { - let sink = EnumeratedSink(observer: observer, cancel: cancel) - let subscription = self._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 deleted file mode 100755 index 530fe3e..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Error.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// 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 private class ErrorProducer: Producer { - private let _error: Swift.Error - - init(error: Swift.Error) { - self._error = error - } - - override func subscribe(_ observer: Observer) -> Disposable where Observer.Element == Element { - observer.on(.error(self._error)) - return Disposables.create() - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Filter.swift b/Example/Pods/RxSwift/RxSwift/Observables/Filter.swift deleted file mode 100755 index 5f787d6..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Filter.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// Filter.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/17/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. - */ - public func filter(_ predicate: @escaping (Element) throws -> Bool) - -> Observable { - return Filter(source: self.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 self.flatMap { _ in - return Observable.empty() - } - .asCompletable() - } -} - -final private class FilterSink: Sink, ObserverType { - typealias Predicate = (Element) throws -> Bool - typealias Element = Observer.Element - - private let _predicate: Predicate - - init(predicate: @escaping Predicate, observer: Observer, cancel: Cancelable) { - self._predicate = predicate - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - let satisfies = try self._predicate(value) - if satisfies { - self.forwardOn(.next(value)) - } - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - case .completed, .error: - self.forwardOn(event) - self.dispose() - } - } -} - -final private class Filter: Producer { - typealias Predicate = (Element) throws -> Bool - - private let _source: Observable - private let _predicate: Predicate - - init(source: Observable, predicate: @escaping Predicate) { - self._source = source - self._predicate = predicate - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = FilterSink(predicate: self._predicate, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/First.swift b/Example/Pods/RxSwift/RxSwift/Observables/First.swift deleted file mode 100755 index 4c56223..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/First.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// 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 Observer.Element == Element? { - typealias Parent = First - - func on(_ event: Event) { - switch event { - case .next(let value): - self.forwardOn(.next(value)) - self.forwardOn(.completed) - self.dispose() - case .error(let error): - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self.forwardOn(.next(nil)) - self.forwardOn(.completed) - self.dispose() - } - } -} - -final class First: Producer { - fileprivate let _source: Observable - - init(source: Observable) { - self._source = source - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element? { - let sink = FirstSink(observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Generate.swift b/Example/Pods/RxSwift/RxSwift/Observables/Generate.swift deleted file mode 100755 index 5c9d0c1..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Generate.swift +++ /dev/null @@ -1,87 +0,0 @@ -// -// Generate.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/2/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. - - - 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: Element, condition: @escaping (Element) throws -> Bool, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance, iterate: @escaping (Element) throws -> Element) -> Observable { - return Generate(initialState: initialState, condition: condition, iterate: iterate, resultSelector: { $0 }, scheduler: scheduler) - } -} - -final private class GenerateSink: Sink { - typealias Parent = Generate - - private let _parent: Parent - - private var _state: Sequence - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - self._state = parent._initialState - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return self._parent._scheduler.scheduleRecursive(true) { isFirst, recurse -> Void in - do { - if !isFirst { - self._state = try self._parent._iterate(self._state) - } - - if try self._parent._condition(self._state) { - let result = try self._parent._resultSelector(self._state) - self.forwardOn(.next(result)) - - recurse(false) - } - else { - self.forwardOn(.completed) - self.dispose() - } - } - catch let error { - self.forwardOn(.error(error)) - self.dispose() - } - } - } -} - -final private class Generate: Producer { - fileprivate let _initialState: Sequence - fileprivate let _condition: (Sequence) throws -> Bool - fileprivate let _iterate: (Sequence) throws -> Sequence - fileprivate let _resultSelector: (Sequence) throws -> Element - fileprivate let _scheduler: ImmediateSchedulerType - - init(initialState: Sequence, condition: @escaping (Sequence) throws -> Bool, iterate: @escaping (Sequence) throws -> Sequence, resultSelector: @escaping (Sequence) throws -> Element, scheduler: ImmediateSchedulerType) { - self._initialState = initialState - self._condition = condition - self._iterate = iterate - self._resultSelector = resultSelector - self._scheduler = scheduler - super.init() - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = GenerateSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/GroupBy.swift b/Example/Pods/RxSwift/RxSwift/Observables/GroupBy.swift deleted file mode 100755 index 6ae101c..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/GroupBy.swift +++ /dev/null @@ -1,133 +0,0 @@ -// -// 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 (Element) throws -> Key) - -> Observable> { - return GroupBy(source: self.asObservable(), selector: keySelector) - } -} - -final private class GroupedObservableImpl: Observable { - private var _subject: PublishSubject - private var _refCount: RefCountDisposable - - init(subject: PublishSubject, refCount: RefCountDisposable) { - self._subject = subject - self._refCount = refCount - } - - override public func subscribe(_ observer: Observer) -> Disposable where Observer.Element == Element { - let release = self._refCount.retain() - let subscription = self._subject.subscribe(observer) - return Disposables.create(release, subscription) - } -} - - -final private class GroupBySink - : Sink - , ObserverType where Observer.Element == GroupedObservable { - typealias ResultType = Observer.Element - typealias Parent = GroupBy - - private let _parent: Parent - private let _subscription = SingleAssignmentDisposable() - private var _refCountDisposable: RefCountDisposable! - private var _groupedSubjectTable: [Key: PublishSubject] - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - self._groupedSubjectTable = [Key: PublishSubject]() - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - self._refCountDisposable = RefCountDisposable(disposable: self._subscription) - - self._subscription.setDisposable(self._parent._source.subscribe(self)) - - return self._refCountDisposable - } - - private func onGroupEvent(key: Key, value: Element) { - if let writer = self._groupedSubjectTable[key] { - writer.on(.next(value)) - } else { - let writer = PublishSubject() - self._groupedSubjectTable[key] = writer - - let group = GroupedObservable( - key: key, - source: GroupedObservableImpl(subject: writer, refCount: _refCountDisposable) - ) - - self.forwardOn(.next(group)) - writer.on(.next(value)) - } - } - - final func on(_ event: Event) { - switch event { - case let .next(value): - do { - let groupKey = try self._parent._selector(value) - self.onGroupEvent(key: groupKey, value: value) - } - catch let e { - self.error(e) - return - } - case let .error(e): - self.error(e) - case .completed: - self.forwardOnGroups(event: .completed) - self.forwardOn(.completed) - self._subscription.dispose() - self.dispose() - } - } - - final func error(_ error: Swift.Error) { - self.forwardOnGroups(event: .error(error)) - self.forwardOn(.error(error)) - self._subscription.dispose() - self.dispose() - } - - final func forwardOnGroups(event: Event) { - for writer in self._groupedSubjectTable.values { - writer.on(event) - } - } -} - -final private class GroupBy: Producer> { - typealias KeySelector = (Element) throws -> Key - - fileprivate let _source: Observable - fileprivate let _selector: KeySelector - - init(source: Observable, selector: @escaping KeySelector) { - self._source = source - self._selector = selector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == GroupedObservable { - let sink = GroupBySink(parent: self, observer: observer, cancel: cancel) - return (sink: sink, subscription: sink.run()) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Just.swift b/Example/Pods/RxSwift/RxSwift/Observables/Just.swift deleted file mode 100755 index df4f302..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Just.swift +++ /dev/null @@ -1,87 +0,0 @@ -// -// Just.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - 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. - - returns: An observable sequence containing the single specified element. - */ - public static func just(_ element: Element) -> 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: Element, scheduler: ImmediateSchedulerType) -> Observable { - return JustScheduled(element: element, scheduler: scheduler) - } -} - -final private class JustScheduledSink: Sink { - typealias Parent = JustScheduled - - private let _parent: Parent - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let scheduler = self._parent._scheduler - return scheduler.schedule(self._parent._element) { element in - self.forwardOn(.next(element)) - return scheduler.schedule(()) { _ in - self.forwardOn(.completed) - self.dispose() - return Disposables.create() - } - } - } -} - -final private class JustScheduled: Producer { - fileprivate let _scheduler: ImmediateSchedulerType - fileprivate let _element: Element - - init(element: Element, scheduler: ImmediateSchedulerType) { - self._scheduler = scheduler - self._element = element - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = JustScheduledSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -final private class Just: Producer { - private let _element: Element - - init(element: Element) { - self._element = element - } - - override func subscribe(_ observer: Observer) -> Disposable where Observer.Element == Element { - observer.on(.next(self._element)) - observer.on(.completed) - return Disposables.create() - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Map.swift b/Example/Pods/RxSwift/RxSwift/Observables/Map.swift deleted file mode 100755 index 315f375..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Map.swift +++ /dev/null @@ -1,108 +0,0 @@ -// -// 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 (Element) throws -> Result) - -> Observable { - return self.asObservable().composeMap(transform) - } -} - -final private class MapSink: Sink, ObserverType { - typealias Transform = (SourceType) throws -> ResultType - - typealias ResultType = Observer.Element - typealias Element = SourceType - - private let _transform: Transform - - init(transform: @escaping Transform, observer: Observer, cancel: Cancelable) { - self._transform = transform - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let element): - do { - let mappedElement = try self._transform(element) - self.forwardOn(.next(mappedElement)) - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - case .error(let error): - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self.forwardOn(.completed) - self.dispose() - } - } -} - -#if TRACE_RESOURCES - fileprivate let _numberOfMapOperators = AtomicInt(0) - extension Resources { - public static var numberOfMapOperators: Int32 { - return load(_numberOfMapOperators) - } - } -#endif - -internal func _map(source: Observable, transform: @escaping (Element) throws -> Result) -> Observable { - return Map(source: source, transform: transform) -} - -final private class Map: Producer { - typealias Transform = (SourceType) throws -> ResultType - - private let _source: Observable - - private let _transform: Transform - - init(source: Observable, transform: @escaping Transform) { - self._source = source - self._transform = transform - -#if TRACE_RESOURCES - _ = increment(_numberOfMapOperators) -#endif - } - - override func composeMap(_ selector: @escaping (ResultType) throws -> Result) -> Observable { - let originalSelector = self._transform - return Map(source: self._source, transform: { (s: SourceType) throws -> Result in - let r: ResultType = try originalSelector(s) - return try selector(r) - }) - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == ResultType { - let sink = MapSink(transform: self._transform, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - - #if TRACE_RESOURCES - deinit { - _ = decrement(_numberOfMapOperators) - } - #endif -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Materialize.swift b/Example/Pods/RxSwift/RxSwift/Observables/Materialize.swift deleted file mode 100755 index e035e96..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Materialize.swift +++ /dev/null @@ -1,44 +0,0 @@ -// -// 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 Observer.Element == Event { - - func on(_ event: Event) { - self.forwardOn(.next(event)) - if event.isStopEvent { - self.forwardOn(.completed) - self.dispose() - } - } -} - -final private class Materialize: Producer> { - private let _source: Observable - - init(source: Observable) { - self._source = source - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = MaterializeSink(observer: observer, cancel: cancel) - let subscription = self._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 deleted file mode 100755 index 3bc7943..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Merge.swift +++ /dev/null @@ -1,598 +0,0 @@ -// -// 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 (Element) throws -> Source) - -> Observable { - return FlatMap(source: self.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 (Element) throws -> Source) - -> Observable { - return FlatMapFirst(source: self.asObservable(), selector: selector) - } -} - -extension ObservableType where Element : 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: self.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: self.asObservable(), maxConcurrent: maxConcurrent) - } -} - -extension ObservableType where Element : 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 self.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: Collection) -> Observable where Collection.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 (Element) throws -> Source) - -> Observable { - return ConcatMap(source: self.asObservable(), selector: selector) - } -} - -fileprivate final class MergeLimitedSinkIter - : ObserverType - , LockOwnerType - , SynchronizedOnType where SourceSequence.Element == Observer.Element { - typealias Element = Observer.Element - typealias DisposeKey = CompositeDisposable.DisposeKey - typealias Parent = MergeLimitedSink - - private let _parent: Parent - private let _disposeKey: DisposeKey - - var _lock: RecursiveLock { - return self._parent._lock - } - - init(parent: Parent, disposeKey: DisposeKey) { - self._parent = parent - self._disposeKey = disposeKey - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - self._parent.forwardOn(event) - case .error: - self._parent.forwardOn(event) - self._parent.dispose() - case .completed: - self._parent._group.remove(for: self._disposeKey) - if let next = self._parent._queue.dequeue() { - self._parent.subscribe(next, group: self._parent._group) - } - else { - self._parent._activeCount -= 1 - - if self._parent._stopped && self._parent._activeCount == 0 { - self._parent.forwardOn(.completed) - self._parent.dispose() - } - } - } - } -} - -fileprivate final class ConcatMapSink: MergeLimitedSink where Observer.Element == SourceSequence.Element { - typealias Selector = (SourceElement) throws -> SourceSequence - - private let _selector: Selector - - init(selector: @escaping Selector, observer: Observer, cancel: Cancelable) { - self._selector = selector - super.init(maxConcurrent: 1, observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceElement) throws -> SourceSequence { - return try self._selector(element) - } -} - -fileprivate final class MergeLimitedBasicSink: MergeLimitedSink where Observer.Element == SourceSequence.Element { - - override func performMap(_ element: SourceSequence) throws -> SourceSequence { - return element - } -} - -private class MergeLimitedSink - : Sink - , ObserverType where Observer.Element == SourceSequence.Element { - 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) { - self._maxConcurrent = maxConcurrent - super.init(observer: observer, cancel: cancel) - } - - func run(_ source: Observable) -> Disposable { - _ = self._group.insert(self._sourceSubscription) - - let disposable = source.subscribe(self) - self._sourceSubscription.setDisposable(disposable) - return self._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? { - self._lock.lock(); defer { self._lock.unlock() } // { - let subscribe: Bool - if self._activeCount < self._maxConcurrent { - self._activeCount += 1 - subscribe = true - } - else { - do { - let value = try self.performMap(element) - self._queue.enqueue(value) - } catch { - self.forwardOn(.error(error)) - self.dispose() - } - subscribe = false - } - - if subscribe { - do { - return try self.performMap(element) - } catch { - self.forwardOn(.error(error)) - self.dispose() - } - } - - return nil - // } - } - - func on(_ event: Event) { - switch event { - case .next(let element): - if let sequence = self.nextElementArrived(element: element) { - self.subscribe(sequence, group: self._group) - } - case .error(let error): - self._lock.lock(); defer { self._lock.unlock() } - - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self._lock.lock(); defer { self._lock.unlock() } - - if self._activeCount == 0 { - self.forwardOn(.completed) - self.dispose() - } - else { - self._sourceSubscription.dispose() - } - - self._stopped = true - } - } -} - -final private class MergeLimited: Producer { - private let _source: Observable - private let _maxConcurrent: Int - - init(source: Observable, maxConcurrent: Int) { - self._source = source - self._maxConcurrent = maxConcurrent - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == SourceSequence.Element { - let sink = MergeLimitedBasicSink(maxConcurrent: self._maxConcurrent, observer: observer, cancel: cancel) - let subscription = sink.run(self._source) - return (sink: sink, subscription: subscription) - } -} - -// MARK: Merge - -fileprivate final class MergeBasicSink : MergeSink where Observer.Element == Source.Element { - override func performMap(_ element: Source) throws -> Source { - return element - } -} - -// MARK: flatMap - -fileprivate final class FlatMapSink : MergeSink where Observer.Element == SourceSequence.Element { - typealias Selector = (SourceElement) throws -> SourceSequence - - private let _selector: Selector - - init(selector: @escaping Selector, observer: Observer, cancel: Cancelable) { - self._selector = selector - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceElement) throws -> SourceSequence { - return try self._selector(element) - } -} - -// MARK: FlatMapFirst - -fileprivate final class FlatMapFirstSink : MergeSink where Observer.Element == SourceSequence.Element { - typealias Selector = (SourceElement) throws -> SourceSequence - - private let _selector: Selector - - override var subscribeNext: Bool { - return self._activeCount == 0 - } - - init(selector: @escaping Selector, observer: Observer, cancel: Cancelable) { - self._selector = selector - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceElement) throws -> SourceSequence { - return try self._selector(element) - } -} - -fileprivate final class MergeSinkIter : ObserverType where Observer.Element == SourceSequence.Element { - typealias Parent = MergeSink - typealias DisposeKey = CompositeDisposable.DisposeKey - typealias Element = Observer.Element - - private let _parent: Parent - private let _disposeKey: DisposeKey - - init(parent: Parent, disposeKey: DisposeKey) { - self._parent = parent - self._disposeKey = disposeKey - } - - func on(_ event: Event) { - self._parent._lock.lock(); defer { self._parent._lock.unlock() } // lock { - switch event { - case .next(let value): - self._parent.forwardOn(.next(value)) - case .error(let error): - self._parent.forwardOn(.error(error)) - self._parent.dispose() - case .completed: - self._parent._group.remove(for: self._disposeKey) - self._parent._activeCount -= 1 - self._parent.checkCompleted() - } - // } - } -} - - -private class MergeSink - : Sink - , ObserverType where Observer.Element == SourceSequence.Element { - typealias ResultType = Observer.Element - 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? { - self._lock.lock(); defer { self._lock.unlock() } // { - if !self.subscribeNext { - return nil - } - - do { - let value = try self.performMap(element) - self._activeCount += 1 - return value - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - return nil - } - // } - } - - func on(_ event: Event) { - switch event { - case .next(let element): - if let value = self.nextElementArrived(element: element) { - self.subscribeInner(value.asObservable()) - } - case .error(let error): - self._lock.lock(); defer { self._lock.unlock() } - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self._lock.lock(); defer { self._lock.unlock() } - self._stopped = true - self._sourceSubscription.dispose() - self.checkCompleted() - } - } - - func subscribeInner(_ source: Observable) { - let iterDisposable = SingleAssignmentDisposable() - if let disposeKey = self._group.insert(iterDisposable) { - let iter = MergeSinkIter(parent: self, disposeKey: disposeKey) - let subscription = source.subscribe(iter) - iterDisposable.setDisposable(subscription) - } - } - - func run(_ sources: [Observable]) -> Disposable { - self._activeCount += sources.count - - for source in sources { - self.subscribeInner(source) - } - - self._stopped = true - - self.checkCompleted() - - return self._group - } - - @inline(__always) - func checkCompleted() { - if self._stopped && self._activeCount == 0 { - self.forwardOn(.completed) - self.dispose() - } - } - - func run(_ source: Observable) -> Disposable { - _ = self._group.insert(self._sourceSubscription) - - let subscription = source.subscribe(self) - self._sourceSubscription.setDisposable(subscription) - - return self._group - } -} - -// MARK: Producers - -final private class FlatMap: Producer { - typealias Selector = (SourceElement) throws -> SourceSequence - - private let _source: Observable - - private let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - self._source = source - self._selector = selector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == SourceSequence.Element { - let sink = FlatMapSink(selector: self._selector, observer: observer, cancel: cancel) - let subscription = sink.run(self._source) - return (sink: sink, subscription: subscription) - } -} - -final private class FlatMapFirst: Producer { - typealias Selector = (SourceElement) throws -> SourceSequence - - private let _source: Observable - - private let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - self._source = source - self._selector = selector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == SourceSequence.Element { - let sink = FlatMapFirstSink(selector: self._selector, observer: observer, cancel: cancel) - let subscription = sink.run(self._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) { - self._source = source - self._selector = selector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == SourceSequence.Element { - let sink = ConcatMapSink(selector: self._selector, observer: observer, cancel: cancel) - let subscription = sink.run(self._source) - return (sink: sink, subscription: subscription) - } -} - -final class Merge : Producer { - private let _source: Observable - - init(source: Observable) { - self._source = source - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == SourceSequence.Element { - let sink = MergeBasicSink(observer: observer, cancel: cancel) - let subscription = sink.run(self._source) - return (sink: sink, subscription: subscription) - } -} - -final private class MergeArray: Producer { - private let _sources: [Observable] - - init(sources: [Observable]) { - self._sources = sources - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = MergeBasicSink, Observer>(observer: observer, cancel: cancel) - let subscription = sink.run(self._sources) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Multicast.swift b/Example/Pods/RxSwift/RxSwift/Observables/Multicast.swift deleted file mode 100755 index ca90548..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Multicast.swift +++ /dev/null @@ -1,409 +0,0 @@ -// -// 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 -> Subject, selector: @escaping (Observable) throws -> Observable) - -> Observable where Subject.Observer.Element == Element { - 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: Subject) - -> ConnectableObservable where Subject.Observer.Element == Element { - 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 () -> Subject) - -> ConnectableObservable where Subject.Observer.Element == Element { - return ConnectableObservableAdapter(source: self.asObservable(), makeSubject: makeSubject) - } -} - -final private class Connection: ObserverType, Disposable { - typealias Element = Subject.Observer.Element - - private var _lock: RecursiveLock - // state - private var _parent: ConnectableObservableAdapter? - private var _subscription : Disposable? - private var _subjectObserver: Subject.Observer - - private let _disposed = AtomicInt(0) - - init(parent: ConnectableObservableAdapter, subjectObserver: Subject.Observer, lock: RecursiveLock, subscription: Disposable) { - self._parent = parent - self._subscription = subscription - self._lock = lock - self._subjectObserver = subjectObserver - } - - func on(_ event: Event) { - if isFlagSet(self._disposed, 1) { - return - } - if event.isStopEvent { - self.dispose() - } - self._subjectObserver.on(event) - } - - func dispose() { - _lock.lock(); defer { _lock.unlock() } // { - fetchOr(self._disposed, 1) - guard let parent = _parent else { - return - } - - if parent._connection === self { - parent._connection = nil - parent._subject = nil - } - self._parent = nil - - self._subscription?.dispose() - self._subscription = nil - // } - } -} - -final private class ConnectableObservableAdapter - : ConnectableObservable { - typealias ConnectionType = Connection - - fileprivate let _source: Observable - fileprivate let _makeSubject: () -> Subject - - fileprivate let _lock = RecursiveLock() - fileprivate var _subject: Subject? - - // state - fileprivate var _connection: ConnectionType? - - init(source: Observable, makeSubject: @escaping () -> Subject) { - self._source = source - self._makeSubject = makeSubject - self._subject = nil - self._connection = nil - } - - override func connect() -> Disposable { - return self._lock.calculateLocked { - if let connection = self._connection { - return connection - } - - let singleAssignmentDisposable = SingleAssignmentDisposable() - let connection = Connection(parent: self, subjectObserver: self.lazySubject.asObserver(), lock: self._lock, subscription: singleAssignmentDisposable) - self._connection = connection - let subscription = self._source.subscribe(connection) - singleAssignmentDisposable.setDisposable(subscription) - return connection - } - } - - fileprivate var lazySubject: Subject { - if let subject = self._subject { - return subject - } - - let subject = self._makeSubject() - self._subject = subject - return subject - } - - override func subscribe(_ observer: Observer) -> Disposable where Observer.Element == Subject.Element { - return self.lazySubject.subscribe(observer) - } -} - -final private class RefCountSink - : Sink - , ObserverType where ConnectableSource.Element == Observer.Element { - typealias Element = Observer.Element - typealias Parent = RefCount - - private let _parent: Parent - - private var _connectionIdSnapshot: Int64 = -1 - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription = self._parent._source.subscribe(self) - self._parent._lock.lock(); defer { self._parent._lock.unlock() } // { - - self._connectionIdSnapshot = self._parent._connectionId - - if self.disposed { - return Disposables.create() - } - - if self._parent._count == 0 { - self._parent._count = 1 - self._parent._connectableSubscription = self._parent._source.connect() - } - else { - self._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 -= 1 - } - else { - rxFatalError("Something went wrong with RefCount disposing mechanism") - } - // } - } - } - - func on(_ event: Event) { - switch event { - case .next: - self.forwardOn(event) - case .error, .completed: - self._parent._lock.lock() // { - if self._parent._connectionId == self._connectionIdSnapshot { - let connection = self._parent._connectableSubscription - defer { connection?.dispose() } - self._parent._count = 0 - self._parent._connectionId = self._parent._connectionId &+ 1 - self._parent._connectableSubscription = nil - } - // } - self._parent._lock.unlock() - self.forwardOn(event) - self.dispose() - } - } -} - -final private 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: ConnectableSource - - init(source: ConnectableSource) { - self._source = source - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) - where Observer.Element == ConnectableSource.Element { - let sink = RefCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -final private class MulticastSink: Sink, ObserverType { - typealias Element = Observer.Element - typealias ResultType = Element - typealias MutlicastType = Multicast - - private let _parent: MutlicastType - - init(parent: MutlicastType, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - do { - let subject = try self._parent._subjectSelector() - let connectable = ConnectableObservableAdapter(source: self._parent._source, makeSubject: { subject }) - - let observable = try self._parent._selector(connectable) - - let subscription = observable.subscribe(self) - let connection = connectable.connect() - - return Disposables.create(subscription, connection) - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - return Disposables.create() - } - } - - func on(_ event: Event) { - self.forwardOn(event) - switch event { - case .next: break - case .error, .completed: - self.dispose() - } - } -} - -final private class Multicast: Producer { - typealias SubjectSelectorType = () throws -> Subject - 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) { - self._source = source - self._subjectSelector = subjectSelector - self._selector = selector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Result { - 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 deleted file mode 100755 index c56e567..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Never.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// 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 private class NeverProducer: Producer { - override func subscribe(_ observer: Observer) -> Disposable where Observer.Element == Element { - return Disposables.create() - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift b/Example/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift deleted file mode 100755 index 5121150..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/ObserveOn.swift +++ /dev/null @@ -1,231 +0,0 @@ -// -// 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 private class ObserveOn: Producer { - let scheduler: ImmediateSchedulerType - let source: Observable - - init(source: Observable, scheduler: ImmediateSchedulerType) { - self.scheduler = scheduler - self.source = source - -#if TRACE_RESOURCES - _ = Resources.incrementTotal() -#endif - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = ObserveOnSink(scheduler: self.scheduler, observer: observer, cancel: cancel) - let subscription = self.source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - -#if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } -#endif -} - -enum ObserveOnState : Int32 { - // pump is not running - case stopped = 0 - // pump is running - case running = 1 -} - -final private class ObserveOnSink: ObserverBase { - typealias Element = Observer.Element - - let _scheduler: ImmediateSchedulerType - - var _lock = SpinLock() - let _observer: Observer - - // state - var _state = ObserveOnState.stopped - var _queue = Queue>(capacity: 10) - - let _scheduleDisposable = SerialDisposable() - let _cancel: Cancelable - - init(scheduler: ImmediateSchedulerType, observer: Observer, cancel: Cancelable) { - self._scheduler = scheduler - self._observer = observer - self._cancel = cancel - } - - override func onCore(_ event: Event) { - let shouldStart = self._lock.calculateLocked { () -> Bool in - self._queue.enqueue(event) - - switch self._state { - case .stopped: - self._state = .running - return true - case .running: - return false - } - } - - if shouldStart { - self._scheduleDisposable.disposable = self._scheduler.scheduleRecursive((), action: self.run) - } - } - - func run(_ state: (), _ recurse: (()) -> Void) { - let (nextEvent, observer) = self._lock.calculateLocked { () -> (Event?, Observer) in - if !self._queue.isEmpty { - return (self._queue.dequeue(), self._observer) - } - else { - self._state = .stopped - return (nil, self._observer) - } - } - - if let nextEvent = nextEvent, !self._cancel.isDisposed { - observer.on(nextEvent) - if nextEvent.isStopEvent { - self.dispose() - } - } - else { - return - } - - let shouldContinue = self._shouldContinue_synchronized() - - if shouldContinue { - recurse(()) - } - } - - func _shouldContinue_synchronized() -> Bool { - self._lock.lock(); defer { self._lock.unlock() } // { - if !self._queue.isEmpty { - return true - } - else { - self._state = .stopped - return false - } - // } - } - - override func dispose() { - super.dispose() - - self._cancel.dispose() - self._scheduleDisposable.dispose() - } -} - -#if TRACE_RESOURCES - fileprivate let _numberOfSerialDispatchQueueObservables = AtomicInt(0) - extension Resources { - /** - Counts number of `SerialDispatchQueueObservables`. - - Purposed for unit tests. - */ - public static var numberOfSerialDispatchQueueObservables: Int32 { - return load(_numberOfSerialDispatchQueueObservables) - } - } -#endif - -final private class ObserveOnSerialDispatchQueueSink: ObserverBase { - let scheduler: SerialDispatchQueueScheduler - let observer: Observer - - let cancel: Cancelable - - var cachedScheduleLambda: (((sink: ObserveOnSerialDispatchQueueSink, event: Event)) -> Disposable)! - - init(scheduler: SerialDispatchQueueScheduler, observer: Observer, cancel: Cancelable) { - self.scheduler = scheduler - self.observer = observer - self.cancel = cancel - super.init() - - self.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) { - _ = self.scheduler.schedule((self, event), action: self.cachedScheduleLambda!) - } - - override func dispose() { - super.dispose() - - self.cancel.dispose() - } -} - -final private class ObserveOnSerialDispatchQueue: Producer { - let scheduler: SerialDispatchQueueScheduler - let source: Observable - - init(source: Observable, scheduler: SerialDispatchQueueScheduler) { - self.scheduler = scheduler - self.source = source - - #if TRACE_RESOURCES - _ = Resources.incrementTotal() - _ = increment(_numberOfSerialDispatchQueueObservables) - #endif - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = ObserveOnSerialDispatchQueueSink(scheduler: self.scheduler, observer: observer, cancel: cancel) - let subscription = self.source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - - #if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - _ = decrement(_numberOfSerialDispatchQueueObservables) - } - #endif -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Optional.swift b/Example/Pods/RxSwift/RxSwift/Observables/Optional.swift deleted file mode 100755 index 9bf5b1c..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Optional.swift +++ /dev/null @@ -1,95 +0,0 @@ -// -// 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: Element?) -> 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: Element?, scheduler: ImmediateSchedulerType) -> Observable { - return ObservableOptionalScheduled(optional: optional, scheduler: scheduler) - } -} - -final private class ObservableOptionalScheduledSink: Sink { - typealias Element = Observer.Element - typealias Parent = ObservableOptionalScheduled - - private let _parent: Parent - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return self._parent._scheduler.schedule(self._parent._optional) { (optional: Element?) -> 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 private class ObservableOptionalScheduled: Producer { - fileprivate let _optional: Element? - fileprivate let _scheduler: ImmediateSchedulerType - - init(optional: Element?, scheduler: ImmediateSchedulerType) { - self._optional = optional - self._scheduler = scheduler - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = ObservableOptionalScheduledSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -final private class ObservableOptional: Producer { - private let _optional: Element? - - init(optional: Element?) { - self._optional = optional - } - - override func subscribe(_ observer: Observer) -> Disposable where Observer.Element == Element { - if let element = self._optional { - observer.on(.next(element)) - } - observer.on(.completed) - return Disposables.create() - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Producer.swift b/Example/Pods/RxSwift/RxSwift/Observables/Producer.swift deleted file mode 100755 index f78d9a6..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Producer.swift +++ /dev/null @@ -1,92 +0,0 @@ -// -// Producer.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/20/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -class Producer : Observable { - override init() { - super.init() - } - - override func subscribe(_ observer: Observer) -> Disposable where Observer.Element == Element { - if !CurrentThreadScheduler.isScheduleRequired { - // The returned disposable needs to release all references once it was disposed. - let disposer = SinkDisposer() - let sinkAndSubscription = self.run(observer, cancel: disposer) - disposer.setSinkAndSubscription(sink: sinkAndSubscription.sink, subscription: sinkAndSubscription.subscription) - - return disposer - } - else { - return CurrentThreadScheduler.instance.schedule(()) { _ in - let disposer = SinkDisposer() - let sinkAndSubscription = self.run(observer, cancel: disposer) - disposer.setSinkAndSubscription(sink: sinkAndSubscription.sink, subscription: sinkAndSubscription.subscription) - - return disposer - } - } - } - - func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - rxAbstractMethod() - } -} - -fileprivate final class SinkDisposer: Cancelable { - fileprivate enum DisposeState: Int32 { - case disposed = 1 - case sinkAndSubscriptionSet = 2 - } - - private let _state = AtomicInt(0) - private var _sink: Disposable? - private var _subscription: Disposable? - - var isDisposed: Bool { - return isFlagSet(self._state, DisposeState.disposed.rawValue) - } - - func setSinkAndSubscription(sink: Disposable, subscription: Disposable) { - self._sink = sink - self._subscription = subscription - - let previousState = fetchOr(self._state, DisposeState.sinkAndSubscriptionSet.rawValue) - if (previousState & DisposeState.sinkAndSubscriptionSet.rawValue) != 0 { - rxFatalError("Sink and subscription were already set") - } - - if (previousState & DisposeState.disposed.rawValue) != 0 { - sink.dispose() - subscription.dispose() - self._sink = nil - self._subscription = nil - } - } - - func dispose() { - let previousState = fetchOr(self._state, DisposeState.disposed.rawValue) - - if (previousState & DisposeState.disposed.rawValue) != 0 { - return - } - - if (previousState & DisposeState.sinkAndSubscriptionSet.rawValue) != 0 { - guard let sink = self._sink else { - rxFatalError("Sink not set") - } - guard let subscription = self._subscription else { - rxFatalError("Subscription not set") - } - - sink.dispose() - subscription.dispose() - - self._sink = nil - self._subscription = nil - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Range.swift b/Example/Pods/RxSwift/RxSwift/Observables/Range.swift deleted file mode 100755 index f88c999..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Range.swift +++ /dev/null @@ -1,73 +0,0 @@ -// -// Range.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/13/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType where Element : RxAbstractInteger { - /** - 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. - */ - public static func range(start: Element, count: Element, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return RangeProducer(start: start, count: count, scheduler: scheduler) - } -} - -final private class RangeProducer: Producer { - fileprivate let _start: Element - fileprivate let _count: Element - fileprivate let _scheduler: ImmediateSchedulerType - - init(start: Element, count: Element, scheduler: ImmediateSchedulerType) { - guard count >= 0 else { - rxFatalError("count can't be negative") - } - - guard start &+ (count - 1) >= start || count == 0 else { - rxFatalError("overflow of count") - } - - self._start = start - self._count = count - self._scheduler = scheduler - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = RangeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -final private class RangeSink: Sink where Observer.Element: RxAbstractInteger { - typealias Parent = RangeProducer - - private let _parent: Parent - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return self._parent._scheduler.scheduleRecursive(0 as Observer.Element) { i, recurse in - if i < self._parent._count { - self.forwardOn(.next(self._parent._start + i)) - recurse(i + 1) - } - else { - self.forwardOn(.completed) - self.dispose() - } - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Reduce.swift b/Example/Pods/RxSwift/RxSwift/Observables/Reduce.swift deleted file mode 100755 index 7814c6a..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Reduce.swift +++ /dev/null @@ -1,109 +0,0 @@ -// -// Reduce.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/1/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - - -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, Element) throws -> A, mapResult: @escaping (A) throws -> Result) - -> 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, Element) throws -> A) - -> Observable { - return Reduce(source: self.asObservable(), seed: seed, accumulator: accumulator, mapResult: { $0 }) - } -} - -final private class ReduceSink: Sink, ObserverType { - typealias ResultType = Observer.Element - typealias Parent = Reduce - - private let _parent: Parent - private var _accumulation: AccumulateType - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - self._accumulation = parent._seed - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - self._accumulation = try self._parent._accumulator(self._accumulation, value) - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - case .error(let e): - self.forwardOn(.error(e)) - self.dispose() - case .completed: - do { - let result = try self._parent._mapResult(self._accumulation) - self.forwardOn(.next(result)) - self.forwardOn(.completed) - self.dispose() - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - } - } -} - -final private class Reduce: Producer { - typealias AccumulatorType = (AccumulateType, SourceType) throws -> AccumulateType - typealias ResultSelectorType = (AccumulateType) throws -> ResultType - - fileprivate let _source: Observable - fileprivate let _seed: AccumulateType - fileprivate let _accumulator: AccumulatorType - fileprivate let _mapResult: ResultSelectorType - - init(source: Observable, seed: AccumulateType, accumulator: @escaping AccumulatorType, mapResult: @escaping ResultSelectorType) { - self._source = source - self._seed = seed - self._accumulator = accumulator - self._mapResult = mapResult - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == ResultType { - let sink = ReduceSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} - diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Repeat.swift b/Example/Pods/RxSwift/RxSwift/Observables/Repeat.swift deleted file mode 100755 index 4fed45c..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Repeat.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// Repeat.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/13/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - 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. - */ - public static func repeatElement(_ element: Element, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return RepeatElement(element: element, scheduler: scheduler) - } -} - -final private class RepeatElement: Producer { - fileprivate let _element: Element - fileprivate let _scheduler: ImmediateSchedulerType - - init(element: Element, scheduler: ImmediateSchedulerType) { - self._element = element - self._scheduler = scheduler - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = RepeatElementSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - - return (sink: sink, subscription: subscription) - } -} - -final private class RepeatElementSink: Sink { - typealias Parent = RepeatElement - - private let _parent: Parent - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return self._parent._scheduler.scheduleRecursive(self._parent._element) { e, recurse in - self.forwardOn(.next(e)) - recurse(e) - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift b/Example/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift deleted file mode 100755 index decd309..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/RetryWhen.swift +++ /dev/null @@ -1,182 +0,0 @@ -// -// RetryWhen.swift -// RxSwift -// -// Created by Junior B. on 06/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - - /** - 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 private class RetryTriggerSink - : ObserverType where Sequence.Element: ObservableType, Sequence.Element.Element == Observer.Element { - typealias Element = TriggerObservable.Element - - typealias Parent = RetryWhenSequenceSinkIter - - fileprivate let _parent: Parent - - init(parent: Parent) { - self._parent = parent - } - - func on(_ event: Event) { - switch event { - case .next: - self._parent._parent._lastError = nil - self._parent._parent.schedule(.moveNext) - case .error(let e): - self._parent._parent.forwardOn(.error(e)) - self._parent._parent.dispose() - case .completed: - self._parent._parent.forwardOn(.completed) - self._parent._parent.dispose() - } - } -} - -final private class RetryWhenSequenceSinkIter - : ObserverType - , Disposable where Sequence.Element: ObservableType, Sequence.Element.Element == Observer.Element { - typealias Element = Observer.Element - typealias Parent = RetryWhenSequenceSink - - fileprivate let _parent: Parent - fileprivate let _errorHandlerSubscription = SingleAssignmentDisposable() - fileprivate let _subscription: Disposable - - init(parent: Parent, subscription: Disposable) { - self._parent = parent - self._subscription = subscription - } - - func on(_ event: Event) { - switch event { - case .next: - self._parent.forwardOn(event) - case .error(let error): - self._parent._lastError = error - - if let failedWith = error as? Error { - // dispose current subscription - self._subscription.dispose() - - let errorHandlerSubscription = self._parent._notifier.subscribe(RetryTriggerSink(parent: self)) - self._errorHandlerSubscription.setDisposable(errorHandlerSubscription) - self._parent._errorSubject.on(.next(failedWith)) - } - else { - self._parent.forwardOn(.error(error)) - self._parent.dispose() - } - case .completed: - self._parent.forwardOn(event) - self._parent.dispose() - } - } - - final func dispose() { - self._subscription.dispose() - self._errorHandlerSubscription.dispose() - } -} - -final private class RetryWhenSequenceSink - : TailRecursiveSink where Sequence.Element: ObservableType, Sequence.Element.Element == Observer.Element { - typealias Element = Observer.Element - typealias Parent = RetryWhenSequence - - let _lock = RecursiveLock() - - fileprivate let _parent: Parent - - fileprivate var _lastError: Swift.Error? - fileprivate let _errorSubject = PublishSubject() - fileprivate let _handler: Observable - fileprivate let _notifier = PublishSubject() - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - self._handler = parent._notificationHandler(self._errorSubject).asObservable() - super.init(observer: observer, cancel: cancel) - } - - override func done() { - if let lastError = self._lastError { - self.forwardOn(.error(lastError)) - self._lastError = nil - } - else { - self.forwardOn(.completed) - } - - self.dispose() - } - - override func extract(_ observable: Observable) -> SequenceGenerator? { - // It is important to always return `nil` here because there are sideffects in the `run` method - // that are dependant on particular `retryWhen` operator so single operator stack can't be reused in this - // case. - return nil - } - - override func subscribeToNext(_ source: Observable) -> Disposable { - let subscription = SingleAssignmentDisposable() - let iter = RetryWhenSequenceSinkIter(parent: self, subscription: subscription) - subscription.setDisposable(source.subscribe(iter)) - return iter - } - - override func run(_ sources: SequenceGenerator) -> Disposable { - let triggerSubscription = self._handler.subscribe(self._notifier.asObserver()) - let superSubscription = super.run(sources) - return Disposables.create(superSubscription, triggerSubscription) - } -} - -final private class RetryWhenSequence: Producer where Sequence.Element: ObservableType { - typealias Element = Sequence.Element.Element - - fileprivate let _sources: Sequence - fileprivate let _notificationHandler: (Observable) -> TriggerObservable - - init(sources: Sequence, notificationHandler: @escaping (Observable) -> TriggerObservable) { - self._sources = sources - self._notificationHandler = notificationHandler - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = RetryWhenSequenceSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run((self._sources.makeIterator(), nil)) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Sample.swift b/Example/Pods/RxSwift/RxSwift/Observables/Sample.swift deleted file mode 100755 index 4fab683..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Sample.swift +++ /dev/null @@ -1,133 +0,0 @@ -// -// Sample.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/1/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. - */ - public func sample(_ sampler: Source) - -> Observable { - return Sample(source: self.asObservable(), sampler: sampler.asObservable()) - } -} - -final private class SamplerSink - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = SampleType - - typealias Parent = SampleSequenceSink - - fileprivate let _parent: Parent - - var _lock: RecursiveLock { - return self._parent._lock - } - - init(parent: Parent) { - self._parent = parent - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next, .completed: - if let element = _parent._element { - self._parent._element = nil - self._parent.forwardOn(.next(element)) - } - - if self._parent._atEnd { - self._parent.forwardOn(.completed) - self._parent.dispose() - } - case .error(let e): - self._parent.forwardOn(.error(e)) - self._parent.dispose() - } - } -} - -final private class SampleSequenceSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = Observer.Element - typealias Parent = Sample - - fileprivate let _parent: Parent - - let _lock = RecursiveLock() - - // state - fileprivate var _element = nil as Element? - fileprivate var _atEnd = false - - fileprivate let _sourceSubscription = SingleAssignmentDisposable() - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - self._sourceSubscription.setDisposable(self._parent._source.subscribe(self)) - let samplerSubscription = self._parent._sampler.subscribe(SamplerSink(parent: self)) - - return Disposables.create(_sourceSubscription, samplerSubscription) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): - self._element = element - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - self._atEnd = true - self._sourceSubscription.dispose() - } - } - -} - -final private class Sample: Producer { - fileprivate let _source: Observable - fileprivate let _sampler: Observable - - init(source: Observable, sampler: Observable) { - self._source = source - self._sampler = sampler - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = SampleSequenceSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Scan.swift b/Example/Pods/RxSwift/RxSwift/Observables/Scan.swift deleted file mode 100755 index 7920ae9..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Scan.swift +++ /dev/null @@ -1,100 +0,0 @@ -// -// 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, Element) throws -> Void) - -> 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, Element) throws -> A) - -> Observable { - return Scan(source: self.asObservable(), seed: seed) { acc, element in - let currentAcc = acc - acc = try accumulator(currentAcc, element) - } - } -} - -final private class ScanSink: Sink, ObserverType { - typealias Accumulate = Observer.Element - typealias Parent = Scan - - fileprivate let _parent: Parent - fileprivate var _accumulate: Accumulate - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - self._accumulate = parent._seed - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let element): - do { - try self._parent._accumulator(&self._accumulate, element) - self.forwardOn(.next(self._accumulate)) - } - catch let error { - self.forwardOn(.error(error)) - self.dispose() - } - case .error(let error): - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self.forwardOn(.completed) - self.dispose() - } - } - -} - -final private class Scan: Producer { - typealias Accumulator = (inout Accumulate, Element) throws -> Void - - fileprivate let _source: Observable - fileprivate let _seed: Accumulate - fileprivate let _accumulator: Accumulator - - init(source: Observable, seed: Accumulate, accumulator: @escaping Accumulator) { - self._source = source - self._seed = seed - self._accumulator = accumulator - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Accumulate { - let sink = ScanSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._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 deleted file mode 100755 index f158565..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Sequence.swift +++ /dev/null @@ -1,89 +0,0 @@ -// -// 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: Element ..., 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: [Element], 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: Sequence, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable where Sequence.Element == Element { - return ObservableSequence(elements: sequence, scheduler: scheduler) - } -} - -final private class ObservableSequenceSink: Sink where Sequence.Element == Observer.Element { - typealias Parent = ObservableSequence - - private let _parent: Parent - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return self._parent._scheduler.scheduleRecursive(self._parent._elements.makeIterator()) { iterator, recurse in - var mutableIterator = iterator - if let next = mutableIterator.next() { - self.forwardOn(.next(next)) - recurse(mutableIterator) - } - else { - self.forwardOn(.completed) - self.dispose() - } - } - } -} - -final private class ObservableSequence: Producer { - fileprivate let _elements: Sequence - fileprivate let _scheduler: ImmediateSchedulerType - - init(elements: Sequence, scheduler: ImmediateSchedulerType) { - self._elements = elements - self._scheduler = scheduler - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - 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 deleted file mode 100755 index 9565a49..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/ShareReplayScope.swift +++ /dev/null @@ -1,456 +0,0 @@ -// -// 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 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) { - self._parent = parent - self._lock = lock - - #if TRACE_RESOURCES - _ = Resources.incrementTotal() - #endif - } - - final func on(_ event: Event) { - self._lock.lock() - let observers = self._synchronized_on(event) - self._lock.unlock() - dispatch(observers, event) - } - - final private func _synchronized_on(_ event: Event) -> Observers { - if self._disposed { - return Observers() - } - - switch event { - case .next(let element): - self._element = element - return self._observers - case .error, .completed: - let observers = self._observers - self._synchronized_dispose() - return observers - } - } - - final func connect() { - self._subscription.setDisposable(self._parent._source.subscribe(self)) - } - - final func _synchronized_subscribe(_ observer: Observer) -> Disposable where Observer.Element == Element { - self._lock.lock(); defer { self._lock.unlock() } - if let element = self._element { - observer.on(.next(element)) - } - - let disposeKey = self._observers.insert(observer.on) - - return SubscriptionDisposable(owner: self, key: disposeKey) - } - - final private func _synchronized_dispose() { - self._disposed = true - if self._parent._connection === self { - self._parent._connection = nil - } - self._observers = Observers() - } - - final func synchronizedUnsubscribe(_ disposeKey: DisposeKey) { - self._lock.lock() - let shouldDisconnect = self._synchronized_unsubscribe(disposeKey) - self._lock.unlock() - if shouldDisconnect { - self._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 self._observers.count == 0 { - self._synchronized_dispose() - return true - } - - return false - } - - #if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } - #endif -} - -// optimized version of share replay for most common case -final private 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: Observer) -> Disposable where Observer.Element == Element { - self._lock.lock() - - let connection = self._synchronized_subscribe(observer) - let count = connection._observers.count - - let disposable = connection._synchronized_subscribe(observer) - - self._lock.unlock() - - if count == 0 { - connection.connect() - } - - return disposable - } - - @inline(__always) - private func _synchronized_subscribe(_ observer: Observer) -> Connection where Observer.Element == Element { - let connection: Connection - - if let existingConnection = self._connection { - connection = existingConnection - } - else { - connection = ShareReplay1WhileConnectedConnection( - parent: self, - lock: self._lock) - self._connection = connection - } - - return connection - } -} - -fileprivate final class ShareWhileConnectedConnection - : ObserverType - , SynchronizedUnsubscribeType { - 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) { - self._parent = parent - self._lock = lock - - #if TRACE_RESOURCES - _ = Resources.incrementTotal() - #endif - } - - final func on(_ event: Event) { - self._lock.lock() - let observers = self._synchronized_on(event) - self._lock.unlock() - dispatch(observers, event) - } - - final private func _synchronized_on(_ event: Event) -> Observers { - if self._disposed { - return Observers() - } - - switch event { - case .next: - return self._observers - case .error, .completed: - let observers = self._observers - self._synchronized_dispose() - return observers - } - } - - final func connect() { - self._subscription.setDisposable(self._parent._source.subscribe(self)) - } - - final func _synchronized_subscribe(_ observer: Observer) -> Disposable where Observer.Element == Element { - self._lock.lock(); defer { self._lock.unlock() } - - let disposeKey = self._observers.insert(observer.on) - - return SubscriptionDisposable(owner: self, key: disposeKey) - } - - final private func _synchronized_dispose() { - self._disposed = true - if self._parent._connection === self { - self._parent._connection = nil - } - self._observers = Observers() - } - - final func synchronizedUnsubscribe(_ disposeKey: DisposeKey) { - self._lock.lock() - let shouldDisconnect = self._synchronized_unsubscribe(disposeKey) - self._lock.unlock() - if shouldDisconnect { - self._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 self._observers.count == 0 { - self._synchronized_dispose() - return true - } - - return false - } - - #if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } - #endif -} - -// optimized version of share replay for most common case -final private 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: Observer) -> Disposable where Observer.Element == Element { - self._lock.lock() - - let connection = self._synchronized_subscribe(observer) - let count = connection._observers.count - - let disposable = connection._synchronized_subscribe(observer) - - self._lock.unlock() - - if count == 0 { - connection.connect() - } - - return disposable - } - - @inline(__always) - private func _synchronized_subscribe(_ observer: Observer) -> Connection where Observer.Element == Element { - let connection: Connection - - if let existingConnection = self._connection { - connection = existingConnection - } - else { - connection = ShareWhileConnectedConnection( - parent: self, - lock: self._lock) - self._connection = connection - } - - return connection - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift b/Example/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift deleted file mode 100755 index e50a9be..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/SingleAsync.swift +++ /dev/null @@ -1,104 +0,0 @@ -// -// SingleAsync.swift -// RxSwift -// -// Created by Junior B. on 09/11/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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 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: self.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 (Element) throws -> Bool) - -> Observable { - return SingleAsync(source: self.asObservable(), predicate: predicate) - } -} - -fileprivate final class SingleAsyncSink : Sink, ObserverType { - typealias Element = Observer.Element - typealias Parent = SingleAsync - - private let _parent: Parent - private var _seenValue: Bool = false - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - let forward = try self._parent._predicate?(value) ?? true - if !forward { - return - } - } - catch let error { - self.forwardOn(.error(error as Swift.Error)) - self.dispose() - return - } - - if self._seenValue { - self.forwardOn(.error(RxError.moreThanOneElement)) - self.dispose() - return - } - - self._seenValue = true - self.forwardOn(.next(value)) - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - if self._seenValue { - self.forwardOn(.completed) - } else { - self.forwardOn(.error(RxError.noElements)) - } - self.dispose() - } - } -} - -final class SingleAsync: Producer { - typealias Predicate = (Element) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate? - - init(source: Observable, predicate: Predicate? = nil) { - self._source = source - self._predicate = predicate - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = SingleAsyncSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Sink.swift b/Example/Pods/RxSwift/RxSwift/Observables/Sink.swift deleted file mode 100755 index 1305d1b..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Sink.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// Sink.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/19/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -class Sink : Disposable { - fileprivate let _observer: Observer - fileprivate let _cancel: Cancelable - fileprivate let _disposed = AtomicInt(0) - - #if DEBUG - fileprivate let _synchronizationTracker = SynchronizationTracker() - #endif - - init(observer: Observer, cancel: Cancelable) { -#if TRACE_RESOURCES - _ = Resources.incrementTotal() -#endif - self._observer = observer - self._cancel = cancel - } - - final func forwardOn(_ event: Event) { - #if DEBUG - self._synchronizationTracker.register(synchronizationErrorMessage: .default) - defer { self._synchronizationTracker.unregister() } - #endif - if isFlagSet(self._disposed, 1) { - return - } - self._observer.on(event) - } - - final func forwarder() -> SinkForward { - return SinkForward(forward: self) - } - - final var disposed: Bool { - return isFlagSet(self._disposed, 1) - } - - func dispose() { - fetchOr(self._disposed, 1) - self._cancel.dispose() - } - - deinit { -#if TRACE_RESOURCES - _ = Resources.decrementTotal() -#endif - } -} - -final class SinkForward: ObserverType { - typealias Element = Observer.Element - - private let _forward: Sink - - init(forward: Sink) { - self._forward = forward - } - - final func on(_ event: Event) { - switch event { - case .next: - self._forward._observer.on(event) - case .error, .completed: - self._forward._observer.on(event) - self._forward._cancel.dispose() - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Skip.swift b/Example/Pods/RxSwift/RxSwift/Observables/Skip.swift deleted file mode 100755 index 3076f9c..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Skip.swift +++ /dev/null @@ -1,158 +0,0 @@ -// -// Skip.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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: self.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 - -final private class SkipCountSink: Sink, ObserverType { - typealias Element = Observer.Element - typealias Parent = SkipCount - - let parent: Parent - - var remaining: Int - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self.parent = parent - self.remaining = parent.count - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - - if self.remaining <= 0 { - self.forwardOn(.next(value)) - } - else { - self.remaining -= 1 - } - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - self.forwardOn(event) - self.dispose() - } - } - -} - -final private class SkipCount: Producer { - let source: Observable - let count: Int - - init(source: Observable, count: Int) { - self.source = source - self.count = count - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = SkipCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = self.source.subscribe(sink) - - return (sink: sink, subscription: subscription) - } -} - -// time version - -final private class SkipTimeSink: Sink, ObserverType where Observer.Element == Element { - typealias Parent = SkipTime - - let parent: Parent - - // state - var open = false - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self.parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if self.open { - self.forwardOn(.next(value)) - } - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - self.forwardOn(event) - self.dispose() - } - } - - func tick() { - self.open = true - } - - func run() -> Disposable { - let disposeTimer = self.parent.scheduler.scheduleRelative((), dueTime: self.parent.duration) { _ in - self.tick() - return Disposables.create() - } - - let disposeSubscription = self.parent.source.subscribe(self) - - return Disposables.create(disposeTimer, disposeSubscription) - } -} - -final private class SkipTime: Producer { - let source: Observable - let duration: RxTimeInterval - let scheduler: SchedulerType - - init(source: Observable, duration: RxTimeInterval, scheduler: SchedulerType) { - self.source = source - self.scheduler = scheduler - self.duration = duration - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = SkipTimeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift b/Example/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift deleted file mode 100755 index 056d795..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/SkipUntil.swift +++ /dev/null @@ -1,139 +0,0 @@ -// -// SkipUntil.swift -// RxSwift -// -// Created by Yury Korolev on 10/3/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. - */ - public func skipUntil(_ other: Source) - -> Observable { - return SkipUntil(source: self.asObservable(), other: other.asObservable()) - } -} - -final private class SkipUntilSinkOther - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Parent = SkipUntilSink - typealias Element = Other - - fileprivate let _parent: Parent - - var _lock: RecursiveLock { - return self._parent._lock - } - - let _subscription = SingleAssignmentDisposable() - - init(parent: Parent) { - self._parent = parent - #if TRACE_RESOURCES - _ = Resources.incrementTotal() - #endif - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - self._parent._forwardElements = true - self._subscription.dispose() - case .error(let e): - self._parent.forwardOn(.error(e)) - self._parent.dispose() - case .completed: - self._subscription.dispose() - } - } - - #if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } - #endif - -} - - -final private class SkipUntilSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = Observer.Element - typealias Parent = SkipUntil - - let _lock = RecursiveLock() - fileprivate let _parent: Parent - fileprivate var _forwardElements = false - - fileprivate let _sourceSubscription = SingleAssignmentDisposable() - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - if self._forwardElements { - self.forwardOn(event) - } - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - if self._forwardElements { - self.forwardOn(event) - } - self.dispose() - } - } - - func run() -> Disposable { - let sourceSubscription = self._parent._source.subscribe(self) - let otherObserver = SkipUntilSinkOther(parent: self) - let otherSubscription = self._parent._other.subscribe(otherObserver) - self._sourceSubscription.setDisposable(sourceSubscription) - otherObserver._subscription.setDisposable(otherSubscription) - - return Disposables.create(_sourceSubscription, otherObserver._subscription) - } -} - -final private class SkipUntil: Producer { - - fileprivate let _source: Observable - fileprivate let _other: Observable - - init(source: Observable, other: Observable) { - self._source = source - self._other = other - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = SkipUntilSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift b/Example/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift deleted file mode 100755 index db9f5a6..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/SkipWhile.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// 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 (Element) throws -> Bool) -> Observable { - return SkipWhile(source: self.asObservable(), predicate: predicate) - } -} - -final private class SkipWhileSink: Sink, ObserverType { - typealias Element = Observer.Element - typealias Parent = SkipWhile - - fileprivate let _parent: Parent - fileprivate var _running = false - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if !self._running { - do { - self._running = try !self._parent._predicate(value) - } catch let e { - self.forwardOn(.error(e)) - self.dispose() - return - } - } - - if self._running { - self.forwardOn(.next(value)) - } - case .error, .completed: - self.forwardOn(event) - self.dispose() - } - } -} - -final private class SkipWhile: Producer { - typealias Predicate = (Element) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate - - init(source: Observable, predicate: @escaping Predicate) { - self._source = source - self._predicate = predicate - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = SkipWhileSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/StartWith.swift b/Example/Pods/RxSwift/RxSwift/Observables/StartWith.swift deleted file mode 100755 index 13fb31d..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/StartWith.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// StartWith.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/6/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. - */ - public func startWith(_ elements: Element ...) - -> Observable { - return StartWith(source: self.asObservable(), elements: elements) - } -} - -final private class StartWith: Producer { - let elements: [Element] - let source: Observable - - init(source: Observable, elements: [Element]) { - self.source = source - self.elements = elements - super.init() - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - for e in self.elements { - observer.on(.next(e)) - } - - return (sink: Disposables.create(), subscription: self.source.subscribe(observer)) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift b/Example/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift deleted file mode 100755 index 5f7be0b..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift +++ /dev/null @@ -1,83 +0,0 @@ -// -// SubscribeOn.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. - */ - public func subscribeOn(_ scheduler: ImmediateSchedulerType) - -> Observable { - return SubscribeOn(source: self, scheduler: scheduler) - } -} - -final private class SubscribeOnSink: Sink, ObserverType where Ob.Element == Observer.Element { - typealias Element = Observer.Element - typealias Parent = SubscribeOn - - let parent: Parent - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self.parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - self.forwardOn(event) - - if event.isStopEvent { - self.dispose() - } - } - - func run() -> Disposable { - let disposeEverything = SerialDisposable() - let cancelSchedule = SingleAssignmentDisposable() - - disposeEverything.disposable = cancelSchedule - - let disposeSchedule = self.parent.scheduler.schedule(()) { _ -> Disposable in - let subscription = self.parent.source.subscribe(self) - disposeEverything.disposable = ScheduledDisposable(scheduler: self.parent.scheduler, disposable: subscription) - return Disposables.create() - } - - cancelSchedule.setDisposable(disposeSchedule) - - return disposeEverything - } -} - -final private class SubscribeOn: Producer { - let source: Ob - let scheduler: ImmediateSchedulerType - - init(source: Ob, scheduler: ImmediateSchedulerType) { - self.source = source - self.scheduler = scheduler - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Ob.Element { - let sink = SubscribeOnSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Switch.swift b/Example/Pods/RxSwift/RxSwift/Observables/Switch.swift deleted file mode 100755 index ac12f2f..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Switch.swift +++ /dev/null @@ -1,234 +0,0 @@ -// -// Switch.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. - */ - public func flatMapLatest(_ selector: @escaping (Element) throws -> Source) - -> Observable { - return FlatMapLatest(source: self.asObservable(), selector: selector) - } -} - -extension ObservableType where Element : 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: self.asObservable()) - } -} - -private class SwitchSink - : Sink - , ObserverType where Source.Element == Observer.Element { - typealias Element = SourceType - - fileprivate let _subscriptions: SingleAssignmentDisposable = SingleAssignmentDisposable() - fileprivate let _innerSubscription: SerialDisposable = SerialDisposable() - - let _lock = RecursiveLock() - - // state - fileprivate var _stopped = false - fileprivate var _latest = 0 - fileprivate var _hasLatest = false - - override init(observer: Observer, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func run(_ source: Observable) -> Disposable { - let subscription = source.subscribe(self) - self._subscriptions.setDisposable(subscription) - return Disposables.create(_subscriptions, _innerSubscription) - } - - func performMap(_ element: SourceType) throws -> Source { - rxAbstractMethod() - } - - @inline(__always) - final private func nextElementArrived(element: Element) -> (Int, Observable)? { - self._lock.lock(); defer { self._lock.unlock() } // { - do { - let observable = try self.performMap(element).asObservable() - self._hasLatest = true - self._latest = self._latest &+ 1 - return (self._latest, observable) - } - catch let error { - self.forwardOn(.error(error)) - self.dispose() - } - - return nil - // } - } - - func on(_ event: Event) { - switch event { - case .next(let element): - if let (latest, observable) = self.nextElementArrived(element: element) { - let d = SingleAssignmentDisposable() - self._innerSubscription.disposable = d - - let observer = SwitchSinkIter(parent: self, id: latest, _self: d) - let disposable = observable.subscribe(observer) - d.setDisposable(disposable) - } - case .error(let error): - self._lock.lock(); defer { self._lock.unlock() } - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self._lock.lock(); defer { self._lock.unlock() } - self._stopped = true - - self._subscriptions.dispose() - - if !self._hasLatest { - self.forwardOn(.completed) - self.dispose() - } - } - } -} - -final private class SwitchSinkIter - : ObserverType - , LockOwnerType - , SynchronizedOnType where Source.Element == Observer.Element { - typealias Element = Source.Element - typealias Parent = SwitchSink - - fileprivate let _parent: Parent - fileprivate let _id: Int - fileprivate let _self: Disposable - - var _lock: RecursiveLock { - return self._parent._lock - } - - init(parent: Parent, id: Int, _self: Disposable) { - self._parent = parent - self._id = id - self._self = _self - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: break - case .error, .completed: - self._self.dispose() - } - - if self._parent._latest != self._id { - return - } - - switch event { - case .next: - self._parent.forwardOn(event) - case .error: - self._parent.forwardOn(event) - self._parent.dispose() - case .completed: - self._parent._hasLatest = false - if self._parent._stopped { - self._parent.forwardOn(event) - self._parent.dispose() - } - } - } -} - -// MARK: Specializations - -final private class SwitchIdentitySink: SwitchSink - where Observer.Element == Source.Element { - override init(observer: Observer, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: Source) throws -> Source { - return element - } -} - -final private class MapSwitchSink: SwitchSink where Observer.Element == Source.Element { - typealias Selector = (SourceType) throws -> Source - - fileprivate let _selector: Selector - - init(selector: @escaping Selector, observer: Observer, cancel: Cancelable) { - self._selector = selector - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceType) throws -> Source { - return try self._selector(element) - } -} - -// MARK: Producers - -final private class Switch: Producer { - fileprivate let _source: Observable - - init(source: Observable) { - self._source = source - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Source.Element { - let sink = SwitchIdentitySink(observer: observer, cancel: cancel) - let subscription = sink.run(self._source) - return (sink: sink, subscription: subscription) - } -} - -final private class FlatMapLatest: Producer { - typealias Selector = (SourceType) throws -> Source - - fileprivate let _source: Observable - fileprivate let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - self._source = source - self._selector = selector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Source.Element { - let sink = MapSwitchSink(selector: self._selector, observer: observer, cancel: cancel) - let subscription = sink.run(self._source) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift b/Example/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift deleted file mode 100755 index 5ead0f2..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift +++ /dev/null @@ -1,104 +0,0 @@ -// -// 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: self.asObservable(), ifEmpty: other) - } -} - -final private class SwitchIfEmpty: Producer { - - private let _source: Observable - private let _ifEmpty: Observable - - init(source: Observable, ifEmpty: Observable) { - self._source = source - self._ifEmpty = ifEmpty - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = SwitchIfEmptySink(ifEmpty: self._ifEmpty, - observer: observer, - cancel: cancel) - let subscription = sink.run(self._source.asObservable()) - - return (sink: sink, subscription: subscription) - } -} - -final private class SwitchIfEmptySink: Sink - , ObserverType { - typealias Element = Observer.Element - - private let _ifEmpty: Observable - private var _isEmpty = true - private let _ifEmptySubscription = SingleAssignmentDisposable() - - init(ifEmpty: Observable, observer: Observer, cancel: Cancelable) { - self._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: - self._isEmpty = false - self.forwardOn(event) - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - guard self._isEmpty else { - self.forwardOn(.completed) - self.dispose() - return - } - let ifEmptySink = SwitchIfEmptySinkIter(parent: self) - self._ifEmptySubscription.setDisposable(self._ifEmpty.subscribe(ifEmptySink)) - } - } -} - -final private class SwitchIfEmptySinkIter - : ObserverType { - typealias Element = Observer.Element - typealias Parent = SwitchIfEmptySink - - private let _parent: Parent - - init(parent: Parent) { - self._parent = parent - } - - func on(_ event: Event) { - switch event { - case .next: - self._parent.forwardOn(event) - case .error: - self._parent.forwardOn(event) - self._parent.dispose() - case .completed: - self._parent.forwardOn(event) - self._parent.dispose() - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Take.swift b/Example/Pods/RxSwift/RxSwift/Observables/Take.swift deleted file mode 100755 index 95b0b60..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Take.swift +++ /dev/null @@ -1,179 +0,0 @@ -// -// Take.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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: self.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 - -final private class TakeCountSink: Sink, ObserverType { - typealias Element = Observer.Element - typealias Parent = TakeCount - - private let _parent: Parent - - private var _remaining: Int - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - self._remaining = parent._count - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - - if self._remaining > 0 { - self._remaining -= 1 - - self.forwardOn(.next(value)) - - if self._remaining == 0 { - self.forwardOn(.completed) - self.dispose() - } - } - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - self.forwardOn(event) - self.dispose() - } - } - -} - -final private class TakeCount: Producer { - fileprivate let _source: Observable - fileprivate let _count: Int - - init(source: Observable, count: Int) { - if count < 0 { - rxFatalError("count can't be negative") - } - self._source = source - self._count = count - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = TakeCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} - -// time version - -final private class TakeTimeSink - : Sink - , LockOwnerType - , ObserverType - , SynchronizedOnType where Observer.Element == Element { - typealias Parent = TakeTime - - fileprivate let _parent: Parent - - let _lock = RecursiveLock() - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let value): - self.forwardOn(.next(value)) - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - self.forwardOn(event) - self.dispose() - } - } - - func tick() { - self._lock.lock(); defer { self._lock.unlock() } - - self.forwardOn(.completed) - self.dispose() - } - - func run() -> Disposable { - let disposeTimer = self._parent._scheduler.scheduleRelative((), dueTime: self._parent._duration) { _ in - self.tick() - return Disposables.create() - } - - let disposeSubscription = self._parent._source.subscribe(self) - - return Disposables.create(disposeTimer, disposeSubscription) - } -} - -final private class TakeTime: Producer { - typealias TimeInterval = RxTimeInterval - - fileprivate let _source: Observable - fileprivate let _duration: TimeInterval - fileprivate let _scheduler: SchedulerType - - init(source: Observable, duration: TimeInterval, scheduler: SchedulerType) { - self._source = source - self._scheduler = scheduler - self._duration = duration - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = TakeTimeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/TakeLast.swift b/Example/Pods/RxSwift/RxSwift/Observables/TakeLast.swift deleted file mode 100755 index 5a5d684..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/TakeLast.swift +++ /dev/null @@ -1,78 +0,0 @@ -// -// TakeLast.swift -// RxSwift -// -// Created by Tomi Koskinen on 25/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. - */ - public func takeLast(_ count: Int) - -> Observable { - return TakeLast(source: self.asObservable(), count: count) - } -} - -final private class TakeLastSink: Sink, ObserverType { - typealias Element = Observer.Element - typealias Parent = TakeLast - - private let _parent: Parent - - private var _elements: Queue - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - self._elements = Queue(capacity: parent._count + 1) - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - self._elements.enqueue(value) - if self._elements.count > self._parent._count { - _ = self._elements.dequeue() - } - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - for e in self._elements { - self.forwardOn(.next(e)) - } - self.forwardOn(.completed) - self.dispose() - } - } -} - -final private class TakeLast: Producer { - fileprivate let _source: Observable - fileprivate let _count: Int - - init(source: Observable, count: Int) { - if count < 0 { - rxFatalError("count can't be negative") - } - self._source = source - self._count = count - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = TakeLastSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift b/Example/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift deleted file mode 100755 index f6490d4..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/TakeUntil.swift +++ /dev/null @@ -1,227 +0,0 @@ -// -// TakeUntil.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. - */ - public func takeUntil(_ other: Source) - -> Observable { - return TakeUntil(source: self.asObservable(), other: other.asObservable()) - } - - /** - Returns elements from an observable sequence until the specified condition is true. - - - seealso: [takeUntil operator on reactivex.io](http://reactivex.io/documentation/operators/takeuntil.html) - - - parameter behavior: Whether or not to include the last element matching the predicate. - - 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 passes. - */ - public func takeUntil(_ behavior: TakeUntilBehavior, - predicate: @escaping (Element) throws -> Bool) - -> Observable { - return TakeUntilPredicate(source: self.asObservable(), - behavior: behavior, - predicate: predicate) - } -} - -/// Behaviors for the `takeUntil(_ behavior:predicate:)` operator. -public enum TakeUntilBehavior { - /// Include the last element matching the predicate. - case inclusive - - /// Exclude the last element matching the predicate. - case exclusive -} - -// MARK: - TakeUntil Observable -final private class TakeUntilSinkOther - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Parent = TakeUntilSink - typealias Element = Other - - fileprivate let _parent: Parent - - var _lock: RecursiveLock { - return self._parent._lock - } - - fileprivate let _subscription = SingleAssignmentDisposable() - - init(parent: Parent) { - self._parent = parent -#if TRACE_RESOURCES - _ = Resources.incrementTotal() -#endif - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - self._parent.forwardOn(.completed) - self._parent.dispose() - case .error(let e): - self._parent.forwardOn(.error(e)) - self._parent.dispose() - case .completed: - self._subscription.dispose() - } - } - -#if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } -#endif -} - -final private class TakeUntilSink - : Sink - , LockOwnerType - , ObserverType - , SynchronizedOnType { - typealias Element = Observer.Element - typealias Parent = TakeUntil - - fileprivate let _parent: Parent - - let _lock = RecursiveLock() - - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - self.forwardOn(event) - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - self.forwardOn(event) - self.dispose() - } - } - - func run() -> Disposable { - let otherObserver = TakeUntilSinkOther(parent: self) - let otherSubscription = self._parent._other.subscribe(otherObserver) - otherObserver._subscription.setDisposable(otherSubscription) - let sourceSubscription = self._parent._source.subscribe(self) - - return Disposables.create(sourceSubscription, otherObserver._subscription) - } -} - -final private class TakeUntil: Producer { - - fileprivate let _source: Observable - fileprivate let _other: Observable - - init(source: Observable, other: Observable) { - self._source = source - self._other = other - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = TakeUntilSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -// MARK: - TakeUntil Predicate -final private class TakeUntilPredicateSink - : Sink, ObserverType { - typealias Element = Observer.Element - typealias Parent = TakeUntilPredicate - - fileprivate let _parent: Parent - fileprivate var _running = true - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if !self._running { - return - } - - do { - self._running = try !self._parent._predicate(value) - } catch let e { - self.forwardOn(.error(e)) - self.dispose() - return - } - - if self._running { - self.forwardOn(.next(value)) - } else { - if self._parent._behavior == .inclusive { - self.forwardOn(.next(value)) - } - - self.forwardOn(.completed) - self.dispose() - } - case .error, .completed: - self.forwardOn(event) - self.dispose() - } - } - -} - -final private class TakeUntilPredicate: Producer { - typealias Predicate = (Element) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate - fileprivate let _behavior: TakeUntilBehavior - - init(source: Observable, - behavior: TakeUntilBehavior, - predicate: @escaping Predicate) { - self._source = source - self._behavior = behavior - self._predicate = predicate - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = TakeUntilPredicateSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift b/Example/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift deleted file mode 100755 index efd5311..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/TakeWhile.swift +++ /dev/null @@ -1,85 +0,0 @@ -// -// 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 (Element) throws -> Bool) - -> Observable { - return TakeWhile(source: self.asObservable(), predicate: predicate) - } -} - -final private class TakeWhileSink - : Sink - , ObserverType { - typealias Element = Observer.Element - typealias Parent = TakeWhile - - fileprivate let _parent: Parent - - fileprivate var _running = true - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if !self._running { - return - } - - do { - self._running = try self._parent._predicate(value) - } catch let e { - self.forwardOn(.error(e)) - self.dispose() - return - } - - if self._running { - self.forwardOn(.next(value)) - } else { - self.forwardOn(.completed) - self.dispose() - } - case .error, .completed: - self.forwardOn(event) - self.dispose() - } - } - -} - -final private class TakeWhile: Producer { - typealias Predicate = (Element) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate - - init(source: Observable, predicate: @escaping Predicate) { - self._source = source - self._predicate = predicate - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = TakeWhileSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Throttle.swift b/Example/Pods/RxSwift/RxSwift/Observables/Throttle.swift deleted file mode 100755 index f682433..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Throttle.swift +++ /dev/null @@ -1,159 +0,0 @@ -// -// Throttle.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/22/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date - -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 private class ThrottleSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = Observer.Element - typealias ParentType = Throttle - - private let _parent: ParentType - - let _lock = RecursiveLock() - - // state - private var _lastUnsentElement: Element? - private var _lastSentTime: Date? - private var _completed: Bool = false - - let cancellable = SerialDisposable() - - init(parent: ParentType, observer: Observer, cancel: Cancelable) { - self._parent = parent - - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription = self._parent._source.subscribe(self) - - return Disposables.create(subscription, cancellable) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): - let now = self._parent._scheduler.now - - let reducedScheduledTime: RxTimeInterval - - if let lastSendingTime = self._lastSentTime { - reducedScheduledTime = self._parent._dueTime.reduceWithSpanBetween(earlierDate: lastSendingTime, laterDate: now) - } - else { - reducedScheduledTime = .nanoseconds(0) - } - - if reducedScheduledTime.isNow { - self.sendNow(element: element) - return - } - - if !self._parent._latest { - return - } - - let isThereAlreadyInFlightRequest = self._lastUnsentElement != nil - - self._lastUnsentElement = element - - if isThereAlreadyInFlightRequest { - return - } - - let scheduler = self._parent._scheduler - - let d = SingleAssignmentDisposable() - self.cancellable.disposable = d - - d.setDisposable(scheduler.scheduleRelative(0, dueTime: reducedScheduledTime, action: self.propagate)) - case .error: - self._lastUnsentElement = nil - self.forwardOn(event) - self.dispose() - case .completed: - if self._lastUnsentElement != nil { - self._completed = true - } - else { - self.forwardOn(.completed) - self.dispose() - } - } - } - - private func sendNow(element: Element) { - self._lastUnsentElement = nil - self.forwardOn(.next(element)) - // in case element processing takes a while, this should give some more room - self._lastSentTime = self._parent._scheduler.now - } - - func propagate(_: Int) -> Disposable { - self._lock.lock(); defer { self._lock.unlock() } // { - if let lastUnsentElement = self._lastUnsentElement { - self.sendNow(element: lastUnsentElement) - } - - if self._completed { - self.forwardOn(.completed) - self.dispose() - } - // } - return Disposables.create() - } -} - -final private class Throttle: Producer { - fileprivate let _source: Observable - fileprivate let _dueTime: RxTimeInterval - fileprivate let _latest: Bool - fileprivate let _scheduler: SchedulerType - - init(source: Observable, dueTime: RxTimeInterval, latest: Bool, scheduler: SchedulerType) { - self._source = source - self._dueTime = dueTime - self._latest = latest - self._scheduler = scheduler - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = ThrottleSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } - -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Timeout.swift b/Example/Pods/RxSwift/RxSwift/Observables/Timeout.swift deleted file mode 100755 index 3177c42..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Timeout.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// Timeout.swift -// RxSwift -// -// Created by Tomi Koskinen on 13/11/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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 `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: Source, scheduler: SchedulerType) - -> Observable where Element == Source.Element { - return Timeout(source: self.asObservable(), dueTime: dueTime, other: other.asObservable(), scheduler: scheduler) - } -} - -final private class TimeoutSink: Sink, LockOwnerType, ObserverType { - typealias Element = Observer.Element - typealias Parent = Timeout - - private let _parent: Parent - - let _lock = RecursiveLock() - - private let _timerD = SerialDisposable() - private let _subscription = SerialDisposable() - - private var _id = 0 - private var _switched = false - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let original = SingleAssignmentDisposable() - self._subscription.disposable = original - - self._createTimeoutTimer() - - original.setDisposable(self._parent._source.subscribe(self)) - - return Disposables.create(_subscription, _timerD) - } - - func on(_ event: Event) { - switch event { - case .next: - var onNextWins = false - - self._lock.performLocked { - onNextWins = !self._switched - if onNextWins { - self._id = self._id &+ 1 - } - } - - if onNextWins { - self.forwardOn(event) - self._createTimeoutTimer() - } - case .error, .completed: - var onEventWins = false - - self._lock.performLocked { - onEventWins = !self._switched - if onEventWins { - self._id = self._id &+ 1 - } - } - - if onEventWins { - self.forwardOn(event) - self.dispose() - } - } - } - - private func _createTimeoutTimer() { - if self._timerD.isDisposed { - return - } - - let nextTimer = SingleAssignmentDisposable() - self._timerD.disposable = nextTimer - - let disposeSchedule = self._parent._scheduler.scheduleRelative(self._id, dueTime: self._parent._dueTime) { state in - - var timerWins = false - - self._lock.performLocked { - self._switched = (state == self._id) - timerWins = self._switched - } - - if timerWins { - self._subscription.disposable = self._parent._other.subscribe(self.forwarder()) - } - - return Disposables.create() - } - - nextTimer.setDisposable(disposeSchedule) - } -} - - -final private class Timeout: Producer { - fileprivate let _source: Observable - fileprivate let _dueTime: RxTimeInterval - fileprivate let _other: Observable - fileprivate let _scheduler: SchedulerType - - init(source: Observable, dueTime: RxTimeInterval, other: Observable, scheduler: SchedulerType) { - self._source = source - self._dueTime = dueTime - self._other = other - self._scheduler = scheduler - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = TimeoutSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Timer.swift b/Example/Pods/RxSwift/RxSwift/Observables/Timer.swift deleted file mode 100755 index 7b29bca..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Timer.swift +++ /dev/null @@ -1,116 +0,0 @@ -// -// Timer.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType where Element : 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 Element: 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 - ) - } -} - -import Foundation - -final private class TimerSink : Sink where Observer.Element : RxAbstractInteger { - typealias Parent = Timer - - private let _parent: Parent - private let _lock = RecursiveLock() - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return self._parent._scheduler.schedulePeriodic(0 as Observer.Element, startAfter: self._parent._dueTime, period: self._parent._period!) { state in - self._lock.lock(); defer { self._lock.unlock() } - self.forwardOn(.next(state)) - return state &+ 1 - } - } -} - -final private class TimerOneOffSink: Sink where Observer.Element: RxAbstractInteger { - typealias Parent = Timer - - private let _parent: Parent - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return self._parent._scheduler.scheduleRelative(self, dueTime: self._parent._dueTime) { [unowned self] _ -> Disposable in - self.forwardOn(.next(0)) - self.forwardOn(.completed) - self.dispose() - - return Disposables.create() - } - } -} - -final private class Timer: Producer { - fileprivate let _scheduler: SchedulerType - fileprivate let _dueTime: RxTimeInterval - fileprivate let _period: RxTimeInterval? - - init(dueTime: RxTimeInterval, period: RxTimeInterval?, scheduler: SchedulerType) { - self._scheduler = scheduler - self._dueTime = dueTime - self._period = period - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - if self._period != nil { - 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/ToArray.swift b/Example/Pods/RxSwift/RxSwift/Observables/ToArray.swift deleted file mode 100755 index 2821a60..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/ToArray.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// ToArray.swift -// RxSwift -// -// Created by Junior B. on 20/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - - -extension ObservableType { - - /** - Converts an Observable into a Single 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: A Single sequence containing all the emitted elements as array. - */ - public func toArray() - -> Single<[Element]> { - return PrimitiveSequence(raw: ToArray(source: self.asObservable())) - } -} - -final private class ToArraySink: Sink, ObserverType where Observer.Element == [SourceType] { - typealias Parent = ToArray - - let _parent: Parent - var _list = [SourceType]() - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - self._list.append(value) - case .error(let e): - self.forwardOn(.error(e)) - self.dispose() - case .completed: - self.forwardOn(.next(self._list)) - self.forwardOn(.completed) - self.dispose() - } - } -} - -final private class ToArray: Producer<[SourceType]> { - let _source: Observable - - init(source: Observable) { - self._source = source - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == [SourceType] { - let sink = ToArraySink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Using.swift b/Example/Pods/RxSwift/RxSwift/Observables/Using.swift deleted file mode 100755 index 14c5698..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Using.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// Using.swift -// RxSwift -// -// Created by Yury Korolev on 10/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension ObservableType { - /** - 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. - */ - public static func using(_ resourceFactory: @escaping () throws -> Resource, observableFactory: @escaping (Resource) throws -> Observable) -> Observable { - return Using(resourceFactory: resourceFactory, observableFactory: observableFactory) - } -} - -final private class UsingSink: Sink, ObserverType { - typealias SourceType = Observer.Element - typealias Parent = Using - - private let _parent: Parent - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - var disposable = Disposables.create() - - do { - let resource = try self._parent._resourceFactory() - disposable = resource - let source = try self._parent._observableFactory(resource) - - return Disposables.create( - source.subscribe(self), - disposable - ) - } catch let error { - return Disposables.create( - Observable.error(error).subscribe(self), - disposable - ) - } - } - - func on(_ event: Event) { - switch event { - case let .next(value): - self.forwardOn(.next(value)) - case let .error(error): - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self.forwardOn(.completed) - self.dispose() - } - } -} - -final private class Using: Producer { - - typealias Element = SourceType - - typealias ResourceFactory = () throws -> ResourceType - typealias ObservableFactory = (ResourceType) throws -> Observable - - fileprivate let _resourceFactory: ResourceFactory - fileprivate let _observableFactory: ObservableFactory - - - init(resourceFactory: @escaping ResourceFactory, observableFactory: @escaping ObservableFactory) { - self._resourceFactory = resourceFactory - self._observableFactory = observableFactory - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = UsingSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Window.swift b/Example/Pods/RxSwift/RxSwift/Observables/Window.swift deleted file mode 100755 index b93cfa6..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Window.swift +++ /dev/null @@ -1,168 +0,0 @@ -// -// Window.swift -// RxSwift -// -// Created by Junior B. on 29/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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`). - */ - public func window(timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) - -> Observable> { - return WindowTimeCount(source: self.asObservable(), timeSpan: timeSpan, count: count, scheduler: scheduler) - } -} - -final private class WindowTimeCountSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType where Observer.Element == Observable { - typealias Parent = WindowTimeCount - - private let _parent: Parent - - let _lock = RecursiveLock() - - private var _subject = PublishSubject() - private var _count = 0 - private var _windowId = 0 - - private let _timerD = SerialDisposable() - private let _refCountDisposable: RefCountDisposable - private let _groupDisposable = CompositeDisposable() - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - - _ = self._groupDisposable.insert(self._timerD) - - self._refCountDisposable = RefCountDisposable(disposable: self._groupDisposable) - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - - self.forwardOn(.next(AddRef(source: self._subject, refCount: self._refCountDisposable).asObservable())) - self.createTimer(self._windowId) - - _ = self._groupDisposable.insert(self._parent._source.subscribe(self)) - return self._refCountDisposable - } - - func startNewWindowAndCompleteCurrentOne() { - self._subject.on(.completed) - self._subject = PublishSubject() - - self.forwardOn(.next(AddRef(source: self._subject, refCount: self._refCountDisposable).asObservable())) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - var newWindow = false - var newId = 0 - - switch event { - case .next(let element): - self._subject.on(.next(element)) - - do { - _ = try incrementChecked(&self._count) - } catch let e { - self._subject.on(.error(e as Swift.Error)) - self.dispose() - } - - if self._count == self._parent._count { - newWindow = true - self._count = 0 - self._windowId += 1 - newId = self._windowId - self.startNewWindowAndCompleteCurrentOne() - } - - case .error(let error): - self._subject.on(.error(error)) - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self._subject.on(.completed) - self.forwardOn(.completed) - self.dispose() - } - - if newWindow { - self.createTimer(newId) - } - } - - func createTimer(_ windowId: Int) { - if self._timerD.isDisposed { - return - } - - if self._windowId != windowId { - return - } - - let nextTimer = SingleAssignmentDisposable() - - self._timerD.disposable = nextTimer - - let scheduledRelative = self._parent._scheduler.scheduleRelative(windowId, dueTime: self._parent._timeSpan) { previousWindowId in - - var newId = 0 - - self._lock.performLocked { - if previousWindowId != self._windowId { - return - } - - self._count = 0 - self._windowId = self._windowId &+ 1 - newId = self._windowId - self.startNewWindowAndCompleteCurrentOne() - } - - self.createTimer(newId) - - return Disposables.create() - } - - nextTimer.setDisposable(scheduledRelative) - } -} - -final private class WindowTimeCount: Producer> { - fileprivate let _timeSpan: RxTimeInterval - fileprivate let _count: Int - fileprivate let _scheduler: SchedulerType - fileprivate let _source: Observable - - init(source: Observable, timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) { - self._source = source - self._timeSpan = timeSpan - self._count = count - self._scheduler = scheduler - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Observable { - let sink = WindowTimeCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift b/Example/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift deleted file mode 100755 index b471f29..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/WithLatestFrom.swift +++ /dev/null @@ -1,149 +0,0 @@ -// -// WithLatestFrom.swift -// RxSwift -// -// Created by Yury Korolev on 10/19/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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: Source, resultSelector: @escaping (Element, Source.Element) throws -> ResultType) -> Observable { - return WithLatestFrom(first: self.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: Source) -> Observable { - return WithLatestFrom(first: self.asObservable(), second: second.asObservable(), resultSelector: { $1 }) - } -} - -final private class WithLatestFromSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias ResultType = Observer.Element - typealias Parent = WithLatestFrom - typealias Element = FirstType - - fileprivate let _parent: Parent - - var _lock = RecursiveLock() - fileprivate var _latest: SecondType? - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let sndSubscription = SingleAssignmentDisposable() - let sndO = WithLatestFromSecond(parent: self, disposable: sndSubscription) - - sndSubscription.setDisposable(self._parent._second.subscribe(sndO)) - let fstSubscription = self._parent._first.subscribe(self) - - return Disposables.create(fstSubscription, sndSubscription) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case let .next(value): - guard let latest = self._latest else { return } - do { - let res = try self._parent._resultSelector(value, latest) - - self.forwardOn(.next(res)) - } catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - case .completed: - self.forwardOn(.completed) - self.dispose() - case let .error(error): - self.forwardOn(.error(error)) - self.dispose() - } - } -} - -final private class WithLatestFromSecond - : ObserverType - , LockOwnerType - , SynchronizedOnType { - - typealias ResultType = Observer.Element - typealias Parent = WithLatestFromSink - typealias Element = SecondType - - private let _parent: Parent - private let _disposable: Disposable - - var _lock: RecursiveLock { - return self._parent._lock - } - - init(parent: Parent, disposable: Disposable) { - self._parent = parent - self._disposable = disposable - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case let .next(value): - self._parent._latest = value - case .completed: - self._disposable.dispose() - case let .error(error): - self._parent.forwardOn(.error(error)) - self._parent.dispose() - } - } -} - -final private class WithLatestFrom: Producer { - typealias ResultSelector = (FirstType, SecondType) throws -> ResultType - - fileprivate let _first: Observable - fileprivate let _second: Observable - fileprivate let _resultSelector: ResultSelector - - init(first: Observable, second: Observable, resultSelector: @escaping ResultSelector) { - self._first = first - self._second = second - self._resultSelector = resultSelector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == ResultType { - let sink = WithLatestFromSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift b/Example/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift deleted file mode 100755 index cc232ab..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift +++ /dev/null @@ -1,169 +0,0 @@ -// -// Zip+Collection.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. - - - 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: Collection, resultSelector: @escaping ([Collection.Element.Element]) throws -> Element) -> Observable - where Collection.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: Collection) -> Observable<[Element]> - where Collection.Element: ObservableType, Collection.Element.Element == Element { - return ZipCollectionType(sources: collection, resultSelector: { $0 }) - } - -} - -final private class ZipCollectionTypeSink - : Sink where Collection.Element: ObservableConvertibleType { - typealias Result = Observer.Element - typealias Parent = ZipCollectionType - typealias SourceElement = Collection.Element.Element - - private let _parent: Parent - - private let _lock = RecursiveLock() - - // state - private var _numberOfValues = 0 - private var _values: [Queue] - private var _isDone: [Bool] - private var _numberOfDone = 0 - private var _subscriptions: [SingleAssignmentDisposable] - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - self._values = [Queue](repeating: Queue(capacity: 4), count: parent.count) - self._isDone = [Bool](repeating: false, count: parent.count) - self._subscriptions = [SingleAssignmentDisposable]() - self._subscriptions.reserveCapacity(parent.count) - - for _ in 0 ..< parent.count { - self._subscriptions.append(SingleAssignmentDisposable()) - } - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event, atIndex: Int) { - self._lock.lock(); defer { self._lock.unlock() } // { - switch event { - case .next(let element): - self._values[atIndex].enqueue(element) - - if self._values[atIndex].count == 1 { - self._numberOfValues += 1 - } - - if self._numberOfValues < self._parent.count { - if self._numberOfDone == self._parent.count - 1 { - self.forwardOn(.completed) - self.dispose() - } - return - } - - do { - var arguments = [SourceElement]() - arguments.reserveCapacity(self._parent.count) - - // recalculate number of values - self._numberOfValues = 0 - - for i in 0 ..< self._values.count { - arguments.append(self._values[i].dequeue()!) - if !self._values[i].isEmpty { - self._numberOfValues += 1 - } - } - - let result = try self._parent.resultSelector(arguments) - self.forwardOn(.next(result)) - } - catch let error { - self.forwardOn(.error(error)) - self.dispose() - } - - case .error(let error): - self.forwardOn(.error(error)) - self.dispose() - case .completed: - if self._isDone[atIndex] { - return - } - - self._isDone[atIndex] = true - self._numberOfDone += 1 - - if self._numberOfDone == self._parent.count { - self.forwardOn(.completed) - self.dispose() - } - else { - self._subscriptions[atIndex].dispose() - } - } - // } - } - - func run() -> Disposable { - var j = 0 - for i in self._parent.sources { - let index = j - let source = i.asObservable() - - let disposable = source.subscribe(AnyObserver { event in - self.on(event, atIndex: index) - }) - self._subscriptions[j].setDisposable(disposable) - j += 1 - } - - if self._parent.sources.isEmpty { - self.forwardOn(.completed) - } - - return Disposables.create(_subscriptions) - } -} - -final private class ZipCollectionType: Producer where Collection.Element: ObservableConvertibleType { - typealias ResultSelector = ([Collection.Element.Element]) throws -> Result - - let sources: Collection - let resultSelector: ResultSelector - let count: Int - - init(sources: Collection, resultSelector: @escaping ResultSelector) { - self.sources = sources - self.resultSelector = resultSelector - self.count = self.sources.count - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Result { - let sink = ZipCollectionTypeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift b/Example/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift deleted file mode 100755 index d2a28d4..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift +++ /dev/null @@ -1,934 +0,0 @@ -// This file is autogenerated. Take a look at `Preprocessor` target in RxSwift project -// -// Zip+arity.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/23/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - - - -// 2 - -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. - - - 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 - (_ source1: O1, _ source2: O2, resultSelector: @escaping (O1.Element, O2.Element) throws -> Element) - -> Observable { - return Zip2( - source1: source1.asObservable(), source2: source2.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where Element == 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.Element, O2.Element)> { - return Zip2( - source1: source1.asObservable(), source2: source2.asObservable(), - resultSelector: { ($0, $1) } - ) - } -} - -final class ZipSink2_ : ZipSink { - typealias Result = Observer.Element - typealias Parent = Zip2 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(arity: 2, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch index { - case 0: return !self._values1.isEmpty - case 1: return !self._values2.isEmpty - - default: - rxFatalError("Unhandled case (Function)") - } - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: self._lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: self._lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - - subscription1.setDisposable(self._parent.source1.subscribe(observer1)) - subscription2.setDisposable(self._parent.source2.subscribe(observer2)) - - return Disposables.create([ - subscription1, - subscription2 - ]) - } - - override func getResult() throws -> Result { - return try self._parent._resultSelector(self._values1.dequeue()!, self._values2.dequeue()!) - } -} - -final class Zip2 : Producer { - typealias ResultSelector = (E1, E2) throws -> Result - - let source1: Observable - let source2: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - - self._resultSelector = resultSelector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Result { - let sink = ZipSink2_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 3 - -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. - - - 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 - (_ source1: O1, _ source2: O2, _ source3: O3, resultSelector: @escaping (O1.Element, O2.Element, O3.Element) throws -> Element) - -> Observable { - return Zip3( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where Element == 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.Element, O2.Element, O3.Element)> { - return Zip3( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), - resultSelector: { ($0, $1, $2) } - ) - } -} - -final class ZipSink3_ : ZipSink { - typealias Result = Observer.Element - typealias Parent = Zip3 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - var _values3: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(arity: 3, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch index { - case 0: return !self._values1.isEmpty - case 1: return !self._values2.isEmpty - case 2: return !self._values3.isEmpty - - default: - rxFatalError("Unhandled case (Function)") - } - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: self._lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: self._lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: self._lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - - subscription1.setDisposable(self._parent.source1.subscribe(observer1)) - subscription2.setDisposable(self._parent.source2.subscribe(observer2)) - subscription3.setDisposable(self._parent.source3.subscribe(observer3)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3 - ]) - } - - override func getResult() throws -> Result { - return try self._parent._resultSelector(self._values1.dequeue()!, self._values2.dequeue()!, self._values3.dequeue()!) - } -} - -final class Zip3 : Producer { - typealias ResultSelector = (E1, E2, E3) throws -> Result - - let source1: Observable - let source2: Observable - let source3: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - self.source3 = source3 - - self._resultSelector = resultSelector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Result { - let sink = ZipSink3_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 4 - -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. - - - 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 - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: @escaping (O1.Element, O2.Element, O3.Element, O4.Element) throws -> Element) - -> Observable { - return Zip4( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where Element == 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.Element, O2.Element, O3.Element, O4.Element)> { - return Zip4( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), - resultSelector: { ($0, $1, $2, $3) } - ) - } -} - -final class ZipSink4_ : ZipSink { - typealias Result = Observer.Element - typealias Parent = Zip4 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - var _values3: Queue = Queue(capacity: 2) - var _values4: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(arity: 4, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch index { - case 0: return !self._values1.isEmpty - case 1: return !self._values2.isEmpty - case 2: return !self._values3.isEmpty - case 3: return !self._values4.isEmpty - - default: - rxFatalError("Unhandled case (Function)") - } - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: self._lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: self._lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: self._lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: self._lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - - subscription1.setDisposable(self._parent.source1.subscribe(observer1)) - subscription2.setDisposable(self._parent.source2.subscribe(observer2)) - subscription3.setDisposable(self._parent.source3.subscribe(observer3)) - subscription4.setDisposable(self._parent.source4.subscribe(observer4)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4 - ]) - } - - override func getResult() throws -> Result { - return try self._parent._resultSelector(self._values1.dequeue()!, self._values2.dequeue()!, self._values3.dequeue()!, self._values4.dequeue()!) - } -} - -final class Zip4 : Producer { - typealias ResultSelector = (E1, E2, E3, E4) throws -> Result - - let source1: Observable - let source2: Observable - let source3: Observable - let source4: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - self.source3 = source3 - self.source4 = source4 - - self._resultSelector = resultSelector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Result { - let sink = ZipSink4_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 5 - -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. - - - 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 - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: @escaping (O1.Element, O2.Element, O3.Element, O4.Element, O5.Element) throws -> Element) - -> Observable { - return Zip5( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where Element == 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.Element, O2.Element, O3.Element, O4.Element, O5.Element)> { - 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 Result = Observer.Element - typealias Parent = Zip5 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - var _values3: Queue = Queue(capacity: 2) - var _values4: Queue = Queue(capacity: 2) - var _values5: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(arity: 5, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch index { - case 0: return !self._values1.isEmpty - case 1: return !self._values2.isEmpty - case 2: return !self._values3.isEmpty - case 3: return !self._values4.isEmpty - case 4: return !self._values5.isEmpty - - default: - rxFatalError("Unhandled case (Function)") - } - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: self._lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: self._lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: self._lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: self._lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - let observer5 = ZipObserver(lock: self._lock, parent: self, index: 4, setNextValue: { self._values5.enqueue($0) }, this: subscription5) - - subscription1.setDisposable(self._parent.source1.subscribe(observer1)) - subscription2.setDisposable(self._parent.source2.subscribe(observer2)) - subscription3.setDisposable(self._parent.source3.subscribe(observer3)) - subscription4.setDisposable(self._parent.source4.subscribe(observer4)) - subscription5.setDisposable(self._parent.source5.subscribe(observer5)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5 - ]) - } - - override func getResult() throws -> Result { - return try self._parent._resultSelector(self._values1.dequeue()!, self._values2.dequeue()!, self._values3.dequeue()!, self._values4.dequeue()!, self._values5.dequeue()!) - } -} - -final class Zip5 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5) throws -> Result - - let source1: Observable - let source2: Observable - let source3: Observable - let source4: Observable - let source5: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - self.source3 = source3 - self.source4 = source4 - self.source5 = source5 - - self._resultSelector = resultSelector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Result { - let sink = ZipSink5_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 6 - -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. - - - 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 - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: @escaping (O1.Element, O2.Element, O3.Element, O4.Element, O5.Element, O6.Element) throws -> Element) - -> Observable { - return Zip6( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where Element == 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.Element, O2.Element, O3.Element, O4.Element, O5.Element, O6.Element)> { - 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 Result = Observer.Element - typealias Parent = Zip6 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - var _values3: Queue = Queue(capacity: 2) - var _values4: Queue = Queue(capacity: 2) - var _values5: Queue = Queue(capacity: 2) - var _values6: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(arity: 6, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch index { - case 0: return !self._values1.isEmpty - case 1: return !self._values2.isEmpty - case 2: return !self._values3.isEmpty - case 3: return !self._values4.isEmpty - case 4: return !self._values5.isEmpty - case 5: return !self._values6.isEmpty - - default: - rxFatalError("Unhandled case (Function)") - } - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - let subscription6 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: self._lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: self._lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: self._lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: self._lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - let observer5 = ZipObserver(lock: self._lock, parent: self, index: 4, setNextValue: { self._values5.enqueue($0) }, this: subscription5) - let observer6 = ZipObserver(lock: self._lock, parent: self, index: 5, setNextValue: { self._values6.enqueue($0) }, this: subscription6) - - subscription1.setDisposable(self._parent.source1.subscribe(observer1)) - subscription2.setDisposable(self._parent.source2.subscribe(observer2)) - subscription3.setDisposable(self._parent.source3.subscribe(observer3)) - subscription4.setDisposable(self._parent.source4.subscribe(observer4)) - subscription5.setDisposable(self._parent.source5.subscribe(observer5)) - subscription6.setDisposable(self._parent.source6.subscribe(observer6)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6 - ]) - } - - override func getResult() throws -> Result { - return try self._parent._resultSelector(self._values1.dequeue()!, self._values2.dequeue()!, self._values3.dequeue()!, self._values4.dequeue()!, self._values5.dequeue()!, self._values6.dequeue()!) - } -} - -final class Zip6 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6) throws -> Result - - let source1: Observable - let source2: Observable - let source3: Observable - let source4: Observable - let source5: Observable - let source6: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - self.source3 = source3 - self.source4 = source4 - self.source5 = source5 - self.source6 = source6 - - self._resultSelector = resultSelector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Result { - let sink = ZipSink6_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 7 - -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. - - - 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 - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: @escaping (O1.Element, O2.Element, O3.Element, O4.Element, O5.Element, O6.Element, O7.Element) throws -> Element) - -> Observable { - return Zip7( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where Element == 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.Element, O2.Element, O3.Element, O4.Element, O5.Element, O6.Element, O7.Element)> { - 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 Result = Observer.Element - typealias Parent = Zip7 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - var _values3: Queue = Queue(capacity: 2) - var _values4: Queue = Queue(capacity: 2) - var _values5: Queue = Queue(capacity: 2) - var _values6: Queue = Queue(capacity: 2) - var _values7: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(arity: 7, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch index { - case 0: return !self._values1.isEmpty - case 1: return !self._values2.isEmpty - case 2: return !self._values3.isEmpty - case 3: return !self._values4.isEmpty - case 4: return !self._values5.isEmpty - case 5: return !self._values6.isEmpty - case 6: return !self._values7.isEmpty - - default: - rxFatalError("Unhandled case (Function)") - } - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - let subscription6 = SingleAssignmentDisposable() - let subscription7 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: self._lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: self._lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: self._lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: self._lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - let observer5 = ZipObserver(lock: self._lock, parent: self, index: 4, setNextValue: { self._values5.enqueue($0) }, this: subscription5) - let observer6 = ZipObserver(lock: self._lock, parent: self, index: 5, setNextValue: { self._values6.enqueue($0) }, this: subscription6) - let observer7 = ZipObserver(lock: self._lock, parent: self, index: 6, setNextValue: { self._values7.enqueue($0) }, this: subscription7) - - subscription1.setDisposable(self._parent.source1.subscribe(observer1)) - subscription2.setDisposable(self._parent.source2.subscribe(observer2)) - subscription3.setDisposable(self._parent.source3.subscribe(observer3)) - subscription4.setDisposable(self._parent.source4.subscribe(observer4)) - subscription5.setDisposable(self._parent.source5.subscribe(observer5)) - subscription6.setDisposable(self._parent.source6.subscribe(observer6)) - subscription7.setDisposable(self._parent.source7.subscribe(observer7)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6, - subscription7 - ]) - } - - override func getResult() throws -> Result { - return try self._parent._resultSelector(self._values1.dequeue()!, self._values2.dequeue()!, self._values3.dequeue()!, self._values4.dequeue()!, self._values5.dequeue()!, self._values6.dequeue()!, self._values7.dequeue()!) - } -} - -final class Zip7 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7) throws -> Result - - let source1: Observable - let source2: Observable - let source3: Observable - let source4: Observable - let source5: Observable - let source6: Observable - let source7: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - self.source3 = source3 - self.source4 = source4 - self.source5 = source5 - self.source6 = source6 - self.source7 = source7 - - self._resultSelector = resultSelector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Result { - let sink = ZipSink7_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 8 - -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. - - - 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 - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: @escaping (O1.Element, O2.Element, O3.Element, O4.Element, O5.Element, O6.Element, O7.Element, O8.Element) throws -> Element) - -> Observable { - 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: resultSelector - ) - } -} - -extension ObservableType where Element == 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.Element, O2.Element, O3.Element, O4.Element, O5.Element, O6.Element, O7.Element, O8.Element)> { - 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 Result = Observer.Element - typealias Parent = Zip8 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - var _values3: Queue = Queue(capacity: 2) - var _values4: Queue = Queue(capacity: 2) - var _values5: Queue = Queue(capacity: 2) - var _values6: Queue = Queue(capacity: 2) - var _values7: Queue = Queue(capacity: 2) - var _values8: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(arity: 8, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch index { - case 0: return !self._values1.isEmpty - case 1: return !self._values2.isEmpty - case 2: return !self._values3.isEmpty - case 3: return !self._values4.isEmpty - case 4: return !self._values5.isEmpty - case 5: return !self._values6.isEmpty - case 6: return !self._values7.isEmpty - case 7: return !self._values8.isEmpty - - default: - rxFatalError("Unhandled case (Function)") - } - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - let subscription6 = SingleAssignmentDisposable() - let subscription7 = SingleAssignmentDisposable() - let subscription8 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: self._lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: self._lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: self._lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: self._lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - let observer5 = ZipObserver(lock: self._lock, parent: self, index: 4, setNextValue: { self._values5.enqueue($0) }, this: subscription5) - let observer6 = ZipObserver(lock: self._lock, parent: self, index: 5, setNextValue: { self._values6.enqueue($0) }, this: subscription6) - let observer7 = ZipObserver(lock: self._lock, parent: self, index: 6, setNextValue: { self._values7.enqueue($0) }, this: subscription7) - let observer8 = ZipObserver(lock: self._lock, parent: self, index: 7, setNextValue: { self._values8.enqueue($0) }, this: subscription8) - - subscription1.setDisposable(self._parent.source1.subscribe(observer1)) - subscription2.setDisposable(self._parent.source2.subscribe(observer2)) - subscription3.setDisposable(self._parent.source3.subscribe(observer3)) - subscription4.setDisposable(self._parent.source4.subscribe(observer4)) - subscription5.setDisposable(self._parent.source5.subscribe(observer5)) - subscription6.setDisposable(self._parent.source6.subscribe(observer6)) - subscription7.setDisposable(self._parent.source7.subscribe(observer7)) - subscription8.setDisposable(self._parent.source8.subscribe(observer8)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6, - subscription7, - subscription8 - ]) - } - - override func getResult() throws -> Result { - return try self._parent._resultSelector(self._values1.dequeue()!, self._values2.dequeue()!, self._values3.dequeue()!, self._values4.dequeue()!, self._values5.dequeue()!, self._values6.dequeue()!, self._values7.dequeue()!, self._values8.dequeue()!) - } -} - -final class Zip8 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7, E8) throws -> Result - - let source1: Observable - let source2: Observable - let source3: Observable - let source4: Observable - let source5: Observable - let source6: Observable - let source7: Observable - let source8: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, source4: Observable, source5: Observable, source6: Observable, source7: Observable, source8: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - self.source3 = source3 - self.source4 = source4 - self.source5 = source5 - self.source6 = source6 - self.source7 = source7 - self.source8 = source8 - - self._resultSelector = resultSelector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Result { - let sink = ZipSink8_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Zip.swift b/Example/Pods/RxSwift/RxSwift/Observables/Zip.swift deleted file mode 100755 index 911eb57..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Zip.swift +++ /dev/null @@ -1,136 +0,0 @@ -// -// Zip.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/23/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol ZipSinkProtocol : class -{ - func next(_ index: Int) - func fail(_ error: Swift.Error) - func done(_ index: Int) -} - -class ZipSink : Sink, ZipSinkProtocol { - typealias Element = Observer.Element - - let _arity: Int - - let _lock = RecursiveLock() - - // state - private var _isDone: [Bool] - - init(arity: Int, observer: Observer, cancel: Cancelable) { - self._isDone = [Bool](repeating: false, count: arity) - self._arity = arity - - super.init(observer: observer, cancel: cancel) - } - - func getResult() throws -> Element { - rxAbstractMethod() - } - - func hasElements(_ index: Int) -> Bool { - rxAbstractMethod() - } - - func next(_ index: Int) { - var hasValueAll = true - - for i in 0 ..< self._arity { - if !self.hasElements(i) { - hasValueAll = false - break - } - } - - if hasValueAll { - do { - let result = try self.getResult() - self.forwardOn(.next(result)) - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - } - } - - func fail(_ error: Swift.Error) { - self.forwardOn(.error(error)) - self.dispose() - } - - func done(_ index: Int) { - self._isDone[index] = true - - var allDone = true - - for done in self._isDone where !done { - allDone = false - break - } - - if allDone { - self.forwardOn(.completed) - self.dispose() - } - } -} - -final class ZipObserver - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias ValueSetter = (Element) -> Void - - private var _parent: ZipSinkProtocol? - - let _lock: RecursiveLock - - // state - private let _index: Int - private let _this: Disposable - private let _setNextValue: ValueSetter - - init(lock: RecursiveLock, parent: ZipSinkProtocol, index: Int, setNextValue: @escaping ValueSetter, this: Disposable) { - self._lock = lock - self._parent = parent - self._index = index - self._this = this - self._setNextValue = setNextValue - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - if self._parent != nil { - switch event { - case .next: - break - case .error: - self._this.dispose() - case .completed: - self._this.dispose() - } - } - - if let parent = self._parent { - switch event { - case .next(let value): - self._setNextValue(value) - parent.next(self._index) - case .error(let error): - parent.fail(error) - case .completed: - parent.done(self._index) - } - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/ObserverType.swift b/Example/Pods/RxSwift/RxSwift/ObserverType.swift deleted file mode 100755 index e3db94a..0000000 --- a/Example/Pods/RxSwift/RxSwift/ObserverType.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// ObserverType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Supports push-style iteration over an observable sequence. -public protocol ObserverType { - /// The type of elements in sequence that observer can observe. - associatedtype Element - - @available(*, deprecated, message: "Use `Element` instead.") - typealias E = Element - - /// Notify observer about sequence event. - /// - /// - parameter event: Event that occurred. - func on(_ event: Event) -} - -/// Convenience API extensions to provide alternate next, error, completed events -extension ObserverType { - - /// Convenience method equivalent to `on(.next(element: Element))` - /// - /// - parameter element: Next element to send to observer(s) - public func onNext(_ element: Element) { - self.on(.next(element)) - } - - /// Convenience method equivalent to `on(.completed)` - public func onCompleted() { - self.on(.completed) - } - - /// Convenience method equivalent to `on(.error(Swift.Error))` - /// - parameter error: Swift.Error to send to observer(s) - public func onError(_ error: Swift.Error) { - self.on(.error(error)) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift b/Example/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift deleted file mode 100755 index 804e289..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// AnonymousObserver.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class AnonymousObserver: ObserverBase { - typealias EventHandler = (Event) -> Void - - private let _eventHandler : EventHandler - - init(_ eventHandler: @escaping EventHandler) { -#if TRACE_RESOURCES - _ = Resources.incrementTotal() -#endif - self._eventHandler = eventHandler - } - - override func onCore(_ event: Event) { - return self._eventHandler(event) - } - -#if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } -#endif -} diff --git a/Example/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift b/Example/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift deleted file mode 100755 index 57be8e2..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// ObserverBase.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -class ObserverBase : Disposable, ObserverType { - private let _isStopped = AtomicInt(0) - - func on(_ event: Event) { - switch event { - case .next: - if load(self._isStopped) == 0 { - self.onCore(event) - } - case .error, .completed: - if fetchOr(self._isStopped, 1) == 0 { - self.onCore(event) - } - } - } - - func onCore(_ event: Event) { - rxAbstractMethod() - } - - func dispose() { - fetchOr(self._isStopped, 1) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift b/Example/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift deleted file mode 100755 index 41363a9..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// TailRecursiveSink.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -enum TailRecursiveSinkCommand { - case moveNext - case dispose -} - -#if DEBUG || TRACE_RESOURCES - public var maxTailRecursiveSinkStackSize = 0 -#endif - -/// This class is usually used with `Generator` version of the operators. -class TailRecursiveSink - : Sink - , InvocableWithValueType where Sequence.Element: ObservableConvertibleType, Sequence.Element.Element == Observer.Element { - typealias Value = TailRecursiveSinkCommand - typealias Element = Observer.Element - typealias SequenceGenerator = (generator: Sequence.Iterator, remaining: IntMax?) - - var _generators: [SequenceGenerator] = [] - var _isDisposed = false - var _subscription = SerialDisposable() - - // this is thread safe object - var _gate = AsyncLock>>() - - override init(observer: Observer, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func run(_ sources: SequenceGenerator) -> Disposable { - self._generators.append(sources) - - self.schedule(.moveNext) - - return self._subscription - } - - func invoke(_ command: TailRecursiveSinkCommand) { - switch command { - case .dispose: - self.disposeCommand() - case .moveNext: - self.moveNextCommand() - } - } - - // simple implementation for now - func schedule(_ command: TailRecursiveSinkCommand) { - self._gate.invoke(InvocableScheduledItem(invocable: self, state: command)) - } - - func done() { - self.forwardOn(.completed) - self.dispose() - } - - func extract(_ observable: Observable) -> SequenceGenerator? { - rxAbstractMethod() - } - - // should be done on gate locked - - private func moveNextCommand() { - var next: Observable? - - repeat { - guard let (g, left) = self._generators.last else { - break - } - - if self._isDisposed { - return - } - - self._generators.removeLast() - - var e = g - - guard let nextCandidate = e.next()?.asObservable() else { - continue - } - - // `left` is a hint of how many elements are left in generator. - // In case this is the last element, then there is no need to push - // that generator on stack. - // - // This is an optimization used to make sure in tail recursive case - // there is no memory leak in case this operator is used to generate non terminating - // sequence. - - if let knownOriginalLeft = left { - // `- 1` because generator.next() has just been called - if knownOriginalLeft - 1 >= 1 { - self._generators.append((e, knownOriginalLeft - 1)) - } - } - else { - self._generators.append((e, nil)) - } - - let nextGenerator = self.extract(nextCandidate) - - if let nextGenerator = nextGenerator { - self._generators.append(nextGenerator) - #if DEBUG || TRACE_RESOURCES - if maxTailRecursiveSinkStackSize < self._generators.count { - maxTailRecursiveSinkStackSize = self._generators.count - } - #endif - } - else { - next = nextCandidate - } - } while next == nil - - guard let existingNext = next else { - self.done() - return - } - - let disposable = SingleAssignmentDisposable() - self._subscription.disposable = disposable - disposable.setDisposable(self.subscribeToNext(existingNext)) - } - - func subscribeToNext(_ source: Observable) -> Disposable { - rxAbstractMethod() - } - - func disposeCommand() { - self._isDisposed = true - self._generators.removeAll(keepingCapacity: false) - } - - override func dispose() { - super.dispose() - - self._subscription.dispose() - self._gate.dispose() - - self.schedule(.dispose) - } -} - diff --git a/Example/Pods/RxSwift/RxSwift/Reactive.swift b/Example/Pods/RxSwift/RxSwift/Reactive.swift deleted file mode 100755 index 8fdfa18..0000000 --- a/Example/Pods/RxSwift/RxSwift/Reactive.swift +++ /dev/null @@ -1,77 +0,0 @@ -// -// Reactive.swift -// RxSwift -// -// Created by Yury Korolev on 5/2/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -/** - Use `Reactive` proxy as customization point for constrained protocol extensions. - - General pattern would be: - - // 1. Extend Reactive protocol with constrain on Base - // Read as: Reactive Extension where Base is a SomeType - extension Reactive where Base: SomeType { - // 2. Put any specific reactive extension for SomeType here - } - - With this approach we can have more specialized methods and properties using - `Base` and not just specialized on common base type. - - */ - -public struct Reactive { - /// Base object to extend. - public let base: Base - - /// Creates extensions with base object. - /// - /// - parameter base: Base object. - public init(_ base: Base) { - self.base = base - } -} - -/// A type that has reactive extensions. -public protocol ReactiveCompatible { - /// Extended type - associatedtype ReactiveBase - - @available(*, deprecated, message: "Use `ReactiveBase` instead.") - typealias CompatibleType = ReactiveBase - - /// Reactive extensions. - static var rx: Reactive.Type { get set } - - /// Reactive extensions. - var rx: Reactive { get set } -} - -extension ReactiveCompatible { - /// Reactive extensions. - public static var rx: Reactive.Type { - get { - return Reactive.self - } - set { - // this enables using Reactive to "mutate" base type - } - } - - /// Reactive extensions. - public var rx: Reactive { - get { - return Reactive(self) - } - set { - // this enables using Reactive to "mutate" base object - } - } -} - -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 deleted file mode 100755 index a547a8f..0000000 --- a/Example/Pods/RxSwift/RxSwift/Rx.swift +++ /dev/null @@ -1,141 +0,0 @@ -// -// Rx.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -#if TRACE_RESOURCES - fileprivate let 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 load(resourceCount) - } - - /// Increments `Resources.total` resource count. - /// - /// - returns: New resource count - public static func incrementTotal() -> Int32 { - return increment(resourceCount) - } - - /// Decrements `Resources.total` resource count - /// - /// - returns: New resource count - public static func decrementTotal() -> Int32 { - return decrement(resourceCount) - } - } -#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 rxAbstractMethod(file: StaticString = #file, line: UInt = #line) -> Swift.Never { - rxFatalError("Abstract method", file: file, line: line) -} - -func rxFatalError(_ lastMessage: @autoclosure () -> String, file: StaticString = #file, line: UInt = #line) -> Swift.Never { - 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 - } - defer { i += 1 } - return i -} - -func decrementChecked(_ i: inout Int) throws -> Int { - if i == Int.min { - throw RxError.overflow - } - 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 = [UnsafeMutableRawPointer: Int]() - - private func synchronizationError(_ message: String) { - #if FATAL_SYNCHRONIZATION - rxFatalError(message) - #else - print(message) - #endif - } - - func register(synchronizationErrorMessage: SynchronizationErrorMessages) { - self._lock.lock(); defer { self._lock.unlock() } - let pointer = Unmanaged.passUnretained(Thread.current).toOpaque() - let count = (self._threads[pointer] ?? 0) + 1 - - if count > 1 { - self.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 enqueuing sequence events in some other way.\n" - ) - } - - self._threads[pointer] = count - - if self._threads.count > 1 { - self.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() { - self._lock.lock(); defer { self._lock.unlock() } - let pointer = Unmanaged.passUnretained(Thread.current).toOpaque() - self._threads[pointer] = (self._threads[pointer] ?? 1) - 1 - if self._threads[pointer] == 0 { - self._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 deleted file mode 100755 index fd6fc98..0000000 --- a/Example/Pods/RxSwift/RxSwift/RxMutableBox.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// RxMutableBox.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/22/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -#if os(Linux) -/// As Swift 5 was released, A patch to `Thread` for Linux -/// changed `threadDictionary` to a `NSMutableDictionary` instead of -/// a `Dictionary`: https://github.com/apple/swift-corelibs-foundation/pull/1762/files -/// -/// This means that on Linux specifically, `RxMutableBox` must be a `NSObject` -/// or it won't be possible to store it in `Thread.threadDictionary`. -/// -/// For more information, read the discussion at: -/// https://github.com/ReactiveX/RxSwift/issues/1911#issuecomment-479723298 -import class Foundation.NSObject - -/// Creates mutable reference wrapper for any type. -final class RxMutableBox: NSObject { - /// Wrapped value - var value: T - - /// Creates reference wrapper for `value`. - /// - /// - parameter value: Value to wrap. - init (_ value: T) { - self.value = value - } -} -#else -/// 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. - init (_ value: T) { - self.value = value - } -} - -extension RxMutableBox { - /// - returns: Box description. - var debugDescription: String { - return "MutatingBox(\(self.value))" - } -} -#endif diff --git a/Example/Pods/RxSwift/RxSwift/SchedulerType.swift b/Example/Pods/RxSwift/RxSwift/SchedulerType.swift deleted file mode 100755 index 96664b4..0000000 --- a/Example/Pods/RxSwift/RxSwift/SchedulerType.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// SchedulerType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import enum Dispatch.DispatchTimeInterval -import struct Foundation.Date - -// Type that represents time interval in the context of RxSwift. -public typealias RxTimeInterval = DispatchTimeInterval - -/// Type that represents absolute time in the context of RxSwift. -public typealias RxTime = Date - -/// Represents an object that schedules units of work. -public protocol SchedulerType: ImmediateSchedulerType { - - /// - returns: Current time. - var now : RxTime { - get - } - - /** - Schedules an action to be executed. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - func scheduleRelative(_ state: StateType, dueTime: RxTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable - - /** - Schedules a periodic piece of work. - - - parameter state: State passed to the action to be executed. - - parameter startAfter: Period after which initial work should be run. - - parameter period: Period for running the work periodically. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - func schedulePeriodic(_ state: StateType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping (StateType) -> StateType) -> Disposable -} - -extension SchedulerType { - - /** - Periodic task will be emulated using recursive scheduling. - - - parameter state: Initial state passed to the action upon the first iteration. - - parameter startAfter: Period after which initial work should be run. - - parameter period: Period for running the work periodically. - - returns: The disposable object used to cancel the scheduled recurring action (best effort). - */ - public func schedulePeriodic(_ state: StateType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - let schedule = SchedulePeriodicRecursive(scheduler: self, startAfter: startAfter, period: period, action: action, state: state) - - return schedule.start() - } - - func scheduleRecursive(_ state: State, dueTime: RxTimeInterval, action: @escaping (State, AnyRecursiveScheduler) -> Void) -> Disposable { - let scheduler = AnyRecursiveScheduler(scheduler: self, action: action) - - scheduler.schedule(state, dueTime: dueTime) - - return Disposables.create(with: scheduler.dispose) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift deleted file mode 100755 index ac51324..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift +++ /dev/null @@ -1,84 +0,0 @@ -// -// ConcurrentDispatchQueueScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 7/5/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. -public class ConcurrentDispatchQueueScheduler: SchedulerType { - public typealias TimeInterval = Foundation.TimeInterval - public typealias Time = Date - - public var now : Date { - return Date() - } - - let configuration: DispatchQueueConfiguration - - /// 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)) { - self.configuration = DispatchQueueConfiguration(queue: queue, leeway: leeway) - } - - /// 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(qos: DispatchQoS, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { - self.init(queue: DispatchQueue( - label: "rxswift.queue.\(qos)", - qos: qos, - attributes: [DispatchQueue.Attributes.concurrent], - target: nil), - leeway: leeway - ) - } - - /** - 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 final func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.configuration.schedule(state, action: action) - } - - /** - Schedules an action to be executed. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public final func scheduleRelative(_ state: StateType, dueTime: RxTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.configuration.scheduleRelative(state, dueTime: dueTime, action: action) - } - - /** - Schedules a periodic piece of work. - - - parameter state: State passed to the action to be executed. - - parameter startAfter: Period after which initial work should be run. - - parameter period: Period for running the work periodically. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func schedulePeriodic(_ state: StateType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - return self.configuration.schedulePeriodic(state, startAfter: startAfter, period: period, action: action) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift deleted file mode 100755 index f535a22..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift +++ /dev/null @@ -1,88 +0,0 @@ -// -// ConcurrentMainScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/17/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. - -This scheduler is optimized for `subscribeOn` operator. If you want to observe observable sequence elements on main thread using `observeOn` operator, -`MainScheduler` is more suitable for that purpose. -*/ -public final class ConcurrentMainScheduler : SchedulerType { - public typealias TimeInterval = Foundation.TimeInterval - public typealias Time = Date - - private let _mainScheduler: MainScheduler - private let _mainQueue: DispatchQueue - - /// - returns: Current time. - public var now: Date { - return self._mainScheduler.now as Date - } - - private init(mainScheduler: MainScheduler) { - self._mainQueue = DispatchQueue.main - self._mainScheduler = mainScheduler - } - - /// Singleton instance of `ConcurrentMainScheduler` - public static let instance = ConcurrentMainScheduler(mainScheduler: MainScheduler.instance) - - /** - 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 DispatchQueue.isMain { - return action(state) - } - - let cancel = SingleAssignmentDisposable() - - self._mainQueue.async { - if cancel.isDisposed { - return - } - - cancel.setDisposable(action(state)) - } - - return cancel - } - - /** - Schedules an action to be executed. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public final func scheduleRelative(_ state: StateType, dueTime: RxTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - return self._mainScheduler.scheduleRelative(state, dueTime: dueTime, action: action) - } - - /** - Schedules a periodic piece of work. - - - parameter state: State passed to the action to be executed. - - parameter startAfter: Period after which initial work should be run. - - parameter period: Period for running the work periodically. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func schedulePeriodic(_ state: StateType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - return self._mainScheduler.schedulePeriodic(state, startAfter: startAfter, period: period, action: action) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift deleted file mode 100755 index 8f9939a..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift +++ /dev/null @@ -1,138 +0,0 @@ -// -// CurrentThreadScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import class Foundation.NSObject -import protocol Foundation.NSCopying -import class Foundation.Thread -import Dispatch - -#if os(Linux) - 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 - private class CurrentThreadSchedulerQueueKey: NSObject, NSCopying { - static let instance = CurrentThreadSchedulerQueueKey() - private override init() { - super.init() - } - - override var hash: Int { - return 0 - } - - public func copy(with zone: NSZone? = nil) -> Any { - return self - } - } -#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`. -public class CurrentThreadScheduler : ImmediateSchedulerType { - typealias ScheduleQueue = RxMutableBox> - - /// 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 { key.deallocate() } - - 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(CurrentThreadSchedulerQueueKey.instance) - } - set { - Thread.setThreadLocalStorageValue(newValue, forKey: CurrentThreadSchedulerQueueKey.instance) - } - } - - /// Gets a value that indicates whether the caller must call a `schedule` method. - public static fileprivate(set) var isScheduleRequired: Bool { - get { - return pthread_getspecific(CurrentThreadScheduler.isScheduleRequiredKey) == nil - } - set(isScheduleRequired) { - if pthread_setspecific(CurrentThreadScheduler.isScheduleRequiredKey, isScheduleRequired ? nil : scheduleInProgressSentinel) != 0 { - rxFatalError("pthread_setspecific failed") - } - } - } - - /** - Schedules an action to be executed as soon as possible on current thread. - - If this method is called on some thread that doesn't have `CurrentThreadScheduler` installed, scheduler will be - automatically installed and uninstalled after all work is performed. - - - 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 CurrentThreadScheduler.isScheduleRequired { - CurrentThreadScheduler.isScheduleRequired = false - - let disposable = action(state) - - defer { - CurrentThreadScheduler.isScheduleRequired = true - CurrentThreadScheduler.queue = nil - } - - guard let queue = CurrentThreadScheduler.queue else { - return disposable - } - - while let latest = queue.value.dequeue() { - if latest.isDisposed { - continue - } - latest.invoke() - } - - return disposable - } - - let existingQueue = CurrentThreadScheduler.queue - - let queue: RxMutableBox> - if let existingQueue = existingQueue { - queue = existingQueue - } - else { - queue = RxMutableBox(Queue(capacity: 1)) - CurrentThreadScheduler.queue = queue - } - - let scheduledItem = ScheduledItem(action: action, state: state) - queue.value.enqueue(scheduledItem) - - return scheduledItem - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift deleted file mode 100755 index 11af238..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// HistoricalScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 12/27/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date - -/// Provides a virtual time scheduler that uses `Date` for absolute time and `NSTimeInterval` for relative time. -public class HistoricalScheduler : VirtualTimeScheduler { - - /** - Creates a new historical scheduler with initial clock value. - - - parameter initialClock: Initial value for virtual clock. - */ - public init(initialClock: RxTime = Date(timeIntervalSince1970: 0)) { - super.init(initialClock: initialClock, converter: HistoricalSchedulerTimeConverter()) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift deleted file mode 100755 index 12eeb5c..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// HistoricalSchedulerTimeConverter.swift -// RxSwift -// -// Created by Krunoslav Zaher on 12/27/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Foundation - -/// Converts historical virtual time into real time. -/// -/// Since historical virtual time is also measured in `Date`, this converter is identity function. -public struct HistoricalSchedulerTimeConverter : VirtualTimeConverterType { - /// Virtual time unit used that represents ticks of virtual clock. - public typealias VirtualTimeUnit = RxTime - - /// Virtual time unit used to represent differences of virtual times. - public typealias VirtualTimeIntervalUnit = TimeInterval - - /// Returns identical value of argument passed because historical virtual time is equal to real time, just - /// decoupled from local machine clock. - public func convertFromVirtualTime(_ virtualTime: VirtualTimeUnit) -> RxTime { - return virtualTime - } - - /// 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. - public func convertFromVirtualTimeInterval(_ virtualTimeInterval: VirtualTimeIntervalUnit) -> TimeInterval { - return virtualTimeInterval - } - - /// 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: TimeInterval) -> VirtualTimeIntervalUnit { - return timeInterval - } - - /** - Offsets `Date` by time interval. - - - parameter time: Time. - - parameter timeInterval: Time interval offset. - - returns: Time offsetted by time interval. - */ - public func offsetVirtualTime(_ time: VirtualTimeUnit, offset: VirtualTimeIntervalUnit) -> VirtualTimeUnit { - return time.addingTimeInterval(offset) - } - - /// Compares two `Date`s. - public func compareVirtualTime(_ lhs: VirtualTimeUnit, _ rhs: VirtualTimeUnit) -> VirtualTimeComparison { - switch lhs.compare(rhs as Date) { - case .orderedAscending: - return .lessThan - case .orderedSame: - return .equal - case .orderedDescending: - return .greaterThan - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift deleted file mode 100755 index bac5e9a..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift +++ /dev/null @@ -1,97 +0,0 @@ -// -// DispatchQueueConfiguration.swift -// RxSwift -// -// Created by Krunoslav Zaher on 7/23/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -import Dispatch -import struct Foundation.TimeInterval - -struct DispatchQueueConfiguration { - let queue: DispatchQueue - let leeway: DispatchTimeInterval -} - -extension DispatchQueueConfiguration { - func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - let cancel = SingleAssignmentDisposable() - - self.queue.async { - if cancel.isDisposed { - return - } - - - cancel.setDisposable(action(state)) - } - - return cancel - } - - func scheduleRelative(_ state: StateType, dueTime: RxTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - let deadline = DispatchTime.now() + dueTime - - let compositeDisposable = CompositeDisposable() - - let timer = DispatchSource.makeTimerSource(queue: self.queue) - timer.schedule(deadline: deadline, leeway: self.leeway) - - // TODO: - // This looks horrible, and yes, it is. - // It looks like Apple has made a conceputal change here, and I'm unsure why. - // Need more info on this. - // It looks like just setting timer to fire and not holding a reference to it - // until deadline causes timer cancellation. - var timerReference: DispatchSourceTimer? = timer - let cancelTimer = Disposables.create { - timerReference?.cancel() - timerReference = nil - } - - timer.setEventHandler(handler: { - if compositeDisposable.isDisposed { - return - } - _ = compositeDisposable.insert(action(state)) - cancelTimer.dispose() - }) - timer.resume() - - _ = compositeDisposable.insert(cancelTimer) - - return compositeDisposable - } - - func schedulePeriodic(_ state: StateType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - let initial = DispatchTime.now() + startAfter - - var timerState = state - - let timer = DispatchSource.makeTimerSource(queue: self.queue) - timer.schedule(deadline: initial, repeating: period, leeway: self.leeway) - - // TODO: - // This looks horrible, and yes, it is. - // It looks like Apple has made a conceputal change here, and I'm unsure why. - // Need more info on this. - // It looks like just setting timer to fire and not holding a reference to it - // until deadline causes timer cancellation. - var timerReference: DispatchSourceTimer? = timer - let cancelTimer = Disposables.create { - timerReference?.cancel() - timerReference = nil - } - - timer.setEventHandler(handler: { - if cancelTimer.isDisposed { - return - } - timerState = action(timerState) - }) - timer.resume() - - return cancelTimer - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift deleted file mode 100755 index f31469e..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// InvocableScheduledItem.swift -// RxSwift -// -// Created by Krunoslav Zaher on 11/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -struct InvocableScheduledItem : InvocableType { - - let _invocable: I - let _state: I.Value - - init(invocable: I, state: I.Value) { - self._invocable = invocable - self._state = state - } - - func invoke() { - self._invocable.invoke(self._state) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift deleted file mode 100755 index 0dba433..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// InvocableType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 11/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol InvocableType { - func invoke() -} - -protocol InvocableWithValueType { - associatedtype Value - - func invoke(_ value: Value) -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift deleted file mode 100755 index 6e7a0c1..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// ScheduledItem.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/2/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -struct ScheduledItem - : ScheduledItemType - , InvocableType { - typealias Action = (T) -> Disposable - - private let _action: Action - private let _state: T - - private let _disposable = SingleAssignmentDisposable() - - var isDisposed: Bool { - return self._disposable.isDisposed - } - - init(action: @escaping Action, state: T) { - self._action = action - self._state = state - } - - func invoke() { - self._disposable.setDisposable(self._action(self._state)) - } - - func dispose() { - self._disposable.dispose() - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift deleted file mode 100755 index d2b16ca..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// ScheduledItemType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 11/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol ScheduledItemType - : Cancelable - , InvocableType { - func invoke() -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift deleted file mode 100755 index 8fb0907..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift +++ /dev/null @@ -1,80 +0,0 @@ -// -// MainScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Dispatch -#if !os(Linux) - import Foundation -#endif - -/** -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. - -Main scheduler is a specialization of `SerialDispatchQueueScheduler`. - -This scheduler is optimized for `observeOn` operator. To ensure observable sequence is subscribed on main thread using `subscribeOn` -operator please use `ConcurrentMainScheduler` because it is more optimized for that purpose. -*/ -public final class MainScheduler : SerialDispatchQueueScheduler { - - private let _mainQueue: DispatchQueue - - let numberEnqueued = AtomicInt(0) - - /// Initializes new instance of `MainScheduler`. - public init() { - self._mainQueue = DispatchQueue.main - super.init(serialQueue: self._mainQueue) - } - - /// 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 queue. - public static let asyncInstance = SerialDispatchQueueScheduler(serialQueue: DispatchQueue.main) - - /// In case this method is called on a background thread it will throw an exception. - public class func ensureExecutingOnScheduler(errorMessage: String? = nil) { - if !DispatchQueue.isMain { - rxFatalError(errorMessage ?? "Executing on background thread. Please use `MainScheduler.instance.schedule` to schedule work on main thread.") - } - } - - /// In case this method is running on a background thread it will throw an exception. - public class func ensureRunningOnMainThread(errorMessage: String? = nil) { - #if !os(Linux) // isMainThread is not implemented in Linux Foundation - guard Thread.isMainThread else { - rxFatalError(errorMessage ?? "Running on background thread.") - } - #endif - } - - override func scheduleInternal(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - let previousNumberEnqueued = increment(self.numberEnqueued) - - if DispatchQueue.isMain && previousNumberEnqueued == 0 { - let disposable = action(state) - decrement(self.numberEnqueued) - return disposable - } - - let cancel = SingleAssignmentDisposable() - - self._mainQueue.async { - if !cancel.isDisposed { - _ = action(state) - } - - decrement(self.numberEnqueued) - } - - return cancel - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift deleted file mode 100755 index 81ba59f..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift +++ /dev/null @@ -1,56 +0,0 @@ -// -// OperationQueueScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/4/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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`. -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. - /// - 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 - } - - /** - Schedules an action to be executed recursively. - - - parameter state: State passed to the action to be executed. - - parameter action: Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in recursive invocation state. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - let cancel = SingleAssignmentDisposable() - - let operation = BlockOperation { - if cancel.isDisposed { - return - } - - - cancel.setDisposable(action(state)) - } - - operation.queuePriority = self.queuePriority - - self.operationQueue.addOperation(operation) - - return cancel - } - -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift deleted file mode 100755 index 9e9b4ff..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift +++ /dev/null @@ -1,220 +0,0 @@ -// -// RecursiveScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -private enum ScheduleState { - case initial - case added(CompositeDisposable.DisposeKey) - case done -} - -/// Type erased recursive scheduler. -final class AnyRecursiveScheduler { - - typealias Action = (State, AnyRecursiveScheduler) -> Void - - private let _lock = RecursiveLock() - - // state - private let _group = CompositeDisposable() - - private var _scheduler: SchedulerType - private var _action: Action? - - init(scheduler: SchedulerType, action: @escaping Action) { - self._action = action - self._scheduler = scheduler - } - - /** - Schedules an action to be executed recursively. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the recursive action. - */ - func schedule(_ state: State, dueTime: RxTimeInterval) { - var scheduleState: ScheduleState = .initial - - let d = self._scheduler.scheduleRelative(state, dueTime: dueTime) { state -> Disposable in - // best effort - if self._group.isDisposed { - return Disposables.create() - } - - let action = self._lock.calculateLocked { () -> Action? in - switch scheduleState { - case let .added(removeKey): - self._group.remove(for: removeKey) - case .initial: - break - case .done: - break - } - - scheduleState = .done - - return self._action - } - - if let action = action { - action(state, self) - } - - return Disposables.create() - } - - self._lock.performLocked { - switch scheduleState { - case .added: - rxFatalError("Invalid state") - case .initial: - if let removeKey = self._group.insert(d) { - scheduleState = .added(removeKey) - } - else { - scheduleState = .done - } - case .done: - break - } - } - } - - /// Schedules an action to be executed recursively. - /// - /// - parameter state: State passed to the action to be executed. - func schedule(_ state: State) { - var scheduleState: ScheduleState = .initial - - let d = self._scheduler.schedule(state) { state -> Disposable in - // best effort - if self._group.isDisposed { - return Disposables.create() - } - - let action = self._lock.calculateLocked { () -> Action? in - switch scheduleState { - case let .added(removeKey): - self._group.remove(for: removeKey) - case .initial: - break - case .done: - break - } - - scheduleState = .done - - return self._action - } - - if let action = action { - action(state, self) - } - - return Disposables.create() - } - - self._lock.performLocked { - switch scheduleState { - case .added: - rxFatalError("Invalid state") - case .initial: - if let removeKey = self._group.insert(d) { - scheduleState = .added(removeKey) - } - else { - scheduleState = .done - } - case .done: - break - } - } - } - - func dispose() { - self._lock.performLocked { - self._action = nil - } - self._group.dispose() - } -} - -/// Type erased recursive scheduler. -final class RecursiveImmediateScheduler { - typealias Action = (_ state: State, _ recurse: (State) -> Void) -> Void - - private var _lock = SpinLock() - private let _group = CompositeDisposable() - - private var _action: Action? - private let _scheduler: ImmediateSchedulerType - - init(action: @escaping Action, scheduler: ImmediateSchedulerType) { - self._action = action - self._scheduler = scheduler - } - - // immediate scheduling - - /// Schedules an action to be executed recursively. - /// - /// - parameter state: State passed to the action to be executed. - func schedule(_ state: State) { - var scheduleState: ScheduleState = .initial - - let d = self._scheduler.schedule(state) { state -> Disposable in - // best effort - if self._group.isDisposed { - return Disposables.create() - } - - let action = self._lock.calculateLocked { () -> Action? in - switch scheduleState { - case let .added(removeKey): - self._group.remove(for: removeKey) - case .initial: - break - case .done: - break - } - - scheduleState = .done - - return self._action - } - - if let action = action { - action(state, self.schedule) - } - - return Disposables.create() - } - - self._lock.performLocked { - switch scheduleState { - case .added: - rxFatalError("Invalid state") - case .initial: - if let removeKey = self._group.insert(d) { - scheduleState = .added(removeKey) - } - else { - scheduleState = .done - } - case .done: - break - } - } - } - - func dispose() { - self._lock.performLocked { - self._action = nil - } - self._group.dispose() - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift deleted file mode 100755 index 5b7b840..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// SchedulerServices+Emulation.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/6/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -enum SchedulePeriodicRecursiveCommand { - case tick - case dispatchStart -} - -final class SchedulePeriodicRecursive { - typealias RecursiveAction = (State) -> State - typealias RecursiveScheduler = AnyRecursiveScheduler - - private let _scheduler: SchedulerType - private let _startAfter: RxTimeInterval - private let _period: RxTimeInterval - private let _action: RecursiveAction - - private var _state: State - private let _pendingTickCount = AtomicInt(0) - - init(scheduler: SchedulerType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping RecursiveAction, state: State) { - self._scheduler = scheduler - self._startAfter = startAfter - self._period = period - self._action = action - self._state = state - } - - func start() -> Disposable { - return self._scheduler.scheduleRecursive(SchedulePeriodicRecursiveCommand.tick, dueTime: self._startAfter, action: self.tick) - } - - func tick(_ command: SchedulePeriodicRecursiveCommand, scheduler: RecursiveScheduler) { - // Tries to emulate periodic scheduling as best as possible. - // The problem that could arise is if handling periodic ticks take too long, or - // tick interval is short. - switch command { - case .tick: - scheduler.schedule(.tick, dueTime: self._period) - - // 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 increment(self._pendingTickCount) == 0 { - self.tick(.dispatchStart, scheduler: scheduler) - } - - case .dispatchStart: - self._state = self._action(self._state) - // Start work and schedule check is this last batch of work - if decrement(self._pendingTickCount) > 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 deleted file mode 100755 index 57ae8bd..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift +++ /dev/null @@ -1,132 +0,0 @@ -// -// SerialDispatchQueueScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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 -that even if concurrent dispatch queue is passed, it's transformed into a serial one. - -It is extremely important that this scheduler is serial, because -certain operator perform optimizations that rely on that property. - -Because there is no way of detecting is passed dispatch queue serial or -concurrent, for every queue that is being passed, worst case (concurrent) -will be assumed, and internal serial proxy dispatch queue will be created. - -This scheduler can also be used with internal serial queue alone. - -In case some customization need to be made on it before usage, -internal serial queue can be customized using `serialQueueConfiguration` -callback. -*/ -public class SerialDispatchQueueScheduler : SchedulerType { - public typealias TimeInterval = Foundation.TimeInterval - public typealias Time = Date - - /// - 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)) { - self.configuration = DispatchQueueConfiguration(queue: serialQueue, leeway: leeway) - } - - /** - Constructs new `SerialDispatchQueueScheduler` with internal serial queue named `internalSerialQueueName`. - - Additional dispatch queue properties can be set after dispatch queue is created using `serialQueueConfiguration`. - - - 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: []) - serialQueueConfiguration?(queue) - self.init(serialQueue: queue, leeway: leeway) - } - - /** - Constructs new `SerialDispatchQueueScheduler` named `internalSerialQueueName` that wraps `queue`. - - - 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 - let serialQueue = DispatchQueue(label: internalSerialQueueName, - attributes: [], - target: queue) - self.init(serialQueue: serialQueue, leeway: leeway) - } - - /** - Constructs new `SerialDispatchQueueScheduler` that wraps on of the global concurrent dispatch queues. - - - 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(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 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 final func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.scheduleInternal(state, action: action) - } - - func scheduleInternal(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.configuration.schedule(state, action: action) - } - - /** - Schedules an action to be executed. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public final func scheduleRelative(_ state: StateType, dueTime: RxTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.configuration.scheduleRelative(state, dueTime: dueTime, action: action) - } - - /** - Schedules a periodic piece of work. - - - parameter state: State passed to the action to be executed. - - parameter startAfter: Period after which initial work should be run. - - parameter period: Period for running the work periodically. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func schedulePeriodic(_ state: StateType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - return self.configuration.schedulePeriodic(state, startAfter: startAfter, period: period, action: action) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift deleted file mode 100755 index 7069b00..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift +++ /dev/null @@ -1,97 +0,0 @@ -// -// VirtualTimeConverterType.swift -// 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. -public protocol VirtualTimeConverterType { - /// Virtual time unit used that represents ticks of virtual clock. - associatedtype VirtualTimeUnit - - /// 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 `Date`. - - returns: `Date` corresponding to virtual time. - */ - func convertFromVirtualTime(_ virtualTime: VirtualTimeUnit) -> RxTime - - /** - Converts real time to virtual time. - - - parameter time: `Date` to convert to virtual time. - - returns: Virtual time corresponding to `Date`. - */ - func convertToVirtualTime(_ time: RxTime) -> VirtualTimeUnit - - /** - Converts from virtual time interval to `NSTimeInterval`. - - - parameter virtualTimeInterval: Virtual time interval to convert to `NSTimeInterval`. - - returns: `NSTimeInterval` corresponding to virtual time interval. - */ - func convertFromVirtualTimeInterval(_ virtualTimeInterval: VirtualTimeIntervalUnit) -> TimeInterval - - /** - Converts from `NSTimeInterval` to virtual time interval. - - - parameter timeInterval: `NSTimeInterval` to convert to virtual time interval. - - returns: Virtual time interval corresponding to time interval. - */ - func convertToVirtualTimeInterval(_ timeInterval: TimeInterval) -> VirtualTimeIntervalUnit - - /** - Offsets virtual time by virtual time interval. - - - parameter time: Virtual time. - - parameter offset: Virtual time interval. - - returns: Time corresponding to time offsetted by virtual time interval. - */ - func offsetVirtualTime(_ time: VirtualTimeUnit, offset: VirtualTimeIntervalUnit) -> VirtualTimeUnit - - /** - 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 -} - -/** - Virtual time comparison result. - - 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. - case lessThan - /// lhs == rhs. - case equal - /// lhs > rhs. - case greaterThan -} - -extension VirtualTimeComparison { - /// lhs < rhs. - var lessThen: Bool { - return self == .lessThan - } - - /// lhs > rhs - var greaterThan: Bool { - return self == .greaterThan - } - - /// 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 deleted file mode 100755 index e63cece..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift +++ /dev/null @@ -1,269 +0,0 @@ -// -// VirtualTimeScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Base class for virtual time schedulers using a priority queue for scheduled items. -open class VirtualTimeScheduler - : SchedulerType { - - public typealias VirtualTime = Converter.VirtualTimeUnit - public typealias VirtualTimeInterval = Converter.VirtualTimeIntervalUnit - - private var _running : Bool - - private var _clock: VirtualTime - - fileprivate var _schedulerQueue : PriorityQueue> - private var _converter: Converter - - private var _nextId = 0 - - /// - returns: Current time. - public var now: RxTime { - return self._converter.convertFromVirtualTime(self.clock) - } - - /// - returns: Scheduler's absolute time clock value. - public var clock: VirtualTime { - return self._clock - } - - /// Creates a new virtual time scheduler. - /// - /// - parameter initialClock: Initial value for the clock. - public init(initialClock: VirtualTime, converter: Converter) { - self._clock = initialClock - self._running = false - self._converter = converter - self._schedulerQueue = PriorityQueue(hasHigherPriority: { - switch converter.compareVirtualTime($0.time, $1.time) { - case .lessThan: - return true - case .equal: - return $0.id < $1.id - case .greaterThan: - return false - } - }, isEqual: { $0 === $1 }) - #if TRACE_RESOURCES - _ = Resources.incrementTotal() - #endif - } - - /** - 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 { - return self.scheduleRelative(state, dueTime: .microseconds(0)) { a in - return action(a) - } - } - - /** - Schedules an action to be executed. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func scheduleRelative(_ state: StateType, dueTime: RxTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - let time = self.now.addingDispatchInterval(dueTime) - let absoluteTime = self._converter.convertToVirtualTime(time) - let adjustedTime = self.adjustScheduledTime(absoluteTime) - return self.scheduleAbsoluteVirtual(state, time: adjustedTime, action: action) - } - - /** - Schedules an action to be executed after relative time has passed. - - - parameter state: State passed to the action to be executed. - - parameter time: Absolute time when to execute the action. If this is less or equal then `now`, `now + 1` will be used. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func scheduleRelativeVirtual(_ state: StateType, dueTime: VirtualTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - let time = self._converter.offsetVirtualTime(self.clock, offset: dueTime) - return self.scheduleAbsoluteVirtual(state, time: time, action: action) - } - - /** - Schedules an action to be executed at absolute virtual time. - - - parameter state: State passed to the action to be executed. - - parameter time: Absolute time when to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func scheduleAbsoluteVirtual(_ state: StateType, time: Converter.VirtualTimeUnit, action: @escaping (StateType) -> Disposable) -> Disposable { - MainScheduler.ensureExecutingOnScheduler() - - let compositeDisposable = CompositeDisposable() - - let item = VirtualSchedulerItem(action: { - let dispose = action(state) - return dispose - }, time: time, id: self._nextId) - - self._nextId += 1 - - self._schedulerQueue.enqueue(item) - - _ = compositeDisposable.insert(item) - - return compositeDisposable - } - - /// 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. - public func start() { - MainScheduler.ensureExecutingOnScheduler() - - if self._running { - return - } - - self._running = true - repeat { - guard let next = self.findNext() else { - break - } - - if self._converter.compareVirtualTime(next.time, self.clock).greaterThan { - self._clock = next.time - } - - next.invoke() - self._schedulerQueue.remove(next) - } while self._running - - self._running = false - } - - func findNext() -> VirtualSchedulerItem? { - while let front = self._schedulerQueue.peek() { - if front.isDisposed { - self._schedulerQueue.remove(front) - continue - } - - return front - } - - 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. - public func advanceTo(_ virtualTime: VirtualTime) { - MainScheduler.ensureExecutingOnScheduler() - - if self._running { - fatalError("Scheduler is already running") - } - - self._running = true - repeat { - guard let next = self.findNext() else { - break - } - - if self._converter.compareVirtualTime(next.time, virtualTime).greaterThan { - break - } - - if self._converter.compareVirtualTime(next.time, self.clock).greaterThan { - self._clock = next.time - } - - next.invoke() - self._schedulerQueue.remove(next) - } while self._running - - self._clock = virtualTime - self._running = false - } - - /// Advances the scheduler's clock by the specified relative time. - public func sleep(_ virtualInterval: VirtualTimeInterval) { - MainScheduler.ensureExecutingOnScheduler() - - let sleepTo = self._converter.offsetVirtualTime(self.clock, offset: virtualInterval) - if self._converter.compareVirtualTime(sleepTo, self.clock).lessThen { - fatalError("Can't sleep to past.") - } - - self._clock = sleepTo - } - - /// Stops the virtual time scheduler. - public func stop() { - MainScheduler.ensureExecutingOnScheduler() - - self._running = false - } - - #if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } - #endif -} - -// MARK: description - -extension VirtualTimeScheduler: CustomDebugStringConvertible { - /// A textual representation of `self`, suitable for debugging. - public var debugDescription: String { - return self._schedulerQueue.debugDescription - } -} - -final class VirtualSchedulerItem(_ seed: A, accumulator: @escaping (A, Element) throws -> A) - -> Observable { - return Reduce(source: self.asObservable(), seed: seed, accumulator: accumulator, mapResult: { $0 }) - } -} - -final private class ReduceSink: Sink, ObserverType { - typealias ResultType = Observer.Element - typealias Parent = Reduce - - private let _parent: Parent - private var _accumulation: AccumulateType - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - self._accumulation = parent._seed - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - self._accumulation = try self._parent._accumulator(self._accumulation, value) - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - case .error(let e): - self.forwardOn(.error(e)) - self.dispose() - case .completed: - do { - let result = try self._parent._mapResult(self._accumulation) - self.forwardOn(.next(result)) - self.forwardOn(.completed) - self.dispose() - } - catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - } - } -} - -final private class Reduce: Producer { - typealias AccumulatorType = (AccumulateType, SourceType) throws -> AccumulateType - typealias ResultSelectorType = (AccumulateType) throws -> ResultType - - fileprivate let _source: Observable - fileprivate let _seed: AccumulateType - fileprivate let _accumulator: AccumulatorType - fileprivate let _mapResult: ResultSelectorType - - init(source: Observable, seed: AccumulateType, accumulator: @escaping AccumulatorType, mapResult: @escaping ResultSelectorType) { - self._source = source - self._seed = seed - self._accumulator = accumulator - self._mapResult = mapResult - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == ResultType { - let sink = ReduceSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} - diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Repeat 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/Repeat.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Observables/Repeat 2.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Repeat.swift diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Sample 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/Sample 2.swift deleted file mode 100644 index 4fab683..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Sample 2.swift +++ /dev/null @@ -1,133 +0,0 @@ -// -// Sample.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/1/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. - */ - public func sample(_ sampler: Source) - -> Observable { - return Sample(source: self.asObservable(), sampler: sampler.asObservable()) - } -} - -final private class SamplerSink - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = SampleType - - typealias Parent = SampleSequenceSink - - fileprivate let _parent: Parent - - var _lock: RecursiveLock { - return self._parent._lock - } - - init(parent: Parent) { - self._parent = parent - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next, .completed: - if let element = _parent._element { - self._parent._element = nil - self._parent.forwardOn(.next(element)) - } - - if self._parent._atEnd { - self._parent.forwardOn(.completed) - self._parent.dispose() - } - case .error(let e): - self._parent.forwardOn(.error(e)) - self._parent.dispose() - } - } -} - -final private class SampleSequenceSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = Observer.Element - typealias Parent = Sample - - fileprivate let _parent: Parent - - let _lock = RecursiveLock() - - // state - fileprivate var _element = nil as Element? - fileprivate var _atEnd = false - - fileprivate let _sourceSubscription = SingleAssignmentDisposable() - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - self._sourceSubscription.setDisposable(self._parent._source.subscribe(self)) - let samplerSubscription = self._parent._sampler.subscribe(SamplerSink(parent: self)) - - return Disposables.create(_sourceSubscription, samplerSubscription) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): - self._element = element - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - self._atEnd = true - self._sourceSubscription.dispose() - } - } - -} - -final private class Sample: Producer { - fileprivate let _source: Observable - fileprivate let _sampler: Observable - - init(source: Observable, sampler: Observable) { - self._source = source - self._sampler = sampler - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = SampleSequenceSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Scan 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/Scan 2.swift deleted file mode 100644 index 7920ae9..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Scan 2.swift +++ /dev/null @@ -1,100 +0,0 @@ -// -// 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, Element) throws -> Void) - -> 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, Element) throws -> A) - -> Observable { - return Scan(source: self.asObservable(), seed: seed) { acc, element in - let currentAcc = acc - acc = try accumulator(currentAcc, element) - } - } -} - -final private class ScanSink: Sink, ObserverType { - typealias Accumulate = Observer.Element - typealias Parent = Scan - - fileprivate let _parent: Parent - fileprivate var _accumulate: Accumulate - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - self._accumulate = parent._seed - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let element): - do { - try self._parent._accumulator(&self._accumulate, element) - self.forwardOn(.next(self._accumulate)) - } - catch let error { - self.forwardOn(.error(error)) - self.dispose() - } - case .error(let error): - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self.forwardOn(.completed) - self.dispose() - } - } - -} - -final private class Scan: Producer { - typealias Accumulator = (inout Accumulate, Element) throws -> Void - - fileprivate let _source: Observable - fileprivate let _seed: Accumulate - fileprivate let _accumulator: Accumulator - - init(source: Observable, seed: Accumulate, accumulator: @escaping Accumulator) { - self._source = source - self._seed = seed - self._accumulator = accumulator - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Accumulate { - let sink = ScanSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Sequence 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/Sequence.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Observables/Sequence 2.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Sequence.swift diff --git a/Example/Pods/RxSwift/RxSwift/Observables/ShareReplayScope 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/ShareReplayScope 2.swift deleted file mode 100644 index 9565a49..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/ShareReplayScope 2.swift +++ /dev/null @@ -1,456 +0,0 @@ -// -// 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 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) { - self._parent = parent - self._lock = lock - - #if TRACE_RESOURCES - _ = Resources.incrementTotal() - #endif - } - - final func on(_ event: Event) { - self._lock.lock() - let observers = self._synchronized_on(event) - self._lock.unlock() - dispatch(observers, event) - } - - final private func _synchronized_on(_ event: Event) -> Observers { - if self._disposed { - return Observers() - } - - switch event { - case .next(let element): - self._element = element - return self._observers - case .error, .completed: - let observers = self._observers - self._synchronized_dispose() - return observers - } - } - - final func connect() { - self._subscription.setDisposable(self._parent._source.subscribe(self)) - } - - final func _synchronized_subscribe(_ observer: Observer) -> Disposable where Observer.Element == Element { - self._lock.lock(); defer { self._lock.unlock() } - if let element = self._element { - observer.on(.next(element)) - } - - let disposeKey = self._observers.insert(observer.on) - - return SubscriptionDisposable(owner: self, key: disposeKey) - } - - final private func _synchronized_dispose() { - self._disposed = true - if self._parent._connection === self { - self._parent._connection = nil - } - self._observers = Observers() - } - - final func synchronizedUnsubscribe(_ disposeKey: DisposeKey) { - self._lock.lock() - let shouldDisconnect = self._synchronized_unsubscribe(disposeKey) - self._lock.unlock() - if shouldDisconnect { - self._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 self._observers.count == 0 { - self._synchronized_dispose() - return true - } - - return false - } - - #if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } - #endif -} - -// optimized version of share replay for most common case -final private 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: Observer) -> Disposable where Observer.Element == Element { - self._lock.lock() - - let connection = self._synchronized_subscribe(observer) - let count = connection._observers.count - - let disposable = connection._synchronized_subscribe(observer) - - self._lock.unlock() - - if count == 0 { - connection.connect() - } - - return disposable - } - - @inline(__always) - private func _synchronized_subscribe(_ observer: Observer) -> Connection where Observer.Element == Element { - let connection: Connection - - if let existingConnection = self._connection { - connection = existingConnection - } - else { - connection = ShareReplay1WhileConnectedConnection( - parent: self, - lock: self._lock) - self._connection = connection - } - - return connection - } -} - -fileprivate final class ShareWhileConnectedConnection - : ObserverType - , SynchronizedUnsubscribeType { - 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) { - self._parent = parent - self._lock = lock - - #if TRACE_RESOURCES - _ = Resources.incrementTotal() - #endif - } - - final func on(_ event: Event) { - self._lock.lock() - let observers = self._synchronized_on(event) - self._lock.unlock() - dispatch(observers, event) - } - - final private func _synchronized_on(_ event: Event) -> Observers { - if self._disposed { - return Observers() - } - - switch event { - case .next: - return self._observers - case .error, .completed: - let observers = self._observers - self._synchronized_dispose() - return observers - } - } - - final func connect() { - self._subscription.setDisposable(self._parent._source.subscribe(self)) - } - - final func _synchronized_subscribe(_ observer: Observer) -> Disposable where Observer.Element == Element { - self._lock.lock(); defer { self._lock.unlock() } - - let disposeKey = self._observers.insert(observer.on) - - return SubscriptionDisposable(owner: self, key: disposeKey) - } - - final private func _synchronized_dispose() { - self._disposed = true - if self._parent._connection === self { - self._parent._connection = nil - } - self._observers = Observers() - } - - final func synchronizedUnsubscribe(_ disposeKey: DisposeKey) { - self._lock.lock() - let shouldDisconnect = self._synchronized_unsubscribe(disposeKey) - self._lock.unlock() - if shouldDisconnect { - self._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 self._observers.count == 0 { - self._synchronized_dispose() - return true - } - - return false - } - - #if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } - #endif -} - -// optimized version of share replay for most common case -final private 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: Observer) -> Disposable where Observer.Element == Element { - self._lock.lock() - - let connection = self._synchronized_subscribe(observer) - let count = connection._observers.count - - let disposable = connection._synchronized_subscribe(observer) - - self._lock.unlock() - - if count == 0 { - connection.connect() - } - - return disposable - } - - @inline(__always) - private func _synchronized_subscribe(_ observer: Observer) -> Connection where Observer.Element == Element { - let connection: Connection - - if let existingConnection = self._connection { - connection = existingConnection - } - else { - connection = ShareWhileConnectedConnection( - parent: self, - lock: self._lock) - self._connection = connection - } - - return connection - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/SingleAsync 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/SingleAsync 2.swift deleted file mode 100644 index e50a9be..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/SingleAsync 2.swift +++ /dev/null @@ -1,104 +0,0 @@ -// -// SingleAsync.swift -// RxSwift -// -// Created by Junior B. on 09/11/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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 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: self.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 (Element) throws -> Bool) - -> Observable { - return SingleAsync(source: self.asObservable(), predicate: predicate) - } -} - -fileprivate final class SingleAsyncSink : Sink, ObserverType { - typealias Element = Observer.Element - typealias Parent = SingleAsync - - private let _parent: Parent - private var _seenValue: Bool = false - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - let forward = try self._parent._predicate?(value) ?? true - if !forward { - return - } - } - catch let error { - self.forwardOn(.error(error as Swift.Error)) - self.dispose() - return - } - - if self._seenValue { - self.forwardOn(.error(RxError.moreThanOneElement)) - self.dispose() - return - } - - self._seenValue = true - self.forwardOn(.next(value)) - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - if self._seenValue { - self.forwardOn(.completed) - } else { - self.forwardOn(.error(RxError.noElements)) - } - self.dispose() - } - } -} - -final class SingleAsync: Producer { - typealias Predicate = (Element) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate? - - init(source: Observable, predicate: Predicate? = nil) { - self._source = source - self._predicate = predicate - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = SingleAsyncSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Sink 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/Sink 2.swift deleted file mode 100644 index 1305d1b..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Sink 2.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// Sink.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/19/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -class Sink : Disposable { - fileprivate let _observer: Observer - fileprivate let _cancel: Cancelable - fileprivate let _disposed = AtomicInt(0) - - #if DEBUG - fileprivate let _synchronizationTracker = SynchronizationTracker() - #endif - - init(observer: Observer, cancel: Cancelable) { -#if TRACE_RESOURCES - _ = Resources.incrementTotal() -#endif - self._observer = observer - self._cancel = cancel - } - - final func forwardOn(_ event: Event) { - #if DEBUG - self._synchronizationTracker.register(synchronizationErrorMessage: .default) - defer { self._synchronizationTracker.unregister() } - #endif - if isFlagSet(self._disposed, 1) { - return - } - self._observer.on(event) - } - - final func forwarder() -> SinkForward { - return SinkForward(forward: self) - } - - final var disposed: Bool { - return isFlagSet(self._disposed, 1) - } - - func dispose() { - fetchOr(self._disposed, 1) - self._cancel.dispose() - } - - deinit { -#if TRACE_RESOURCES - _ = Resources.decrementTotal() -#endif - } -} - -final class SinkForward: ObserverType { - typealias Element = Observer.Element - - private let _forward: Sink - - init(forward: Sink) { - self._forward = forward - } - - final func on(_ event: Event) { - switch event { - case .next: - self._forward._observer.on(event) - case .error, .completed: - self._forward._observer.on(event) - self._forward._cancel.dispose() - } - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Skip 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/Skip.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Observables/Skip 2.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Skip.swift diff --git a/Example/Pods/RxSwift/RxSwift/Observables/SkipUntil 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/SkipUntil 2.swift deleted file mode 100644 index 056d795..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/SkipUntil 2.swift +++ /dev/null @@ -1,139 +0,0 @@ -// -// SkipUntil.swift -// RxSwift -// -// Created by Yury Korolev on 10/3/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. - */ - public func skipUntil(_ other: Source) - -> Observable { - return SkipUntil(source: self.asObservable(), other: other.asObservable()) - } -} - -final private class SkipUntilSinkOther - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Parent = SkipUntilSink - typealias Element = Other - - fileprivate let _parent: Parent - - var _lock: RecursiveLock { - return self._parent._lock - } - - let _subscription = SingleAssignmentDisposable() - - init(parent: Parent) { - self._parent = parent - #if TRACE_RESOURCES - _ = Resources.incrementTotal() - #endif - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - self._parent._forwardElements = true - self._subscription.dispose() - case .error(let e): - self._parent.forwardOn(.error(e)) - self._parent.dispose() - case .completed: - self._subscription.dispose() - } - } - - #if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } - #endif - -} - - -final private class SkipUntilSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = Observer.Element - typealias Parent = SkipUntil - - let _lock = RecursiveLock() - fileprivate let _parent: Parent - fileprivate var _forwardElements = false - - fileprivate let _sourceSubscription = SingleAssignmentDisposable() - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - if self._forwardElements { - self.forwardOn(event) - } - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - if self._forwardElements { - self.forwardOn(event) - } - self.dispose() - } - } - - func run() -> Disposable { - let sourceSubscription = self._parent._source.subscribe(self) - let otherObserver = SkipUntilSinkOther(parent: self) - let otherSubscription = self._parent._other.subscribe(otherObserver) - self._sourceSubscription.setDisposable(sourceSubscription) - otherObserver._subscription.setDisposable(otherSubscription) - - return Disposables.create(_sourceSubscription, otherObserver._subscription) - } -} - -final private class SkipUntil: Producer { - - fileprivate let _source: Observable - fileprivate let _other: Observable - - init(source: Observable, other: Observable) { - self._source = source - self._other = other - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = SkipUntilSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/SkipWhile 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/SkipWhile 2.swift deleted file mode 100644 index db9f5a6..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/SkipWhile 2.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// 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 (Element) throws -> Bool) -> Observable { - return SkipWhile(source: self.asObservable(), predicate: predicate) - } -} - -final private class SkipWhileSink: Sink, ObserverType { - typealias Element = Observer.Element - typealias Parent = SkipWhile - - fileprivate let _parent: Parent - fileprivate var _running = false - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if !self._running { - do { - self._running = try !self._parent._predicate(value) - } catch let e { - self.forwardOn(.error(e)) - self.dispose() - return - } - } - - if self._running { - self.forwardOn(.next(value)) - } - case .error, .completed: - self.forwardOn(event) - self.dispose() - } - } -} - -final private class SkipWhile: Producer { - typealias Predicate = (Element) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate - - init(source: Observable, predicate: @escaping Predicate) { - self._source = source - self._predicate = predicate - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = SkipWhileSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/StartWith 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/StartWith.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Observables/StartWith 2.swift rename to Example/Pods/RxSwift/RxSwift/Observables/StartWith.swift diff --git a/Example/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift b/Example/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift new file mode 100644 index 0000000..5f7be0b --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/Observables/SubscribeOn.swift @@ -0,0 +1,83 @@ +// +// SubscribeOn.swift +// RxSwift +// +// Created by Krunoslav Zaher on 6/14/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +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. + */ + public func subscribeOn(_ scheduler: ImmediateSchedulerType) + -> Observable { + return SubscribeOn(source: self, scheduler: scheduler) + } +} + +final private class SubscribeOnSink: Sink, ObserverType where Ob.Element == Observer.Element { + typealias Element = Observer.Element + typealias Parent = SubscribeOn + + let parent: Parent + + init(parent: Parent, observer: Observer, cancel: Cancelable) { + self.parent = parent + super.init(observer: observer, cancel: cancel) + } + + func on(_ event: Event) { + self.forwardOn(event) + + if event.isStopEvent { + self.dispose() + } + } + + func run() -> Disposable { + let disposeEverything = SerialDisposable() + let cancelSchedule = SingleAssignmentDisposable() + + disposeEverything.disposable = cancelSchedule + + let disposeSchedule = self.parent.scheduler.schedule(()) { _ -> Disposable in + let subscription = self.parent.source.subscribe(self) + disposeEverything.disposable = ScheduledDisposable(scheduler: self.parent.scheduler, disposable: subscription) + return Disposables.create() + } + + cancelSchedule.setDisposable(disposeSchedule) + + return disposeEverything + } +} + +final private class SubscribeOn: Producer { + let source: Ob + let scheduler: ImmediateSchedulerType + + init(source: Ob, scheduler: ImmediateSchedulerType) { + self.source = source + self.scheduler = scheduler + } + + override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Ob.Element { + let sink = SubscribeOnSink(parent: self, observer: observer, cancel: cancel) + let subscription = sink.run() + return (sink: sink, subscription: subscription) + } +} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Switch 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/Switch 2.swift deleted file mode 100644 index ac12f2f..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Switch 2.swift +++ /dev/null @@ -1,234 +0,0 @@ -// -// Switch.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. - */ - public func flatMapLatest(_ selector: @escaping (Element) throws -> Source) - -> Observable { - return FlatMapLatest(source: self.asObservable(), selector: selector) - } -} - -extension ObservableType where Element : 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: self.asObservable()) - } -} - -private class SwitchSink - : Sink - , ObserverType where Source.Element == Observer.Element { - typealias Element = SourceType - - fileprivate let _subscriptions: SingleAssignmentDisposable = SingleAssignmentDisposable() - fileprivate let _innerSubscription: SerialDisposable = SerialDisposable() - - let _lock = RecursiveLock() - - // state - fileprivate var _stopped = false - fileprivate var _latest = 0 - fileprivate var _hasLatest = false - - override init(observer: Observer, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func run(_ source: Observable) -> Disposable { - let subscription = source.subscribe(self) - self._subscriptions.setDisposable(subscription) - return Disposables.create(_subscriptions, _innerSubscription) - } - - func performMap(_ element: SourceType) throws -> Source { - rxAbstractMethod() - } - - @inline(__always) - final private func nextElementArrived(element: Element) -> (Int, Observable)? { - self._lock.lock(); defer { self._lock.unlock() } // { - do { - let observable = try self.performMap(element).asObservable() - self._hasLatest = true - self._latest = self._latest &+ 1 - return (self._latest, observable) - } - catch let error { - self.forwardOn(.error(error)) - self.dispose() - } - - return nil - // } - } - - func on(_ event: Event) { - switch event { - case .next(let element): - if let (latest, observable) = self.nextElementArrived(element: element) { - let d = SingleAssignmentDisposable() - self._innerSubscription.disposable = d - - let observer = SwitchSinkIter(parent: self, id: latest, _self: d) - let disposable = observable.subscribe(observer) - d.setDisposable(disposable) - } - case .error(let error): - self._lock.lock(); defer { self._lock.unlock() } - self.forwardOn(.error(error)) - self.dispose() - case .completed: - self._lock.lock(); defer { self._lock.unlock() } - self._stopped = true - - self._subscriptions.dispose() - - if !self._hasLatest { - self.forwardOn(.completed) - self.dispose() - } - } - } -} - -final private class SwitchSinkIter - : ObserverType - , LockOwnerType - , SynchronizedOnType where Source.Element == Observer.Element { - typealias Element = Source.Element - typealias Parent = SwitchSink - - fileprivate let _parent: Parent - fileprivate let _id: Int - fileprivate let _self: Disposable - - var _lock: RecursiveLock { - return self._parent._lock - } - - init(parent: Parent, id: Int, _self: Disposable) { - self._parent = parent - self._id = id - self._self = _self - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: break - case .error, .completed: - self._self.dispose() - } - - if self._parent._latest != self._id { - return - } - - switch event { - case .next: - self._parent.forwardOn(event) - case .error: - self._parent.forwardOn(event) - self._parent.dispose() - case .completed: - self._parent._hasLatest = false - if self._parent._stopped { - self._parent.forwardOn(event) - self._parent.dispose() - } - } - } -} - -// MARK: Specializations - -final private class SwitchIdentitySink: SwitchSink - where Observer.Element == Source.Element { - override init(observer: Observer, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: Source) throws -> Source { - return element - } -} - -final private class MapSwitchSink: SwitchSink where Observer.Element == Source.Element { - typealias Selector = (SourceType) throws -> Source - - fileprivate let _selector: Selector - - init(selector: @escaping Selector, observer: Observer, cancel: Cancelable) { - self._selector = selector - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceType) throws -> Source { - return try self._selector(element) - } -} - -// MARK: Producers - -final private class Switch: Producer { - fileprivate let _source: Observable - - init(source: Observable) { - self._source = source - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Source.Element { - let sink = SwitchIdentitySink(observer: observer, cancel: cancel) - let subscription = sink.run(self._source) - return (sink: sink, subscription: subscription) - } -} - -final private class FlatMapLatest: Producer { - typealias Selector = (SourceType) throws -> Source - - fileprivate let _source: Observable - fileprivate let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - self._source = source - self._selector = selector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Source.Element { - let sink = MapSwitchSink(selector: self._selector, observer: observer, cancel: cancel) - let subscription = sink.run(self._source) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty 2.swift rename to Example/Pods/RxSwift/RxSwift/Observables/SwitchIfEmpty.swift diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Take 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/Take 2.swift deleted file mode 100644 index 95b0b60..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/Take 2.swift +++ /dev/null @@ -1,179 +0,0 @@ -// -// Take.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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: self.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 - -final private class TakeCountSink: Sink, ObserverType { - typealias Element = Observer.Element - typealias Parent = TakeCount - - private let _parent: Parent - - private var _remaining: Int - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - self._remaining = parent._count - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - - if self._remaining > 0 { - self._remaining -= 1 - - self.forwardOn(.next(value)) - - if self._remaining == 0 { - self.forwardOn(.completed) - self.dispose() - } - } - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - self.forwardOn(event) - self.dispose() - } - } - -} - -final private class TakeCount: Producer { - fileprivate let _source: Observable - fileprivate let _count: Int - - init(source: Observable, count: Int) { - if count < 0 { - rxFatalError("count can't be negative") - } - self._source = source - self._count = count - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = TakeCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} - -// time version - -final private class TakeTimeSink - : Sink - , LockOwnerType - , ObserverType - , SynchronizedOnType where Observer.Element == Element { - typealias Parent = TakeTime - - fileprivate let _parent: Parent - - let _lock = RecursiveLock() - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let value): - self.forwardOn(.next(value)) - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - self.forwardOn(event) - self.dispose() - } - } - - func tick() { - self._lock.lock(); defer { self._lock.unlock() } - - self.forwardOn(.completed) - self.dispose() - } - - func run() -> Disposable { - let disposeTimer = self._parent._scheduler.scheduleRelative((), dueTime: self._parent._duration) { _ in - self.tick() - return Disposables.create() - } - - let disposeSubscription = self._parent._source.subscribe(self) - - return Disposables.create(disposeTimer, disposeSubscription) - } -} - -final private class TakeTime: Producer { - typealias TimeInterval = RxTimeInterval - - fileprivate let _source: Observable - fileprivate let _duration: TimeInterval - fileprivate let _scheduler: SchedulerType - - init(source: Observable, duration: TimeInterval, scheduler: SchedulerType) { - self._source = source - self._scheduler = scheduler - self._duration = duration - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = TakeTimeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/TakeLast 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/TakeLast 2.swift deleted file mode 100644 index 5a5d684..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/TakeLast 2.swift +++ /dev/null @@ -1,78 +0,0 @@ -// -// TakeLast.swift -// RxSwift -// -// Created by Tomi Koskinen on 25/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. - */ - public func takeLast(_ count: Int) - -> Observable { - return TakeLast(source: self.asObservable(), count: count) - } -} - -final private class TakeLastSink: Sink, ObserverType { - typealias Element = Observer.Element - typealias Parent = TakeLast - - private let _parent: Parent - - private var _elements: Queue - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - self._elements = Queue(capacity: parent._count + 1) - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - self._elements.enqueue(value) - if self._elements.count > self._parent._count { - _ = self._elements.dequeue() - } - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - for e in self._elements { - self.forwardOn(.next(e)) - } - self.forwardOn(.completed) - self.dispose() - } - } -} - -final private class TakeLast: Producer { - fileprivate let _source: Observable - fileprivate let _count: Int - - init(source: Observable, count: Int) { - if count < 0 { - rxFatalError("count can't be negative") - } - self._source = source - self._count = count - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = TakeLastSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/TakeUntil 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/TakeUntil 2.swift deleted file mode 100644 index f6490d4..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/TakeUntil 2.swift +++ /dev/null @@ -1,227 +0,0 @@ -// -// TakeUntil.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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. - */ - public func takeUntil(_ other: Source) - -> Observable { - return TakeUntil(source: self.asObservable(), other: other.asObservable()) - } - - /** - Returns elements from an observable sequence until the specified condition is true. - - - seealso: [takeUntil operator on reactivex.io](http://reactivex.io/documentation/operators/takeuntil.html) - - - parameter behavior: Whether or not to include the last element matching the predicate. - - 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 passes. - */ - public func takeUntil(_ behavior: TakeUntilBehavior, - predicate: @escaping (Element) throws -> Bool) - -> Observable { - return TakeUntilPredicate(source: self.asObservable(), - behavior: behavior, - predicate: predicate) - } -} - -/// Behaviors for the `takeUntil(_ behavior:predicate:)` operator. -public enum TakeUntilBehavior { - /// Include the last element matching the predicate. - case inclusive - - /// Exclude the last element matching the predicate. - case exclusive -} - -// MARK: - TakeUntil Observable -final private class TakeUntilSinkOther - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Parent = TakeUntilSink - typealias Element = Other - - fileprivate let _parent: Parent - - var _lock: RecursiveLock { - return self._parent._lock - } - - fileprivate let _subscription = SingleAssignmentDisposable() - - init(parent: Parent) { - self._parent = parent -#if TRACE_RESOURCES - _ = Resources.incrementTotal() -#endif - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - self._parent.forwardOn(.completed) - self._parent.dispose() - case .error(let e): - self._parent.forwardOn(.error(e)) - self._parent.dispose() - case .completed: - self._subscription.dispose() - } - } - -#if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } -#endif -} - -final private class TakeUntilSink - : Sink - , LockOwnerType - , ObserverType - , SynchronizedOnType { - typealias Element = Observer.Element - typealias Parent = TakeUntil - - fileprivate let _parent: Parent - - let _lock = RecursiveLock() - - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - self.forwardOn(event) - case .error: - self.forwardOn(event) - self.dispose() - case .completed: - self.forwardOn(event) - self.dispose() - } - } - - func run() -> Disposable { - let otherObserver = TakeUntilSinkOther(parent: self) - let otherSubscription = self._parent._other.subscribe(otherObserver) - otherObserver._subscription.setDisposable(otherSubscription) - let sourceSubscription = self._parent._source.subscribe(self) - - return Disposables.create(sourceSubscription, otherObserver._subscription) - } -} - -final private class TakeUntil: Producer { - - fileprivate let _source: Observable - fileprivate let _other: Observable - - init(source: Observable, other: Observable) { - self._source = source - self._other = other - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = TakeUntilSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -// MARK: - TakeUntil Predicate -final private class TakeUntilPredicateSink - : Sink, ObserverType { - typealias Element = Observer.Element - typealias Parent = TakeUntilPredicate - - fileprivate let _parent: Parent - fileprivate var _running = true - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if !self._running { - return - } - - do { - self._running = try !self._parent._predicate(value) - } catch let e { - self.forwardOn(.error(e)) - self.dispose() - return - } - - if self._running { - self.forwardOn(.next(value)) - } else { - if self._parent._behavior == .inclusive { - self.forwardOn(.next(value)) - } - - self.forwardOn(.completed) - self.dispose() - } - case .error, .completed: - self.forwardOn(event) - self.dispose() - } - } - -} - -final private class TakeUntilPredicate: Producer { - typealias Predicate = (Element) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate - fileprivate let _behavior: TakeUntilBehavior - - init(source: Observable, - behavior: TakeUntilBehavior, - predicate: @escaping Predicate) { - self._source = source - self._behavior = behavior - self._predicate = predicate - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = TakeUntilPredicateSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/TakeWhile 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/TakeWhile 2.swift deleted file mode 100644 index efd5311..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/TakeWhile 2.swift +++ /dev/null @@ -1,85 +0,0 @@ -// -// 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 (Element) throws -> Bool) - -> Observable { - return TakeWhile(source: self.asObservable(), predicate: predicate) - } -} - -final private class TakeWhileSink - : Sink - , ObserverType { - typealias Element = Observer.Element - typealias Parent = TakeWhile - - fileprivate let _parent: Parent - - fileprivate var _running = true - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if !self._running { - return - } - - do { - self._running = try self._parent._predicate(value) - } catch let e { - self.forwardOn(.error(e)) - self.dispose() - return - } - - if self._running { - self.forwardOn(.next(value)) - } else { - self.forwardOn(.completed) - self.dispose() - } - case .error, .completed: - self.forwardOn(event) - self.dispose() - } - } - -} - -final private class TakeWhile: Producer { - typealias Predicate = (Element) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate - - init(source: Observable, predicate: @escaping Predicate) { - self._source = source - self._predicate = predicate - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { - let sink = TakeWhileSink(parent: self, observer: observer, cancel: cancel) - let subscription = self._source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Throttle 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/Throttle.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Observables/Throttle 2.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Throttle.swift diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Timeout 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/Timeout.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Observables/Timeout 2.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Timeout.swift diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Timer 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/Timer.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Observables/Timer 2.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Timer.swift diff --git a/Example/Pods/RxSwift/RxSwift/Observables/ToArray 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/ToArray.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Observables/ToArray 2.swift rename to Example/Pods/RxSwift/RxSwift/Observables/ToArray.swift diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Using 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/Using.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Observables/Using 2.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Using.swift diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Window 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/Window.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Observables/Window 2.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Window.swift diff --git a/Example/Pods/RxSwift/RxSwift/Observables/WithLatestFrom 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/WithLatestFrom 2.swift deleted file mode 100644 index b471f29..0000000 --- a/Example/Pods/RxSwift/RxSwift/Observables/WithLatestFrom 2.swift +++ /dev/null @@ -1,149 +0,0 @@ -// -// WithLatestFrom.swift -// RxSwift -// -// Created by Yury Korolev on 10/19/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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: Source, resultSelector: @escaping (Element, Source.Element) throws -> ResultType) -> Observable { - return WithLatestFrom(first: self.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: Source) -> Observable { - return WithLatestFrom(first: self.asObservable(), second: second.asObservable(), resultSelector: { $1 }) - } -} - -final private class WithLatestFromSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias ResultType = Observer.Element - typealias Parent = WithLatestFrom - typealias Element = FirstType - - fileprivate let _parent: Parent - - var _lock = RecursiveLock() - fileprivate var _latest: SecondType? - - init(parent: Parent, observer: Observer, cancel: Cancelable) { - self._parent = parent - - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let sndSubscription = SingleAssignmentDisposable() - let sndO = WithLatestFromSecond(parent: self, disposable: sndSubscription) - - sndSubscription.setDisposable(self._parent._second.subscribe(sndO)) - let fstSubscription = self._parent._first.subscribe(self) - - return Disposables.create(fstSubscription, sndSubscription) - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case let .next(value): - guard let latest = self._latest else { return } - do { - let res = try self._parent._resultSelector(value, latest) - - self.forwardOn(.next(res)) - } catch let e { - self.forwardOn(.error(e)) - self.dispose() - } - case .completed: - self.forwardOn(.completed) - self.dispose() - case let .error(error): - self.forwardOn(.error(error)) - self.dispose() - } - } -} - -final private class WithLatestFromSecond - : ObserverType - , LockOwnerType - , SynchronizedOnType { - - typealias ResultType = Observer.Element - typealias Parent = WithLatestFromSink - typealias Element = SecondType - - private let _parent: Parent - private let _disposable: Disposable - - var _lock: RecursiveLock { - return self._parent._lock - } - - init(parent: Parent, disposable: Disposable) { - self._parent = parent - self._disposable = disposable - } - - func on(_ event: Event) { - self.synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case let .next(value): - self._parent._latest = value - case .completed: - self._disposable.dispose() - case let .error(error): - self._parent.forwardOn(.error(error)) - self._parent.dispose() - } - } -} - -final private class WithLatestFrom: Producer { - typealias ResultSelector = (FirstType, SecondType) throws -> ResultType - - fileprivate let _first: Observable - fileprivate let _second: Observable - fileprivate let _resultSelector: ResultSelector - - init(first: Observable, second: Observable, resultSelector: @escaping ResultSelector) { - self._first = first - self._second = second - self._resultSelector = resultSelector - } - - override func run(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == ResultType { - let sink = WithLatestFromSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Zip+Collection 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Observables/Zip+Collection 2.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Zip+Collection.swift diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Zip+arity 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Observables/Zip+arity 2.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Zip+arity.swift diff --git a/Example/Pods/RxSwift/RxSwift/Observables/Zip 2.swift b/Example/Pods/RxSwift/RxSwift/Observables/Zip.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Observables/Zip 2.swift rename to Example/Pods/RxSwift/RxSwift/Observables/Zip.swift diff --git a/Example/Pods/RxSwift/RxSwift/ObserverType 2.swift b/Example/Pods/RxSwift/RxSwift/ObserverType 2.swift deleted file mode 100644 index e3db94a..0000000 --- a/Example/Pods/RxSwift/RxSwift/ObserverType 2.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// ObserverType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Supports push-style iteration over an observable sequence. -public protocol ObserverType { - /// The type of elements in sequence that observer can observe. - associatedtype Element - - @available(*, deprecated, message: "Use `Element` instead.") - typealias E = Element - - /// Notify observer about sequence event. - /// - /// - parameter event: Event that occurred. - func on(_ event: Event) -} - -/// Convenience API extensions to provide alternate next, error, completed events -extension ObserverType { - - /// Convenience method equivalent to `on(.next(element: Element))` - /// - /// - parameter element: Next element to send to observer(s) - public func onNext(_ element: Element) { - self.on(.next(element)) - } - - /// Convenience method equivalent to `on(.completed)` - public func onCompleted() { - self.on(.completed) - } - - /// Convenience method equivalent to `on(.error(Swift.Error))` - /// - parameter error: Swift.Error to send to observer(s) - public func onError(_ error: Swift.Error) { - self.on(.error(error)) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Observers/AnonymousObserver 2.swift b/Example/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Observers/AnonymousObserver 2.swift rename to Example/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift diff --git a/Example/Pods/RxSwift/RxSwift/Observers/ObserverBase 2.swift b/Example/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Observers/ObserverBase 2.swift rename to Example/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift diff --git a/Example/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink 2.swift b/Example/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink 2.swift rename to Example/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift diff --git a/Example/Pods/RxSwift/RxSwift/Reactive 2.swift b/Example/Pods/RxSwift/RxSwift/Reactive 2.swift deleted file mode 100644 index 8fdfa18..0000000 --- a/Example/Pods/RxSwift/RxSwift/Reactive 2.swift +++ /dev/null @@ -1,77 +0,0 @@ -// -// Reactive.swift -// RxSwift -// -// Created by Yury Korolev on 5/2/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -/** - Use `Reactive` proxy as customization point for constrained protocol extensions. - - General pattern would be: - - // 1. Extend Reactive protocol with constrain on Base - // Read as: Reactive Extension where Base is a SomeType - extension Reactive where Base: SomeType { - // 2. Put any specific reactive extension for SomeType here - } - - With this approach we can have more specialized methods and properties using - `Base` and not just specialized on common base type. - - */ - -public struct Reactive { - /// Base object to extend. - public let base: Base - - /// Creates extensions with base object. - /// - /// - parameter base: Base object. - public init(_ base: Base) { - self.base = base - } -} - -/// A type that has reactive extensions. -public protocol ReactiveCompatible { - /// Extended type - associatedtype ReactiveBase - - @available(*, deprecated, message: "Use `ReactiveBase` instead.") - typealias CompatibleType = ReactiveBase - - /// Reactive extensions. - static var rx: Reactive.Type { get set } - - /// Reactive extensions. - var rx: Reactive { get set } -} - -extension ReactiveCompatible { - /// Reactive extensions. - public static var rx: Reactive.Type { - get { - return Reactive.self - } - set { - // this enables using Reactive to "mutate" base type - } - } - - /// Reactive extensions. - public var rx: Reactive { - get { - return Reactive(self) - } - set { - // this enables using Reactive to "mutate" base object - } - } -} - -import class Foundation.NSObject - -/// Extend NSObject with `rx` proxy. -extension NSObject: ReactiveCompatible { } diff --git a/Example/Pods/RxSwift/RxSwift/Rx 2.swift b/Example/Pods/RxSwift/RxSwift/Rx 2.swift deleted file mode 100644 index a547a8f..0000000 --- a/Example/Pods/RxSwift/RxSwift/Rx 2.swift +++ /dev/null @@ -1,141 +0,0 @@ -// -// Rx.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -#if TRACE_RESOURCES - fileprivate let 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 load(resourceCount) - } - - /// Increments `Resources.total` resource count. - /// - /// - returns: New resource count - public static func incrementTotal() -> Int32 { - return increment(resourceCount) - } - - /// Decrements `Resources.total` resource count - /// - /// - returns: New resource count - public static func decrementTotal() -> Int32 { - return decrement(resourceCount) - } - } -#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 rxAbstractMethod(file: StaticString = #file, line: UInt = #line) -> Swift.Never { - rxFatalError("Abstract method", file: file, line: line) -} - -func rxFatalError(_ lastMessage: @autoclosure () -> String, file: StaticString = #file, line: UInt = #line) -> Swift.Never { - 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 - } - defer { i += 1 } - return i -} - -func decrementChecked(_ i: inout Int) throws -> Int { - if i == Int.min { - throw RxError.overflow - } - 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 = [UnsafeMutableRawPointer: Int]() - - private func synchronizationError(_ message: String) { - #if FATAL_SYNCHRONIZATION - rxFatalError(message) - #else - print(message) - #endif - } - - func register(synchronizationErrorMessage: SynchronizationErrorMessages) { - self._lock.lock(); defer { self._lock.unlock() } - let pointer = Unmanaged.passUnretained(Thread.current).toOpaque() - let count = (self._threads[pointer] ?? 0) + 1 - - if count > 1 { - self.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 enqueuing sequence events in some other way.\n" - ) - } - - self._threads[pointer] = count - - if self._threads.count > 1 { - self.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() { - self._lock.lock(); defer { self._lock.unlock() } - let pointer = Unmanaged.passUnretained(Thread.current).toOpaque() - self._threads[pointer] = (self._threads[pointer] ?? 1) - 1 - if self._threads[pointer] == 0 { - self._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 new file mode 100644 index 0000000..fd6fc98 --- /dev/null +++ b/Example/Pods/RxSwift/RxSwift/RxMutableBox.swift @@ -0,0 +1,53 @@ +// +// RxMutableBox.swift +// RxSwift +// +// Created by Krunoslav Zaher on 5/22/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +#if os(Linux) +/// As Swift 5 was released, A patch to `Thread` for Linux +/// changed `threadDictionary` to a `NSMutableDictionary` instead of +/// a `Dictionary`: https://github.com/apple/swift-corelibs-foundation/pull/1762/files +/// +/// This means that on Linux specifically, `RxMutableBox` must be a `NSObject` +/// or it won't be possible to store it in `Thread.threadDictionary`. +/// +/// For more information, read the discussion at: +/// https://github.com/ReactiveX/RxSwift/issues/1911#issuecomment-479723298 +import class Foundation.NSObject + +/// Creates mutable reference wrapper for any type. +final class RxMutableBox: NSObject { + /// Wrapped value + var value: T + + /// Creates reference wrapper for `value`. + /// + /// - parameter value: Value to wrap. + init (_ value: T) { + self.value = value + } +} +#else +/// 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. + init (_ value: T) { + self.value = value + } +} + +extension RxMutableBox { + /// - returns: Box description. + var debugDescription: String { + return "MutatingBox(\(self.value))" + } +} +#endif diff --git a/Example/Pods/RxSwift/RxSwift/SchedulerType 2.swift b/Example/Pods/RxSwift/RxSwift/SchedulerType.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/SchedulerType 2.swift rename to Example/Pods/RxSwift/RxSwift/SchedulerType.swift diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler 2.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler 2.swift rename to Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler 2.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler 2.swift rename to Example/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler 2.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler 2.swift deleted file mode 100644 index 8f9939a..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler 2.swift +++ /dev/null @@ -1,138 +0,0 @@ -// -// CurrentThreadScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import class Foundation.NSObject -import protocol Foundation.NSCopying -import class Foundation.Thread -import Dispatch - -#if os(Linux) - 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 - private class CurrentThreadSchedulerQueueKey: NSObject, NSCopying { - static let instance = CurrentThreadSchedulerQueueKey() - private override init() { - super.init() - } - - override var hash: Int { - return 0 - } - - public func copy(with zone: NSZone? = nil) -> Any { - return self - } - } -#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`. -public class CurrentThreadScheduler : ImmediateSchedulerType { - typealias ScheduleQueue = RxMutableBox> - - /// 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 { key.deallocate() } - - 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(CurrentThreadSchedulerQueueKey.instance) - } - set { - Thread.setThreadLocalStorageValue(newValue, forKey: CurrentThreadSchedulerQueueKey.instance) - } - } - - /// Gets a value that indicates whether the caller must call a `schedule` method. - public static fileprivate(set) var isScheduleRequired: Bool { - get { - return pthread_getspecific(CurrentThreadScheduler.isScheduleRequiredKey) == nil - } - set(isScheduleRequired) { - if pthread_setspecific(CurrentThreadScheduler.isScheduleRequiredKey, isScheduleRequired ? nil : scheduleInProgressSentinel) != 0 { - rxFatalError("pthread_setspecific failed") - } - } - } - - /** - Schedules an action to be executed as soon as possible on current thread. - - If this method is called on some thread that doesn't have `CurrentThreadScheduler` installed, scheduler will be - automatically installed and uninstalled after all work is performed. - - - 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 CurrentThreadScheduler.isScheduleRequired { - CurrentThreadScheduler.isScheduleRequired = false - - let disposable = action(state) - - defer { - CurrentThreadScheduler.isScheduleRequired = true - CurrentThreadScheduler.queue = nil - } - - guard let queue = CurrentThreadScheduler.queue else { - return disposable - } - - while let latest = queue.value.dequeue() { - if latest.isDisposed { - continue - } - latest.invoke() - } - - return disposable - } - - let existingQueue = CurrentThreadScheduler.queue - - let queue: RxMutableBox> - if let existingQueue = existingQueue { - queue = existingQueue - } - else { - queue = RxMutableBox(Queue(capacity: 1)) - CurrentThreadScheduler.queue = queue - } - - let scheduledItem = ScheduledItem(action: action, state: state) - queue.value.enqueue(scheduledItem) - - return scheduledItem - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler 2.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler 2.swift rename to Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter 2.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter 2.swift rename to Example/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration 2.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration 2.swift rename to Example/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem 2.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem 2.swift rename to Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType 2.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType 2.swift rename to Example/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem 2.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem 2.swift rename to Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType 2.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType 2.swift rename to Example/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/MainScheduler 2.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Schedulers/MainScheduler 2.swift rename to Example/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler 2.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler 2.swift rename to Example/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler 2.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler 2.swift rename to Example/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation 2.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation 2.swift rename to Example/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler 2.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler 2.swift deleted file mode 100644 index 57ae8bd..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler 2.swift +++ /dev/null @@ -1,132 +0,0 @@ -// -// SerialDispatchQueueScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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 -that even if concurrent dispatch queue is passed, it's transformed into a serial one. - -It is extremely important that this scheduler is serial, because -certain operator perform optimizations that rely on that property. - -Because there is no way of detecting is passed dispatch queue serial or -concurrent, for every queue that is being passed, worst case (concurrent) -will be assumed, and internal serial proxy dispatch queue will be created. - -This scheduler can also be used with internal serial queue alone. - -In case some customization need to be made on it before usage, -internal serial queue can be customized using `serialQueueConfiguration` -callback. -*/ -public class SerialDispatchQueueScheduler : SchedulerType { - public typealias TimeInterval = Foundation.TimeInterval - public typealias Time = Date - - /// - 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)) { - self.configuration = DispatchQueueConfiguration(queue: serialQueue, leeway: leeway) - } - - /** - Constructs new `SerialDispatchQueueScheduler` with internal serial queue named `internalSerialQueueName`. - - Additional dispatch queue properties can be set after dispatch queue is created using `serialQueueConfiguration`. - - - 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: []) - serialQueueConfiguration?(queue) - self.init(serialQueue: queue, leeway: leeway) - } - - /** - Constructs new `SerialDispatchQueueScheduler` named `internalSerialQueueName` that wraps `queue`. - - - 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 - let serialQueue = DispatchQueue(label: internalSerialQueueName, - attributes: [], - target: queue) - self.init(serialQueue: serialQueue, leeway: leeway) - } - - /** - Constructs new `SerialDispatchQueueScheduler` that wraps on of the global concurrent dispatch queues. - - - 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(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 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 final func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.scheduleInternal(state, action: action) - } - - func scheduleInternal(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.configuration.schedule(state, action: action) - } - - /** - Schedules an action to be executed. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public final func scheduleRelative(_ state: StateType, dueTime: RxTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - return self.configuration.scheduleRelative(state, dueTime: dueTime, action: action) - } - - /** - Schedules a periodic piece of work. - - - parameter state: State passed to the action to be executed. - - parameter startAfter: Period after which initial work should be run. - - parameter period: Period for running the work periodically. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func schedulePeriodic(_ state: StateType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - return self.configuration.schedulePeriodic(state, startAfter: startAfter, period: period, action: action) - } -} diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType 2.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift similarity index 100% rename from Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType 2.swift rename to Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift diff --git a/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler 2.swift b/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler 2.swift deleted file mode 100644 index e63cece..0000000 --- a/Example/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler 2.swift +++ /dev/null @@ -1,269 +0,0 @@ -// -// VirtualTimeScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Base class for virtual time schedulers using a priority queue for scheduled items. -open class VirtualTimeScheduler - : SchedulerType { - - public typealias VirtualTime = Converter.VirtualTimeUnit - public typealias VirtualTimeInterval = Converter.VirtualTimeIntervalUnit - - private var _running : Bool - - private var _clock: VirtualTime - - fileprivate var _schedulerQueue : PriorityQueue> - private var _converter: Converter - - private var _nextId = 0 - - /// - returns: Current time. - public var now: RxTime { - return self._converter.convertFromVirtualTime(self.clock) - } - - /// - returns: Scheduler's absolute time clock value. - public var clock: VirtualTime { - return self._clock - } - - /// Creates a new virtual time scheduler. - /// - /// - parameter initialClock: Initial value for the clock. - public init(initialClock: VirtualTime, converter: Converter) { - self._clock = initialClock - self._running = false - self._converter = converter - self._schedulerQueue = PriorityQueue(hasHigherPriority: { - switch converter.compareVirtualTime($0.time, $1.time) { - case .lessThan: - return true - case .equal: - return $0.id < $1.id - case .greaterThan: - return false - } - }, isEqual: { $0 === $1 }) - #if TRACE_RESOURCES - _ = Resources.incrementTotal() - #endif - } - - /** - 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 { - return self.scheduleRelative(state, dueTime: .microseconds(0)) { a in - return action(a) - } - } - - /** - Schedules an action to be executed. - - - parameter state: State passed to the action to be executed. - - parameter dueTime: Relative time after which to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func scheduleRelative(_ state: StateType, dueTime: RxTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - let time = self.now.addingDispatchInterval(dueTime) - let absoluteTime = self._converter.convertToVirtualTime(time) - let adjustedTime = self.adjustScheduledTime(absoluteTime) - return self.scheduleAbsoluteVirtual(state, time: adjustedTime, action: action) - } - - /** - Schedules an action to be executed after relative time has passed. - - - parameter state: State passed to the action to be executed. - - parameter time: Absolute time when to execute the action. If this is less or equal then `now`, `now + 1` will be used. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func scheduleRelativeVirtual(_ state: StateType, dueTime: VirtualTimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - let time = self._converter.offsetVirtualTime(self.clock, offset: dueTime) - return self.scheduleAbsoluteVirtual(state, time: time, action: action) - } - - /** - Schedules an action to be executed at absolute virtual time. - - - parameter state: State passed to the action to be executed. - - parameter time: Absolute time when to execute the action. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - public func scheduleAbsoluteVirtual(_ state: StateType, time: Converter.VirtualTimeUnit, action: @escaping (StateType) -> Disposable) -> Disposable { - MainScheduler.ensureExecutingOnScheduler() - - let compositeDisposable = CompositeDisposable() - - let item = VirtualSchedulerItem(action: { - let dispose = action(state) - return dispose - }, time: time, id: self._nextId) - - self._nextId += 1 - - self._schedulerQueue.enqueue(item) - - _ = compositeDisposable.insert(item) - - return compositeDisposable - } - - /// 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. - public func start() { - MainScheduler.ensureExecutingOnScheduler() - - if self._running { - return - } - - self._running = true - repeat { - guard let next = self.findNext() else { - break - } - - if self._converter.compareVirtualTime(next.time, self.clock).greaterThan { - self._clock = next.time - } - - next.invoke() - self._schedulerQueue.remove(next) - } while self._running - - self._running = false - } - - func findNext() -> VirtualSchedulerItem? { - while let front = self._schedulerQueue.peek() { - if front.isDisposed { - self._schedulerQueue.remove(front) - continue - } - - return front - } - - 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. - public func advanceTo(_ virtualTime: VirtualTime) { - MainScheduler.ensureExecutingOnScheduler() - - if self._running { - fatalError("Scheduler is already running") - } - - self._running = true - repeat { - guard let next = self.findNext() else { - break - } - - if self._converter.compareVirtualTime(next.time, virtualTime).greaterThan { - break - } - - if self._converter.compareVirtualTime(next.time, self.clock).greaterThan { - self._clock = next.time - } - - next.invoke() - self._schedulerQueue.remove(next) - } while self._running - - self._clock = virtualTime - self._running = false - } - - /// Advances the scheduler's clock by the specified relative time. - public func sleep(_ virtualInterval: VirtualTimeInterval) { - MainScheduler.ensureExecutingOnScheduler() - - let sleepTo = self._converter.offsetVirtualTime(self.clock, offset: virtualInterval) - if self._converter.compareVirtualTime(sleepTo, self.clock).lessThen { - fatalError("Can't sleep to past.") - } - - self._clock = sleepTo - } - - /// Stops the virtual time scheduler. - public func stop() { - MainScheduler.ensureExecutingOnScheduler() - - self._running = false - } - - #if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } - #endif -} - -// MARK: description - -extension VirtualTimeScheduler: CustomDebugStringConvertible { - /// A textual representation of `self`, suitable for debugging. - public var debugDescription: String { - return self._schedulerQueue.debugDescription - } -} - -final class VirtualSchedulerItemhg2ymGSgPUZ8;HM=45*kR=X`D1wnk&thiloKTQfY;>N-CGuNb98=q?@FhrCX&P(jC&>(!J9C(nHcC z(hJgORgkKHDn?ah)s`w<)kM`))pXU$UkTMUMw`{J= zSLQEUB8!qG$dY7qS(=OuWDT-qIkFO2jcl!KgKU#*i>yPoL$+JCPj*mtL^dEBmYtEE zm7SMel3kTuliiRRWaF|=E1gz`txN|J3OiShtegf?(-0tE>?nuI-Q{!TzH+QQ5D52& z$QQ|DWs?~osr56Vx=&&n^zFU$Xw z-;f*R6Y|^gH}d!LkMhs*uks(&Ce<^lX8}nF%W6z@Om$v$OZBnp>(!qXP(`pJQW32n zDo6^Nf~iPXa1>lcj$(zPL{X`zQpgo`ibjP>p;l~CY*Fl298nxooKR>LJ&JzCfa0p+ zw&IQAz2cMNtKvtENzII!*)c>fhFXXfSJ-(_q;EYOrf?Y;bOXH_UAaZis83G%RaKYM?iy zHLw~o8nPOA4do5e23do=LD5jx(Adz_(A=PDXlppwaK7PHqithIBeQX3gXqMHOw%}s}!E;c=H`q1>b>08qe)oc|+Wvg;fIjLYOgvv+dr^2cNRUxV{)e=>t zimGC%GF90szDlSnREbp*RjsN`wOzGKwO4gOby)Sg>bUBZN~`KoT~S?A-B69H##Fad zcU1RPQ>tmzljhmY=;pX)Ve_iyKbl9IKdK$oNVSLBOYIG$X+qWE>LuzZb+me^I!3)r zovzMOXRG;Yp}J5lR!h{i>ISt^y;i+Zy;;3Yy;HqMyb znhebfO_4^TDbrMHWE#0ft!dY+)~wTP(rnRmXtry9*BsaAHK#RaH5W8jHPe}kw>e(9Hx~Mh0bxCVvYji8ImDC#7N@=CG3R|0754T=v z{n+N*wz!SeCT**0Yiv`ssoU1JZE4%qw!Lj<+n%<4Z718h+j`pi+lJdl+RnFKY`fKV zr|o&$o3{6DpW42+8@HRa&uq7EcW+0x`?Sw*$F(nL4{i@_C$^K?sp+7;R| zZKbwRtJbz^S83O4H)=O)w`vb*wc3l?E81(?o7yq$E$toceeFZ-W9_$Yqi&OKv+kMQ zv%4+2t-Hb9wm{Md*S)M;(!H*`yL(b+s&m&x>SA^AI;xJQW9qoN9GyTX)D`NAbj7-A zUA?YRr_#0RR_WI2*6ViZ_UiWQPU&>IKHY%sjP9K7qVBTpw(gnkweFqnqwZUeQIBcQ zj2@dFyB>!gXir*CPS1*-+@AcNLp|D_!JgASXL~O6T<$USO!VCDxz{t*^QhOUm)Kj< zyS-P}d$o7Gce3|x@BQ9)y+8U)`eyXa?z8A4_a*mb0%<5gpRli}ueh(Yue`6iud%PA zZ(rZpzAJsN`)Bvt_dE1E_Cx!<`seri_XqR`^@sOI^yB-N_Q&*#`YZaY`sMwK{#E^J z`#1D&>fh3TyMMa>egBvK?|NhXO#K|arQTX^ulLah>Ph+(JsrqgrRj6@0=-aQs2A%c z`WpQ@{dWBceW$)#->cW_hxBLk=kyo#SM(3`kMxiAPxUYKul4WrAN61K-}FBQ<_y>k z%pZstpbz8?R1a(zI6828z%U3KbRWbF1`b9J#sFz9%HXoW)IsK8`XFa8YjEx0k-?F{ ztAn=&?+o4_d^q@c@Y&#t!LLK6Lo5ULw^q47%~h^3{4I_8hSkRa_HNz+3>7k^I@xDyJ5#+=V8RK>#+Cm+~Fm|NzR5ZGAba3>-==IUb(YvEhMqiJ9FjyHJ3{V5ifH3$N<{SJBIKu+NLPLZB zZy*?m2C8A1A + + diff --git a/Example/RxNetwork.xcworkspace/xcuserdata/nierong.xcuserdatad/UserInterfaceState.xcuserstate b/Example/RxNetwork.xcworkspace/xcuserdata/nierong.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..9ec8d2db77c2406bcbfd13c0a1bf31c7694353f1 GIT binary patch literal 21245 zcmeHvc|cP~*Z0i5HxSk&1VUKUDDFxifrJDELINlXifry;gaA<>m;?mZxvjM>wN`E2 zZ3TC2)!No-ty;I*T9>+ZZ?)D|TkF!gRBh{bZY~K}ZJ+0T-tYPEB?RWqdS>R#nKS47 z=8mqZv^t!zv1brQ6rvG>1jq|{Bj3Rt>nwJM)mA;EquE|kVTGrHj!s+6;EuM@V=N_3 zM-al(R~Cy!{qy@-8Z4!0&6!RjA@V8Acbc6Rg11QU0_2DMQ7Dq5FcgDgkqW6%9EwL8 zq(uoxhx8~78IcKPp#dlt6`|3n1eGESDnsRHEOH!=K&6kmFh-yr_@v&6;Ej>EtNv0QW;bx)teeYjiidHQIwe)O_flkl!Ypz%Bc#RsAbf0Y6bN&wVv8QZKO6)Z&BN+x2av!Ug`w( zF?EtUMV+QTp+2X+puVKeQ{PiRQa@97sQc6d>LHD2h8EC1v@ab<2hmcx6Wy8aLU*OR z(cS4DbWhqqr_n~*M5ogkbSB-K?nCF%`E&tYNSD(Uw3Qx1kEJW=D!Q7s(Y16PJ%yf1 z6M67VIq^ey@}{eb?Rp%{NAfC*$ojF^!y5lkf0hUvm|Wx6rFnLbPw)0gST zWHUKTe`Wxa%M4`ln0%&y8OjV}MloZUu}mdX$Bbv{nFeM8GlhAIna;ex%wrZZ%b68S zBeRBC%WPyeGuxQ$%zMl}WVthhTJAa#p2+s^o&6^`&dVfxx|ugE2*urR6C2s9Zl+Zoi0tI zjW(+F8PV}+CVh08HZ3+fJwvTlC8$-}xHy%&;c(OuDL0@96p7lPwx}Iap!TQ(iXsBy zMZAfS_z+*>NBl{^2Gj|4MqN->)D3k@XA} z_oxiAR+rkwJAev4lxDY^tIMIaYG=A-bZvQ7b(sya=UXa4(pgG9+2whb63D~T?5>O> z*~dMAi6|Kk#DQDmsm{Df}50dl!=s$D1%5FQEwt6ai>vV;H`cr8|9$> z9CwX|K^g}C?UqUy)H(}6B!mPPi<8Q%m6pVqn3zHb3~Nla)nd0*m&fGQ_qRC51Bb9Kftw-xXB%a zh9l)_G#Cv*L(wo2O5`Mrgs(;;&`4B_Mv({-Nwh@IjbzV9#*iPoT)U;tYO8e=nC<13 z<{2_^i{;7L-BatH#B5uMi?1L%KicjY;%hJFTQt^MD@*e&PT<0FM{|m}^Ao6P&fl7t zVsY5tR&vU<>MPKgMr0*zNc>UgI#N zL_yk-wnX#4o4csA{q2WcvJ@n_=cEozK+08UJgP?xq&?|CqE?}aXcC%CI+9MLGl?tW z2cd}XXtB7%-*&Op0RR0s6pJMuCM#}cGJb5H;l^e<=|bY&w9P~>Amv(ZE)p*iSz zG?#QG-AH%RgY+cPYtcM3A1#2-OK2WZk{F_bj~YV2Kdq^Rg;-;;I~)1~pQc+KHI?Ru z9AIUbEjNoOT(hod&Sokw9v~UuxVHH}1)}TUI`mRSY z;tQ>BRcI4>wOB0m6ic^)2(?w4?ND|TdJPp0@1Nfi$G5WvZE51F<)27XsqYsdB4LX1hqC@C?beJTOWRgnKh-nS_5FJ4up`+*+$snUh z9hpIvJ}OdAxx{C$VsYmGSbWA5SuNvDwrZyxSixdfI>uYeoUO(6C$73vip8e?dEIF> zHR&Kd%7K|4ulP$>#fD;W%)eW4uC0{I+M2oxu1bu>;%@({lDv$x^qdT3RcY(u-@A&Z z7mHQ@vbcK(Qr6f?9W|B`_rzU6w~%rp`VswvuA-mOHFO=_KsV7Z=vR_SdXqjRi}WS^ zNH)nK{mFoh=r(9Ccj0pn-A4~VNZdt#l3dVV3gA;n29e<)EDFd7j;q33c2-{4DLt~d zSRDCyVufvdji%@Qd0$|*+7n{$J;64*v+MSDQ#tC4hyJAkGJJ$m8;TP4HQ4Q z(`mKN3Y#4odOVra4Ki(&rLb$dBo6iiX^#ELKoZYCi_nQ6@1&>(3q7ZUef8+sJ%Ck>&IQE605j6V{j}PNs3$5Sy%?0`D<XRoh?8(HoQzX&DmLIWY$Rqfnv{@IVj*RuoKz4i8M6_myIB!u;l8*Zx{GtjSPv`O zh@Ciq6`lXbiXayM3#>SlW5r>l(#?t^IaVyjqqr}rBGs;Myf|Fk$vwg4cnr^KR$#Rn zjx8#I)y9#czp$6Y3q=`Xd6p9Uxl2269nVy?z*Mz=U)r625`LCrr^$E-Dj^&33=cca;UycMM_3O#J>4wXrvD#1{dd^uWsaR* zAy2v4smUeT&;l$*3qY!=Twk{ii#Om`c~;s4tTc^dhRwiA&pggbILFNoZ{Y1b|GWkK z^X%Ujap!**ALjUHH{OHy;`i`AydNLH2k{~NKAA~ok=f)qGKV}*=8_l4JTiYH{=maO z$C~-)Bw66$pO>2XXYv2>&wq!1zUKJn8}g!?f4&9&aUEmeC*830dRepAF2V&SXGR%% zHg9K?yL1AT=wc^I5A3w%?@PP$8z>`^HBxEh^+w7>wvnO{VAbNz-uX^DsE1E70Jw|x zq4JPy1C>SfrTS6XR1Vdj8bIYz1Ie4@EwY`wO?Hr-XGVatyM9dCbDu zk;I<-MP|Fz%o$gMTjzC~IEuwVe6-6a;)D}$tsUxZj^yjjG*?+G8;Zpttt;S8@|E1_ z;4vcLY*=CkJ13lptu+<4YKy~KRSQNtn_U&Bj0aQYUt){JDW!GJQdbwE|B{xNu1;4O zV~t=C&WKBojyGyEqV<~C_~>-KDKo*OGihSg+M;@$wpbfqWXPvd5ANtjnVLdPB_EIziHd((hObgvAFJqfY8&+i`ILM{K8K1@ zo6k|ry*NefKq6`<^$urpE;T#N10<5gquqW-Owo+M%lkj~Hwt|U>^7SdoQ>iRe*V(n zw(S(%d&DI5N>1sNYU-Dr(|DYTBq2rp^E1Ja13AI0 zXS1Je-yy1FV5iPqx^{zl3)^2ERFyI+>LY27n?n+6hwoy415s9;!sa& zK|_tDB}I(HUZ-*g=H)-h>F|ijvMH~?<9UD*MT7ooA}tzR;I@x~SmlR<8+=!9L0&p4yUck#gMMZ-YP{bd{hI( zZDN&rokkz8i&Mv|xkx1lf7lH)+6288i7|L16sO1810BxVg8ung>Ci%!$t3m$XG6OI z68}C3`S;1TR@*2L9#vq!gyt24hYVGCA4e4O0VshAA#;hNCMQ3$faC0}43okEnRqUD z|Gje#;0N$?I=WA;Lg9}6H~&jYYV1yga4zJJD}@yW;b{=A9Pg~*;yGy)JbEk_rWh`4 z2Ld51=fdTDnA2;5NAqC=7cQ-;E`>ZC%{8S}rCj(RglE*%S|ChkLwI@}7;PbZ2ErXH zYpbjf{td#xRTi@YA;zDJhuyyd!m$wcw-@A@AlwTfp?`U+@aR@yr==d~M95^TX|P+% zE1Zh1CEXM%y8t^7;!X!cPnxIrxe zab9azxV-C%=)W@Ye_XH?S*_^knP(}p*e%s176s=T0L>VtyBb{OpbIIi)qgj`|6#FK zG;l$luOT2^{U-`8RwD6eT>ecFVJ~(3EToV z&>i#u&_CWd087D|+zxjFjE@@Yz&@LSvjN>R1dM*=faa;ilfc9_8_x&yP9vCTUdKDZ zZ1N#K30R#A_zH*5fg`X#;B(qgov9c~N2S4mqyX?Y<tuLQ3?UPHXbcun+r&TEC&7O(fbPI_JRy6x@l9p>G`JK1}Hx7pk2 zJ>7eW_p9D}y-#^x^8QWeCu}EF3p0g7h1J5RgbRfmg?ogjgg*!$_=tTv`6T)b@G13a z@R{qg+UFgg6F!%G9{5UpyZ9#i7Wj_wWqlX>ZuULo`=#%%etv!({PcbU{j7e(Z?WH2 zzYqK__}%jl^6&0%@*nPB>;Js}I{)|lKlA@JARwS~fFWRLfHUCvfDHi$0=^FTEl?V$ z49p5F4V)UdEO2|^slaO@A5kY!nrNhGf@q=W4bchFRXE9Z7MsLo@f7hg@lNq4;@c9b zL?sy@sggV=*(mu?ayiI5sB=(8P-)P#pjAN!f-XvFX_V9?Es;JgT`fH%y%g*f+$A_G zcuer@;ManW2j2(@3W*OX3aJlS7P33!yo{E0mSxE*WpicQWanh}L)(O=g<3*qhHef$ z6?#`5Avee^@>%jN^0V^$VT!Pfu(4tD!rl)1Dx3-L9zHO9eE7@Zhr+K$1Vh_9e%{Halde-mr$wC(ce>lTOXoqIpY8m1=gVE>U9!4N=(4HHmt6z8 zrgk0IwW;fwZeHDV-NtrX(e2~zRCi7Hitfw0pXfpL(DtzQSkdETPeD(8&+48{JwJ)| zk4}rOi{2D{K`B#aE1y!nt-Kb~F=lAYyqLo=f5vKJD`Qv3exV9d^;JEkdPnt(y1TkW zy-a;3E+8&5Zfe|)xSR1k;w|wn$A7AkYH~EsYW8dX&?ac@+RfT42^|wgB`i<)L>H{f z)jg;CKrhf6^;7ll>hC3L6P=0M60avkCyhUmtK}$t9xBc?vQLwZcIL(qDUE) zvNGj-YWq}kYE$aBhA2a+VXfhZv~Fo*(q2uw24`Kn@h#(BQ=)0I>AiG1y?6So^y3*p z8HE{3GrrF3kXfF&Df32eP49`l-|Hjj)349GKA&W@$tua(kaeSPLf^@K5BBr#m)~z` zzi+dqkN9w8_{hqUyNgA|=HfR-2}TVXwQ%ZmAMhjjGyN9aKHG`k<|?t=@LBrbo^6n)Bll$GtS}hP|JC ztphtoICeOLL76&Q+qL$Y+6#3lb<6608(%d3je1Fab^XzX?hP{=ewdIsVa-HlV#&n) zliE*WCtaAFHo0*Mo-%sM{;5$@r%k;CZrJs#FFTe!_EhXs^Pjr)^q{BTnbu|+nRfA+ z-p_2B9yr}T{gY>to_%EoGs8OL_{_MOOJ@E#t8~_p*|D=1&i?(mlIM=hQO#LA=i&2Z z&mW(wo%`|&UN2O?aBg1ey!G=X^C!%|xFBc2_7@c|&U*3IOT{mJxG;XqyK#F{ z=ca|LyjIn%`hIoM>ceYvYc{M6Upss4AM2{uonN1~{@{j$4I4H_Zk)S`+Elyg%B#a) z{rI)?*LG}<-rTrFwq^EKw6%8YkFSq<{oJ;G+xEYqdt>vPo!(sjmh`Pz+wt~>?Kj@8 zc>Da0Av;d)?7MUSJ4x@nwM)5c-Mj7IUA8-9_uM_cd#3GqxOc+d+wax9cXeO+zKi>d z_kVF<@PRW22Od0rsNbOv-p_phz~QvRdp}72;N1@sKiqjlcjWDlv>$ChsyX`BG0m~J zj%$x^Kap@^$H)4Q-#OXqvzboUP5A9VkR2jhSD{(bQu-Trvz&whV? z`LOEYLpb2nH#~B1X_`>*$TQ@aG}(QuZkog$s-_ax>Be)wEagx0O)Q+M;MDWicq9be zB!_V9=F%*(00=h_plJ1I3VH_cLocBw&>_~M^=J#)j`jfH<0v`~I>c$vB0d2e@p*I^ z{fh1bdRPotVFei5I{{L-8;%EGZxJAZhhj6Jfh+JBTnSo)1N4aTxB(EslK~UF9dw6V z_#S=$hV+M&7v)3wfqh&|1%VbJ10-*MFl6R|wQ@8db?d>9HI14HI>d5nHRuq>0e^c1 zFt@+BkhYO@3>{A=(J6EmT|^HD4DA$pI=vPUvK#4F={M*d^d9;>dOv+oEEb1|JBT}p z)#3zks@N#*Egmi|<`gYZ!`%AWQ~b00uh>bxaQWA%cd6YYT2Me>v{?mFdr%>qLDS*M zZB=@Y0`JmVu&V8+4p7ffhp6|#w)PeIntVjQA?Mdp&!TzM5$YoVW6c9Qo04207vV1t z!un^k7U3a{+07`d@*0s6Snm{QTd5G10WE?(6^GVNA5pRq@UL3_|1?Ks3%(P1{yuN=sZ( zxBh3?CKsBF4yGfKavdE4T7M`lr^D!QI)dCGcgb($9=T5*kl)wQZRob>F0G(LIEMxK zg9UGW0gLBDHV%vgM(Gq_ZV#%vz&yGIC04A~XfxC%Q%1BZE<+t1ugfq+>oPLaqhodP zssz0eezoZ%x#BLgbEX~ai@cGWkATXIX8RzsqliZu4YE2b^5LXeX@Qhtao5%j^CgPG zyad=&o1H@xx^P3BECBG4djVShhEj2uhl~Q7t#Y*4p5<_cVlNiQu~^Gu zJ&TjLh`!v&ih-tlKx_3k*I5A^$C>K6D9>XW;MV!5tZEKx208dBX^y4JW^d?iH`i3S z;Ns;L`*7}hC$ve=i!?OEJ`>zcv^7F9we9AMnjBPHyQwawlr zi5uSPNp<5fA1{{WaMW5HZYqlCksMnOq6gDM;1D|uHlYzL_G7U>ivw5;!z*I3n8lKH zbTRO@8NhXS=~CLl;vkNeok)yIJ&ijTSH(j?QOT! z)&T!|@VCYW4)6|UUycYD;M!8kH^9xOXP_P-z-TG6*)5*t`0T+GC&uV{vdJ?O<^TcX@+r(&Ynkq`CU!&ODw51a=c$PdBhw#^TT> zdLliE#c~#hk+>HBPywJaJrl&z)3`E|=%*nUi^I7flz||W$pssBGqPF%lq>$~Vxni$ zb6UuIp2d-*$W6>VdI4-+bUl#LNWaM9HXh_Gy@+1IB`s!g+eTMot`){n1uI99V{w{G zThs>nWqM^x8;vYhw6w9BUc+N@{|zp7)3t%#j+C#00<;NKpx3~ZvW4DCzfNxhb?8m{ zEfz~@>o!&#m+z$JMqdbAWLX8CpScrn+?0&&NgjqTviwt%(_mSoqq;NaFFCkq|M243;v zsBMmbi#MDK1S)mwhFyyX2z{hm&??uh$JjqkJ9)B8v7t}3C^qz2`rJwut6d5e{VDw! z_!hw9)I@_m<(}Cu=&v}o`jW-*jr7+n)^Kdqz7|#~-1h(rsT}~WJV?I5gNDsYckpd} z>uSqg)g}5ew<^A;e_(L}i*-$$T;gOAS7nH+uLG(p8?xcDlBLvGX)75EJ!v;M&y&(D zH8SnCDvxM)SALzo$tQO8E+(8#W0M3f$c7p#Re9qtzrO< z!@$O1;47Pr}O?x|%X7Q-V)V~)AJ+Ul(3UD{0FBdiQbSqo5L4wSBlsvN$Qpk>lATxt%e}P-A$c zrtXXmDPLoHFg?L~s$^oASVqODnK&k%(J)#DCcYnwVe`ykaeo#MU@>f*16iEM;(Qjv zqAp}{5sL@C#^{+uw1DZwBy)-xV}P)cF)`@~rfM*Y%>-8eXcm`nY8s0z++!Jw$FX=a z&rlM#F5sC+kZ1e|rE8L!Pr2wda!$D-b0Nur6HNTzYnCq=o;9YdNc(c&V6r=sgW zj)c|Wp~1~Vh0GvWN({{2kVXckXy`vIC1yBkY+^<*BUwC*#Uoo*k(sePi4n_y5i3|c zoMXfh02~5}`OZWcCZ2zU|EidAPpZHUJmh3?F~=;U-1~j&VUIFQe$Q1Ah}mXl$hMR@ z3v79u6Hts!GZUFf;2wDytz{;IhyXV%hiT`gln1lJRJMw9sS+$Mb;(v{DnsC!pQk_* z!=l305$+*;ngPXOCESNO%RI}>Kq6))GmDuGj)ytS^JoFI;MT6(NT-o4vV^0=m7~gR zt!{~idsMD=2b8(XwxqGRn#C}zH7qVCDmb-zv{ui)$w|L-8&{>$BXd1UtV=2~^U;_l zW&!gei>)jmvExrOi+$Q?BdE6~Gp?SuY!{Z*>CI)UdJUNLkxrN!vAJQHftQO)PU4Bi>>s)o568vxF=g0O9FiS9R zve@3TLf&R}aSXnL*~z@aVo+a!t!q~??=riYJuI$c@pu;3!?g=;=K5KyOX1ShBN9r= zFPuJbSr^VwE)@i1fXJP_m`@giq5!rJ=6#NU!z^xqOKr>%i1>&(3d#|94#7Fve9N=B zDy{|=Phjz+PnqM)3Fc$wB;-E@&ayLL=yQFT&-nkql%>sgCm$IM4uJ#eMHy%@+`*R9 zgp>{!F7eU91bQ8u>lg{T9!JPu^GhB{<=Sa|dlO2#>1okoJg^rqK)60E zp2!FI`Tv^vrujVN605C7p@})q&9&>S^w%`L?6=HCkjEY=)_O9UnD4m4Pfm0Titm}9 z;I1z719O?V!u-hMDJ-7KV!~o}HFK5unG!MA;i3YIpCzxccrJ+>%*itTsOwUX-6vm< zydTQTJZ_g8;*xk=W_N3MmIcbVUqd(3?n!?9)>i=Scf^wprlEx@2Az^1DL)GDuc zxzL%M(#=)kQo{1gGfUMri@3${xw$s-5GL zW?BVa0-;Bt6Zo)rMze)a;14?vIBa19naSekJnKmy5rjNp!w|^OU4fj%v$zdoHYxH9 zAZ$2>)*FtXjiCLL%6CAW1aRh=!|hnl!;a+{)F{IQ4iE!a8~)CtpqrovP%MDs&Y?aN&T9@u2mQS3h*1@S(o4_4wRq?S9)@x%yvFGr80u}Yn014CSueiR> z|LJ=~z7dOrKE8hbJW@{@93l&qhlNK(MgYE#!_;*G^K>i278q(>a8RHftWzG{ z;ROnut&3BgAX}CLL=xC;3$wD)0ScA{nuHZzC%{3jtagVJ3IUj^)MAGX(sh5F7Ybre ztvshXAlYRq&M`a2x{zOdo1R@NE1hq)x4p*I4p5L)S`TP5K41UZs?ioZ!C)Kq68aFz z2bMNNyu~6SAQCZ>crDr@4g%0%_a1=xOGr*h%>XE4ZaxoRgmVc@g+djpQE>C1(5qe0 zErm+!id82l3W3~2JuG9-@g8pIk9QlS_@kVMRGuQvFaQ$4y$`k68BfQ=s?_mX&J_OS z*HJXa5n-c-_!IGIonDog1Xo}I1DFqhWlJ?bT7`vK>9B3XhU#+6v`*q6i2Pe6;99jd z-594csS={~>I7r7RvVWYt=H*I(c1Kc^fuF#@?M zRwux6F{Je$;Nb(l>8Aea5Iryt99}JZO4Gpfk+Jm&WhLgg(fSfiY-#Lc4y-ZYydvmD z0KcpQ=*!!1L-`!Kf^K6!c%4l>s>;jUpZyuRjH zJO{67eksl8_*?ulxT)^o-{2KAzvDmQmWKjfGLt~*sU&bs*(fJ96(G}#sHM~@cvZ~% z)Ma=X%vI_dya1*Hy!J&4cGncJP4;)mmlh`z2cm2BLysU|Ku^Npy&^pU9+-$yK@%!M z!_i21@yqk{GI-(3X8J9F!@LWwtOM}cm&5SNm-CD_6AZ6z=>|u;XgJoX;7F%o65yDY z4KHuWg%`IJFh$H@cy-HgW+c44WjymDyr5+V^Aqz2ylkbXptqoppinSWFkCQFP$IAh z$^}-zD#2;NdBH`1%3K!wD7Y%P=Y_ojyhL6SFR9l+uc2NRuWB!+SA*A6UUR(`doA@^ z?)9?QO0NxGo4j5F7|rWmZ+Ly{E%8qC9s}T+x!&`=U-Vw+z0Uh}?_J)9y+8E+$orW0 z31NUxCX5nx7xok?g|Wf}pm>Ol`=$D2`}OzB^~>{H=C|H&qu;B3oBeM2V}IIT z;P36P_s{h2;5;RheRhymZVD3B$<*vlD?8`$uP-CNx8%-sgq2UOqNWQOp{EP z%#h5IERn30?2_!3?3L`39FQE690q{WN0MWb6O!*F-%Bn_ew195T$9|8{35v}xg+^a zaz7|ENE9X@+!`^f~D~ z=>q9X(nZp>(hbt>(p}Qs(!J7y()XnwNRLQAlYTFKApJx7Fc=5Z!Gd7#V4q;W;DBIJ zaL3@z!Ciy92lotC2FC`ggX4p>!MfnY;6cH4!ApbR4L%=2g>((c4jCIVD`Y{)!jQ!w zOG8$Lyc)7OWNXN_kT*lNha3p`Amm8M(U6lNr$f$$d=m0~$d!;gArC_S2ze-DWL`3% z%vTl$V5%fpvMg1WCNs%0WW51e)lZfq8z3u{mB}h(V*qGXEvu2)WlmY0tX?)jwn(;J z_POl$P(`RQv?BDm&`qI7LQjXD3;i_o^U#Z-S3|Fb-U$6A^j7Gd(BDGu%f03P@<6#* z9wG;20l-<^<Uxj}Yej)r?`0en!;rGHHL{Je-gja+x!Z#u=!W=OtVqwIJh;X@V$V@&UuqL{%k=9to$vY3jP+L-#72{Dsn zrpB-_vts7N%monG(wJp2D`M8hyb<$O%-b z4$%(NR%<6}r)XL2H0`t6nc9WgMcT#MrP|%vBif7F@3mL7SGCu*zi4l3f73qD{+WOi zm;~8WJ=X0OZZrEz+<a+C&^m+P1{UH4i{doN}{j>U6`Z@X+^z-#=^;`7Y^*aI9w^zSUe_Vf7 z|Ec~9{nz?S`pfzs^*`&c>;FjfO>C1Go2XCBOw38lP0UX$N*s|mDsgn8C9yoQHgQVg z?8NzrFC{KcT$b3BxF&I3;>N^R6Za;5ka#xnM&hrDcM|U<{+{?SiAoYA36uPi0+S?3 z!AYS>>Lg8)E-5i7ImwV@OiEAcos^Z7oirdRFR37@C}~X6oTU9p$C7R&{n<;>E54Vh zm$et$Yf-QLy-xHx)$44pPkVjQ>#JTjd)@E#FqujgBzq?ZCr2c=O>UpuF}X*wGC4Lm zE?JYDn%pP3FnM@#aq{S7OLAqhEqPqBGr2B#M)JJmwaM#~-%9>4`OD;Qk}oIUO1_sO zNC`@jrUa+RQhKDMq~rjIaZ<|El&4ajNtux{E9KpkLn%j6j-`B@aw_GUlpj-Wr2Lw4 zJLR`jlE5r27}3vX~;3;8uATAhQR=lv>Bc;EHW%HG#S}EX`9owrfo}mGi`U;nY7Q+Zlv8aN{lk2(wJmSH}*F6 zHRc#|jYEvXjm1W@vD8>*v>Bf@&NnVMZZK{G_~j1cF5@2KVdIC!kBrBRCyXbJ*G>MW z7*iipp=q#bm}#WRY$`ETn#P%&rtzi*({$4u(+j2rriG>zrj@29(;Cw{(^k_?)BC1l zrjJdhP3KHsna-QOHC;0OV7h6#pYEORn;wuZP7g{CPVbs-O3&_7%PXA}#s3$?wNgSM I*k}Cz1Ly|h6951J literal 0 HcmV?d00001 diff --git a/Example/RxNetwork/ViewController.swift b/Example/RxNetwork/ViewController.swift index 896fc8a..50fd6d4 100755 --- a/Example/RxNetwork/ViewController.swift +++ b/Example/RxNetwork/ViewController.swift @@ -14,16 +14,16 @@ import Alamofire import CleanJSON import SwiftyJSON -//protocol Retryable { -// var retry: Bool { get } -//} +protocol Retryable { + var retry: Bool { get } +} enum DataType { case storyAPIMapJSON case storiAPIMapModel case storyAPICacheModel case storyAPICacheData - + case bannerAPIMapJSON case bannerAPIMapModel case bannerAPIMapRawModel @@ -40,55 +40,115 @@ struct DataModel { class ViewController: UIViewController { // MARK: - Property + /// 懒加载 表格 + private lazy var tableView: UITableView = { + let tableView = UITableView(frame: .zero, style: .plain) + tableView.tableFooterView = UIView(frame: CGRect(origin: .zero, size: CGSize(width: 0, height: 0))) + tableView.dataSource = self + tableView.delegate = self + tableView.register(UITableViewCell.self, forCellReuseIdentifier: ViewController.cellID) + + return tableView + }() + private let disposeBag = DisposeBag() private let datas = [ DataModel(type: .storyAPIMapJSON, title: "storyAPI: 无缓存,原始 JSON"), DataModel(type: .storiAPIMapModel, title: "StoryAPI: 无缓存,转 model"), DataModel(type: .storyAPICacheData, title: "StoryAPI: 缓存 data"), DataModel(type: .storyAPICacheModel, title: "StoryAPI: 缓存 model"), - + DataModel(type: .bannerAPIMapJSON, title: "bannerAPI: 无缓存,原始 JSON"), DataModel(type: .bannerAPIMapModel, title: "bannerAPI: 无缓存, 转外层已处理好的 model"), DataModel(type: .bannerAPIMapRawModel, title: "bannerAPI: 无缓存,转原始 model"), DataModel(type: .bannerAPIMapRawModelKeyPath, title: "bannerAPI: 转原始 keypath model"), DataModel(type: .bannerAPICacheData, title: "bannerAPI: 缓存 data"), DataModel(type: .bannerAPICacheModel, title: "bannerAPI: 缓存原始 model"), - + ] - let cellID = "Cell" - + static let cellID = "Cell" + // MARK: - LifeCycle override func viewDidLoad() { super.viewDidLoad() - + configNetwork() makeUI() } - - + // MARK: - Action - - - // MARK: - Lazy - /// 懒加载 表格 - private lazy var tableView: UITableView = { - let tableView = UITableView(frame: .zero, style: .plain) - tableView.tableFooterView = UIView(frame: CGRect(origin: .zero, size: CGSize(width: 0, height: 0))) - tableView.dataSource = self - tableView.delegate = self - tableView.register(UITableViewCell.self, forCellReuseIdentifier: cellID) + @objc private func startButtonAction() { - return tableView - }() + // MARK: - request with cache + /* + { + "top_stories": [] + } + */ + StoryAPI.latest + .onCache(StoryListModel.self, using: CleanJSONDecoder(), { (model) in + QL1("onCache:", model.topStories.first?.title) + }) + .request() + .subscribe(onSuccess: { (model) in + QL1("onSuccess:", model.topStories.first?.title) + }) + .disposed(by: disposeBag) + + StoryAPI.latest + .cache + .request() + .map(StoryListModel.self, using: CleanJSONDecoder()) + .subscribe(onNext: { (model) in + + }).disposed(by: disposeBag) + + // or + + /* + { + "code": 2000, + "message": "Ok", + "result": [] + } + */ + BannerAPI.test(count: 10) + .onCache([BannerModel].self, { (models) in + + }) + .requestObject() + .subscribe(onSuccess: { (models) in + + }) + .disposed(by: disposeBag) + + BannerAPI.test(count: 10) + .cache + .request() + .mapObject([BannerModel].self) + .subscribe(onNext: { (models) in + QL1("onNext:", models.first?.name) + }) + .disposed(by: disposeBag) + + // MARK: - request without cache + BannerAPI.test(count: 10).request() + .mapObject([BannerModel].self) + .subscribe(onSuccess: { (models) in + QL1("without cache:", models.first?.name) + }).disposed(by: disposeBag) + } } // MARK: - Private Method private extension ViewController { + func makeUI() { navigationItem.title = "网络测试" - + navigationItem.rightBarButtonItem = UIBarButtonItem(title: "原始测试", style: .plain, target: self, action: #selector(startButtonAction)) + view.addSubview(tableView) - + tableView.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ tableView.topAnchor.constraint(equalTo: view.topAnchor, constant: UIApplication.shared.statusBarFrame.height + 44), @@ -97,10 +157,10 @@ private extension ViewController { tableView.rightAnchor.constraint(equalTo: view.rightAnchor) ]) } - + func configNetwork() { - Network.Configuration.default.timeoutInterval = 30 - + Network.Configuration.default.timeoutInterval = 20 + Network.Configuration.default.plugins = [NetworkIndicatorPlugin()] Network.Configuration.default.replacingTask = { target in // configure common parameters etc. @@ -112,7 +172,7 @@ private extension ViewController { return target.task } } - + Network.Configuration.default.addingHeaders = { target in if target.path.contains("user") { return ["userId": "123456789"] } return [:] @@ -120,22 +180,24 @@ private extension ViewController { } } +// MARK: - UITableViewDataSource, UITableViewDelegate extension ViewController: UITableViewDataSource, UITableViewDelegate { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return datas.count } - + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - let cell = tableView.dequeueReusableCell(withIdentifier: cellID, for: indexPath) - + let cell = tableView.dequeueReusableCell(withIdentifier: ViewController.cellID, for: indexPath) + cell.textLabel?.text = datas[indexPath.row].title - + return cell } - + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { tableView.deselectRow(at: indexPath, animated: true) - + let data = datas[indexPath.row] switch data.type { // MARK: storyAPI @@ -156,7 +218,7 @@ extension ViewController: UITableViewDataSource, UITableViewDelegate { QL1(model) }) .disposed(by: disposeBag) - + case .storyAPICacheData: StoryAPI.latest .cache @@ -165,7 +227,7 @@ extension ViewController: UITableViewDataSource, UITableViewDelegate { .subscribe(onNext: { (model) in QL1(model) }).disposed(by: disposeBag) - + case .storyAPICacheModel: StoryAPI.latest .onCache(StoryListModel.self, using: CleanJSONDecoder(), { (model) in @@ -176,8 +238,8 @@ extension ViewController: UITableViewDataSource, UITableViewDelegate { QL1("onSuccess:", model) }) .disposed(by: disposeBag) - - + + // MARK: bannerAPI case .bannerAPIMapJSON: BannerAPI.test(count: 10).request() @@ -185,7 +247,7 @@ extension ViewController: UITableViewDataSource, UITableViewDelegate { .subscribe(onSuccess: { (json) in QL1(JSON(rawValue: json)) }).disposed(by: disposeBag) - + case .bannerAPIMapModel: // 项目最外层已经处理 BannerAPI.test(count: 10).request() @@ -193,7 +255,7 @@ extension ViewController: UITableViewDataSource, UITableViewDelegate { .subscribe(onSuccess: { (models) in QL1("without cache:", models) }).disposed(by: disposeBag) - + case .bannerAPIMapRawModel: // 非约定接口,最外层结构和项目不一样 StoryAPI.latest.request() @@ -202,7 +264,7 @@ extension ViewController: UITableViewDataSource, UITableViewDelegate { QL1(model) }) .disposed(by: disposeBag) - + case .bannerAPIMapRawModelKeyPath: StoryAPI.latest.request() .map([StoryItemModel].self, atKeyPath: "top_stories", using: CleanJSONDecoder(), failsOnEmptyData: true) @@ -210,7 +272,7 @@ extension ViewController: UITableViewDataSource, UITableViewDelegate { QL1(models) }) .disposed(by: disposeBag) - + case .bannerAPICacheData: BannerAPI.test(count: 10) .cache @@ -220,7 +282,7 @@ extension ViewController: UITableViewDataSource, UITableViewDelegate { QL1("onNext:", models) }) .disposed(by: disposeBag) - + case .bannerAPICacheModel: BannerAPI.test(count: 10) .onCache([BannerModel].self, atKeyPath: "result", { (models) in From 45e0e728374a901447fefa13857bc0123ed3f503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=81=82=E8=8D=A3?= Date: Sun, 12 Apr 2020 13:04:10 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E5=86=B2=E7=AA=81=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Example/Podfile | 1 + Example/Podfile.lock | 27 +- Example/Pods/Alamofire/README.md | 24 - Example/Pods/Alamofire/Source/AFError.swift | 8 - Example/Pods/Alamofire/Source/Alamofire.swift | 4 - .../Source/NetworkReachabilityManager.swift | 39 - .../Pods/Alamofire/Source/Notifications.swift | 4 - .../Alamofire/Source/ParameterEncoding.swift | 29 - Example/Pods/Alamofire/Source/Request.swift | 611 ------- Example/Pods/Alamofire/Source/Response.swift | 104 -- .../Source/ResponseSerialization.swift | 274 --- .../Alamofire/Source/SessionDelegate.swift | 137 -- .../Pods/Alamofire/Source/Validation.swift | 23 - Example/Pods/CryptoSwift/LICENSE | 11 - Example/Pods/CryptoSwift/README.md | 510 ------ .../Sources/CryptoSwift/AEAD/AEAD.swift | 40 - .../AEAD/AEADChaCha20Poly1305.swift | 59 - .../Sources/CryptoSwift/AES.Cryptors.swift | 35 - .../CryptoSwift/Sources/CryptoSwift/AES.swift | 539 ------ .../Sources/CryptoSwift/Array+Extension.swift | 148 -- .../Sources/CryptoSwift/Authenticator.swift | 20 - .../CryptoSwift/BatchedCollection.swift | 63 - .../CryptoSwift/Sources/CryptoSwift/Bit.swift | 25 - .../Sources/CryptoSwift/BlockCipher.swift | 18 - .../Sources/CryptoSwift/BlockDecryptor.swift | 85 - .../Sources/CryptoSwift/BlockEncryptor.swift | 58 - .../CryptoSwift/BlockMode/BlockMode.swift | 24 - .../BlockMode/BlockModeOptions.swift | 27 - .../Sources/CryptoSwift/BlockMode/CBC.swift | 70 - .../Sources/CryptoSwift/BlockMode/CCM.swift | 357 ---- .../Sources/CryptoSwift/BlockMode/CFB.swift | 70 - .../Sources/CryptoSwift/BlockMode/CTR.swift | 134 -- .../BlockMode/CipherModeWorker.swift | 61 - .../Sources/CryptoSwift/BlockMode/ECB.swift | 51 - .../Sources/CryptoSwift/BlockMode/GCM.swift | 370 ---- .../Sources/CryptoSwift/BlockMode/OFB.swift | 70 - .../Sources/CryptoSwift/BlockMode/PCBC.swift | 70 - .../Sources/CryptoSwift/Blowfish.swift | 537 ------ .../Sources/CryptoSwift/CBCMAC.swift | 30 - .../Sources/CryptoSwift/CMAC.swift | 104 -- .../Sources/CryptoSwift/ChaCha20.swift | 347 ---- .../Sources/CryptoSwift/Checksum.swift | 193 -- .../Sources/CryptoSwift/Cipher.swift | 47 - .../CryptoSwift/Collection+Extension.swift | 45 - .../Sources/CryptoSwift/CompactMap.swift | 23 - .../Sources/CryptoSwift/Cryptor.swift | 22 - .../Sources/CryptoSwift/Cryptors.swift | 42 - .../Sources/CryptoSwift/Digest.swift | 78 - .../Sources/CryptoSwift/DigestType.swift | 18 - .../Foundation/AES+Foundation.swift | 23 - .../Foundation/Array+Foundation.swift | 32 - .../Foundation/Blowfish+Foundation.swift | 23 - .../Foundation/ChaCha20+Foundation.swift | 22 - .../Foundation/Data+Extension.swift | 95 - .../Foundation/HMAC+Foundation.swift | 22 - .../Foundation/Rabbit+Foundation.swift | 26 - .../String+FoundationExtension.swift | 41 - .../Foundation/Utils+Foundation.swift | 27 - .../Sources/CryptoSwift/Generics.swift | 42 - .../Sources/CryptoSwift/HKDF.swift | 84 - .../Sources/CryptoSwift/HMAC.swift | 102 -- .../Sources/CryptoSwift/Int+Extension.swift | 31 - .../CryptoSwift/Sources/CryptoSwift/MD5.swift | 161 -- .../Sources/CryptoSwift/NoPadding.swift | 27 - .../Sources/CryptoSwift/Operators.swift | 32 - .../Sources/CryptoSwift/PKCS/PBKDF1.swift | 87 - .../Sources/CryptoSwift/PKCS/PBKDF2.swift | 116 -- .../Sources/CryptoSwift/PKCS/PKCS5.swift | 22 - .../Sources/CryptoSwift/PKCS/PKCS7.swift | 18 - .../CryptoSwift/PKCS/PKCS7Padding.swift | 64 - .../Sources/CryptoSwift/Padding.swift | 49 - .../Sources/CryptoSwift/Poly1305.swift | 165 -- .../Sources/CryptoSwift/Rabbit.swift | 217 --- .../Sources/CryptoSwift/SHA1.swift | 145 -- .../Sources/CryptoSwift/SHA2.swift | 345 ---- .../Sources/CryptoSwift/SHA3.swift | 289 --- .../Sources/CryptoSwift/Scrypt.swift | 256 --- .../Sources/CryptoSwift/SecureBytes.swift | 77 - .../Sources/CryptoSwift/StreamDecryptor.swift | 79 - .../Sources/CryptoSwift/StreamEncryptor.swift | 57 - .../CryptoSwift/String+Extension.swift | 81 - .../Sources/CryptoSwift/UInt128.swift | 90 - .../CryptoSwift/UInt16+Extension.swift | 37 - .../CryptoSwift/UInt32+Extension.swift | 48 - .../CryptoSwift/UInt64+Extension.swift | 43 - .../Sources/CryptoSwift/UInt8+Extension.swift | 72 - .../Sources/CryptoSwift/Updatable.swift | 97 - .../Sources/CryptoSwift/Utils.swift | 115 -- .../Sources/CryptoSwift/ZeroPadding.swift | 38 - .../Local Podspecs/RxNetwork.podspec.json | 8 - Example/Pods/Manifest.lock | 28 - Example/Pods/Pods.xcodeproj/project.pbxproj | 1601 +---------------- .../xcschemes/Alamofire.xcscheme | 60 - .../xcschemes/CleanJSON.xcscheme | 60 - .../xcschemes/CryptoSwift.xcscheme | 60 - .../xcschemes/Moya.xcscheme | 60 - .../xcschemes/Pods-RxNetwork_Example.xcscheme | 58 - .../xcschemes/Pods-RxNetwork_Tests.xcscheme | 58 - .../xcschemes/RxNetwork.xcscheme | 60 - .../xcschemes/RxSwift.xcscheme | 60 - .../xcschemes/Storable.xcscheme | 60 - .../xcschemes/SwiftyJSON.xcscheme | 60 - .../xcschemes/xcschememanagement.plist | 61 - .../xcschemes/Pods-RxNetwork_Example.xcscheme | 58 - .../xcschemes/Pods-RxNetwork_Tests.xcscheme | 58 - .../Alamofire/Alamofire-Info.plist | 4 - .../CleanJSON/CleanJSON-Info.plist | 4 - ...xNetwork_Example-acknowledgements.markdown | 3 - ...s-RxNetwork_Example-acknowledgements.plist | 3 - .../Pods-RxNetwork_Example.debug.xcconfig | 8 - .../Pods-RxNetwork_Example.release.xcconfig | 8 - .../Pods-RxNetwork_Tests.debug.xcconfig | 7 - .../Pods-RxNetwork_Tests.release.xcconfig | 7 - .../RxNetwork/RxNetwork-Info.plist | 4 - .../RxSwift/RxSwift-Info.plist | 4 - .../UserInterfaceState.xcuserstate | Bin 21245 -> 26845 bytes 116 files changed, 49 insertions(+), 11496 deletions(-) delete mode 100644 Example/Pods/CryptoSwift/LICENSE delete mode 100644 Example/Pods/CryptoSwift/README.md delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEAD.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/AES.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Array+Extension.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Authenticator.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/BatchedCollection.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Bit.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockCipher.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockMode.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CBC.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CFB.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CipherModeWorker.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/ECB.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/OFB.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/PCBC.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Blowfish.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/CMAC.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/ChaCha20.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Checksum.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Cipher.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Collection+Extension.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Cryptor.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Cryptors.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Digest.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/DigestType.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/AES+Foundation.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Array+Foundation.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Data+Extension.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/HMAC+Foundation.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/String+FoundationExtension.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Utils+Foundation.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Generics.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/HKDF.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/HMAC.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Int+Extension.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/MD5.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/NoPadding.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Operators.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF1.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF2.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS5.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7Padding.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Padding.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Poly1305.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Rabbit.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/SHA1.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/SHA2.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/SHA3.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Scrypt.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/SecureBytes.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/String+Extension.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt128.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt16+Extension.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt32+Extension.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt64+Extension.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt8+Extension.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Updatable.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/Utils.swift delete mode 100644 Example/Pods/CryptoSwift/Sources/CryptoSwift/ZeroPadding.swift delete mode 100644 Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Alamofire.xcscheme delete mode 100644 Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/CleanJSON.xcscheme delete mode 100644 Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/CryptoSwift.xcscheme delete mode 100644 Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Moya.xcscheme delete mode 100644 Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Pods-RxNetwork_Example.xcscheme delete mode 100644 Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Pods-RxNetwork_Tests.xcscheme delete mode 100644 Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/RxNetwork.xcscheme delete mode 100644 Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/RxSwift.xcscheme delete mode 100644 Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Storable.xcscheme delete mode 100644 Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/SwiftyJSON.xcscheme delete mode 100644 Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/xcschememanagement.plist delete mode 100644 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Example.xcscheme delete mode 100644 Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Tests.xcscheme diff --git a/Example/Podfile b/Example/Podfile index cc85a5d..244f772 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -8,6 +8,7 @@ target 'RxNetwork_Example' do pod 'RxNetwork/Cacheable', :path => '../' pod 'CleanJSON' + pod 'SwiftyJSON' target 'RxNetwork_Tests' do inherit! :search_paths diff --git a/Example/Podfile.lock b/Example/Podfile.lock index ebb1570..50b0dbd 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,11 +1,6 @@ PODS: -<<<<<<< HEAD - Alamofire (5.1.0) - CleanJSON (1.0.1) -======= - - Alamofire (5.0.2) - - CleanJSON (1.0.0) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 - Moya/Core (14.0.0): - Alamofire (~> 5.0) - Moya/RxSwift (14.0.0): @@ -14,20 +9,16 @@ PODS: - RxNetwork/Cacheable (1.0.2): - RxNetwork/Core - Storable -<<<<<<< HEAD - RxNetwork/Core (1.0.2): - Moya/RxSwift - RxSwift (5.1.1) -======= - - RxNetwork/Core (1.0.1-beta): - - Moya/RxSwift - - RxSwift (5.1.0) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 - Storable (0.1.1) + - SwiftyJSON (5.0.0) DEPENDENCIES: - CleanJSON - RxNetwork/Cacheable (from `../`) + - SwiftyJSON SPEC REPOS: https://github.com/CocoaPods/Specs.git: @@ -36,31 +27,21 @@ SPEC REPOS: - Moya - RxSwift - Storable + - SwiftyJSON EXTERNAL SOURCES: RxNetwork: :path: "../" SPEC CHECKSUMS: -<<<<<<< HEAD Alamofire: 9d5c5f602928e512395b30950c5984eca840093c CleanJSON: 6fd9a37e489a673adf9c8ebd7b67aff21a582163 Moya: 5b45dacb75adb009f97fde91c204c1e565d31916 RxNetwork: b14e08b1ed874a0379496065be43ef0ee1ac0adb RxSwift: 81470a2074fa8780320ea5fe4102807cb7118178 -======= - Alamofire: 3ba7a4db18b4f62c4a1c0e1cb39d7f3d52e10ada - CleanJSON: 702dd619e1329c6399a579aa19af311acf47e461 - Moya: 5b45dacb75adb009f97fde91c204c1e565d31916 - RxNetwork: 35dde92da369c66de7388fd20d890af62d88a3c0 - RxSwift: ad5874f24bb0dbffd1e9bb8443604e3578796c7a ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 Storable: 31d19a4f897d68d1f1843604b60e12e5c2e1db5f + SwiftyJSON: 36413e04c44ee145039d332b4f4e2d3e8d6c4db7 -<<<<<<< HEAD PODFILE CHECKSUM: edbf480731555a2abe025f46b0d227d10858fda9 -======= -PODFILE CHECKSUM: 55ef45f06eb8678df19475a2299c1eb3e944f16c ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 COCOAPODS: 1.9.1 diff --git a/Example/Pods/Alamofire/README.md b/Example/Pods/Alamofire/README.md index 4dff4e4..0d730d1 100644 --- a/Example/Pods/Alamofire/README.md +++ b/Example/Pods/Alamofire/README.md @@ -58,13 +58,8 @@ In order to keep Alamofire focused specifically on core networking implementatio ## Requirements - iOS 10.0+ / macOS 10.12+ / tvOS 10.0+ / watchOS 3.0+ -<<<<<<< HEAD - Xcode 11+ - Swift 5.1+ -======= -- Xcode 10.2+ -- Swift 5+ ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ## Migration Guides @@ -89,11 +84,7 @@ In order to keep Alamofire focused specifically on core networking implementatio [CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`: ```ruby -<<<<<<< HEAD pod 'Alamofire', '~> 5.1' -======= -pod 'Alamofire', '~> 5.0' ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ``` ### Carthage @@ -101,11 +92,7 @@ pod 'Alamofire', '~> 5.0' [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`: ```ogdl -<<<<<<< HEAD github "Alamofire/Alamofire" ~> 5.1 -======= -github "Alamofire/Alamofire" "5.0" ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ``` ### Swift Package Manager @@ -116,11 +103,7 @@ Once you have your Swift package set up, adding Alamofire as a dependency is as ```swift dependencies: [ -<<<<<<< HEAD .package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.1.0")) -======= - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "5.0") ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ] ``` @@ -169,10 +152,7 @@ The following radars have some effect on the current implementation of Alamofire - [`rdar://21349340`](http://www.openradar.me/radar?id=5517037090635776) - Compiler throwing warning due to toll-free bridging issue in test case - `rdar://26870455` - Background URL Session Configurations do not work in the simulator - `rdar://26849668` - Some URLProtocol APIs do not properly handle `URLRequest` -<<<<<<< HEAD - `FB7624529` - `urlSession(_:task:didFinishCollecting:)` never called on watchOS -======= ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ## Resolved Radars @@ -182,15 +162,11 @@ The following radars have been resolved over time after being filed against the - (Resolved): 9/1/17 in Xcode 9 beta 6. - [`rdar://36082113`](http://openradar.appspot.com/radar?id=4942308441063424) - `URLSessionTaskMetrics` failing to link on watchOS 3.0+ - (Resolved): Just add `CFNetwork` to your linked frameworks. -<<<<<<< HEAD ## Workarounds - Collection of `URLSessionTaskMetrics` is currently disabled on watchOS due to `FB7624529`. -======= - ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ## FAQ ### What's the origin of the name Alamofire? diff --git a/Example/Pods/Alamofire/Source/AFError.swift b/Example/Pods/Alamofire/Source/AFError.swift index 7dcb81e..59c8deb 100644 --- a/Example/Pods/Alamofire/Source/AFError.swift +++ b/Example/Pods/Alamofire/Source/AFError.swift @@ -215,11 +215,7 @@ public enum AFError: Error { extension Error { /// Returns the instance cast as an `AFError`. public var asAFError: AFError? { -<<<<<<< HEAD self as? AFError -======= - return self as? AFError ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } /// Returns the instance cast as an `AFError`. If casting fails, a `fatalError` with the specified `message` is thrown. @@ -232,11 +228,7 @@ extension Error { /// Casts the instance as `AFError` or returns `defaultAFError` func asAFError(or defaultAFError: @autoclosure () -> AFError) -> AFError { -<<<<<<< HEAD self as? AFError ?? defaultAFError() -======= - return self as? AFError ?? defaultAFError() ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } } diff --git a/Example/Pods/Alamofire/Source/Alamofire.swift b/Example/Pods/Alamofire/Source/Alamofire.swift index f51d0db..21166ad 100644 --- a/Example/Pods/Alamofire/Source/Alamofire.swift +++ b/Example/Pods/Alamofire/Source/Alamofire.swift @@ -26,8 +26,4 @@ public let AF = Session.default /// Current Alamofire version. Necessary since SPM doesn't use dynamic libraries. Plus this will be more accurate. -<<<<<<< HEAD let version = "5.1.0" -======= -let version = "5.0.2" ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 diff --git a/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift b/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift index b0eb5c1..fe3728e 100644 --- a/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift +++ b/Example/Pods/Alamofire/Source/NetworkReachabilityManager.swift @@ -72,28 +72,17 @@ open class NetworkReachabilityManager { // MARK: - Properties /// Whether the network is currently reachable. -<<<<<<< HEAD open var isReachable: Bool { isReachableOnCellular || isReachableOnEthernetOrWiFi } -======= - open var isReachable: Bool { return isReachableOnCellular || isReachableOnEthernetOrWiFi } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 /// Whether the network is currently reachable over the cellular interface. /// /// - Note: Using this property to decide whether to make a high or low bandwidth request is not recommended. /// Instead, set the `allowsCellularAccess` on any `URLRequest`s being issued. /// -<<<<<<< HEAD open var isReachableOnCellular: Bool { status == .reachable(.cellular) } /// Whether the network is currently reachable over Ethernet or WiFi interface. open var isReachableOnEthernetOrWiFi: Bool { status == .reachable(.ethernetOrWiFi) } -======= - open var isReachableOnCellular: Bool { return status == .reachable(.cellular) } - - /// Whether the network is currently reachable over Ethernet or WiFi interface. - open var isReachableOnEthernetOrWiFi: Bool { return status == .reachable(.ethernetOrWiFi) } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 /// `DispatchQueue` on which reachability will update. public let reachabilityQueue = DispatchQueue(label: "org.alamofire.reachabilityQueue") @@ -107,11 +96,7 @@ open class NetworkReachabilityManager { /// The current network reachability status. open var status: NetworkReachabilityStatus { -<<<<<<< HEAD flags.map(NetworkReachabilityStatus.init) ?? .unknown -======= - return flags.map(NetworkReachabilityStatus.init) ?? .unknown ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } /// Mutable state storage. @@ -128,12 +113,8 @@ open class NetworkReachabilityManager { private let reachability: SCNetworkReachability /// Protected storage for mutable state. -<<<<<<< HEAD @Protected private var mutableState = MutableState() -======= - private let mutableState = Protector(MutableState()) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 // MARK: - Initialization @@ -187,11 +168,7 @@ open class NetworkReachabilityManager { onUpdatePerforming listener: @escaping Listener) -> Bool { stopListening() -<<<<<<< HEAD $mutableState.write { state in -======= - mutableState.write { state in ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 state.listenerQueue = queue state.listener = listener } @@ -225,11 +202,7 @@ open class NetworkReachabilityManager { open func stopListening() { SCNetworkReachabilitySetCallback(reachability, nil, nil) SCNetworkReachabilitySetDispatchQueue(reachability, nil) -<<<<<<< HEAD $mutableState.write { state in -======= - mutableState.write { state in ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 state.listener = nil state.listenerQueue = nil state.previousStatus = nil @@ -246,11 +219,7 @@ open class NetworkReachabilityManager { func notifyListener(_ flags: SCNetworkReachabilityFlags) { let newStatus = NetworkReachabilityStatus(flags) -<<<<<<< HEAD $mutableState.write { state in -======= - mutableState.write { state in ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 guard state.previousStatus != newStatus else { return } state.previousStatus = newStatus @@ -266,19 +235,11 @@ open class NetworkReachabilityManager { extension NetworkReachabilityManager.NetworkReachabilityStatus: Equatable {} extension SCNetworkReachabilityFlags { -<<<<<<< HEAD var isReachable: Bool { contains(.reachable) } var isConnectionRequired: Bool { contains(.connectionRequired) } var canConnectAutomatically: Bool { contains(.connectionOnDemand) || contains(.connectionOnTraffic) } var canConnectWithoutUserInteraction: Bool { canConnectAutomatically && !contains(.interventionRequired) } var isActuallyReachable: Bool { isReachable && (!isConnectionRequired || canConnectWithoutUserInteraction) } -======= - var isReachable: Bool { return contains(.reachable) } - var isConnectionRequired: Bool { return contains(.connectionRequired) } - var canConnectAutomatically: Bool { return contains(.connectionOnDemand) || contains(.connectionOnTraffic) } - var canConnectWithoutUserInteraction: Bool { return canConnectAutomatically && !contains(.interventionRequired) } - var isActuallyReachable: Bool { return isReachable && (!isConnectionRequired || canConnectWithoutUserInteraction) } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 var isCellular: Bool { #if os(iOS) || os(tvOS) return contains(.isWWAN) diff --git a/Example/Pods/Alamofire/Source/Notifications.swift b/Example/Pods/Alamofire/Source/Notifications.swift index 354f3ee..3c0f192 100644 --- a/Example/Pods/Alamofire/Source/Notifications.swift +++ b/Example/Pods/Alamofire/Source/Notifications.swift @@ -49,11 +49,7 @@ public extension Request { extension Notification { /// The `Request` contained by the instance's `userInfo`, `nil` otherwise. public var request: Request? { -<<<<<<< HEAD userInfo?[String.requestKey] as? Request -======= - return userInfo?[String.requestKey] as? Request ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } /// Convenience initializer for a `Notification` containing a `Request` payload. diff --git a/Example/Pods/Alamofire/Source/ParameterEncoding.swift b/Example/Pods/Alamofire/Source/ParameterEncoding.swift index 5a3adbb..32fd061 100644 --- a/Example/Pods/Alamofire/Source/ParameterEncoding.swift +++ b/Example/Pods/Alamofire/Source/ParameterEncoding.swift @@ -30,19 +30,11 @@ public typealias Parameters = [String: Any] /// A type used to define how a set of parameters are applied to a `URLRequest`. public protocol ParameterEncoding { /// Creates a `URLRequest` by encoding parameters and applying them on the passed request. -<<<<<<< HEAD /// /// - Parameters: /// - urlRequest: `URLRequestConvertible` value onto which parameters will be encoded. /// - parameters: `Parameters` to encode onto the request. /// -======= - /// - /// - Parameters: - /// - urlRequest: `URLRequestConvertible` value onto which parameters will be encoded. - /// - parameters: `Parameters` to encode onto the request. - /// ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 /// - Returns: The encoded `URLRequest`. /// - Throws: Any `Error` produced during parameter encoding. func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest @@ -124,11 +116,7 @@ public struct URLEncoding: ParameterEncoding { // MARK: Properties /// Returns a default `URLEncoding` instance with a `.methodDependent` destination. -<<<<<<< HEAD public static var `default`: URLEncoding { URLEncoding() } -======= - public static var `default`: URLEncoding { return URLEncoding() } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 /// Returns a `URLEncoding` instance with a `.queryString` destination. public static var queryString: URLEncoding { URLEncoding(destination: .queryString) } @@ -224,21 +212,12 @@ public struct URLEncoding: ParameterEncoding { } /// Creates a percent-escaped string following RFC 3986 for a query string key or value. -<<<<<<< HEAD /// /// - Parameter string: `String` to be percent-escaped. /// /// - Returns: The percent-escaped `String`. public func escape(_ string: String) -> String { string.addingPercentEncoding(withAllowedCharacters: .afURLQueryAllowed) ?? string -======= - /// - /// - Parameter string: `String` to be percent-escaped. - /// - /// - Returns: The percent-escaped `String`. - public func escape(_ string: String) -> String { - return string.addingPercentEncoding(withAllowedCharacters: .afURLQueryAllowed) ?? string ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } private func query(_ parameters: [String: Any]) -> String { @@ -300,19 +279,11 @@ public struct JSONEncoding: ParameterEncoding { } /// Encodes any JSON compatible object into a `URLRequest`. -<<<<<<< HEAD - /// - /// - Parameters: - /// - urlRequest: `URLRequestConvertible` value into which the object will be encoded. - /// - jsonObject: `Any` value (must be JSON compatible` to be encoded into the `URLRequest`. `nil` by default. - /// -======= /// /// - Parameters: /// - urlRequest: `URLRequestConvertible` value into which the object will be encoded. /// - jsonObject: `Any` value (must be JSON compatible` to be encoded into the `URLRequest`. `nil` by default. /// ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 /// - Returns: The encoded `URLRequest`. /// - Throws: Any `Error` produced during encoding. public func encode(_ urlRequest: URLRequestConvertible, withJSONObject jsonObject: Any? = nil) throws -> URLRequest { diff --git a/Example/Pods/Alamofire/Source/Request.swift b/Example/Pods/Alamofire/Source/Request.swift index 3d84488..1187a66 100644 --- a/Example/Pods/Alamofire/Source/Request.swift +++ b/Example/Pods/Alamofire/Source/Request.swift @@ -113,7 +113,6 @@ public class Request { var retryCount = 0 /// Final `AFError` for the `Request`, whether from various internal Alamofire calls or as a result of a `task`. var error: AFError? -<<<<<<< HEAD /// Whether the instance has had `finish()` called and is running the serializers. Should be replaced with a /// representation in the state machine in the future. var isFinishing = false @@ -135,25 +134,6 @@ public class Request { public var isCancelled: Bool { state == .cancelled } /// Returns whether `state` is `.finished`. public var isFinished: Bool { state == .finished } -======= - } - - /// Protected `MutableState` value that provides thread-safe access to state values. - fileprivate let protectedMutableState: Protector = Protector(MutableState()) - - /// `State` of the `Request`. - public var state: State { return protectedMutableState.directValue.state } - /// Returns whether `state` is `.initialized`. - public var isInitialized: Bool { return state == .initialized } - /// Returns whether `state is `.resumed`. - public var isResumed: Bool { return state == .resumed } - /// Returns whether `state` is `.suspended`. - public var isSuspended: Bool { return state == .suspended } - /// Returns whether `state` is `.cancelled`. - public var isCancelled: Bool { return state == .cancelled } - /// Returns whether `state` is `.finished`. - public var isFinished: Bool { return state == .finished } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 // MARK: Progress @@ -166,79 +146,49 @@ public class Request { public let downloadProgress = Progress(totalUnitCount: 0) /// `ProgressHandler` called when `uploadProgress` is updated, on the provided `DispatchQueue`. fileprivate var uploadProgressHandler: (handler: ProgressHandler, queue: DispatchQueue)? { -<<<<<<< HEAD get { mutableState.uploadProgressHandler } set { mutableState.uploadProgressHandler = newValue } -======= - get { return protectedMutableState.directValue.uploadProgressHandler } - set { protectedMutableState.write { $0.uploadProgressHandler = newValue } } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } /// `ProgressHandler` called when `downloadProgress` is updated, on the provided `DispatchQueue`. fileprivate var downloadProgressHandler: (handler: ProgressHandler, queue: DispatchQueue)? { -<<<<<<< HEAD get { mutableState.downloadProgressHandler } set { mutableState.downloadProgressHandler = newValue } -======= - get { return protectedMutableState.directValue.downloadProgressHandler } - set { protectedMutableState.write { $0.downloadProgressHandler = newValue } } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } // MARK: Redirect Handling /// `RedirectHandler` set on the instance. public private(set) var redirectHandler: RedirectHandler? { -<<<<<<< HEAD get { mutableState.redirectHandler } set { mutableState.redirectHandler = newValue } -======= - get { return protectedMutableState.directValue.redirectHandler } - set { protectedMutableState.write { $0.redirectHandler = newValue } } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } // MARK: Cached Response Handling /// `CachedResponseHandler` set on the instance. public private(set) var cachedResponseHandler: CachedResponseHandler? { -<<<<<<< HEAD get { mutableState.cachedResponseHandler } set { mutableState.cachedResponseHandler = newValue } -======= - get { return protectedMutableState.directValue.cachedResponseHandler } - set { protectedMutableState.write { $0.cachedResponseHandler = newValue } } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } // MARK: URLCredential /// `URLCredential` used for authentication challenges. Created by calling one of the `authenticate` methods. public private(set) var credential: URLCredential? { -<<<<<<< HEAD get { mutableState.credential } set { mutableState.credential = newValue } -======= - get { return protectedMutableState.directValue.credential } - set { protectedMutableState.write { $0.credential = newValue } } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } // MARK: Validators /// `Validator` callback closures that store the validation calls enqueued. -<<<<<<< HEAD @Protected fileprivate var validators: [() -> Void] = [] -======= - fileprivate var protectedValidators: Protector<[() -> Void]> = Protector([]) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 // MARK: URLRequests /// All `URLRequests` created on behalf of the `Request`, including original and adapted requests. -<<<<<<< HEAD public var requests: [URLRequest] { mutableState.requests } /// First `URLRequest` created on behalf of the `Request`. May not be the first one actually executed. public var firstRequest: URLRequest? { requests.first } @@ -250,36 +200,16 @@ public class Request { /// `URLRequest`s from all of the `URLSessionTask`s executed on behalf of the `Request`. May be different from /// `requests` due to `URLSession` manipulation. public var performedRequests: [URLRequest] { $mutableState.read { $0.tasks.compactMap { $0.currentRequest } } } -======= - public var requests: [URLRequest] { return protectedMutableState.directValue.requests } - /// First `URLRequest` created on behalf of the `Request`. May not be the first one actually executed. - public var firstRequest: URLRequest? { return requests.first } - /// Last `URLRequest` created on behalf of the `Request`. - public var lastRequest: URLRequest? { return requests.last } - /// Current `URLRequest` created on behalf of the `Request`. - public var request: URLRequest? { return lastRequest } - - /// `URLRequest`s from all of the `URLSessionTask`s executed on behalf of the `Request`. May be different from - /// `requests` due to `URLSession` manipulation. - public var performedRequests: [URLRequest] { - return protectedMutableState.read { $0.tasks.compactMap { $0.currentRequest } } - } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 // MARK: HTTPURLResponse /// `HTTPURLResponse` received from the server, if any. If the `Request` was retried, this is the response of the /// last `URLSessionTask`. -<<<<<<< HEAD public var response: HTTPURLResponse? { lastTask?.response as? HTTPURLResponse } -======= - public var response: HTTPURLResponse? { return lastTask?.response as? HTTPURLResponse } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 // MARK: Tasks /// All `URLSessionTask`s created on behalf of the `Request`. -<<<<<<< HEAD public var tasks: [URLSessionTask] { mutableState.tasks } /// First `URLSessionTask` created on behalf of the `Request`. public var firstTask: URLSessionTask? { tasks.first } @@ -287,20 +217,10 @@ public class Request { public var lastTask: URLSessionTask? { tasks.last } /// Current `URLSessionTask` created on behalf of the `Request`. public var task: URLSessionTask? { lastTask } -======= - public var tasks: [URLSessionTask] { return protectedMutableState.directValue.tasks } - /// First `URLSessionTask` created on behalf of the `Request`. - public var firstTask: URLSessionTask? { return tasks.first } - /// Last `URLSessionTask` crated on behalf of the `Request`. - public var lastTask: URLSessionTask? { return tasks.last } - /// Current `URLSessionTask` created on behalf of the `Request`. - public var task: URLSessionTask? { return lastTask } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 // MARK: Metrics /// All `URLSessionTaskMetrics` gathered on behalf of the `Request`. Should correspond to the `tasks` created. -<<<<<<< HEAD public var allMetrics: [URLSessionTaskMetrics] { mutableState.metrics } /// First `URLSessionTaskMetrics` gathered on behalf of the `Request`. public var firstMetrics: URLSessionTaskMetrics? { allMetrics.first } @@ -308,36 +228,18 @@ public class Request { public var lastMetrics: URLSessionTaskMetrics? { allMetrics.last } /// Current `URLSessionTaskMetrics` gathered on behalf of the `Request`. public var metrics: URLSessionTaskMetrics? { lastMetrics } -======= - public var allMetrics: [URLSessionTaskMetrics] { return protectedMutableState.directValue.metrics } - /// First `URLSessionTaskMetrics` gathered on behalf of the `Request`. - public var firstMetrics: URLSessionTaskMetrics? { return allMetrics.first } - /// Last `URLSessionTaskMetrics` gathered on behalf of the `Request`. - public var lastMetrics: URLSessionTaskMetrics? { return allMetrics.last } - /// Current `URLSessionTaskMetrics` gathered on behalf of the `Request`. - public var metrics: URLSessionTaskMetrics? { return lastMetrics } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 // MARK: Retry Count /// Number of times the `Request` has been retried. -<<<<<<< HEAD public var retryCount: Int { mutableState.retryCount } -======= - public var retryCount: Int { return protectedMutableState.directValue.retryCount } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 // MARK: Error /// `Error` returned from Alamofire internally, from the network request directly, or any validators executed. public fileprivate(set) var error: AFError? { -<<<<<<< HEAD get { mutableState.error } set { mutableState.error = newValue } -======= - get { return protectedMutableState.directValue.error } - set { protectedMutableState.write { $0.error = newValue } } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } /// Default initializer for the `Request` superclass. @@ -373,13 +275,9 @@ public class Request { /// /// - Parameter request: The `URLRequest` created. func didCreateInitialURLRequest(_ request: URLRequest) { -<<<<<<< HEAD dispatchPrecondition(condition: .onQueue(underlyingQueue)) $mutableState.write { $0.requests.append(request) } -======= - protectedMutableState.write { $0.requests.append(request) } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 eventMonitor?.request(self, didCreateInitialURLRequest: request) } @@ -390,40 +288,26 @@ public class Request { /// /// - Parameter error: `AFError` thrown from the failed creation. func didFailToCreateURLRequest(with error: AFError) { -<<<<<<< HEAD dispatchPrecondition(condition: .onQueue(underlyingQueue)) -======= ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 self.error = error eventMonitor?.request(self, didFailToCreateURLRequestWithError: error) callCURLHandlerIfNecessary() -<<<<<<< HEAD - - retryOrFinish(error: error) - } - -======= retryOrFinish(error: error) } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 /// Called when a `RequestAdapter` has successfully adapted a `URLRequest`. /// /// - Parameters: /// - initialRequest: The `URLRequest` that was adapted. /// - adaptedRequest: The `URLRequest` returned by the `RequestAdapter`. func didAdaptInitialRequest(_ initialRequest: URLRequest, to adaptedRequest: URLRequest) { -<<<<<<< HEAD dispatchPrecondition(condition: .onQueue(underlyingQueue)) $mutableState.write { $0.requests.append(adaptedRequest) } -======= - protectedMutableState.write { $0.requests.append(adaptedRequest) } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 eventMonitor?.request(self, didAdaptInitialRequest: initialRequest, to: adaptedRequest) } @@ -436,7 +320,6 @@ public class Request { /// - request: The `URLRequest` the adapter was called with. /// - error: The `AFError` returned by the `RequestAdapter`. func didFailToAdaptURLRequest(_ request: URLRequest, withError error: AFError) { -<<<<<<< HEAD dispatchPrecondition(condition: .onQueue(underlyingQueue)) self.error = error @@ -454,21 +337,6 @@ public class Request { func didCreateURLRequest(_ request: URLRequest) { dispatchPrecondition(condition: .onQueue(underlyingQueue)) -======= - self.error = error - - eventMonitor?.request(self, didFailToAdaptURLRequest: request, withError: error) - - callCURLHandlerIfNecessary() - - retryOrFinish(error: error) - } - - /// Final `URLRequest` has been created for the instance. - /// - /// - Parameter request: The `URLRequest` created. - func didCreateURLRequest(_ request: URLRequest) { ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 eventMonitor?.request(self, didCreateURLRequest: request) callCURLHandlerIfNecessary() @@ -476,18 +344,13 @@ public class Request { /// Asynchronously calls any stored `cURLHandler` and then removes it from `mutableState`. private func callCURLHandlerIfNecessary() { -<<<<<<< HEAD $mutableState.write { mutableState in -======= - protectedMutableState.write { mutableState in ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 guard let cURLHandler = mutableState.cURLHandler else { return } self.underlyingQueue.async { cURLHandler(self.cURLDescription()) } mutableState.cURLHandler = nil } } -<<<<<<< HEAD /// Called when a `URLSessionTask` is created on behalf of the instance. /// @@ -520,32 +383,6 @@ public class Request { func didSuspend() { dispatchPrecondition(condition: .onQueue(underlyingQueue)) -======= - - /// Called when a `URLSessionTask` is created on behalf of the instance. - /// - /// - Parameter task: The `URLSessionTask` created. - func didCreateTask(_ task: URLSessionTask) { - protectedMutableState.write { $0.tasks.append(task) } - - eventMonitor?.request(self, didCreateTask: task) - } - - /// Called when resumption is completed. - func didResume() { - eventMonitor?.requestDidResume(self) - } - - /// Called when a `URLSessionTask` is resumed on behalf of the instance. - /// - /// - Parameter task: The `URLSessionTask` resumed. - func didResumeTask(_ task: URLSessionTask) { - eventMonitor?.request(self, didResumeTask: task) - } - - /// Called when suspension is completed. - func didSuspend() { ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 eventMonitor?.requestDidSuspend(self) } @@ -553,23 +390,16 @@ public class Request { /// /// - Parameter task: The `URLSessionTask` suspended. func didSuspendTask(_ task: URLSessionTask) { -<<<<<<< HEAD dispatchPrecondition(condition: .onQueue(underlyingQueue)) -======= ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 eventMonitor?.request(self, didSuspendTask: task) } /// Called when cancellation is completed, sets `error` to `AFError.explicitlyCancelled`. func didCancel() { -<<<<<<< HEAD dispatchPrecondition(condition: .onQueue(underlyingQueue)) error = error ?? AFError.explicitlyCancelled -======= - error = AFError.explicitlyCancelled ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 eventMonitor?.requestDidCancel(self) } @@ -578,11 +408,8 @@ public class Request { /// /// - Parameter task: The `URLSessionTask` cancelled. func didCancelTask(_ task: URLSessionTask) { -<<<<<<< HEAD dispatchPrecondition(condition: .onQueue(underlyingQueue)) -======= ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 eventMonitor?.request(self, didCancelTask: task) } @@ -590,13 +417,9 @@ public class Request { /// /// - Parameter metrics: The `URLSessionTaskMetrics` gathered. func didGatherMetrics(_ metrics: URLSessionTaskMetrics) { -<<<<<<< HEAD dispatchPrecondition(condition: .onQueue(underlyingQueue)) $mutableState.write { $0.metrics.append(metrics) } -======= - protectedMutableState.write { $0.metrics.append(metrics) } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 eventMonitor?.request(self, didGatherMetrics: metrics) } @@ -607,11 +430,8 @@ public class Request { /// - task: The `URLSessionTask` which failed. /// - error: The early failure `AFError`. func didFailTask(_ task: URLSessionTask, earlyWithError error: AFError) { -<<<<<<< HEAD dispatchPrecondition(condition: .onQueue(underlyingQueue)) -======= ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 self.error = error // Task will still complete, so didCompleteTask(_:with:) will handle retry. @@ -627,7 +447,6 @@ public class Request { /// - error: The `AFError` `task` may have completed with. If `error` has already been set on the instance, this /// value is ignored. func didCompleteTask(_ task: URLSessionTask, with error: AFError?) { -<<<<<<< HEAD dispatchPrecondition(condition: .onQueue(underlyingQueue)) self.error = self.error ?? error @@ -644,19 +463,6 @@ public class Request { dispatchPrecondition(condition: .onQueue(underlyingQueue)) $mutableState.write { $0.retryCount += 1 } -======= - self.error = self.error ?? error - protectedValidators.directValue.forEach { $0() } - - eventMonitor?.request(self, didCompleteTask: task, with: error) - - retryOrFinish(error: self.error) - } - - /// Called when the `RequestDelegate` is going to retry this `Request`. Calls `reset()`. - func prepareForRetry() { - protectedMutableState.write { $0.retryCount += 1 } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 reset() @@ -668,11 +474,8 @@ public class Request { /// /// - Parameter error: The possible `AFError` which may trigger retry. func retryOrFinish(error: AFError?) { -<<<<<<< HEAD dispatchPrecondition(condition: .onQueue(underlyingQueue)) -======= ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 guard let error = error, let delegate = delegate else { finish(); return } delegate.retryResult(for: self, dueTo: error) { retryResult in @@ -691,15 +494,12 @@ public class Request { /// /// - Parameter error: The possible `Error` with which the instance will finish. func finish(error: AFError? = nil) { -<<<<<<< HEAD dispatchPrecondition(condition: .onQueue(underlyingQueue)) guard !mutableState.isFinishing else { return } mutableState.isFinishing = true -======= ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 if let error = error { self.error = error } // Start response handlers @@ -714,11 +514,7 @@ public class Request { /// /// - Parameter closure: The closure containing the response serialization call. func appendResponseSerializer(_ closure: @escaping () -> Void) { -<<<<<<< HEAD $mutableState.write { mutableState in -======= - protectedMutableState.write { mutableState in ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 mutableState.responseSerializers.append(closure) if mutableState.state == .finished { @@ -741,11 +537,7 @@ public class Request { func nextResponseSerializer() -> (() -> Void)? { var responseSerializer: (() -> Void)? -<<<<<<< HEAD $mutableState.write { mutableState in -======= - protectedMutableState.write { mutableState in ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 let responseSerializerIndex = mutableState.responseSerializerCompletions.count if responseSerializerIndex < mutableState.responseSerializers.count { @@ -762,11 +554,7 @@ public class Request { // Execute all response serializer completions and clear them var completions: [() -> Void] = [] -<<<<<<< HEAD $mutableState.write { mutableState in -======= - protectedMutableState.write { mutableState in ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 completions = mutableState.responseSerializerCompletions // Clear out all response serializers and response serializer completions in mutable state since the @@ -781,10 +569,7 @@ public class Request { } mutableState.responseSerializerProcessingFinished = true -<<<<<<< HEAD mutableState.isFinishing = false -======= ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } completions.forEach { $0() } @@ -803,11 +588,7 @@ public class Request { /// - Parameter completion: The completion handler provided with the response serializer, called when all serializers /// are complete. func responseSerializerDidComplete(completion: @escaping () -> Void) { -<<<<<<< HEAD $mutableState.write { $0.responseSerializerCompletions.append(completion) } -======= - protectedMutableState.write { $0.responseSerializerCompletions.append(completion) } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 processNextResponseSerializer() } @@ -820,14 +601,10 @@ public class Request { downloadProgress.totalUnitCount = 0 downloadProgress.completedUnitCount = 0 -<<<<<<< HEAD $mutableState.write { state in state.isFinishing = false state.responseSerializerCompletions = [] } -======= - protectedMutableState.write { $0.responseSerializerCompletions = [] } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } /// Called when updating the upload progress. @@ -846,11 +623,7 @@ public class Request { /// /// - Parameter perform: The closure to perform. func withState(perform: (State) -> Void) { -<<<<<<< HEAD $mutableState.withState(perform: perform) -======= - protectedMutableState.withState(perform: perform) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } // MARK: Task Creation @@ -860,7 +633,6 @@ public class Request { /// - Parameters: /// - request: `URLRequest` to use to create the `URLSessionTask`. /// - session: `URLSession` which creates the `URLSessionTask`. -<<<<<<< HEAD /// /// - Returns: The `URLSessionTask` created. func task(for request: URLRequest, using session: URLSession) -> URLSessionTask { @@ -879,26 +651,6 @@ public class Request { @discardableResult public func cancel() -> Self { $mutableState.write { mutableState in -======= - /// - /// - Returns: The `URLSessionTask` created. - func task(for request: URLRequest, using session: URLSession) -> URLSessionTask { - fatalError("Subclasses must override.") - } - - // MARK: - Public API - - // These APIs are callable from any queue. - - // MARK: State - - /// Cancels the instance. Once cancelled, a `Request` can no longer be resumed or suspended. - /// - /// - Returns: The instance. - @discardableResult - public func cancel() -> Self { - protectedMutableState.write { mutableState in ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 guard mutableState.state.canTransitionTo(.cancelled) else { return } mutableState.state = .cancelled @@ -924,17 +676,12 @@ public class Request { /// - Returns: The instance. @discardableResult public func suspend() -> Self { -<<<<<<< HEAD $mutableState.write { mutableState in -======= - protectedMutableState.write { mutableState in ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 guard mutableState.state.canTransitionTo(.suspended) else { return } mutableState.state = .suspended underlyingQueue.async { self.didSuspend() } -<<<<<<< HEAD guard let task = mutableState.tasks.last, task.state != .completed else { return } @@ -942,15 +689,6 @@ public class Request { underlyingQueue.async { self.didSuspendTask(task) } } -======= - - guard let task = mutableState.tasks.last, task.state != .completed else { return } - - task.suspend() - underlyingQueue.async { self.didSuspendTask(task) } - } - ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 return self } @@ -959,7 +697,6 @@ public class Request { /// - Returns: The instance. @discardableResult public func resume() -> Self { -<<<<<<< HEAD $mutableState.write { mutableState in guard mutableState.state.canTransitionTo(.resumed) else { return } @@ -973,21 +710,6 @@ public class Request { underlyingQueue.async { self.didResumeTask(task) } } -======= - protectedMutableState.write { mutableState in - guard mutableState.state.canTransitionTo(.resumed) else { return } - - mutableState.state = .resumed - - underlyingQueue.async { self.didResume() } - - guard let task = mutableState.tasks.last, task.state != .completed else { return } - - task.resume() - underlyingQueue.async { self.didResumeTask(task) } - } - ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 return self } @@ -1015,11 +737,7 @@ public class Request { /// - Returns: The instance. @discardableResult public func authenticate(with credential: URLCredential) -> Self { -<<<<<<< HEAD mutableState.credential = credential -======= - protectedMutableState.write { $0.credential = credential } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 return self } @@ -1035,11 +753,7 @@ public class Request { /// - Returns: The instance. @discardableResult public func downloadProgress(queue: DispatchQueue = .main, closure: @escaping ProgressHandler) -> Self { -<<<<<<< HEAD mutableState.downloadProgressHandler = (handler: closure, queue: queue) -======= - protectedMutableState.write { $0.downloadProgressHandler = (handler: closure, queue: queue) } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 return self } @@ -1055,7 +769,6 @@ public class Request { /// - Returns: The instance. @discardableResult public func uploadProgress(queue: DispatchQueue = .main, closure: @escaping ProgressHandler) -> Self { -<<<<<<< HEAD mutableState.uploadProgressHandler = (handler: closure, queue: queue) return self @@ -1063,15 +776,6 @@ public class Request { // MARK: Redirects -======= - protectedMutableState.write { $0.uploadProgressHandler = (handler: closure, queue: queue) } - - return self - } - - // MARK: Redirects - ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 /// Sets the redirect handler for the instance which will be used if a redirect response is encountered. /// /// - Note: Attempting to set the redirect handler more than once is a logic error and will crash. @@ -1081,11 +785,7 @@ public class Request { /// - Returns: The instance. @discardableResult public func redirect(using handler: RedirectHandler) -> Self { -<<<<<<< HEAD $mutableState.write { mutableState in -======= - protectedMutableState.write { mutableState in ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 precondition(mutableState.redirectHandler == nil, "Redirect handler has already been set.") mutableState.redirectHandler = handler } @@ -1104,11 +804,7 @@ public class Request { /// - Returns: The instance. @discardableResult public func cacheResponse(using handler: CachedResponseHandler) -> Self { -<<<<<<< HEAD $mutableState.write { mutableState in -======= - protectedMutableState.write { mutableState in ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 precondition(mutableState.cachedResponseHandler == nil, "Cached response handler has already been set.") mutableState.cachedResponseHandler = handler } @@ -1125,11 +821,7 @@ public class Request { /// - Returns: The instance. @discardableResult public func cURLDescription(calling handler: @escaping (String) -> Void) -> Self { -<<<<<<< HEAD $mutableState.write { mutableState in -======= - protectedMutableState.write { mutableState in ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 if mutableState.requests.last != nil { underlyingQueue.async { handler(self.cURLDescription()) } } else { @@ -1153,11 +845,7 @@ public class Request { extension Request: Equatable { public static func ==(lhs: Request, rhs: Request) -> Bool { -<<<<<<< HEAD lhs.id == rhs.id -======= - return lhs.id == rhs.id ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } } @@ -1284,7 +972,6 @@ public protocol RequestDelegate: AnyObject { /// - timeDelay: `TimeInterval` after which the retry will be triggered. func retryRequest(_ request: Request, withDelay timeDelay: TimeInterval?) } -<<<<<<< HEAD // MARK: - Subclasses @@ -1392,74 +1079,9 @@ public class DataRequest: Request { $validators.write { $0.append(validator) } return self -======= - -// MARK: - Subclasses - -// MARK: - DataRequest - -/// `Request` subclass which handles in-memory `Data` download using `URLSessionDataTask`. -public class DataRequest: Request { - /// `URLRequestConvertible` value used to create `URLRequest`s for this instance. - public let convertible: URLRequestConvertible - /// `Data` read from the server so far. - public var data: Data? { return protectedData.directValue } - - /// Protected storage for the `Data` read by the instance. - private var protectedData: Protector = Protector(nil) - - /// Creates a `DataRequest` using the provided parameters. - /// - /// - Parameters: - /// - id: `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` by default. - /// - convertible: `URLRequestConvertible` value used to create `URLRequest`s for this instance. - /// - underlyingQueue: `DispatchQueue` on which all internal `Request` work is performed. - /// - serializationQueue: `DispatchQueue` on which all serialization work is performed. By default targets - /// `underlyingQueue`, but can be passed another queue from a `Session`. - /// - eventMonitor: `EventMonitor` called for event callbacks from internal `Request` actions. - /// - interceptor: `RequestInterceptor` used throughout the request lifecycle. - /// - delegate: `RequestDelegate` that provides an interface to actions not performed by the `Request`. - init(id: UUID = UUID(), - convertible: URLRequestConvertible, - underlyingQueue: DispatchQueue, - serializationQueue: DispatchQueue, - eventMonitor: EventMonitor?, - interceptor: RequestInterceptor?, - delegate: RequestDelegate) { - self.convertible = convertible - - super.init(id: id, - underlyingQueue: underlyingQueue, - serializationQueue: serializationQueue, - eventMonitor: eventMonitor, - interceptor: interceptor, - delegate: delegate) - } - - override func reset() { - super.reset() - - protectedData.directValue = nil - } - - /// Called when `Data` is received by this instance. - /// - /// - Note: Also calls `updateDownloadProgress`. - /// - /// - Parameter data: The `Data` received. - func didReceive(data: Data) { - if self.data == nil { - protectedData.directValue = data - } else { - protectedData.append(data) - } - - updateDownloadProgress() ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } } -<<<<<<< HEAD // MARK: - DataStreamRequest /// `Request` subclass which streams HTTP response `Data` through a `Handler` closure. @@ -1570,14 +1192,11 @@ public final class DataStreamRequest: Request { delegate: delegate) } -======= ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 override func task(for request: URLRequest, using session: URLSession) -> URLSessionTask { let copiedRequest = request return session.dataTask(with: copiedRequest) } -<<<<<<< HEAD override func finish(error: AFError? = nil) { $streamMutableState.write { state in state.outputStream?.close() @@ -1604,31 +1223,10 @@ public final class DataStreamRequest: Request { /// - Parameter validation: `Validation` closure used to validate the request and response. /// /// - Returns: The `DataStreamRequest`. -======= - /// Called to updated the `downloadProgress` of the instance. - func updateDownloadProgress() { - let totalBytesReceived = Int64(data?.count ?? 0) - let totalBytesExpected = task?.response?.expectedContentLength ?? NSURLSessionTransferSizeUnknown - - downloadProgress.totalUnitCount = totalBytesExpected - downloadProgress.completedUnitCount = totalBytesReceived - - downloadProgressHandler?.queue.async { self.downloadProgressHandler?.handler(self.downloadProgress) } - } - - /// Validates the request, using the specified closure. - /// - /// - Note: If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - Parameter validation: `Validation` closure used to validate the response. - /// - /// - Returns: The instance. ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 @discardableResult public func validate(_ validation: @escaping Validation) -> Self { let validator: () -> Void = { [unowned self] in guard self.error == nil, let response = self.response else { return } -<<<<<<< HEAD let result = validation(self.request, response) @@ -1738,40 +1336,6 @@ public class DownloadRequest: Request { public let rawValue: Int -======= - - let result = validation(self.request, response, self.data) - - if case let .failure(error) = result { self.error = error.asAFError(or: .responseValidationFailed(reason: .customValidationFailed(error: error))) } - - self.eventMonitor?.request(self, - didValidateRequest: self.request, - response: response, - data: self.data, - withResult: result) - } - - protectedValidators.append(validator) - - return self - } -} - -// MARK: - DownloadRequest - -/// `Request` subclass which downloads `Data` to a file on disk using `URLSessionDownloadTask`. -public class DownloadRequest: Request { - /// A set of options to be executed prior to moving a downloaded file from the temporary `URL` to the destination - /// `URL`. - public struct Options: OptionSet { - /// Specifies that intermediate directories for the destination URL should be created. - public static let createIntermediateDirectories = Options(rawValue: 1 << 0) - /// Specifies that any previous file at the destination `URL` should be removed. - public static let removePreviousFile = Options(rawValue: 1 << 1) - - public let rawValue: Int - ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 public init(rawValue: Int) { self.rawValue = rawValue } @@ -1798,11 +1362,7 @@ public class DownloadRequest: Request { public class func suggestedDownloadDestination(for directory: FileManager.SearchPathDirectory = .documentDirectory, in domain: FileManager.SearchPathDomainMask = .userDomainMask, options: Options = []) -> Destination { -<<<<<<< HEAD { temporaryURL, response in -======= - return { temporaryURL, response in ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 let directoryURLs = FileManager.default.urls(for: directory, in: domain) let url = directoryURLs.first?.appendingPathComponent(response.suggestedFilename!) ?? temporaryURL @@ -1842,18 +1402,13 @@ public class DownloadRequest: Request { } /// Protected mutable state specific to `DownloadRequest`. -<<<<<<< HEAD @Protected private var mutableDownloadState = DownloadRequestMutableState() -======= - private let protectedDownloadMutableState: Protector = Protector(DownloadRequestMutableState()) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 /// If the download is resumable and eventually cancelled, this value may be used to resume the download using the /// `download(resumingWith data:)` API. /// /// - Note: For more information about `resumeData`, see [Apple's documentation](https://developer.apple.com/documentation/foundation/urlsessiondownloadtask/1411634-cancel). -<<<<<<< HEAD public var resumeData: Data? { mutableDownloadState.resumeData } /// If the download is successful, the `URL` where the file was downloaded. public var fileURL: URL? { mutableDownloadState.fileURL } @@ -1865,19 +1420,6 @@ public class DownloadRequest: Request { /// The `Destination` to which the downloaded file is moved. let destination: Destination -======= - public var resumeData: Data? { return protectedDownloadMutableState.directValue.resumeData } - /// If the download is successful, the `URL` where the file was downloaded. - public var fileURL: URL? { return protectedDownloadMutableState.directValue.fileURL } - - // MARK: Initial State - - /// `Downloadable` value used for this instance. - public let downloadable: Downloadable - /// The `Destination` to which the downloaded file is moved. - let destination: Destination - ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 /// Creates a `DownloadRequest` using the provided parameters. /// /// - Parameters: @@ -1912,11 +1454,7 @@ public class DownloadRequest: Request { override func reset() { super.reset() -<<<<<<< HEAD $mutableDownloadState.write { -======= - protectedDownloadMutableState.write { ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 $0.resumeData = nil $0.fileURL = nil } @@ -1931,11 +1469,7 @@ public class DownloadRequest: Request { eventMonitor?.request(self, didFinishDownloadingUsing: task, with: result) switch result { -<<<<<<< HEAD case let .success(url): mutableDownloadState.fileURL = url -======= - case let .success(url): protectedDownloadMutableState.write { $0.fileURL = url } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 case let .failure(error): self.error = error } } @@ -1953,11 +1487,7 @@ public class DownloadRequest: Request { } override func task(for request: URLRequest, using session: URLSession) -> URLSessionTask { -<<<<<<< HEAD session.downloadTask(with: request) -======= - return session.downloadTask(with: request) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } /// Creates a `URLSessionTask` from the provided resume data. @@ -1968,11 +1498,7 @@ public class DownloadRequest: Request { /// /// - Returns: The `URLSessionTask` created. public func task(forResumeData data: Data, using session: URLSession) -> URLSessionTask { -<<<<<<< HEAD session.downloadTask(withResumeData: data) -======= - return session.downloadTask(withResumeData: data) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } /// Cancels the instance. Once cancelled, a `DownloadRequest` can no longer be resumed or suspended. @@ -1983,11 +1509,7 @@ public class DownloadRequest: Request { /// - Returns: The instance. @discardableResult public override func cancel() -> Self { -<<<<<<< HEAD cancel(producingResumeData: false) -======= - return cancel(producingResumeData: false) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } /// Cancels the instance, optionally producing resume data. Once cancelled, a `DownloadRequest` can no longer be @@ -1999,11 +1521,7 @@ public class DownloadRequest: Request { /// - Returns: The instance. @discardableResult public func cancel(producingResumeData shouldProduceResumeData: Bool) -> Self { -<<<<<<< HEAD cancel(optionallyProducingResumeData: shouldProduceResumeData ? { _ in } : nil) -======= - return cancel(optionallyProducingResumeData: shouldProduceResumeData ? { _ in } : nil) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } /// Cancels the instance while producing resume data. Once cancelled, a `DownloadRequest` can no longer be resumed @@ -2019,11 +1537,7 @@ public class DownloadRequest: Request { /// - Returns: The instance. @discardableResult public func cancel(byProducingResumeData completionHandler: @escaping (_ data: Data?) -> Void) -> Self { -<<<<<<< HEAD cancel(optionallyProducingResumeData: completionHandler) -======= - return cancel(optionallyProducingResumeData: completionHandler) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } /// Internal implementation of cancellation that optionally takes a resume data handler. If no handler is passed, @@ -2033,11 +1547,7 @@ public class DownloadRequest: Request { /// /// - Returns: The instance. private func cancel(optionallyProducingResumeData completionHandler: ((_ resumeData: Data?) -> Void)?) -> Self { -<<<<<<< HEAD $mutableState.write { mutableState in -======= - protectedMutableState.write { mutableState in ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 guard mutableState.state.canTransitionTo(.cancelled) else { return } mutableState.state = .cancelled @@ -2053,22 +1563,14 @@ public class DownloadRequest: Request { // Resume to ensure metrics are gathered. task.resume() task.cancel { resumeData in -<<<<<<< HEAD self.mutableDownloadState.resumeData = resumeData -======= - self.protectedDownloadMutableState.write { $0.resumeData = resumeData } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 self.underlyingQueue.async { self.didCancelTask(task) } completionHandler(resumeData) } } else { // Resume to ensure metrics are gathered. task.resume() -<<<<<<< HEAD task.cancel(byProducingResumeData: { _ in }) -======= - task.cancel() ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 self.underlyingQueue.async { self.didCancelTask(task) } } } @@ -2099,7 +1601,6 @@ public class DownloadRequest: Request { withResult: result) } -<<<<<<< HEAD $validators.write { $0.append(validator) } return self @@ -2108,38 +1609,6 @@ public class DownloadRequest: Request { // MARK: - UploadRequest -/// `DataRequest` subclass which handles `Data` upload from memory, file, or stream using `URLSessionUploadTask`. -public class UploadRequest: DataRequest { - /// Type describing the origin of the upload, whether `Data`, file, or stream. - public enum Uploadable { - /// Upload from the provided `Data` value. - case data(Data) - /// Upload from the provided file `URL`, as well as a `Bool` determining whether the source file should be - /// automatically removed once uploaded. - case file(URL, shouldRemove: Bool) - /// Upload from the provided `InputStream`. - case stream(InputStream) -======= - protectedValidators.append(validator) - - return self ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 - } -} - -<<<<<<< HEAD - // MARK: Initial State - - /// The `UploadableConvertible` value used to produce the `Uploadable` value for this instance. - public let upload: UploadableConvertible - - /// `FileManager` used to perform cleanup tasks, including the removal of multipart form encoded payloads written - /// to disk. - public let fileManager: FileManager - -======= -// MARK: - UploadRequest - /// `DataRequest` subclass which handles `Data` upload from memory, file, or stream using `URLSessionUploadTask`. public class UploadRequest: DataRequest { /// Type describing the origin of the upload, whether `Data`, file, or stream. @@ -2162,14 +1631,12 @@ public class UploadRequest: DataRequest { /// to disk. public let fileManager: FileManager ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 // MARK: Mutable State /// `Uploadable` value used by the instance. public var uploadable: Uploadable? /// Creates an `UploadRequest` using the provided parameters. -<<<<<<< HEAD /// /// - Parameters: /// - id: `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` by default. @@ -2249,80 +1716,6 @@ public class UploadRequest: DataRequest { fatalError("Attempting to access the input stream but the uploadable doesn't exist.") } -======= - /// - /// - Parameters: - /// - id: `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` by default. - /// - convertible: `UploadConvertible` value used to determine the type of upload to be performed. - /// - underlyingQueue: `DispatchQueue` on which all internal `Request` work is performed. - /// - serializationQueue: `DispatchQueue` on which all serialization work is performed. By default targets - /// `underlyingQueue`, but can be passed another queue from a `Session`. - /// - eventMonitor: `EventMonitor` called for event callbacks from internal `Request` actions. - /// - interceptor: `RequestInterceptor` used throughout the request lifecycle. - /// - delegate: `RequestDelegate` that provides an interface to actions not performed by the `Request`. - init(id: UUID = UUID(), - convertible: UploadConvertible, - underlyingQueue: DispatchQueue, - serializationQueue: DispatchQueue, - eventMonitor: EventMonitor?, - interceptor: RequestInterceptor?, - fileManager: FileManager, - delegate: RequestDelegate) { - upload = convertible - self.fileManager = fileManager - - super.init(id: id, - convertible: convertible, - underlyingQueue: underlyingQueue, - serializationQueue: serializationQueue, - eventMonitor: eventMonitor, - interceptor: interceptor, - delegate: delegate) - } - - /// Called when the `Uploadable` value has been created from the `UploadConvertible`. - /// - /// - Parameter uploadable: The `Uploadable` that was created. - func didCreateUploadable(_ uploadable: Uploadable) { - self.uploadable = uploadable - - eventMonitor?.request(self, didCreateUploadable: uploadable) - } - - /// Called when the `Uploadable` value could not be created. - /// - /// - Parameter error: `AFError` produced by the failure. - func didFailToCreateUploadable(with error: AFError) { - self.error = error - - eventMonitor?.request(self, didFailToCreateUploadableWithError: error) - - retryOrFinish(error: error) - } - - override func task(for request: URLRequest, using session: URLSession) -> URLSessionTask { - guard let uploadable = uploadable else { - fatalError("Attempting to create a URLSessionUploadTask when Uploadable value doesn't exist.") - } - - switch uploadable { - case let .data(data): return session.uploadTask(with: request, from: data) - case let .file(url, _): return session.uploadTask(with: request, fromFile: url) - case .stream: return session.uploadTask(withStreamedRequest: request) - } - } - - /// Produces the `InputStream` from `uploadable`, if it can. - /// - /// - Note: Calling this method with a non-`.stream` `Uploadable` is a logic error and will crash. - /// - /// - Returns: The `InputStream`. - func inputStream() -> InputStream { - guard let uploadable = uploadable else { - fatalError("Attempting to access the input stream but the uploadable doesn't exist.") - } - ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 guard case let .stream(stream) = uploadable else { fatalError("Attempted to access the stream of an UploadRequest that wasn't created with one.") } @@ -2356,11 +1749,7 @@ public protocol UploadableConvertible { extension UploadRequest.Uploadable: UploadableConvertible { public func createUploadable() throws -> UploadRequest.Uploadable { -<<<<<<< HEAD self -======= - return self ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } } diff --git a/Example/Pods/Alamofire/Source/Response.swift b/Example/Pods/Alamofire/Source/Response.swift index 0b8ff5c..530fc4e 100644 --- a/Example/Pods/Alamofire/Source/Response.swift +++ b/Example/Pods/Alamofire/Source/Response.swift @@ -41,12 +41,9 @@ public struct DataResponse { public let data: Data? /// The final metrics of the response. -<<<<<<< HEAD /// /// - Note: Due to `FB7624529`, collection of `URLSessionTaskMetrics` on watchOS is currently disabled.` /// -======= ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 public let metrics: URLSessionTaskMetrics? /// The time taken to serialize the response. @@ -56,17 +53,10 @@ public struct DataResponse { public let result: Result /// Returns the associated value of the result if it is a success, `nil` otherwise. -<<<<<<< HEAD public var value: Success? { result.success } /// Returns the associated error value if the result if it is a failure, `nil` otherwise. public var error: Failure? { result.failure } -======= - public var value: Success? { return result.success } - - /// Returns the associated error value if the result if it is a failure, `nil` otherwise. - public var error: Failure? { return result.failure } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 /// Creates a `DataResponse` instance with the specified parameters derived from the response serialization. /// @@ -98,11 +88,7 @@ extension DataResponse: CustomStringConvertible, CustomDebugStringConvertible { /// The textual representation used when written to an output stream, which includes whether the result was a /// success or failure. public var description: String { -<<<<<<< HEAD "\(result)" -======= - return "\(result)" ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } /// The debug textual representation used when written to an output stream, which includes the URL request, the URL @@ -152,21 +138,12 @@ extension DataResponse { /// - returns: A `DataResponse` whose result wraps the value returned by the given closure. If this instance's /// result is a failure, returns a response wrapping the same failure. public func map(_ transform: (Success) -> NewSuccess) -> DataResponse { -<<<<<<< HEAD DataResponse(request: request, response: response, data: data, metrics: metrics, serializationDuration: serializationDuration, result: result.map(transform)) -======= - return DataResponse(request: request, - response: response, - data: data, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.map(transform)) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } /// Evaluates the given closure when the result of this `DataResponse` is a success, passing the unwrapped result @@ -184,21 +161,12 @@ extension DataResponse { /// - returns: A success or failure `DataResponse` depending on the result of the given closure. If this instance's /// result is a failure, returns the same failure. public func tryMap(_ transform: (Success) throws -> NewSuccess) -> DataResponse { -<<<<<<< HEAD DataResponse(request: request, response: response, data: data, metrics: metrics, serializationDuration: serializationDuration, result: result.tryMap(transform)) -======= - return DataResponse(request: request, - response: response, - data: data, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.tryMap(transform)) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } /// Evaluates the specified closure when the `DataResponse` is a failure, passing the unwrapped error as a parameter. @@ -212,21 +180,12 @@ extension DataResponse { /// /// - Returns: A `DataResponse` instance containing the result of the transform. public func mapError(_ transform: (Failure) -> NewFailure) -> DataResponse { -<<<<<<< HEAD DataResponse(request: request, response: response, data: data, metrics: metrics, serializationDuration: serializationDuration, result: result.mapError(transform)) -======= - return DataResponse(request: request, - response: response, - data: data, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.mapError(transform)) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } /// Evaluates the specified closure when the `DataResponse` is a failure, passing the unwrapped error as a parameter. @@ -242,21 +201,12 @@ extension DataResponse { /// /// - Returns: A `DataResponse` instance containing the result of the transform. public func tryMapError(_ transform: (Failure) throws -> NewFailure) -> DataResponse { -<<<<<<< HEAD DataResponse(request: request, response: response, data: data, metrics: metrics, serializationDuration: serializationDuration, result: result.tryMapError(transform)) -======= - return DataResponse(request: request, - response: response, - data: data, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.tryMapError(transform)) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } } @@ -277,12 +227,9 @@ public struct DownloadResponse { public let resumeData: Data? /// The final metrics of the response. -<<<<<<< HEAD /// /// - Note: Due to `FB7624529`, collection of `URLSessionTaskMetrics` on watchOS is currently disabled.` /// -======= ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 public let metrics: URLSessionTaskMetrics? /// The time taken to serialize the response. @@ -292,17 +239,10 @@ public struct DownloadResponse { public let result: Result /// Returns the associated value of the result if it is a success, `nil` otherwise. -<<<<<<< HEAD public var value: Success? { result.success } /// Returns the associated error value if the result if it is a failure, `nil` otherwise. public var error: Failure? { result.failure } -======= - public var value: Success? { return result.success } - - /// Returns the associated error value if the result if it is a failure, `nil` otherwise. - public var error: Failure? { return result.failure } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 /// Creates a `DownloadResponse` instance with the specified parameters derived from response serialization. /// @@ -338,11 +278,7 @@ extension DownloadResponse: CustomStringConvertible, CustomDebugStringConvertibl /// The textual representation used when written to an output stream, which includes whether the result was a /// success or failure. public var description: String { -<<<<<<< HEAD "\(result)" -======= - return "\(result)" ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } /// The debug textual representation used when written to an output stream, which includes the URL request, the URL @@ -392,7 +328,6 @@ extension DownloadResponse { /// - returns: A `DownloadResponse` whose result wraps the value returned by the given closure. If this instance's /// result is a failure, returns a response wrapping the same failure. public func map(_ transform: (Success) -> NewSuccess) -> DownloadResponse { -<<<<<<< HEAD DownloadResponse(request: request, response: response, fileURL: fileURL, @@ -400,15 +335,6 @@ extension DownloadResponse { metrics: metrics, serializationDuration: serializationDuration, result: result.map(transform)) -======= - return DownloadResponse(request: request, - response: response, - fileURL: fileURL, - resumeData: resumeData, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.map(transform)) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped @@ -426,7 +352,6 @@ extension DownloadResponse { /// - returns: A success or failure `DownloadResponse` depending on the result of the given closure. If this /// instance's result is a failure, returns the same failure. public func tryMap(_ transform: (Success) throws -> NewSuccess) -> DownloadResponse { -<<<<<<< HEAD DownloadResponse(request: request, response: response, fileURL: fileURL, @@ -434,15 +359,6 @@ extension DownloadResponse { metrics: metrics, serializationDuration: serializationDuration, result: result.tryMap(transform)) -======= - return DownloadResponse(request: request, - response: response, - fileURL: fileURL, - resumeData: resumeData, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.tryMap(transform)) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } /// Evaluates the specified closure when the `DownloadResponse` is a failure, passing the unwrapped error as a parameter. @@ -456,7 +372,6 @@ extension DownloadResponse { /// /// - Returns: A `DownloadResponse` instance containing the result of the transform. public func mapError(_ transform: (Failure) -> NewFailure) -> DownloadResponse { -<<<<<<< HEAD DownloadResponse(request: request, response: response, fileURL: fileURL, @@ -464,15 +379,6 @@ extension DownloadResponse { metrics: metrics, serializationDuration: serializationDuration, result: result.mapError(transform)) -======= - return DownloadResponse(request: request, - response: response, - fileURL: fileURL, - resumeData: resumeData, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.mapError(transform)) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } /// Evaluates the specified closure when the `DownloadResponse` is a failure, passing the unwrapped error as a parameter. @@ -488,7 +394,6 @@ extension DownloadResponse { /// /// - Returns: A `DownloadResponse` instance containing the result of the transform. public func tryMapError(_ transform: (Failure) throws -> NewFailure) -> DownloadResponse { -<<<<<<< HEAD DownloadResponse(request: request, response: response, fileURL: fileURL, @@ -496,14 +401,5 @@ extension DownloadResponse { metrics: metrics, serializationDuration: serializationDuration, result: result.tryMapError(transform)) -======= - return DownloadResponse(request: request, - response: response, - fileURL: fileURL, - resumeData: resumeData, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.tryMapError(transform)) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } } diff --git a/Example/Pods/Alamofire/Source/ResponseSerialization.swift b/Example/Pods/Alamofire/Source/ResponseSerialization.swift index 59a7a4e..2de9d05 100644 --- a/Example/Pods/Alamofire/Source/ResponseSerialization.swift +++ b/Example/Pods/Alamofire/Source/ResponseSerialization.swift @@ -83,7 +83,6 @@ public protocol DataPreprocessor { public struct PassthroughPreprocessor: DataPreprocessor { public init() {} -<<<<<<< HEAD public func preprocess(_ data: Data) throws -> Data { data } } @@ -93,23 +92,11 @@ public struct GoogleXSSIPreprocessor: DataPreprocessor { public func preprocess(_ data: Data) throws -> Data { (data.prefix(6) == Data(")]}',\n".utf8)) ? data.dropFirst(6) : data -======= - public func preprocess(_ data: Data) throws -> Data { return data } -} - -/// `DataPreprocessor` that trims Google's typical `)]}',\n` XSSI JSON header. -public struct GoogleXSSIPreprocessor: DataPreprocessor { - public init() {} - - public func preprocess(_ data: Data) throws -> Data { - return (data.prefix(6) == Data(")]}',\n".utf8)) ? data.dropFirst(6) : data ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } } extension ResponseSerializer { /// Default `DataPreprocessor`. `PassthroughPreprocessor` by default. -<<<<<<< HEAD public static var defaultDataPreprocessor: DataPreprocessor { PassthroughPreprocessor() } /// Default `HTTPMethod`s for which empty response bodies are considered appropriate. `[.head]` by default. public static var defaultEmptyRequestMethods: Set { [.head] } @@ -150,48 +137,6 @@ extension ResponseSerializer { /// - Returns: `true` if `request` or `response` allow empty bodies, `false` otherwise. public func emptyResponseAllowed(forRequest request: URLRequest?, response: HTTPURLResponse?) -> Bool { (requestAllowsEmptyResponseData(request) == true) || (responseAllowsEmptyResponseData(response) == true) -======= - public static var defaultDataPreprocessor: DataPreprocessor { return PassthroughPreprocessor() } - /// Default `HTTPMethod`s for which empty response bodies are considered appropriate. `[.head]` by default. - public static var defaultEmptyRequestMethods: Set { return [.head] } - /// HTTP response codes for which empty response bodies are considered appropriate. `[204, 205]` by default. - public static var defaultEmptyResponseCodes: Set { return [204, 205] } - - public var dataPreprocessor: DataPreprocessor { return Self.defaultDataPreprocessor } - public var emptyRequestMethods: Set { return Self.defaultEmptyRequestMethods } - public var emptyResponseCodes: Set { return Self.defaultEmptyResponseCodes } - - /// Determines whether the `request` allows empty response bodies, if `request` exists. - /// - /// - Parameter request: `URLRequest` to evaluate. - /// - /// - Returns: `Bool` representing the outcome of the evaluation, or `nil` if `request` was `nil`. - public func requestAllowsEmptyResponseData(_ request: URLRequest?) -> Bool? { - return request.flatMap { $0.httpMethod } - .flatMap(HTTPMethod.init) - .map { emptyRequestMethods.contains($0) } - } - - /// Determines whether the `response` allows empty response bodies, if `response` exists`. - /// - /// - Parameter response: `HTTPURLResponse` to evaluate. - /// - /// - Returns: `Bool` representing the outcome of the evaluation, or `nil` if `response` was `nil`. - public func responseAllowsEmptyResponseData(_ response: HTTPURLResponse?) -> Bool? { - return response.flatMap { $0.statusCode } - .map { emptyResponseCodes.contains($0) } - } - - /// Determines whether `request` and `response` allow empty response bodies. - /// - /// - Parameters: - /// - request: `URLRequest` to evaluate. - /// - response: `HTTPURLResponse` to evaluate. - /// - /// - Returns: `true` if `request` or `response` allow empty bodies, `false` otherwise. - public func emptyResponseAllowed(forRequest request: URLRequest?, response: HTTPURLResponse?) -> Bool { - return (requestAllowsEmptyResponseData(request) == true) || (responseAllowsEmptyResponseData(response) == true) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } } @@ -200,19 +145,11 @@ extension ResponseSerializer { public extension DownloadResponseSerializerProtocol where Self: DataResponseSerializerProtocol { func serializeDownload(request: URLRequest?, response: HTTPURLResponse?, fileURL: URL?, error: Error?) throws -> Self.SerializedObject { guard error == nil else { throw error! } -<<<<<<< HEAD guard let fileURL = fileURL else { throw AFError.responseSerializationFailed(reason: .inputFileNil) } -======= - - guard let fileURL = fileURL else { - throw AFError.responseSerializationFailed(reason: .inputFileNil) - } - ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 let data: Data do { data = try Data(contentsOf: fileURL) @@ -277,11 +214,7 @@ extension DataRequest { -> Self { appendResponseSerializer { // Start work that should be on the serialization queue. -<<<<<<< HEAD let start = ProcessInfo.processInfo.systemUptime -======= - let start = CFAbsoluteTimeGetCurrent() ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 let result: AFResult = Result { try responseSerializer.serialize(request: self.request, response: self.response, @@ -291,11 +224,7 @@ extension DataRequest { error.asAFError(or: .responseSerializationFailed(reason: .customSerializationFailed(error: error))) } -<<<<<<< HEAD let end = ProcessInfo.processInfo.systemUptime -======= - let end = CFAbsoluteTimeGetCurrent() ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 // End work that should be on the serialization queue. self.underlyingQueue.async { @@ -400,11 +329,7 @@ extension DownloadRequest { -> Self { appendResponseSerializer { // Start work that should be on the serialization queue. -<<<<<<< HEAD let start = ProcessInfo.processInfo.systemUptime -======= - let start = CFAbsoluteTimeGetCurrent() ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 let result: AFResult = Result { try responseSerializer.serializeDownload(request: self.request, response: self.response, @@ -413,11 +338,7 @@ extension DownloadRequest { }.mapError { error in error.asAFError(or: .responseSerializationFailed(reason: .customSerializationFailed(error: error))) } -<<<<<<< HEAD let end = ProcessInfo.processInfo.systemUptime -======= - let end = CFAbsoluteTimeGetCurrent() ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 // End work that should be on the serialization queue. self.underlyingQueue.async { @@ -487,15 +408,9 @@ extension DataRequest { public func responseData(queue: DispatchQueue = .main, completionHandler: @escaping (AFDataResponse) -> Void) -> Self { -<<<<<<< HEAD response(queue: queue, responseSerializer: DataResponseSerializer(), completionHandler: completionHandler) -======= - return response(queue: queue, - responseSerializer: DataResponseSerializer(), - completionHandler: completionHandler) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } } @@ -550,15 +465,9 @@ extension DownloadRequest { public func responseData(queue: DispatchQueue = .main, completionHandler: @escaping (AFDownloadResponse) -> Void) -> Self { -<<<<<<< HEAD response(queue: queue, responseSerializer: DataResponseSerializer(), completionHandler: completionHandler) -======= - return response(queue: queue, - responseSerializer: DataResponseSerializer(), - completionHandler: completionHandler) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } } @@ -607,15 +516,8 @@ public final class StringResponseSerializer: ResponseSerializer { var convertedEncoding = encoding -<<<<<<< HEAD if let encodingName = response?.textEncodingName, convertedEncoding == nil { convertedEncoding = String.Encoding(ianaCharsetName: encodingName) -======= - if let encodingName = response?.textEncodingName as CFString?, convertedEncoding == nil { - let ianaCharSet = CFStringConvertIANACharSetNameToEncoding(encodingName) - let nsStringEncoding = CFStringConvertEncodingToNSStringEncoding(ianaCharSet) - convertedEncoding = String.Encoding(rawValue: nsStringEncoding) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } let actualEncoding = convertedEncoding ?? .isoLatin1 @@ -642,15 +544,9 @@ extension DataRequest { public func responseString(queue: DispatchQueue = .main, encoding: String.Encoding? = nil, completionHandler: @escaping (AFDataResponse) -> Void) -> Self { -<<<<<<< HEAD response(queue: queue, responseSerializer: StringResponseSerializer(encoding: encoding), completionHandler: completionHandler) -======= - return response(queue: queue, - responseSerializer: StringResponseSerializer(encoding: encoding), - completionHandler: completionHandler) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } } @@ -669,15 +565,9 @@ extension DownloadRequest { encoding: String.Encoding? = nil, completionHandler: @escaping (AFDownloadResponse) -> Void) -> Self { -<<<<<<< HEAD response(queue: queue, responseSerializer: StringResponseSerializer(encoding: encoding), completionHandler: completionHandler) -======= - return response(queue: queue, - responseSerializer: StringResponseSerializer(encoding: encoding), - completionHandler: completionHandler) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } } @@ -732,7 +622,6 @@ public final class JSONResponseSerializer: ResponseSerializer { } extension DataRequest { -<<<<<<< HEAD /// Adds a handler to be called once the request has finished. /// /// - Parameters: @@ -752,8 +641,6 @@ extension DataRequest { } extension DownloadRequest { -======= ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 /// Adds a handler to be called once the request has finished. /// /// - Parameters: @@ -765,7 +652,6 @@ extension DownloadRequest { @discardableResult public func responseJSON(queue: DispatchQueue = .main, options: JSONSerialization.ReadingOptions = .allowFragments, -<<<<<<< HEAD completionHandler: @escaping (AFDownloadResponse) -> Void) -> Self { response(queue: queue, @@ -946,131 +832,12 @@ public struct DecodableStreamSerializer: DataStreamSerializer { let processedData = try dataPreprocessor.preprocess(data) do { return try decoder.decode(T.self, from: processedData) -======= - completionHandler: @escaping (AFDataResponse) -> Void) -> Self { - return response(queue: queue, - responseSerializer: JSONResponseSerializer(options: options), - completionHandler: completionHandler) - } -} - -extension DownloadRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - options: The JSON serialization reading options. `.allowFragments` by default. - /// - completionHandler: A closure to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func responseJSON(queue: DispatchQueue = .main, - options: JSONSerialization.ReadingOptions = .allowFragments, - completionHandler: @escaping (AFDownloadResponse) -> Void) - -> Self { - return response(queue: queue, - responseSerializer: JSONResponseSerializer(options: options), - completionHandler: completionHandler) - } -} - -// MARK: - Empty - -/// Protocol representing an empty response. Use `T.emptyValue()` to get an instance. -public protocol EmptyResponse { - /// Empty value for the conforming type. - /// - /// - Returns: Value of `Self` to use for empty values. - static func emptyValue() -> Self -} - -/// Type representing an empty response. Use `Empty.value` to get the static instance. -public struct Empty: Decodable { - /// Static `Empty` instance used for all `Empty` responses. - public static let value = Empty() -} - -extension Empty: EmptyResponse { - public static func emptyValue() -> Empty { - return value - } -} - -// MARK: - DataDecoder Protocol - -/// Any type which can decode `Data` into a `Decodable` type. -public protocol DataDecoder { - /// Decode `Data` into the provided type. - /// - /// - Parameters: - /// - type: The `Type` to be decoded. - /// - data: The `Data` to be decoded. - /// - /// - Returns: The decoded value of type `D`. - /// - Throws: Any error that occurs during decode. - func decode(_ type: D.Type, from data: Data) throws -> D -} - -/// `JSONDecoder` automatically conforms to `DataDecoder`. -extension JSONDecoder: DataDecoder {} - -// MARK: - Decodable - -/// A `ResponseSerializer` that decodes the response data as a generic value using any type that conforms to -/// `DataDecoder`. By default, this is an instance of `JSONDecoder`. Additionally, a request returning `nil` or no data -/// is considered an error. However, if the response is has a status code valid for empty responses (`204`, `205`), then -/// the `Empty.value` value is returned. -public final class DecodableResponseSerializer: ResponseSerializer { - public let dataPreprocessor: DataPreprocessor - /// The `DataDecoder` instance used to decode responses. - public let decoder: DataDecoder - public let emptyResponseCodes: Set - public let emptyRequestMethods: Set - - /// Creates an instance using the values provided. - /// - /// - Parameters: - /// - dataPreprocessor: `DataPreprocessor` used to prepare the received `Data` for serialization. - /// - decoder: The `DataDecoder`. `JSONDecoder()` by default. - /// - emptyResponseCodes: The HTTP response codes for which empty responses are allowed. `[204, 205]` by default. - /// - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default. - public init(dataPreprocessor: DataPreprocessor = DecodableResponseSerializer.defaultDataPreprocessor, - decoder: DataDecoder = JSONDecoder(), - emptyResponseCodes: Set = DecodableResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = DecodableResponseSerializer.defaultEmptyRequestMethods) { - self.dataPreprocessor = dataPreprocessor - self.decoder = decoder - self.emptyResponseCodes = emptyResponseCodes - self.emptyRequestMethods = emptyRequestMethods - } - - public func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> T { - guard error == nil else { throw error! } - - guard var data = data, !data.isEmpty else { - guard emptyResponseAllowed(forRequest: request, response: response) else { - throw AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength) - } - - guard let emptyResponseType = T.self as? EmptyResponse.Type, let emptyValue = emptyResponseType.emptyValue() as? T else { - throw AFError.responseSerializationFailed(reason: .invalidEmptyResponse(type: "\(T.self)")) - } - - return emptyValue - } - - data = try dataPreprocessor.preprocess(data) - - do { - return try decoder.decode(T.self, from: data) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } catch { throw AFError.responseSerializationFailed(reason: .decodingFailed(error: error)) } } } -<<<<<<< HEAD extension DataStreamRequest { /// Adds a stream handler which performs no parsing on incoming `Data`. /// @@ -1128,29 +895,8 @@ extension DataStreamRequest { appendStreamCompletion(on: queue, stream: stream) return self -======= -extension DataRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - Parameters: - /// - type: `Decodable` type to decode from response data. - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - decoder: `DataDecoder` to use to decode the response. `JSONDecoder()` by default. - /// - completionHandler: A closure to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func responseDecodable(of type: T.Type = T.self, - queue: DispatchQueue = .main, - decoder: DataDecoder = JSONDecoder(), - completionHandler: @escaping (AFDataResponse) -> Void) -> Self { - return response(queue: queue, - responseSerializer: DecodableResponseSerializer(decoder: decoder), - completionHandler: completionHandler) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } -<<<<<<< HEAD /// Adds a `StreamHandler` which parses incoming `Data` as a UTF8 `String`. /// /// - Parameters: @@ -1198,25 +944,5 @@ extension DataRequest { stream: @escaping Handler) -> Self { responseStream(using: DecodableStreamSerializer(decoder: decoder, dataPreprocessor: preprocessor), stream: stream) -======= -extension DownloadRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - Parameters: - /// - type: `Decodable` type to decode from response data. - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - decoder: `DataDecoder` to use to decode the response. `JSONDecoder()` by default. - /// - completionHandler: A closure to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func responseDecodable(of type: T.Type = T.self, - queue: DispatchQueue = .main, - decoder: DataDecoder = JSONDecoder(), - completionHandler: @escaping (AFDownloadResponse) -> Void) -> Self { - return response(queue: queue, - responseSerializer: DecodableResponseSerializer(decoder: decoder), - completionHandler: completionHandler) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } } diff --git a/Example/Pods/Alamofire/Source/SessionDelegate.swift b/Example/Pods/Alamofire/Source/SessionDelegate.swift index 9c64bf4..7e6604c 100644 --- a/Example/Pods/Alamofire/Source/SessionDelegate.swift +++ b/Example/Pods/Alamofire/Source/SessionDelegate.swift @@ -38,7 +38,6 @@ open class SessionDelegate: NSObject { public init(fileManager: FileManager = .default) { self.fileManager = fileManager } -<<<<<<< HEAD /// Internal method to find and cast requests while maintaining some integrity checking. /// @@ -52,25 +51,6 @@ open class SessionDelegate: NSObject { } return provider.request(for: task) as? R -======= - - /// Internal method to find and cast requests while maintaining some integrity checking. - /// - /// - Parameters: - /// - task: The `URLSessionTask` for which to find the associated `Request`. - /// - type: The `Request` subclass type to cast any `Request` associate with `task`. - func request(for task: URLSessionTask, as type: R.Type) -> R? { - guard let provider = stateProvider else { - assertionFailure("StateProvider is nil.") - return nil - } - - guard let request = provider.request(for: task) as? R else { - fatalError("Returned Request is not of expected type: \(R.self).") - } - - return request ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } } @@ -82,11 +62,7 @@ protocol SessionStateProvider: AnyObject { func request(for task: URLSessionTask) -> Request? func didGatherMetricsForTask(_ task: URLSessionTask) -<<<<<<< HEAD func didCompleteTask(_ task: URLSessionTask, completion: @escaping () -> Void) -======= - func didCompleteTask(_ task: URLSessionTask) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 func credential(for task: URLSessionTask, in protectionSpace: URLProtectionSpace) -> URLCredential? func cancelRequestsForSessionInvalidation(with error: Error?) } @@ -231,7 +207,6 @@ extension SessionDelegate: URLSessionTaskDelegate { open func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { eventMonitor?.urlSession(session, task: task, didCompleteWithError: error) -<<<<<<< HEAD let request = stateProvider?.request(for: task) @@ -262,44 +237,6 @@ extension SessionDelegate: URLSessionDataDelegate { } } - open func urlSession(_ session: URLSession, - dataTask: URLSessionDataTask, - willCacheResponse proposedResponse: CachedURLResponse, - completionHandler: @escaping (CachedURLResponse?) -> Void) { - eventMonitor?.urlSession(session, dataTask: dataTask, willCacheResponse: proposedResponse) - - if let handler = stateProvider?.request(for: dataTask)?.cachedResponseHandler ?? stateProvider?.cachedResponseHandler { - handler.dataTask(dataTask, willCacheResponse: proposedResponse, completion: completionHandler) - } else { - completionHandler(proposedResponse) - } -======= - - stateProvider?.request(for: task)?.didCompleteTask(task, with: error.map { $0.asAFError(or: .sessionTaskFailed(error: $0)) }) - - stateProvider?.didCompleteTask(task) - } - - @available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) - open func urlSession(_ session: URLSession, taskIsWaitingForConnectivity task: URLSessionTask) { - eventMonitor?.urlSession(session, taskIsWaitingForConnectivity: task) - } -} - -// MARK: URLSessionDataDelegate - -extension SessionDelegate: URLSessionDataDelegate { - open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { - eventMonitor?.urlSession(session, dataTask: dataTask, didReceive: data) - - guard let request = request(for: dataTask, as: DataRequest.self) else { - assertionFailure("dataTask did not find DataRequest.") - return - } - - request.didReceive(data: data) - } - open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse, @@ -316,47 +253,6 @@ extension SessionDelegate: URLSessionDataDelegate { // MARK: URLSessionDownloadDelegate -extension SessionDelegate: URLSessionDownloadDelegate { - open func urlSession(_ session: URLSession, - downloadTask: URLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) { - eventMonitor?.urlSession(session, - downloadTask: downloadTask, - didResumeAtOffset: fileOffset, - expectedTotalBytes: expectedTotalBytes) - guard let downloadRequest = request(for: downloadTask, as: DownloadRequest.self) else { - assertionFailure("downloadTask did not find DownloadRequest.") - return - } - - downloadRequest.updateDownloadProgress(bytesWritten: fileOffset, - totalBytesExpectedToWrite: expectedTotalBytes) - } - - open func urlSession(_ session: URLSession, - downloadTask: URLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) { - eventMonitor?.urlSession(session, - downloadTask: downloadTask, - didWriteData: bytesWritten, - totalBytesWritten: totalBytesWritten, - totalBytesExpectedToWrite: totalBytesExpectedToWrite) - guard let downloadRequest = request(for: downloadTask, as: DownloadRequest.self) else { - assertionFailure("downloadTask did not find DownloadRequest.") - return - } - - downloadRequest.updateDownloadProgress(bytesWritten: bytesWritten, - totalBytesExpectedToWrite: totalBytesExpectedToWrite) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 - } - -<<<<<<< HEAD -// MARK: URLSessionDownloadDelegate - extension SessionDelegate: URLSessionDownloadDelegate { open func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, @@ -427,39 +323,6 @@ extension SessionDelegate: URLSessionDownloadDelegate { request.didFinishDownloading(using: downloadTask, with: .failure(.downloadedFileMoveFailed(error: error, source: location, destination: destination))) -======= - open func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) { - eventMonitor?.urlSession(session, downloadTask: downloadTask, didFinishDownloadingTo: location) - - guard let request = request(for: downloadTask, as: DownloadRequest.self) else { - assertionFailure("downloadTask did not find DownloadRequest.") - return - } - - guard let response = request.response else { - fatalError("URLSessionDownloadTask finished downloading with no response.") - } - - let (destination, options) = (request.destination)(location, response) - - eventMonitor?.request(request, didCreateDestinationURL: destination) - - do { - if options.contains(.removePreviousFile), fileManager.fileExists(atPath: destination.path) { - try fileManager.removeItem(at: destination) - } - - if options.contains(.createIntermediateDirectories) { - let directory = destination.deletingLastPathComponent() - try fileManager.createDirectory(at: directory, withIntermediateDirectories: true) - } - - try fileManager.moveItem(at: location, to: destination) - - request.didFinishDownloading(using: downloadTask, with: .success(destination)) - } catch { - request.didFinishDownloading(using: downloadTask, with: .failure(.downloadedFileMoveFailed(error: error, source: location, destination: destination))) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } } } diff --git a/Example/Pods/Alamofire/Source/Validation.swift b/Example/Pods/Alamofire/Source/Validation.swift index bcf850e..1e307bf 100644 --- a/Example/Pods/Alamofire/Source/Validation.swift +++ b/Example/Pods/Alamofire/Source/Validation.swift @@ -66,11 +66,7 @@ extension Request { // MARK: Properties -<<<<<<< HEAD fileprivate var acceptableStatusCodes: Range { 200..<300 } -======= - fileprivate var acceptableStatusCodes: Range { return 200..<300 } ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 fileprivate var acceptableContentTypes: [String] { if let accept = request?.value(forHTTPHeaderField: "Accept") { @@ -152,7 +148,6 @@ extension DataRequest { /// request was valid. public typealias Validation = (URLRequest?, HTTPURLResponse, Data?) -> ValidationResult -<<<<<<< HEAD /// Validates that the response has a status code in the specified sequence. /// /// If validation fails, subsequent calls to response handlers will have an associated error. @@ -201,8 +196,6 @@ extension DataStreamRequest { /// request was valid. public typealias Validation = (_ request: URLRequest?, _ response: HTTPURLResponse) -> ValidationResult -======= ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 /// Validates that the response has a status code in the specified sequence. /// /// If validation fails, subsequent calls to response handlers will have an associated error. @@ -212,11 +205,7 @@ extension DataStreamRequest { /// - Returns: The instance. @discardableResult public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { -<<<<<<< HEAD return validate { [unowned self] _, response in -======= - return validate { [unowned self] _, response, _ in ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 self.validate(statusCode: acceptableStatusCodes, response: response) } } @@ -230,13 +219,8 @@ extension DataStreamRequest { /// - returns: The request. @discardableResult public func validate(contentType acceptableContentTypes: @escaping @autoclosure () -> S) -> Self where S.Iterator.Element == String { -<<<<<<< HEAD return validate { [unowned self] _, response in self.validate(contentType: acceptableContentTypes(), response: response) -======= - return validate { [unowned self] _, response, data in - self.validate(contentType: acceptableContentTypes(), response: response, data: data) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } } @@ -248,14 +232,7 @@ extension DataStreamRequest { /// - Returns: The instance. @discardableResult public func validate() -> Self { -<<<<<<< HEAD validate(statusCode: acceptableStatusCodes).validate(contentType: self.acceptableContentTypes) -======= - let contentTypes: () -> [String] = { [unowned self] in - self.acceptableContentTypes - } - return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes()) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 } } diff --git a/Example/Pods/CryptoSwift/LICENSE b/Example/Pods/CryptoSwift/LICENSE deleted file mode 100644 index e52af7d..0000000 --- a/Example/Pods/CryptoSwift/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -Copyright (C) 2014-2017 Marcin Krzyżanowski -This software is provided 'as-is', without any express or implied warranty. - -In no event will the authors be held liable for any damages arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: - -- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -- This notice may not be removed or altered from any source or binary distribution. -- Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by the "Marcin Krzyzanowski" (http://krzyzanowskim.com/).' diff --git a/Example/Pods/CryptoSwift/README.md b/Example/Pods/CryptoSwift/README.md deleted file mode 100644 index a733f2d..0000000 --- a/Example/Pods/CryptoSwift/README.md +++ /dev/null @@ -1,510 +0,0 @@ -[![Platform](https://img.shields.io/badge/Platforms-iOS%20%7C%20Android%20%7CmacOS%20%7C%20watchOS%20%7C%20tvOS%20%7C%20Linux-4E4E4E.svg?colorA=28a745)](#installation) - -[![Swift support](https://img.shields.io/badge/Swift-3.1%20%7C%203.2%20%7C%204.0%20%7C%204.1%20%7C%204.2%20%7C%205.0-lightgrey.svg?colorA=28a745&colorB=4E4E4E)](#swift-versions-support) -[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/CryptoSwift.svg?style=flat&label=CocoaPods&colorA=28a745&&colorB=4E4E4E)](https://cocoapods.org/pods/CryptoSwift) -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-brightgreen.svg?style=flat&colorA=28a745&&colorB=4E4E4E)](https://github.com/Carthage/Carthage) -[![Accio supported](https://img.shields.io/badge/Accio-supported-brightgreen.svg?style=flat&colorA=28a745&&colorB=4E4E4E)](https://github.com/JamitLabs/Accio) -[![Swift Package Manager compatible](https://img.shields.io/badge/SPM-compatible-brightgreen.svg?style=flat&colorA=28a745&&colorB=4E4E4E)](https://github.com/apple/swift-package-manager) - -[![Twitter](https://img.shields.io/badge/Twitter-@krzyzanowskim-blue.svg?style=flat)](http://twitter.com/krzyzanowskim) - -# CryptoSwift - -Crypto related functions and helpers for [Swift](https://swift.org) implemented in Swift. ([#PureSwift](https://twitter.com/hashtag/pureswift)) - -**Note**: The `master` branch follows the latest currently released **version of Swift**. If you need an earlier version for an older version of Swift, you can specify its version in your `Podfile` or use the code on the branch for that version. Older branches are unsupported. Check [versions](#swift-versions-support) for details. - ---- - -[Requirements](#requirements) | [Features](#features) | [Contribution](#contribution) | [Installation](#installation) | [Swift versions](#swift-versions-support) | [How-to](#how-to) | [Author](#author) | [License](#license) | [Changelog](#changelog) - -## Sponsorship - -If you (or your Company) use this work, please consider [Sponsorship](https://github.com/users/krzyzanowskim/sponsorship). This is the only option to keep the project alive, that is in your own best interrest. - -CryptoSwift isn't backed by a big company and is developer in my spare time that I also use to as a freelancer. - -## Requirements -Good mood - -## Features - -- Easy to use -- Convenient extensions for String and Data -- Support for incremental updates (stream, ...) -- iOS, Android, macOS, AppleTV, watchOS, Linux support - -#### Hash (Digest) - [MD5](http://tools.ietf.org/html/rfc1321) -| [SHA1](http://tools.ietf.org/html/rfc3174) -| [SHA224](http://tools.ietf.org/html/rfc6234) -| [SHA256](http://tools.ietf.org/html/rfc6234) -| [SHA384](http://tools.ietf.org/html/rfc6234) -| [SHA512](http://tools.ietf.org/html/rfc6234) -| [SHA3](http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf) - -#### Cyclic Redundancy Check (CRC) - [CRC32](http://en.wikipedia.org/wiki/Cyclic_redundancy_check) -| [CRC32C](http://en.wikipedia.org/wiki/Cyclic_redundancy_check) -| [CRC16](http://en.wikipedia.org/wiki/Cyclic_redundancy_check) - -#### Cipher - [AES-128, AES-192, AES-256](http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf) -| [ChaCha20](http://cr.yp.to/chacha/chacha-20080128.pdf) -| [Rabbit](https://tools.ietf.org/html/rfc4503) -| [Blowfish](https://www.schneier.com/academic/blowfish/) - -#### Message authenticators - [Poly1305](http://cr.yp.to/mac/poly1305-20050329.pdf) -| [HMAC (MD5, SHA1, SHA256)](https://www.ietf.org/rfc/rfc2104.txt) -| [CMAC](https://tools.ietf.org/html/rfc4493) -| [CBC-MAC](https://en.wikipedia.org/wiki/CBC-MAC) - -#### Cipher mode of operation -- Electronic codebook ([ECB](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Electronic_codebook_.28ECB.29)) -- Cipher-block chaining ([CBC](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher-block_chaining_.28CBC.29)) -- Propagating Cipher Block Chaining ([PCBC](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Propagating_Cipher_Block_Chaining_.28PCBC.29)) -- Cipher feedback ([CFB](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_feedback_.28CFB.29)) -- Output Feedback ([OFB](http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Output_Feedback_.28OFB.29)) -- Counter Mode ([CTR](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Counter_.28CTR.29)) -- Galois/Counter Mode ([GCM](https://csrc.nist.gov/publications/detail/sp/800-38d/final)) -- Counter with Cipher Block Chaining-Message Authentication Code ([CCM](https://csrc.nist.gov/publications/detail/sp/800-38c/final)) - -#### Password-Based Key Derivation Function -- [PBKDF1](http://tools.ietf.org/html/rfc2898#section-5.1) (Password-Based Key Derivation Function 1) -- [PBKDF2](http://tools.ietf.org/html/rfc2898#section-5.2) (Password-Based Key Derivation Function 2) -- [HKDF](https://tools.ietf.org/html/rfc5869) (HMAC-based Extract-and-Expand Key Derivation Function) -- [Scrypt](https://tools.ietf.org/html/rfc7914) (The scrypt Password-Based Key Derivation Function) - -#### Data padding - PKCS#5 -| [PKCS#7](http://tools.ietf.org/html/rfc5652#section-6.3) -| [Zero padding](https://en.wikipedia.org/wiki/Padding_(cryptography)#Zero_padding) -| No padding - -#### Authenticated Encryption with Associated Data (AEAD) -- [AEAD\_CHACHA20\_POLY1305](https://tools.ietf.org/html/rfc7539#section-2.8) - -## Why -[Why?](https://github.com/krzyzanowskim/CryptoSwift/issues/5) [Because I can](https://github.com/krzyzanowskim/CryptoSwift/issues/5#issuecomment-53379391). - -## How do I get involved? - -You want to help, great! Go ahead and fork our repo, make your changes and send us a pull request. - -## Contribution - -Check out [CONTRIBUTING.md](CONTRIBUTING.md) for more information on how to help with CryptoSwift. - -- If you found a bug, [open an issue](https://github.com/krzyzanowskim/CryptoSwift/issues). -- If you have a feature request, [open an issue](https://github.com/krzyzanowskim/CryptoSwift/issues). - -## Installation - -To install CryptoSwift, add it as a submodule to your project (on the top level project directory): - - git submodule add https://github.com/krzyzanowskim/CryptoSwift.git - -It is recommended to enable [Whole-Module Optimization](https://swift.org/blog/whole-module-optimizations/) to gain better performance. Non-optimized build results in significantly worse performance. - -#### Embedded Framework - -Embedded frameworks require a minimum deployment target of iOS 8 or OS X Mavericks (10.9). Drag the `CryptoSwift.xcodeproj` file into your Xcode project, and add appropriate framework as a dependency to your target. Now select your App and choose the General tab for the app target. Find *Embedded Binaries* and press "+", then select `CryptoSwift.framework` (iOS, OS X, watchOS or tvOS) - -![](https://cloud.githubusercontent.com/assets/758033/10834511/25a26852-7e9a-11e5-8c01-6cc8f1838459.png) - -Sometimes "embedded framework" option is not available. In that case, you have to add new build phase for the target - -![](https://cloud.githubusercontent.com/assets/758033/18415615/d5edabb0-77f8-11e6-8c94-f41d9fc2b8cb.png) - -##### iOS, macOS, watchOS, tvOS - -In the project, you'll find [single scheme](https://mxcl.dev/PromiseKit/news/2016/08/Multiplatform-Single-Scheme-Xcode-Projects/) for all platforms: -- CryptoSwift - -#### Swift versions support - -- Swift 1.2: branch [swift12](https://github.com/krzyzanowskim/CryptoSwift/tree/swift12) version <= 0.0.13 -- Swift 2.1: branch [swift21](https://github.com/krzyzanowskim/CryptoSwift/tree/swift21) version <= 0.2.3 -- Swift 2.2, 2.3: branch [swift2](https://github.com/krzyzanowskim/CryptoSwift/tree/swift2) version <= 0.5.2 -- Swift 3.1, branch [swift3](https://github.com/krzyzanowskim/CryptoSwift/tree/swift3) version <= 0.6.9 -- Swift 3.2, branch [swift32](https://github.com/krzyzanowskim/CryptoSwift/tree/swift32) version = 0.7.0 -- Swift 4.0, branch [swift4](https://github.com/krzyzanowskim/CryptoSwift/tree/swift4) version <= 0.12.0 -- Swift 4.2, branch [swift42](https://github.com/krzyzanowskim/CryptoSwift/tree/swift42) version <= 0.15.0 -- Swift 5.0, 5.1, branch [master](https://github.com/krzyzanowskim/CryptoSwift/tree/master) - -#### CocoaPods - -You can use [CocoaPods](https://cocoapods.org/pods/CryptoSwift). - -```ruby -pod 'CryptoSwift', '~> 1.0' -``` - -Bear in mind that CocoaPods will build CryptoSwift without [Whole-Module Optimization](https://swift.org/blog/whole-module-optimizations/) that may impact performance. You can change it manually after installation, or use [cocoapods-wholemodule](https://github.com/jedlewison/cocoapods-wholemodule) plugin. - -#### Carthage -You can use [Carthage](https://github.com/Carthage/Carthage). -Specify in Cartfile: - -```ruby -github "krzyzanowskim/CryptoSwift" -``` - -Run `carthage` to build the framework and drag the built CryptoSwift.framework into your Xcode project. Follow [build instructions](https://github.com/Carthage/Carthage#getting-started). [Common issues](https://github.com/krzyzanowskim/CryptoSwift/issues/492#issuecomment-330822874). - -#### Swift Package Manager - -You can use [Swift Package Manager](https://swift.org/package-manager/) and specify dependency in `Package.swift` by adding this: - -```swift -.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", .upToNextMinor(from: "1.0.0")) -``` - -See: [Package.swift - manual](http://blog.krzyzanowskim.com/2016/08/09/package-swift-manual/) - -#### Accio -You can use [Accio](https://github.com/JamitLabs/Accio). Specify in `Package.swift`: - -```swift -.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", .upToNextMajor(from: "1.0.0")), -``` - -Then run `accio update`. - ---- - -## How-to - -* [Basics (data types, conversion, ...)](#basics) -* [Digest (MD5, SHA...)](#calculate-digest) -* [Message authenticators (HMAC, CMAC...)](#message-authenticators-1) -* [Password-Based Key Derivation Function (PBKDF2, ...)](#password-based-key-derivation-functions) -* [HMAC-based Key Derivation Function (HKDF)](#hmac-based-key-derivation-function) -* [Data Padding](#data-padding) -* [ChaCha20](#chacha20) -* [Rabbit](#rabbit) -* [Blowfish](#blowfish) -* [AES - Advanced Encryption Standard](#aes) -* [AES-GCM](#aes-gcm) -* [Authenticated Encryption with Associated Data (AEAD)](#aead) - -also check [Playground](/CryptoSwift.playground/Contents.swift) - -##### Basics - -```swift -import CryptoSwift -``` - -CryptoSwift uses array of bytes aka `Array` as a base type for all operations. Every data may be converted to a stream of bytes. You will find convenience functions that accept `String` or `Data`, and it will be internally converted to the array of bytes. - -##### Data types conversion - -For your convenience, **CryptoSwift** provides two functions to easily convert an array of bytes to `Data` or `Data` to an array of bytes: - -Data from bytes: - -```swift -let data = Data( [0x01, 0x02, 0x03]) -``` - -`Data` to `Array` - -```swift -let bytes = data.bytes // [1,2,3] -``` - -[Hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal) encoding: - -```swift -let bytes = Array(hex: "0x010203") // [1,2,3] -let hex = bytes.toHexString() // "010203" -``` - -Build bytes out of `String` -```swift -let bytes: Array = "cipherkey".bytes // Array("cipherkey".utf8) -``` - -Also... check out helpers that work with **Base64** encoded data: -```swift -"aPf/i9th9iX+vf49eR7PYk2q7S5xmm3jkRLejgzHNJs=".decryptBase64ToString(cipher) -"aPf/i9th9iX+vf49eR7PYk2q7S5xmm3jkRLejgzHNJs=".decryptBase64(cipher) -bytes.toBase64() -``` - -##### Calculate Digest - -Hashing a data or array of bytes (aka `Array`) -```swift -/* Hash struct usage */ -let bytes:Array = [0x01, 0x02, 0x03] -let digest = input.md5() -let digest = Digest.md5(bytes) -``` - -```swift -let data = Data( [0x01, 0x02, 0x03]) - -let hash = data.md5() -let hash = data.sha1() -let hash = data.sha224() -let hash = data.sha256() -let hash = data.sha384() -let hash = data.sha512() -``` -```swift -do { - var digest = MD5() - let partial1 = try digest.update(withBytes: [0x31, 0x32]) - let partial2 = try digest.update(withBytes: [0x33]) - let result = try digest.finish() -} catch { } -``` - -Hashing a String and printing result - -```swift -let hash = "123".md5() // "123".bytes.md5() -``` - -##### Calculate CRC - -```swift -bytes.crc16() -data.crc16() - -bytes.crc32() -data.crc32() -``` - -##### Message authenticators - -```swift -// Calculate Message Authentication Code (MAC) for message -let key:Array = [1,2,3,4,5,6,7,8,9,10,...] - -try Poly1305(key: key).authenticate(bytes) -try HMAC(key: key, variant: .sha256).authenticate(bytes) -try CMAC(key: key).authenticate(bytes) -``` - -##### Password-Based Key Derivation Functions - -```swift -let password: Array = Array("s33krit".utf8) -let salt: Array = Array("nacllcan".utf8) - -let key = try PKCS5.PBKDF2(password: password, salt: salt, iterations: 4096, keyLength: 32, variant: .sha256).calculate() -``` - -```swift -let password: Array = Array("s33krit".utf8) -let salt: Array = Array("nacllcan".utf8) -// Scrypt implementation does not implement work parallelization, so `p` parameter will -// increase the work time even in multicore systems -let key = try Scrypt(password: password, salt: salt, dkLen: 64, N: 16384, r: 8, p: 1).calculate() -``` - -##### HMAC-based Key Derivation Function - -```swift -let password: Array = Array("s33krit".utf8) -let salt: Array = Array("nacllcan".utf8) - -let key = try HKDF(password: password, salt: salt, variant: .sha256).calculate() -``` - - -##### Data Padding - -Some content-encryption algorithms assume the input length is a multiple of `k` octets, where `k` is greater than one. For such algorithms, the input shall be padded. - -```swift -Padding.pkcs7.add(to: bytes, blockSize: AES.blockSize) -``` - -#### Working with Ciphers -##### ChaCha20 - -```swift -let encrypted = try ChaCha20(key: key, iv: iv).encrypt(message) -let decrypted = try ChaCha20(key: key, iv: iv).decrypt(encrypted) -``` - -##### Rabbit - -```swift -let encrypted = try Rabbit(key: key, iv: iv).encrypt(message) -let decrypted = try Rabbit(key: key, iv: iv).decrypt(encrypted) -``` -##### Blowfish - -```swift -let encrypted = try Blowfish(key: key, blockMode: CBC(iv: iv), padding: .pkcs7).encrypt(message) -let decrypted = try Blowfish(key: key, blockMode: CBC(iv: iv), padding: .pkcs7).decrypt(encrypted) -``` - -##### AES - -Notice regarding padding: *Manual padding of data is optional, and CryptoSwift is using PKCS7 padding by default. If you need to manually disable/enable padding, you can do this by setting parameter for __AES__ class* - -Variant of AES encryption (AES-128, AES-192, AES-256) depends on given key length: - -- AES-128 = 16 bytes -- AES-192 = 24 bytes -- AES-256 = 32 bytes - -AES-256 example -```swift -try AES(key: [1,2,3,...,32], blockMode: CBC(iv: [1,2,3,...,16]), padding: .pkcs7) -``` - -###### All at once -```swift -do { - let aes = try AES(key: "keykeykeykeykeyk", iv: "drowssapdrowssap") // aes128 - let ciphertext = try aes.encrypt(Array("Nullam quis risus eget urna mollis ornare vel eu leo.".utf8)) -} catch { } -``` - -###### Incremental updates - -Incremental operations use instance of Cryptor and encrypt/decrypt one part at a time, this way you can save on memory for large files. - -```swift -do { - var encryptor = try AES(key: "keykeykeykeykeyk", iv: "drowssapdrowssap").makeEncryptor() - - var ciphertext = Array() - // aggregate partial results - ciphertext += try encryptor.update(withBytes: Array("Nullam quis risus ".utf8)) - ciphertext += try encryptor.update(withBytes: Array("eget urna mollis ".utf8)) - ciphertext += try encryptor.update(withBytes: Array("ornare vel eu leo.".utf8)) - // finish at the end - ciphertext += try encryptor.finish() - - print(ciphertext.toHexString()) -} catch { - print(error) -} -``` - -See [Playground](/CryptoSwift.playground/Contents.swift) for sample code that work with stream. - -###### AES Advanced usage -```swift -let input: Array = [0,1,2,3,4,5,6,7,8,9] - -let key: Array = [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00] -let iv: Array = // Random bytes of `AES.blockSize` length - -do { - let encrypted = try AES(key: key, blockMode: CBC(iv: iv), padding: .pkcs7).encrypt(input) - let decrypted = try AES(key: key, blockMode: CBC(iv: iv), padding: .pkcs7).decrypt(encrypted) -} catch { - print(error) -} -``` - -AES without data padding - -```swift -let input: Array = [0,1,2,3,4,5,6,7,8,9] -let encrypted: Array = try! AES(key: Array("secret0key000000".utf8), blockMode: CBC(iv: Array("0123456789012345".utf8)), padding: .noPadding).encrypt(input) -``` - -Using convenience extensions - -```swift -let plain = Data( [0x01, 0x02, 0x03]) -let encrypted = try! plain.encrypt(ChaCha20(key: key, iv: iv)) -let decrypted = try! encrypted.decrypt(ChaCha20(key: key, iv: iv)) -``` - -##### AES-GCM - -The result of Galois/Counter Mode (GCM) encryption is ciphertext and **authentication tag**, that is later used to decryption. - -encryption - -```swift -do { - // In combined mode, the authentication tag is directly appended to the encrypted message. This is usually what you want. - let gcm = GCM(iv: iv, mode: .combined) - let aes = try AES(key: key, blockMode: gcm, padding: .noPadding) - let encrypted = try aes.encrypt(plaintext) - let tag = gcm.authenticationTag -catch { - // failed -} -``` - -decryption - -```swift -do { - // In combined mode, the authentication tag is appended to the encrypted message. This is usually what you want. - let gcm = GCM(iv: iv, mode: .combined) - let aes = try AES(key: key, blockMode: gcm, padding: .noPadding) - return try aes.decrypt(encrypted) -} catch { - // failed -} -``` - -**Note**: GCM instance is not intended to be reused. So you can't use the same `GCM` instance from encoding to also perform decoding. - -##### AES-CCM - -The result of Counter with Cipher Block Chaining-Message Authentication Code encryption is ciphertext and **authentication tag**, that is later used to decryption. - -```swift -do { - // The authentication tag is appended to the encrypted message. - let tagLength = 8 - let ccm = CCM(iv: iv, tagLength: tagLength, messageLength: ciphertext.count - tagLength, additionalAuthenticatedData: data) - let aes = try AES(key: key, blockMode: ccm, padding: .noPadding) - return try aes.decrypt(encrypted) -} catch { - // failed -} -``` - -Check documentation or CCM specification for valid parameters for CCM. - -##### AEAD - -```swift -let encrypt = try AEADChaCha20Poly1305.encrypt(plaintext, key: key, iv: nonce, authenticationHeader: header) -let decrypt = try AEADChaCha20Poly1305.decrypt(ciphertext, key: key, iv: nonce, authenticationHeader: header, authenticationTag: tagArr: tag) -``` - -## Author - -CryptoSwift is owned and maintained by [Marcin Krzyżanowski](http://www.krzyzanowskim.com) - -You can follow me on Twitter at [@krzyzanowskim](http://twitter.com/krzyzanowskim) for project updates and releases. - -# Cryptography Notice - -This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See http://www.wassenaar.org/ for more information. - -## License - -Copyright (C) 2014-2017 Marcin Krzyżanowski -This software is provided 'as-is', without any express or implied warranty. - -In no event will the authors be held liable for any damages arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: - -- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, **an acknowledgment in the product documentation is required**. -- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -- This notice may not be removed or altered from any source or binary distribution. -- Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by the "Marcin Krzyzanowski" (http://krzyzanowskim.com/).' - -## Changelog - -See [CHANGELOG](./CHANGELOG) file. diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEAD.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEAD.swift deleted file mode 100644 index 6d85c04..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEAD.swift +++ /dev/null @@ -1,40 +0,0 @@ -// -// AEAD.swift -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// -// - -// https://www.iana.org/assignments/aead-parameters/aead-parameters.xhtml - -/// Authenticated Encryption with Associated Data (AEAD) -public protocol AEAD { - static var kLen: Int { get } // key length - static var ivRange: Range { get } // nonce length -} - -extension AEAD { - static func calculateAuthenticationTag(authenticator: Authenticator, cipherText: Array, authenticationHeader: Array) throws -> Array { - let headerPadding = ((16 - (authenticationHeader.count & 0xf)) & 0xf) - let cipherPadding = ((16 - (cipherText.count & 0xf)) & 0xf) - - var mac = authenticationHeader - mac += Array(repeating: 0, count: headerPadding) - mac += cipherText - mac += Array(repeating: 0, count: cipherPadding) - mac += UInt64(bigEndian: UInt64(authenticationHeader.count)).bytes() - mac += UInt64(bigEndian: UInt64(cipherText.count)).bytes() - - return try authenticator.authenticate(mac) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift deleted file mode 100644 index 085f031..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/AEAD/AEADChaCha20Poly1305.swift +++ /dev/null @@ -1,59 +0,0 @@ -// -// ChaCha20Poly1305.swift -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// -// -// https://tools.ietf.org/html/rfc7539#section-2.8.1 - -/// AEAD_CHACHA20_POLY1305 -public final class AEADChaCha20Poly1305: AEAD { - public static let kLen = 32 // key length - public static var ivRange = Range(12...12) - - /// Authenticated encryption - public static func encrypt(_ plainText: Array, key: Array, iv: Array, authenticationHeader: Array) throws -> (cipherText: Array, authenticationTag: Array) { - let cipher = try ChaCha20(key: key, iv: iv) - - var polykey = Array(repeating: 0, count: kLen) - var toEncrypt = polykey - polykey = try cipher.encrypt(polykey) - toEncrypt += polykey - toEncrypt += plainText - - let fullCipherText = try cipher.encrypt(toEncrypt) - let cipherText = Array(fullCipherText.dropFirst(64)) - - let tag = try calculateAuthenticationTag(authenticator: Poly1305(key: polykey), cipherText: cipherText, authenticationHeader: authenticationHeader) - return (cipherText, tag) - } - - /// Authenticated decryption - public static func decrypt(_ cipherText: Array, key: Array, iv: Array, authenticationHeader: Array, authenticationTag: Array) throws -> (plainText: Array, success: Bool) { - let chacha = try ChaCha20(key: key, iv: iv) - - let polykey = try chacha.encrypt(Array(repeating: 0, count: self.kLen)) - let mac = try calculateAuthenticationTag(authenticator: Poly1305(key: polykey), cipherText: cipherText, authenticationHeader: authenticationHeader) - guard mac == authenticationTag else { - return (cipherText, false) - } - - var toDecrypt = Array(reserveCapacity: cipherText.count + 64) - toDecrypt += polykey - toDecrypt += polykey - toDecrypt += cipherText - let fullPlainText = try chacha.decrypt(toDecrypt) - let plainText = Array(fullPlainText.dropFirst(64)) - return (plainText, true) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift deleted file mode 100644 index 617ff7d..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/AES.Cryptors.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// MARK: Cryptors - -extension AES: Cryptors { - public func makeEncryptor() throws -> Cryptor & Updatable { - let worker = try blockMode.worker(blockSize: AES.blockSize, cipherOperation: encrypt) - if worker is StreamModeWorker { - return try StreamEncryptor(blockSize: AES.blockSize, padding: padding, worker) - } - return try BlockEncryptor(blockSize: AES.blockSize, padding: padding, worker) - } - - public func makeDecryptor() throws -> Cryptor & Updatable { - let cipherOperation: CipherOperationOnBlock = blockMode.options.contains(.useEncryptToDecrypt) == true ? encrypt : decrypt - let worker = try blockMode.worker(blockSize: AES.blockSize, cipherOperation: cipherOperation) - if worker is StreamModeWorker { - return try StreamDecryptor(blockSize: AES.blockSize, padding: padding, worker) - } - return try BlockDecryptor(blockSize: AES.blockSize, padding: padding, worker) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/AES.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/AES.swift deleted file mode 100644 index bd4e583..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/AES.swift +++ /dev/null @@ -1,539 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// Implementation of Gladman algorithm http://www.gladman.me.uk/AES -// - -/// The Advanced Encryption Standard (AES) -public final class AES: BlockCipher { - public enum Error: Swift.Error { - /// Invalid key - case invalidKeySize - /// Data padding is required - case dataPaddingRequired - /// Invalid Data - case invalidData - } - - public enum Variant: Int { - case aes128 = 1, aes192, aes256 - - var Nk: Int { // Nk words - [4, 6, 8][self.rawValue - 1] - } - - var Nb: Int { // Nb words - 4 - } - - var Nr: Int { // Nr - self.Nk + 6 - } - } - - private let variantNr: Int - private let variantNb: Int - private let variantNk: Int - - public static let blockSize: Int = 16 // 128 /8 - public let keySize: Int - - /// AES Variant - public let variant: Variant - - // Parameters - let key: Key - let blockMode: BlockMode - let padding: Padding - - // - private lazy var expandedKey: Array> = self.expandKey(self.key, variant: self.variant) - private lazy var expandedKeyInv: Array> = self.expandKeyInv(self.key, variant: self.variant) - - private lazy var sBoxes: (sBox: Array, invSBox: Array) = self.calculateSBox() - private lazy var sBox: Array = self.sBoxes.sBox - private lazy var sBoxInv: Array = self.sBoxes.invSBox - - // Parameters for Linear Congruence Generators - private static let Rcon: Array = [ - 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, - 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, - 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, - 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, - 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, - 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, - 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, - 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, - 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, - 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, - 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, - 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, - 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, - 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, - 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, - 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d - ] - - private static let T0: Array = [0xa56363c6, 0x847c7cf8, 0x997777ee, 0x8d7b7bf6, 0xdf2f2ff, 0xbd6b6bd6, 0xb16f6fde, 0x54c5c591, 0x50303060, 0x3010102, 0xa96767ce, 0x7d2b2b56, 0x19fefee7, 0x62d7d7b5, 0xe6abab4d, 0x9a7676ec, 0x45caca8f, 0x9d82821f, 0x40c9c989, 0x877d7dfa, 0x15fafaef, 0xeb5959b2, 0xc947478e, 0xbf0f0fb, 0xecadad41, 0x67d4d4b3, 0xfda2a25f, 0xeaafaf45, 0xbf9c9c23, 0xf7a4a453, 0x967272e4, 0x5bc0c09b, 0xc2b7b775, 0x1cfdfde1, 0xae93933d, 0x6a26264c, 0x5a36366c, 0x413f3f7e, 0x2f7f7f5, 0x4fcccc83, 0x5c343468, 0xf4a5a551, 0x34e5e5d1, 0x8f1f1f9, 0x937171e2, 0x73d8d8ab, 0x53313162, 0x3f15152a, 0xc040408, 0x52c7c795, 0x65232346, 0x5ec3c39d, 0x28181830, 0xa1969637, 0xf05050a, 0xb59a9a2f, 0x907070e, 0x36121224, 0x9b80801b, 0x3de2e2df, 0x26ebebcd, 0x6927274e, 0xcdb2b27f, 0x9f7575ea, 0x1b090912, 0x9e83831d, 0x742c2c58, 0x2e1a1a34, 0x2d1b1b36, 0xb26e6edc, 0xee5a5ab4, 0xfba0a05b, 0xf65252a4, 0x4d3b3b76, 0x61d6d6b7, 0xceb3b37d, 0x7b292952, 0x3ee3e3dd, 0x712f2f5e, 0x97848413, 0xf55353a6, 0x68d1d1b9, 0x0, 0x2cededc1, 0x60202040, 0x1ffcfce3, 0xc8b1b179, 0xed5b5bb6, 0xbe6a6ad4, 0x46cbcb8d, 0xd9bebe67, 0x4b393972, 0xde4a4a94, 0xd44c4c98, 0xe85858b0, 0x4acfcf85, 0x6bd0d0bb, 0x2aefefc5, 0xe5aaaa4f, 0x16fbfbed, 0xc5434386, 0xd74d4d9a, 0x55333366, 0x94858511, 0xcf45458a, 0x10f9f9e9, 0x6020204, 0x817f7ffe, 0xf05050a0, 0x443c3c78, 0xba9f9f25, 0xe3a8a84b, 0xf35151a2, 0xfea3a35d, 0xc0404080, 0x8a8f8f05, 0xad92923f, 0xbc9d9d21, 0x48383870, 0x4f5f5f1, 0xdfbcbc63, 0xc1b6b677, 0x75dadaaf, 0x63212142, 0x30101020, 0x1affffe5, 0xef3f3fd, 0x6dd2d2bf, 0x4ccdcd81, 0x140c0c18, 0x35131326, 0x2fececc3, 0xe15f5fbe, 0xa2979735, 0xcc444488, 0x3917172e, 0x57c4c493, 0xf2a7a755, 0x827e7efc, 0x473d3d7a, 0xac6464c8, 0xe75d5dba, 0x2b191932, 0x957373e6, 0xa06060c0, 0x98818119, 0xd14f4f9e, 0x7fdcdca3, 0x66222244, 0x7e2a2a54, 0xab90903b, 0x8388880b, 0xca46468c, 0x29eeeec7, 0xd3b8b86b, 0x3c141428, 0x79dedea7, 0xe25e5ebc, 0x1d0b0b16, 0x76dbdbad, 0x3be0e0db, 0x56323264, 0x4e3a3a74, 0x1e0a0a14, 0xdb494992, 0xa06060c, 0x6c242448, 0xe45c5cb8, 0x5dc2c29f, 0x6ed3d3bd, 0xefacac43, 0xa66262c4, 0xa8919139, 0xa4959531, 0x37e4e4d3, 0x8b7979f2, 0x32e7e7d5, 0x43c8c88b, 0x5937376e, 0xb76d6dda, 0x8c8d8d01, 0x64d5d5b1, 0xd24e4e9c, 0xe0a9a949, 0xb46c6cd8, 0xfa5656ac, 0x7f4f4f3, 0x25eaeacf, 0xaf6565ca, 0x8e7a7af4, 0xe9aeae47, 0x18080810, 0xd5baba6f, 0x887878f0, 0x6f25254a, 0x722e2e5c, 0x241c1c38, 0xf1a6a657, 0xc7b4b473, 0x51c6c697, 0x23e8e8cb, 0x7cdddda1, 0x9c7474e8, 0x211f1f3e, 0xdd4b4b96, 0xdcbdbd61, 0x868b8b0d, 0x858a8a0f, 0x907070e0, 0x423e3e7c, 0xc4b5b571, 0xaa6666cc, 0xd8484890, 0x5030306, 0x1f6f6f7, 0x120e0e1c, 0xa36161c2, 0x5f35356a, 0xf95757ae, 0xd0b9b969, 0x91868617, 0x58c1c199, 0x271d1d3a, 0xb99e9e27, 0x38e1e1d9, 0x13f8f8eb, 0xb398982b, 0x33111122, 0xbb6969d2, 0x70d9d9a9, 0x898e8e07, 0xa7949433, 0xb69b9b2d, 0x221e1e3c, 0x92878715, 0x20e9e9c9, 0x49cece87, 0xff5555aa, 0x78282850, 0x7adfdfa5, 0x8f8c8c03, 0xf8a1a159, 0x80898909, 0x170d0d1a, 0xdabfbf65, 0x31e6e6d7, 0xc6424284, 0xb86868d0, 0xc3414182, 0xb0999929, 0x772d2d5a, 0x110f0f1e, 0xcbb0b07b, 0xfc5454a8, 0xd6bbbb6d, 0x3a16162c] - private static let T0_INV: Array = [0x50a7f451, 0x5365417e, 0xc3a4171a, 0x965e273a, 0xcb6bab3b, 0xf1459d1f, 0xab58faac, 0x9303e34b, 0x55fa3020, 0xf66d76ad, 0x9176cc88, 0x254c02f5, 0xfcd7e54f, 0xd7cb2ac5, 0x80443526, 0x8fa362b5, 0x495ab1de, 0x671bba25, 0x980eea45, 0xe1c0fe5d, 0x2752fc3, 0x12f04c81, 0xa397468d, 0xc6f9d36b, 0xe75f8f03, 0x959c9215, 0xeb7a6dbf, 0xda595295, 0x2d83bed4, 0xd3217458, 0x2969e049, 0x44c8c98e, 0x6a89c275, 0x78798ef4, 0x6b3e5899, 0xdd71b927, 0xb64fe1be, 0x17ad88f0, 0x66ac20c9, 0xb43ace7d, 0x184adf63, 0x82311ae5, 0x60335197, 0x457f5362, 0xe07764b1, 0x84ae6bbb, 0x1ca081fe, 0x942b08f9, 0x58684870, 0x19fd458f, 0x876cde94, 0xb7f87b52, 0x23d373ab, 0xe2024b72, 0x578f1fe3, 0x2aab5566, 0x728ebb2, 0x3c2b52f, 0x9a7bc586, 0xa50837d3, 0xf2872830, 0xb2a5bf23, 0xba6a0302, 0x5c8216ed, 0x2b1ccf8a, 0x92b479a7, 0xf0f207f3, 0xa1e2694e, 0xcdf4da65, 0xd5be0506, 0x1f6234d1, 0x8afea6c4, 0x9d532e34, 0xa055f3a2, 0x32e18a05, 0x75ebf6a4, 0x39ec830b, 0xaaef6040, 0x69f715e, 0x51106ebd, 0xf98a213e, 0x3d06dd96, 0xae053edd, 0x46bde64d, 0xb58d5491, 0x55dc471, 0x6fd40604, 0xff155060, 0x24fb9819, 0x97e9bdd6, 0xcc434089, 0x779ed967, 0xbd42e8b0, 0x888b8907, 0x385b19e7, 0xdbeec879, 0x470a7ca1, 0xe90f427c, 0xc91e84f8, 0x0, 0x83868009, 0x48ed2b32, 0xac70111e, 0x4e725a6c, 0xfbff0efd, 0x5638850f, 0x1ed5ae3d, 0x27392d36, 0x64d90f0a, 0x21a65c68, 0xd1545b9b, 0x3a2e3624, 0xb1670a0c, 0xfe75793, 0xd296eeb4, 0x9e919b1b, 0x4fc5c080, 0xa220dc61, 0x694b775a, 0x161a121c, 0xaba93e2, 0xe52aa0c0, 0x43e0223c, 0x1d171b12, 0xb0d090e, 0xadc78bf2, 0xb9a8b62d, 0xc8a91e14, 0x8519f157, 0x4c0775af, 0xbbdd99ee, 0xfd607fa3, 0x9f2601f7, 0xbcf5725c, 0xc53b6644, 0x347efb5b, 0x7629438b, 0xdcc623cb, 0x68fcedb6, 0x63f1e4b8, 0xcadc31d7, 0x10856342, 0x40229713, 0x2011c684, 0x7d244a85, 0xf83dbbd2, 0x1132f9ae, 0x6da129c7, 0x4b2f9e1d, 0xf330b2dc, 0xec52860d, 0xd0e3c177, 0x6c16b32b, 0x99b970a9, 0xfa489411, 0x2264e947, 0xc48cfca8, 0x1a3ff0a0, 0xd82c7d56, 0xef903322, 0xc74e4987, 0xc1d138d9, 0xfea2ca8c, 0x360bd498, 0xcf81f5a6, 0x28de7aa5, 0x268eb7da, 0xa4bfad3f, 0xe49d3a2c, 0xd927850, 0x9bcc5f6a, 0x62467e54, 0xc2138df6, 0xe8b8d890, 0x5ef7392e, 0xf5afc382, 0xbe805d9f, 0x7c93d069, 0xa92dd56f, 0xb31225cf, 0x3b99acc8, 0xa77d1810, 0x6e639ce8, 0x7bbb3bdb, 0x97826cd, 0xf418596e, 0x1b79aec, 0xa89a4f83, 0x656e95e6, 0x7ee6ffaa, 0x8cfbc21, 0xe6e815ef, 0xd99be7ba, 0xce366f4a, 0xd4099fea, 0xd67cb029, 0xafb2a431, 0x31233f2a, 0x3094a5c6, 0xc066a235, 0x37bc4e74, 0xa6ca82fc, 0xb0d090e0, 0x15d8a733, 0x4a9804f1, 0xf7daec41, 0xe50cd7f, 0x2ff69117, 0x8dd64d76, 0x4db0ef43, 0x544daacc, 0xdf0496e4, 0xe3b5d19e, 0x1b886a4c, 0xb81f2cc1, 0x7f516546, 0x4ea5e9d, 0x5d358c01, 0x737487fa, 0x2e410bfb, 0x5a1d67b3, 0x52d2db92, 0x335610e9, 0x1347d66d, 0x8c61d79a, 0x7a0ca137, 0x8e14f859, 0x893c13eb, 0xee27a9ce, 0x35c961b7, 0xede51ce1, 0x3cb1477a, 0x59dfd29c, 0x3f73f255, 0x79ce1418, 0xbf37c773, 0xeacdf753, 0x5baafd5f, 0x146f3ddf, 0x86db4478, 0x81f3afca, 0x3ec468b9, 0x2c342438, 0x5f40a3c2, 0x72c31d16, 0xc25e2bc, 0x8b493c28, 0x41950dff, 0x7101a839, 0xdeb30c08, 0x9ce4b4d8, 0x90c15664, 0x6184cb7b, 0x70b632d5, 0x745c6c48, 0x4257b8d0] - private static let T1: Array = [0x6363c6a5, 0x7c7cf884, 0x7777ee99, 0x7b7bf68d, 0xf2f2ff0d, 0x6b6bd6bd, 0x6f6fdeb1, 0xc5c59154, 0x30306050, 0x1010203, 0x6767cea9, 0x2b2b567d, 0xfefee719, 0xd7d7b562, 0xabab4de6, 0x7676ec9a, 0xcaca8f45, 0x82821f9d, 0xc9c98940, 0x7d7dfa87, 0xfafaef15, 0x5959b2eb, 0x47478ec9, 0xf0f0fb0b, 0xadad41ec, 0xd4d4b367, 0xa2a25ffd, 0xafaf45ea, 0x9c9c23bf, 0xa4a453f7, 0x7272e496, 0xc0c09b5b, 0xb7b775c2, 0xfdfde11c, 0x93933dae, 0x26264c6a, 0x36366c5a, 0x3f3f7e41, 0xf7f7f502, 0xcccc834f, 0x3434685c, 0xa5a551f4, 0xe5e5d134, 0xf1f1f908, 0x7171e293, 0xd8d8ab73, 0x31316253, 0x15152a3f, 0x404080c, 0xc7c79552, 0x23234665, 0xc3c39d5e, 0x18183028, 0x969637a1, 0x5050a0f, 0x9a9a2fb5, 0x7070e09, 0x12122436, 0x80801b9b, 0xe2e2df3d, 0xebebcd26, 0x27274e69, 0xb2b27fcd, 0x7575ea9f, 0x909121b, 0x83831d9e, 0x2c2c5874, 0x1a1a342e, 0x1b1b362d, 0x6e6edcb2, 0x5a5ab4ee, 0xa0a05bfb, 0x5252a4f6, 0x3b3b764d, 0xd6d6b761, 0xb3b37dce, 0x2929527b, 0xe3e3dd3e, 0x2f2f5e71, 0x84841397, 0x5353a6f5, 0xd1d1b968, 0x0, 0xededc12c, 0x20204060, 0xfcfce31f, 0xb1b179c8, 0x5b5bb6ed, 0x6a6ad4be, 0xcbcb8d46, 0xbebe67d9, 0x3939724b, 0x4a4a94de, 0x4c4c98d4, 0x5858b0e8, 0xcfcf854a, 0xd0d0bb6b, 0xefefc52a, 0xaaaa4fe5, 0xfbfbed16, 0x434386c5, 0x4d4d9ad7, 0x33336655, 0x85851194, 0x45458acf, 0xf9f9e910, 0x2020406, 0x7f7ffe81, 0x5050a0f0, 0x3c3c7844, 0x9f9f25ba, 0xa8a84be3, 0x5151a2f3, 0xa3a35dfe, 0x404080c0, 0x8f8f058a, 0x92923fad, 0x9d9d21bc, 0x38387048, 0xf5f5f104, 0xbcbc63df, 0xb6b677c1, 0xdadaaf75, 0x21214263, 0x10102030, 0xffffe51a, 0xf3f3fd0e, 0xd2d2bf6d, 0xcdcd814c, 0xc0c1814, 0x13132635, 0xececc32f, 0x5f5fbee1, 0x979735a2, 0x444488cc, 0x17172e39, 0xc4c49357, 0xa7a755f2, 0x7e7efc82, 0x3d3d7a47, 0x6464c8ac, 0x5d5dbae7, 0x1919322b, 0x7373e695, 0x6060c0a0, 0x81811998, 0x4f4f9ed1, 0xdcdca37f, 0x22224466, 0x2a2a547e, 0x90903bab, 0x88880b83, 0x46468cca, 0xeeeec729, 0xb8b86bd3, 0x1414283c, 0xdedea779, 0x5e5ebce2, 0xb0b161d, 0xdbdbad76, 0xe0e0db3b, 0x32326456, 0x3a3a744e, 0xa0a141e, 0x494992db, 0x6060c0a, 0x2424486c, 0x5c5cb8e4, 0xc2c29f5d, 0xd3d3bd6e, 0xacac43ef, 0x6262c4a6, 0x919139a8, 0x959531a4, 0xe4e4d337, 0x7979f28b, 0xe7e7d532, 0xc8c88b43, 0x37376e59, 0x6d6ddab7, 0x8d8d018c, 0xd5d5b164, 0x4e4e9cd2, 0xa9a949e0, 0x6c6cd8b4, 0x5656acfa, 0xf4f4f307, 0xeaeacf25, 0x6565caaf, 0x7a7af48e, 0xaeae47e9, 0x8081018, 0xbaba6fd5, 0x7878f088, 0x25254a6f, 0x2e2e5c72, 0x1c1c3824, 0xa6a657f1, 0xb4b473c7, 0xc6c69751, 0xe8e8cb23, 0xdddda17c, 0x7474e89c, 0x1f1f3e21, 0x4b4b96dd, 0xbdbd61dc, 0x8b8b0d86, 0x8a8a0f85, 0x7070e090, 0x3e3e7c42, 0xb5b571c4, 0x6666ccaa, 0x484890d8, 0x3030605, 0xf6f6f701, 0xe0e1c12, 0x6161c2a3, 0x35356a5f, 0x5757aef9, 0xb9b969d0, 0x86861791, 0xc1c19958, 0x1d1d3a27, 0x9e9e27b9, 0xe1e1d938, 0xf8f8eb13, 0x98982bb3, 0x11112233, 0x6969d2bb, 0xd9d9a970, 0x8e8e0789, 0x949433a7, 0x9b9b2db6, 0x1e1e3c22, 0x87871592, 0xe9e9c920, 0xcece8749, 0x5555aaff, 0x28285078, 0xdfdfa57a, 0x8c8c038f, 0xa1a159f8, 0x89890980, 0xd0d1a17, 0xbfbf65da, 0xe6e6d731, 0x424284c6, 0x6868d0b8, 0x414182c3, 0x999929b0, 0x2d2d5a77, 0xf0f1e11, 0xb0b07bcb, 0x5454a8fc, 0xbbbb6dd6, 0x16162c3a] - private static let T1_INV: Array = [0xa7f45150, 0x65417e53, 0xa4171ac3, 0x5e273a96, 0x6bab3bcb, 0x459d1ff1, 0x58faacab, 0x3e34b93, 0xfa302055, 0x6d76adf6, 0x76cc8891, 0x4c02f525, 0xd7e54ffc, 0xcb2ac5d7, 0x44352680, 0xa362b58f, 0x5ab1de49, 0x1bba2567, 0xeea4598, 0xc0fe5de1, 0x752fc302, 0xf04c8112, 0x97468da3, 0xf9d36bc6, 0x5f8f03e7, 0x9c921595, 0x7a6dbfeb, 0x595295da, 0x83bed42d, 0x217458d3, 0x69e04929, 0xc8c98e44, 0x89c2756a, 0x798ef478, 0x3e58996b, 0x71b927dd, 0x4fe1beb6, 0xad88f017, 0xac20c966, 0x3ace7db4, 0x4adf6318, 0x311ae582, 0x33519760, 0x7f536245, 0x7764b1e0, 0xae6bbb84, 0xa081fe1c, 0x2b08f994, 0x68487058, 0xfd458f19, 0x6cde9487, 0xf87b52b7, 0xd373ab23, 0x24b72e2, 0x8f1fe357, 0xab55662a, 0x28ebb207, 0xc2b52f03, 0x7bc5869a, 0x837d3a5, 0x872830f2, 0xa5bf23b2, 0x6a0302ba, 0x8216ed5c, 0x1ccf8a2b, 0xb479a792, 0xf207f3f0, 0xe2694ea1, 0xf4da65cd, 0xbe0506d5, 0x6234d11f, 0xfea6c48a, 0x532e349d, 0x55f3a2a0, 0xe18a0532, 0xebf6a475, 0xec830b39, 0xef6040aa, 0x9f715e06, 0x106ebd51, 0x8a213ef9, 0x6dd963d, 0x53eddae, 0xbde64d46, 0x8d5491b5, 0x5dc47105, 0xd406046f, 0x155060ff, 0xfb981924, 0xe9bdd697, 0x434089cc, 0x9ed96777, 0x42e8b0bd, 0x8b890788, 0x5b19e738, 0xeec879db, 0xa7ca147, 0xf427ce9, 0x1e84f8c9, 0x0, 0x86800983, 0xed2b3248, 0x70111eac, 0x725a6c4e, 0xff0efdfb, 0x38850f56, 0xd5ae3d1e, 0x392d3627, 0xd90f0a64, 0xa65c6821, 0x545b9bd1, 0x2e36243a, 0x670a0cb1, 0xe757930f, 0x96eeb4d2, 0x919b1b9e, 0xc5c0804f, 0x20dc61a2, 0x4b775a69, 0x1a121c16, 0xba93e20a, 0x2aa0c0e5, 0xe0223c43, 0x171b121d, 0xd090e0b, 0xc78bf2ad, 0xa8b62db9, 0xa91e14c8, 0x19f15785, 0x775af4c, 0xdd99eebb, 0x607fa3fd, 0x2601f79f, 0xf5725cbc, 0x3b6644c5, 0x7efb5b34, 0x29438b76, 0xc623cbdc, 0xfcedb668, 0xf1e4b863, 0xdc31d7ca, 0x85634210, 0x22971340, 0x11c68420, 0x244a857d, 0x3dbbd2f8, 0x32f9ae11, 0xa129c76d, 0x2f9e1d4b, 0x30b2dcf3, 0x52860dec, 0xe3c177d0, 0x16b32b6c, 0xb970a999, 0x489411fa, 0x64e94722, 0x8cfca8c4, 0x3ff0a01a, 0x2c7d56d8, 0x903322ef, 0x4e4987c7, 0xd138d9c1, 0xa2ca8cfe, 0xbd49836, 0x81f5a6cf, 0xde7aa528, 0x8eb7da26, 0xbfad3fa4, 0x9d3a2ce4, 0x9278500d, 0xcc5f6a9b, 0x467e5462, 0x138df6c2, 0xb8d890e8, 0xf7392e5e, 0xafc382f5, 0x805d9fbe, 0x93d0697c, 0x2dd56fa9, 0x1225cfb3, 0x99acc83b, 0x7d1810a7, 0x639ce86e, 0xbb3bdb7b, 0x7826cd09, 0x18596ef4, 0xb79aec01, 0x9a4f83a8, 0x6e95e665, 0xe6ffaa7e, 0xcfbc2108, 0xe815efe6, 0x9be7bad9, 0x366f4ace, 0x99fead4, 0x7cb029d6, 0xb2a431af, 0x233f2a31, 0x94a5c630, 0x66a235c0, 0xbc4e7437, 0xca82fca6, 0xd090e0b0, 0xd8a73315, 0x9804f14a, 0xdaec41f7, 0x50cd7f0e, 0xf691172f, 0xd64d768d, 0xb0ef434d, 0x4daacc54, 0x496e4df, 0xb5d19ee3, 0x886a4c1b, 0x1f2cc1b8, 0x5165467f, 0xea5e9d04, 0x358c015d, 0x7487fa73, 0x410bfb2e, 0x1d67b35a, 0xd2db9252, 0x5610e933, 0x47d66d13, 0x61d79a8c, 0xca1377a, 0x14f8598e, 0x3c13eb89, 0x27a9ceee, 0xc961b735, 0xe51ce1ed, 0xb1477a3c, 0xdfd29c59, 0x73f2553f, 0xce141879, 0x37c773bf, 0xcdf753ea, 0xaafd5f5b, 0x6f3ddf14, 0xdb447886, 0xf3afca81, 0xc468b93e, 0x3424382c, 0x40a3c25f, 0xc31d1672, 0x25e2bc0c, 0x493c288b, 0x950dff41, 0x1a83971, 0xb30c08de, 0xe4b4d89c, 0xc1566490, 0x84cb7b61, 0xb632d570, 0x5c6c4874, 0x57b8d042] - private static let T2: Array = [0x63c6a563, 0x7cf8847c, 0x77ee9977, 0x7bf68d7b, 0xf2ff0df2, 0x6bd6bd6b, 0x6fdeb16f, 0xc59154c5, 0x30605030, 0x1020301, 0x67cea967, 0x2b567d2b, 0xfee719fe, 0xd7b562d7, 0xab4de6ab, 0x76ec9a76, 0xca8f45ca, 0x821f9d82, 0xc98940c9, 0x7dfa877d, 0xfaef15fa, 0x59b2eb59, 0x478ec947, 0xf0fb0bf0, 0xad41ecad, 0xd4b367d4, 0xa25ffda2, 0xaf45eaaf, 0x9c23bf9c, 0xa453f7a4, 0x72e49672, 0xc09b5bc0, 0xb775c2b7, 0xfde11cfd, 0x933dae93, 0x264c6a26, 0x366c5a36, 0x3f7e413f, 0xf7f502f7, 0xcc834fcc, 0x34685c34, 0xa551f4a5, 0xe5d134e5, 0xf1f908f1, 0x71e29371, 0xd8ab73d8, 0x31625331, 0x152a3f15, 0x4080c04, 0xc79552c7, 0x23466523, 0xc39d5ec3, 0x18302818, 0x9637a196, 0x50a0f05, 0x9a2fb59a, 0x70e0907, 0x12243612, 0x801b9b80, 0xe2df3de2, 0xebcd26eb, 0x274e6927, 0xb27fcdb2, 0x75ea9f75, 0x9121b09, 0x831d9e83, 0x2c58742c, 0x1a342e1a, 0x1b362d1b, 0x6edcb26e, 0x5ab4ee5a, 0xa05bfba0, 0x52a4f652, 0x3b764d3b, 0xd6b761d6, 0xb37dceb3, 0x29527b29, 0xe3dd3ee3, 0x2f5e712f, 0x84139784, 0x53a6f553, 0xd1b968d1, 0x0, 0xedc12ced, 0x20406020, 0xfce31ffc, 0xb179c8b1, 0x5bb6ed5b, 0x6ad4be6a, 0xcb8d46cb, 0xbe67d9be, 0x39724b39, 0x4a94de4a, 0x4c98d44c, 0x58b0e858, 0xcf854acf, 0xd0bb6bd0, 0xefc52aef, 0xaa4fe5aa, 0xfbed16fb, 0x4386c543, 0x4d9ad74d, 0x33665533, 0x85119485, 0x458acf45, 0xf9e910f9, 0x2040602, 0x7ffe817f, 0x50a0f050, 0x3c78443c, 0x9f25ba9f, 0xa84be3a8, 0x51a2f351, 0xa35dfea3, 0x4080c040, 0x8f058a8f, 0x923fad92, 0x9d21bc9d, 0x38704838, 0xf5f104f5, 0xbc63dfbc, 0xb677c1b6, 0xdaaf75da, 0x21426321, 0x10203010, 0xffe51aff, 0xf3fd0ef3, 0xd2bf6dd2, 0xcd814ccd, 0xc18140c, 0x13263513, 0xecc32fec, 0x5fbee15f, 0x9735a297, 0x4488cc44, 0x172e3917, 0xc49357c4, 0xa755f2a7, 0x7efc827e, 0x3d7a473d, 0x64c8ac64, 0x5dbae75d, 0x19322b19, 0x73e69573, 0x60c0a060, 0x81199881, 0x4f9ed14f, 0xdca37fdc, 0x22446622, 0x2a547e2a, 0x903bab90, 0x880b8388, 0x468cca46, 0xeec729ee, 0xb86bd3b8, 0x14283c14, 0xdea779de, 0x5ebce25e, 0xb161d0b, 0xdbad76db, 0xe0db3be0, 0x32645632, 0x3a744e3a, 0xa141e0a, 0x4992db49, 0x60c0a06, 0x24486c24, 0x5cb8e45c, 0xc29f5dc2, 0xd3bd6ed3, 0xac43efac, 0x62c4a662, 0x9139a891, 0x9531a495, 0xe4d337e4, 0x79f28b79, 0xe7d532e7, 0xc88b43c8, 0x376e5937, 0x6ddab76d, 0x8d018c8d, 0xd5b164d5, 0x4e9cd24e, 0xa949e0a9, 0x6cd8b46c, 0x56acfa56, 0xf4f307f4, 0xeacf25ea, 0x65caaf65, 0x7af48e7a, 0xae47e9ae, 0x8101808, 0xba6fd5ba, 0x78f08878, 0x254a6f25, 0x2e5c722e, 0x1c38241c, 0xa657f1a6, 0xb473c7b4, 0xc69751c6, 0xe8cb23e8, 0xdda17cdd, 0x74e89c74, 0x1f3e211f, 0x4b96dd4b, 0xbd61dcbd, 0x8b0d868b, 0x8a0f858a, 0x70e09070, 0x3e7c423e, 0xb571c4b5, 0x66ccaa66, 0x4890d848, 0x3060503, 0xf6f701f6, 0xe1c120e, 0x61c2a361, 0x356a5f35, 0x57aef957, 0xb969d0b9, 0x86179186, 0xc19958c1, 0x1d3a271d, 0x9e27b99e, 0xe1d938e1, 0xf8eb13f8, 0x982bb398, 0x11223311, 0x69d2bb69, 0xd9a970d9, 0x8e07898e, 0x9433a794, 0x9b2db69b, 0x1e3c221e, 0x87159287, 0xe9c920e9, 0xce8749ce, 0x55aaff55, 0x28507828, 0xdfa57adf, 0x8c038f8c, 0xa159f8a1, 0x89098089, 0xd1a170d, 0xbf65dabf, 0xe6d731e6, 0x4284c642, 0x68d0b868, 0x4182c341, 0x9929b099, 0x2d5a772d, 0xf1e110f, 0xb07bcbb0, 0x54a8fc54, 0xbb6dd6bb, 0x162c3a16] - private static let T2_INV: Array = [0xf45150a7, 0x417e5365, 0x171ac3a4, 0x273a965e, 0xab3bcb6b, 0x9d1ff145, 0xfaacab58, 0xe34b9303, 0x302055fa, 0x76adf66d, 0xcc889176, 0x2f5254c, 0xe54ffcd7, 0x2ac5d7cb, 0x35268044, 0x62b58fa3, 0xb1de495a, 0xba25671b, 0xea45980e, 0xfe5de1c0, 0x2fc30275, 0x4c8112f0, 0x468da397, 0xd36bc6f9, 0x8f03e75f, 0x9215959c, 0x6dbfeb7a, 0x5295da59, 0xbed42d83, 0x7458d321, 0xe0492969, 0xc98e44c8, 0xc2756a89, 0x8ef47879, 0x58996b3e, 0xb927dd71, 0xe1beb64f, 0x88f017ad, 0x20c966ac, 0xce7db43a, 0xdf63184a, 0x1ae58231, 0x51976033, 0x5362457f, 0x64b1e077, 0x6bbb84ae, 0x81fe1ca0, 0x8f9942b, 0x48705868, 0x458f19fd, 0xde94876c, 0x7b52b7f8, 0x73ab23d3, 0x4b72e202, 0x1fe3578f, 0x55662aab, 0xebb20728, 0xb52f03c2, 0xc5869a7b, 0x37d3a508, 0x2830f287, 0xbf23b2a5, 0x302ba6a, 0x16ed5c82, 0xcf8a2b1c, 0x79a792b4, 0x7f3f0f2, 0x694ea1e2, 0xda65cdf4, 0x506d5be, 0x34d11f62, 0xa6c48afe, 0x2e349d53, 0xf3a2a055, 0x8a0532e1, 0xf6a475eb, 0x830b39ec, 0x6040aaef, 0x715e069f, 0x6ebd5110, 0x213ef98a, 0xdd963d06, 0x3eddae05, 0xe64d46bd, 0x5491b58d, 0xc471055d, 0x6046fd4, 0x5060ff15, 0x981924fb, 0xbdd697e9, 0x4089cc43, 0xd967779e, 0xe8b0bd42, 0x8907888b, 0x19e7385b, 0xc879dbee, 0x7ca1470a, 0x427ce90f, 0x84f8c91e, 0x0, 0x80098386, 0x2b3248ed, 0x111eac70, 0x5a6c4e72, 0xefdfbff, 0x850f5638, 0xae3d1ed5, 0x2d362739, 0xf0a64d9, 0x5c6821a6, 0x5b9bd154, 0x36243a2e, 0xa0cb167, 0x57930fe7, 0xeeb4d296, 0x9b1b9e91, 0xc0804fc5, 0xdc61a220, 0x775a694b, 0x121c161a, 0x93e20aba, 0xa0c0e52a, 0x223c43e0, 0x1b121d17, 0x90e0b0d, 0x8bf2adc7, 0xb62db9a8, 0x1e14c8a9, 0xf1578519, 0x75af4c07, 0x99eebbdd, 0x7fa3fd60, 0x1f79f26, 0x725cbcf5, 0x6644c53b, 0xfb5b347e, 0x438b7629, 0x23cbdcc6, 0xedb668fc, 0xe4b863f1, 0x31d7cadc, 0x63421085, 0x97134022, 0xc6842011, 0x4a857d24, 0xbbd2f83d, 0xf9ae1132, 0x29c76da1, 0x9e1d4b2f, 0xb2dcf330, 0x860dec52, 0xc177d0e3, 0xb32b6c16, 0x70a999b9, 0x9411fa48, 0xe9472264, 0xfca8c48c, 0xf0a01a3f, 0x7d56d82c, 0x3322ef90, 0x4987c74e, 0x38d9c1d1, 0xca8cfea2, 0xd498360b, 0xf5a6cf81, 0x7aa528de, 0xb7da268e, 0xad3fa4bf, 0x3a2ce49d, 0x78500d92, 0x5f6a9bcc, 0x7e546246, 0x8df6c213, 0xd890e8b8, 0x392e5ef7, 0xc382f5af, 0x5d9fbe80, 0xd0697c93, 0xd56fa92d, 0x25cfb312, 0xacc83b99, 0x1810a77d, 0x9ce86e63, 0x3bdb7bbb, 0x26cd0978, 0x596ef418, 0x9aec01b7, 0x4f83a89a, 0x95e6656e, 0xffaa7ee6, 0xbc2108cf, 0x15efe6e8, 0xe7bad99b, 0x6f4ace36, 0x9fead409, 0xb029d67c, 0xa431afb2, 0x3f2a3123, 0xa5c63094, 0xa235c066, 0x4e7437bc, 0x82fca6ca, 0x90e0b0d0, 0xa73315d8, 0x4f14a98, 0xec41f7da, 0xcd7f0e50, 0x91172ff6, 0x4d768dd6, 0xef434db0, 0xaacc544d, 0x96e4df04, 0xd19ee3b5, 0x6a4c1b88, 0x2cc1b81f, 0x65467f51, 0x5e9d04ea, 0x8c015d35, 0x87fa7374, 0xbfb2e41, 0x67b35a1d, 0xdb9252d2, 0x10e93356, 0xd66d1347, 0xd79a8c61, 0xa1377a0c, 0xf8598e14, 0x13eb893c, 0xa9ceee27, 0x61b735c9, 0x1ce1ede5, 0x477a3cb1, 0xd29c59df, 0xf2553f73, 0x141879ce, 0xc773bf37, 0xf753eacd, 0xfd5f5baa, 0x3ddf146f, 0x447886db, 0xafca81f3, 0x68b93ec4, 0x24382c34, 0xa3c25f40, 0x1d1672c3, 0xe2bc0c25, 0x3c288b49, 0xdff4195, 0xa8397101, 0xc08deb3, 0xb4d89ce4, 0x566490c1, 0xcb7b6184, 0x32d570b6, 0x6c48745c, 0xb8d04257] - private static let T3: Array = [0xc6a56363, 0xf8847c7c, 0xee997777, 0xf68d7b7b, 0xff0df2f2, 0xd6bd6b6b, 0xdeb16f6f, 0x9154c5c5, 0x60503030, 0x2030101, 0xcea96767, 0x567d2b2b, 0xe719fefe, 0xb562d7d7, 0x4de6abab, 0xec9a7676, 0x8f45caca, 0x1f9d8282, 0x8940c9c9, 0xfa877d7d, 0xef15fafa, 0xb2eb5959, 0x8ec94747, 0xfb0bf0f0, 0x41ecadad, 0xb367d4d4, 0x5ffda2a2, 0x45eaafaf, 0x23bf9c9c, 0x53f7a4a4, 0xe4967272, 0x9b5bc0c0, 0x75c2b7b7, 0xe11cfdfd, 0x3dae9393, 0x4c6a2626, 0x6c5a3636, 0x7e413f3f, 0xf502f7f7, 0x834fcccc, 0x685c3434, 0x51f4a5a5, 0xd134e5e5, 0xf908f1f1, 0xe2937171, 0xab73d8d8, 0x62533131, 0x2a3f1515, 0x80c0404, 0x9552c7c7, 0x46652323, 0x9d5ec3c3, 0x30281818, 0x37a19696, 0xa0f0505, 0x2fb59a9a, 0xe090707, 0x24361212, 0x1b9b8080, 0xdf3de2e2, 0xcd26ebeb, 0x4e692727, 0x7fcdb2b2, 0xea9f7575, 0x121b0909, 0x1d9e8383, 0x58742c2c, 0x342e1a1a, 0x362d1b1b, 0xdcb26e6e, 0xb4ee5a5a, 0x5bfba0a0, 0xa4f65252, 0x764d3b3b, 0xb761d6d6, 0x7dceb3b3, 0x527b2929, 0xdd3ee3e3, 0x5e712f2f, 0x13978484, 0xa6f55353, 0xb968d1d1, 0x0, 0xc12ceded, 0x40602020, 0xe31ffcfc, 0x79c8b1b1, 0xb6ed5b5b, 0xd4be6a6a, 0x8d46cbcb, 0x67d9bebe, 0x724b3939, 0x94de4a4a, 0x98d44c4c, 0xb0e85858, 0x854acfcf, 0xbb6bd0d0, 0xc52aefef, 0x4fe5aaaa, 0xed16fbfb, 0x86c54343, 0x9ad74d4d, 0x66553333, 0x11948585, 0x8acf4545, 0xe910f9f9, 0x4060202, 0xfe817f7f, 0xa0f05050, 0x78443c3c, 0x25ba9f9f, 0x4be3a8a8, 0xa2f35151, 0x5dfea3a3, 0x80c04040, 0x58a8f8f, 0x3fad9292, 0x21bc9d9d, 0x70483838, 0xf104f5f5, 0x63dfbcbc, 0x77c1b6b6, 0xaf75dada, 0x42632121, 0x20301010, 0xe51affff, 0xfd0ef3f3, 0xbf6dd2d2, 0x814ccdcd, 0x18140c0c, 0x26351313, 0xc32fecec, 0xbee15f5f, 0x35a29797, 0x88cc4444, 0x2e391717, 0x9357c4c4, 0x55f2a7a7, 0xfc827e7e, 0x7a473d3d, 0xc8ac6464, 0xbae75d5d, 0x322b1919, 0xe6957373, 0xc0a06060, 0x19988181, 0x9ed14f4f, 0xa37fdcdc, 0x44662222, 0x547e2a2a, 0x3bab9090, 0xb838888, 0x8cca4646, 0xc729eeee, 0x6bd3b8b8, 0x283c1414, 0xa779dede, 0xbce25e5e, 0x161d0b0b, 0xad76dbdb, 0xdb3be0e0, 0x64563232, 0x744e3a3a, 0x141e0a0a, 0x92db4949, 0xc0a0606, 0x486c2424, 0xb8e45c5c, 0x9f5dc2c2, 0xbd6ed3d3, 0x43efacac, 0xc4a66262, 0x39a89191, 0x31a49595, 0xd337e4e4, 0xf28b7979, 0xd532e7e7, 0x8b43c8c8, 0x6e593737, 0xdab76d6d, 0x18c8d8d, 0xb164d5d5, 0x9cd24e4e, 0x49e0a9a9, 0xd8b46c6c, 0xacfa5656, 0xf307f4f4, 0xcf25eaea, 0xcaaf6565, 0xf48e7a7a, 0x47e9aeae, 0x10180808, 0x6fd5baba, 0xf0887878, 0x4a6f2525, 0x5c722e2e, 0x38241c1c, 0x57f1a6a6, 0x73c7b4b4, 0x9751c6c6, 0xcb23e8e8, 0xa17cdddd, 0xe89c7474, 0x3e211f1f, 0x96dd4b4b, 0x61dcbdbd, 0xd868b8b, 0xf858a8a, 0xe0907070, 0x7c423e3e, 0x71c4b5b5, 0xccaa6666, 0x90d84848, 0x6050303, 0xf701f6f6, 0x1c120e0e, 0xc2a36161, 0x6a5f3535, 0xaef95757, 0x69d0b9b9, 0x17918686, 0x9958c1c1, 0x3a271d1d, 0x27b99e9e, 0xd938e1e1, 0xeb13f8f8, 0x2bb39898, 0x22331111, 0xd2bb6969, 0xa970d9d9, 0x7898e8e, 0x33a79494, 0x2db69b9b, 0x3c221e1e, 0x15928787, 0xc920e9e9, 0x8749cece, 0xaaff5555, 0x50782828, 0xa57adfdf, 0x38f8c8c, 0x59f8a1a1, 0x9808989, 0x1a170d0d, 0x65dabfbf, 0xd731e6e6, 0x84c64242, 0xd0b86868, 0x82c34141, 0x29b09999, 0x5a772d2d, 0x1e110f0f, 0x7bcbb0b0, 0xa8fc5454, 0x6dd6bbbb, 0x2c3a1616] - private static let T3_INV: Array = [0x5150a7f4, 0x7e536541, 0x1ac3a417, 0x3a965e27, 0x3bcb6bab, 0x1ff1459d, 0xacab58fa, 0x4b9303e3, 0x2055fa30, 0xadf66d76, 0x889176cc, 0xf5254c02, 0x4ffcd7e5, 0xc5d7cb2a, 0x26804435, 0xb58fa362, 0xde495ab1, 0x25671bba, 0x45980eea, 0x5de1c0fe, 0xc302752f, 0x8112f04c, 0x8da39746, 0x6bc6f9d3, 0x3e75f8f, 0x15959c92, 0xbfeb7a6d, 0x95da5952, 0xd42d83be, 0x58d32174, 0x492969e0, 0x8e44c8c9, 0x756a89c2, 0xf478798e, 0x996b3e58, 0x27dd71b9, 0xbeb64fe1, 0xf017ad88, 0xc966ac20, 0x7db43ace, 0x63184adf, 0xe582311a, 0x97603351, 0x62457f53, 0xb1e07764, 0xbb84ae6b, 0xfe1ca081, 0xf9942b08, 0x70586848, 0x8f19fd45, 0x94876cde, 0x52b7f87b, 0xab23d373, 0x72e2024b, 0xe3578f1f, 0x662aab55, 0xb20728eb, 0x2f03c2b5, 0x869a7bc5, 0xd3a50837, 0x30f28728, 0x23b2a5bf, 0x2ba6a03, 0xed5c8216, 0x8a2b1ccf, 0xa792b479, 0xf3f0f207, 0x4ea1e269, 0x65cdf4da, 0x6d5be05, 0xd11f6234, 0xc48afea6, 0x349d532e, 0xa2a055f3, 0x532e18a, 0xa475ebf6, 0xb39ec83, 0x40aaef60, 0x5e069f71, 0xbd51106e, 0x3ef98a21, 0x963d06dd, 0xddae053e, 0x4d46bde6, 0x91b58d54, 0x71055dc4, 0x46fd406, 0x60ff1550, 0x1924fb98, 0xd697e9bd, 0x89cc4340, 0x67779ed9, 0xb0bd42e8, 0x7888b89, 0xe7385b19, 0x79dbeec8, 0xa1470a7c, 0x7ce90f42, 0xf8c91e84, 0x0, 0x9838680, 0x3248ed2b, 0x1eac7011, 0x6c4e725a, 0xfdfbff0e, 0xf563885, 0x3d1ed5ae, 0x3627392d, 0xa64d90f, 0x6821a65c, 0x9bd1545b, 0x243a2e36, 0xcb1670a, 0x930fe757, 0xb4d296ee, 0x1b9e919b, 0x804fc5c0, 0x61a220dc, 0x5a694b77, 0x1c161a12, 0xe20aba93, 0xc0e52aa0, 0x3c43e022, 0x121d171b, 0xe0b0d09, 0xf2adc78b, 0x2db9a8b6, 0x14c8a91e, 0x578519f1, 0xaf4c0775, 0xeebbdd99, 0xa3fd607f, 0xf79f2601, 0x5cbcf572, 0x44c53b66, 0x5b347efb, 0x8b762943, 0xcbdcc623, 0xb668fced, 0xb863f1e4, 0xd7cadc31, 0x42108563, 0x13402297, 0x842011c6, 0x857d244a, 0xd2f83dbb, 0xae1132f9, 0xc76da129, 0x1d4b2f9e, 0xdcf330b2, 0xdec5286, 0x77d0e3c1, 0x2b6c16b3, 0xa999b970, 0x11fa4894, 0x472264e9, 0xa8c48cfc, 0xa01a3ff0, 0x56d82c7d, 0x22ef9033, 0x87c74e49, 0xd9c1d138, 0x8cfea2ca, 0x98360bd4, 0xa6cf81f5, 0xa528de7a, 0xda268eb7, 0x3fa4bfad, 0x2ce49d3a, 0x500d9278, 0x6a9bcc5f, 0x5462467e, 0xf6c2138d, 0x90e8b8d8, 0x2e5ef739, 0x82f5afc3, 0x9fbe805d, 0x697c93d0, 0x6fa92dd5, 0xcfb31225, 0xc83b99ac, 0x10a77d18, 0xe86e639c, 0xdb7bbb3b, 0xcd097826, 0x6ef41859, 0xec01b79a, 0x83a89a4f, 0xe6656e95, 0xaa7ee6ff, 0x2108cfbc, 0xefe6e815, 0xbad99be7, 0x4ace366f, 0xead4099f, 0x29d67cb0, 0x31afb2a4, 0x2a31233f, 0xc63094a5, 0x35c066a2, 0x7437bc4e, 0xfca6ca82, 0xe0b0d090, 0x3315d8a7, 0xf14a9804, 0x41f7daec, 0x7f0e50cd, 0x172ff691, 0x768dd64d, 0x434db0ef, 0xcc544daa, 0xe4df0496, 0x9ee3b5d1, 0x4c1b886a, 0xc1b81f2c, 0x467f5165, 0x9d04ea5e, 0x15d358c, 0xfa737487, 0xfb2e410b, 0xb35a1d67, 0x9252d2db, 0xe9335610, 0x6d1347d6, 0x9a8c61d7, 0x377a0ca1, 0x598e14f8, 0xeb893c13, 0xceee27a9, 0xb735c961, 0xe1ede51c, 0x7a3cb147, 0x9c59dfd2, 0x553f73f2, 0x1879ce14, 0x73bf37c7, 0x53eacdf7, 0x5f5baafd, 0xdf146f3d, 0x7886db44, 0xca81f3af, 0xb93ec468, 0x382c3424, 0xc25f40a3, 0x1672c31d, 0xbc0c25e2, 0x288b493c, 0xff41950d, 0x397101a8, 0x8deb30c, 0xd89ce4b4, 0x6490c156, 0x7b6184cb, 0xd570b632, 0x48745c6c, 0xd04257b8] - private static let U1: Array = [0x0, 0xb0d090e, 0x161a121c, 0x1d171b12, 0x2c342438, 0x27392d36, 0x3a2e3624, 0x31233f2a, 0x58684870, 0x5365417e, 0x4e725a6c, 0x457f5362, 0x745c6c48, 0x7f516546, 0x62467e54, 0x694b775a, 0xb0d090e0, 0xbbdd99ee, 0xa6ca82fc, 0xadc78bf2, 0x9ce4b4d8, 0x97e9bdd6, 0x8afea6c4, 0x81f3afca, 0xe8b8d890, 0xe3b5d19e, 0xfea2ca8c, 0xf5afc382, 0xc48cfca8, 0xcf81f5a6, 0xd296eeb4, 0xd99be7ba, 0x7bbb3bdb, 0x70b632d5, 0x6da129c7, 0x66ac20c9, 0x578f1fe3, 0x5c8216ed, 0x41950dff, 0x4a9804f1, 0x23d373ab, 0x28de7aa5, 0x35c961b7, 0x3ec468b9, 0xfe75793, 0x4ea5e9d, 0x19fd458f, 0x12f04c81, 0xcb6bab3b, 0xc066a235, 0xdd71b927, 0xd67cb029, 0xe75f8f03, 0xec52860d, 0xf1459d1f, 0xfa489411, 0x9303e34b, 0x980eea45, 0x8519f157, 0x8e14f859, 0xbf37c773, 0xb43ace7d, 0xa92dd56f, 0xa220dc61, 0xf66d76ad, 0xfd607fa3, 0xe07764b1, 0xeb7a6dbf, 0xda595295, 0xd1545b9b, 0xcc434089, 0xc74e4987, 0xae053edd, 0xa50837d3, 0xb81f2cc1, 0xb31225cf, 0x82311ae5, 0x893c13eb, 0x942b08f9, 0x9f2601f7, 0x46bde64d, 0x4db0ef43, 0x50a7f451, 0x5baafd5f, 0x6a89c275, 0x6184cb7b, 0x7c93d069, 0x779ed967, 0x1ed5ae3d, 0x15d8a733, 0x8cfbc21, 0x3c2b52f, 0x32e18a05, 0x39ec830b, 0x24fb9819, 0x2ff69117, 0x8dd64d76, 0x86db4478, 0x9bcc5f6a, 0x90c15664, 0xa1e2694e, 0xaaef6040, 0xb7f87b52, 0xbcf5725c, 0xd5be0506, 0xdeb30c08, 0xc3a4171a, 0xc8a91e14, 0xf98a213e, 0xf2872830, 0xef903322, 0xe49d3a2c, 0x3d06dd96, 0x360bd498, 0x2b1ccf8a, 0x2011c684, 0x1132f9ae, 0x1a3ff0a0, 0x728ebb2, 0xc25e2bc, 0x656e95e6, 0x6e639ce8, 0x737487fa, 0x78798ef4, 0x495ab1de, 0x4257b8d0, 0x5f40a3c2, 0x544daacc, 0xf7daec41, 0xfcd7e54f, 0xe1c0fe5d, 0xeacdf753, 0xdbeec879, 0xd0e3c177, 0xcdf4da65, 0xc6f9d36b, 0xafb2a431, 0xa4bfad3f, 0xb9a8b62d, 0xb2a5bf23, 0x83868009, 0x888b8907, 0x959c9215, 0x9e919b1b, 0x470a7ca1, 0x4c0775af, 0x51106ebd, 0x5a1d67b3, 0x6b3e5899, 0x60335197, 0x7d244a85, 0x7629438b, 0x1f6234d1, 0x146f3ddf, 0x97826cd, 0x2752fc3, 0x335610e9, 0x385b19e7, 0x254c02f5, 0x2e410bfb, 0x8c61d79a, 0x876cde94, 0x9a7bc586, 0x9176cc88, 0xa055f3a2, 0xab58faac, 0xb64fe1be, 0xbd42e8b0, 0xd4099fea, 0xdf0496e4, 0xc2138df6, 0xc91e84f8, 0xf83dbbd2, 0xf330b2dc, 0xee27a9ce, 0xe52aa0c0, 0x3cb1477a, 0x37bc4e74, 0x2aab5566, 0x21a65c68, 0x10856342, 0x1b886a4c, 0x69f715e, 0xd927850, 0x64d90f0a, 0x6fd40604, 0x72c31d16, 0x79ce1418, 0x48ed2b32, 0x43e0223c, 0x5ef7392e, 0x55fa3020, 0x1b79aec, 0xaba93e2, 0x17ad88f0, 0x1ca081fe, 0x2d83bed4, 0x268eb7da, 0x3b99acc8, 0x3094a5c6, 0x59dfd29c, 0x52d2db92, 0x4fc5c080, 0x44c8c98e, 0x75ebf6a4, 0x7ee6ffaa, 0x63f1e4b8, 0x68fcedb6, 0xb1670a0c, 0xba6a0302, 0xa77d1810, 0xac70111e, 0x9d532e34, 0x965e273a, 0x8b493c28, 0x80443526, 0xe90f427c, 0xe2024b72, 0xff155060, 0xf418596e, 0xc53b6644, 0xce366f4a, 0xd3217458, 0xd82c7d56, 0x7a0ca137, 0x7101a839, 0x6c16b32b, 0x671bba25, 0x5638850f, 0x5d358c01, 0x40229713, 0x4b2f9e1d, 0x2264e947, 0x2969e049, 0x347efb5b, 0x3f73f255, 0xe50cd7f, 0x55dc471, 0x184adf63, 0x1347d66d, 0xcadc31d7, 0xc1d138d9, 0xdcc623cb, 0xd7cb2ac5, 0xe6e815ef, 0xede51ce1, 0xf0f207f3, 0xfbff0efd, 0x92b479a7, 0x99b970a9, 0x84ae6bbb, 0x8fa362b5, 0xbe805d9f, 0xb58d5491, 0xa89a4f83, 0xa397468d] - private static let U2: Array = [0x0, 0xd090e0b, 0x1a121c16, 0x171b121d, 0x3424382c, 0x392d3627, 0x2e36243a, 0x233f2a31, 0x68487058, 0x65417e53, 0x725a6c4e, 0x7f536245, 0x5c6c4874, 0x5165467f, 0x467e5462, 0x4b775a69, 0xd090e0b0, 0xdd99eebb, 0xca82fca6, 0xc78bf2ad, 0xe4b4d89c, 0xe9bdd697, 0xfea6c48a, 0xf3afca81, 0xb8d890e8, 0xb5d19ee3, 0xa2ca8cfe, 0xafc382f5, 0x8cfca8c4, 0x81f5a6cf, 0x96eeb4d2, 0x9be7bad9, 0xbb3bdb7b, 0xb632d570, 0xa129c76d, 0xac20c966, 0x8f1fe357, 0x8216ed5c, 0x950dff41, 0x9804f14a, 0xd373ab23, 0xde7aa528, 0xc961b735, 0xc468b93e, 0xe757930f, 0xea5e9d04, 0xfd458f19, 0xf04c8112, 0x6bab3bcb, 0x66a235c0, 0x71b927dd, 0x7cb029d6, 0x5f8f03e7, 0x52860dec, 0x459d1ff1, 0x489411fa, 0x3e34b93, 0xeea4598, 0x19f15785, 0x14f8598e, 0x37c773bf, 0x3ace7db4, 0x2dd56fa9, 0x20dc61a2, 0x6d76adf6, 0x607fa3fd, 0x7764b1e0, 0x7a6dbfeb, 0x595295da, 0x545b9bd1, 0x434089cc, 0x4e4987c7, 0x53eddae, 0x837d3a5, 0x1f2cc1b8, 0x1225cfb3, 0x311ae582, 0x3c13eb89, 0x2b08f994, 0x2601f79f, 0xbde64d46, 0xb0ef434d, 0xa7f45150, 0xaafd5f5b, 0x89c2756a, 0x84cb7b61, 0x93d0697c, 0x9ed96777, 0xd5ae3d1e, 0xd8a73315, 0xcfbc2108, 0xc2b52f03, 0xe18a0532, 0xec830b39, 0xfb981924, 0xf691172f, 0xd64d768d, 0xdb447886, 0xcc5f6a9b, 0xc1566490, 0xe2694ea1, 0xef6040aa, 0xf87b52b7, 0xf5725cbc, 0xbe0506d5, 0xb30c08de, 0xa4171ac3, 0xa91e14c8, 0x8a213ef9, 0x872830f2, 0x903322ef, 0x9d3a2ce4, 0x6dd963d, 0xbd49836, 0x1ccf8a2b, 0x11c68420, 0x32f9ae11, 0x3ff0a01a, 0x28ebb207, 0x25e2bc0c, 0x6e95e665, 0x639ce86e, 0x7487fa73, 0x798ef478, 0x5ab1de49, 0x57b8d042, 0x40a3c25f, 0x4daacc54, 0xdaec41f7, 0xd7e54ffc, 0xc0fe5de1, 0xcdf753ea, 0xeec879db, 0xe3c177d0, 0xf4da65cd, 0xf9d36bc6, 0xb2a431af, 0xbfad3fa4, 0xa8b62db9, 0xa5bf23b2, 0x86800983, 0x8b890788, 0x9c921595, 0x919b1b9e, 0xa7ca147, 0x775af4c, 0x106ebd51, 0x1d67b35a, 0x3e58996b, 0x33519760, 0x244a857d, 0x29438b76, 0x6234d11f, 0x6f3ddf14, 0x7826cd09, 0x752fc302, 0x5610e933, 0x5b19e738, 0x4c02f525, 0x410bfb2e, 0x61d79a8c, 0x6cde9487, 0x7bc5869a, 0x76cc8891, 0x55f3a2a0, 0x58faacab, 0x4fe1beb6, 0x42e8b0bd, 0x99fead4, 0x496e4df, 0x138df6c2, 0x1e84f8c9, 0x3dbbd2f8, 0x30b2dcf3, 0x27a9ceee, 0x2aa0c0e5, 0xb1477a3c, 0xbc4e7437, 0xab55662a, 0xa65c6821, 0x85634210, 0x886a4c1b, 0x9f715e06, 0x9278500d, 0xd90f0a64, 0xd406046f, 0xc31d1672, 0xce141879, 0xed2b3248, 0xe0223c43, 0xf7392e5e, 0xfa302055, 0xb79aec01, 0xba93e20a, 0xad88f017, 0xa081fe1c, 0x83bed42d, 0x8eb7da26, 0x99acc83b, 0x94a5c630, 0xdfd29c59, 0xd2db9252, 0xc5c0804f, 0xc8c98e44, 0xebf6a475, 0xe6ffaa7e, 0xf1e4b863, 0xfcedb668, 0x670a0cb1, 0x6a0302ba, 0x7d1810a7, 0x70111eac, 0x532e349d, 0x5e273a96, 0x493c288b, 0x44352680, 0xf427ce9, 0x24b72e2, 0x155060ff, 0x18596ef4, 0x3b6644c5, 0x366f4ace, 0x217458d3, 0x2c7d56d8, 0xca1377a, 0x1a83971, 0x16b32b6c, 0x1bba2567, 0x38850f56, 0x358c015d, 0x22971340, 0x2f9e1d4b, 0x64e94722, 0x69e04929, 0x7efb5b34, 0x73f2553f, 0x50cd7f0e, 0x5dc47105, 0x4adf6318, 0x47d66d13, 0xdc31d7ca, 0xd138d9c1, 0xc623cbdc, 0xcb2ac5d7, 0xe815efe6, 0xe51ce1ed, 0xf207f3f0, 0xff0efdfb, 0xb479a792, 0xb970a999, 0xae6bbb84, 0xa362b58f, 0x805d9fbe, 0x8d5491b5, 0x9a4f83a8, 0x97468da3] - private static let U3: Array = [0x0, 0x90e0b0d, 0x121c161a, 0x1b121d17, 0x24382c34, 0x2d362739, 0x36243a2e, 0x3f2a3123, 0x48705868, 0x417e5365, 0x5a6c4e72, 0x5362457f, 0x6c48745c, 0x65467f51, 0x7e546246, 0x775a694b, 0x90e0b0d0, 0x99eebbdd, 0x82fca6ca, 0x8bf2adc7, 0xb4d89ce4, 0xbdd697e9, 0xa6c48afe, 0xafca81f3, 0xd890e8b8, 0xd19ee3b5, 0xca8cfea2, 0xc382f5af, 0xfca8c48c, 0xf5a6cf81, 0xeeb4d296, 0xe7bad99b, 0x3bdb7bbb, 0x32d570b6, 0x29c76da1, 0x20c966ac, 0x1fe3578f, 0x16ed5c82, 0xdff4195, 0x4f14a98, 0x73ab23d3, 0x7aa528de, 0x61b735c9, 0x68b93ec4, 0x57930fe7, 0x5e9d04ea, 0x458f19fd, 0x4c8112f0, 0xab3bcb6b, 0xa235c066, 0xb927dd71, 0xb029d67c, 0x8f03e75f, 0x860dec52, 0x9d1ff145, 0x9411fa48, 0xe34b9303, 0xea45980e, 0xf1578519, 0xf8598e14, 0xc773bf37, 0xce7db43a, 0xd56fa92d, 0xdc61a220, 0x76adf66d, 0x7fa3fd60, 0x64b1e077, 0x6dbfeb7a, 0x5295da59, 0x5b9bd154, 0x4089cc43, 0x4987c74e, 0x3eddae05, 0x37d3a508, 0x2cc1b81f, 0x25cfb312, 0x1ae58231, 0x13eb893c, 0x8f9942b, 0x1f79f26, 0xe64d46bd, 0xef434db0, 0xf45150a7, 0xfd5f5baa, 0xc2756a89, 0xcb7b6184, 0xd0697c93, 0xd967779e, 0xae3d1ed5, 0xa73315d8, 0xbc2108cf, 0xb52f03c2, 0x8a0532e1, 0x830b39ec, 0x981924fb, 0x91172ff6, 0x4d768dd6, 0x447886db, 0x5f6a9bcc, 0x566490c1, 0x694ea1e2, 0x6040aaef, 0x7b52b7f8, 0x725cbcf5, 0x506d5be, 0xc08deb3, 0x171ac3a4, 0x1e14c8a9, 0x213ef98a, 0x2830f287, 0x3322ef90, 0x3a2ce49d, 0xdd963d06, 0xd498360b, 0xcf8a2b1c, 0xc6842011, 0xf9ae1132, 0xf0a01a3f, 0xebb20728, 0xe2bc0c25, 0x95e6656e, 0x9ce86e63, 0x87fa7374, 0x8ef47879, 0xb1de495a, 0xb8d04257, 0xa3c25f40, 0xaacc544d, 0xec41f7da, 0xe54ffcd7, 0xfe5de1c0, 0xf753eacd, 0xc879dbee, 0xc177d0e3, 0xda65cdf4, 0xd36bc6f9, 0xa431afb2, 0xad3fa4bf, 0xb62db9a8, 0xbf23b2a5, 0x80098386, 0x8907888b, 0x9215959c, 0x9b1b9e91, 0x7ca1470a, 0x75af4c07, 0x6ebd5110, 0x67b35a1d, 0x58996b3e, 0x51976033, 0x4a857d24, 0x438b7629, 0x34d11f62, 0x3ddf146f, 0x26cd0978, 0x2fc30275, 0x10e93356, 0x19e7385b, 0x2f5254c, 0xbfb2e41, 0xd79a8c61, 0xde94876c, 0xc5869a7b, 0xcc889176, 0xf3a2a055, 0xfaacab58, 0xe1beb64f, 0xe8b0bd42, 0x9fead409, 0x96e4df04, 0x8df6c213, 0x84f8c91e, 0xbbd2f83d, 0xb2dcf330, 0xa9ceee27, 0xa0c0e52a, 0x477a3cb1, 0x4e7437bc, 0x55662aab, 0x5c6821a6, 0x63421085, 0x6a4c1b88, 0x715e069f, 0x78500d92, 0xf0a64d9, 0x6046fd4, 0x1d1672c3, 0x141879ce, 0x2b3248ed, 0x223c43e0, 0x392e5ef7, 0x302055fa, 0x9aec01b7, 0x93e20aba, 0x88f017ad, 0x81fe1ca0, 0xbed42d83, 0xb7da268e, 0xacc83b99, 0xa5c63094, 0xd29c59df, 0xdb9252d2, 0xc0804fc5, 0xc98e44c8, 0xf6a475eb, 0xffaa7ee6, 0xe4b863f1, 0xedb668fc, 0xa0cb167, 0x302ba6a, 0x1810a77d, 0x111eac70, 0x2e349d53, 0x273a965e, 0x3c288b49, 0x35268044, 0x427ce90f, 0x4b72e202, 0x5060ff15, 0x596ef418, 0x6644c53b, 0x6f4ace36, 0x7458d321, 0x7d56d82c, 0xa1377a0c, 0xa8397101, 0xb32b6c16, 0xba25671b, 0x850f5638, 0x8c015d35, 0x97134022, 0x9e1d4b2f, 0xe9472264, 0xe0492969, 0xfb5b347e, 0xf2553f73, 0xcd7f0e50, 0xc471055d, 0xdf63184a, 0xd66d1347, 0x31d7cadc, 0x38d9c1d1, 0x23cbdcc6, 0x2ac5d7cb, 0x15efe6e8, 0x1ce1ede5, 0x7f3f0f2, 0xefdfbff, 0x79a792b4, 0x70a999b9, 0x6bbb84ae, 0x62b58fa3, 0x5d9fbe80, 0x5491b58d, 0x4f83a89a, 0x468da397] - private static let U4: Array = [0x0, 0xe0b0d09, 0x1c161a12, 0x121d171b, 0x382c3424, 0x3627392d, 0x243a2e36, 0x2a31233f, 0x70586848, 0x7e536541, 0x6c4e725a, 0x62457f53, 0x48745c6c, 0x467f5165, 0x5462467e, 0x5a694b77, 0xe0b0d090, 0xeebbdd99, 0xfca6ca82, 0xf2adc78b, 0xd89ce4b4, 0xd697e9bd, 0xc48afea6, 0xca81f3af, 0x90e8b8d8, 0x9ee3b5d1, 0x8cfea2ca, 0x82f5afc3, 0xa8c48cfc, 0xa6cf81f5, 0xb4d296ee, 0xbad99be7, 0xdb7bbb3b, 0xd570b632, 0xc76da129, 0xc966ac20, 0xe3578f1f, 0xed5c8216, 0xff41950d, 0xf14a9804, 0xab23d373, 0xa528de7a, 0xb735c961, 0xb93ec468, 0x930fe757, 0x9d04ea5e, 0x8f19fd45, 0x8112f04c, 0x3bcb6bab, 0x35c066a2, 0x27dd71b9, 0x29d67cb0, 0x3e75f8f, 0xdec5286, 0x1ff1459d, 0x11fa4894, 0x4b9303e3, 0x45980eea, 0x578519f1, 0x598e14f8, 0x73bf37c7, 0x7db43ace, 0x6fa92dd5, 0x61a220dc, 0xadf66d76, 0xa3fd607f, 0xb1e07764, 0xbfeb7a6d, 0x95da5952, 0x9bd1545b, 0x89cc4340, 0x87c74e49, 0xddae053e, 0xd3a50837, 0xc1b81f2c, 0xcfb31225, 0xe582311a, 0xeb893c13, 0xf9942b08, 0xf79f2601, 0x4d46bde6, 0x434db0ef, 0x5150a7f4, 0x5f5baafd, 0x756a89c2, 0x7b6184cb, 0x697c93d0, 0x67779ed9, 0x3d1ed5ae, 0x3315d8a7, 0x2108cfbc, 0x2f03c2b5, 0x532e18a, 0xb39ec83, 0x1924fb98, 0x172ff691, 0x768dd64d, 0x7886db44, 0x6a9bcc5f, 0x6490c156, 0x4ea1e269, 0x40aaef60, 0x52b7f87b, 0x5cbcf572, 0x6d5be05, 0x8deb30c, 0x1ac3a417, 0x14c8a91e, 0x3ef98a21, 0x30f28728, 0x22ef9033, 0x2ce49d3a, 0x963d06dd, 0x98360bd4, 0x8a2b1ccf, 0x842011c6, 0xae1132f9, 0xa01a3ff0, 0xb20728eb, 0xbc0c25e2, 0xe6656e95, 0xe86e639c, 0xfa737487, 0xf478798e, 0xde495ab1, 0xd04257b8, 0xc25f40a3, 0xcc544daa, 0x41f7daec, 0x4ffcd7e5, 0x5de1c0fe, 0x53eacdf7, 0x79dbeec8, 0x77d0e3c1, 0x65cdf4da, 0x6bc6f9d3, 0x31afb2a4, 0x3fa4bfad, 0x2db9a8b6, 0x23b2a5bf, 0x9838680, 0x7888b89, 0x15959c92, 0x1b9e919b, 0xa1470a7c, 0xaf4c0775, 0xbd51106e, 0xb35a1d67, 0x996b3e58, 0x97603351, 0x857d244a, 0x8b762943, 0xd11f6234, 0xdf146f3d, 0xcd097826, 0xc302752f, 0xe9335610, 0xe7385b19, 0xf5254c02, 0xfb2e410b, 0x9a8c61d7, 0x94876cde, 0x869a7bc5, 0x889176cc, 0xa2a055f3, 0xacab58fa, 0xbeb64fe1, 0xb0bd42e8, 0xead4099f, 0xe4df0496, 0xf6c2138d, 0xf8c91e84, 0xd2f83dbb, 0xdcf330b2, 0xceee27a9, 0xc0e52aa0, 0x7a3cb147, 0x7437bc4e, 0x662aab55, 0x6821a65c, 0x42108563, 0x4c1b886a, 0x5e069f71, 0x500d9278, 0xa64d90f, 0x46fd406, 0x1672c31d, 0x1879ce14, 0x3248ed2b, 0x3c43e022, 0x2e5ef739, 0x2055fa30, 0xec01b79a, 0xe20aba93, 0xf017ad88, 0xfe1ca081, 0xd42d83be, 0xda268eb7, 0xc83b99ac, 0xc63094a5, 0x9c59dfd2, 0x9252d2db, 0x804fc5c0, 0x8e44c8c9, 0xa475ebf6, 0xaa7ee6ff, 0xb863f1e4, 0xb668fced, 0xcb1670a, 0x2ba6a03, 0x10a77d18, 0x1eac7011, 0x349d532e, 0x3a965e27, 0x288b493c, 0x26804435, 0x7ce90f42, 0x72e2024b, 0x60ff1550, 0x6ef41859, 0x44c53b66, 0x4ace366f, 0x58d32174, 0x56d82c7d, 0x377a0ca1, 0x397101a8, 0x2b6c16b3, 0x25671bba, 0xf563885, 0x15d358c, 0x13402297, 0x1d4b2f9e, 0x472264e9, 0x492969e0, 0x5b347efb, 0x553f73f2, 0x7f0e50cd, 0x71055dc4, 0x63184adf, 0x6d1347d6, 0xd7cadc31, 0xd9c1d138, 0xcbdcc623, 0xc5d7cb2a, 0xefe6e815, 0xe1ede51c, 0xf3f0f207, 0xfdfbff0e, 0xa792b479, 0xa999b970, 0xbb84ae6b, 0xb58fa362, 0x9fbe805d, 0x91b58d54, 0x83a89a4f, 0x8da39746] - - /// Initialize AES with variant calculated out of key length: - /// - 16 bytes (AES-128) - /// - 24 bytes (AES-192) - /// - 32 bytes (AES-256) - /// - /// - parameter key: Key. Length of the key decides on AES variant. - /// - parameter iv: Initialization Vector (Optional for some blockMode values) - /// - parameter blockMode: Cipher mode of operation - /// - parameter padding: Padding method. .pkcs7, .noPadding, .zeroPadding, ... - /// - /// - throws: AES.Error - /// - /// - returns: Instance - public init(key: Array, blockMode: BlockMode, padding: Padding = .pkcs7) throws { - self.key = Key(bytes: key) - self.blockMode = blockMode - self.padding = padding - self.keySize = self.key.count - - // Validate key size - switch self.keySize * 8 { - case 128: - self.variant = .aes128 - case 192: - self.variant = .aes192 - case 256: - self.variant = .aes256 - default: - throw Error.invalidKeySize - } - - self.variantNb = self.variant.Nb - self.variantNk = self.variant.Nk - self.variantNr = self.variant.Nr - } - - internal func encrypt(block: ArraySlice) -> Array? { - if self.blockMode.options.contains(.paddingRequired) && block.count != AES.blockSize { - return Array(block) - } - - let rounds = self.variantNr - let rk = self.expandedKey - - let b00 = UInt32(block[block.startIndex.advanced(by: 0)]) - let b01 = UInt32(block[block.startIndex.advanced(by: 1)]) << 8 - let b02 = UInt32(block[block.startIndex.advanced(by: 2)]) << 16 - let b03 = UInt32(block[block.startIndex.advanced(by: 3)]) << 24 - var b0 = b00 | b01 | b02 | b03 - - let b10 = UInt32(block[block.startIndex.advanced(by: 4)]) - let b11 = UInt32(block[block.startIndex.advanced(by: 5)]) << 8 - let b12 = UInt32(block[block.startIndex.advanced(by: 6)]) << 16 - let b13 = UInt32(block[block.startIndex.advanced(by: 7)]) << 24 - var b1 = b10 | b11 | b12 | b13 - - let b20 = UInt32(block[block.startIndex.advanced(by: 8)]) - let b21 = UInt32(block[block.startIndex.advanced(by: 9)]) << 8 - let b22 = UInt32(block[block.startIndex.advanced(by: 10)]) << 16 - let b23 = UInt32(block[block.startIndex.advanced(by: 11)]) << 24 - var b2 = b20 | b21 | b22 | b23 - - let b30 = UInt32(block[block.startIndex.advanced(by: 12)]) - let b31 = UInt32(block[block.startIndex.advanced(by: 13)]) << 8 - let b32 = UInt32(block[block.startIndex.advanced(by: 14)]) << 16 - let b33 = UInt32(block[block.startIndex.advanced(by: 15)]) << 24 - var b3 = b30 | b31 | b32 | b33 - - let tLength = 4 - let t = UnsafeMutablePointer.allocate(capacity: tLength) - t.initialize(repeating: 0, count: tLength) - defer { - t.deinitialize(count: tLength) - t.deallocate() - } - - for r in 0..> 8) & 0xff)] - let lb02 = AES.T2[Int((t[2] >> 16) & 0xff)] - let lb03 = AES.T3[Int(t[3] >> 24)] - b0 = lb00 ^ lb01 ^ lb02 ^ lb03 - - let lb10 = AES.T0[Int(t[1] & 0xff)] - let lb11 = AES.T1[Int((t[2] >> 8) & 0xff)] - let lb12 = AES.T2[Int((t[3] >> 16) & 0xff)] - let lb13 = AES.T3[Int(t[0] >> 24)] - b1 = lb10 ^ lb11 ^ lb12 ^ lb13 - - let lb20 = AES.T0[Int(t[2] & 0xff)] - let lb21 = AES.T1[Int((t[3] >> 8) & 0xff)] - let lb22 = AES.T2[Int((t[0] >> 16) & 0xff)] - let lb23 = AES.T3[Int(t[1] >> 24)] - b2 = lb20 ^ lb21 ^ lb22 ^ lb23 - - let lb30 = AES.T0[Int(t[3] & 0xff)] - let lb31 = AES.T1[Int((t[0] >> 8) & 0xff)] - let lb32 = AES.T2[Int((t[1] >> 16) & 0xff)] - let lb33 = AES.T3[Int(t[2] >> 24)] - b3 = lb30 ^ lb31 ^ lb32 ^ lb33 - } - - // last round - let r = rounds - 1 - - t[0] = b0 ^ rk[r][0] - t[1] = b1 ^ rk[r][1] - t[2] = b2 ^ rk[r][2] - t[3] = b3 ^ rk[r][3] - - // rounds - b0 = F1(t[0], t[1], t[2], t[3]) ^ rk[rounds][0] - b1 = F1(t[1], t[2], t[3], t[0]) ^ rk[rounds][1] - b2 = F1(t[2], t[3], t[0], t[1]) ^ rk[rounds][2] - b3 = F1(t[3], t[0], t[1], t[2]) ^ rk[rounds][3] - - let encrypted: Array = [ - UInt8(b0 & 0xff), UInt8((b0 >> 8) & 0xff), UInt8((b0 >> 16) & 0xff), UInt8((b0 >> 24) & 0xff), - UInt8(b1 & 0xff), UInt8((b1 >> 8) & 0xff), UInt8((b1 >> 16) & 0xff), UInt8((b1 >> 24) & 0xff), - UInt8(b2 & 0xff), UInt8((b2 >> 8) & 0xff), UInt8((b2 >> 16) & 0xff), UInt8((b2 >> 24) & 0xff), - UInt8(b3 & 0xff), UInt8((b3 >> 8) & 0xff), UInt8((b3 >> 16) & 0xff), UInt8((b3 >> 24) & 0xff) - ] - return encrypted - } - - internal func decrypt(block: ArraySlice) -> Array? { - if self.blockMode.options.contains(.paddingRequired) && block.count != AES.blockSize { - return Array(block) - } - - let rounds = self.variantNr - let rk = self.expandedKeyInv - - // Save miliseconds by not using `block.toUInt32Array()` - let b00 = UInt32(block[block.startIndex.advanced(by: 0)]) - let b01 = UInt32(block[block.startIndex.advanced(by: 1)]) << 8 - let b02 = UInt32(block[block.startIndex.advanced(by: 2)]) << 16 - let b03 = UInt32(block[block.startIndex.advanced(by: 3)]) << 24 - var b0 = b00 | b01 | b02 | b03 - - let b10 = UInt32(block[block.startIndex.advanced(by: 4)]) - let b11 = UInt32(block[block.startIndex.advanced(by: 5)]) << 8 - let b12 = UInt32(block[block.startIndex.advanced(by: 6)]) << 16 - let b13 = UInt32(block[block.startIndex.advanced(by: 7)]) << 24 - var b1 = b10 | b11 | b12 | b13 - - let b20 = UInt32(block[block.startIndex.advanced(by: 8)]) - let b21 = UInt32(block[block.startIndex.advanced(by: 9)]) << 8 - let b22 = UInt32(block[block.startIndex.advanced(by: 10)]) << 16 - let b23 = UInt32(block[block.startIndex.advanced(by: 11)]) << 24 - var b2 = b20 | b21 | b22 | b23 - - let b30 = UInt32(block[block.startIndex.advanced(by: 12)]) - let b31 = UInt32(block[block.startIndex.advanced(by: 13)]) << 8 - let b32 = UInt32(block[block.startIndex.advanced(by: 14)]) << 16 - let b33 = UInt32(block[block.startIndex.advanced(by: 15)]) << 24 - var b3 = b30 | b31 | b32 | b33 - - let tLength = 4 - let t = UnsafeMutablePointer.allocate(capacity: tLength) - t.initialize(repeating: 0, count: tLength) - defer { - t.deinitialize(count: tLength) - t.deallocate() - } - - for r in (2...rounds).reversed() { - t[0] = b0 ^ rk[r][0] - t[1] = b1 ^ rk[r][1] - t[2] = b2 ^ rk[r][2] - t[3] = b3 ^ rk[r][3] - - let b00 = AES.T0_INV[Int(t[0] & 0xff)] - let b01 = AES.T1_INV[Int((t[3] >> 8) & 0xff)] - let b02 = AES.T2_INV[Int((t[2] >> 16) & 0xff)] - let b03 = AES.T3_INV[Int(t[1] >> 24)] - b0 = b00 ^ b01 ^ b02 ^ b03 - - let b10 = AES.T0_INV[Int(t[1] & 0xff)] - let b11 = AES.T1_INV[Int((t[0] >> 8) & 0xff)] - let b12 = AES.T2_INV[Int((t[3] >> 16) & 0xff)] - let b13 = AES.T3_INV[Int(t[2] >> 24)] - b1 = b10 ^ b11 ^ b12 ^ b13 - - let b20 = AES.T0_INV[Int(t[2] & 0xff)] - let b21 = AES.T1_INV[Int((t[1] >> 8) & 0xff)] - let b22 = AES.T2_INV[Int((t[0] >> 16) & 0xff)] - let b23 = AES.T3_INV[Int(t[3] >> 24)] - b2 = b20 ^ b21 ^ b22 ^ b23 - - let b30 = AES.T0_INV[Int(t[3] & 0xff)] - let b31 = AES.T1_INV[Int((t[2] >> 8) & 0xff)] - let b32 = AES.T2_INV[Int((t[1] >> 16) & 0xff)] - let b33 = AES.T3_INV[Int(t[0] >> 24)] - b3 = b30 ^ b31 ^ b32 ^ b33 - } - - // last round - t[0] = b0 ^ rk[1][0] - t[1] = b1 ^ rk[1][1] - t[2] = b2 ^ rk[1][2] - t[3] = b3 ^ rk[1][3] - - // rounds - - let lb00 = self.sBoxInv[Int(B0(t[0]))] - let lb01 = (sBoxInv[Int(B1(t[3]))] << 8) - let lb02 = (sBoxInv[Int(B2(t[2]))] << 16) - let lb03 = (sBoxInv[Int(B3(t[1]))] << 24) - b0 = lb00 | lb01 | lb02 | lb03 ^ rk[0][0] - - let lb10 = self.sBoxInv[Int(B0(t[1]))] - let lb11 = (sBoxInv[Int(B1(t[0]))] << 8) - let lb12 = (sBoxInv[Int(B2(t[3]))] << 16) - let lb13 = (sBoxInv[Int(B3(t[2]))] << 24) - b1 = lb10 | lb11 | lb12 | lb13 ^ rk[0][1] - - let lb20 = self.sBoxInv[Int(B0(t[2]))] - let lb21 = (sBoxInv[Int(B1(t[1]))] << 8) - let lb22 = (sBoxInv[Int(B2(t[0]))] << 16) - let lb23 = (sBoxInv[Int(B3(t[3]))] << 24) - b2 = lb20 | lb21 | lb22 | lb23 ^ rk[0][2] - - let lb30 = self.sBoxInv[Int(B0(t[3]))] - let lb31 = (sBoxInv[Int(B1(t[2]))] << 8) - let lb32 = (sBoxInv[Int(B2(t[1]))] << 16) - let lb33 = (sBoxInv[Int(B3(t[0]))] << 24) - b3 = lb30 | lb31 | lb32 | lb33 ^ rk[0][3] - - let result: Array = [ - UInt8(b0 & 0xff), UInt8((b0 >> 8) & 0xff), UInt8((b0 >> 16) & 0xff), UInt8((b0 >> 24) & 0xff), - UInt8(b1 & 0xff), UInt8((b1 >> 8) & 0xff), UInt8((b1 >> 16) & 0xff), UInt8((b1 >> 24) & 0xff), - UInt8(b2 & 0xff), UInt8((b2 >> 8) & 0xff), UInt8((b2 >> 16) & 0xff), UInt8((b2 >> 24) & 0xff), - UInt8(b3 & 0xff), UInt8((b3 >> 8) & 0xff), UInt8((b3 >> 16) & 0xff), UInt8((b3 >> 24) & 0xff) - ] - return result - } -} - -private extension AES { - private func expandKeyInv(_ key: Key, variant: Variant) -> Array> { - let rounds = self.variantNr - var rk2: Array> = self.expandKey(key, variant: variant) - - for r in 1.. Array> { - func convertExpandedKey(_ expanded: Array) -> Array> { - expanded.batched(by: 4).map({ UInt32(bytes: $0.reversed()) }).batched(by: 4).map { Array($0) } - } - - /* - * Function used in the Key Expansion routine that takes a four-byte - * input word and applies an S-box to each of the four bytes to - * produce an output word. - */ - func subWord(_ word: Array) -> Array { - precondition(word.count == 4) - - var result = word - for i in 0..<4 { - result[i] = UInt8(self.sBox[Int(word[i])]) - } - return result - } - - @inline(__always) - func subWordInPlace(_ word: inout Array) { - precondition(word.count == 4) - word[0] = UInt8(self.sBox[Int(word[0])]) - word[1] = UInt8(self.sBox[Int(word[1])]) - word[2] = UInt8(self.sBox[Int(word[2])]) - word[3] = UInt8(self.sBox[Int(word[3])]) - } - - let wLength = self.variantNb * (self.variantNr + 1) * 4 - let w = UnsafeMutablePointer.allocate(capacity: wLength) - w.initialize(repeating: 0, count: wLength) - defer { - w.deinitialize(count: wLength) - w.deallocate() - } - - for i in 0.. - - for i in self.variantNk..(repeating: 0, count: 4) - - for wordIdx in 0..<4 { - tmp[wordIdx] = w[4 * (i - 1) + wordIdx] - } - if (i % self.variantNk) == 0 { - tmp = subWord(rotateLeft(UInt32(bytes: tmp), by: 8).bytes(totalBytes: 4)) - tmp[0] = tmp.first! ^ AES.Rcon[i / variantNk] - } else if self.variantNk > 6 && (i % self.variantNk) == 4 { - subWordInPlace(&tmp) - } - - // xor array of bytes - for wordIdx in 0..<4 { - w[4 * i + wordIdx] = w[4 * (i - variantNk) + wordIdx] ^ tmp[wordIdx] - } - } - return convertExpandedKey(Array(UnsafeBufferPointer(start: w, count: wLength))) - } - - @inline(__always) - private func B0(_ x: UInt32) -> UInt32 { - x & 0xff - } - - @inline(__always) - private func B1(_ x: UInt32) -> UInt32 { - (x >> 8) & 0xff - } - - @inline(__always) - private func B2(_ x: UInt32) -> UInt32 { - (x >> 16) & 0xff - } - - @inline(__always) - private func B3(_ x: UInt32) -> UInt32 { - (x >> 24) & 0xff - } - - @inline(__always) - private func F1(_ x0: UInt32, _ x1: UInt32, _ x2: UInt32, _ x3: UInt32) -> UInt32 { - var result: UInt32 = 0 - result |= UInt32(self.B1(AES.T0[Int(x0 & 255)])) - result |= UInt32(self.B1(AES.T0[Int((x1 >> 8) & 255)])) << 8 - result |= UInt32(self.B1(AES.T0[Int((x2 >> 16) & 255)])) << 16 - result |= UInt32(self.B1(AES.T0[Int(x3 >> 24)])) << 24 - return result - } - - private func calculateSBox() -> (sBox: Array, invSBox: Array) { - let sboxLength = 256 - let sbox = UnsafeMutablePointer.allocate(capacity: sboxLength) - let invsbox = UnsafeMutablePointer.allocate(capacity: sboxLength) - sbox.initialize(repeating: 0, count: sboxLength) - invsbox.initialize(repeating: 0, count: sboxLength) - defer { - sbox.deinitialize(count: sboxLength) - sbox.deallocate() - invsbox.deinitialize(count: sboxLength) - invsbox.deallocate() - } - - sbox[0] = 0x63 - - var p: UInt8 = 1, q: UInt8 = 1 - - repeat { - p = p ^ (UInt8(truncatingIfNeeded: Int(p) << 1) ^ ((p & 0x80) == 0x80 ? 0x1b : 0)) - q ^= q << 1 - q ^= q << 2 - q ^= q << 4 - q ^= (q & 0x80) == 0x80 ? 0x09 : 0 - - let s = 0x63 ^ q ^ rotateLeft(q, by: 1) ^ rotateLeft(q, by: 2) ^ rotateLeft(q, by: 3) ^ rotateLeft(q, by: 4) - - sbox[Int(p)] = UInt32(s) - invsbox[Int(s)] = UInt32(p) - } while p != 1 - - return (sBox: Array(UnsafeBufferPointer(start: sbox, count: sboxLength)), invSBox: Array(UnsafeBufferPointer(start: invsbox, count: sboxLength))) - } -} - -// MARK: Cipher - -extension AES: Cipher { - public func encrypt(_ bytes: ArraySlice) throws -> Array { - let chunks = bytes.batched(by: AES.blockSize) - - var oneTimeCryptor = try makeEncryptor() - var out = Array(reserveCapacity: bytes.count) - for chunk in chunks { - out += try oneTimeCryptor.update(withBytes: chunk, isLast: false) - } - // Padding may be added at the very end - out += try oneTimeCryptor.finish() - - if self.blockMode.options.contains(.paddingRequired) && (out.count % AES.blockSize != 0) { - throw Error.dataPaddingRequired - } - - return out - } - - public func decrypt(_ bytes: ArraySlice) throws -> Array { - if self.blockMode.options.contains(.paddingRequired) && (bytes.count % AES.blockSize != 0) { - throw Error.dataPaddingRequired - } - - var oneTimeCryptor = try makeDecryptor() - let chunks = bytes.batched(by: AES.blockSize) - if chunks.isEmpty { - throw Error.invalidData - } - - var out = Array(reserveCapacity: bytes.count) - - var lastIdx = chunks.startIndex - chunks.indices.formIndex(&lastIdx, offsetBy: chunks.count - 1) - - // To properly remove padding, `isLast` has to be known when called with the last chunk of ciphertext - // Last chunk of ciphertext may contains padded data so next call to update(..) won't be able to remove it - for idx in chunks.indices { - out += try oneTimeCryptor.update(withBytes: chunks[idx], isLast: idx == lastIdx) - } - return out - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Array+Extension.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Array+Extension.swift deleted file mode 100644 index a9c41d4..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Array+Extension.swift +++ /dev/null @@ -1,148 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -extension Array { - init(reserveCapacity: Int) { - self = Array() - self.reserveCapacity(reserveCapacity) - } - - var slice: ArraySlice { - self[self.startIndex ..< self.endIndex] - } -} - -extension Array where Element == UInt8 { - public init(hex: String) { - self.init(reserveCapacity: hex.unicodeScalars.lazy.underestimatedCount) - var buffer: UInt8? - var skip = hex.hasPrefix("0x") ? 2 : 0 - for char in hex.unicodeScalars.lazy { - guard skip == 0 else { - skip -= 1 - continue - } - guard char.value >= 48 && char.value <= 102 else { - removeAll() - return - } - let v: UInt8 - let c: UInt8 = UInt8(char.value) - switch c { - case let c where c <= 57: - v = c - 48 - case let c where c >= 65 && c <= 70: - v = c - 55 - case let c where c >= 97: - v = c - 87 - default: - removeAll() - return - } - if let b = buffer { - append(b << 4 | v) - buffer = nil - } else { - buffer = v - } - } - if let b = buffer { - append(b) - } - } - - public func toHexString() -> String { - `lazy`.reduce("") { - var s = String($1, radix: 16) - if s.count == 1 { - s = "0" + s - } - return $0 + s - } - } -} - -extension Array where Element == UInt8 { - /// split in chunks with given chunk size - @available(*, deprecated) - public func chunks(size chunksize: Int) -> Array> { - var words = Array>() - words.reserveCapacity(count / chunksize) - for idx in stride(from: chunksize, through: count, by: chunksize) { - words.append(Array(self[idx - chunksize ..< idx])) // slow for large table - } - let remainder = suffix(count % chunksize) - if !remainder.isEmpty { - words.append(Array(remainder)) - } - return words - } - - public func md5() -> [Element] { - Digest.md5(self) - } - - public func sha1() -> [Element] { - Digest.sha1(self) - } - - public func sha224() -> [Element] { - Digest.sha224(self) - } - - public func sha256() -> [Element] { - Digest.sha256(self) - } - - public func sha384() -> [Element] { - Digest.sha384(self) - } - - public func sha512() -> [Element] { - Digest.sha512(self) - } - - public func sha2(_ variant: SHA2.Variant) -> [Element] { - Digest.sha2(self, variant: variant) - } - - public func sha3(_ variant: SHA3.Variant) -> [Element] { - Digest.sha3(self, variant: variant) - } - - public func crc32(seed: UInt32? = nil, reflect: Bool = true) -> UInt32 { - Checksum.crc32(self, seed: seed, reflect: reflect) - } - - public func crc32c(seed: UInt32? = nil, reflect: Bool = true) -> UInt32 { - Checksum.crc32c(self, seed: seed, reflect: reflect) - } - - public func crc16(seed: UInt16? = nil) -> UInt16 { - Checksum.crc16(self, seed: seed) - } - - public func encrypt(cipher: Cipher) throws -> [Element] { - try cipher.encrypt(self.slice) - } - - public func decrypt(cipher: Cipher) throws -> [Element] { - try cipher.decrypt(self.slice) - } - - public func authenticate(with authenticator: A) throws -> [Element] { - try authenticator.authenticate(self) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Authenticator.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Authenticator.swift deleted file mode 100644 index 90b534e..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Authenticator.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/// Message authentication code. -public protocol Authenticator { - /// Calculate Message Authentication Code (MAC) for message. - func authenticate(_ bytes: Array) throws -> Array -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BatchedCollection.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/BatchedCollection.swift deleted file mode 100644 index 5438c10..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BatchedCollection.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -struct BatchedCollectionIndex { - let range: Range -} - -extension BatchedCollectionIndex: Comparable { - static func == (lhs: BatchedCollectionIndex, rhs: BatchedCollectionIndex) -> Bool { - lhs.range.lowerBound == rhs.range.lowerBound - } - - static func < (lhs: BatchedCollectionIndex, rhs: BatchedCollectionIndex) -> Bool { - lhs.range.lowerBound < rhs.range.lowerBound - } -} - -protocol BatchedCollectionType: Collection { - associatedtype Base: Collection -} - -struct BatchedCollection: Collection { - let base: Base - let size: Int - typealias Index = BatchedCollectionIndex - private func nextBreak(after idx: Base.Index) -> Base.Index { - self.base.index(idx, offsetBy: self.size, limitedBy: self.base.endIndex) ?? self.base.endIndex - } - - var startIndex: Index { - Index(range: self.base.startIndex.. Index { - Index(range: idx.range.upperBound.. Base.SubSequence { - self.base[idx.range] - } -} - -extension Collection { - func batched(by size: Int) -> BatchedCollection { - BatchedCollection(base: self, size: size) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Bit.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Bit.swift deleted file mode 100644 index 8ad9558..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Bit.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public enum Bit: Int { - case zero - case one -} - -extension Bit { - func inverted() -> Bit { - self == .zero ? .one : .zero - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockCipher.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockCipher.swift deleted file mode 100644 index b07f035..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockCipher.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -protocol BlockCipher: Cipher { - static var blockSize: Int { get } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift deleted file mode 100644 index 328169e..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockDecryptor.swift +++ /dev/null @@ -1,85 +0,0 @@ -// CryptoSwift -// -// Copyright (C) 2014-2018 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public class BlockDecryptor: Cryptor, Updatable { - private let blockSize: Int - private let padding: Padding - private var worker: CipherModeWorker - private var accumulated = Array() - - init(blockSize: Int, padding: Padding, _ worker: CipherModeWorker) throws { - self.blockSize = blockSize - self.padding = padding - self.worker = worker - } - - public func update(withBytes bytes: ArraySlice, isLast: Bool = false) throws -> Array { - self.accumulated += bytes - - // If a worker (eg GCM) can combine ciphertext + tag - // we need to remove tag from the ciphertext. - if !isLast && self.accumulated.count < self.blockSize + self.worker.additionalBufferSize { - return [] - } - - let accumulatedWithoutSuffix: Array - if self.worker.additionalBufferSize > 0 { - // FIXME: how slow is that? - accumulatedWithoutSuffix = Array(self.accumulated.prefix(self.accumulated.count - self.worker.additionalBufferSize)) - } else { - accumulatedWithoutSuffix = self.accumulated - } - - var processedBytesCount = 0 - var plaintext = Array(reserveCapacity: accumulatedWithoutSuffix.count) - // Processing in a block-size manner. It's good for block modes, but bad for stream modes. - for var chunk in accumulatedWithoutSuffix.batched(by: self.blockSize) { - if isLast || (accumulatedWithoutSuffix.count - processedBytesCount) >= blockSize { - let isLastChunk = processedBytesCount + chunk.count == accumulatedWithoutSuffix.count - - if isLast, isLastChunk, var finalizingWorker = worker as? FinalizingDecryptModeWorker { - chunk = try finalizingWorker.willDecryptLast(bytes: chunk + accumulated.suffix(worker.additionalBufferSize)) // tag size - } - - if !chunk.isEmpty { - plaintext += worker.decrypt(block: chunk) - } - - if isLast, isLastChunk, var finalizingWorker = worker as? FinalizingDecryptModeWorker { - plaintext = Array(try finalizingWorker.didDecryptLast(bytes: plaintext.slice)) - } - - processedBytesCount += chunk.count - } - } - accumulated.removeFirst(processedBytesCount) // super-slow - - if isLast { - plaintext = self.padding.remove(from: plaintext, blockSize: self.blockSize) - } - - return plaintext - } - - public func seek(to position: Int) throws { - guard var worker = self.worker as? SeekableModeWorker else { - fatalError("Not supported") - } - - try worker.seek(to: position) - self.worker = worker - - accumulated = [] - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift deleted file mode 100644 index 1e24499..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockEncryptor.swift +++ /dev/null @@ -1,58 +0,0 @@ -// CryptoSwift -// -// Copyright (C) 2014-2018 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// -final class BlockEncryptor: Cryptor, Updatable { - private let blockSize: Int - private var worker: CipherModeWorker - private let padding: Padding - // Accumulated bytes. Not all processed bytes. - private var accumulated = Array(reserveCapacity: 16) - - private var lastBlockRemainder = 0 - - init(blockSize: Int, padding: Padding, _ worker: CipherModeWorker) throws { - self.blockSize = blockSize - self.padding = padding - self.worker = worker - } - - // MARK: Updatable - - public func update(withBytes bytes: ArraySlice, isLast: Bool) throws -> Array { - self.accumulated += bytes - - if isLast { - self.accumulated = self.padding.add(to: self.accumulated, blockSize: self.blockSize) - } - - var encrypted = Array(reserveCapacity: accumulated.count) - for chunk in self.accumulated.batched(by: self.blockSize) { - if isLast || chunk.count == self.blockSize { - encrypted += self.worker.encrypt(block: chunk) - } - } - - // Stream encrypts all, so it removes all elements - self.accumulated.removeFirst(encrypted.count) - - if var finalizingWorker = worker as? FinalizingEncryptModeWorker, isLast == true { - encrypted = Array(try finalizingWorker.finalize(encrypt: encrypted.slice)) - } - - return encrypted - } - - func seek(to: Int) throws { - fatalError("Not supported") - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockMode.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockMode.swift deleted file mode 100644 index de613c5..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockMode.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public typealias CipherOperationOnBlock = (_ block: ArraySlice) -> Array? - -public protocol BlockMode { - var options: BlockModeOption { get } - //TODO: doesn't have to be public - func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker -} - -typealias StreamMode = BlockMode diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift deleted file mode 100644 index 3f2f7bb..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/BlockModeOptions.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public struct BlockModeOption: OptionSet { - public let rawValue: Int - - public init(rawValue: Int) { - self.rawValue = rawValue - } - - static let none = BlockModeOption(rawValue: 1 << 0) - static let initializationVectorRequired = BlockModeOption(rawValue: 1 << 1) - static let paddingRequired = BlockModeOption(rawValue: 1 << 2) - static let useEncryptToDecrypt = BlockModeOption(rawValue: 1 << 3) -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CBC.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CBC.swift deleted file mode 100644 index e9043fc..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CBC.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// Cipher-block chaining (CBC) -// - -public struct CBC: BlockMode { - public enum Error: Swift.Error { - /// Invalid IV - case invalidInitializationVector - } - - public let options: BlockModeOption = [.initializationVectorRequired, .paddingRequired] - private let iv: Array - - public init(iv: Array) { - self.iv = iv - } - - public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { - if self.iv.count != blockSize { - throw Error.invalidInitializationVector - } - - return CBCModeWorker(blockSize: blockSize, iv: self.iv.slice, cipherOperation: cipherOperation) - } -} - -struct CBCModeWorker: BlockModeWorker { - let cipherOperation: CipherOperationOnBlock - var blockSize: Int - let additionalBufferSize: Int = 0 - private let iv: ArraySlice - private var prev: ArraySlice? - - init(blockSize: Int, iv: ArraySlice, cipherOperation: @escaping CipherOperationOnBlock) { - self.blockSize = blockSize - self.iv = iv - self.cipherOperation = cipherOperation - } - - mutating func encrypt(block plaintext: ArraySlice) -> Array { - guard let ciphertext = cipherOperation(xor(prev ?? iv, plaintext)) else { - return Array(plaintext) - } - self.prev = ciphertext.slice - return ciphertext - } - - mutating func decrypt(block ciphertext: ArraySlice) -> Array { - guard let plaintext = cipherOperation(ciphertext) else { - return Array(ciphertext) - } - let result: Array = xor(prev ?? self.iv, plaintext) - self.prev = ciphertext - return result - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift deleted file mode 100644 index 1a1a75c..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CCM.swift +++ /dev/null @@ -1,357 +0,0 @@ -//// CryptoSwift -// -// Copyright (C) 2014-2018 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// CCM mode combines the well known CBC-MAC with the well known counter mode of encryption. -// https://tools.ietf.org/html/rfc3610 -// https://csrc.nist.gov/publications/detail/sp/800-38c/final - -#if canImport(Darwin) - import Darwin -#else - import Glibc -#endif - -/// Counter with Cipher Block Chaining-Message Authentication Code -public struct CCM: StreamMode { - public enum Error: Swift.Error { - /// Invalid IV - case invalidInitializationVector - case invalidParameter - case fail - } - - public let options: BlockModeOption = [.initializationVectorRequired, .useEncryptToDecrypt] - private let nonce: Array - private let additionalAuthenticatedData: Array? - private let tagLength: Int - private let messageLength: Int // total message length. need to know in advance - - // `authenticationTag` nil for encryption, known tag for decryption - /// For encryption, the value is set at the end of the encryption. - /// For decryption, this is a known Tag to validate against. - public var authenticationTag: Array? - - /// Initialize CCM - /// - /// - Parameters: - /// - iv: Initialization vector. Nonce. Valid length between 7 and 13 bytes. - /// - tagLength: Authentication tag length, in bytes. Value of {4, 6, 8, 10, 12, 14, 16}. - /// - messageLength: Plaintext message length (excluding tag if attached). Length have to be provided in advance. - /// - additionalAuthenticatedData: Additional authenticated data. - public init(iv: Array, tagLength: Int, messageLength: Int, additionalAuthenticatedData: Array? = nil) { - self.nonce = iv - self.tagLength = tagLength - self.additionalAuthenticatedData = additionalAuthenticatedData - self.messageLength = messageLength // - tagLength - } - - /// Initialize CCM - /// - /// - Parameters: - /// - iv: Initialization vector. Nonce. Valid length between 7 and 13 bytes. - /// - tagLength: Authentication tag length, in bytes. Value of {4, 6, 8, 10, 12, 14, 16}. - /// - messageLength: Plaintext message length (excluding tag if attached). Length have to be provided in advance. - /// - authenticationTag: Authentication Tag value if not concatenated to ciphertext. - /// - additionalAuthenticatedData: Additional authenticated data. - public init(iv: Array, tagLength: Int, messageLength: Int, authenticationTag: Array, additionalAuthenticatedData: Array? = nil) { - self.init(iv: iv, tagLength: tagLength, messageLength: messageLength, additionalAuthenticatedData: additionalAuthenticatedData) - self.authenticationTag = authenticationTag - } - - public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { - if self.nonce.isEmpty { - throw Error.invalidInitializationVector - } - - return CCMModeWorker(blockSize: blockSize, nonce: self.nonce.slice, messageLength: self.messageLength, additionalAuthenticatedData: self.additionalAuthenticatedData, tagLength: self.tagLength, cipherOperation: cipherOperation) - } -} - -class CCMModeWorker: StreamModeWorker, SeekableModeWorker, CounterModeWorker, FinalizingEncryptModeWorker, FinalizingDecryptModeWorker { - typealias Counter = Int - var counter = 0 - - let cipherOperation: CipherOperationOnBlock - let blockSize: Int - private let tagLength: Int - private let messageLength: Int // total message length. need to know in advance - private let q: UInt8 - - let additionalBufferSize: Int - private var keystreamPosIdx = 0 - private let nonce: Array - private var last_y: ArraySlice = [] - private var keystream: Array = [] - // Known Tag used to validate during decryption - private var expectedTag: Array? - - public enum Error: Swift.Error { - case invalidParameter - } - - init(blockSize: Int, nonce: ArraySlice, messageLength: Int, additionalAuthenticatedData: [UInt8]?, expectedTag: Array? = nil, tagLength: Int, cipherOperation: @escaping CipherOperationOnBlock) { - self.blockSize = 16 // CCM is defined for 128 block size - self.tagLength = tagLength - self.additionalBufferSize = tagLength - self.messageLength = messageLength - self.expectedTag = expectedTag - self.cipherOperation = cipherOperation - self.nonce = Array(nonce) - self.q = UInt8(15 - nonce.count) // n = 15-q - - let hasAssociatedData = additionalAuthenticatedData != nil && !additionalAuthenticatedData!.isEmpty - self.processControlInformation(nonce: self.nonce, tagLength: tagLength, hasAssociatedData: hasAssociatedData) - - if let aad = additionalAuthenticatedData, hasAssociatedData { - self.process(aad: aad) - } - } - - // For the very first time setup new IV (aka y0) from the block0 - private func processControlInformation(nonce: [UInt8], tagLength: Int, hasAssociatedData: Bool) { - let block0 = try! format(nonce: nonce, Q: UInt32(self.messageLength), q: self.q, t: UInt8(tagLength), hasAssociatedData: hasAssociatedData).slice - let y0 = self.cipherOperation(block0)!.slice - self.last_y = y0 - } - - private func process(aad: [UInt8]) { - let encodedAAD = format(aad: aad) - - for block_i in encodedAAD.batched(by: 16) { - let y_i = self.cipherOperation(xor(block_i, self.last_y))!.slice - self.last_y = y_i - } - } - - private func S(i: Int) throws -> [UInt8] { - let ctr = try format(counter: i, nonce: nonce, q: q) - return self.cipherOperation(ctr.slice)! - } - - func seek(to position: Int) throws { - self.counter = position - self.keystream = try self.S(i: position) - let offset = position % self.blockSize - self.keystreamPosIdx = offset - } - - func encrypt(block plaintext: ArraySlice) -> Array { - var result = Array(reserveCapacity: plaintext.count) - - var processed = 0 - while processed < plaintext.count { - // Need a full block here to update keystream and do CBC - if self.keystream.isEmpty || self.keystreamPosIdx == self.blockSize { - // y[i], where i is the counter. Can encrypt 1 block at a time - self.counter += 1 - guard let S = try? S(i: counter) else { return Array(plaintext) } - let plaintextP = addPadding(Array(plaintext), blockSize: blockSize) - guard let y = cipherOperation(xor(last_y, plaintextP)) else { return Array(plaintext) } - self.last_y = y.slice - - self.keystream = S - self.keystreamPosIdx = 0 - } - - let xored: Array = xor(plaintext[plaintext.startIndex.advanced(by: processed)...], keystream[keystreamPosIdx...]) - keystreamPosIdx += xored.count - processed += xored.count - result += xored - } - return result - } - - func finalize(encrypt ciphertext: ArraySlice) throws -> ArraySlice { - // concatenate T at the end - guard let S0 = try? S(i: 0) else { return ciphertext } - - let computedTag = xor(last_y.prefix(self.tagLength), S0) as ArraySlice - return ciphertext + computedTag - } - - // Decryption is stream - // CBC is block - private var accumulatedPlaintext: [UInt8] = [] - - func decrypt(block ciphertext: ArraySlice) -> Array { - var output = Array(reserveCapacity: ciphertext.count) - - do { - var currentCounter = self.counter - var processed = 0 - while processed < ciphertext.count { - // Need a full block here to update keystream and do CBC - // New keystream for a new block - if self.keystream.isEmpty || self.keystreamPosIdx == self.blockSize { - currentCounter += 1 - guard let S = try? S(i: currentCounter) else { return Array(ciphertext) } - self.keystream = S - self.keystreamPosIdx = 0 - } - - let xored: Array = xor(ciphertext[ciphertext.startIndex.advanced(by: processed)...], keystream[keystreamPosIdx...]) // plaintext - keystreamPosIdx += xored.count - processed += xored.count - output += xored - self.counter = currentCounter - } - } - - // Accumulate plaintext for the MAC calculations at the end. - // It would be good to process it together though, here. - self.accumulatedPlaintext += output - - // Shouldn't return plaintext until validate tag. - // With incremental update, can't validate tag until all block are processed. - return output - } - - func finalize(decrypt plaintext: ArraySlice) throws -> ArraySlice { - // concatenate T at the end - let computedTag = Array(last_y.prefix(self.tagLength)) - guard let expectedTag = self.expectedTag, expectedTag == computedTag else { - throw CCM.Error.fail - } - - return plaintext - } - - @discardableResult - func willDecryptLast(bytes ciphertext: ArraySlice) throws -> ArraySlice { - // get tag of additionalBufferSize size - // `ciphertext` contains at least additionalBufferSize bytes - // overwrite expectedTag property used later for verification - guard let S0 = try? S(i: 0) else { return ciphertext } - self.expectedTag = xor(ciphertext.suffix(self.tagLength), S0) as [UInt8] - return ciphertext[ciphertext.startIndex..) throws -> ArraySlice { - - // Calculate Tag, from the last CBC block, for accumulated plaintext. - var processed = 0 - for block in self.accumulatedPlaintext.batched(by: self.blockSize) { - let blockP = addPadding(Array(block), blockSize: blockSize) - guard let y = cipherOperation(xor(last_y, blockP)) else { return plaintext } - self.last_y = y.slice - processed += block.count - } - self.accumulatedPlaintext.removeFirst(processed) - return plaintext - } -} - -// Q - octet length of P -// q - octet length of Q. Maximum length (in octets) of payload. An element of {2,3,4,5,6,7,8} -// t - octet length of T (MAC length). An element of {4,6,8,10,12,14,16} -private func format(nonce N: [UInt8], Q: UInt32, q: UInt8, t: UInt8, hasAssociatedData: Bool) throws -> [UInt8] { - var flags0: UInt8 = 0 - - if hasAssociatedData { - // 7 bit - flags0 |= (1 << 6) - } - - // 6,5,4 bit is t in 3 bits - flags0 |= (((t - 2) / 2) & 0x07) << 3 - - // 3,2,1 bit is q in 3 bits - flags0 |= ((q - 1) & 0x07) << 0 - - var block0: [UInt8] = Array(repeating: 0, count: 16) - block0[0] = flags0 - - // N in 1...(15-q) octets, n = 15-q - // n is an element of {7,8,9,10,11,12,13} - let n = 15 - Int(q) - guard (n + Int(q)) == 15 else { - // n+q == 15 - throw CCMModeWorker.Error.invalidParameter - } - block0[1...n] = N[0...(n - 1)] - - // Q in (16-q)...15 octets - block0[(16 - Int(q))...15] = Q.bytes(totalBytes: Int(q)).slice - - return block0 -} - -/// Formatting of the Counter Blocks. Ctr[i] -/// The counter generation function. -/// Q - octet length of P -/// q - octet length of Q. Maximum length (in octets) of payload. An element of {2,3,4,5,6,7,8} -private func format(counter i: Int, nonce N: [UInt8], q: UInt8) throws -> [UInt8] { - var flags0: UInt8 = 0 - - // bit 8,7 is Reserved - // bit 4,5,6 shall be set to 0 - // 3,2,1 bit is q in 3 bits - flags0 |= ((q - 1) & 0x07) << 0 - - var block = Array(repeating: 0, count: 16) // block[0] - block[0] = flags0 - - // N in 1...(15-q) octets, n = 15-q - // n is an element of {7,8,9,10,11,12,13} - let n = 15 - Int(q) - guard (n + Int(q)) == 15 else { - // n+q == 15 - throw CCMModeWorker.Error.invalidParameter - } - block[1...n] = N[0...(n - 1)] - - // [i]8q in (16-q)...15 octets - block[(16 - Int(q))...15] = i.bytes(totalBytes: Int(q)).slice - - return block -} - -/// Resulting can be partitioned into 16-octet blocks -private func format(aad: [UInt8]) -> [UInt8] { - let a = aad.count - - switch Double(a) { - case 0..<65280: // 2^16-2^8 - // [a]16 - return addPadding(a.bytes(totalBytes: 2) + aad, blockSize: 16) - case 65280..<4_294_967_296: // 2^32 - // [a]32 - return addPadding([0xFF, 0xFE] + a.bytes(totalBytes: 4) + aad, blockSize: 16) - case 4_294_967_296.., blockSize: Int) -> Array { - if bytes.isEmpty { - return Array(repeating: 0, count: blockSize) - } - - let remainder = bytes.count % blockSize - if remainder == 0 { - return bytes - } - - let paddingCount = blockSize - remainder - if paddingCount > 0 { - return bytes + Array(repeating: 0, count: paddingCount) - } - return bytes -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CFB.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CFB.swift deleted file mode 100644 index 28e6ae5..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CFB.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// Cipher feedback (CFB) -// - -public struct CFB: BlockMode { - public enum Error: Swift.Error { - /// Invalid IV - case invalidInitializationVector - } - - public let options: BlockModeOption = [.initializationVectorRequired, .useEncryptToDecrypt] - private let iv: Array - - public init(iv: Array) { - self.iv = iv - } - - public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { - if self.iv.count != blockSize { - throw Error.invalidInitializationVector - } - - return CFBModeWorker(blockSize: blockSize, iv: self.iv.slice, cipherOperation: cipherOperation) - } -} - -struct CFBModeWorker: BlockModeWorker { - let cipherOperation: CipherOperationOnBlock - let blockSize: Int - let additionalBufferSize: Int = 0 - private let iv: ArraySlice - private var prev: ArraySlice? - - init(blockSize: Int, iv: ArraySlice, cipherOperation: @escaping CipherOperationOnBlock) { - self.blockSize = blockSize - self.iv = iv - self.cipherOperation = cipherOperation - } - - mutating func encrypt(block plaintext: ArraySlice) -> Array { - guard let ciphertext = cipherOperation(prev ?? iv) else { - return Array(plaintext) - } - self.prev = xor(plaintext, ciphertext.slice) - return Array(self.prev ?? []) - } - - mutating func decrypt(block ciphertext: ArraySlice) -> Array { - guard let plaintext = cipherOperation(prev ?? iv) else { - return Array(ciphertext) - } - let result: Array = xor(plaintext, ciphertext) - prev = ciphertext - return result - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift deleted file mode 100644 index 8c9e35d..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/CTR.swift +++ /dev/null @@ -1,134 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// Counter (CTR) - -public struct CTR: StreamMode { - public enum Error: Swift.Error { - /// Invalid IV - case invalidInitializationVector - } - - public let options: BlockModeOption = [.initializationVectorRequired, .useEncryptToDecrypt] - private let iv: Array - private let counter: Int - - public init(iv: Array, counter: Int = 0) { - self.iv = iv - self.counter = counter - } - - public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { - if self.iv.count != blockSize { - throw Error.invalidInitializationVector - } - - return CTRModeWorker(blockSize: blockSize, iv: self.iv.slice, counter: self.counter, cipherOperation: cipherOperation) - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -struct CTRModeWorker: StreamModeWorker, SeekableModeWorker, CounterModeWorker { - typealias Counter = CTRCounter - - final class CTRCounter { - private let constPrefix: Array - private var value: UInt64 - //TODO: make it an updatable value, computing is too slow - var bytes: Array { - self.constPrefix + self.value.bytes() - } - - init(_ initialValue: Array) { - let halfIndex = initialValue.startIndex.advanced(by: initialValue.count / 2) - self.constPrefix = Array(initialValue[initialValue.startIndex.., startAt index: Int) { - self.init(buildCounterValue(nonce, counter: UInt64(index))) - } - - static func += (lhs: CTRCounter, rhs: Int) { - lhs.value += UInt64(rhs) - } - } - - let cipherOperation: CipherOperationOnBlock - let additionalBufferSize: Int = 0 - let iv: Array - var counter: CTRCounter - - private let blockSize: Int - - // The same keystream is used for the block length plaintext - // As new data is added, keystream suffix is used to xor operation. - private var keystream: Array - private var keystreamPosIdx = 0 - - init(blockSize: Int, iv: ArraySlice, counter: Int, cipherOperation: @escaping CipherOperationOnBlock) { - self.cipherOperation = cipherOperation - self.blockSize = blockSize - self.iv = Array(iv) - - // the first keystream is calculated from the nonce = initial value of counter - self.counter = CTRCounter(nonce: Array(iv), startAt: counter) - self.keystream = Array(cipherOperation(self.counter.bytes.slice)!) - } - - mutating func seek(to position: Int) throws { - let offset = position % self.blockSize - self.counter = CTRCounter(nonce: self.iv, startAt: position / self.blockSize) - self.keystream = Array(self.cipherOperation(self.counter.bytes.slice)!) - self.keystreamPosIdx = offset - } - - // plaintext is at most blockSize long - mutating func encrypt(block plaintext: ArraySlice) -> Array { - var result = Array(reserveCapacity: plaintext.count) - - var processed = 0 - while processed < plaintext.count { - // Update keystream - if self.keystreamPosIdx == self.blockSize { - self.counter += 1 - self.keystream = Array(self.cipherOperation(self.counter.bytes.slice)!) - self.keystreamPosIdx = 0 - } - - let xored: Array = xor(plaintext[plaintext.startIndex.advanced(by: processed)...], keystream[keystreamPosIdx...]) - keystreamPosIdx += xored.count - processed += xored.count - result += xored - } - - return result - } - - mutating func decrypt(block ciphertext: ArraySlice) -> Array { - self.encrypt(block: ciphertext) - } -} - -private func buildCounterValue(_ iv: Array, counter: UInt64) -> Array { - let noncePartLen = iv.count / 2 - let noncePrefix = iv[iv.startIndex.. -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public protocol CipherModeWorker { - var cipherOperation: CipherOperationOnBlock { get } - - // Additional space needed when incrementally process data - // eg. for GCM combined mode - var additionalBufferSize: Int { get } - - mutating func encrypt(block plaintext: ArraySlice) -> Array - mutating func decrypt(block ciphertext: ArraySlice) -> Array -} - -/// Block workers use `BlockEncryptor` -public protocol BlockModeWorker: CipherModeWorker { - var blockSize: Int { get } -} - -public protocol CounterModeWorker: CipherModeWorker { - associatedtype Counter - var counter: Counter { get set } -} - -public protocol SeekableModeWorker: CipherModeWorker { - mutating func seek(to position: Int) throws -} - -/// Stream workers use `StreamEncryptor` -public protocol StreamModeWorker: CipherModeWorker { -} - -public protocol FinalizingEncryptModeWorker: CipherModeWorker { - // Any final calculations, eg. calculate tag - // Called after the last block is encrypted - mutating func finalize(encrypt ciphertext: ArraySlice) throws -> ArraySlice -} - -public protocol FinalizingDecryptModeWorker: CipherModeWorker { - // Called before decryption, hence input is ciphertext. - // ciphertext is either a last block, or a tag (for stream workers) - @discardableResult - mutating func willDecryptLast(bytes ciphertext: ArraySlice) throws -> ArraySlice - // Called after decryption, hence input is ciphertext - mutating func didDecryptLast(bytes plaintext: ArraySlice) throws -> ArraySlice - // Any final calculations, eg. calculate tag - // Called after the last block is encrypted - mutating func finalize(decrypt plaintext: ArraySlice) throws -> ArraySlice -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/ECB.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/ECB.swift deleted file mode 100644 index 3559963..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/ECB.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// Electronic codebook (ECB) -// - -public struct ECB: BlockMode { - public let options: BlockModeOption = .paddingRequired - - public init() { - } - - public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { - ECBModeWorker(blockSize: blockSize, cipherOperation: cipherOperation) - } -} - -struct ECBModeWorker: BlockModeWorker { - typealias Element = Array - let cipherOperation: CipherOperationOnBlock - let blockSize: Int - let additionalBufferSize: Int = 0 - - init(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) { - self.blockSize = blockSize - self.cipherOperation = cipherOperation - } - - mutating func encrypt(block plaintext: ArraySlice) -> Array { - guard let ciphertext = cipherOperation(plaintext) else { - return Array(plaintext) - } - return ciphertext - } - - mutating func decrypt(block ciphertext: ArraySlice) -> Array { - self.encrypt(block: ciphertext) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift deleted file mode 100644 index 64af630..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/GCM.swift +++ /dev/null @@ -1,370 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// Galois/Counter Mode (GCM) -// https://csrc.nist.gov/publications/detail/sp/800-38d/final -// ref: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.694.695&rep=rep1&type=pdf -// - -public final class GCM: BlockMode { - public enum Mode { - /// In combined mode, the authentication tag is directly appended to the encrypted message. This is usually what you want. - case combined - /// Some applications may need to store the authentication tag and the encrypted message at different locations. - case detached - } - - public let options: BlockModeOption = [.initializationVectorRequired, .useEncryptToDecrypt] - - public enum Error: Swift.Error { - /// Invalid IV - case invalidInitializationVector - /// Special symbol FAIL that indicates that the inputs are not authentic. - case fail - } - - private let iv: Array - private let additionalAuthenticatedData: Array? - private let mode: Mode - - /// Length of authentication tag, in bytes. - /// For encryption, the value is given as init parameter. - /// For decryption, the lenght of given authentication tag is used. - private let tagLength: Int - - // `authenticationTag` nil for encryption, known tag for decryption - /// For encryption, the value is set at the end of the encryption. - /// For decryption, this is a known Tag to validate against. - public var authenticationTag: Array? - - // encrypt - /// Possible tag lengths: 4,8,12,13,14,15,16 - public init(iv: Array, additionalAuthenticatedData: Array? = nil, tagLength: Int = 16, mode: Mode = .detached) { - self.iv = iv - self.additionalAuthenticatedData = additionalAuthenticatedData - self.mode = mode - self.tagLength = tagLength - } - - // decrypt - public convenience init(iv: Array, authenticationTag: Array, additionalAuthenticatedData: Array? = nil, mode: Mode = .detached) { - self.init(iv: iv, additionalAuthenticatedData: additionalAuthenticatedData, tagLength: authenticationTag.count, mode: mode) - self.authenticationTag = authenticationTag - } - - public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { - if self.iv.isEmpty { - throw Error.invalidInitializationVector - } - - let worker = GCMModeWorker(iv: iv.slice, aad: self.additionalAuthenticatedData?.slice, expectedTag: self.authenticationTag, tagLength: self.tagLength, mode: self.mode, cipherOperation: cipherOperation) - worker.didCalculateTag = { [weak self] tag in - self?.authenticationTag = tag - } - return worker - } -} - -// MARK: - Worker - -final class GCMModeWorker: BlockModeWorker, FinalizingEncryptModeWorker, FinalizingDecryptModeWorker { - let cipherOperation: CipherOperationOnBlock - - // Callback called when authenticationTag is ready - var didCalculateTag: ((Array) -> Void)? - - private let tagLength: Int - // GCM nonce is 96-bits by default. It's the most effective length for the IV - private static let nonceSize = 12 - - // GCM is designed for 128-bit ciphers like AES (but not really for Blowfish). 64-bit mode is not implemented. - let blockSize = 16 // 128 bit - let additionalBufferSize: Int - private let iv: ArraySlice - private let mode: GCM.Mode - private var counter: UInt128 - private let eky0: UInt128 // move to GF? - private let h: UInt128 - - // Additional authenticated data - private let aad: ArraySlice? - // Known Tag used to validate during decryption - private var expectedTag: Array? - - // Note: need new worker to reset instance - // Use empty aad if not specified. AAD is optional. - private lazy var gf: GF = { - if let aad = aad { - return GF(aad: Array(aad), h: h, blockSize: blockSize) - } - return GF(aad: [UInt8](), h: h, blockSize: blockSize) - }() - - init(iv: ArraySlice, aad: ArraySlice? = nil, expectedTag: Array? = nil, tagLength: Int, mode: GCM.Mode, cipherOperation: @escaping CipherOperationOnBlock) { - self.cipherOperation = cipherOperation - self.iv = iv - self.mode = mode - self.aad = aad - self.expectedTag = expectedTag - self.tagLength = tagLength - self.h = UInt128(cipherOperation(Array(repeating: 0, count: self.blockSize).slice)!) // empty block - - if mode == .combined { - self.additionalBufferSize = tagLength - } else { - self.additionalBufferSize = 0 - } - - // Assume nonce is 12 bytes long, otherwise initial counter would be calulated from GHASH - // counter = GF.ghash(aad: [UInt8](), ciphertext: nonce) - if iv.count == GCMModeWorker.nonceSize { - self.counter = makeCounter(nonce: Array(self.iv)) - } else { - self.counter = GF.ghash(h: self.h, aad: [UInt8](), ciphertext: Array(iv), blockSize: self.blockSize) - } - - // Set constants - self.eky0 = UInt128(cipherOperation(self.counter.bytes.slice)!) - } - - func encrypt(block plaintext: ArraySlice) -> Array { - self.counter = incrementCounter(self.counter) - - guard let ekyN = cipherOperation(counter.bytes.slice) else { - return Array(plaintext) - } - - // plaintext block ^ ek1 - let ciphertext = xor(plaintext, ekyN) as Array - - // update ghash incrementally - gf.ghashUpdate(block: ciphertext) - - return Array(ciphertext) - } - - func finalize(encrypt ciphertext: ArraySlice) throws -> ArraySlice { - // Calculate MAC tag. - let ghash = self.gf.ghashFinish() - let tag = Array((ghash ^ self.eky0).bytes.prefix(self.tagLength)) - - // Notify handler - self.didCalculateTag?(tag) - - switch self.mode { - case .combined: - return (ciphertext + tag).slice - case .detached: - return ciphertext - } - } - - func decrypt(block ciphertext: ArraySlice) -> Array { - self.counter = incrementCounter(self.counter) - - // update ghash incrementally - self.gf.ghashUpdate(block: Array(ciphertext)) - - guard let ekN = cipherOperation(counter.bytes.slice) else { - return Array(ciphertext) - } - - // ciphertext block ^ ek1 - let plaintext = xor(ciphertext, ekN) as Array - return plaintext - } - - // The authenticated decryption operation has five inputs: K, IV , C, A, and T. It has only a single - // output, either the plaintext value P or a special symbol FAIL that indicates that the inputs are not - // authentic. - @discardableResult - func willDecryptLast(bytes ciphertext: ArraySlice) throws -> ArraySlice { - // Validate tag - switch self.mode { - case .combined: - // overwrite expectedTag property used later for verification - self.expectedTag = Array(ciphertext.suffix(self.tagLength)) - return ciphertext[ciphertext.startIndex..) throws -> ArraySlice { - // Calculate MAC tag. - let ghash = self.gf.ghashFinish() - let computedTag = Array((ghash ^ self.eky0).bytes.prefix(self.tagLength)) - - // Validate tag - guard let expectedTag = self.expectedTag, computedTag == expectedTag else { - throw GCM.Error.fail - } - - return plaintext - } - - func finalize(decrypt plaintext: ArraySlice) throws -> ArraySlice { - // do nothing - plaintext - } -} - -// MARK: - Local utils - -private func makeCounter(nonce: Array) -> UInt128 { - UInt128(nonce + [0, 0, 0, 1]) -} - -// Successive counter values are generated using the function incr(), which treats the rightmost 32 -// bits of its argument as a nonnegative integer with the least significant bit on the right -private func incrementCounter(_ counter: UInt128) -> UInt128 { - let b = counter.i.b + 1 - let a = (b == 0 ? counter.i.a + 1 : counter.i.a) - return UInt128((a, b)) -} - -// If data is not a multiple of block size bytes long then the remainder is zero padded -// Note: It's similar to ZeroPadding, but it's not the same. -private func addPadding(_ bytes: Array, blockSize: Int) -> Array { - if bytes.isEmpty { - return Array(repeating: 0, count: blockSize) - } - - let remainder = bytes.count % blockSize - if remainder == 0 { - return bytes - } - - let paddingCount = blockSize - remainder - if paddingCount > 0 { - return bytes + Array(repeating: 0, count: paddingCount) - } - return bytes -} - -// MARK: - GF - -/// The Field GF(2^128) -private final class GF { - static let r = UInt128(a: 0xE100000000000000, b: 0) - - let blockSize: Int - let h: UInt128 - - // AAD won't change - let aadLength: Int - - // Updated for every consumed block - var ciphertextLength: Int - - // Start with 0 - var x: UInt128 - - init(aad: [UInt8], h: UInt128, blockSize: Int) { - self.blockSize = blockSize - self.aadLength = aad.count - self.ciphertextLength = 0 - self.h = h - self.x = 0 - - // Calculate for AAD at the begining - self.x = GF.calculateX(aad: aad, x: self.x, h: h, blockSize: blockSize) - } - - @discardableResult - func ghashUpdate(block ciphertextBlock: Array) -> UInt128 { - self.ciphertextLength += ciphertextBlock.count - self.x = GF.calculateX(block: addPadding(ciphertextBlock, blockSize: self.blockSize), x: self.x, h: self.h, blockSize: self.blockSize) - return self.x - } - - func ghashFinish() -> UInt128 { - // len(A) || len(C) - let len = UInt128(a: UInt64(aadLength * 8), b: UInt64(ciphertextLength * 8)) - x = GF.multiply(self.x ^ len, self.h) - return self.x - } - - // GHASH. One-time calculation - static func ghash(x startx: UInt128 = 0, h: UInt128, aad: Array, ciphertext: Array, blockSize: Int) -> UInt128 { - var x = self.calculateX(aad: aad, x: startx, h: h, blockSize: blockSize) - x = self.calculateX(ciphertext: ciphertext, x: x, h: h, blockSize: blockSize) - - // len(aad) || len(ciphertext) - let len = UInt128(a: UInt64(aad.count * 8), b: UInt64(ciphertext.count * 8)) - x = self.multiply(x ^ len, h) - - return x - } - - // Calculate Ciphertext part, for all blocks - // Not used with incremental calculation. - private static func calculateX(ciphertext: [UInt8], x startx: UInt128, h: UInt128, blockSize: Int) -> UInt128 { - let pciphertext = addPadding(ciphertext, blockSize: blockSize) - let blocksCount = pciphertext.count / blockSize - - var x = startx - for i in 0.., x: UInt128, h: UInt128, blockSize: Int) -> UInt128 { - let k = x ^ UInt128(ciphertextBlock) - return self.multiply(k, h) - } - - // Calculate AAD part, for all blocks - private static func calculateX(aad: [UInt8], x startx: UInt128, h: UInt128, blockSize: Int) -> UInt128 { - let paad = addPadding(aad, blockSize: blockSize) - let blocksCount = paad.count / blockSize - - var x = startx - for i in 0.. UInt128 { - var z: UInt128 = 0 - var v = x - var k = UInt128(a: 1 << 63, b: 0) - - for _ in 0..<128 { - if y & k == k { - z = z ^ v - } - - if v & 1 != 1 { - v = v >> 1 - } else { - v = (v >> 1) ^ self.r - } - - k = k >> 1 - } - - return z - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/OFB.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/OFB.swift deleted file mode 100644 index 494018b..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/OFB.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// Output Feedback (OFB) -// - -public struct OFB: BlockMode { - public enum Error: Swift.Error { - /// Invalid IV - case invalidInitializationVector - } - - public let options: BlockModeOption = [.initializationVectorRequired, .useEncryptToDecrypt] - private let iv: Array - - public init(iv: Array) { - self.iv = iv - } - - public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { - if self.iv.count != blockSize { - throw Error.invalidInitializationVector - } - - return OFBModeWorker(blockSize: blockSize, iv: self.iv.slice, cipherOperation: cipherOperation) - } -} - -struct OFBModeWorker: BlockModeWorker { - let cipherOperation: CipherOperationOnBlock - let blockSize: Int - let additionalBufferSize: Int = 0 - private let iv: ArraySlice - private var prev: ArraySlice? - - init(blockSize: Int, iv: ArraySlice, cipherOperation: @escaping CipherOperationOnBlock) { - self.blockSize = blockSize - self.iv = iv - self.cipherOperation = cipherOperation - } - - mutating func encrypt(block plaintext: ArraySlice) -> Array { - guard let ciphertext = cipherOperation(prev ?? iv) else { - return Array(plaintext) - } - self.prev = ciphertext.slice - return xor(plaintext, ciphertext) - } - - mutating func decrypt(block ciphertext: ArraySlice) -> Array { - guard let decrypted = cipherOperation(prev ?? iv) else { - return Array(ciphertext) - } - let plaintext: Array = xor(decrypted, ciphertext) - prev = decrypted.slice - return plaintext - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/PCBC.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/PCBC.swift deleted file mode 100644 index cb2c0b9..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/BlockMode/PCBC.swift +++ /dev/null @@ -1,70 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// Propagating Cipher Block Chaining (PCBC) -// - -public struct PCBC: BlockMode { - public enum Error: Swift.Error { - /// Invalid IV - case invalidInitializationVector - } - - public let options: BlockModeOption = [.initializationVectorRequired, .paddingRequired] - private let iv: Array - - public init(iv: Array) { - self.iv = iv - } - - public func worker(blockSize: Int, cipherOperation: @escaping CipherOperationOnBlock) throws -> CipherModeWorker { - if self.iv.count != blockSize { - throw Error.invalidInitializationVector - } - - return PCBCModeWorker(blockSize: blockSize, iv: self.iv.slice, cipherOperation: cipherOperation) - } -} - -struct PCBCModeWorker: BlockModeWorker { - let cipherOperation: CipherOperationOnBlock - var blockSize: Int - let additionalBufferSize: Int = 0 - private let iv: ArraySlice - private var prev: ArraySlice? - - init(blockSize: Int, iv: ArraySlice, cipherOperation: @escaping CipherOperationOnBlock) { - self.blockSize = blockSize - self.iv = iv - self.cipherOperation = cipherOperation - } - - mutating func encrypt(block plaintext: ArraySlice) -> Array { - guard let ciphertext = cipherOperation(xor(prev ?? iv, plaintext)) else { - return Array(plaintext) - } - self.prev = xor(plaintext, ciphertext.slice) - return ciphertext - } - - mutating func decrypt(block ciphertext: ArraySlice) -> Array { - guard let plaintext = cipherOperation(ciphertext) else { - return Array(ciphertext) - } - let result: Array = xor(prev ?? self.iv, plaintext) - self.prev = xor(plaintext.slice, ciphertext) - return result - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Blowfish.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Blowfish.swift deleted file mode 100644 index 573ef3b..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Blowfish.swift +++ /dev/null @@ -1,537 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// https://en.wikipedia.org/wiki/Blowfish_(cipher) -// Based on Paul Kocher implementation -// - -public final class Blowfish { - public enum Error: Swift.Error { - /// Data padding is required - case dataPaddingRequired - /// Invalid key or IV - case invalidKeyOrInitializationVector - /// Invalid IV - case invalidInitializationVector - /// Invalid block mode - case invalidBlockMode - } - - public static let blockSize: Int = 8 // 64 bit - public let keySize: Int - - private let blockMode: BlockMode - private let padding: Padding - private var decryptWorker: CipherModeWorker! - private var encryptWorker: CipherModeWorker! - - private let N = 16 // rounds - private var P: Array - private var S: Array> - private let origP: Array = [ - 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822, - 0x299f31d0, 0x082efa98, 0xec4e6c89, 0x452821e6, 0x38d01377, - 0xbe5466cf, 0x34e90c6c, 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, - 0xb5470917, 0x9216d5d9, 0x8979fb1b - ] - - private let origS: Array> = [ - [ - 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, - 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, - 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, - 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, - 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, - 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, - 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, - 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, - 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, - 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, - 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, - 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a, - 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, - 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677, - 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, - 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, - 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, - 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239, - 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, - 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, - 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, - 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, - 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88, - 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, - 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, - 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, - 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, - 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, - 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, - 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463, - 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, - 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09, - 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, - 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, - 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, - 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, - 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, - 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, - 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, - 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, - 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, - 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, - 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, - 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, - 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, - 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, - 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, - 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c, - 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, - 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1, - 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, - 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, - 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, - 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf, - 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, - 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, - 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, - 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, - 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, - 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, - 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, - 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, - 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, - 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a - ], - [ - 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, - 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, - 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, - 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, - 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, - 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, - 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, - 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1, - 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, - 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, - 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff, - 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, - 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, - 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, - 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, - 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, - 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, - 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, - 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, - 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87, - 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, - 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, - 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, - 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, - 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, - 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509, - 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, - 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, - 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, - 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, - 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, - 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, - 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, - 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, - 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802, - 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, - 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, - 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf, - 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, - 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, - 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, - 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, - 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, - 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281, - 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, - 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, - 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, - 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, - 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, - 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, - 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, - 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, - 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, - 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, - 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, - 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061, - 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, - 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, - 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, - 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, - 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, - 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, - 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, - 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7 - ], - [ - 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, - 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, - 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, - 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, - 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, - 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, - 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, - 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, - 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, - 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, - 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, - 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b, - 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, - 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, - 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, - 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, - 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, - 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, - 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, - 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, - 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, - 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, - 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, - 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, - 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, - 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, - 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, - 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, - 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, - 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d, - 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, - 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, - 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, - 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, - 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, - 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, - 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, - 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, - 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, - 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, - 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, - 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, - 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, - 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, - 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, - 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, - 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, - 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, - 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, - 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, - 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, - 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, - 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, - 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, - 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, - 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, - 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, - 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, - 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, - 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, - 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, - 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, - 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, - 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0 - ], - [ - 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, - 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, - 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, - 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, - 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, - 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6, - 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, - 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, - 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, - 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, - 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9, - 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, - 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, - 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, - 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, - 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, - 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, - 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28, - 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, - 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd, - 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, - 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, - 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, - 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, - 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, - 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, - 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, - 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, - 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, - 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, - 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, - 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, - 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, - 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, - 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, - 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048, - 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, - 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd, - 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, - 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, - 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, - 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f, - 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, - 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, - 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, - 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, - 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964, - 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, - 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, - 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, - 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, - 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, - 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, - 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, - 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, - 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a, - 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, - 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, - 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, - 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, - 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, - 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, - 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, - 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6 - ] - ] - - public init(key: Array, blockMode: BlockMode = CBC(iv: Array(repeating: 0, count: Blowfish.blockSize)), padding: Padding) throws { - precondition(key.count >= 5 && key.count <= 56) - - self.blockMode = blockMode - self.padding = padding - self.keySize = key.count - - self.S = self.origS - self.P = self.origP - - self.expandKey(key: key) - try self.setupBlockModeWorkers() - } - - private func setupBlockModeWorkers() throws { - self.encryptWorker = try self.blockMode.worker(blockSize: Blowfish.blockSize, cipherOperation: self.encrypt) - - if self.blockMode.options.contains(.useEncryptToDecrypt) { - self.decryptWorker = try self.blockMode.worker(blockSize: Blowfish.blockSize, cipherOperation: self.encrypt) - } else { - self.decryptWorker = try self.blockMode.worker(blockSize: Blowfish.blockSize, cipherOperation: self.decrypt) - } - } - - private func reset() { - self.S = self.origS - self.P = self.origP - // todo expand key - } - - private func expandKey(key: Array) { - var j = 0 - for i in 0..<(self.N + 2) { - var data: UInt32 = 0x0 - for _ in 0..<4 { - data = (data << 8) | UInt32(key[j]) - j += 1 - if j >= key.count { - j = 0 - } - } - self.P[i] ^= data - } - - var datal: UInt32 = 0 - var datar: UInt32 = 0 - - for i in stride(from: 0, to: self.N + 2, by: 2) { - self.encryptBlowfishBlock(l: &datal, r: &datar) - self.P[i] = datal - self.P[i + 1] = datar - } - - for i in 0..<4 { - for j in stride(from: 0, to: 256, by: 2) { - self.encryptBlowfishBlock(l: &datal, r: &datar) - self.S[i][j] = datal - self.S[i][j + 1] = datar - } - } - } - - fileprivate func encrypt(block: ArraySlice) -> Array? { - var result = Array() - - var l = UInt32(bytes: block[block.startIndex..> 24) & 0xff), - UInt8((l >> 16) & 0xff) - ] - result += [ - UInt8((l >> 8) & 0xff), - UInt8((l >> 0) & 0xff) - ] - result += [ - UInt8((r >> 24) & 0xff), - UInt8((r >> 16) & 0xff) - ] - result += [ - UInt8((r >> 8) & 0xff), - UInt8((r >> 0) & 0xff) - ] - - return result - } - - fileprivate func decrypt(block: ArraySlice) -> Array? { - var result = Array() - - var l = UInt32(bytes: block[block.startIndex..> 24) & 0xff), - UInt8((l >> 16) & 0xff) - ] - result += [ - UInt8((l >> 8) & 0xff), - UInt8((l >> 0) & 0xff) - ] - result += [ - UInt8((r >> 24) & 0xff), - UInt8((r >> 16) & 0xff) - ] - result += [ - UInt8((r >> 8) & 0xff), - UInt8((r >> 0) & 0xff) - ] - return result - } - - /// Encrypts the 8-byte padded buffer - /// - /// - Parameters: - /// - l: left half - /// - r: right half - private func encryptBlowfishBlock(l: inout UInt32, r: inout UInt32) { - var Xl = l - var Xr = r - - for i in 0.. UInt32 { - let f1 = self.S[0][Int(x >> 24) & 0xff] - let f2 = self.S[1][Int(x >> 16) & 0xff] - let f3 = self.S[2][Int(x >> 8) & 0xff] - let f4 = self.S[3][Int(x & 0xff)] - return ((f1 &+ f2) ^ f3) &+ f4 - } -} - -extension Blowfish: Cipher { - /// Encrypt the 8-byte padded buffer, block by block. Note that for amounts of data larger than a block, it is not safe to just call encrypt() on successive blocks. - /// - /// - Parameter bytes: Plaintext data - /// - Returns: Encrypted data - public func encrypt(_ bytes: C) throws -> Array where C.Element == UInt8, C.Index == Int { - let bytes = self.padding.add(to: Array(bytes), blockSize: Blowfish.blockSize) // FIXME: Array(bytes) copies - - var out = Array() - out.reserveCapacity(bytes.count) - - for chunk in bytes.batched(by: Blowfish.blockSize) { - out += self.encryptWorker.encrypt(block: chunk) - } - - if self.blockMode.options.contains(.paddingRequired) && (out.count % Blowfish.blockSize != 0) { - throw Error.dataPaddingRequired - } - - return out - } - - /// Decrypt the 8-byte padded buffer - /// - /// - Parameter bytes: Ciphertext data - /// - Returns: Plaintext data - public func decrypt(_ bytes: C) throws -> Array where C.Element == UInt8, C.Index == Int { - if self.blockMode.options.contains(.paddingRequired) && (bytes.count % Blowfish.blockSize != 0) { - throw Error.dataPaddingRequired - } - - var out = Array() - out.reserveCapacity(bytes.count) - - for chunk in Array(bytes).batched(by: Blowfish.blockSize) { - out += self.decryptWorker.decrypt(block: chunk) // FIXME: copying here is innefective - } - - out = self.padding.remove(from: out, blockSize: Blowfish.blockSize) - - return out - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift deleted file mode 100644 index 0cd6029..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/CBCMAC.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public final class CBCMAC: CMAC { - public override func authenticate(_ bytes: Array) throws -> Array { - var inBytes = bytes - bitPadding(to: &inBytes, blockSize: CMAC.BlockSize) - let blocks = inBytes.batched(by: CMAC.BlockSize) - - var lastBlockEncryptionResult: [UInt8] = CBCMAC.Zero - try blocks.forEach { block in - let aes = try AES(key: Array(key), blockMode: CBC(iv: lastBlockEncryptionResult), padding: .noPadding) - lastBlockEncryptionResult = try aes.encrypt(block) - } - - return lastBlockEncryptionResult - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/CMAC.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/CMAC.swift deleted file mode 100644 index a4e54bc..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/CMAC.swift +++ /dev/null @@ -1,104 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public class CMAC: Authenticator { - public enum Error: Swift.Error { - case wrongKeyLength - } - - internal let key: SecureBytes - - internal static let BlockSize: Int = 16 - internal static let Zero: Array = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] - private static let Rb: Array = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87] - - public init(key: Array) throws { - if key.count != 16 { - throw Error.wrongKeyLength - } - self.key = SecureBytes(bytes: key) - } - - // MARK: Authenticator - - public func authenticate(_ bytes: Array) throws -> Array { - let aes = try AES(key: Array(key), blockMode: CBC(iv: CMAC.Zero), padding: .noPadding) - - let l = try aes.encrypt(CMAC.Zero) - var subKey1 = self.leftShiftOneBit(l) - if (l[0] & 0x80) != 0 { - subKey1 = xor(CMAC.Rb, subKey1) - } - var subKey2 = self.leftShiftOneBit(subKey1) - if (subKey1[0] & 0x80) != 0 { - subKey2 = xor(CMAC.Rb, subKey2) - } - - let lastBlockComplete: Bool - let blockCount = (bytes.count + CMAC.BlockSize - 1) / CMAC.BlockSize - if blockCount == 0 { - lastBlockComplete = false - } else { - lastBlockComplete = bytes.count % CMAC.BlockSize == 0 - } - var paddedBytes = bytes - if !lastBlockComplete { - bitPadding(to: &paddedBytes, blockSize: CMAC.BlockSize) - } - - var blocks = Array(paddedBytes.batched(by: CMAC.BlockSize)) - var lastBlock = blocks.popLast()! - if lastBlockComplete { - lastBlock = xor(lastBlock, subKey1) - } else { - lastBlock = xor(lastBlock, subKey2) - } - - var x = Array(repeating: 0x00, count: CMAC.BlockSize) - var y = Array(repeating: 0x00, count: CMAC.BlockSize) - for block in blocks { - y = xor(block, x) - x = try aes.encrypt(y) - } - // the difference between CMAC and CBC-MAC is that CMAC xors the final block with a secret value - y = self.process(lastBlock: lastBlock, with: x) - return try aes.encrypt(y) - } - - func process(lastBlock: ArraySlice, with x: [UInt8]) -> [UInt8] { - xor(lastBlock, x) - } - - // MARK: Helper methods - - /** - Performs left shift by one bit to the bit string aquired after concatenating al bytes in the byte array - - parameters: - - bytes: byte array - - returns: bit shifted bit string split again in array of bytes - */ - private func leftShiftOneBit(_ bytes: Array) -> Array { - var shifted = Array(repeating: 0x00, count: bytes.count) - let last = bytes.count - 1 - for index in 0.. -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// https://tools.ietf.org/html/rfc7539 -// - -public final class ChaCha20: BlockCipher { - public enum Error: Swift.Error { - case invalidKeyOrInitializationVector - case notSupported - } - - public static let blockSize = 64 // 512 / 8 - public let keySize: Int - - fileprivate let key: Key - fileprivate var counter: Array - - public init(key: Array, iv nonce: Array) throws { - precondition(nonce.count == 12 || nonce.count == 8) - - if key.count != 32 { - throw Error.invalidKeyOrInitializationVector - } - - self.key = Key(bytes: key) - self.keySize = self.key.count - - if nonce.count == 8 { - self.counter = [0, 0, 0, 0, 0, 0, 0, 0] + nonce - } else { - self.counter = [0, 0, 0, 0] + nonce - } - - assert(self.counter.count == 16) - } - - /// https://tools.ietf.org/html/rfc7539#section-2.3. - fileprivate func core(block: inout Array, counter: Array, key: Array) { - precondition(block.count == ChaCha20.blockSize) - precondition(counter.count == 16) - precondition(key.count == 32) - - let j0: UInt32 = 0x61707865 - let j1: UInt32 = 0x3320646e // 0x3620646e sigma/tau - let j2: UInt32 = 0x79622d32 - let j3: UInt32 = 0x6b206574 - let j4: UInt32 = UInt32(bytes: key[0..<4]).bigEndian - let j5: UInt32 = UInt32(bytes: key[4..<8]).bigEndian - let j6: UInt32 = UInt32(bytes: key[8..<12]).bigEndian - let j7: UInt32 = UInt32(bytes: key[12..<16]).bigEndian - let j8: UInt32 = UInt32(bytes: key[16..<20]).bigEndian - let j9: UInt32 = UInt32(bytes: key[20..<24]).bigEndian - let j10: UInt32 = UInt32(bytes: key[24..<28]).bigEndian - let j11: UInt32 = UInt32(bytes: key[28..<32]).bigEndian - let j12: UInt32 = UInt32(bytes: counter[0..<4]).bigEndian - let j13: UInt32 = UInt32(bytes: counter[4..<8]).bigEndian - let j14: UInt32 = UInt32(bytes: counter[8..<12]).bigEndian - let j15: UInt32 = UInt32(bytes: counter[12..<16]).bigEndian - - var (x0, x1, x2, x3, x4, x5, x6, x7) = (j0, j1, j2, j3, j4, j5, j6, j7) - var (x8, x9, x10, x11, x12, x13, x14, x15) = (j8, j9, j10, j11, j12, j13, j14, j15) - - for _ in 0..<10 { // 20 rounds - x0 = x0 &+ x4 - x12 ^= x0 - x12 = (x12 << 16) | (x12 >> 16) - x8 = x8 &+ x12 - x4 ^= x8 - x4 = (x4 << 12) | (x4 >> 20) - x0 = x0 &+ x4 - x12 ^= x0 - x12 = (x12 << 8) | (x12 >> 24) - x8 = x8 &+ x12 - x4 ^= x8 - x4 = (x4 << 7) | (x4 >> 25) - x1 = x1 &+ x5 - x13 ^= x1 - x13 = (x13 << 16) | (x13 >> 16) - x9 = x9 &+ x13 - x5 ^= x9 - x5 = (x5 << 12) | (x5 >> 20) - x1 = x1 &+ x5 - x13 ^= x1 - x13 = (x13 << 8) | (x13 >> 24) - x9 = x9 &+ x13 - x5 ^= x9 - x5 = (x5 << 7) | (x5 >> 25) - x2 = x2 &+ x6 - x14 ^= x2 - x14 = (x14 << 16) | (x14 >> 16) - x10 = x10 &+ x14 - x6 ^= x10 - x6 = (x6 << 12) | (x6 >> 20) - x2 = x2 &+ x6 - x14 ^= x2 - x14 = (x14 << 8) | (x14 >> 24) - x10 = x10 &+ x14 - x6 ^= x10 - x6 = (x6 << 7) | (x6 >> 25) - x3 = x3 &+ x7 - x15 ^= x3 - x15 = (x15 << 16) | (x15 >> 16) - x11 = x11 &+ x15 - x7 ^= x11 - x7 = (x7 << 12) | (x7 >> 20) - x3 = x3 &+ x7 - x15 ^= x3 - x15 = (x15 << 8) | (x15 >> 24) - x11 = x11 &+ x15 - x7 ^= x11 - x7 = (x7 << 7) | (x7 >> 25) - x0 = x0 &+ x5 - x15 ^= x0 - x15 = (x15 << 16) | (x15 >> 16) - x10 = x10 &+ x15 - x5 ^= x10 - x5 = (x5 << 12) | (x5 >> 20) - x0 = x0 &+ x5 - x15 ^= x0 - x15 = (x15 << 8) | (x15 >> 24) - x10 = x10 &+ x15 - x5 ^= x10 - x5 = (x5 << 7) | (x5 >> 25) - x1 = x1 &+ x6 - x12 ^= x1 - x12 = (x12 << 16) | (x12 >> 16) - x11 = x11 &+ x12 - x6 ^= x11 - x6 = (x6 << 12) | (x6 >> 20) - x1 = x1 &+ x6 - x12 ^= x1 - x12 = (x12 << 8) | (x12 >> 24) - x11 = x11 &+ x12 - x6 ^= x11 - x6 = (x6 << 7) | (x6 >> 25) - x2 = x2 &+ x7 - x13 ^= x2 - x13 = (x13 << 16) | (x13 >> 16) - x8 = x8 &+ x13 - x7 ^= x8 - x7 = (x7 << 12) | (x7 >> 20) - x2 = x2 &+ x7 - x13 ^= x2 - x13 = (x13 << 8) | (x13 >> 24) - x8 = x8 &+ x13 - x7 ^= x8 - x7 = (x7 << 7) | (x7 >> 25) - x3 = x3 &+ x4 - x14 ^= x3 - x14 = (x14 << 16) | (x14 >> 16) - x9 = x9 &+ x14 - x4 ^= x9 - x4 = (x4 << 12) | (x4 >> 20) - x3 = x3 &+ x4 - x14 ^= x3 - x14 = (x14 << 8) | (x14 >> 24) - x9 = x9 &+ x14 - x4 ^= x9 - x4 = (x4 << 7) | (x4 >> 25) - } - - x0 = x0 &+ j0 - x1 = x1 &+ j1 - x2 = x2 &+ j2 - x3 = x3 &+ j3 - x4 = x4 &+ j4 - x5 = x5 &+ j5 - x6 = x6 &+ j6 - x7 = x7 &+ j7 - x8 = x8 &+ j8 - x9 = x9 &+ j9 - x10 = x10 &+ j10 - x11 = x11 &+ j11 - x12 = x12 &+ j12 - x13 = x13 &+ j13 - x14 = x14 &+ j14 - x15 = x15 &+ j15 - - block.replaceSubrange(0..<4, with: x0.bigEndian.bytes()) - block.replaceSubrange(4..<8, with: x1.bigEndian.bytes()) - block.replaceSubrange(8..<12, with: x2.bigEndian.bytes()) - block.replaceSubrange(12..<16, with: x3.bigEndian.bytes()) - block.replaceSubrange(16..<20, with: x4.bigEndian.bytes()) - block.replaceSubrange(20..<24, with: x5.bigEndian.bytes()) - block.replaceSubrange(24..<28, with: x6.bigEndian.bytes()) - block.replaceSubrange(28..<32, with: x7.bigEndian.bytes()) - block.replaceSubrange(32..<36, with: x8.bigEndian.bytes()) - block.replaceSubrange(36..<40, with: x9.bigEndian.bytes()) - block.replaceSubrange(40..<44, with: x10.bigEndian.bytes()) - block.replaceSubrange(44..<48, with: x11.bigEndian.bytes()) - block.replaceSubrange(48..<52, with: x12.bigEndian.bytes()) - block.replaceSubrange(52..<56, with: x13.bigEndian.bytes()) - block.replaceSubrange(56..<60, with: x14.bigEndian.bytes()) - block.replaceSubrange(60..<64, with: x15.bigEndian.bytes()) - } - - // XORKeyStream - func process(bytes: ArraySlice, counter: inout Array, key: Array) -> Array { - precondition(counter.count == 16) - precondition(key.count == 32) - - var block = Array(repeating: 0, count: ChaCha20.blockSize) - var bytesSlice = bytes - var out = Array(reserveCapacity: bytesSlice.count) - - while bytesSlice.count >= ChaCha20.blockSize { - self.core(block: &block, counter: counter, key: key) - for (i, x) in block.enumerated() { - out.append(bytesSlice[bytesSlice.startIndex + i] ^ x) - } - var u: UInt32 = 1 - for i in 0..<4 { - u += UInt32(counter[i]) - counter[i] = UInt8(u & 0xff) - u >>= 8 - } - bytesSlice = bytesSlice[bytesSlice.startIndex + ChaCha20.blockSize..) throws -> Array { - self.process(bytes: bytes, counter: &self.counter, key: Array(self.key)) - } - - public func decrypt(_ bytes: ArraySlice) throws -> Array { - try self.encrypt(bytes) - } -} - -// MARK: Encryptor - -extension ChaCha20 { - public struct ChaChaEncryptor: Cryptor, Updatable { - private var accumulated = Array() - private let chacha: ChaCha20 - - init(chacha: ChaCha20) { - self.chacha = chacha - } - - public mutating func update(withBytes bytes: ArraySlice, isLast: Bool = false) throws -> Array { - self.accumulated += bytes - - var encrypted = Array() - encrypted.reserveCapacity(self.accumulated.count) - for chunk in self.accumulated.batched(by: ChaCha20.blockSize) { - if isLast || self.accumulated.count >= ChaCha20.blockSize { - encrypted += try self.chacha.encrypt(chunk) - self.accumulated.removeFirst(chunk.count) // TODO: improve performance - } - } - return encrypted - } - - public func seek(to: Int) throws { - throw Error.notSupported - } - } -} - -// MARK: Decryptor - -extension ChaCha20 { - public struct ChaChaDecryptor: Cryptor, Updatable { - private var accumulated = Array() - - private var offset: Int = 0 - private var offsetToRemove: Int = 0 - private let chacha: ChaCha20 - - init(chacha: ChaCha20) { - self.chacha = chacha - } - - public mutating func update(withBytes bytes: ArraySlice, isLast: Bool = true) throws -> Array { - // prepend "offset" number of bytes at the beginning - if self.offset > 0 { - self.accumulated += Array(repeating: 0, count: self.offset) + bytes - self.offsetToRemove = self.offset - self.offset = 0 - } else { - self.accumulated += bytes - } - - var plaintext = Array() - plaintext.reserveCapacity(self.accumulated.count) - for chunk in self.accumulated.batched(by: ChaCha20.blockSize) { - if isLast || self.accumulated.count >= ChaCha20.blockSize { - plaintext += try self.chacha.decrypt(chunk) - - // remove "offset" from the beginning of first chunk - if self.offsetToRemove > 0 { - plaintext.removeFirst(self.offsetToRemove) // TODO: improve performance - self.offsetToRemove = 0 - } - - self.accumulated.removeFirst(chunk.count) - } - } - - return plaintext - } - - public func seek(to: Int) throws { - throw Error.notSupported - } - } -} - -// MARK: Cryptors - -extension ChaCha20: Cryptors { - //TODO: Use BlockEncryptor/BlockDecryptor - - public func makeEncryptor() -> Cryptor & Updatable { - ChaCha20.ChaChaEncryptor(chacha: self) - } - - public func makeDecryptor() -> Cryptor & Updatable { - ChaCha20.ChaChaDecryptor(chacha: self) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Checksum.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Checksum.swift deleted file mode 100644 index d3bac93..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Checksum.swift +++ /dev/null @@ -1,193 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/// CRC - cyclic redundancy check code. -public final class Checksum { - private static let table32: Array = [ - 0x0000_0000, 0x7707_3096, 0xEE0E_612C, 0x9909_51BA, 0x076D_C419, 0x706A_F48F, 0xE963_A535, 0x9E64_95A3, - 0x0EDB_8832, 0x79DC_B8A4, 0xE0D5_E91E, 0x97D2_D988, 0x09B6_4C2B, 0x7EB1_7CBD, 0xE7B8_2D07, 0x90BF_1D91, - 0x1DB7_1064, 0x6AB0_20F2, 0xF3B9_7148, 0x84BE_41DE, 0x1ADA_D47D, 0x6DDD_E4EB, 0xF4D4_B551, 0x83D3_85C7, - 0x136C_9856, 0x646B_A8C0, 0xFD62_F97A, 0x8A65_C9EC, 0x1401_5C4F, 0x6306_6CD9, 0xFA0F_3D63, 0x8D08_0DF5, - 0x3B6E_20C8, 0x4C69_105E, 0xD560_41E4, 0xA267_7172, 0x3C03_E4D1, 0x4B04_D447, 0xD20D_85FD, 0xA50A_B56B, - 0x35B5_A8FA, 0x42B2_986C, 0xDBBB_C9D6, 0xACBC_F940, 0x32D8_6CE3, 0x45DF_5C75, 0xDCD6_0DCF, 0xABD1_3D59, - 0x26D9_30AC, 0x51DE_003A, 0xC8D7_5180, 0xBFD0_6116, 0x21B4_F4B5, 0x56B3_C423, 0xCFBA_9599, 0xB8BD_A50F, - 0x2802_B89E, 0x5F05_8808, 0xC60C_D9B2, 0xB10B_E924, 0x2F6F_7C87, 0x5868_4C11, 0xC161_1DAB, 0xB666_2D3D, - 0x76DC_4190, 0x01DB_7106, 0x98D2_20BC, 0xEFD5_102A, 0x71B1_8589, 0x06B6_B51F, 0x9FBF_E4A5, 0xE8B8_D433, - 0x7807_C9A2, 0x0F00_F934, 0x9609_A88E, 0xE10E_9818, 0x7F6A_0DBB, 0x086D_3D2D, 0x9164_6C97, 0xE663_5C01, - 0x6B6B_51F4, 0x1C6C_6162, 0x8565_30D8, 0xF262_004E, 0x6C06_95ED, 0x1B01_A57B, 0x8208_F4C1, 0xF50F_C457, - 0x65B0_D9C6, 0x12B7_E950, 0x8BBE_B8EA, 0xFCB9_887C, 0x62DD_1DDF, 0x15DA_2D49, 0x8CD3_7CF3, 0xFBD4_4C65, - 0x4DB2_6158, 0x3AB5_51CE, 0xA3BC_0074, 0xD4BB_30E2, 0x4ADF_A541, 0x3DD8_95D7, 0xA4D1_C46D, 0xD3D6_F4FB, - 0x4369_E96A, 0x346E_D9FC, 0xAD67_8846, 0xDA60_B8D0, 0x4404_2D73, 0x3303_1DE5, 0xAA0A_4C5F, 0xDD0D_7CC9, - 0x5005_713C, 0x2702_41AA, 0xBE0B_1010, 0xC90C_2086, 0x5768_B525, 0x206F_85B3, 0xB966_D409, 0xCE61_E49F, - 0x5EDE_F90E, 0x29D9_C998, 0xB0D0_9822, 0xC7D7_A8B4, 0x59B3_3D17, 0x2EB4_0D81, 0xB7BD_5C3B, 0xC0BA_6CAD, - 0xEDB8_8320, 0x9ABF_B3B6, 0x03B6_E20C, 0x74B1_D29A, 0xEAD5_4739, 0x9DD2_77AF, 0x04DB_2615, 0x73DC_1683, - 0xE363_0B12, 0x9464_3B84, 0x0D6D_6A3E, 0x7A6A_5AA8, 0xE40E_CF0B, 0x9309_FF9D, 0x0A00_AE27, 0x7D07_9EB1, - 0xF00F_9344, 0x8708_A3D2, 0x1E01_F268, 0x6906_C2FE, 0xF762_575D, 0x8065_67CB, 0x196C_3671, 0x6E6B_06E7, - 0xFED4_1B76, 0x89D3_2BE0, 0x10DA_7A5A, 0x67DD_4ACC, 0xF9B9_DF6F, 0x8EBE_EFF9, 0x17B7_BE43, 0x60B0_8ED5, - 0xD6D6_A3E8, 0xA1D1_937E, 0x38D8_C2C4, 0x4FDF_F252, 0xD1BB_67F1, 0xA6BC_5767, 0x3FB5_06DD, 0x48B2_364B, - 0xD80D_2BDA, 0xAF0A_1B4C, 0x3603_4AF6, 0x4104_7A60, 0xDF60_EFC3, 0xA867_DF55, 0x316E_8EEF, 0x4669_BE79, - 0xCB61_B38C, 0xBC66_831A, 0x256F_D2A0, 0x5268_E236, 0xCC0C_7795, 0xBB0B_4703, 0x2202_16B9, 0x5505_262F, - 0xC5BA_3BBE, 0xB2BD_0B28, 0x2BB4_5A92, 0x5CB3_6A04, 0xC2D7_FFA7, 0xB5D0_CF31, 0x2CD9_9E8B, 0x5BDE_AE1D, - 0x9B64_C2B0, 0xEC63_F226, 0x756A_A39C, 0x026D_930A, 0x9C09_06A9, 0xEB0E_363F, 0x7207_6785, 0x0500_5713, - 0x95BF_4A82, 0xE2B8_7A14, 0x7BB1_2BAE, 0x0CB6_1B38, 0x92D2_8E9B, 0xE5D5_BE0D, 0x7CDC_EFB7, 0x0BDB_DF21, - 0x86D3_D2D4, 0xF1D4_E242, 0x68DD_B3F8, 0x1FDA_836E, 0x81BE_16CD, 0xF6B9_265B, 0x6FB0_77E1, 0x18B7_4777, - 0x8808_5AE6, 0xFF0F_6A70, 0x6606_3BCA, 0x1101_0B5C, 0x8F65_9EFF, 0xF862_AE69, 0x616B_FFD3, 0x166C_CF45, - 0xA00A_E278, 0xD70D_D2EE, 0x4E04_8354, 0x3903_B3C2, 0xA767_2661, 0xD060_16F7, 0x4969_474D, 0x3E6E_77DB, - 0xAED1_6A4A, 0xD9D6_5ADC, 0x40DF_0B66, 0x37D8_3BF0, 0xA9BC_AE53, 0xDEBB_9EC5, 0x47B2_CF7F, 0x30B5_FFE9, - 0xBDBD_F21C, 0xCABA_C28A, 0x53B3_9330, 0x24B4_A3A6, 0xBAD0_3605, 0xCDD7_0693, 0x54DE_5729, 0x23D9_67BF, - 0xB366_7A2E, 0xC461_4AB8, 0x5D68_1B02, 0x2A6F_2B94, 0xB40B_BE37, 0xC30C_8EA1, 0x5A05_DF1B, 0x2D02_EF8D - ] - - private static let table32c: Array = [ - 0x0000_0000, 0xF26B_8303, 0xE13B_70F7, 0x1350_F3F4, 0xC79A_971F, 0x35F1_141C, 0x26A1_E7E8, 0xD4CA_64EB, - 0x8AD9_58CF, 0x78B2_DBCC, 0x6BE2_2838, 0x9989_AB3B, 0x4D43_CFD0, 0xBF28_4CD3, 0xAC78_BF27, 0x5E13_3C24, - 0x105E_C76F, 0xE235_446C, 0xF165_B798, 0x030E_349B, 0xD7C4_5070, 0x25AF_D373, 0x36FF_2087, 0xC494_A384, - 0x9A87_9FA0, 0x68EC_1CA3, 0x7BBC_EF57, 0x89D7_6C54, 0x5D1D_08BF, 0xAF76_8BBC, 0xBC26_7848, 0x4E4D_FB4B, - 0x20BD_8EDE, 0xD2D6_0DDD, 0xC186_FE29, 0x33ED_7D2A, 0xE727_19C1, 0x154C_9AC2, 0x061C_6936, 0xF477_EA35, - 0xAA64_D611, 0x580F_5512, 0x4B5F_A6E6, 0xB934_25E5, 0x6DFE_410E, 0x9F95_C20D, 0x8CC5_31F9, 0x7EAE_B2FA, - 0x30E3_49B1, 0xC288_CAB2, 0xD1D8_3946, 0x23B3_BA45, 0xF779_DEAE, 0x0512_5DAD, 0x1642_AE59, 0xE429_2D5A, - 0xBA3A_117E, 0x4851_927D, 0x5B01_6189, 0xA96A_E28A, 0x7DA0_8661, 0x8FCB_0562, 0x9C9B_F696, 0x6EF0_7595, - 0x417B_1DBC, 0xB310_9EBF, 0xA040_6D4B, 0x522B_EE48, 0x86E1_8AA3, 0x748A_09A0, 0x67DA_FA54, 0x95B1_7957, - 0xCBA2_4573, 0x39C9_C670, 0x2A99_3584, 0xD8F2_B687, 0x0C38_D26C, 0xFE53_516F, 0xED03_A29B, 0x1F68_2198, - 0x5125_DAD3, 0xA34E_59D0, 0xB01E_AA24, 0x4275_2927, 0x96BF_4DCC, 0x64D4_CECF, 0x7784_3D3B, 0x85EF_BE38, - 0xDBFC_821C, 0x2997_011F, 0x3AC7_F2EB, 0xC8AC_71E8, 0x1C66_1503, 0xEE0D_9600, 0xFD5D_65F4, 0x0F36_E6F7, - 0x61C6_9362, 0x93AD_1061, 0x80FD_E395, 0x7296_6096, 0xA65C_047D, 0x5437_877E, 0x4767_748A, 0xB50C_F789, - 0xEB1F_CBAD, 0x1974_48AE, 0x0A24_BB5A, 0xF84F_3859, 0x2C85_5CB2, 0xDEEE_DFB1, 0xCDBE_2C45, 0x3FD5_AF46, - 0x7198_540D, 0x83F3_D70E, 0x90A3_24FA, 0x62C8_A7F9, 0xB602_C312, 0x4469_4011, 0x5739_B3E5, 0xA552_30E6, - 0xFB41_0CC2, 0x092A_8FC1, 0x1A7A_7C35, 0xE811_FF36, 0x3CDB_9BDD, 0xCEB0_18DE, 0xDDE0_EB2A, 0x2F8B_6829, - 0x82F6_3B78, 0x709D_B87B, 0x63CD_4B8F, 0x91A6_C88C, 0x456C_AC67, 0xB707_2F64, 0xA457_DC90, 0x563C_5F93, - 0x082F_63B7, 0xFA44_E0B4, 0xE914_1340, 0x1B7F_9043, 0xCFB5_F4A8, 0x3DDE_77AB, 0x2E8E_845F, 0xDCE5_075C, - 0x92A8_FC17, 0x60C3_7F14, 0x7393_8CE0, 0x81F8_0FE3, 0x5532_6B08, 0xA759_E80B, 0xB409_1BFF, 0x4662_98FC, - 0x1871_A4D8, 0xEA1A_27DB, 0xF94A_D42F, 0x0B21_572C, 0xDFEB_33C7, 0x2D80_B0C4, 0x3ED0_4330, 0xCCBB_C033, - 0xA24B_B5A6, 0x5020_36A5, 0x4370_C551, 0xB11B_4652, 0x65D1_22B9, 0x97BA_A1BA, 0x84EA_524E, 0x7681_D14D, - 0x2892_ED69, 0xDAF9_6E6A, 0xC9A9_9D9E, 0x3BC2_1E9D, 0xEF08_7A76, 0x1D63_F975, 0x0E33_0A81, 0xFC58_8982, - 0xB215_72C9, 0x407E_F1CA, 0x532E_023E, 0xA145_813D, 0x758F_E5D6, 0x87E4_66D5, 0x94B4_9521, 0x66DF_1622, - 0x38CC_2A06, 0xCAA7_A905, 0xD9F7_5AF1, 0x2B9C_D9F2, 0xFF56_BD19, 0x0D3D_3E1A, 0x1E6D_CDEE, 0xEC06_4EED, - 0xC38D_26C4, 0x31E6_A5C7, 0x22B6_5633, 0xD0DD_D530, 0x0417_B1DB, 0xF67C_32D8, 0xE52C_C12C, 0x1747_422F, - 0x4954_7E0B, 0xBB3F_FD08, 0xA86F_0EFC, 0x5A04_8DFF, 0x8ECE_E914, 0x7CA5_6A17, 0x6FF5_99E3, 0x9D9E_1AE0, - 0xD3D3_E1AB, 0x21B8_62A8, 0x32E8_915C, 0xC083_125F, 0x1449_76B4, 0xE622_F5B7, 0xF572_0643, 0x0719_8540, - 0x590A_B964, 0xAB61_3A67, 0xB831_C993, 0x4A5A_4A90, 0x9E90_2E7B, 0x6CFB_AD78, 0x7FAB_5E8C, 0x8DC0_DD8F, - 0xE330_A81A, 0x115B_2B19, 0x020B_D8ED, 0xF060_5BEE, 0x24AA_3F05, 0xD6C1_BC06, 0xC591_4FF2, 0x37FA_CCF1, - 0x69E9_F0D5, 0x9B82_73D6, 0x88D2_8022, 0x7AB9_0321, 0xAE73_67CA, 0x5C18_E4C9, 0x4F48_173D, 0xBD23_943E, - 0xF36E_6F75, 0x0105_EC76, 0x1255_1F82, 0xE03E_9C81, 0x34F4_F86A, 0xC69F_7B69, 0xD5CF_889D, 0x27A4_0B9E, - 0x79B7_37BA, 0x8BDC_B4B9, 0x988C_474D, 0x6AE7_C44E, 0xBE2D_A0A5, 0x4C46_23A6, 0x5F16_D052, 0xAD7D_5351 - ] - - private static let table16: Array = [ - 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, - 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440, - 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, - 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, - 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40, - 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, - 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641, - 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040, - 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240, - 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441, - 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41, - 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840, - 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41, - 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40, - 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640, - 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041, - 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240, - 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441, - 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41, - 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840, - 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41, - 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40, - 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640, - 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041, - 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241, - 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440, - 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40, - 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841, - 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40, - 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41, - 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641, - 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040 - ] - - /// Polynomial: 0xEDB88320 (Reversed) - IEEE - func crc32(_ message: Array, seed: UInt32? = nil, reflect: Bool = true) -> UInt32 { - var crc: UInt32 = seed != nil ? seed! : 0xFFFF_FFFF - for chunk in message.batched(by: 256) { - for b in chunk { - let idx = Int((crc ^ UInt32(reflect ? b : reversed(b))) & 0xFF) - crc = (crc >> 8) ^ Checksum.table32[idx] - } - } - return (reflect ? crc : reversed(crc)) ^ 0xFFFF_FFFF - } - - /// Polynomial: 0x82F63B78 (Reversed) - Castagnoli - func crc32c(_ message: Array, seed: UInt32? = nil, reflect: Bool = true) -> UInt32 { - var crc: UInt32 = seed != nil ? seed! : 0xFFFF_FFFF - for chunk in message.batched(by: 256) { - for b in chunk { - let idx = Int((crc ^ UInt32(reflect ? b : reversed(b))) & 0xFF) - crc = (crc >> 8) ^ Checksum.table32c[idx] - } - } - return (reflect ? crc : reversed(crc)) ^ 0xFFFF_FFFF - } - - /// Polynomial: 0xA001 (Reversed) - IBM - func crc16(_ message: Array, seed: UInt16? = nil) -> UInt16 { - var crc: UInt16 = seed != nil ? seed! : 0x0000 - for chunk in message.batched(by: 256) { - for b in chunk { - crc = (crc >> 8) ^ Checksum.table16[Int((crc ^ UInt16(b)) & 0xFF)] - } - } - return crc - } -} - -// MARK: Public interface - -public extension Checksum { - /// Calculate CRC32. - /// - /// - parameter message: Message - /// - parameter seed: Seed value (Optional) - /// - parameter reflect: is reflect (default true) - /// - /// - returns: Calculated code - static func crc32(_ message: Array, seed: UInt32? = nil, reflect: Bool = true) -> UInt32 { - Checksum().crc32(message, seed: seed, reflect: reflect) - } - - /// Calculate CRC32C - /// - /// - parameter message: Message - /// - parameter seed: Seed value (Optional) - /// - parameter reflect: is reflect (default true) - /// - /// - returns: Calculated code - static func crc32c(_ message: Array, seed: UInt32? = nil, reflect: Bool = true) -> UInt32 { - Checksum().crc32c(message, seed: seed, reflect: reflect) - } - - /// Calculate CRC16 - /// - /// - parameter message: Message - /// - parameter seed: Seed value (Optional) - /// - /// - returns: Calculated code - static func crc16(_ message: Array, seed: UInt16? = nil) -> UInt16 { - Checksum().crc16(message, seed: seed) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Cipher.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Cipher.swift deleted file mode 100644 index a5a09d9..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Cipher.swift +++ /dev/null @@ -1,47 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public enum CipherError: Error { - case encrypt - case decrypt -} - -public protocol Cipher: class { - var keySize: Int { get } - - /// Encrypt given bytes at once - /// - /// - parameter bytes: Plaintext data - /// - returns: Encrypted data - func encrypt(_ bytes: ArraySlice) throws -> Array - func encrypt(_ bytes: Array) throws -> Array - - /// Decrypt given bytes at once - /// - /// - parameter bytes: Ciphertext data - /// - returns: Plaintext data - func decrypt(_ bytes: ArraySlice) throws -> Array - func decrypt(_ bytes: Array) throws -> Array -} - -extension Cipher { - public func encrypt(_ bytes: Array) throws -> Array { - try self.encrypt(bytes.slice) - } - - public func decrypt(_ bytes: Array) throws -> Array { - try self.decrypt(bytes.slice) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Collection+Extension.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Collection+Extension.swift deleted file mode 100644 index 28a4d54..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Collection+Extension.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// -extension Collection where Self.Element == UInt8, Self.Index == Int { - // Big endian order - func toUInt32Array() -> Array { - if isEmpty { - return [] - } - - var result = Array(reserveCapacity: 16) - for idx in stride(from: startIndex, to: endIndex, by: 4) { - let val = UInt32(bytes: self, fromIndex: idx).bigEndian - result.append(val) - } - - return result - } - - // Big endian order - func toUInt64Array() -> Array { - if isEmpty { - return [] - } - - var result = Array(reserveCapacity: 32) - for idx in stride(from: startIndex, to: endIndex, by: 8) { - let val = UInt64(bytes: self, fromIndex: idx).bigEndian - result.append(val) - } - - return result - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift deleted file mode 100644 index c96123b..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/CompactMap.swift +++ /dev/null @@ -1,23 +0,0 @@ -//// CryptoSwift -// -// Copyright (C) 2014-2018 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -#if swift(>=4.1) -// TODO: remove this file when Xcode 9.2 is no longer used -#else - extension Sequence { - public func compactMap(_ transform: (Element) throws -> ElementOfResult?) rethrows -> [ElementOfResult] { - try flatMap(transform) - } - } -#endif diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Cryptor.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Cryptor.swift deleted file mode 100644 index 34cd275..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Cryptor.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/// Cryptor (Encryptor or Decryptor) -public protocol Cryptor { - /// Seek to position in file, if block mode allows random access. - /// - /// - parameter to: new value of counter - mutating func seek(to: Int) throws -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Cryptors.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Cryptors.swift deleted file mode 100644 index d0e5fd9..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Cryptors.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -#if canImport(Darwin) - import Darwin -#else - import Glibc -#endif - -/// Worker cryptor/decryptor of `Updatable` types -public protocol Cryptors: class { - - /// Cryptor suitable for encryption - func makeEncryptor() throws -> Cryptor & Updatable - - /// Cryptor suitable for decryption - func makeDecryptor() throws -> Cryptor & Updatable - - /// Generate array of random bytes. Helper function. - static func randomIV(_ blockSize: Int) -> Array -} - -extension Cryptors { - /// Generate array of random values. - /// Convenience helper that uses `Swift.RandomNumberGenerator`. - /// - Parameter count: Length of array - public static func randomIV(_ count: Int) -> Array { - (0.. -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -@available(*, renamed: "Digest") -public typealias Hash = Digest - -/// Hash functions to calculate Digest. -public struct Digest { - /// Calculate MD5 Digest - /// - parameter bytes: input message - /// - returns: Digest bytes - public static func md5(_ bytes: Array) -> Array { - MD5().calculate(for: bytes) - } - - /// Calculate SHA1 Digest - /// - parameter bytes: input message - /// - returns: Digest bytes - public static func sha1(_ bytes: Array) -> Array { - SHA1().calculate(for: bytes) - } - - /// Calculate SHA2-224 Digest - /// - parameter bytes: input message - /// - returns: Digest bytes - public static func sha224(_ bytes: Array) -> Array { - self.sha2(bytes, variant: .sha224) - } - - /// Calculate SHA2-256 Digest - /// - parameter bytes: input message - /// - returns: Digest bytes - public static func sha256(_ bytes: Array) -> Array { - self.sha2(bytes, variant: .sha256) - } - - /// Calculate SHA2-384 Digest - /// - parameter bytes: input message - /// - returns: Digest bytes - public static func sha384(_ bytes: Array) -> Array { - self.sha2(bytes, variant: .sha384) - } - - /// Calculate SHA2-512 Digest - /// - parameter bytes: input message - /// - returns: Digest bytes - public static func sha512(_ bytes: Array) -> Array { - self.sha2(bytes, variant: .sha512) - } - - /// Calculate SHA2 Digest - /// - parameter bytes: input message - /// - parameter variant: SHA-2 variant - /// - returns: Digest bytes - public static func sha2(_ bytes: Array, variant: SHA2.Variant) -> Array { - SHA2(variant: variant).calculate(for: bytes) - } - - /// Calculate SHA3 Digest - /// - parameter bytes: input message - /// - parameter variant: SHA-3 variant - /// - returns: Digest bytes - public static func sha3(_ bytes: Array, variant: SHA3.Variant) -> Array { - SHA3(variant: variant).calculate(for: bytes) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/DigestType.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/DigestType.swift deleted file mode 100644 index a635c1e..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/DigestType.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -internal protocol DigestType { - func calculate(for bytes: Array) -> Array -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/AES+Foundation.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/AES+Foundation.swift deleted file mode 100644 index 088bd90..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/AES+Foundation.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -extension AES { - /// Initialize with CBC block mode. - public convenience init(key: String, iv: String, padding: Padding = .pkcs7) throws { - try self.init(key: key.bytes, blockMode: CBC(iv: iv.bytes), padding: padding) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Array+Foundation.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Array+Foundation.swift deleted file mode 100644 index e65fa51..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Array+Foundation.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -public extension Array where Element == UInt8 { - func toBase64() -> String? { - Data( self).base64EncodedString() - } - - init(base64: String) { - self.init() - - guard let decodedData = Data(base64Encoded: base64) else { - return - } - - append(contentsOf: decodedData.bytes) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift deleted file mode 100644 index 244c466..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Blowfish+Foundation.swift +++ /dev/null @@ -1,23 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -extension Blowfish { - /// Initialize with CBC block mode. - public convenience init(key: String, iv: String, padding: Padding = .pkcs7) throws { - try self.init(key: key.bytes, blockMode: CBC(iv: iv.bytes), padding: padding) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift deleted file mode 100644 index f4b7e7e..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/ChaCha20+Foundation.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -extension ChaCha20 { - public convenience init(key: String, iv: String) throws { - try self.init(key: key.bytes, iv: iv.bytes) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Data+Extension.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Data+Extension.swift deleted file mode 100644 index 0433ef7..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Data+Extension.swift +++ /dev/null @@ -1,95 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -extension Data { - /// Two octet checksum as defined in RFC-4880. Sum of all octets, mod 65536 - public func checksum() -> UInt16 { - var s: UInt32 = 0 - let bytesArray = bytes - for i in 0 ..< bytesArray.count { - s = s + UInt32(bytesArray[i]) - } - s = s % 65536 - return UInt16(s) - } - - public func md5() -> Data { - Data( Digest.md5(bytes)) - } - - public func sha1() -> Data { - Data( Digest.sha1(bytes)) - } - - public func sha224() -> Data { - Data( Digest.sha224(bytes)) - } - - public func sha256() -> Data { - Data( Digest.sha256(bytes)) - } - - public func sha384() -> Data { - Data( Digest.sha384(bytes)) - } - - public func sha512() -> Data { - Data( Digest.sha512(bytes)) - } - - public func sha3(_ variant: SHA3.Variant) -> Data { - Data( Digest.sha3(bytes, variant: variant)) - } - - public func crc32(seed: UInt32? = nil, reflect: Bool = true) -> Data { - Data( Checksum.crc32(bytes, seed: seed, reflect: reflect).bytes()) - } - - public func crc32c(seed: UInt32? = nil, reflect: Bool = true) -> Data { - Data( Checksum.crc32c(bytes, seed: seed, reflect: reflect).bytes()) - } - - public func crc16(seed: UInt16? = nil) -> Data { - Data( Checksum.crc16(bytes, seed: seed).bytes()) - } - - public func encrypt(cipher: Cipher) throws -> Data { - Data( try cipher.encrypt(bytes.slice)) - } - - public func decrypt(cipher: Cipher) throws -> Data { - Data( try cipher.decrypt(bytes.slice)) - } - - public func authenticate(with authenticator: Authenticator) throws -> Data { - Data( try authenticator.authenticate(bytes)) - } -} - -extension Data { - public init(hex: String) { - self.init(Array(hex: hex)) - } - - public var bytes: Array { - Array(self) - } - - public func toHexString() -> String { - self.bytes.toHexString() - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/HMAC+Foundation.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/HMAC+Foundation.swift deleted file mode 100644 index 77ee890..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/HMAC+Foundation.swift +++ /dev/null @@ -1,22 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -extension HMAC { - public convenience init(key: String, variant: HMAC.Variant = .md5) throws { - self.init(key: key.bytes, variant: variant) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift deleted file mode 100644 index ff18c36..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Rabbit+Foundation.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -extension Rabbit { - public convenience init(key: String) throws { - try self.init(key: key.bytes) - } - - public convenience init(key: String, iv: String) throws { - try self.init(key: key.bytes, iv: iv.bytes) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/String+FoundationExtension.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/String+FoundationExtension.swift deleted file mode 100644 index b19014d..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/String+FoundationExtension.swift +++ /dev/null @@ -1,41 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -extension String { - /// Return Base64 back to String - public func decryptBase64ToString(cipher: Cipher) throws -> String { - guard let decodedData = Data(base64Encoded: self, options: []) else { - throw CipherError.decrypt - } - - let decrypted = try decodedData.decrypt(cipher: cipher) - - if let decryptedString = String(data: decrypted, encoding: String.Encoding.utf8) { - return decryptedString - } - - throw CipherError.decrypt - } - - public func decryptBase64(cipher: Cipher) throws -> Array { - guard let decodedData = Data(base64Encoded: self, options: []) else { - throw CipherError.decrypt - } - - return try decodedData.decrypt(cipher: cipher).bytes - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Utils+Foundation.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Utils+Foundation.swift deleted file mode 100644 index e5c0057..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Foundation/Utils+Foundation.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -func perf(_ text: String, closure: () -> Void) { - let measurementStart = Date() - - closure() - - let measurementStop = Date() - let executionTime = measurementStop.timeIntervalSince(measurementStart) - - print("\(text) \(executionTime)") -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Generics.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Generics.swift deleted file mode 100644 index 71203d3..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Generics.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/// Array of bytes. Caution: don't use directly because generic is slow. -/// -/// - parameter value: integer value -/// - parameter length: length of output array. By default size of value type -/// -/// - returns: Array of bytes -@_specialize(exported: true, where T == Int) -@_specialize(exported: true, where T == UInt) -@_specialize(exported: true, where T == UInt8) -@_specialize(exported: true, where T == UInt16) -@_specialize(exported: true, where T == UInt32) -@_specialize(exported: true, where T == UInt64) -func arrayOfBytes(value: T, length totalBytes: Int = MemoryLayout.size) -> Array { - let valuePointer = UnsafeMutablePointer.allocate(capacity: 1) - valuePointer.pointee = value - - let bytesPointer = UnsafeMutablePointer(OpaquePointer(valuePointer)) - var bytes = Array(repeating: 0, count: totalBytes) - for j in 0...size, totalBytes) { - bytes[totalBytes - 1 - j] = (bytesPointer + j).pointee - } - - valuePointer.deinitialize(count: 1) - valuePointer.deallocate() - - return bytes -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/HKDF.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/HKDF.swift deleted file mode 100644 index 42e8c91..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/HKDF.swift +++ /dev/null @@ -1,84 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// https://www.ietf.org/rfc/rfc5869.txt -// - -#if canImport(Darwin) - import Darwin -#else - import Glibc -#endif - -/// A key derivation function. -/// -/// HKDF - HMAC-based Extract-and-Expand Key Derivation Function. -public struct HKDF { - public enum Error: Swift.Error { - case invalidInput - case derivedKeyTooLong - } - - private let numBlocks: Int // l - private let dkLen: Int - private let info: Array - private let prk: Array - private let variant: HMAC.Variant - - /// - parameters: - /// - variant: hash variant - /// - salt: optional salt (if not provided, it is set to a sequence of variant.digestLength zeros) - /// - info: optional context and application specific information - /// - keyLength: intended length of derived key - public init(password: Array, salt: Array? = nil, info: Array? = nil, keyLength: Int? = nil /* dkLen */, variant: HMAC.Variant = .sha256) throws { - guard !password.isEmpty else { - throw Error.invalidInput - } - - let dkLen = keyLength ?? variant.digestLength - let keyLengthFinal = Double(dkLen) - let hLen = Double(variant.digestLength) - let numBlocks = Int(ceil(keyLengthFinal / hLen)) // l = ceil(keyLength / hLen) - guard numBlocks <= 255 else { - throw Error.derivedKeyTooLong - } - - /// HKDF-Extract(salt, password) -> PRK - /// - PRK - a pseudo-random key; it is used by calculate() - self.prk = try HMAC(key: salt ?? [], variant: variant).authenticate(password) - self.info = info ?? [] - self.variant = variant - self.dkLen = dkLen - self.numBlocks = numBlocks - } - - public func calculate() throws -> Array { - let hmac = HMAC(key: prk, variant: variant) - var ret = Array() - ret.reserveCapacity(self.numBlocks * self.variant.digestLength) - var value = Array() - for i in 1...self.numBlocks { - value.append(contentsOf: self.info) - value.append(UInt8(i)) - - let bytes = try hmac.authenticate(value) - ret.append(contentsOf: bytes) - - /// update value to use it as input for next iteration - value = bytes - } - return Array(ret.prefix(self.dkLen)) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/HMAC.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/HMAC.swift deleted file mode 100644 index 4d13749..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/HMAC.swift +++ /dev/null @@ -1,102 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public final class HMAC: Authenticator { - public enum Error: Swift.Error { - case authenticateError - case invalidInput - } - - public enum Variant { - case sha1, sha256, sha384, sha512, md5 - - var digestLength: Int { - switch self { - case .sha1: - return SHA1.digestLength - case .sha256: - return SHA2.Variant.sha256.digestLength - case .sha384: - return SHA2.Variant.sha384.digestLength - case .sha512: - return SHA2.Variant.sha512.digestLength - case .md5: - return MD5.digestLength - } - } - - func calculateHash(_ bytes: Array) -> Array { - switch self { - case .sha1: - return Digest.sha1(bytes) - case .sha256: - return Digest.sha256(bytes) - case .sha384: - return Digest.sha384(bytes) - case .sha512: - return Digest.sha512(bytes) - case .md5: - return Digest.md5(bytes) - } - } - - func blockSize() -> Int { - switch self { - case .md5: - return MD5.blockSize - case .sha1, .sha256: - return 64 - case .sha384, .sha512: - return 128 - } - } - } - - var key: Array - let variant: Variant - - public init(key: Array, variant: HMAC.Variant = .md5) { - self.variant = variant - self.key = key - - if key.count > variant.blockSize() { - let hash = variant.calculateHash(key) - self.key = hash - } - - if key.count < variant.blockSize() { - self.key = ZeroPadding().add(to: key, blockSize: variant.blockSize()) - } - } - - // MARK: Authenticator - - public func authenticate(_ bytes: Array) throws -> Array { - var opad = Array(repeating: 0x5c, count: variant.blockSize()) - for idx in self.key.indices { - opad[idx] = self.key[idx] ^ opad[idx] - } - var ipad = Array(repeating: 0x36, count: variant.blockSize()) - for idx in self.key.indices { - ipad[idx] = self.key[idx] ^ ipad[idx] - } - - let ipadAndMessageHash = self.variant.calculateHash(ipad + bytes) - let result = self.variant.calculateHash(opad + ipadAndMessageHash) - - // return Array(result[0..<10]) // 80 bits - return result - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Int+Extension.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Int+Extension.swift deleted file mode 100644 index d8d67ba..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Int+Extension.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// CryptoSwift -// -// Created by Marcin Krzyzanowski on 12/08/14. -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -#if canImport(Darwin) - import Darwin -#else - import Glibc -#endif - -extension FixedWidthInteger { - @_transparent - func bytes(totalBytes: Int = MemoryLayout.size) -> Array { - arrayOfBytes(value: self.littleEndian, length: totalBytes) - // TODO: adjust bytes order - // var value = self.littleEndian - // return withUnsafeBytes(of: &value, Array.init).reversed() - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/MD5.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/MD5.swift deleted file mode 100644 index 217a708..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/MD5.swift +++ /dev/null @@ -1,161 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public final class MD5: DigestType { - static let blockSize: Int = 64 - static let digestLength: Int = 16 // 128 / 8 - fileprivate static let hashInitialValue: Array = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476] - - fileprivate var accumulated = Array() - fileprivate var processedBytesTotalCount: Int = 0 - fileprivate var accumulatedHash: Array = MD5.hashInitialValue - - /** specifies the per-round shift amounts */ - private let s: Array = [ - 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, - 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, - 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, - 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21 - ] - - /** binary integer part of the sines of integers (Radians) */ - private let k: Array = [ - 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, - 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501, - 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be, - 0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, - 0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa, - 0xd62f105d, 0x2441453, 0xd8a1e681, 0xe7d3fbc8, - 0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, - 0xa9e3e905, 0xfcefa3f8, 0x676f02d9, 0x8d2a4c8a, - 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c, - 0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, - 0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x4881d05, - 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665, - 0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, - 0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1, - 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1, - 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391 - ] - - public init() { - } - - public func calculate(for bytes: Array) -> Array { - do { - return try update(withBytes: bytes.slice, isLast: true) - } catch { - fatalError() - } - } - - // mutating currentHash in place is way faster than returning new result - fileprivate func process(block chunk: ArraySlice, currentHash: inout Array) { - assert(chunk.count == 16 * 4) - - // Initialize hash value for this chunk: - var A: UInt32 = currentHash[0] - var B: UInt32 = currentHash[1] - var C: UInt32 = currentHash[2] - var D: UInt32 = currentHash[3] - - var dTemp: UInt32 = 0 - - // Main loop - for j in 0.., isLast: Bool = false) throws -> Array { - self.accumulated += bytes - - if isLast { - let lengthInBits = (processedBytesTotalCount + self.accumulated.count) * 8 - let lengthBytes = lengthInBits.bytes(totalBytes: 64 / 8) // A 64-bit representation of b - - // Step 1. Append padding - bitPadding(to: &self.accumulated, blockSize: MD5.blockSize, allowance: 64 / 8) - - // Step 2. Append Length a 64-bit representation of lengthInBits - self.accumulated += lengthBytes.reversed() - } - - var processedBytes = 0 - for chunk in self.accumulated.batched(by: MD5.blockSize) { - if isLast || (self.accumulated.count - processedBytes) >= MD5.blockSize { - self.process(block: chunk, currentHash: &self.accumulatedHash) - processedBytes += chunk.count - } - } - self.accumulated.removeFirst(processedBytes) - self.processedBytesTotalCount += processedBytes - - // output current hash - var result = Array() - result.reserveCapacity(MD5.digestLength) - - for hElement in self.accumulatedHash { - let hLE = hElement.littleEndian - result += Array(arrayLiteral: UInt8(hLE & 0xff), UInt8((hLE >> 8) & 0xff), UInt8((hLE >> 16) & 0xff), UInt8((hLE >> 24) & 0xff)) - } - - // reset hash value for instance - if isLast { - self.accumulatedHash = MD5.hashInitialValue - } - - return result - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/NoPadding.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/NoPadding.swift deleted file mode 100644 index f2a1c46..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/NoPadding.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -struct NoPadding: PaddingProtocol { - init() { - } - - func add(to data: Array, blockSize _: Int) -> Array { - data - } - - func remove(from data: Array, blockSize _: Int?) -> Array { - data - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Operators.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Operators.swift deleted file mode 100644 index a15fe3c..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Operators.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/* - Bit shifting with overflow protection using overflow operator "&". - Approach is consistent with standard overflow operators &+, &-, &*, &/ - and introduce new overflow operators for shifting: &<<, &>> - - Note: Works with unsigned integers values only - - Usage - - var i = 1 // init - var j = i &<< 2 //shift left - j &<<= 2 //shift left and assign - - @see: https://medium.com/@krzyzanowskim/swiftly-shift-bits-and-protect-yourself-be33016ce071 - - This fuctonality is now implemented as part of Swift 3, SE-0104 https://github.com/apple/swift-evolution/blob/master/proposals/0104-improved-integers.md - */ diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF1.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF1.swift deleted file mode 100644 index b07baee..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PBKDF1.swift +++ /dev/null @@ -1,87 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public extension PKCS5 { - /// A key derivation function. - /// - /// PBKDF1 is recommended only for compatibility with existing - /// applications since the keys it produces may not be large enough for - /// some applications. - struct PBKDF1 { - public enum Error: Swift.Error { - case invalidInput - case derivedKeyTooLong - } - - public enum Variant { - case md5, sha1 - - var size: Int { - switch self { - case .md5: - return MD5.digestLength - case .sha1: - return SHA1.digestLength - } - } - - fileprivate func calculateHash(_ bytes: Array) -> Array { - switch self { - case .sha1: - return Digest.sha1(bytes) - case .md5: - return Digest.md5(bytes) - } - } - } - - private let iterations: Int // c - private let variant: Variant - private let keyLength: Int - private let t1: Array - - /// - parameters: - /// - salt: salt, an eight-bytes - /// - variant: hash variant - /// - iterations: iteration count, a positive integer - /// - keyLength: intended length of derived key - public init(password: Array, salt: Array, variant: Variant = .sha1, iterations: Int = 4096 /* c */, keyLength: Int? = nil /* dkLen */ ) throws { - precondition(iterations > 0) - precondition(salt.count == 8) - - let keyLength = keyLength ?? variant.size - - if keyLength > variant.size { - throw Error.derivedKeyTooLong - } - - let t1 = variant.calculateHash(password + salt) - - self.iterations = iterations - self.variant = variant - self.keyLength = keyLength - self.t1 = t1 - } - - /// Apply the underlying hash function Hash for c iterations - public func calculate() -> Array { - var t = self.t1 - for _ in 2...self.iterations { - t = self.variant.calculateHash(t) - } - return Array(t[0.. -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// https://www.ietf.org/rfc/rfc2898.txt -// - -#if canImport(Darwin) - import Darwin -#else - import Glibc -#endif - -public extension PKCS5 { - /// A key derivation function. - /// - /// PBKDF2 - Password-Based Key Derivation Function 2. Key stretching technique. - /// DK = PBKDF2(PRF, Password, Salt, c, dkLen) - struct PBKDF2 { - public enum Error: Swift.Error { - case invalidInput - case derivedKeyTooLong - } - - private let salt: Array // S - fileprivate let iterations: Int // c - private let numBlocks: Int // l - private let dkLen: Int - fileprivate let prf: HMAC - - /// - parameters: - /// - salt: salt - /// - variant: hash variant - /// - iterations: iteration count, a positive integer - /// - keyLength: intended length of derived key - /// - variant: MAC variant. Defaults to SHA256 - public init(password: Array, salt: Array, iterations: Int = 4096 /* c */, keyLength: Int? = nil /* dkLen */, variant: HMAC.Variant = .sha256) throws { - precondition(iterations > 0) - - let prf = HMAC(key: password, variant: variant) - - guard iterations > 0 && !salt.isEmpty else { - throw Error.invalidInput - } - - self.dkLen = keyLength ?? variant.digestLength - let keyLengthFinal = Double(dkLen) - let hLen = Double(prf.variant.digestLength) - if keyLengthFinal > (pow(2, 32) - 1) * hLen { - throw Error.derivedKeyTooLong - } - - self.salt = salt - self.iterations = iterations - self.prf = prf - - self.numBlocks = Int(ceil(Double(keyLengthFinal) / hLen)) // l = ceil(keyLength / hLen) - } - - public func calculate() throws -> Array { - var ret = Array() - ret.reserveCapacity(self.numBlocks * self.prf.variant.digestLength) - for i in 1...self.numBlocks { - // for each block T_i = U_1 ^ U_2 ^ ... ^ U_iter - if let value = try calculateBlock(self.salt, blockNum: i) { - ret.append(contentsOf: value) - } - } - return Array(ret.prefix(self.dkLen)) - } - } -} - -private extension PKCS5.PBKDF2 { - func ARR(_ i: Int) -> Array { - var inti = Array(repeating: 0, count: 4) - inti[0] = UInt8((i >> 24) & 0xff) - inti[1] = UInt8((i >> 16) & 0xff) - inti[2] = UInt8((i >> 8) & 0xff) - inti[3] = UInt8(i & 0xff) - return inti - } - - // F (P, S, c, i) = U_1 \xor U_2 \xor ... \xor U_c - // U_1 = PRF (P, S || INT (i)) - func calculateBlock(_ salt: Array, blockNum: Int) throws -> Array? { - guard let u1 = try? prf.authenticate(salt + ARR(blockNum)) else { // blockNum.bytes() is slower - return nil - } - - var u = u1 - var ret = u - if iterations > 1 { - // U_2 = PRF (P, U_1) , - // U_c = PRF (P, U_{c-1}) . - for _ in 2...iterations { - u = try prf.authenticate(u) - for x in 0.. -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// PKCS is a group of public-key cryptography standards devised -// and published by RSA Security Inc, starting in the early 1990s. -// - -public enum PKCS5 { - typealias Padding = PKCS7Padding -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7.swift deleted file mode 100644 index 4100038..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public enum PKCS7 { - typealias Padding = PKCS7Padding -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7Padding.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7Padding.swift deleted file mode 100644 index 628a298..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/PKCS/PKCS7Padding.swift +++ /dev/null @@ -1,64 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// PKCS is a group of public-key cryptography standards devised -// and published by RSA Security Inc, starting in the early 1990s. -// - -struct PKCS7Padding: PaddingProtocol { - enum Error: Swift.Error { - case invalidPaddingValue - } - - init() { - } - - func add(to bytes: Array, blockSize: Int) -> Array { - let padding = UInt8(blockSize - (bytes.count % blockSize)) - var withPadding = bytes - if padding == 0 { - // If the original data is a multiple of N bytes, then an extra block of bytes with value N is added. - for _ in 0..(arrayLiteral: UInt8(blockSize)) - } - } else { - // The value of each added byte is the number of bytes that are added - for _ in 0..(arrayLiteral: UInt8(padding)) - } - } - return withPadding - } - - func remove(from bytes: Array, blockSize _: Int?) -> Array { - guard !bytes.isEmpty, let lastByte = bytes.last else { - return bytes - } - - assert(!bytes.isEmpty, "Need bytes to remove padding") - - let padding = Int(lastByte) // last byte - let finalLength = bytes.count - padding - - if finalLength < 0 { - return bytes - } - - if padding >= 1 { - return Array(bytes[0.. -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public protocol PaddingProtocol { - func add(to: Array, blockSize: Int) -> Array - func remove(from: Array, blockSize: Int?) -> Array -} - -public enum Padding: PaddingProtocol { - case noPadding, zeroPadding, pkcs7, pkcs5 - - public func add(to: Array, blockSize: Int) -> Array { - switch self { - case .noPadding: - return to // NoPadding().add(to: to, blockSize: blockSize) - case .zeroPadding: - return ZeroPadding().add(to: to, blockSize: blockSize) - case .pkcs7: - return PKCS7.Padding().add(to: to, blockSize: blockSize) - case .pkcs5: - return PKCS5.Padding().add(to: to, blockSize: blockSize) - } - } - - public func remove(from: Array, blockSize: Int?) -> Array { - switch self { - case .noPadding: - return from //NoPadding().remove(from: from, blockSize: blockSize) - case .zeroPadding: - return ZeroPadding().remove(from: from, blockSize: blockSize) - case .pkcs7: - return PKCS7.Padding().remove(from: from, blockSize: blockSize) - case .pkcs5: - return PKCS5.Padding().remove(from: from, blockSize: blockSize) - } - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Poly1305.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Poly1305.swift deleted file mode 100644 index 1344c7f..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Poly1305.swift +++ /dev/null @@ -1,165 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// http://tools.ietf.org/html/draft-agl-tls-chacha20poly1305-04#section-4 -// nacl/crypto_onetimeauth/poly1305/ref/auth.c -// -/// Poly1305 takes a 32-byte, one-time key and a message and produces a 16-byte tag that authenticates the -/// message such that an attacker has a negligible chance of producing a valid tag for an inauthentic message. - -public final class Poly1305: Authenticator { - public enum Error: Swift.Error { - case authenticateError - } - - public static let blockSize: Int = 16 - - private let key: SecureBytes - - /// - parameter key: 32-byte key - public init(key: Array) { - self.key = SecureBytes(bytes: key) - } - - private func squeeze(h: inout Array) { - assert(h.count == 17) - var u: UInt32 = 0 - for j in 0..<16 { - u = u &+ h[j] - h[j] = u & 255 - u = u >> 8 - } - - u = u &+ h[16] - h[16] = u & 3 - u = 5 * (u >> 2) - - for j in 0..<16 { - u = u &+ h[j] - h[j] = u & 255 - u = u >> 8 - } - - u = u &+ h[16] - h[16] = u - } - - private func add(h: inout Array, c: Array) { - assert(h.count == 17 && c.count == 17) - - var u: UInt32 = 0 - for j in 0..<17 { - u = u &+ (h[j] &+ c[j]) - h[j] = u & 255 - u = u >> 8 - } - } - - private func mulmod(h: inout Array, r: Array) { - var hr = Array(repeating: 0, count: 17) - var u: UInt32 = 0 - for i in 0..<17 { - u = 0 - for j in 0...i { - u = u &+ (h[j] * r[i &- j]) - } - for j in (i + 1)..<17 { - u = u &+ (320 * h[j] * r[i &+ 17 &- j]) - } - hr[i] = u - } - h = hr - self.squeeze(h: &h) - } - - private func freeze(h: inout Array) { - let horig = h - self.add(h: &h, c: [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252]) - let negative = UInt32(bitPattern: -Int32(h[16] >> 7)) - for j in 0..<17 { - h[j] ^= negative & (horig[j] ^ h[j]) - } - } - - /// the key is partitioned into two parts, called "r" and "s" - fileprivate func onetimeauth(message input: Array, key k: Array) -> Array { - // clamp - var r = Array(repeating: 0, count: 17) - var h = Array(repeating: 0, count: 17) - var c = Array(repeating: 0, count: 17) - - r[0] = UInt32(k[0]) - r[1] = UInt32(k[1]) - r[2] = UInt32(k[2]) - r[3] = UInt32(k[3] & 15) - r[4] = UInt32(k[4] & 252) - r[5] = UInt32(k[5]) - r[6] = UInt32(k[6]) - r[7] = UInt32(k[7] & 15) - r[8] = UInt32(k[8] & 252) - r[9] = UInt32(k[9]) - r[10] = UInt32(k[10]) - r[11] = UInt32(k[11] & 15) - r[12] = UInt32(k[12] & 252) - r[13] = UInt32(k[13]) - r[14] = UInt32(k[14]) - r[15] = UInt32(k[15] & 15) - r[16] = 0 - - var inlen = input.count - var inpos = 0 - while inlen > 0 { - for j in 0..) throws -> Array { - self.onetimeauth(message: bytes, key: Array(self.key)) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Rabbit.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Rabbit.swift deleted file mode 100644 index b554297..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Rabbit.swift +++ /dev/null @@ -1,217 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public final class Rabbit: BlockCipher { - public enum Error: Swift.Error { - case invalidKeyOrInitializationVector - } - - /// Size of IV in bytes - public static let ivSize = 64 / 8 - - /// Size of key in bytes - public static let keySize = 128 / 8 - - /// Size of block in bytes - public static let blockSize = 128 / 8 - - public var keySize: Int { - self.key.count - } - - /// Key - private let key: Key - - /// IV (optional) - private let iv: Array? - - /// State variables - private var x = Array(repeating: 0, count: 8) - - /// Counter variables - private var c = Array(repeating: 0, count: 8) - - /// Counter carry - private var p7: UInt32 = 0 - - /// 'a' constants - private var a: Array = [ - 0x4d34d34d, - 0xd34d34d3, - 0x34d34d34, - 0x4d34d34d, - 0xd34d34d3, - 0x34d34d34, - 0x4d34d34d, - 0xd34d34d3 - ] - - // MARK: - Initializers - - public convenience init(key: Array) throws { - try self.init(key: key, iv: nil) - } - - public init(key: Array, iv: Array?) throws { - self.key = Key(bytes: key) - self.iv = iv - - guard key.count == Rabbit.keySize && (iv == nil || iv!.count == Rabbit.ivSize) else { - throw Error.invalidKeyOrInitializationVector - } - } - - // MARK: - - - fileprivate func setup() { - self.p7 = 0 - - // Key divided into 8 subkeys - var k = Array(repeating: 0, count: 8) - for j in 0..<8 { - k[j] = UInt32(self.key[Rabbit.blockSize - (2 * j + 1)]) | (UInt32(self.key[Rabbit.blockSize - (2 * j + 2)]) << 8) - } - - // Initialize state and counter variables from subkeys - for j in 0..<8 { - if j % 2 == 0 { - self.x[j] = (k[(j + 1) % 8] << 16) | k[j] - self.c[j] = (k[(j + 4) % 8] << 16) | k[(j + 5) % 8] - } else { - self.x[j] = (k[(j + 5) % 8] << 16) | k[(j + 4) % 8] - self.c[j] = (k[j] << 16) | k[(j + 1) % 8] - } - } - - // Iterate system four times - self.nextState() - self.nextState() - self.nextState() - self.nextState() - - // Reinitialize counter variables - for j in 0..<8 { - self.c[j] = self.c[j] ^ self.x[(j + 4) % 8] - } - - if let iv = iv { - self.setupIV(iv) - } - } - - private func setupIV(_ iv: Array) { - // 63...56 55...48 47...40 39...32 31...24 23...16 15...8 7...0 IV bits - // 0 1 2 3 4 5 6 7 IV bytes in array - let iv0 = UInt32(bytes: [iv[4], iv[5], iv[6], iv[7]]) - let iv1 = UInt32(bytes: [iv[0], iv[1], iv[4], iv[5]]) - let iv2 = UInt32(bytes: [iv[0], iv[1], iv[2], iv[3]]) - let iv3 = UInt32(bytes: [iv[2], iv[3], iv[6], iv[7]]) - - // Modify the counter state as function of the IV - c[0] = self.c[0] ^ iv0 - self.c[1] = self.c[1] ^ iv1 - self.c[2] = self.c[2] ^ iv2 - self.c[3] = self.c[3] ^ iv3 - self.c[4] = self.c[4] ^ iv0 - self.c[5] = self.c[5] ^ iv1 - self.c[6] = self.c[6] ^ iv2 - self.c[7] = self.c[7] ^ iv3 - - // Iterate system four times - self.nextState() - self.nextState() - self.nextState() - self.nextState() - } - - private func nextState() { - // Before an iteration the counters are incremented - var carry = self.p7 - for j in 0..<8 { - let prev = self.c[j] - self.c[j] = prev &+ self.a[j] &+ carry - carry = prev > self.c[j] ? 1 : 0 // detect overflow - } - self.p7 = carry // save last carry bit - - // Iteration of the system - var newX = Array(repeating: 0, count: 8) - newX[0] = self.g(0) &+ rotateLeft(self.g(7), by: 16) &+ rotateLeft(self.g(6), by: 16) - newX[1] = self.g(1) &+ rotateLeft(self.g(0), by: 8) &+ self.g(7) - newX[2] = self.g(2) &+ rotateLeft(self.g(1), by: 16) &+ rotateLeft(self.g(0), by: 16) - newX[3] = self.g(3) &+ rotateLeft(self.g(2), by: 8) &+ self.g(1) - newX[4] = self.g(4) &+ rotateLeft(self.g(3), by: 16) &+ rotateLeft(self.g(2), by: 16) - newX[5] = self.g(5) &+ rotateLeft(self.g(4), by: 8) &+ self.g(3) - newX[6] = self.g(6) &+ rotateLeft(self.g(5), by: 16) &+ rotateLeft(self.g(4), by: 16) - newX[7] = self.g(7) &+ rotateLeft(self.g(6), by: 8) &+ self.g(5) - self.x = newX - } - - private func g(_ j: Int) -> UInt32 { - let sum = self.x[j] &+ self.c[j] - let square = UInt64(sum) * UInt64(sum) - return UInt32(truncatingIfNeeded: square ^ (square >> 32)) - } - - fileprivate func nextOutput() -> Array { - self.nextState() - - var output16 = Array(repeating: 0, count: Rabbit.blockSize / 2) - output16[7] = UInt16(truncatingIfNeeded: self.x[0]) ^ UInt16(truncatingIfNeeded: self.x[5] >> 16) - output16[6] = UInt16(truncatingIfNeeded: self.x[0] >> 16) ^ UInt16(truncatingIfNeeded: self.x[3]) - output16[5] = UInt16(truncatingIfNeeded: self.x[2]) ^ UInt16(truncatingIfNeeded: self.x[7] >> 16) - output16[4] = UInt16(truncatingIfNeeded: self.x[2] >> 16) ^ UInt16(truncatingIfNeeded: self.x[5]) - output16[3] = UInt16(truncatingIfNeeded: self.x[4]) ^ UInt16(truncatingIfNeeded: self.x[1] >> 16) - output16[2] = UInt16(truncatingIfNeeded: self.x[4] >> 16) ^ UInt16(truncatingIfNeeded: self.x[7]) - output16[1] = UInt16(truncatingIfNeeded: self.x[6]) ^ UInt16(truncatingIfNeeded: self.x[3] >> 16) - output16[0] = UInt16(truncatingIfNeeded: self.x[6] >> 16) ^ UInt16(truncatingIfNeeded: self.x[1]) - - var output8 = Array(repeating: 0, count: Rabbit.blockSize) - for j in 0..> 8) - output8[j * 2 + 1] = UInt8(truncatingIfNeeded: output16[j]) - } - return output8 - } -} - -// MARK: Cipher - -extension Rabbit: Cipher { - public func encrypt(_ bytes: ArraySlice) throws -> Array { - self.setup() - - var result = Array(repeating: 0, count: bytes.count) - var output = self.nextOutput() - var byteIdx = 0 - var outputIdx = 0 - while byteIdx < bytes.count { - if outputIdx == Rabbit.blockSize { - output = self.nextOutput() - outputIdx = 0 - } - - result[byteIdx] = bytes[byteIdx] ^ output[outputIdx] - - byteIdx += 1 - outputIdx += 1 - } - return result - } - - public func decrypt(_ bytes: ArraySlice) throws -> Array { - try self.encrypt(bytes) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/SHA1.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/SHA1.swift deleted file mode 100644 index 02ecdca..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/SHA1.swift +++ /dev/null @@ -1,145 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -public final class SHA1: DigestType { - static let digestLength: Int = 20 // 160 / 8 - static let blockSize: Int = 64 - fileprivate static let hashInitialValue: ContiguousArray = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0] - - fileprivate var accumulated = Array() - fileprivate var processedBytesTotalCount: Int = 0 - fileprivate var accumulatedHash: ContiguousArray = SHA1.hashInitialValue - - public init() { - } - - public func calculate(for bytes: Array) -> Array { - do { - return try update(withBytes: bytes.slice, isLast: true) - } catch { - return [] - } - } - - fileprivate func process(block chunk: ArraySlice, currentHash hh: inout ContiguousArray) { - // break chunk into sixteen 32-bit words M[j], 0 ≤ j ≤ 15, big-endian - // Extend the sixteen 32-bit words into eighty 32-bit words: - let M = UnsafeMutablePointer.allocate(capacity: 80) - M.initialize(repeating: 0, count: 80) - defer { - M.deinitialize(count: 80) - M.deallocate() - } - - for x in 0..<80 { - switch x { - case 0...15: - let start = chunk.startIndex.advanced(by: x * 4) // * MemoryLayout.size - M[x] = UInt32(bytes: chunk, fromIndex: start) - default: - M[x] = rotateLeft(M[x - 3] ^ M[x - 8] ^ M[x - 14] ^ M[x - 16], by: 1) - } - } - - var A = hh[0] - var B = hh[1] - var C = hh[2] - var D = hh[3] - var E = hh[4] - - // Main loop - for j in 0...79 { - var f: UInt32 = 0 - var k: UInt32 = 0 - - switch j { - case 0...19: - f = (B & C) | ((~B) & D) - k = 0x5a827999 - case 20...39: - f = B ^ C ^ D - k = 0x6ed9eba1 - case 40...59: - f = (B & C) | (B & D) | (C & D) - k = 0x8f1bbcdc - case 60...79: - f = B ^ C ^ D - k = 0xca62c1d6 - default: - break - } - - let temp = rotateLeft(A, by: 5) &+ f &+ E &+ M[j] &+ k - E = D - D = C - C = rotateLeft(B, by: 30) - B = A - A = temp - } - - hh[0] = hh[0] &+ A - hh[1] = hh[1] &+ B - hh[2] = hh[2] &+ C - hh[3] = hh[3] &+ D - hh[4] = hh[4] &+ E - } -} - -extension SHA1: Updatable { - @discardableResult - public func update(withBytes bytes: ArraySlice, isLast: Bool = false) throws -> Array { - self.accumulated += bytes - - if isLast { - let lengthInBits = (processedBytesTotalCount + self.accumulated.count) * 8 - let lengthBytes = lengthInBits.bytes(totalBytes: 64 / 8) // A 64-bit representation of b - - // Step 1. Append padding - bitPadding(to: &self.accumulated, blockSize: SHA1.blockSize, allowance: 64 / 8) - - // Step 2. Append Length a 64-bit representation of lengthInBits - self.accumulated += lengthBytes - } - - var processedBytes = 0 - for chunk in self.accumulated.batched(by: SHA1.blockSize) { - if isLast || (self.accumulated.count - processedBytes) >= SHA1.blockSize { - self.process(block: chunk, currentHash: &self.accumulatedHash) - processedBytes += chunk.count - } - } - self.accumulated.removeFirst(processedBytes) - self.processedBytesTotalCount += processedBytes - - // output current hash - var result = Array(repeating: 0, count: SHA1.digestLength) - var pos = 0 - for idx in 0..> 24) & 0xff) - result[pos + 1] = UInt8((h >> 16) & 0xff) - result[pos + 2] = UInt8((h >> 8) & 0xff) - result[pos + 3] = UInt8(h & 0xff) - pos += 4 - } - - // reset hash value for instance - if isLast { - self.accumulatedHash = SHA1.hashInitialValue - } - - return result - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/SHA2.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/SHA2.swift deleted file mode 100644 index 5f326ab..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/SHA2.swift +++ /dev/null @@ -1,345 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// TODO: generic for process32/64 (UInt32/UInt64) -// - -public final class SHA2: DigestType { - let variant: Variant - let size: Int - let blockSize: Int - let digestLength: Int - private let k: Array - - fileprivate var accumulated = Array() - fileprivate var processedBytesTotalCount: Int = 0 - fileprivate var accumulatedHash32 = Array() - fileprivate var accumulatedHash64 = Array() - - public enum Variant: RawRepresentable { - case sha224, sha256, sha384, sha512 - - public var digestLength: Int { - self.rawValue / 8 - } - - public var blockSize: Int { - switch self { - case .sha224, .sha256: - return 64 - case .sha384, .sha512: - return 128 - } - } - - public typealias RawValue = Int - public var rawValue: RawValue { - switch self { - case .sha224: - return 224 - case .sha256: - return 256 - case .sha384: - return 384 - case .sha512: - return 512 - } - } - - public init?(rawValue: RawValue) { - switch rawValue { - case 224: - self = .sha224 - case 256: - self = .sha256 - case 384: - self = .sha384 - case 512: - self = .sha512 - default: - return nil - } - } - - fileprivate var h: Array { - switch self { - case .sha224: - return [0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4] - case .sha256: - return [0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19] - case .sha384: - return [0xcbbb9d5dc1059ed8, 0x629a292a367cd507, 0x9159015a3070dd17, 0x152fecd8f70e5939, 0x67332667ffc00b31, 0x8eb44a8768581511, 0xdb0c2e0d64f98fa7, 0x47b5481dbefa4fa4] - case .sha512: - return [0x6a09e667f3bcc908, 0xbb67ae8584caa73b, 0x3c6ef372fe94f82b, 0xa54ff53a5f1d36f1, 0x510e527fade682d1, 0x9b05688c2b3e6c1f, 0x1f83d9abfb41bd6b, 0x5be0cd19137e2179] - } - } - - fileprivate var finalLength: Int { - switch self { - case .sha224: - return 7 - case .sha384: - return 6 - default: - return Int.max - } - } - } - - public init(variant: SHA2.Variant) { - self.variant = variant - switch self.variant { - case .sha224, .sha256: - self.accumulatedHash32 = variant.h.map { UInt32($0) } // FIXME: UInt64 for process64 - self.blockSize = variant.blockSize - self.size = variant.rawValue - self.digestLength = variant.digestLength - self.k = [ - 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, - 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, - 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, - 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, - 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, - 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, - 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, - 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 - ] - case .sha384, .sha512: - self.accumulatedHash64 = variant.h - self.blockSize = variant.blockSize - self.size = variant.rawValue - self.digestLength = variant.digestLength - self.k = [ - 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc, 0x3956c25bf348b538, - 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118, 0xd807aa98a3030242, 0x12835b0145706fbe, - 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2, 0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235, - 0xc19bf174cf692694, 0xe49b69c19ef14ad2, 0xefbe4786384f25e3, 0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65, - 0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4, 0x76f988da831153b5, 0x983e5152ee66dfab, - 0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4, 0xc6e00bf33da88fc2, 0xd5a79147930aa725, - 0x06ca6351e003826f, 0x142929670a0e6e70, 0x27b70a8546d22ffc, 0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed, - 0x53380d139d95b3df, 0x650a73548baf63de, 0x766a0abb3c77b2a8, 0x81c2c92e47edaee6, 0x92722c851482353b, - 0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791, 0xc76c51a30654be30, 0xd192e819d6ef5218, - 0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8, 0x19a4c116b8d2d0c8, 0x1e376c085141ab53, - 0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8, 0x391c0cb3c5c95a63, 0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373, - 0x682e6ff3d6b2b8a3, 0x748f82ee5defb2fc, 0x78a5636f43172f60, 0x84c87814a1f0ab72, 0x8cc702081a6439ec, - 0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915, 0xc67178f2e372532b, 0xca273eceea26619c, - 0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178, 0x06f067aa72176fba, 0x0a637dc5a2c898a6, - 0x113f9804bef90dae, 0x1b710b35131c471b, 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, - 0x431d67c49c100d4c, 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817 - ] - } - } - - public func calculate(for bytes: Array) -> Array { - do { - return try update(withBytes: bytes.slice, isLast: true) - } catch { - return [] - } - } - - fileprivate func process64(block chunk: ArraySlice, currentHash hh: inout Array) { - // break chunk into sixteen 64-bit words M[j], 0 ≤ j ≤ 15, big-endian - // Extend the sixteen 64-bit words into eighty 64-bit words: - let M = UnsafeMutablePointer.allocate(capacity: self.k.count) - M.initialize(repeating: 0, count: self.k.count) - defer { - M.deinitialize(count: self.k.count) - M.deallocate() - } - for x in 0...size - M[x] = UInt64(bytes: chunk, fromIndex: start) - default: - let s0 = rotateRight(M[x - 15], by: 1) ^ rotateRight(M[x - 15], by: 8) ^ (M[x - 15] >> 7) - let s1 = rotateRight(M[x - 2], by: 19) ^ rotateRight(M[x - 2], by: 61) ^ (M[x - 2] >> 6) - M[x] = M[x - 16] &+ s0 &+ M[x - 7] &+ s1 - } - } - - var A = hh[0] - var B = hh[1] - var C = hh[2] - var D = hh[3] - var E = hh[4] - var F = hh[5] - var G = hh[6] - var H = hh[7] - - // Main loop - for j in 0.., currentHash hh: inout Array) { - // break chunk into sixteen 32-bit words M[j], 0 ≤ j ≤ 15, big-endian - // Extend the sixteen 32-bit words into sixty-four 32-bit words: - let M = UnsafeMutablePointer.allocate(capacity: self.k.count) - M.initialize(repeating: 0, count: self.k.count) - defer { - M.deinitialize(count: self.k.count) - M.deallocate() - } - - for x in 0...size - M[x] = UInt32(bytes: chunk, fromIndex: start) - default: - let s0 = rotateRight(M[x - 15], by: 7) ^ rotateRight(M[x - 15], by: 18) ^ (M[x - 15] >> 3) - let s1 = rotateRight(M[x - 2], by: 17) ^ rotateRight(M[x - 2], by: 19) ^ (M[x - 2] >> 10) - M[x] = M[x - 16] &+ s0 &+ M[x - 7] &+ s1 - } - } - - var A = hh[0] - var B = hh[1] - var C = hh[2] - var D = hh[3] - var E = hh[4] - var F = hh[5] - var G = hh[6] - var H = hh[7] - - // Main loop - for j in 0.., isLast: Bool = false) throws -> Array { - self.accumulated += bytes - - if isLast { - let lengthInBits = (processedBytesTotalCount + self.accumulated.count) * 8 - let lengthBytes = lengthInBits.bytes(totalBytes: self.blockSize / 8) // A 64-bit/128-bit representation of b. blockSize fit by accident. - - // Step 1. Append padding - bitPadding(to: &self.accumulated, blockSize: self.blockSize, allowance: self.blockSize / 8) - - // Step 2. Append Length a 64-bit representation of lengthInBits - self.accumulated += lengthBytes - } - - var processedBytes = 0 - for chunk in self.accumulated.batched(by: self.blockSize) { - if isLast || (self.accumulated.count - processedBytes) >= self.blockSize { - switch self.variant { - case .sha224, .sha256: - self.process32(block: chunk, currentHash: &self.accumulatedHash32) - case .sha384, .sha512: - self.process64(block: chunk, currentHash: &self.accumulatedHash64) - } - processedBytes += chunk.count - } - } - self.accumulated.removeFirst(processedBytes) - self.processedBytesTotalCount += processedBytes - - // output current hash - var result = Array(repeating: 0, count: variant.digestLength) - switch self.variant { - case .sha224, .sha256: - var pos = 0 - for idx in 0..> 24) & 0xff) - result[pos + 1] = UInt8((h >> 16) & 0xff) - result[pos + 2] = UInt8((h >> 8) & 0xff) - result[pos + 3] = UInt8(h & 0xff) - pos += 4 - } - case .sha384, .sha512: - var pos = 0 - for idx in 0..> 56) & 0xff) - result[pos + 1] = UInt8((h >> 48) & 0xff) - result[pos + 2] = UInt8((h >> 40) & 0xff) - result[pos + 3] = UInt8((h >> 32) & 0xff) - result[pos + 4] = UInt8((h >> 24) & 0xff) - result[pos + 5] = UInt8((h >> 16) & 0xff) - result[pos + 6] = UInt8((h >> 8) & 0xff) - result[pos + 7] = UInt8(h & 0xff) - pos += 8 - } - } - - // reset hash value for instance - if isLast { - switch self.variant { - case .sha224, .sha256: - self.accumulatedHash32 = self.variant.h.lazy.map { UInt32($0) } // FIXME: UInt64 for process64 - case .sha384, .sha512: - self.accumulatedHash64 = self.variant.h - } - } - - return result - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/SHA3.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/SHA3.swift deleted file mode 100644 index fdea882..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/SHA3.swift +++ /dev/null @@ -1,289 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf -// http://keccak.noekeon.org/specs_summary.html -// - -#if canImport(Darwin) - import Darwin -#else - import Glibc -#endif - -public final class SHA3: DigestType { - let round_constants: Array = [ - 0x0000000000000001, 0x0000000000008082, 0x800000000000808a, 0x8000000080008000, - 0x000000000000808b, 0x0000000080000001, 0x8000000080008081, 0x8000000000008009, - 0x000000000000008a, 0x0000000000000088, 0x0000000080008009, 0x000000008000000a, - 0x000000008000808b, 0x800000000000008b, 0x8000000000008089, 0x8000000000008003, - 0x8000000000008002, 0x8000000000000080, 0x000000000000800a, 0x800000008000000a, - 0x8000000080008081, 0x8000000000008080, 0x0000000080000001, 0x8000000080008008 - ] - - public let blockSize: Int - public let digestLength: Int - public let markByte: UInt8 - - fileprivate var accumulated = Array() - fileprivate var accumulatedHash: Array - - public enum Variant { - case sha224, sha256, sha384, sha512, keccak224, keccak256, keccak384, keccak512 - - var digestLength: Int { - 100 - (self.blockSize / 2) - } - - var blockSize: Int { - (1600 - self.outputLength * 2) / 8 - } - - var markByte: UInt8 { - switch self { - case .sha224, .sha256, .sha384, .sha512: - return 0x06 // 0x1F for SHAKE - case .keccak224, .keccak256, .keccak384, .keccak512: - return 0x01 - } - } - - public var outputLength: Int { - switch self { - case .sha224, .keccak224: - return 224 - case .sha256, .keccak256: - return 256 - case .sha384, .keccak384: - return 384 - case .sha512, .keccak512: - return 512 - } - } - } - - public init(variant: SHA3.Variant) { - self.blockSize = variant.blockSize - self.digestLength = variant.digestLength - self.markByte = variant.markByte - self.accumulatedHash = Array(repeating: 0, count: self.digestLength) - } - - public func calculate(for bytes: Array) -> Array { - do { - return try update(withBytes: bytes.slice, isLast: true) - } catch { - return [] - } - } - - /// 1. For all pairs (x,z) such that 0≤x<5 and 0≤z) { - let c = UnsafeMutablePointer.allocate(capacity: 5) - c.initialize(repeating: 0, count: 5) - defer { - c.deinitialize(count: 5) - c.deallocate() - } - let d = UnsafeMutablePointer.allocate(capacity: 5) - d.initialize(repeating: 0, count: 5) - defer { - d.deinitialize(count: 5) - d.deallocate() - } - - for i in 0..<5 { - c[i] = a[i] ^ a[i &+ 5] ^ a[i &+ 10] ^ a[i &+ 15] ^ a[i &+ 20] - } - - d[0] = rotateLeft(c[1], by: 1) ^ c[4] - d[1] = rotateLeft(c[2], by: 1) ^ c[0] - d[2] = rotateLeft(c[3], by: 1) ^ c[1] - d[3] = rotateLeft(c[4], by: 1) ^ c[2] - d[4] = rotateLeft(c[0], by: 1) ^ c[3] - - for i in 0..<5 { - a[i] ^= d[i] - a[i &+ 5] ^= d[i] - a[i &+ 10] ^= d[i] - a[i &+ 15] ^= d[i] - a[i &+ 20] ^= d[i] - } - } - - /// A′[x, y, z]=A[(x &+ 3y) mod 5, x, z] - private func π(_ a: inout Array) { - let a1 = a[1] - a[1] = a[6] - a[6] = a[9] - a[9] = a[22] - a[22] = a[14] - a[14] = a[20] - a[20] = a[2] - a[2] = a[12] - a[12] = a[13] - a[13] = a[19] - a[19] = a[23] - a[23] = a[15] - a[15] = a[4] - a[4] = a[24] - a[24] = a[21] - a[21] = a[8] - a[8] = a[16] - a[16] = a[5] - a[5] = a[3] - a[3] = a[18] - a[18] = a[17] - a[17] = a[11] - a[11] = a[7] - a[7] = a[10] - a[10] = a1 - } - - /// For all triples (x, y, z) such that 0≤x<5, 0≤y<5, and 0≤z) { - for i in stride(from: 0, to: 25, by: 5) { - let a0 = a[0 &+ i] - let a1 = a[1 &+ i] - a[0 &+ i] ^= ~a1 & a[2 &+ i] - a[1 &+ i] ^= ~a[2 &+ i] & a[3 &+ i] - a[2 &+ i] ^= ~a[3 &+ i] & a[4 &+ i] - a[3 &+ i] ^= ~a[4 &+ i] & a0 - a[4 &+ i] ^= ~a0 & a1 - } - } - - private func ι(_ a: inout Array, round: Int) { - a[0] ^= self.round_constants[round] - } - - fileprivate func process(block chunk: ArraySlice, currentHash hh: inout Array) { - // expand - hh[0] ^= chunk[0].littleEndian - hh[1] ^= chunk[1].littleEndian - hh[2] ^= chunk[2].littleEndian - hh[3] ^= chunk[3].littleEndian - hh[4] ^= chunk[4].littleEndian - hh[5] ^= chunk[5].littleEndian - hh[6] ^= chunk[6].littleEndian - hh[7] ^= chunk[7].littleEndian - hh[8] ^= chunk[8].littleEndian - if self.blockSize > 72 { // 72 / 8, sha-512 - hh[9] ^= chunk[9].littleEndian - hh[10] ^= chunk[10].littleEndian - hh[11] ^= chunk[11].littleEndian - hh[12] ^= chunk[12].littleEndian - if self.blockSize > 104 { // 104 / 8, sha-384 - hh[13] ^= chunk[13].littleEndian - hh[14] ^= chunk[14].littleEndian - hh[15] ^= chunk[15].littleEndian - hh[16] ^= chunk[16].littleEndian - if self.blockSize > 136 { // 136 / 8, sha-256 - hh[17] ^= chunk[17].littleEndian - // FULL_SHA3_FAMILY_SUPPORT - if self.blockSize > 144 { // 144 / 8, sha-224 - hh[18] ^= chunk[18].littleEndian - hh[19] ^= chunk[19].littleEndian - hh[20] ^= chunk[20].littleEndian - hh[21] ^= chunk[21].littleEndian - hh[22] ^= chunk[22].littleEndian - hh[23] ^= chunk[23].littleEndian - hh[24] ^= chunk[24].littleEndian - } - } - } - } - - // Keccak-f - for round in 0..<24 { - self.θ(&hh) - - hh[1] = rotateLeft(hh[1], by: 1) - hh[2] = rotateLeft(hh[2], by: 62) - hh[3] = rotateLeft(hh[3], by: 28) - hh[4] = rotateLeft(hh[4], by: 27) - hh[5] = rotateLeft(hh[5], by: 36) - hh[6] = rotateLeft(hh[6], by: 44) - hh[7] = rotateLeft(hh[7], by: 6) - hh[8] = rotateLeft(hh[8], by: 55) - hh[9] = rotateLeft(hh[9], by: 20) - hh[10] = rotateLeft(hh[10], by: 3) - hh[11] = rotateLeft(hh[11], by: 10) - hh[12] = rotateLeft(hh[12], by: 43) - hh[13] = rotateLeft(hh[13], by: 25) - hh[14] = rotateLeft(hh[14], by: 39) - hh[15] = rotateLeft(hh[15], by: 41) - hh[16] = rotateLeft(hh[16], by: 45) - hh[17] = rotateLeft(hh[17], by: 15) - hh[18] = rotateLeft(hh[18], by: 21) - hh[19] = rotateLeft(hh[19], by: 8) - hh[20] = rotateLeft(hh[20], by: 18) - hh[21] = rotateLeft(hh[21], by: 2) - hh[22] = rotateLeft(hh[22], by: 61) - hh[23] = rotateLeft(hh[23], by: 56) - hh[24] = rotateLeft(hh[24], by: 14) - - self.π(&hh) - self.χ(&hh) - self.ι(&hh, round: round) - } - } -} - -extension SHA3: Updatable { - public func update(withBytes bytes: ArraySlice, isLast: Bool = false) throws -> Array { - self.accumulated += bytes - - if isLast { - // Add padding - let markByteIndex = self.accumulated.count - - // We need to always pad the input. Even if the input is a multiple of blockSize. - let r = self.blockSize * 8 - let q = (r / 8) - (accumulated.count % (r / 8)) - self.accumulated += Array(repeating: 0, count: q) - - self.accumulated[markByteIndex] |= self.markByte - self.accumulated[self.accumulated.count - 1] |= 0x80 - } - - var processedBytes = 0 - for chunk in self.accumulated.batched(by: self.blockSize) { - if isLast || (self.accumulated.count - processedBytes) >= self.blockSize { - self.process(block: chunk.toUInt64Array().slice, currentHash: &self.accumulatedHash) - processedBytes += chunk.count - } - } - self.accumulated.removeFirst(processedBytes) - - // TODO: verify performance, reduce vs for..in - let result = self.accumulatedHash.reduce(Array()) { (result, value) -> Array in - result + value.bigEndian.bytes() - } - - // reset hash value for instance - if isLast { - self.accumulatedHash = Array(repeating: 0, count: self.digestLength) - } - - return Array(result[0.. -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -// -// https://tools.ietf.org/html/rfc7914 -// - -/// Implementation of the scrypt key derivation function. -public final class Scrypt { - enum Error: Swift.Error { - case nIsTooLarge - case rIsTooLarge - case nMustBeAPowerOf2GreaterThan1 - case invalidInput - } - - /// Configuration parameters. - private let salt: SecureBytes - private let password: SecureBytes - private let blocksize: Int // 128 * r - private let salsaBlock = UnsafeMutableRawPointer.allocate(byteCount: 64, alignment: 64) - private let dkLen: Int - private let N: Int - private let r: Int - private let p: Int - - /// - parameters: - /// - password: password - /// - salt: salt - /// - dkLen: output length - /// - N: determines extra memory used - /// - r: determines a block size - /// - p: determines parallelicity degree - public init(password: Array, salt: Array, dkLen: Int, N: Int, r: Int, p: Int) throws { - precondition(dkLen > 0) - precondition(N > 0) - precondition(r > 0) - precondition(p > 0) - - guard !(N < 2 || (N & (N - 1)) != 0) else { throw Error.nMustBeAPowerOf2GreaterThan1 } - - guard N <= .max / 128 / r else { throw Error.nIsTooLarge } - guard r <= .max / 128 / p else { throw Error.rIsTooLarge } - - guard !salt.isEmpty else { - throw Error.invalidInput - } - - self.blocksize = 128 * r - self.N = N - self.r = r - self.p = p - self.password = SecureBytes(bytes: password) - self.salt = SecureBytes(bytes: salt) - self.dkLen = dkLen - } - - /// Runs the key derivation function with a specific password. - public func calculate() throws -> [UInt8] { - // Allocate memory (as bytes for now) for further use in mixing steps - let B = UnsafeMutableRawPointer.allocate(byteCount: 128 * self.r * self.p, alignment: 64) - let XY = UnsafeMutableRawPointer.allocate(byteCount: 256 * self.r + 64, alignment: 64) - let V = UnsafeMutableRawPointer.allocate(byteCount: 128 * self.r * self.N, alignment: 64) - - // Deallocate memory when done - defer { - B.deallocate() - XY.deallocate() - V.deallocate() - } - - /* 1: (B_0 ... B_{p-1}) <-- PBKDF2(P, S, 1, p * MFLen) */ - // Expand the initial key - let barray = try PKCS5.PBKDF2(password: Array(self.password), salt: Array(self.salt), iterations: 1, keyLength: self.p * 128 * self.r, variant: .sha256).calculate() - barray.withUnsafeBytes { p in - B.copyMemory(from: p.baseAddress!, byteCount: barray.count) - } - - /* 2: for i = 0 to p - 1 do */ - // do the mixing - for i in 0 ..< self.p { - /* 3: B_i <-- MF(B_i, N) */ - smix(B + i * 128 * self.r, V.assumingMemoryBound(to: UInt32.self), XY.assumingMemoryBound(to: UInt32.self)) - } - - /* 5: DK <-- PBKDF2(P, B, 1, dkLen) */ - let pointer = B.assumingMemoryBound(to: UInt8.self) - let bufferPointer = UnsafeBufferPointer(start: pointer, count: p * 128 * self.r) - let block = [UInt8](bufferPointer) - return try PKCS5.PBKDF2(password: Array(self.password), salt: block, iterations: 1, keyLength: self.dkLen, variant: .sha256).calculate() - } -} - -private extension Scrypt { - /// Computes `B = SMix_r(B, N)`. - /// - /// The input `block` must be `128*r` bytes in length; the temporary storage `v` must be `128*r*n` bytes in length; - /// the temporary storage `xy` must be `256*r + 64` bytes in length. The arrays `block`, `v`, and `xy` must be - /// aligned to a multiple of 64 bytes. - @inline(__always) func smix(_ block: UnsafeMutableRawPointer, _ v: UnsafeMutablePointer, _ xy: UnsafeMutablePointer) { - let X = xy - let Y = xy + 32 * self.r - let Z = xy + 64 * self.r - - /* 1: X <-- B */ - let typedBlock = block.assumingMemoryBound(to: UInt32.self) - X.assign(from: typedBlock, count: 32 * self.r) - - /* 2: for i = 0 to N - 1 do */ - for i in stride(from: 0, to: self.N, by: 2) { - /* 3: V_i <-- X */ - UnsafeMutableRawPointer(v + i * (32 * self.r)).copyMemory(from: X, byteCount: 128 * self.r) - - /* 4: X <-- H(X) */ - self.blockMixSalsa8(X, Y, Z) - - /* 3: V_i <-- X */ - UnsafeMutableRawPointer(v + (i + 1) * (32 * self.r)).copyMemory(from: Y, byteCount: 128 * self.r) - - /* 4: X <-- H(X) */ - self.blockMixSalsa8(Y, X, Z) - } - - /* 6: for i = 0 to N - 1 do */ - for _ in stride(from: 0, to: self.N, by: 2) { - /* - 7: j <-- Integerify (X) mod N - where Integerify (B[0] ... B[2 * r - 1]) is defined - as the result of interpreting B[2 * r - 1] as a little-endian integer. - */ - var j = Int(integerify(X) & UInt64(self.N - 1)) - - /* 8: X <-- H(X \xor V_j) */ - self.blockXor(X, v + j * 32 * self.r, 128 * self.r) - self.blockMixSalsa8(X, Y, Z) - - /* 7: j <-- Integerify(X) mod N */ - j = Int(self.integerify(Y) & UInt64(self.N - 1)) - - /* 8: X <-- H(X \xor V_j) */ - self.blockXor(Y, v + j * 32 * self.r, 128 * self.r) - self.blockMixSalsa8(Y, X, Z) - } - - /* 10: B' <-- X */ - for k in 0 ..< 32 * self.r { - UnsafeMutableRawPointer(block + 4 * k).storeBytes(of: X[k], as: UInt32.self) - } - } - - /// Returns the result of parsing `B_{2r-1}` as a little-endian integer. - @inline(__always) func integerify(_ block: UnsafeRawPointer) -> UInt64 { - let bi = block + (2 * self.r - 1) * 64 - return bi.load(as: UInt64.self).littleEndian - } - - /// Compute `bout = BlockMix_{salsa20/8, r}(bin)`. - /// - /// The input `bin` must be `128*r` bytes in length; the output `bout` must also be the same size. The temporary - /// space `x` must be 64 bytes. - @inline(__always) func blockMixSalsa8(_ bin: UnsafePointer, _ bout: UnsafeMutablePointer, _ x: UnsafeMutablePointer) { - /* 1: X <-- B_{2r - 1} */ - UnsafeMutableRawPointer(x).copyMemory(from: bin + (2 * self.r - 1) * 16, byteCount: 64) - - /* 2: for i = 0 to 2r - 1 do */ - for i in stride(from: 0, to: 2 * self.r, by: 2) { - /* 3: X <-- H(X \xor B_i) */ - self.blockXor(x, bin + i * 16, 64) - self.salsa20_8_typed(x) - - /* 4: Y_i <-- X */ - /* 6: B' <-- (Y_0, Y_2 ... Y_{2r-2}, Y_1, Y_3 ... Y_{2r-1}) */ - UnsafeMutableRawPointer(bout + i * 8).copyMemory(from: x, byteCount: 64) - - /* 3: X <-- H(X \xor B_i) */ - self.blockXor(x, bin + i * 16 + 16, 64) - self.salsa20_8_typed(x) - - /* 4: Y_i <-- X */ - /* 6: B' <-- (Y_0, Y_2 ... Y_{2r-2}, Y_1, Y_3 ... Y_{2r-1}) */ - UnsafeMutableRawPointer(bout + i * 8 + self.r * 16).copyMemory(from: x, byteCount: 64) - } - } - - @inline(__always) func salsa20_8_typed(_ block: UnsafeMutablePointer) { - self.salsaBlock.copyMemory(from: UnsafeRawPointer(block), byteCount: 64) - let salsaBlockTyped = self.salsaBlock.assumingMemoryBound(to: UInt32.self) - - for _ in stride(from: 0, to: 8, by: 2) { - salsaBlockTyped[4] ^= rotateLeft(salsaBlockTyped[0] &+ salsaBlockTyped[12], by: 7) - salsaBlockTyped[8] ^= rotateLeft(salsaBlockTyped[4] &+ salsaBlockTyped[0], by: 9) - salsaBlockTyped[12] ^= rotateLeft(salsaBlockTyped[8] &+ salsaBlockTyped[4], by: 13) - salsaBlockTyped[0] ^= rotateLeft(salsaBlockTyped[12] &+ salsaBlockTyped[8], by: 18) - - salsaBlockTyped[9] ^= rotateLeft(salsaBlockTyped[5] &+ salsaBlockTyped[1], by: 7) - salsaBlockTyped[13] ^= rotateLeft(salsaBlockTyped[9] &+ salsaBlockTyped[5], by: 9) - salsaBlockTyped[1] ^= rotateLeft(salsaBlockTyped[13] &+ salsaBlockTyped[9], by: 13) - salsaBlockTyped[5] ^= rotateLeft(salsaBlockTyped[1] &+ salsaBlockTyped[13], by: 18) - - salsaBlockTyped[14] ^= rotateLeft(salsaBlockTyped[10] &+ salsaBlockTyped[6], by: 7) - salsaBlockTyped[2] ^= rotateLeft(salsaBlockTyped[14] &+ salsaBlockTyped[10], by: 9) - salsaBlockTyped[6] ^= rotateLeft(salsaBlockTyped[2] &+ salsaBlockTyped[14], by: 13) - salsaBlockTyped[10] ^= rotateLeft(salsaBlockTyped[6] &+ salsaBlockTyped[2], by: 18) - - salsaBlockTyped[3] ^= rotateLeft(salsaBlockTyped[15] &+ salsaBlockTyped[11], by: 7) - salsaBlockTyped[7] ^= rotateLeft(salsaBlockTyped[3] &+ salsaBlockTyped[15], by: 9) - salsaBlockTyped[11] ^= rotateLeft(salsaBlockTyped[7] &+ salsaBlockTyped[3], by: 13) - salsaBlockTyped[15] ^= rotateLeft(salsaBlockTyped[11] &+ salsaBlockTyped[7], by: 18) - - salsaBlockTyped[1] ^= rotateLeft(salsaBlockTyped[0] &+ salsaBlockTyped[3], by: 7) - salsaBlockTyped[2] ^= rotateLeft(salsaBlockTyped[1] &+ salsaBlockTyped[0], by: 9) - salsaBlockTyped[3] ^= rotateLeft(salsaBlockTyped[2] &+ salsaBlockTyped[1], by: 13) - salsaBlockTyped[0] ^= rotateLeft(salsaBlockTyped[3] &+ salsaBlockTyped[2], by: 18) - - salsaBlockTyped[6] ^= rotateLeft(salsaBlockTyped[5] &+ salsaBlockTyped[4], by: 7) - salsaBlockTyped[7] ^= rotateLeft(salsaBlockTyped[6] &+ salsaBlockTyped[5], by: 9) - salsaBlockTyped[4] ^= rotateLeft(salsaBlockTyped[7] &+ salsaBlockTyped[6], by: 13) - salsaBlockTyped[5] ^= rotateLeft(salsaBlockTyped[4] &+ salsaBlockTyped[7], by: 18) - - salsaBlockTyped[11] ^= rotateLeft(salsaBlockTyped[10] &+ salsaBlockTyped[9], by: 7) - salsaBlockTyped[8] ^= rotateLeft(salsaBlockTyped[11] &+ salsaBlockTyped[10], by: 9) - salsaBlockTyped[9] ^= rotateLeft(salsaBlockTyped[8] &+ salsaBlockTyped[11], by: 13) - salsaBlockTyped[10] ^= rotateLeft(salsaBlockTyped[9] &+ salsaBlockTyped[8], by: 18) - - salsaBlockTyped[12] ^= rotateLeft(salsaBlockTyped[15] &+ salsaBlockTyped[14], by: 7) - salsaBlockTyped[13] ^= rotateLeft(salsaBlockTyped[12] &+ salsaBlockTyped[15], by: 9) - salsaBlockTyped[14] ^= rotateLeft(salsaBlockTyped[13] &+ salsaBlockTyped[12], by: 13) - salsaBlockTyped[15] ^= rotateLeft(salsaBlockTyped[14] &+ salsaBlockTyped[13], by: 18) - } - for i in 0 ..< 16 { - block[i] = block[i] &+ salsaBlockTyped[i] - } - } - - @inline(__always) func blockXor(_ dest: UnsafeMutableRawPointer, _ src: UnsafeRawPointer, _ len: Int) { - let D = dest.assumingMemoryBound(to: UInt64.self) - let S = src.assumingMemoryBound(to: UInt64.self) - let L = len / MemoryLayout.size - - for i in 0 ..< L { - D[i] ^= S[i] - } - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/SecureBytes.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/SecureBytes.swift deleted file mode 100644 index 849400a..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/SecureBytes.swift +++ /dev/null @@ -1,77 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -#if canImport(Darwin) - import Darwin -#else - import Glibc -#endif - -typealias Key = SecureBytes - -/// Keeps bytes in memory. Because this is class, bytes are not copied -/// and memory area is locked as long as referenced, then unlocked on deinit -final class SecureBytes { - private let bytes: Array - let count: Int - - init(bytes: Array) { - self.bytes = bytes - self.count = bytes.count - self.bytes.withUnsafeBufferPointer { (pointer) -> Void in - mlock(pointer.baseAddress, pointer.count) - } - } - - deinit { - self.bytes.withUnsafeBufferPointer { (pointer) -> Void in - munlock(pointer.baseAddress, pointer.count) - } - } -} - -extension SecureBytes: Collection { - typealias Index = Int - - var endIndex: Int { - self.bytes.endIndex - } - - var startIndex: Int { - self.bytes.startIndex - } - - subscript(position: Index) -> UInt8 { - self.bytes[position] - } - - subscript(bounds: Range) -> ArraySlice { - self.bytes[bounds] - } - - func formIndex(after i: inout Int) { - self.bytes.formIndex(after: &i) - } - - func index(after i: Int) -> Int { - self.bytes.index(after: i) - } -} - -extension SecureBytes: ExpressibleByArrayLiteral { - public convenience init(arrayLiteral elements: UInt8...) { - self.init(bytes: elements) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift deleted file mode 100644 index 670ff99..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/StreamDecryptor.swift +++ /dev/null @@ -1,79 +0,0 @@ -// CryptoSwift -// -// Copyright (C) 2014-2018 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -final class StreamDecryptor: Cryptor, Updatable { - private let blockSize: Int - private var worker: CipherModeWorker - private let padding: Padding - private var accumulated = Array() - - private var lastBlockRemainder = 0 - - init(blockSize: Int, padding: Padding, _ worker: CipherModeWorker) throws { - self.blockSize = blockSize - self.padding = padding - self.worker = worker - } - - // MARK: Updatable - - public func update(withBytes bytes: ArraySlice, isLast: Bool) throws -> Array { - self.accumulated += bytes - - let toProcess = self.accumulated.prefix(max(self.accumulated.count - self.worker.additionalBufferSize, 0)) - - if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true { - // will truncate suffix if needed - try finalizingWorker.willDecryptLast(bytes: self.accumulated.slice) - } - - var processedBytesCount = 0 - var plaintext = Array(reserveCapacity: bytes.count + self.worker.additionalBufferSize) - for chunk in toProcess.batched(by: self.blockSize) { - plaintext += self.worker.decrypt(block: chunk) - processedBytesCount += chunk.count - } - - if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true { - plaintext = Array(try finalizingWorker.didDecryptLast(bytes: plaintext.slice)) - } - - // omit unecessary calculation if not needed - if self.padding != .noPadding { - self.lastBlockRemainder = plaintext.count.quotientAndRemainder(dividingBy: self.blockSize).remainder - } - - if isLast { - // CTR doesn't need padding. Really. Add padding to the last block if really want. but... don't. - plaintext = self.padding.remove(from: plaintext, blockSize: self.blockSize - self.lastBlockRemainder) - } - - self.accumulated.removeFirst(processedBytesCount) // super-slow - - if var finalizingWorker = worker as? FinalizingDecryptModeWorker, isLast == true { - plaintext = Array(try finalizingWorker.finalize(decrypt: plaintext.slice)) - } - - return plaintext - } - - public func seek(to position: Int) throws { - guard var worker = self.worker as? SeekableModeWorker else { - fatalError("Not supported") - } - - try worker.seek(to: position) - self.worker = worker - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift deleted file mode 100644 index 50d4106..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/StreamEncryptor.swift +++ /dev/null @@ -1,57 +0,0 @@ -// CryptoSwift -// -// Copyright (C) 2014-2018 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -final class StreamEncryptor: Cryptor, Updatable { - private let blockSize: Int - private var worker: CipherModeWorker - private let padding: Padding - - private var lastBlockRemainder = 0 - - init(blockSize: Int, padding: Padding, _ worker: CipherModeWorker) throws { - self.blockSize = blockSize - self.padding = padding - self.worker = worker - } - - // MARK: Updatable - - public func update(withBytes bytes: ArraySlice, isLast: Bool) throws -> Array { - var accumulated = Array(bytes) - if isLast { - // CTR doesn't need padding. Really. Add padding to the last block if really want. but... don't. - accumulated = self.padding.add(to: accumulated, blockSize: self.blockSize - self.lastBlockRemainder) - } - - var encrypted = Array(reserveCapacity: bytes.count) - for chunk in accumulated.batched(by: self.blockSize) { - encrypted += self.worker.encrypt(block: chunk) - } - - // omit unecessary calculation if not needed - if self.padding != .noPadding { - self.lastBlockRemainder = encrypted.count.quotientAndRemainder(dividingBy: self.blockSize).remainder - } - - if var finalizingWorker = worker as? FinalizingEncryptModeWorker, isLast == true { - encrypted = Array(try finalizingWorker.finalize(encrypt: encrypted.slice)) - } - - return encrypted - } - - func seek(to: Int) throws { - fatalError("Not supported") - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/String+Extension.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/String+Extension.swift deleted file mode 100644 index 49cff61..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/String+Extension.swift +++ /dev/null @@ -1,81 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/** String extension */ -extension String { - public var bytes: Array { - data(using: String.Encoding.utf8, allowLossyConversion: true)?.bytes ?? Array(utf8) - } - - public func md5() -> String { - self.bytes.md5().toHexString() - } - - public func sha1() -> String { - self.bytes.sha1().toHexString() - } - - public func sha224() -> String { - self.bytes.sha224().toHexString() - } - - public func sha256() -> String { - self.bytes.sha256().toHexString() - } - - public func sha384() -> String { - self.bytes.sha384().toHexString() - } - - public func sha512() -> String { - self.bytes.sha512().toHexString() - } - - public func sha3(_ variant: SHA3.Variant) -> String { - self.bytes.sha3(variant).toHexString() - } - - public func crc32(seed: UInt32? = nil, reflect: Bool = true) -> String { - self.bytes.crc32(seed: seed, reflect: reflect).bytes().toHexString() - } - - public func crc32c(seed: UInt32? = nil, reflect: Bool = true) -> String { - self.bytes.crc32c(seed: seed, reflect: reflect).bytes().toHexString() - } - - public func crc16(seed: UInt16? = nil) -> String { - self.bytes.crc16(seed: seed).bytes().toHexString() - } - - /// - parameter cipher: Instance of `Cipher` - /// - returns: hex string of bytes - public func encrypt(cipher: Cipher) throws -> String { - try self.bytes.encrypt(cipher: cipher).toHexString() - } - - /// - parameter cipher: Instance of `Cipher` - /// - returns: base64 encoded string of encrypted bytes - public func encryptToBase64(cipher: Cipher) throws -> String? { - try self.bytes.encrypt(cipher: cipher).toBase64() - } - - // decrypt() does not make sense for String - - /// - parameter authenticator: Instance of `Authenticator` - /// - returns: hex string of string - public func authenticate(with authenticator: A) throws -> String { - try self.bytes.authenticate(with: authenticator).toHexString() - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt128.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt128.swift deleted file mode 100644 index 8e3c246..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt128.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// UInt128.swift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -import Foundation - -struct UInt128: Equatable, ExpressibleByIntegerLiteral { - let i: (a: UInt64, b: UInt64) - - typealias IntegerLiteralType = UInt64 - - init(integerLiteral value: IntegerLiteralType) { - self = UInt128(value) - } - - init(_ raw: Array) { - self = raw.prefix(MemoryLayout.stride).withUnsafeBytes({ (rawBufferPointer) -> UInt128 in - let arr = rawBufferPointer.bindMemory(to: UInt64.self) - return UInt128((arr[0].bigEndian, arr[1].bigEndian)) - }) - } - - init(_ raw: ArraySlice) { - self.init(Array(raw)) - } - - init(_ i: (a: UInt64, b: UInt64)) { - self.i = i - } - - init(a: UInt64, b: UInt64) { - self.init((a, b)) - } - - init(_ b: UInt64) { - self.init((0, b)) - } - - // Bytes - var bytes: Array { - var at = self.i.a.bigEndian - var bt = self.i.b.bigEndian - - let ar = Data(bytes: &at, count: MemoryLayout.size(ofValue: at)) - let br = Data(bytes: &bt, count: MemoryLayout.size(ofValue: bt)) - - var result = Data() - result.append(ar) - result.append(br) - return result.bytes - } - - static func ^ (n1: UInt128, n2: UInt128) -> UInt128 { - UInt128((n1.i.a ^ n2.i.a, n1.i.b ^ n2.i.b)) - } - - static func & (n1: UInt128, n2: UInt128) -> UInt128 { - UInt128((n1.i.a & n2.i.a, n1.i.b & n2.i.b)) - } - - static func >> (value: UInt128, by: Int) -> UInt128 { - var result = value - for _ in 0..> 1 - let b = result.i.b >> 1 + ((result.i.a & 1) << 63) - result = UInt128((a, b)) - } - return result - } - - // Equatable. - static func == (lhs: UInt128, rhs: UInt128) -> Bool { - lhs.i == rhs.i - } - - static func != (lhs: UInt128, rhs: UInt128) -> Bool { - !(lhs == rhs) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt16+Extension.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt16+Extension.swift deleted file mode 100644 index 7a097ca..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt16+Extension.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/** array of bytes */ -extension UInt16 { - @_specialize(exported: true, where T == ArraySlice) - init(bytes: T) where T.Element == UInt8, T.Index == Int { - self = UInt16(bytes: bytes, fromIndex: bytes.startIndex) - } - - @_specialize(exported: true, where T == ArraySlice) - init(bytes: T, fromIndex index: T.Index) where T.Element == UInt8, T.Index == Int { - if bytes.isEmpty { - self = 0 - return - } - - let count = bytes.count - - let val0 = count > 0 ? UInt16(bytes[index.advanced(by: 0)]) << 8 : 0 - let val1 = count > 1 ? UInt16(bytes[index.advanced(by: 1)]) : 0 - - self = val0 | val1 - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt32+Extension.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt32+Extension.swift deleted file mode 100644 index b0c5fa5..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt32+Extension.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -#if canImport(Darwin) - import Darwin -#else - import Glibc -#endif - -protocol _UInt32Type {} -extension UInt32: _UInt32Type {} - -/** array of bytes */ -extension UInt32 { - @_specialize(exported: true, where T == ArraySlice) - init(bytes: T) where T.Element == UInt8, T.Index == Int { - self = UInt32(bytes: bytes, fromIndex: bytes.startIndex) - } - - @_specialize(exported: true, where T == ArraySlice) - init(bytes: T, fromIndex index: T.Index) where T.Element == UInt8, T.Index == Int { - if bytes.isEmpty { - self = 0 - return - } - - let count = bytes.count - - let val0 = count > 0 ? UInt32(bytes[index.advanced(by: 0)]) << 24 : 0 - let val1 = count > 1 ? UInt32(bytes[index.advanced(by: 1)]) << 16 : 0 - let val2 = count > 2 ? UInt32(bytes[index.advanced(by: 2)]) << 8 : 0 - let val3 = count > 3 ? UInt32(bytes[index.advanced(by: 3)]) : 0 - - self = val0 | val1 | val2 | val3 - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt64+Extension.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt64+Extension.swift deleted file mode 100644 index 46a9b73..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt64+Extension.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/** array of bytes */ -extension UInt64 { - @_specialize(exported: true, where T == ArraySlice) - init(bytes: T) where T.Element == UInt8, T.Index == Int { - self = UInt64(bytes: bytes, fromIndex: bytes.startIndex) - } - - @_specialize(exported: true, where T == ArraySlice) - init(bytes: T, fromIndex index: T.Index) where T.Element == UInt8, T.Index == Int { - if bytes.isEmpty { - self = 0 - return - } - - let count = bytes.count - - let val0 = count > 0 ? UInt64(bytes[index.advanced(by: 0)]) << 56 : 0 - let val1 = count > 1 ? UInt64(bytes[index.advanced(by: 1)]) << 48 : 0 - let val2 = count > 2 ? UInt64(bytes[index.advanced(by: 2)]) << 40 : 0 - let val3 = count > 3 ? UInt64(bytes[index.advanced(by: 3)]) << 32 : 0 - let val4 = count > 4 ? UInt64(bytes[index.advanced(by: 4)]) << 24 : 0 - let val5 = count > 5 ? UInt64(bytes[index.advanced(by: 5)]) << 16 : 0 - let val6 = count > 6 ? UInt64(bytes[index.advanced(by: 6)]) << 8 : 0 - let val7 = count > 7 ? UInt64(bytes[index.advanced(by: 7)]) : 0 - - self = val0 | val1 | val2 | val3 | val4 | val5 | val6 | val7 - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt8+Extension.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt8+Extension.swift deleted file mode 100644 index b4de65d..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/UInt8+Extension.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -#if canImport(Darwin) - import Darwin -#else - import Glibc -#endif - -public protocol _UInt8Type {} -extension UInt8: _UInt8Type {} - -/** casting */ -extension UInt8 { - /** cast because UInt8() because std initializer crash if value is > byte */ - static func with(value: UInt64) -> UInt8 { - let tmp = value & 0xff - return UInt8(tmp) - } - - static func with(value: UInt32) -> UInt8 { - let tmp = value & 0xff - return UInt8(tmp) - } - - static func with(value: UInt16) -> UInt8 { - let tmp = value & 0xff - return UInt8(tmp) - } -} - -/** Bits */ -extension UInt8 { - /** array of bits */ - public func bits() -> [Bit] { - let totalBitsCount = MemoryLayout.size * 8 - - var bitsArray = [Bit](repeating: Bit.zero, count: totalBitsCount) - - for j in 0.. String { - var s = String() - let arr: [Bit] = self.bits() - for idx in arr.indices { - s += (arr[idx] == Bit.one ? "1" : "0") - if idx.advanced(by: 1) % 8 == 0 { s += " " } - } - return s - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Updatable.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Updatable.swift deleted file mode 100644 index 8d0b95f..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Updatable.swift +++ /dev/null @@ -1,97 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/// A type that supports incremental updates. For example Digest or Cipher may be updatable -/// and calculate result incerementally. -public protocol Updatable { - /// Update given bytes in chunks. - /// - /// - parameter bytes: Bytes to process. - /// - parameter isLast: Indicate if given chunk is the last one. No more updates after this call. - /// - returns: Processed partial result data or empty array. - mutating func update(withBytes bytes: ArraySlice, isLast: Bool) throws -> Array - - /// Update given bytes in chunks. - /// - /// - Parameters: - /// - bytes: Bytes to process. - /// - isLast: Indicate if given chunk is the last one. No more updates after this call. - /// - output: Resulting bytes callback. - /// - Returns: Processed partial result data or empty array. - mutating func update(withBytes bytes: ArraySlice, isLast: Bool, output: (_ bytes: Array) -> Void) throws -} - -extension Updatable { - public mutating func update(withBytes bytes: ArraySlice, isLast: Bool = false, output: (_ bytes: Array) -> Void) throws { - let processed = try update(withBytes: bytes, isLast: isLast) - if !processed.isEmpty { - output(processed) - } - } - - public mutating func update(withBytes bytes: ArraySlice, isLast: Bool = false) throws -> Array { - try self.update(withBytes: bytes, isLast: isLast) - } - - public mutating func update(withBytes bytes: Array, isLast: Bool = false) throws -> Array { - try self.update(withBytes: bytes.slice, isLast: isLast) - } - - public mutating func update(withBytes bytes: Array, isLast: Bool = false, output: (_ bytes: Array) -> Void) throws { - try self.update(withBytes: bytes.slice, isLast: isLast, output: output) - } - - /// Finish updates. This may apply padding. - /// - parameter bytes: Bytes to process - /// - returns: Processed data. - public mutating func finish(withBytes bytes: ArraySlice) throws -> Array { - try self.update(withBytes: bytes, isLast: true) - } - - public mutating func finish(withBytes bytes: Array) throws -> Array { - try self.finish(withBytes: bytes.slice) - } - - /// Finish updates. May add padding. - /// - /// - Returns: Processed data - /// - Throws: Error - public mutating func finish() throws -> Array { - try self.update(withBytes: [], isLast: true) - } - - /// Finish updates. This may apply padding. - /// - parameter bytes: Bytes to process - /// - parameter output: Resulting data - /// - returns: Processed data. - public mutating func finish(withBytes bytes: ArraySlice, output: (_ bytes: Array) -> Void) throws { - let processed = try update(withBytes: bytes, isLast: true) - if !processed.isEmpty { - output(processed) - } - } - - public mutating func finish(withBytes bytes: Array, output: (_ bytes: Array) -> Void) throws { - try self.finish(withBytes: bytes.slice, output: output) - } - - /// Finish updates. May add padding. - /// - /// - Parameter output: Processed data - /// - Throws: Error - public mutating func finish(output: (Array) -> Void) throws { - try self.finish(withBytes: [], output: output) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Utils.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/Utils.swift deleted file mode 100644 index b2a658b..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/Utils.swift +++ /dev/null @@ -1,115 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -@_transparent -func rotateLeft(_ value: UInt8, by: UInt8) -> UInt8 { - ((value << by) & 0xff) | (value >> (8 - by)) -} - -@_transparent -func rotateLeft(_ value: UInt16, by: UInt16) -> UInt16 { - ((value << by) & 0xffff) | (value >> (16 - by)) -} - -@_transparent -func rotateLeft(_ value: UInt32, by: UInt32) -> UInt32 { - ((value << by) & 0xffffffff) | (value >> (32 - by)) -} - -@_transparent -func rotateLeft(_ value: UInt64, by: UInt64) -> UInt64 { - (value << by) | (value >> (64 - by)) -} - -@_transparent -func rotateRight(_ value: UInt16, by: UInt16) -> UInt16 { - (value >> by) | (value << (16 - by)) -} - -@_transparent -func rotateRight(_ value: UInt32, by: UInt32) -> UInt32 { - (value >> by) | (value << (32 - by)) -} - -@_transparent -func rotateRight(_ value: UInt64, by: UInt64) -> UInt64 { - ((value >> by) | (value << (64 - by))) -} - -@_transparent -func reversed(_ uint8: UInt8) -> UInt8 { - var v = uint8 - v = (v & 0xf0) >> 4 | (v & 0x0f) << 4 - v = (v & 0xcc) >> 2 | (v & 0x33) << 2 - v = (v & 0xaa) >> 1 | (v & 0x55) << 1 - return v -} - -@_transparent -func reversed(_ uint32: UInt32) -> UInt32 { - var v = uint32 - v = ((v >> 1) & 0x55555555) | ((v & 0x55555555) << 1) - v = ((v >> 2) & 0x33333333) | ((v & 0x33333333) << 2) - v = ((v >> 4) & 0x0f0f0f0f) | ((v & 0x0f0f0f0f) << 4) - v = ((v >> 8) & 0x00ff00ff) | ((v & 0x00ff00ff) << 8) - v = ((v >> 16) & 0xffff) | ((v & 0xffff) << 16) - return v -} - -func xor(_ left: T, _ right: V) -> ArraySlice where T: RandomAccessCollection, V: RandomAccessCollection, T.Element == UInt8, T.Index == Int, V.Element == UInt8, V.Index == Int { - return xor(left, right).slice -} - -func xor(_ left: T, _ right: V) -> Array where T: RandomAccessCollection, V: RandomAccessCollection, T.Element == UInt8, T.Index == Int, V.Element == UInt8, V.Index == Int { - let length = Swift.min(left.count, right.count) - - let buf = UnsafeMutablePointer.allocate(capacity: length) - buf.initialize(repeating: 0, count: length) - defer { - buf.deinitialize(count: length) - buf.deallocate() - } - - // xor - for i in 0.., blockSize: Int, allowance: Int = 0) { - let msgLength = data.count - // Step 1. Append Padding Bits - // append one bit (UInt8 with one bit) to message - data.append(0x80) - - // Step 2. append "0" bit until message length in bits ≡ 448 (mod 512) - let max = blockSize - allowance // 448, 986 - if msgLength % blockSize < max { // 448 - data += Array(repeating: 0, count: max - 1 - (msgLength % blockSize)) - } else { - data += Array(repeating: 0, count: blockSize + max - 1 - (msgLength % blockSize)) - } -} diff --git a/Example/Pods/CryptoSwift/Sources/CryptoSwift/ZeroPadding.swift b/Example/Pods/CryptoSwift/Sources/CryptoSwift/ZeroPadding.swift deleted file mode 100644 index dbe7e36..0000000 --- a/Example/Pods/CryptoSwift/Sources/CryptoSwift/ZeroPadding.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// CryptoSwift -// -// Copyright (C) 2014-2017 Marcin Krzyżanowski -// This software is provided 'as-is', without any express or implied warranty. -// -// In no event will the authors be held liable for any damages arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -// -// - The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -// - Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -// - This notice may not be removed or altered from any source or binary distribution. -// - -/// All the bytes that are required to be padded are padded with zero. -/// Zero padding may not be reversible if the original file ends with one or more zero bytes. -struct ZeroPadding: PaddingProtocol { - init() { - } - - func add(to bytes: Array, blockSize: Int) -> Array { - let paddingCount = blockSize - (bytes.count % blockSize) - if paddingCount > 0 { - return bytes + Array(repeating: 0, count: paddingCount) - } - return bytes - } - - func remove(from bytes: Array, blockSize _: Int?) -> Array { - for (idx, value) in bytes.reversed().enumerated() { - if value != 0 { - return Array(bytes[0..>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 "summary": "A swift network library based on Moya/RxSwift.", "homepage": "https://github.com/Pircate/RxNetwork", "license": { @@ -16,11 +12,7 @@ }, "source": { "git": "https://github.com/Pircate/RxNetwork.git", -<<<<<<< HEAD "tag": "1.0.2" -======= - "tag": "1.0.1-beta" ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 }, "platforms": { "ios": "10.0" diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index cf28089..50b0dbd 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,31 +1,17 @@ PODS: -<<<<<<< HEAD - Alamofire (5.1.0) - CleanJSON (1.0.1) -======= - - Alamofire (5.0.2) - - CleanJSON (1.0.0) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 - Moya/Core (14.0.0): - Alamofire (~> 5.0) - Moya/RxSwift (14.0.0): - Moya/Core - RxSwift (~> 5.0) -<<<<<<< HEAD - RxNetwork/Cacheable (1.0.2): - RxNetwork/Core - Storable - RxNetwork/Core (1.0.2): - Moya/RxSwift - RxSwift (5.1.1) -======= - - RxNetwork/Cacheable (1.0.1-beta): - - RxNetwork/Core - - Storable - - RxNetwork/Core (1.0.1-beta): - - Moya/RxSwift - - RxSwift (5.1.0) ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 - Storable (0.1.1) - SwiftyJSON (5.0.0) @@ -48,28 +34,14 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: -<<<<<<< HEAD Alamofire: 9d5c5f602928e512395b30950c5984eca840093c CleanJSON: 6fd9a37e489a673adf9c8ebd7b67aff21a582163 Moya: 5b45dacb75adb009f97fde91c204c1e565d31916 RxNetwork: b14e08b1ed874a0379496065be43ef0ee1ac0adb RxSwift: 81470a2074fa8780320ea5fe4102807cb7118178 -======= - Alamofire: 3ba7a4db18b4f62c4a1c0e1cb39d7f3d52e10ada - CleanJSON: 702dd619e1329c6399a579aa19af311acf47e461 - Moya: 5b45dacb75adb009f97fde91c204c1e565d31916 - RxNetwork: 35dde92da369c66de7388fd20d890af62d88a3c0 - RxSwift: ad5874f24bb0dbffd1e9bb8443604e3578796c7a ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 Storable: 31d19a4f897d68d1f1843604b60e12e5c2e1db5f SwiftyJSON: 36413e04c44ee145039d332b4f4e2d3e8d6c4db7 -<<<<<<< HEAD PODFILE CHECKSUM: edbf480731555a2abe025f46b0d227d10858fda9 COCOAPODS: 1.9.1 -======= -PODFILE CHECKSUM: 55ef45f06eb8678df19475a2299c1eb3e944f16c - -COCOAPODS: 1.8.4 ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 6c99681..7545e1a 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ -<<<<<<< HEAD 003B9FC9E937C82635CF68E9E3576B52 /* URLRequest+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 776808A3C12278EF209D0502535B1621 /* URLRequest+Alamofire.swift */; }; 00803151CAC64CD9C45B57C7790FEAEB /* Lock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335D70EDC4A1ABDF4EABA31CD318D926 /* Lock.swift */; }; 008981103BEC6FDD29E54027148CC99F /* Using.swift in Sources */ = {isa = PBXBuildFile; fileRef = 454CD17FF3DFFA8E23081DDBA2FAF4FF /* Using.swift */; }; @@ -304,285 +303,6 @@ remoteInfo = Storable; }; 444F751BEEB6333AF53CC48012B979D5 /* PBXContainerItemProxy */ = { -======= - 00803151CAC64CD9C45B57C7790FEAEB /* Lock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41639DA5B66904EF85EAC1D3F23620AB /* Lock.swift */; }; - 008981103BEC6FDD29E54027148CC99F /* Using.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E604594F8A283EF724AB6C7E234E3AB /* Using.swift */; }; - 00FA97D56201027AEB1C7692A2C3CF8B /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F01DF301043248C41FEEBBA26129AD9 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0172954B8FA28BBAE885A20F4B4F6086 /* PrimitiveSequence+Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = A77827598722441D10AE1BC0C5A4C299 /* PrimitiveSequence+Zip+arity.swift */; }; - 0419772A87B16DB7DCF405A9E77D671F /* Protector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25077B79C9C436FE785C4A0BF19EEF4D /* Protector.swift */; }; - 04BE8EBE8919925CD4718D176E2DBDFE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; - 06507A26118BA5ACFBBC8C225776920E /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F73078F039339087E1716FB993CAFB1B /* Validation.swift */; }; - 06F3C97FB13E243B9F5877F930CEE61F /* StartWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E3E0054DBA7B90B96396D8F00296894 /* StartWith.swift */; }; - 0774EC3F0D0D32595C320AA3EEEF9422 /* Moya.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 33B7AE29589319D1045D96DADFD3BF9D /* Moya.framework */; }; - 08ADE2E8C26DF86D64ECF3E6C6D326E5 /* RefCountDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0A49F1A5B59ADF706041B162AF816D7 /* RefCountDisposable.swift */; }; - 08BF2EF94647080BEC581BC3A180808A /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 759BD7C77CE118418E3D5DC79C62D998 /* Timer.swift */; }; - 091FE0A8C071E11BB7A163E196C2A8CD /* _CleanJSONDecoder+Decode.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4EC66EB8543C707E25C6CBFEAC82C66 /* _CleanJSONDecoder+Decode.swift */; }; - 0AE06C3AEA6CA45342BA703230ABD2CB /* CachedResponseHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA474362A828ED559D629690BEC1D7D2 /* CachedResponseHandler.swift */; }; - 0B015A56B2FD1136509368B58F130E16 /* Storable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD78ACBE6268C2C979C1432A7EA983DC /* Storable.swift */; }; - 0CC43FF0E31AA320ACFEB0FE6239DF34 /* ServerTrustEvaluation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07AB21035AAE78659F9A291E09E98E51 /* ServerTrustEvaluation.swift */; }; - 0CD088B2ED7E57C690F2E26C46FA4B01 /* ConcurrentDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B656E9F068A7DB6E16A700CBE785E4C /* ConcurrentDispatchQueueScheduler.swift */; }; - 0F94E975A208B026E869CBEB547C805F /* Sample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4654A2194D68676CBB504D17BF8737A9 /* Sample.swift */; }; - 0FECFBBDDCAB235CFCD505A013D2212A /* Create.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FB9ED27A6CAD7DCA1E077274C69A5DF /* Create.swift */; }; - 11B8A307A4238186C6D8E733D4A5592F /* Defaultable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F7B1A00121E15715E059B62F8B88A92 /* Defaultable.swift */; }; - 13457FE4E607509A3B9527B0711033D5 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9A9622244D8F2D115C3CE97DF746C78 /* ResponseSerialization.swift */; }; - 1349831CA5836315AB830BB7ECBF90E0 /* RxSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 590D849D15959506945ED0D2C4D34D1B /* RxSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1350E47529BAE01CD934BC54C7E2BC1D /* Queue.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDB7EE75AAD152F2CE4E40E1E7AE83ED /* Queue.swift */; }; - 14AB7976E100075ADEA0AB1DB833E72D /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBE2A7C2BD230268379B695AC99D3B22 /* ParameterEncoding.swift */; }; - 14C31B923DF8883FF2DEF69C4D9BD2CC /* Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A8DCCC33363B59747A2AD458C3DB82 /* Zip+arity.swift */; }; - 152229743D8507E6608062DD62C1B1C4 /* RxMutableBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = 814EF7F1F72C253BFB1515EAECEF2E95 /* RxMutableBox.swift */; }; - 15878745C7DA8BBD38A5059137F498B3 /* Catch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6793166E9DB973FEFDA7222B302642E6 /* Catch.swift */; }; - 17953A9CF2E354B3E69B9ABC2F367AD9 /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D9E0C0A6A2C197AD72EAEC4D668ED63 /* AFError.swift */; }; - 17DCD9BA046869E358423DE9172063BE /* Empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = D79B957550B9FE5AD4CEA67478DE1EA9 /* Empty.swift */; }; - 19D8BFDF761033E1006DF37C15556151 /* VirtualTimeConverterType.swift in Sources */ = {isa = PBXBuildFile; fileRef = B15D9B0AA6DEBE9C866AE11C773F6670 /* VirtualTimeConverterType.swift */; }; - 1AC6B0EDDF3FDACE90780C24C8C8FF8B /* Producer.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEA7FCAC74C591788EB016CD031C14BE /* Producer.swift */; }; - 1C4D7D3091D1D3E44980C2B8BAE3430B /* OnCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC2CB346ED4ADE0D3CC2B16D179BC8B1 /* OnCache.swift */; }; - 20533020B628BCC085D1E0CBC0FF8455 /* URL+Moya.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C010E1639E2F11C575C8682DF661753 /* URL+Moya.swift */; }; - 21EF9008F4B0EB4613C90119946A6551 /* CleanJSON-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 80A5D97A9C56178B66FFAD5BB7E588E5 /* CleanJSON-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2470CC04B43F5471BDC6EB0CAD4CB858 /* Throttle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D6FA31584B7AE39A70B37512ADB96FD /* Throttle.swift */; }; - 24B88C42401EBE8B694EBAEE2D4F5732 /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30166D92334237F1FE293CE8FD5100B7 /* Event.swift */; }; - 278E20871516968C78C23C333A624D67 /* PrimitiveSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E345660245FEA0A98648AF1FC293054 /* PrimitiveSequence.swift */; }; - 27D17E9A74CD7336DD27E42FE3A20048 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; - 2884BDC6DBADE015FA465D06FA6300F6 /* TargetType+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = D81A3288820421CA37D5D3C9485FF92F /* TargetType+Rx.swift */; }; - 29048A8016F048FDC01AFF2DC4590160 /* ElementAt.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1ADDAF9B2B9A758151C7EBD63DEEA55 /* ElementAt.swift */; }; - 297FA0DF3F51E22E98B2929BDEC9685D /* ObserveOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A5C140540238D70BDA4341D06774A37 /* ObserveOn.swift */; }; - 2A10EE5142EA91BB63E8BE859E34DB51 /* Multicast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8536160C31FAE2D30ABF6794C5B973ED /* Multicast.swift */; }; - 2AD7102576669EA12C91AC42C6D24391 /* ObserverBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C2909A3ECA805A0D5F7AE75282DEAA3 /* ObserverBase.swift */; }; - 2AE2ACD4E57C6FF386DEA034A78572D4 /* DecodingStrategy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03EE4BBD901BC76B6F5FB868C7CE7770 /* DecodingStrategy.swift */; }; - 2C1D0CBBA13D012D54497FC3EF998864 /* CleanJSONDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7B0120AD583D7C97127B80C5D4A3E2 /* CleanJSONDecoder.swift */; }; - 2C91CE50090EC077568B74770E7BBEB5 /* NopDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29D74079F6E0A9577781D08780825E23 /* NopDisposable.swift */; }; - 2D64BC669DA212DBF33189D9A750521A /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = D11AE67F97BE46071E584E1EFC3E8FCE /* Response.swift */; }; - 2F536C2AF3B103298C6C094BB4A7FD37 /* Moya-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 664784C9FEE826AE30A4DC20EFF9B210 /* Moya-dummy.m */; }; - 3179AB0B410C8E9745A25FBC8083CCCB /* AtomicInt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09F47E44CB91BA470DADA5AC2730DE8E /* AtomicInt.swift */; }; - 32680E541E5CFE25E71F8BC04EE7E131 /* Delay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 187D7A5430029C0FB277BDFC310256DB /* Delay.swift */; }; - 32BE7904E1C29B3CE8C38F9692B75EBC /* Task.swift in Sources */ = {isa = PBXBuildFile; fileRef = B35535633B410093C4DE5E2B6167497A /* Task.swift */; }; - 32EF9E5E1C22501EACBE8635FE3EF4B6 /* DefaultIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63B3B1C869DE4C76A671F85CD34A5DDE /* DefaultIfEmpty.swift */; }; - 32F9B7CD9DC45C9CB4A43E8B158E4571 /* Date+Dispatch.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF3FC365C1F627270E77770265AE1F56 /* Date+Dispatch.swift */; }; - 335820D980675C48363395C20E356195 /* Do.swift in Sources */ = {isa = PBXBuildFile; fileRef = 529B7340B94A264D366B96E9440E8475 /* Do.swift */; }; - 378F662369BA3F7066B48B0BB984B22B /* SchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1590E68C50A858D5BE4B5ACA8DE9054C /* SchedulerType.swift */; }; - 38CF07FCADB03926D1044B3E82BEB60D /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D121C06397586C34177246B57D7862B /* Configuration.swift */; }; - 39E6C55935090828DC10A4AB3730B0F4 /* Storable-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 41AEC6686243F9B74940C11D8EBBB004 /* Storable-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3A0E6D2E9B5A9E9C02246AF07DE26C3D /* Reduce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35374A5864D6B9380A3D4DAC9FA0E275 /* Reduce.swift */; }; - 3A21DE1AF486EA81CD8253217ED821AA /* Completable+AndThen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27657E2446314F5E883890BB9CF65A96 /* Completable+AndThen.swift */; }; - 3A5F0E498C7B6C942C4941BDEF55CA56 /* SubscribeOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB39A660E92F24F9C2E03FB9B4BD3AA5 /* SubscribeOn.swift */; }; - 3BEC690743D2820EB06FF2EEA00F3502 /* Bag+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CDDE44860C3D293EDD5864A7747678A /* Bag+Rx.swift */; }; - 3D72F53B4DEF14B79BDE94196F072F42 /* NetworkActivityPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82D5169BDC86D4E269D04AC75CFAAD0F /* NetworkActivityPlugin.swift */; }; - 3E07E92EB47EDF27A84D979A1A537983 /* Single+Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6E6A3F5A8C443707275A5FC84C7B22A /* Single+Response.swift */; }; - 3E390CC018AD3D2B762ED3ABBB498573 /* AsyncSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9559782857BA18C7FC9BE90DD3E2469 /* AsyncSubject.swift */; }; - 3E46CA06A49A6D9D81A7E7CD99A2C1B7 /* ScheduledDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30AB203E330E3E3A44A8CE7A4AD32F06 /* ScheduledDisposable.swift */; }; - 3EA7C43ED1E5E1F7E59DC01F9F749C77 /* DispatchQueue+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B67644C6D1BEEF69B034706A372D8A53 /* DispatchQueue+Extensions.swift */; }; - 3EBB3E7924CCFE938B76929457BF23CE /* CachingKey+Moya.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AE6037437F12CA130ACE6A16A2CCA06 /* CachingKey+Moya.swift */; }; - 40773A4177F3EA48FEA93AE59D902085 /* Completable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D00E8B4BC0F2F60A6A675F27507B892 /* Completable.swift */; }; - 4082513A35C682F2193D002C80F72B79 /* Result+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 928C29015E8E4204E5B8EF9C323CFD3B /* Result+Alamofire.swift */; }; - 40F77A01A12BF9CE79F984B81EEE8078 /* RecursiveScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B5972EF75857BA69BA58F8E2A532827 /* RecursiveScheduler.swift */; }; - 42CDB5C986C78BBC8E5C0185F746CABF /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3C86F875FF1D2E732185039D587877A /* SessionDelegate.swift */; }; - 43AC8C3FAEF3B679BC883CEAC6FA56A1 /* SingleAssignmentDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B12291928FC224D625B594FE39B6933 /* SingleAssignmentDisposable.swift */; }; - 43E33D6F15ED7577C87FA7A14678DFA0 /* RecursiveLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8A145F8B570979700134BC85C9CFCC6 /* RecursiveLock.swift */; }; - 44127C4B989C9CC6A90D78B66A929A5E /* AlamofireExtended.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A1ABE91FF7119B3B1F7AB7FDF7F8250 /* AlamofireExtended.swift */; }; - 448717BA20AF642E51C351751586A7A4 /* AsMaybe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B32437417BEDC48410FA3AEA83CA35D /* AsMaybe.swift */; }; - 46C6A873F48B33D0D2BAEF82CF17DFCC /* Single+Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8936BBCF5565CBC7816671C7210C68AC /* Single+Cache.swift */; }; - 4778241379F7AD9125CD395D19A0DE8B /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86FCFCF89D301ACA3B8A628FD0D516DD /* Error.swift */; }; - 47EA0AAAF20C5E782F2FC3B43BE81DB7 /* Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 979DE7C7CCEE258A1B193FEDD47412CB /* Rx.swift */; }; - 47EA2682A607B289D32F0E4C20EA7F82 /* AnonymousDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4B34E3F2CC0C765C3F50848BBC60264 /* AnonymousDisposable.swift */; }; - 485E14141484EF943B5921F0C630C4D2 /* Moya-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 00E8A7AD482299847A1C182FD859816F /* Moya-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 48D97BE7D5CAED273BD2341C239CC934 /* RequestTaskMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0957D41E176E3D2095F747B2B86AFED /* RequestTaskMap.swift */; }; - 4A58926B25B353762E5C5E9DDC3663B1 /* Moya+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 735E0B7ADF533FB03E05E8130FB6AAA7 /* Moya+Alamofire.swift */; }; - 4CBCA5A6F640E54078FD48DFADEF0EDA /* Optional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D2A95EC0ABEB068F35C91CF47819A37 /* Optional.swift */; }; - 4E32B766CA1F3578EA8181A8A0476E67 /* Sink.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAA7C3792F17D1CD754DA35C3682084D /* Sink.swift */; }; - 4FB1B6D22195C720218293530FB1EF0E /* MoyaProvider+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C31FEA0D1425EE3692D61D9C898F57A /* MoyaProvider+Rx.swift */; }; - 529E3AEB8F0B2DD19A7A94BC596A1C81 /* ScheduledItemType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A8055B366519FF126F3F9117E7B2E77 /* ScheduledItemType.swift */; }; - 53502535ECFE595AC4DE4581C0EF8D12 /* HistoricalSchedulerTimeConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EEE5BF1C3FC928D9DB3521EDDB05596 /* HistoricalSchedulerTimeConverter.swift */; }; - 53BC2F344EACCAE8F097DAA4BE505CF9 /* ToJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBC0335847C81A6593808AF6BD15072 /* ToJSON.swift */; }; - 53DF164D8ED7CE192538270A6E44BC5D /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E3ADEF449D0B103EE3402AD75506165 /* Image.swift */; }; - 56345FC0BC7C5100E9294E73C5277833 /* InvocableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = E07D41639AC9D313877456D98F696801 /* InvocableType.swift */; }; - 56EC8ED1535DAB987F3D2B71D4C05773 /* HTTPHeaders.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7272ACD0906E7715D0D18FA2B1993A8D /* HTTPHeaders.swift */; }; - 57596253F6EB4A6370FC537E6AC5E561 /* Zip+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F49890A3C735CD63BA040A631237763 /* Zip+Collection.swift */; }; - 577AA19CD0920257DDA421B3730683DA /* VirtualTimeScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82D5FB094D1408FEDECA47770AE021D3 /* VirtualTimeScheduler.swift */; }; - 593DED6A4AC89E3C71F91E6BC5504B57 /* TargetType+Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33AD91CFFC81D1D4F26F7F9F0FCDE143 /* TargetType+Cache.swift */; }; - 5C072A0C46E2772D54AD467B8F5EF61A /* ToArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FFA9A074EE3EE4EA4DA4767764A1523 /* ToArray.swift */; }; - 5C4A0685B5A201436AB52EF25829B333 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8841B738418B0C983C6F3D555E0218D6 /* MultipartFormData.swift */; }; - 5D12235D061AEE7459279AAF8C348DFE /* URLEncodedFormEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF3A342522F0BDADB8A827C7C6AC5D19 /* URLEncodedFormEncoder.swift */; }; - 5D5B8F24D36D9E60EEC85C8B9EF4D461 /* BinaryDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E39A8C986CCD91EE152B5E2A5B1E2BE /* BinaryDisposable.swift */; }; - 5D61C8ED0DDCC9F8B576B6514B19EE50 /* ParameterEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA4717A9573AC1214A24AB9C52BB3FDA /* ParameterEncoder.swift */; }; - 5DFA3686F42F894FDD03F38C1A427E35 /* AsyncLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F61709F9216696592A896A59C7F31C3 /* AsyncLock.swift */; }; - 5E626665812F7610667D81C73F448189 /* ValidationType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C7FDB881B999C5C242F511D29B2BAFA /* ValidationType.swift */; }; - 5FE5C179140E991F45B5AB363A93BCFB /* ReplaySubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16D1449ECBA8B988B81592890BE9411C /* ReplaySubject.swift */; }; - 615A811EFA4C9A0AC93CD04F30DB16D5 /* SubjectType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47F1093F951EA26C495502243242A32D /* SubjectType.swift */; }; - 648BEC3D1E2FC89ED7487960646A2672 /* Endpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 529E32B5967D7B7736D2300409987860 /* Endpoint.swift */; }; - 64D2DFDCD8B89C7A662F3CC34987AF3A /* SchedulerServices+Emulation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EA77340F3AB5CB93DD5F4124BF6DB3C /* SchedulerServices+Emulation.swift */; }; - 6573BA1CFEBECBB50E58CD4FD93F1888 /* ConnectableObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00C29BECB773B6BE1D2007D1AF32D732 /* ConnectableObservableType.swift */; }; - 657D876293D310F2A7CB0445F51E72F4 /* CurrentThreadScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5251754EFE1F1454D191CB2B0621E79E /* CurrentThreadScheduler.swift */; }; - 6671D72BE96F05F0BC070530123C1D0E /* Observable+Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BDF9D9BF1A5774EA0FF1D5147B3CAE5 /* Observable+Response.swift */; }; - 68597DD64A909411F9EEBE0DFBFEE56B /* ObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4ED0EFDDD3DA03BA614FC526956AD80B /* ObservableType.swift */; }; - 6925CCA8DE3019E3AB0DD085EC4013E2 /* SynchronizedUnsubscribeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED1BB4C46B6CF646D50FC467C24CEB8C /* SynchronizedUnsubscribeType.swift */; }; - 69ACE4EEE5A8C1C618B22CC1F7B8EF01 /* Session.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79629427571E5A4629359AEE32373EBB /* Session.swift */; }; - 69AF260DF91C151D091D13F3CD6CAAB3 /* Bag.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF7CF6117033948602F4CC5EC0CCE704 /* Bag.swift */; }; - 6A22C46CB1EDE471794D9AB2AC10327F /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC7812E51F0D5D8820B7BF23377A3EF2 /* Request.swift */; }; - 6E500E09797E690AF9AC5B9511BAC789 /* MoyaProvider+Internal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28B8D6402EC2E9A285779EA777AA383E /* MoyaProvider+Internal.swift */; }; - 6E80E606F9E2E87756B15D11077870F5 /* SingleAsync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85AEFC1CE9C6CFF0C9DC58D1D01C1E11 /* SingleAsync.swift */; }; - 6E8D010087032A1B5B8391B0CA875651 /* ObservableConvertibleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19A3B0194EB018DE726757882EC6C278 /* ObservableConvertibleType.swift */; }; - 6F5137482471DAF13E378FA8789EC3E6 /* Just.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A8ACD9477A34BF0C026623E4C5BE26C /* Just.swift */; }; - 70517C3BAC2D6614347DEAC15299EB84 /* URLConvertible+URLRequestConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0155A27751A44BBC9201A2BE2839BACF /* URLConvertible+URLRequestConvertible.swift */; }; - 7086C30B959A9BB681B5AB02CFFF89E3 /* GroupedObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F5570D644607BCEEE76AAE9BBB8CD75 /* GroupedObservable.swift */; }; - 720D9231EBB48F3A578F1D6B2154143C /* ConcurrentMainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7AD7F718460A28E43410E6C3C1D9C34 /* ConcurrentMainScheduler.swift */; }; - 73C5F7A686893DD40BC9F5F67539A78B /* URLRequest+Encoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 939BCBFA54780CD7352F1BC08EF5DEA9 /* URLRequest+Encoding.swift */; }; - 73D2C94E87F793ADCCEC417DC9DADD10 /* TakeWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 179FF1ED79662CAA650152FC2882DA0C /* TakeWhile.swift */; }; - 7581E680C4273510DAE797F26C5D168D /* DistinctUntilChanged.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98DC8B9B4DB99C801A0C8E79147B6C5B /* DistinctUntilChanged.swift */; }; - 7B7F7EB30D28663DF9C74484398AE803 /* SwitchIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C62F5F4D65C9F52703F35A4077451FA /* SwitchIfEmpty.swift */; }; - 7BC068C9E73B00FAE17CE2E271E697FC /* ScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB767172E820EC310AAF6698D588B03D /* ScheduledItem.swift */; }; - 7CF8362BA31492053F5CB165637AE117 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 639C9D486342F2E914D01CE5B53B312C /* NetworkReachabilityManager.swift */; }; - 7EF3F16350ECB519FFE38A15A4A1FB57 /* SerialDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = C34CE22CAABA0717D94FD6D1A32EEB8B /* SerialDispatchQueueScheduler.swift */; }; - 7FD07B719F3C7BD7BDEDE04BFC68906A /* MultiTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15A0009216B5B3646AD8F3999C55DA03 /* MultiTarget.swift */; }; - 810BA53E0FFCF7C23CCD8B76C102D997 /* RxSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E85E4742C5653939DD7B7EF76521AD3 /* RxSwift-dummy.m */; }; - 8152E1761FC0540FCFD6D7622EC2904B /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AF05A6267146BE8845DE6CCC44618CB /* Errors.swift */; }; - 83AA8DC7F18522685E0172E0BD35F126 /* BehaviorSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = E08421280D09D52FD4F2605AB0E024A6 /* BehaviorSubject.swift */; }; - 83C043A8DFF48F9927F2B8369295C926 /* DispatchQueueConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95C8D00A9EFAEE9C5673BF0AA4FB49CF /* DispatchQueueConfiguration.swift */; }; - 875990846454E7A2B4D930C6DBAB14F8 /* Single.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CA0EAB8F254B265501EB62D22198724 /* Single.swift */; }; - 87D6E8287A59453E8C45617366F7D16B /* Materialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51EF7A39F7CD9F7B9071BD1411BBFFC0 /* Materialize.swift */; }; - 889224D6BE4DDFF5CE706F311BA76BF0 /* Storable-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 490C3FB7BB938B78F6B59DFCB1960E27 /* Storable-dummy.m */; }; - 88AE163045D837573543BDBCBEE225F2 /* HistoricalScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 861E72C470DE8D12429C1FD12057B8DB /* HistoricalScheduler.swift */; }; - 89ECC06B39DCE78E920280F19E5B5680 /* TakeUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42C43178C6AE1079FBFC3040991DB18B /* TakeUntil.swift */; }; - 8F8962C63DBAA5105933F9AF88178175 /* AddRef.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00F48811F32ED6B14A18D99CFF3ABDF5 /* AddRef.swift */; }; - 91019525025ED536D96C89663D673783 /* PublishSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7507AB04B6A04778F26746A46DDEB799 /* PublishSubject.swift */; }; - 91483E92ECA19CD0A9D788D6F4BF08B3 /* Enumerated.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6DC5195195FAF4F34AB781455F2D408 /* Enumerated.swift */; }; - 91C7D3B97CECC3B513188FC04B2E4421 /* Switch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 695AA91FCCCB0329D8CB85A06927DCC0 /* Switch.swift */; }; - 91E8EC49B7CBB4DC092002A8B047253E /* Merge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AEC3EA26361897965229FEFB2F4A8F5 /* Merge.swift */; }; - 92603F31AA22939DDB47C2F1DB98F135 /* RxNetwork-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 384F5AB8528B8290F3E142C2CEFBEC4D /* RxNetwork-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 92811AC5CD9A5004116AE43C4E8FD955 /* OperationQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85C7BBC1943373EB949534FA1A6141F3 /* OperationQueue+Alamofire.swift */; }; - 92A7185174DC87A08BDAE6780D333DFF /* WithLatestFrom.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A6C199C0948ADBB3613F7AC1F70165E /* WithLatestFrom.swift */; }; - 93994C2375EA773DAD1D1A5CCBC3E933 /* ShareReplayScope.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A5E35544117C19CDB755F141E3FD6E2 /* ShareReplayScope.swift */; }; - 94549CB37A385416133E2D9700631041 /* Dematerialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05CE65C0B8F9C4B8E3217C0D61554E73 /* Dematerialize.swift */; }; - 94C1A51019DB53B33E9FD4DE5F8960B3 /* ObserverType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504877C49BAB3D6A6564F6A8406DE058 /* ObserverType.swift */; }; - 9534B01CC18026BB6D64166407C0946F /* AsSingle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88E2D4023430038457A6166829D174E3 /* AsSingle.swift */; }; - 95980779C6D9DD12F0BA681545E185AC /* CleanJSON-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 949F8D414B30ECCE71F49849FA2B888F /* CleanJSON-dummy.m */; }; - 969228ADCA56A3DF057CAF41F633326E /* Range.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3733079D45E8CFB50B79339CD9669868 /* Range.swift */; }; - 9703D0E338B3A4382C46CB617B58285C /* Disposables.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B14188F54C73DD0EF23A38C04ADB52C /* Disposables.swift */; }; - 970512718F155C81212416E613FB24C6 /* ImmediateSchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35819493E8DAF0DF9E255025E558D35D /* ImmediateSchedulerType.swift */; }; - 97A168DFB6DB61770CE2DBF4FD39AA8D /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9224BCF600D984030DF4BA9B27515E98 /* CFNetwork.framework */; }; - 99DFAB07685473C67742CE2A77DCF04A /* Take.swift in Sources */ = {isa = PBXBuildFile; fileRef = 721A60F6F75DD0639A9B7D5BBF1C076D /* Take.swift */; }; - 9AE5A17776F6931398432A1E8BC31F03 /* Disposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 364329314AA5ED177E098B7690F581EB /* Disposable.swift */; }; - 9BC5B6534BBA3A6E9B5CED29CAC0137F /* Network.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDE9E77D94940D5D7DD20415876A3E16 /* Network.swift */; }; - 9D37FF3C25FF8BFFA1929BF58841B34C /* Generate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40C05AF02E95A48779CF2537049E5D06 /* Generate.swift */; }; - A0984EC68B044E44BC79B12DAB62A450 /* MoyaProvider+Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EB89F1C1F3EE47229A3E2625A0A6DB8 /* MoyaProvider+Defaults.swift */; }; - A296BC49C67CFDBBF9BC4D559D0775D9 /* Reactive.swift in Sources */ = {isa = PBXBuildFile; fileRef = C16AF086B70C27FC983D79A0E8387773 /* Reactive.swift */; }; - A333BD461518BFCF585D068FB6E9C662 /* StoringKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC2B536A7B43694A1136F547B7BABC61 /* StoringKey.swift */; }; - A392366E9EAB56ACB2D4B63F3921C28C /* AnonymousObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5770DC337A160CBCBAAF65D0814BE1DD /* AnonymousObserver.swift */; }; - A3D6BCEABCC79E04DC1991CB5C3AD3B3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; - A4019A5461D5DB72C38D08CA4E854675 /* TakeLast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DEC155776CB51B34C93F9671FE96DE6 /* TakeLast.swift */; }; - A425765CA0A84DD2BECD9E768BFFD2E7 /* MainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41B73D42DF7028FC8F8C1D609E6F482B /* MainScheduler.swift */; }; - A6E54693F4FE0F37FF016CA6F1A4D78B /* AccessTokenPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD279FB0379AD77C0DEFBF56E111FB97 /* AccessTokenPlugin.swift */; }; - A7C9DE2DBD28F5122541FD9F11FEEEC6 /* Cancellable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DAFDF14D7E2402F24790D2D734B6C3F /* Cancellable.swift */; }; - AABC56D2B22A94FD4F2ACFA194D29FF3 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26001D00430D9B9444425CDDC302B6EE /* MultipartFormData.swift */; }; - AB0167F07A236FC1D88BDF28C5DF657B /* CleanJSONKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE60662059C6ED6562467CF8AF04E6BB /* CleanJSONKey.swift */; }; - AD17EEA35B6F9F92E57C7A81E45C8185 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 57857C02D75DE4B780347BC7585AD918 /* RxSwift.framework */; }; - AD9899986955B2EC1EC20818C860C971 /* RequestInterceptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = A803C43D2F6DFF6CA33C9726468213FF /* RequestInterceptor.swift */; }; - AF92602937CA016548022C600B8CDC16 /* URLSessionConfiguration+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA3822155A90A5D5C18DF899FDDBDBCE /* URLSessionConfiguration+Alamofire.swift */; }; - B14F57C52C341611BEFF57589B3BF0BD /* CombineLatest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E095E2C8DD20BFDA5F1FCC8CB3595EA /* CombineLatest.swift */; }; - B1C58F6CED7B3E45170711D9ADF878AF /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E826D395A7708799C65A366246C748FC /* Alamofire-dummy.m */; }; - B1FA93B42BED1306B3F4D0EE82170061 /* Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = 682F31A4EBDAD73F8FA6103A24F86135 /* Map.swift */; }; - B23E9A5CDA31534491226F4C2EE8F8E6 /* HTTPMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11DFE702054C4BD5D5EFBDDECC9110B9 /* HTTPMethod.swift */; }; - B3470AB19CA26359704DB562BC3896F5 /* DisposeBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30D6863963F25CF2127172989004C4AE /* DisposeBase.swift */; }; - B44D374354ED00CFFC1205EBFB4180E8 /* ObservableType+PrimitiveSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79826CE92822C0DA5DF6E03841EB6EA7 /* ObservableType+PrimitiveSequence.swift */; }; - B788B3354CCEBE56DFDB963CAFD7F6C2 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3360304947B40D5E4E4FB0E6215BD617 /* Alamofire.swift */; }; - B80CE38A2CF000C91F9BEC252DD44B25 /* NetworkLoggerPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF699163D05B2CB287559DABCB13CA81 /* NetworkLoggerPlugin.swift */; }; - B90D2337F2914FE4C357BF9742C11E90 /* Pods-RxNetwork_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = DD446B4044B0702284E4C9270774ADF6 /* Pods-RxNetwork_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B9D15928D7930DE5DCDCD0EBC2069982 /* Platform.Linux.swift in Sources */ = {isa = PBXBuildFile; fileRef = 743F963E64F679F0153E1325C6457CDE /* Platform.Linux.swift */; }; - BB86AF8B850FF8B19FE11AE8B6A2A5FD /* Observable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59A86BB29593AE143F2A90A0A0117848 /* Observable.swift */; }; - BDA63063BD4721422CE225CC4B07A223 /* Platform.Darwin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37BA23586CD16D00BFAACE2440BB5E56 /* Platform.Darwin.swift */; }; - BE7099C44978FF09B98008BD066C5877 /* Expiry.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEE2DB1F2EBEBC5455984B053106E5F0 /* Expiry.swift */; }; - BE82AE980F8C7EE28A6448959194F93A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; - BE9404CA321E7FBB1214C9C7A23D69E9 /* InfiniteSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA3AF577DD0BA0FCB910276E72987710 /* InfiniteSequence.swift */; }; - BFF250A42923627911E09D7AC6DB22DA /* Expirable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2ACA0C82EBC8BC64DCF8954AFE69A2C /* Expirable.swift */; }; - C0BF1AEFE6B98C8E2BC20EC6F4A65A3F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; - C12CB57DD1704E5D89537DC9B220FD48 /* InvocableScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38D3BC2F9C6556E44CF8BDFCDB619244 /* InvocableScheduledItem.swift */; }; - C204BEF71CC078DB9D896F1E5134949F /* Cancelable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042F6D18E472DA3FF75AB8F1F2D4FD7A /* Cancelable.swift */; }; - C2794CFA0A0DA92A9F1BAF43005C1620 /* Timeout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DAF0DE62D870E7AC4F5E9FCE81AA126 /* Timeout.swift */; }; - C5487374F304D945EBDC7CB2830BA45A /* CleanJSONUnkeyedDecodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 641365161F8FEB44E0AB88705E928C9A /* CleanJSONUnkeyedDecodingContainer.swift */; }; - C5C678FF4383F79756AEC9B84E895C41 /* PriorityQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE40D9904EAF1AE6E613FBA5937BBF09 /* PriorityQueue.swift */; }; - C64AF152F7928CDB59385528DB65FE19 /* RedirectHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23D0BC0262741F7C5D4941DEBA9B5B3B /* RedirectHandler.swift */; }; - C7278758EE3C140A29B404CCD186EB56 /* JSONAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B8DBA2B42F455D8ED1928B25AA28231 /* JSONAdapter.swift */; }; - C7369563F6946D8984124E1A546B6425 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DCCC07971370DA9E20F2D232734DEC3 /* Notifications.swift */; }; - C7FED1C61262762AA8CEF34ECDB576D6 /* TailRecursiveSink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 303DEE2BF4F0300BE8A79FE22C7F176F /* TailRecursiveSink.swift */; }; - C87E203EADA313FAD5D7520DEAD0E6BB /* First.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1265B119E3FB3854BFD5D89DEDB1067 /* First.swift */; }; - C979B9CFA4E53585CA5E6288CA0217FF /* GroupBy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798FD75BD4753F46C0FD695F89EFDDB3 /* GroupBy.swift */; }; - C9E28E7706C971E5B0B21699AF512AB4 /* Deferred.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01D680BDE31FF351B83D13C18A58A061 /* Deferred.swift */; }; - CACBD166E573774FB5613C34AA6DA7A7 /* EventMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93E67CA2B5E12EF8A25982254F5A3D3A /* EventMonitor.swift */; }; - CAE6B2CAF926F5ADD3A19B7989D2F419 /* CleanJSONDecodingStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 560CC10DED41878C84F1C22A45BC99DB /* CleanJSONDecodingStorage.swift */; }; - CD042939C2E3E78A298B28D148DF978F /* SynchronizedOnType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A656B134EBC88A969EF31CAD2E1BB262 /* SynchronizedOnType.swift */; }; - CE2EE27DA1623D412DCCCF686520F77C /* DecodingError+CleanJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = B9701872D8F873C5C4E090962D6D906B /* DecodingError+CleanJSON.swift */; }; - D039945E3BB8AF4C59404198B3CE5925 /* CompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A73B2163ABAEFB26B18B8DD5D9BE387F /* CompositeDisposable.swift */; }; - D072819853FA8D73FA9860EF709EB369 /* ObservableType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E8C21AFBCFE3608F0621611ED0A3D0C /* ObservableType+Extensions.swift */; }; - D0B879B08BA15D877B2B281F90B91D04 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; - D1E6F6C0078CEE4ABE98162AD229FF85 /* Storable.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D595591C9104D8297D280F60DB59ED40 /* Storable.framework */; }; - D1E8ADCD65B359590087CD39E878B446 /* Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3527B4D8AC4C309DC3078EF0D13DC89 /* Window.swift */; }; - D2704E5203EB1958FF4D12BD149E0AE5 /* _CleanJSONDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5831D0F980A47608C413B52F2775B2AF /* _CleanJSONDecoder.swift */; }; - D2D5F111A2530E4579807B0705101A85 /* SynchronizedDisposeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60A6ED0686DE61B741FEECD2304A78B1 /* SynchronizedDisposeType.swift */; }; - D43FEC1795E759451BA1778DB9FCDBDD /* SkipUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C4D54E9E2DC6926A9E8357065C503EF /* SkipUntil.swift */; }; - D5245FCD38A824F326C844357285BBC5 /* BooleanDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D0182C40148B767BECBB0FA23E510C4 /* BooleanDisposable.swift */; }; - D62D993A4677807A496ADEB7A52F6072 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E3996058E040B343A27929EBE1CB55BD /* Alamofire.framework */; }; - D6B2983389480F48F27A0704EEB5DC81 /* RetryPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB20E193A044509AFD5D4252D5C8EB2 /* RetryPolicy.swift */; }; - D73D9626D6A74821BDABF3A95A34B38F /* RetryWhen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7954024C12A362D2C9D371BCCB3EAF87 /* RetryWhen.swift */; }; - D8644C08EBB4B8B78407C6E52C3C797B /* Concat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28A53A781B86175B9536777361F8146C /* Concat.swift */; }; - D87EC13CC802F87DDC6A53F2C1F7B0D3 /* Observable+Cache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20D9B49CE2793BFBE289FA0F11F11114 /* Observable+Cache.swift */; }; - D87EF45F33404C2B76800C21EFE06758 /* Skip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91C250FD91C4063E0F9506D2B3AD3B11 /* Skip.swift */; }; - D8C089847634E593119461FC5006A302 /* AnyEncodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3833EC1070CFC25B2E441EDD2C44069 /* AnyEncodable.swift */; }; - D91B9D04E6DA0EA21D79703ED6DD3496 /* AnyObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B01892F6E0DCC19983E676CA91CE7C3 /* AnyObserver.swift */; }; - D9CFEC0443BFE341EB618519E76B736A /* LockOwnerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DBA8B8C798DDCF1E0E832462F346A53 /* LockOwnerType.swift */; }; - DB67F130A89650D0A2BA30CCA24D9422 /* Buffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCBB1EB8794FB8B9E214E86C7C12F3DC /* Buffer.swift */; }; - DC96D4C6400180BD5891B17EF42D5737 /* Maybe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D677EBE3FEE830A8C2A0E6EC206C032 /* Maybe.swift */; }; - DD1912BC629BB811B439BAD22E89C665 /* _CleanJSONDecoder+SingleValueDecodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9688CD14ABEB4BA80B7728B79BF8FA6C /* _CleanJSONDecoder+SingleValueDecodingContainer.swift */; }; - DE0326CE1EDFDC40B2FE19D76B043A35 /* _CleanJSONDecoder+Unbox.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE0771BCA1816F78DC9E8AD933233CE5 /* _CleanJSONDecoder+Unbox.swift */; }; - E07BD425C4EA9ADF15DDFCDB10D0B2FB /* MultipartUpload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B7FA985EB7D75F734C7CA2EB2D46FCF /* MultipartUpload.swift */; }; - E0AF946766FBB7F3FDB2AB58FEF36C70 /* Pods-RxNetwork_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0C53BC94DCE913089EC4A7560728795F /* Pods-RxNetwork_Tests-dummy.m */; }; - E23B21DCFF06D63FF04517AE9D9D79C1 /* CleanJSONKeyedDecodingContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AF09C4080D910C5C0C113ABBCF9DD4A /* CleanJSONKeyedDecodingContainer.swift */; }; - E395E421A778BCB85DC5450199F8892B /* CaseDefaultable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41E30F00D82E0EABF90F741F3F00934B /* CaseDefaultable.swift */; }; - E4E12208D5246E64B7E6CCAE987ADB03 /* URLRequest+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = A03AF092CCB9C5E2F8C0045702DC0B0E /* URLRequest+Alamofire.swift */; }; - E550F25D61213D342FD151469B18D35C /* OperationQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0E44EC19CAB6E07F3358A42656C5666 /* OperationQueueScheduler.swift */; }; - E60A5078E790EC5CB37F6FA29495EC3E /* CleanDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25C9B6314018A8F3F6932FC6B4CACC66 /* CleanDecoder.swift */; }; - E64D07F38172F52590728184657D9CD6 /* Scan.swift in Sources */ = {isa = PBXBuildFile; fileRef = FADAFB44968DF01FC53FD92C512A13E0 /* Scan.swift */; }; - E7BE920F4D2E2E0C7073DD5F7C28B8A9 /* RxNetwork-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 628BA3C7E3F624B6229544E2A8FFD05A /* RxNetwork-dummy.m */; }; - E7EEDB6566BB993101A6BD90444F1B6E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; - E84C3265A50F762414793124E7BE854E /* Debounce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 728A5CE94ADC6BBE578D98A2970CF7E5 /* Debounce.swift */; }; - E8FD96EBDB36F2BE905D05F74B0906E5 /* CredentialsPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE703A575470F61F408DB3BB16673617 /* CredentialsPlugin.swift */; }; - E9A5AC2F471699CCA516952A5FEB990B /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA2D373967AD90A0B2BF4A6B7FEFCCE9 /* DispatchQueue+Alamofire.swift */; }; - EED4A2CE79B7991DB8B24BC7AEC33746 /* Amb.swift in Sources */ = {isa = PBXBuildFile; fileRef = C335C154B53FBB7317765ACDB01DD892 /* Amb.swift */; }; - EF2A0D254CACBB2A2A2D0C41E69080B5 /* DelaySubscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = D724F9E434C4C6FE79DD4FBDDFCD8924 /* DelaySubscription.swift */; }; - EF4BB2D3A2FE97A5F4F51EA5BD773F3C /* DisposeBag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BB2FB18CABAC711A05FFFBD34F7C863 /* DisposeBag.swift */; }; - EF796E0D6E10A60D7B888D1F8F7A0DDE /* MoyaError.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFE45C512CB88FAD255B427E1DF52DFA /* MoyaError.swift */; }; - F0A03B5B54EF60731A50C987341D6294 /* Pods-RxNetwork_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BBF5DA155317CA881B91CF1DDE6EF8F /* Pods-RxNetwork_Example-dummy.m */; }; - F2757AD6CAAF7253C81A741429059D99 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F64C1A4EBA305197026AB75744735C7 /* Filter.swift */; }; - F30644E28EACE951945892FE12E511A8 /* Pods-RxNetwork_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A4E724893CF26E0AFE980F6D1A1AF727 /* Pods-RxNetwork_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F329B0DA6C5C90299C6CD778F3A19895 /* CompactMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02E8344CB771BC0261905156BDFB1ECD /* CompactMap.swift */; }; - F37BECF2D90C729642BC497E89CFA0D4 /* TargetType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85006244C877C17FC0F9C272A28AE5AB /* TargetType.swift */; }; - F41B2EE22AC7AD5EA0546BBBBE51AC5D /* RequestTypeWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1269D050A65D41CF590F03FF3C580ED5 /* RequestTypeWrapper.swift */; }; - F4C912A400C0D04CD6E31B7C84FE79D5 /* Zip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BAC372028D6CC0262943A5AD5481977 /* Zip.swift */; }; - F4FEDFC1604B61CF96EBC2FEEED0B267 /* Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 463649D510E1F84A0E3530555E650103 /* Deprecated.swift */; }; - F5B7FF902215E83B19A5E5A4C2085D4B /* NetworkIndicatorPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7BE029CFC14C6B15BC4DC1C7A179303 /* NetworkIndicatorPlugin.swift */; }; - F5BD3CE5D1869C22067B4A056821750B /* Never.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37CF58E6838CF5CD626AF8FF6A0A6DAA /* Never.swift */; }; - F6519B8A83A82877BC64EC56A2CF4B00 /* Repeat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4301AB0202F97540AAC919EA7420908C /* Repeat.swift */; }; - F715D51E8FA6F2B3E9FF5AEBA8EE7C8F /* SubscriptionDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 646BDA19988FA945F6E15486C09CEE14 /* SubscriptionDisposable.swift */; }; - F71789DC91A75033EFB79DB828676451 /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AEC6E040D68C9C7B617965B7FE982B1 /* Response.swift */; }; - F7679B14121D8747BF7A256A5EBE4EC1 /* Plugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93FD309F50CB1E2423F1B87F4F543327 /* Plugin.swift */; }; - F7B63E61E68CE26BC7AA609E4DBFA7E1 /* Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE81A1F5C40DCB3943B3E4A7049659F4 /* Debug.swift */; }; - F85CDFAC917FAA677339C0883BB500FB /* SkipWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAFD7355B7CDA4B62F4CF2A77E487EA4 /* SkipWhile.swift */; }; - F913C5A285AC68CF66368D4F804EA6D3 /* MoyaProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = D65433450EA13734A722A57F9B7407C4 /* MoyaProvider.swift */; }; - FCAC4D11E769C4ECCC58F68F5AC5909E /* CombineLatest+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BBB378EA135E7A669C8FAED75C87852 /* CombineLatest+Collection.swift */; }; - FD33675E55F8E28ABECAD8C72171A091 /* Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = B01712292DFC16D1D57ED755FCA60CBE /* Sequence.swift */; }; - FD876512D820211E0E7960F17AB6658A /* SwiftSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 280D123D64FD39B89DA7471CE311B203 /* SwiftSupport.swift */; }; - FDEFBF068E959E054E80BC587A76AEB9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */; }; - FE2687350016D4FBCE75340479536769 /* CombineLatest+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = A13108FF29882D9DF6A699C058C71095 /* CombineLatest+arity.swift */; }; - FEE2249EE828E03608D50FC1C2893139 /* SerialDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9949405720C91F1B3928A6FC8DE67BCA /* SerialDisposable.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 158F96E735057F8A56F852DE86F4763F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 045F970D8042EC014BA1BCBAD66DD876; - remoteInfo = RxNetwork; - }; - 1B4B49F2AAC6FD8E2902B164286D43C9 /* PBXContainerItemProxy */ = { ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; @@ -596,7 +316,6 @@ remoteGlobalIDString = EAAA1AD3A8A1B59AB91319EE40752C6D; remoteInfo = Alamofire; }; -<<<<<<< HEAD 712FF6E752334487A0F27CDEAB2DE7B2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; @@ -626,64 +345,19 @@ remoteInfo = Storable; }; E61B7F5E1D13B1708026C6635FA50AF3 /* PBXContainerItemProxy */ = { -======= - 42E97C6CD26A108F4872386DFF21D7F2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 9F445FA5AE809C9022E2F9A48325E6AB; - remoteInfo = Storable; - }; - 5210E18E803B371F006D469F7283F550 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = EAAA1AD3A8A1B59AB91319EE40752C6D; - remoteInfo = Alamofire; - }; - 59A4ED76495FD39A306A578DBBDFF562 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 300904838EEDDC3BB8242817D8F97CB6; - remoteInfo = CleanJSON; - }; - 6DC199D91DC93068F7D082ECDD6820BA /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 17F9141D333DA1A7BE5937F227221070; - remoteInfo = Moya; - }; - 712FF6E752334487A0F27CDEAB2DE7B2 /* PBXContainerItemProxy */ = { ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 8E13C526B33E1AD69D45907AC0ED80E5; - remoteInfo = "Pods-RxNetwork_Example"; + remoteGlobalIDString = 045F970D8042EC014BA1BCBAD66DD876; + remoteInfo = RxNetwork; }; -<<<<<<< HEAD E919686775E4FFDD2339B22380EE744B /* PBXContainerItemProxy */ = { -======= - C6A90E2682DBF1616B2A2982CDC8C53E /* PBXContainerItemProxy */ = { ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; remoteGlobalIDString = EA9EA43B3B503823EE36C60D9C8A865F; remoteInfo = RxSwift; }; -<<<<<<< HEAD -======= - DAE2B239DDE1BA2B07400D39A108057F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = EAAA1AD3A8A1B59AB91319EE40752C6D; - remoteInfo = Alamofire; - }; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 EDF9F4D0C960DCFB830C799EFBA7B1D7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; @@ -694,9 +368,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 00C29BECB773B6BE1D2007D1AF32D732 /* ConnectableObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectableObservableType.swift; path = RxSwift/ConnectableObservableType.swift; sourceTree = ""; }; 00D6C805D75CAD12E0A30E69B3D72E0E /* Pods-RxNetwork_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RxNetwork_Example-acknowledgements.plist"; sourceTree = ""; }; -<<<<<<< HEAD 016B14482A6DEC5A11CAA1E55B00B980 /* Alamofire.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.debug.xcconfig; sourceTree = ""; }; 024D617C1DF3CFE64F6D7F3B37C2B278 /* Merge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Merge.swift; path = RxSwift/Observables/Merge.swift; sourceTree = ""; }; 029C1A0FBF1BA6184766507C1495A6D5 /* RxNetwork-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxNetwork-umbrella.h"; sourceTree = ""; }; @@ -1031,317 +703,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; -======= - 00E8A7AD482299847A1C182FD859816F /* Moya-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-umbrella.h"; sourceTree = ""; }; - 00F48811F32ED6B14A18D99CFF3ABDF5 /* AddRef.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AddRef.swift; path = RxSwift/Observables/AddRef.swift; sourceTree = ""; }; - 0155A27751A44BBC9201A2BE2839BACF /* URLConvertible+URLRequestConvertible.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URLConvertible+URLRequestConvertible.swift"; path = "Source/URLConvertible+URLRequestConvertible.swift"; sourceTree = ""; }; - 01D680BDE31FF351B83D13C18A58A061 /* Deferred.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deferred.swift; path = RxSwift/Observables/Deferred.swift; sourceTree = ""; }; - 02E8344CB771BC0261905156BDFB1ECD /* CompactMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompactMap.swift; path = RxSwift/Observables/CompactMap.swift; sourceTree = ""; }; - 03EE4BBD901BC76B6F5FB868C7CE7770 /* DecodingStrategy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DecodingStrategy.swift; path = CleanJSON/Classes/DecodingStrategy.swift; sourceTree = ""; }; - 042F6D18E472DA3FF75AB8F1F2D4FD7A /* Cancelable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancelable.swift; path = RxSwift/Cancelable.swift; sourceTree = ""; }; - 0535CEBD31800342D461C28837CFCC26 /* RxNetwork.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = RxNetwork.framework; path = RxNetwork.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 05CE65C0B8F9C4B8E3217C0D61554E73 /* Dematerialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Dematerialize.swift; path = RxSwift/Observables/Dematerialize.swift; sourceTree = ""; }; - 07AB21035AAE78659F9A291E09E98E51 /* ServerTrustEvaluation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustEvaluation.swift; path = Source/ServerTrustEvaluation.swift; sourceTree = ""; }; - 09B3AB5E5543F51A3C3E4EA4B410EC5D /* Pods_RxNetwork_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_RxNetwork_Tests.framework; path = "Pods-RxNetwork_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 09F47E44CB91BA470DADA5AC2730DE8E /* AtomicInt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AtomicInt.swift; path = Platform/AtomicInt.swift; sourceTree = ""; }; - 0A6C199C0948ADBB3613F7AC1F70165E /* WithLatestFrom.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WithLatestFrom.swift; path = RxSwift/Observables/WithLatestFrom.swift; sourceTree = ""; }; - 0A7B0120AD583D7C97127B80C5D4A3E2 /* CleanJSONDecoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONDecoder.swift; path = CleanJSON/Classes/CleanJSONDecoder.swift; sourceTree = ""; }; - 0AE6037437F12CA130ACE6A16A2CCA06 /* CachingKey+Moya.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CachingKey+Moya.swift"; path = "RxNetwork/Classes/Cacheable/CachingKey+Moya.swift"; sourceTree = ""; }; - 0B32437417BEDC48410FA3AEA83CA35D /* AsMaybe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsMaybe.swift; path = RxSwift/Observables/AsMaybe.swift; sourceTree = ""; }; - 0B8DBA2B42F455D8ED1928B25AA28231 /* JSONAdapter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONAdapter.swift; path = CleanJSON/Classes/JSONAdapter.swift; sourceTree = ""; }; - 0BBB378EA135E7A669C8FAED75C87852 /* CombineLatest+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+Collection.swift"; path = "RxSwift/Observables/CombineLatest+Collection.swift"; sourceTree = ""; }; - 0BBF5DA155317CA881B91CF1DDE6EF8F /* Pods-RxNetwork_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-RxNetwork_Example-dummy.m"; sourceTree = ""; }; - 0BDF9D9BF1A5774EA0FF1D5147B3CAE5 /* Observable+Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Response.swift"; path = "Sources/RxMoya/Observable+Response.swift"; sourceTree = ""; }; - 0C53BC94DCE913089EC4A7560728795F /* Pods-RxNetwork_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-RxNetwork_Tests-dummy.m"; sourceTree = ""; }; - 0C62F5F4D65C9F52703F35A4077451FA /* SwitchIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwitchIfEmpty.swift; path = RxSwift/Observables/SwitchIfEmpty.swift; sourceTree = ""; }; - 0D0182C40148B767BECBB0FA23E510C4 /* BooleanDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BooleanDisposable.swift; path = RxSwift/Disposables/BooleanDisposable.swift; sourceTree = ""; }; - 0D9E0C0A6A2C197AD72EAEC4D668ED63 /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; - 0DCCC07971370DA9E20F2D232734DEC3 /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; - 0E3ADEF449D0B103EE3402AD75506165 /* Image.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Image.swift; path = Sources/Moya/Image.swift; sourceTree = ""; }; - 101CF6E4DBB4F31242ACCBBCEEF51240 /* RxSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxSwift.xcconfig; sourceTree = ""; }; - 11DFE702054C4BD5D5EFBDDECC9110B9 /* HTTPMethod.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HTTPMethod.swift; path = Source/HTTPMethod.swift; sourceTree = ""; }; - 1230F5D6549CDECCC50F73CA40606D38 /* Moya.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Moya.xcconfig; sourceTree = ""; }; - 1269D050A65D41CF590F03FF3C580ED5 /* RequestTypeWrapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RequestTypeWrapper.swift; path = Sources/Moya/RequestTypeWrapper.swift; sourceTree = ""; }; - 146C1142C9648D2BEEC2E9D363828B15 /* Pods-RxNetwork_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-RxNetwork_Example.modulemap"; sourceTree = ""; }; - 14B8FBB0B6028D0AFB547A68866504BB /* RxNetwork-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxNetwork-prefix.pch"; sourceTree = ""; }; - 1590E68C50A858D5BE4B5ACA8DE9054C /* SchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SchedulerType.swift; path = RxSwift/SchedulerType.swift; sourceTree = ""; }; - 15A0009216B5B3646AD8F3999C55DA03 /* MultiTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultiTarget.swift; path = Sources/Moya/MultiTarget.swift; sourceTree = ""; }; - 15B163DB9ED27819E703C7DD55E3086D /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; - 162899CE5F8408408EE1FB50D895D8D0 /* CleanJSON-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "CleanJSON-Info.plist"; sourceTree = ""; }; - 16D1449ECBA8B988B81592890BE9411C /* ReplaySubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ReplaySubject.swift; path = RxSwift/Subjects/ReplaySubject.swift; sourceTree = ""; }; - 179FF1ED79662CAA650152FC2882DA0C /* TakeWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeWhile.swift; path = RxSwift/Observables/TakeWhile.swift; sourceTree = ""; }; - 187D7A5430029C0FB277BDFC310256DB /* Delay.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Delay.swift; path = RxSwift/Observables/Delay.swift; sourceTree = ""; }; - 19A3B0194EB018DE726757882EC6C278 /* ObservableConvertibleType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableConvertibleType.swift; path = RxSwift/ObservableConvertibleType.swift; sourceTree = ""; }; - 1A0E004B8BE65DFB6D11E0A76E786EB2 /* Storable-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Storable-prefix.pch"; sourceTree = ""; }; - 1C31FEA0D1425EE3692D61D9C898F57A /* MoyaProvider+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Rx.swift"; path = "Sources/RxMoya/MoyaProvider+Rx.swift"; sourceTree = ""; }; - 1D121C06397586C34177246B57D7862B /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = RxNetwork/Classes/Core/Configuration.swift; sourceTree = ""; }; - 1E68285C1E15FC2BCBD42B9A22602FF4 /* Pods-RxNetwork_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-RxNetwork_Tests-acknowledgements.markdown"; sourceTree = ""; }; - 1EA77340F3AB5CB93DD5F4124BF6DB3C /* SchedulerServices+Emulation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "SchedulerServices+Emulation.swift"; path = "RxSwift/Schedulers/SchedulerServices+Emulation.swift"; sourceTree = ""; }; - 1F61709F9216696592A896A59C7F31C3 /* AsyncLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncLock.swift; path = RxSwift/Concurrency/AsyncLock.swift; sourceTree = ""; }; - 20D9B49CE2793BFBE289FA0F11F11114 /* Observable+Cache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Cache.swift"; path = "RxNetwork/Classes/Cacheable/Observable+Cache.swift"; sourceTree = ""; }; - 23D0BC0262741F7C5D4941DEBA9B5B3B /* RedirectHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RedirectHandler.swift; path = Source/RedirectHandler.swift; sourceTree = ""; }; - 25077B79C9C436FE785C4A0BF19EEF4D /* Protector.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Protector.swift; path = Source/Protector.swift; sourceTree = ""; }; - 25C9B6314018A8F3F6932FC6B4CACC66 /* CleanDecoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanDecoder.swift; path = CleanJSON/Classes/CleanDecoder.swift; sourceTree = ""; }; - 26001D00430D9B9444425CDDC302B6EE /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Sources/Moya/MultipartFormData.swift; sourceTree = ""; }; - 27657E2446314F5E883890BB9CF65A96 /* Completable+AndThen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Completable+AndThen.swift"; path = "RxSwift/Traits/Completable+AndThen.swift"; sourceTree = ""; }; - 280D123D64FD39B89DA7471CE311B203 /* SwiftSupport.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftSupport.swift; path = RxSwift/SwiftSupport/SwiftSupport.swift; sourceTree = ""; }; - 28A53A781B86175B9536777361F8146C /* Concat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Concat.swift; path = RxSwift/Observables/Concat.swift; sourceTree = ""; }; - 28B8D6402EC2E9A285779EA777AA383E /* MoyaProvider+Internal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Internal.swift"; path = "Sources/Moya/MoyaProvider+Internal.swift"; sourceTree = ""; }; - 29D74079F6E0A9577781D08780825E23 /* NopDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NopDisposable.swift; path = RxSwift/Disposables/NopDisposable.swift; sourceTree = ""; }; - 2AF09C4080D910C5C0C113ABBCF9DD4A /* CleanJSONKeyedDecodingContainer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONKeyedDecodingContainer.swift; path = CleanJSON/Classes/CleanJSONKeyedDecodingContainer.swift; sourceTree = ""; }; - 2B41D0A0D02B46471976E76243A7002B /* Pods-RxNetwork_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-RxNetwork_Tests.modulemap"; sourceTree = ""; }; - 2BB2FB18CABAC711A05FFFBD34F7C863 /* DisposeBag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBag.swift; path = RxSwift/Disposables/DisposeBag.swift; sourceTree = ""; }; - 2C010E1639E2F11C575C8682DF661753 /* URL+Moya.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URL+Moya.swift"; path = "Sources/Moya/URL+Moya.swift"; sourceTree = ""; }; - 2CDAF23ECDB357B6F54E0D5B23707BDA /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; - 2D00E8B4BC0F2F60A6A675F27507B892 /* Completable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Completable.swift; path = RxSwift/Traits/Completable.swift; sourceTree = ""; }; - 2DEC155776CB51B34C93F9671FE96DE6 /* TakeLast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeLast.swift; path = RxSwift/Observables/TakeLast.swift; sourceTree = ""; }; - 30166D92334237F1FE293CE8FD5100B7 /* Event.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Event.swift; path = RxSwift/Event.swift; sourceTree = ""; }; - 303DEE2BF4F0300BE8A79FE22C7F176F /* TailRecursiveSink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TailRecursiveSink.swift; path = RxSwift/Observers/TailRecursiveSink.swift; sourceTree = ""; }; - 30AB203E330E3E3A44A8CE7A4AD32F06 /* ScheduledDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledDisposable.swift; path = RxSwift/Disposables/ScheduledDisposable.swift; sourceTree = ""; }; - 30D6863963F25CF2127172989004C4AE /* DisposeBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBase.swift; path = RxSwift/Disposables/DisposeBase.swift; sourceTree = ""; }; - 3360304947B40D5E4E4FB0E6215BD617 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; - 33AD91CFFC81D1D4F26F7F9F0FCDE143 /* TargetType+Cache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "TargetType+Cache.swift"; path = "RxNetwork/Classes/Cacheable/TargetType+Cache.swift"; sourceTree = ""; }; - 33B7AE29589319D1045D96DADFD3BF9D /* Moya.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Moya.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 35374A5864D6B9380A3D4DAC9FA0E275 /* Reduce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reduce.swift; path = RxSwift/Observables/Reduce.swift; sourceTree = ""; }; - 35819493E8DAF0DF9E255025E558D35D /* ImmediateSchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmediateSchedulerType.swift; path = RxSwift/ImmediateSchedulerType.swift; sourceTree = ""; }; - 364329314AA5ED177E098B7690F581EB /* Disposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposable.swift; path = RxSwift/Disposable.swift; sourceTree = ""; }; - 3733079D45E8CFB50B79339CD9669868 /* Range.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Range.swift; path = RxSwift/Observables/Range.swift; sourceTree = ""; }; - 3756A9BBE41ABEE8DCBF5BCA6972C4DA /* Moya.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Moya.framework; path = Moya.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 37BA23586CD16D00BFAACE2440BB5E56 /* Platform.Darwin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Darwin.swift; path = Platform/Platform.Darwin.swift; sourceTree = ""; }; - 37CF58E6838CF5CD626AF8FF6A0A6DAA /* Never.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Never.swift; path = RxSwift/Observables/Never.swift; sourceTree = ""; }; - 384F5AB8528B8290F3E142C2CEFBEC4D /* RxNetwork-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxNetwork-umbrella.h"; sourceTree = ""; }; - 38D3BC2F9C6556E44CF8BDFCDB619244 /* InvocableScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableScheduledItem.swift; path = RxSwift/Schedulers/Internal/InvocableScheduledItem.swift; sourceTree = ""; }; - 3A8ACD9477A34BF0C026623E4C5BE26C /* Just.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Just.swift; path = RxSwift/Observables/Just.swift; sourceTree = ""; }; - 3B14188F54C73DD0EF23A38C04ADB52C /* Disposables.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposables.swift; path = RxSwift/Disposables/Disposables.swift; sourceTree = ""; }; - 3DAFDF14D7E2402F24790D2D734B6C3F /* Cancellable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancellable.swift; path = Sources/Moya/Cancellable.swift; sourceTree = ""; }; - 3E345660245FEA0A98648AF1FC293054 /* PrimitiveSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PrimitiveSequence.swift; path = RxSwift/Traits/PrimitiveSequence.swift; sourceTree = ""; }; - 3F01DF301043248C41FEEBBA26129AD9 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; - 3F49890A3C735CD63BA040A631237763 /* Zip+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+Collection.swift"; path = "RxSwift/Observables/Zip+Collection.swift"; sourceTree = ""; }; - 3FFA9A074EE3EE4EA4DA4767764A1523 /* ToArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToArray.swift; path = RxSwift/Observables/ToArray.swift; sourceTree = ""; }; - 40C05AF02E95A48779CF2537049E5D06 /* Generate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generate.swift; path = RxSwift/Observables/Generate.swift; sourceTree = ""; }; - 41639DA5B66904EF85EAC1D3F23620AB /* Lock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Lock.swift; path = RxSwift/Concurrency/Lock.swift; sourceTree = ""; }; - 41AEC6686243F9B74940C11D8EBBB004 /* Storable-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Storable-umbrella.h"; sourceTree = ""; }; - 41B73D42DF7028FC8F8C1D609E6F482B /* MainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MainScheduler.swift; path = RxSwift/Schedulers/MainScheduler.swift; sourceTree = ""; }; - 41E30F00D82E0EABF90F741F3F00934B /* CaseDefaultable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CaseDefaultable.swift; path = CleanJSON/Classes/CaseDefaultable.swift; sourceTree = ""; }; - 42C43178C6AE1079FBFC3040991DB18B /* TakeUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeUntil.swift; path = RxSwift/Observables/TakeUntil.swift; sourceTree = ""; }; - 4301AB0202F97540AAC919EA7420908C /* Repeat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Repeat.swift; path = RxSwift/Observables/Repeat.swift; sourceTree = ""; }; - 43A8DCCC33363B59747A2AD458C3DB82 /* Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+arity.swift"; path = "RxSwift/Observables/Zip+arity.swift"; sourceTree = ""; }; - 43DE38FFE186F6ACF2E014F6C148D2EA /* RxSwift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "RxSwift-Info.plist"; sourceTree = ""; }; - 463649D510E1F84A0E3530555E650103 /* Deprecated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecated.swift; path = RxSwift/Deprecated.swift; sourceTree = ""; }; - 4654A2194D68676CBB504D17BF8737A9 /* Sample.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sample.swift; path = RxSwift/Observables/Sample.swift; sourceTree = ""; }; - 47F1093F951EA26C495502243242A32D /* SubjectType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubjectType.swift; path = RxSwift/Subjects/SubjectType.swift; sourceTree = ""; }; - 4836F36A4566F57D0561E2D3D234CE4C /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; - 490C3FB7BB938B78F6B59DFCB1960E27 /* Storable-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Storable-dummy.m"; sourceTree = ""; }; - 4AF05A6267146BE8845DE6CCC44618CB /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = RxSwift/Errors.swift; sourceTree = ""; }; - 4CDDE44860C3D293EDD5864A7747678A /* Bag+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bag+Rx.swift"; path = "RxSwift/Extensions/Bag+Rx.swift"; sourceTree = ""; }; - 4E39A8C986CCD91EE152B5E2A5B1E2BE /* BinaryDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryDisposable.swift; path = RxSwift/Disposables/BinaryDisposable.swift; sourceTree = ""; }; - 4ED0EFDDD3DA03BA614FC526956AD80B /* ObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableType.swift; path = RxSwift/ObservableType.swift; sourceTree = ""; }; - 504877C49BAB3D6A6564F6A8406DE058 /* ObserverType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverType.swift; path = RxSwift/ObserverType.swift; sourceTree = ""; }; - 505A47D6BE973E8F95746B12D01A9805 /* Pods-RxNetwork_Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RxNetwork_Example-Info.plist"; sourceTree = ""; }; - 51EF7A39F7CD9F7B9071BD1411BBFFC0 /* Materialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Materialize.swift; path = RxSwift/Observables/Materialize.swift; sourceTree = ""; }; - 5251754EFE1F1454D191CB2B0621E79E /* CurrentThreadScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CurrentThreadScheduler.swift; path = RxSwift/Schedulers/CurrentThreadScheduler.swift; sourceTree = ""; }; - 529B7340B94A264D366B96E9440E8475 /* Do.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Do.swift; path = RxSwift/Observables/Do.swift; sourceTree = ""; }; - 529E32B5967D7B7736D2300409987860 /* Endpoint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Endpoint.swift; path = Sources/Moya/Endpoint.swift; sourceTree = ""; }; - 550B72C90CDA9426C559F582249F33EB /* Moya-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-prefix.pch"; sourceTree = ""; }; - 560CC10DED41878C84F1C22A45BC99DB /* CleanJSONDecodingStorage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONDecodingStorage.swift; path = CleanJSON/Classes/CleanJSONDecodingStorage.swift; sourceTree = ""; }; - 5770DC337A160CBCBAAF65D0814BE1DD /* AnonymousObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousObserver.swift; path = RxSwift/Observers/AnonymousObserver.swift; sourceTree = ""; }; - 57857C02D75DE4B780347BC7585AD918 /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 5831D0F980A47608C413B52F2775B2AF /* _CleanJSONDecoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = _CleanJSONDecoder.swift; path = CleanJSON/Classes/_CleanJSONDecoder.swift; sourceTree = ""; }; - 590D849D15959506945ED0D2C4D34D1B /* RxSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-umbrella.h"; sourceTree = ""; }; - 59A86BB29593AE143F2A90A0A0117848 /* Observable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Observable.swift; path = RxSwift/Observable.swift; sourceTree = ""; }; - 5A5C140540238D70BDA4341D06774A37 /* ObserveOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserveOn.swift; path = RxSwift/Observables/ObserveOn.swift; sourceTree = ""; }; - 5A5E35544117C19CDB755F141E3FD6E2 /* ShareReplayScope.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareReplayScope.swift; path = RxSwift/Observables/ShareReplayScope.swift; sourceTree = ""; }; - 5B01892F6E0DCC19983E676CA91CE7C3 /* AnyObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyObserver.swift; path = RxSwift/AnyObserver.swift; sourceTree = ""; }; - 5B656E9F068A7DB6E16A700CBE785E4C /* ConcurrentDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentDispatchQueueScheduler.swift; path = RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift; sourceTree = ""; }; - 5C2909A3ECA805A0D5F7AE75282DEAA3 /* ObserverBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverBase.swift; path = RxSwift/Observers/ObserverBase.swift; sourceTree = ""; }; - 5D797E9A5C5782CE845840781FA1CC81 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 5DAF0DE62D870E7AC4F5E9FCE81AA126 /* Timeout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeout.swift; path = RxSwift/Observables/Timeout.swift; sourceTree = ""; }; - 5E3E0054DBA7B90B96396D8F00296894 /* StartWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StartWith.swift; path = RxSwift/Observables/StartWith.swift; sourceTree = ""; }; - 5E85E4742C5653939DD7B7EF76521AD3 /* RxSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxSwift-dummy.m"; sourceTree = ""; }; - 5F64C1A4EBA305197026AB75744735C7 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = RxSwift/Observables/Filter.swift; sourceTree = ""; }; - 609EA9D4146C3002A053FD732F25F5C9 /* Pods-RxNetwork_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RxNetwork_Tests.debug.xcconfig"; sourceTree = ""; }; - 60A6ED0686DE61B741FEECD2304A78B1 /* SynchronizedDisposeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedDisposeType.swift; path = RxSwift/Concurrency/SynchronizedDisposeType.swift; sourceTree = ""; }; - 628BA3C7E3F624B6229544E2A8FFD05A /* RxNetwork-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxNetwork-dummy.m"; sourceTree = ""; }; - 636C1A4840185C5ED791200F21F1D9A8 /* Pods-RxNetwork_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-RxNetwork_Example-frameworks.sh"; sourceTree = ""; }; - 639C9D486342F2E914D01CE5B53B312C /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; - 63B3B1C869DE4C76A671F85CD34A5DDE /* DefaultIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DefaultIfEmpty.swift; path = RxSwift/Observables/DefaultIfEmpty.swift; sourceTree = ""; }; - 641365161F8FEB44E0AB88705E928C9A /* CleanJSONUnkeyedDecodingContainer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONUnkeyedDecodingContainer.swift; path = CleanJSON/Classes/CleanJSONUnkeyedDecodingContainer.swift; sourceTree = ""; }; - 646BDA19988FA945F6E15486C09CEE14 /* SubscriptionDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscriptionDisposable.swift; path = RxSwift/Disposables/SubscriptionDisposable.swift; sourceTree = ""; }; - 664784C9FEE826AE30A4DC20EFF9B210 /* Moya-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Moya-dummy.m"; sourceTree = ""; }; - 67048AB3FF6627D1617A102F4DA46CC4 /* Pods-RxNetwork_Tests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RxNetwork_Tests-Info.plist"; sourceTree = ""; }; - 6793166E9DB973FEFDA7222B302642E6 /* Catch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catch.swift; path = RxSwift/Observables/Catch.swift; sourceTree = ""; }; - 682F31A4EBDAD73F8FA6103A24F86135 /* Map.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Map.swift; path = RxSwift/Observables/Map.swift; sourceTree = ""; }; - 695AA91FCCCB0329D8CB85A06927DCC0 /* Switch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Switch.swift; path = RxSwift/Observables/Switch.swift; sourceTree = ""; }; - 69A6DBB63C89D3A668A0AA5EAE28A8F9 /* RxSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-prefix.pch"; sourceTree = ""; }; - 6B5972EF75857BA69BA58F8E2A532827 /* RecursiveScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveScheduler.swift; path = RxSwift/Schedulers/RecursiveScheduler.swift; sourceTree = ""; }; - 6BAC372028D6CC0262943A5AD5481977 /* Zip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Zip.swift; path = RxSwift/Observables/Zip.swift; sourceTree = ""; }; - 6CBC0335847C81A6593808AF6BD15072 /* ToJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToJSON.swift; path = CleanJSON/Classes/ToJSON.swift; sourceTree = ""; }; - 6E604594F8A283EF724AB6C7E234E3AB /* Using.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Using.swift; path = RxSwift/Observables/Using.swift; sourceTree = ""; }; - 6EB89F1C1F3EE47229A3E2625A0A6DB8 /* MoyaProvider+Defaults.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Defaults.swift"; path = "Sources/Moya/MoyaProvider+Defaults.swift"; sourceTree = ""; }; - 6F5570D644607BCEEE76AAE9BBB8CD75 /* GroupedObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupedObservable.swift; path = RxSwift/GroupedObservable.swift; sourceTree = ""; }; - 719D86B8E2B834E7C496D76EA4856081 /* CleanJSON.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = CleanJSON.modulemap; sourceTree = ""; }; - 721A60F6F75DD0639A9B7D5BBF1C076D /* Take.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Take.swift; path = RxSwift/Observables/Take.swift; sourceTree = ""; }; - 7272ACD0906E7715D0D18FA2B1993A8D /* HTTPHeaders.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HTTPHeaders.swift; path = Source/HTTPHeaders.swift; sourceTree = ""; }; - 728A5CE94ADC6BBE578D98A2970CF7E5 /* Debounce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debounce.swift; path = RxSwift/Observables/Debounce.swift; sourceTree = ""; }; - 7305912DFC32F3FF59DB7BB43029E6CC /* Storable.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Storable.modulemap; sourceTree = ""; }; - 735E0B7ADF533FB03E05E8130FB6AAA7 /* Moya+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Moya+Alamofire.swift"; path = "Sources/Moya/Moya+Alamofire.swift"; sourceTree = ""; }; - 743F963E64F679F0153E1325C6457CDE /* Platform.Linux.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Linux.swift; path = Platform/Platform.Linux.swift; sourceTree = ""; }; - 7507AB04B6A04778F26746A46DDEB799 /* PublishSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PublishSubject.swift; path = RxSwift/Subjects/PublishSubject.swift; sourceTree = ""; }; - 759BD7C77CE118418E3D5DC79C62D998 /* Timer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timer.swift; path = RxSwift/Observables/Timer.swift; sourceTree = ""; }; - 779C3CE97C4D1D629211A0D71656A0EF /* Pods_RxNetwork_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_RxNetwork_Example.framework; path = "Pods-RxNetwork_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 77A22401803C87B12D0B1802723F1272 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; - 7954024C12A362D2C9D371BCCB3EAF87 /* RetryWhen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RetryWhen.swift; path = RxSwift/Observables/RetryWhen.swift; sourceTree = ""; }; - 79629427571E5A4629359AEE32373EBB /* Session.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Session.swift; path = Source/Session.swift; sourceTree = ""; }; - 79826CE92822C0DA5DF6E03841EB6EA7 /* ObservableType+PrimitiveSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableType+PrimitiveSequence.swift"; path = "RxSwift/Traits/ObservableType+PrimitiveSequence.swift"; sourceTree = ""; }; - 798FD75BD4753F46C0FD695F89EFDDB3 /* GroupBy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupBy.swift; path = RxSwift/Observables/GroupBy.swift; sourceTree = ""; }; - 7B12291928FC224D625B594FE39B6933 /* SingleAssignmentDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAssignmentDisposable.swift; path = RxSwift/Disposables/SingleAssignmentDisposable.swift; sourceTree = ""; }; - 7B7FA985EB7D75F734C7CA2EB2D46FCF /* MultipartUpload.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartUpload.swift; path = Source/MultipartUpload.swift; sourceTree = ""; }; - 7C8EFFA4AD4EBEEEA1A9C774A7B57920 /* Pods-RxNetwork_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RxNetwork_Tests.release.xcconfig"; sourceTree = ""; }; - 7CA0EAB8F254B265501EB62D22198724 /* Single.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Single.swift; path = RxSwift/Traits/Single.swift; sourceTree = ""; }; - 7E095E2C8DD20BFDA5F1FCC8CB3595EA /* CombineLatest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CombineLatest.swift; path = RxSwift/Observables/CombineLatest.swift; sourceTree = ""; }; - 7E8C21AFBCFE3608F0621611ED0A3D0C /* ObservableType+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableType+Extensions.swift"; path = "RxSwift/ObservableType+Extensions.swift"; sourceTree = ""; }; - 7EEE5BF1C3FC928D9DB3521EDDB05596 /* HistoricalSchedulerTimeConverter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalSchedulerTimeConverter.swift; path = RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift; sourceTree = ""; }; - 7FB9ED27A6CAD7DCA1E077274C69A5DF /* Create.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Create.swift; path = RxSwift/Observables/Create.swift; sourceTree = ""; }; - 809C5FAB588354C9BA37DC3EAB8CB45C /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = RxSwift.framework; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 80A5D97A9C56178B66FFAD5BB7E588E5 /* CleanJSON-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CleanJSON-umbrella.h"; sourceTree = ""; }; - 814EF7F1F72C253BFB1515EAECEF2E95 /* RxMutableBox.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxMutableBox.swift; path = RxSwift/RxMutableBox.swift; sourceTree = ""; }; - 82D5169BDC86D4E269D04AC75CFAAD0F /* NetworkActivityPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkActivityPlugin.swift; path = Sources/Moya/Plugins/NetworkActivityPlugin.swift; sourceTree = ""; }; - 82D5FB094D1408FEDECA47770AE021D3 /* VirtualTimeScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeScheduler.swift; path = RxSwift/Schedulers/VirtualTimeScheduler.swift; sourceTree = ""; }; - 85006244C877C17FC0F9C272A28AE5AB /* TargetType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TargetType.swift; path = Sources/Moya/TargetType.swift; sourceTree = ""; }; - 8536160C31FAE2D30ABF6794C5B973ED /* Multicast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multicast.swift; path = RxSwift/Observables/Multicast.swift; sourceTree = ""; }; - 85AEFC1CE9C6CFF0C9DC58D1D01C1E11 /* SingleAsync.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAsync.swift; path = RxSwift/Observables/SingleAsync.swift; sourceTree = ""; }; - 85C7BBC1943373EB949534FA1A6141F3 /* OperationQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "OperationQueue+Alamofire.swift"; path = "Source/OperationQueue+Alamofire.swift"; sourceTree = ""; }; - 861E72C470DE8D12429C1FD12057B8DB /* HistoricalScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalScheduler.swift; path = RxSwift/Schedulers/HistoricalScheduler.swift; sourceTree = ""; }; - 86FCFCF89D301ACA3B8A628FD0D516DD /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = RxSwift/Observables/Error.swift; sourceTree = ""; }; - 8841B738418B0C983C6F3D555E0218D6 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; - 88E2D4023430038457A6166829D174E3 /* AsSingle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsSingle.swift; path = RxSwift/Observables/AsSingle.swift; sourceTree = ""; }; - 8936BBCF5565CBC7816671C7210C68AC /* Single+Cache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Single+Cache.swift"; path = "RxNetwork/Classes/Cacheable/Single+Cache.swift"; sourceTree = ""; }; - 8A8055B366519FF126F3F9117E7B2E77 /* ScheduledItemType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItemType.swift; path = RxSwift/Schedulers/Internal/ScheduledItemType.swift; sourceTree = ""; }; - 8AEC3EA26361897965229FEFB2F4A8F5 /* Merge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Merge.swift; path = RxSwift/Observables/Merge.swift; sourceTree = ""; }; - 8AEC6E040D68C9C7B617965B7FE982B1 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; - 8C7FDB881B999C5C242F511D29B2BAFA /* ValidationType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ValidationType.swift; path = Sources/Moya/ValidationType.swift; sourceTree = ""; }; - 8D2A95EC0ABEB068F35C91CF47819A37 /* Optional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Optional.swift; path = RxSwift/Observables/Optional.swift; sourceTree = ""; }; - 8D677EBE3FEE830A8C2A0E6EC206C032 /* Maybe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Maybe.swift; path = RxSwift/Traits/Maybe.swift; sourceTree = ""; }; - 8D6FA31584B7AE39A70B37512ADB96FD /* Throttle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Throttle.swift; path = RxSwift/Observables/Throttle.swift; sourceTree = ""; }; - 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 91C250FD91C4063E0F9506D2B3AD3B11 /* Skip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Skip.swift; path = RxSwift/Observables/Skip.swift; sourceTree = ""; }; - 9224BCF600D984030DF4BA9B27515E98 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; - 928C29015E8E4204E5B8EF9C323CFD3B /* Result+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Result+Alamofire.swift"; path = "Source/Result+Alamofire.swift"; sourceTree = ""; }; - 939BCBFA54780CD7352F1BC08EF5DEA9 /* URLRequest+Encoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URLRequest+Encoding.swift"; path = "Sources/Moya/URLRequest+Encoding.swift"; sourceTree = ""; }; - 93E67CA2B5E12EF8A25982254F5A3D3A /* EventMonitor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EventMonitor.swift; path = Source/EventMonitor.swift; sourceTree = ""; }; - 93FD309F50CB1E2423F1B87F4F543327 /* Plugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Plugin.swift; path = Sources/Moya/Plugin.swift; sourceTree = ""; }; - 949F8D414B30ECCE71F49849FA2B888F /* CleanJSON-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CleanJSON-dummy.m"; sourceTree = ""; }; - 95C8D00A9EFAEE9C5673BF0AA4FB49CF /* DispatchQueueConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DispatchQueueConfiguration.swift; path = RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift; sourceTree = ""; }; - 9688CD14ABEB4BA80B7728B79BF8FA6C /* _CleanJSONDecoder+SingleValueDecodingContainer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "_CleanJSONDecoder+SingleValueDecodingContainer.swift"; path = "CleanJSON/Classes/_CleanJSONDecoder+SingleValueDecodingContainer.swift"; sourceTree = ""; }; - 979DE7C7CCEE258A1B193FEDD47412CB /* Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rx.swift; path = RxSwift/Rx.swift; sourceTree = ""; }; - 98DC8B9B4DB99C801A0C8E79147B6C5B /* DistinctUntilChanged.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DistinctUntilChanged.swift; path = RxSwift/Observables/DistinctUntilChanged.swift; sourceTree = ""; }; - 9949405720C91F1B3928A6FC8DE67BCA /* SerialDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDisposable.swift; path = RxSwift/Disposables/SerialDisposable.swift; sourceTree = ""; }; - 9A1ABE91FF7119B3B1F7AB7FDF7F8250 /* AlamofireExtended.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AlamofireExtended.swift; path = Source/AlamofireExtended.swift; sourceTree = ""; }; - 9C4D54E9E2DC6926A9E8357065C503EF /* SkipUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipUntil.swift; path = RxSwift/Observables/SkipUntil.swift; sourceTree = ""; }; - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 9DBA8B8C798DDCF1E0E832462F346A53 /* LockOwnerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LockOwnerType.swift; path = RxSwift/Concurrency/LockOwnerType.swift; sourceTree = ""; }; - 9F7B1A00121E15715E059B62F8B88A92 /* Defaultable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Defaultable.swift; path = CleanJSON/Classes/Defaultable.swift; sourceTree = ""; }; - A03AF092CCB9C5E2F8C0045702DC0B0E /* URLRequest+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URLRequest+Alamofire.swift"; path = "Source/URLRequest+Alamofire.swift"; sourceTree = ""; }; - A0A49F1A5B59ADF706041B162AF816D7 /* RefCountDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RefCountDisposable.swift; path = RxSwift/Disposables/RefCountDisposable.swift; sourceTree = ""; }; - A13108FF29882D9DF6A699C058C71095 /* CombineLatest+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+arity.swift"; path = "RxSwift/Observables/CombineLatest+arity.swift"; sourceTree = ""; }; - A1ADDAF9B2B9A758151C7EBD63DEEA55 /* ElementAt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ElementAt.swift; path = RxSwift/Observables/ElementAt.swift; sourceTree = ""; }; - A4E724893CF26E0AFE980F6D1A1AF727 /* Pods-RxNetwork_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-RxNetwork_Example-umbrella.h"; sourceTree = ""; }; - A656B134EBC88A969EF31CAD2E1BB262 /* SynchronizedOnType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedOnType.swift; path = RxSwift/Concurrency/SynchronizedOnType.swift; sourceTree = ""; }; - A73B2163ABAEFB26B18B8DD5D9BE387F /* CompositeDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompositeDisposable.swift; path = RxSwift/Disposables/CompositeDisposable.swift; sourceTree = ""; }; - A77827598722441D10AE1BC0C5A4C299 /* PrimitiveSequence+Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "PrimitiveSequence+Zip+arity.swift"; path = "RxSwift/Traits/PrimitiveSequence+Zip+arity.swift"; sourceTree = ""; }; - A7BE029CFC14C6B15BC4DC1C7A179303 /* NetworkIndicatorPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkIndicatorPlugin.swift; path = RxNetwork/Classes/Core/NetworkIndicatorPlugin.swift; sourceTree = ""; }; - A803C43D2F6DFF6CA33C9726468213FF /* RequestInterceptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RequestInterceptor.swift; path = Source/RequestInterceptor.swift; sourceTree = ""; }; - A8A145F8B570979700134BC85C9CFCC6 /* RecursiveLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveLock.swift; path = Platform/RecursiveLock.swift; sourceTree = ""; }; - A9559782857BA18C7FC9BE90DD3E2469 /* AsyncSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncSubject.swift; path = RxSwift/Subjects/AsyncSubject.swift; sourceTree = ""; }; - A9CD2C883403FED402CEAF86D47F2869 /* RxNetwork.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = RxNetwork.modulemap; sourceTree = ""; }; - AAFD7355B7CDA4B62F4CF2A77E487EA4 /* SkipWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipWhile.swift; path = RxSwift/Observables/SkipWhile.swift; sourceTree = ""; }; - AE703A575470F61F408DB3BB16673617 /* CredentialsPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CredentialsPlugin.swift; path = Sources/Moya/Plugins/CredentialsPlugin.swift; sourceTree = ""; }; - B01712292DFC16D1D57ED755FCA60CBE /* Sequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sequence.swift; path = RxSwift/Observables/Sequence.swift; sourceTree = ""; }; - B1265B119E3FB3854BFD5D89DEDB1067 /* First.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = First.swift; path = RxSwift/Observables/First.swift; sourceTree = ""; }; - B15D9B0AA6DEBE9C866AE11C773F6670 /* VirtualTimeConverterType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeConverterType.swift; path = RxSwift/Schedulers/VirtualTimeConverterType.swift; sourceTree = ""; }; - B35535633B410093C4DE5E2B6167497A /* Task.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Task.swift; path = Sources/Moya/Task.swift; sourceTree = ""; }; - B3C86F875FF1D2E732185039D587877A /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; - B44AA8B4D28EFEDF548D76837E9809A7 /* RxNetwork.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxNetwork.xcconfig; sourceTree = ""; }; - B67644C6D1BEEF69B034706A372D8A53 /* DispatchQueue+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Extensions.swift"; path = "Platform/DispatchQueue+Extensions.swift"; sourceTree = ""; }; - B9701872D8F873C5C4E090962D6D906B /* DecodingError+CleanJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DecodingError+CleanJSON.swift"; path = "CleanJSON/Classes/DecodingError+CleanJSON.swift"; sourceTree = ""; }; - B9A9622244D8F2D115C3CE97DF746C78 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; - BB39A660E92F24F9C2E03FB9B4BD3AA5 /* SubscribeOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscribeOn.swift; path = RxSwift/Observables/SubscribeOn.swift; sourceTree = ""; }; - BC2CB346ED4ADE0D3CC2B16D179BC8B1 /* OnCache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OnCache.swift; path = RxNetwork/Classes/Cacheable/OnCache.swift; sourceTree = ""; }; - BC7812E51F0D5D8820B7BF23377A3EF2 /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; - BD279FB0379AD77C0DEFBF56E111FB97 /* AccessTokenPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AccessTokenPlugin.swift; path = Sources/Moya/Plugins/AccessTokenPlugin.swift; sourceTree = ""; }; - BD78ACBE6268C2C979C1432A7EA983DC /* Storable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Storable.swift; path = Storable/Classes/Storable.swift; sourceTree = ""; }; - BDB7EE75AAD152F2CE4E40E1E7AE83ED /* Queue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Queue.swift; path = Platform/DataStructures/Queue.swift; sourceTree = ""; }; - BDE9E77D94940D5D7DD20415876A3E16 /* Network.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Network.swift; path = RxNetwork/Classes/Core/Network.swift; sourceTree = ""; }; - BE81A1F5C40DCB3943B3E4A7049659F4 /* Debug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debug.swift; path = RxSwift/Observables/Debug.swift; sourceTree = ""; }; - BF699163D05B2CB287559DABCB13CA81 /* NetworkLoggerPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkLoggerPlugin.swift; path = Sources/Moya/Plugins/NetworkLoggerPlugin.swift; sourceTree = ""; }; - C0300555A02BBBB5D248EBAB60D375CC /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Alamofire.modulemap; sourceTree = ""; }; - C0E44EC19CAB6E07F3358A42656C5666 /* OperationQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OperationQueueScheduler.swift; path = RxSwift/Schedulers/OperationQueueScheduler.swift; sourceTree = ""; }; - C16AF086B70C27FC983D79A0E8387773 /* Reactive.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reactive.swift; path = RxSwift/Reactive.swift; sourceTree = ""; }; - C335C154B53FBB7317765ACDB01DD892 /* Amb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Amb.swift; path = RxSwift/Observables/Amb.swift; sourceTree = ""; }; - C34CE22CAABA0717D94FD6D1A32EEB8B /* SerialDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDispatchQueueScheduler.swift; path = RxSwift/Schedulers/SerialDispatchQueueScheduler.swift; sourceTree = ""; }; - C3527B4D8AC4C309DC3078EF0D13DC89 /* Window.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Window.swift; path = RxSwift/Observables/Window.swift; sourceTree = ""; }; - C4452A356C38B390013F49E6861F9F03 /* Moya-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Moya-Info.plist"; sourceTree = ""; }; - CA39BBC6D19BBC768D9855F31B730801 /* Pods-RxNetwork_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RxNetwork_Example.debug.xcconfig"; sourceTree = ""; }; - CB8D27833ED4C3A77B842960D1232AF0 /* RxNetwork-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "RxNetwork-Info.plist"; sourceTree = ""; }; - CEE2DB1F2EBEBC5455984B053106E5F0 /* Expiry.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expiry.swift; path = Storable/Classes/Expiry.swift; sourceTree = ""; }; - D11AE67F97BE46071E584E1EFC3E8FCE /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Sources/Moya/Response.swift; sourceTree = ""; }; - D1C67944D3204BC7519AD3E3D204EDA9 /* Alamofire-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Alamofire-Info.plist"; sourceTree = ""; }; - D2E61A1FAEAD8564B5C86A1530F30C64 /* Pods-RxNetwork_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-RxNetwork_Example-acknowledgements.markdown"; sourceTree = ""; }; - D3833EC1070CFC25B2E441EDD2C44069 /* AnyEncodable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyEncodable.swift; path = Sources/Moya/AnyEncodable.swift; sourceTree = ""; }; - D3D6D50F313EE33EABB600CF2A22D26B /* Moya.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Moya.modulemap; sourceTree = ""; }; - D595591C9104D8297D280F60DB59ED40 /* Storable.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Storable.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D65433450EA13734A722A57F9B7407C4 /* MoyaProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaProvider.swift; path = Sources/Moya/MoyaProvider.swift; sourceTree = ""; }; - D6DC5195195FAF4F34AB781455F2D408 /* Enumerated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Enumerated.swift; path = RxSwift/Observables/Enumerated.swift; sourceTree = ""; }; - D724F9E434C4C6FE79DD4FBDDFCD8924 /* DelaySubscription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DelaySubscription.swift; path = RxSwift/Observables/DelaySubscription.swift; sourceTree = ""; }; - D79B957550B9FE5AD4CEA67478DE1EA9 /* Empty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Empty.swift; path = RxSwift/Observables/Empty.swift; sourceTree = ""; }; - D7AD7F718460A28E43410E6C3C1D9C34 /* ConcurrentMainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentMainScheduler.swift; path = RxSwift/Schedulers/ConcurrentMainScheduler.swift; sourceTree = ""; }; - D81A3288820421CA37D5D3C9485FF92F /* TargetType+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "TargetType+Rx.swift"; path = "RxNetwork/Classes/Core/TargetType+Rx.swift"; sourceTree = ""; }; - D8E25A7EBE7D5EF10E1251AEBB1E81C3 /* RxNetwork.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = RxNetwork.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - D9B8AA14A5BB1D0CE3A003CB6A566265 /* CleanJSON.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = CleanJSON.framework; path = CleanJSON.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - DA4717A9573AC1214A24AB9C52BB3FDA /* ParameterEncoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoder.swift; path = Source/ParameterEncoder.swift; sourceTree = ""; }; - DB767172E820EC310AAF6698D588B03D /* ScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItem.swift; path = RxSwift/Schedulers/Internal/ScheduledItem.swift; sourceTree = ""; }; - DC64A5BD466779B117A43D110E3E3844 /* CleanJSON.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CleanJSON.xcconfig; sourceTree = ""; }; - DCBB1EB8794FB8B9E214E86C7C12F3DC /* Buffer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Buffer.swift; path = RxSwift/Observables/Buffer.swift; sourceTree = ""; }; - DD446B4044B0702284E4C9270774ADF6 /* Pods-RxNetwork_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-RxNetwork_Tests-umbrella.h"; sourceTree = ""; }; - DE0771BCA1816F78DC9E8AD933233CE5 /* _CleanJSONDecoder+Unbox.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "_CleanJSONDecoder+Unbox.swift"; path = "CleanJSON/Classes/_CleanJSONDecoder+Unbox.swift"; sourceTree = ""; }; - DE60662059C6ED6562467CF8AF04E6BB /* CleanJSONKey.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CleanJSONKey.swift; path = CleanJSON/Classes/CleanJSONKey.swift; sourceTree = ""; }; - DF3A342522F0BDADB8A827C7C6AC5D19 /* URLEncodedFormEncoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = URLEncodedFormEncoder.swift; path = Source/URLEncodedFormEncoder.swift; sourceTree = ""; }; - E07D41639AC9D313877456D98F696801 /* InvocableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableType.swift; path = RxSwift/Schedulers/Internal/InvocableType.swift; sourceTree = ""; }; - E08421280D09D52FD4F2605AB0E024A6 /* BehaviorSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BehaviorSubject.swift; path = RxSwift/Subjects/BehaviorSubject.swift; sourceTree = ""; }; - E3996058E040B343A27929EBE1CB55BD /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E39EE7C7879E14ECC919544F8C5F7475 /* RxSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = RxSwift.modulemap; sourceTree = ""; }; - E4B34E3F2CC0C765C3F50848BBC60264 /* AnonymousDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousDisposable.swift; path = RxSwift/Disposables/AnonymousDisposable.swift; sourceTree = ""; }; - E4EC66EB8543C707E25C6CBFEAC82C66 /* _CleanJSONDecoder+Decode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "_CleanJSONDecoder+Decode.swift"; path = "CleanJSON/Classes/_CleanJSONDecoder+Decode.swift"; sourceTree = ""; }; - E81741DB49DA45B644FE5F2C045E397B /* CleanJSON-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CleanJSON-prefix.pch"; sourceTree = ""; }; - E826D395A7708799C65A366246C748FC /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; - EA2D373967AD90A0B2BF4A6B7FEFCCE9 /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; - EA3822155A90A5D5C18DF899FDDBDBCE /* URLSessionConfiguration+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URLSessionConfiguration+Alamofire.swift"; path = "Source/URLSessionConfiguration+Alamofire.swift"; sourceTree = ""; }; - EA474362A828ED559D629690BEC1D7D2 /* CachedResponseHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CachedResponseHandler.swift; path = Source/CachedResponseHandler.swift; sourceTree = ""; }; - EBF9E916529EE3C7D211886F849EBE1F /* Storable.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Storable.framework; path = Storable.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - ECB20E193A044509AFD5D4252D5C8EB2 /* RetryPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RetryPolicy.swift; path = Source/RetryPolicy.swift; sourceTree = ""; }; - ECE5D7539D94F4721E6F15D82B3093CD /* Storable-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Storable-Info.plist"; sourceTree = ""; }; - ED1BB4C46B6CF646D50FC467C24CEB8C /* SynchronizedUnsubscribeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedUnsubscribeType.swift; path = RxSwift/Concurrency/SynchronizedUnsubscribeType.swift; sourceTree = ""; }; - ED823EC216935E3D6BF084F242AEE0CF /* Pods-RxNetwork_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-RxNetwork_Example.release.xcconfig"; sourceTree = ""; }; - EE628C03C63BF1A17121E68547368A8E /* Pods-RxNetwork_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-RxNetwork_Tests-acknowledgements.plist"; sourceTree = ""; }; - EF7CF6117033948602F4CC5EC0CCE704 /* Bag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bag.swift; path = Platform/DataStructures/Bag.swift; sourceTree = ""; }; - F0957D41E176E3D2095F747B2B86AFED /* RequestTaskMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RequestTaskMap.swift; path = Source/RequestTaskMap.swift; sourceTree = ""; }; - F2ACA0C82EBC8BC64DCF8954AFE69A2C /* Expirable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expirable.swift; path = Storable/Classes/Expirable.swift; sourceTree = ""; }; - F6E6A3F5A8C443707275A5FC84C7B22A /* Single+Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Single+Response.swift"; path = "Sources/RxMoya/Single+Response.swift"; sourceTree = ""; }; - F73078F039339087E1716FB993CAFB1B /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; - FA3AF577DD0BA0FCB910276E72987710 /* InfiniteSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InfiniteSequence.swift; path = Platform/DataStructures/InfiniteSequence.swift; sourceTree = ""; }; - FAA7C3792F17D1CD754DA35C3682084D /* Sink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sink.swift; path = RxSwift/Observables/Sink.swift; sourceTree = ""; }; - FADAFB44968DF01FC53FD92C512A13E0 /* Scan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scan.swift; path = RxSwift/Observables/Scan.swift; sourceTree = ""; }; - FBE2A7C2BD230268379B695AC99D3B22 /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; - FC2B536A7B43694A1136F547B7BABC61 /* StoringKey.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StoringKey.swift; path = Storable/Classes/StoringKey.swift; sourceTree = ""; }; - FCABD9D9E5AD448B3C81381D8CB1102B /* Storable.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Storable.xcconfig; sourceTree = ""; }; - FE40D9904EAF1AE6E613FBA5937BBF09 /* PriorityQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PriorityQueue.swift; path = Platform/DataStructures/PriorityQueue.swift; sourceTree = ""; }; - FEA7FCAC74C591788EB016CD031C14BE /* Producer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Producer.swift; path = RxSwift/Observables/Producer.swift; sourceTree = ""; }; - FF3FC365C1F627270E77770265AE1F56 /* Date+Dispatch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Date+Dispatch.swift"; path = "RxSwift/Date+Dispatch.swift"; sourceTree = ""; }; - FFE45C512CB88FAD255B427E1DF52DFA /* MoyaError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaError.swift; path = Sources/Moya/MoyaError.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 5827CF915CFA7933D0174C302E3A46C7 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -1394,7 +755,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; -<<<<<<< HEAD 9C1C2D14882937DB0594D5E1A90588BE /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -1409,29 +769,12 @@ buildActionMask = 2147483647; files = ( 464450D037D17ED5EE2322E180A6A9F5 /* Foundation.framework in Frameworks */, -======= - 8B0D8633F410345F93419B8C3D7B6916 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 97A168DFB6DB61770CE2DBF4FD39AA8D /* CFNetwork.framework in Frameworks */, - BE82AE980F8C7EE28A6448959194F93A /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8D244E0946A438F1C49031A309164420 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 27D17E9A74CD7336DD27E42FE3A20048 /* Foundation.framework in Frameworks */, ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ -<<<<<<< HEAD 05579B2794EDE79B507F461502FF1AA8 /* RxNetwork */ = { isa = PBXGroup; children = ( @@ -1463,56 +806,9 @@ 4AE3E77D6553F17C9F8A9C6C784F7147 /* Storable-umbrella.h */, BE1CB1FD4AF2BEF7EFB22F254E8A1414 /* Storable.debug.xcconfig */, 095D38A695ADD592EA6F883B7959B353 /* Storable.release.xcconfig */, -======= - 040E08D9026BFDDDC9CCF9CE6388C31A /* Alamofire */ = { - isa = PBXGroup; - children = ( - 0D9E0C0A6A2C197AD72EAEC4D668ED63 /* AFError.swift */, - 3360304947B40D5E4E4FB0E6215BD617 /* Alamofire.swift */, - 9A1ABE91FF7119B3B1F7AB7FDF7F8250 /* AlamofireExtended.swift */, - EA474362A828ED559D629690BEC1D7D2 /* CachedResponseHandler.swift */, - EA2D373967AD90A0B2BF4A6B7FEFCCE9 /* DispatchQueue+Alamofire.swift */, - 93E67CA2B5E12EF8A25982254F5A3D3A /* EventMonitor.swift */, - 7272ACD0906E7715D0D18FA2B1993A8D /* HTTPHeaders.swift */, - 11DFE702054C4BD5D5EFBDDECC9110B9 /* HTTPMethod.swift */, - 8841B738418B0C983C6F3D555E0218D6 /* MultipartFormData.swift */, - 7B7FA985EB7D75F734C7CA2EB2D46FCF /* MultipartUpload.swift */, - 639C9D486342F2E914D01CE5B53B312C /* NetworkReachabilityManager.swift */, - 0DCCC07971370DA9E20F2D232734DEC3 /* Notifications.swift */, - 85C7BBC1943373EB949534FA1A6141F3 /* OperationQueue+Alamofire.swift */, - DA4717A9573AC1214A24AB9C52BB3FDA /* ParameterEncoder.swift */, - FBE2A7C2BD230268379B695AC99D3B22 /* ParameterEncoding.swift */, - 25077B79C9C436FE785C4A0BF19EEF4D /* Protector.swift */, - 23D0BC0262741F7C5D4941DEBA9B5B3B /* RedirectHandler.swift */, - BC7812E51F0D5D8820B7BF23377A3EF2 /* Request.swift */, - A803C43D2F6DFF6CA33C9726468213FF /* RequestInterceptor.swift */, - F0957D41E176E3D2095F747B2B86AFED /* RequestTaskMap.swift */, - 8AEC6E040D68C9C7B617965B7FE982B1 /* Response.swift */, - B9A9622244D8F2D115C3CE97DF746C78 /* ResponseSerialization.swift */, - 928C29015E8E4204E5B8EF9C323CFD3B /* Result+Alamofire.swift */, - ECB20E193A044509AFD5D4252D5C8EB2 /* RetryPolicy.swift */, - 07AB21035AAE78659F9A291E09E98E51 /* ServerTrustEvaluation.swift */, - 79629427571E5A4629359AEE32373EBB /* Session.swift */, - B3C86F875FF1D2E732185039D587877A /* SessionDelegate.swift */, - 0155A27751A44BBC9201A2BE2839BACF /* URLConvertible+URLRequestConvertible.swift */, - DF3A342522F0BDADB8A827C7C6AC5D19 /* URLEncodedFormEncoder.swift */, - A03AF092CCB9C5E2F8C0045702DC0B0E /* URLRequest+Alamofire.swift */, - EA3822155A90A5D5C18DF899FDDBDBCE /* URLSessionConfiguration+Alamofire.swift */, - F73078F039339087E1716FB993CAFB1B /* Validation.swift */, - 53F83216F373445449EA85B26B2487DB /* Support Files */, - ); - name = Alamofire; - path = Alamofire; - sourceTree = ""; - }; - 05C06891358A349995EF1A37F9C6C676 /* iOS */ = { - isa = PBXGroup; - children = ( - 9224BCF600D984030DF4BA9B27515E98 /* CFNetwork.framework */, - 90F190B9653534F4CF5FC27935A1EE36 /* Foundation.framework */, ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ); - name = iOS; + name = "Support Files"; + path = "../Target Support Files/Storable"; sourceTree = ""; }; 09D3A61B941318AAF00FD8ECB84282FF /* Core */ = { @@ -1704,7 +1000,6 @@ path = RxSwift; sourceTree = ""; }; -<<<<<<< HEAD 10D6C93D9E002C2AE6369B59327E2CF5 /* Support Files */ = { isa = PBXGroup; children = ( @@ -1727,73 +1022,6 @@ 43BAE8A929CD18C5347CFB602E32EA17 /* Pods-RxNetwork_Tests */, ); name = "Targets Support Files"; -======= - 194A9F399F5C626983D27045C74AD788 /* Core */ = { - isa = PBXGroup; - children = ( - BD279FB0379AD77C0DEFBF56E111FB97 /* AccessTokenPlugin.swift */, - D3833EC1070CFC25B2E441EDD2C44069 /* AnyEncodable.swift */, - 3DAFDF14D7E2402F24790D2D734B6C3F /* Cancellable.swift */, - AE703A575470F61F408DB3BB16673617 /* CredentialsPlugin.swift */, - 529E32B5967D7B7736D2300409987860 /* Endpoint.swift */, - 0E3ADEF449D0B103EE3402AD75506165 /* Image.swift */, - 735E0B7ADF533FB03E05E8130FB6AAA7 /* Moya+Alamofire.swift */, - FFE45C512CB88FAD255B427E1DF52DFA /* MoyaError.swift */, - D65433450EA13734A722A57F9B7407C4 /* MoyaProvider.swift */, - 6EB89F1C1F3EE47229A3E2625A0A6DB8 /* MoyaProvider+Defaults.swift */, - 28B8D6402EC2E9A285779EA777AA383E /* MoyaProvider+Internal.swift */, - 26001D00430D9B9444425CDDC302B6EE /* MultipartFormData.swift */, - 15A0009216B5B3646AD8F3999C55DA03 /* MultiTarget.swift */, - 82D5169BDC86D4E269D04AC75CFAAD0F /* NetworkActivityPlugin.swift */, - BF699163D05B2CB287559DABCB13CA81 /* NetworkLoggerPlugin.swift */, - 93FD309F50CB1E2423F1B87F4F543327 /* Plugin.swift */, - 1269D050A65D41CF590F03FF3C580ED5 /* RequestTypeWrapper.swift */, - D11AE67F97BE46071E584E1EFC3E8FCE /* Response.swift */, - 85006244C877C17FC0F9C272A28AE5AB /* TargetType.swift */, - B35535633B410093C4DE5E2B6167497A /* Task.swift */, - 2C010E1639E2F11C575C8682DF661753 /* URL+Moya.swift */, - 939BCBFA54780CD7352F1BC08EF5DEA9 /* URLRequest+Encoding.swift */, - 8C7FDB881B999C5C242F511D29B2BAFA /* ValidationType.swift */, - ); - name = Core; - sourceTree = ""; - }; - 263288802A0B47814C74B692C694B3B2 /* Frameworks */ = { - isa = PBXGroup; - children = ( - E3996058E040B343A27929EBE1CB55BD /* Alamofire.framework */, - 33B7AE29589319D1045D96DADFD3BF9D /* Moya.framework */, - 57857C02D75DE4B780347BC7585AD918 /* RxSwift.framework */, - D595591C9104D8297D280F60DB59ED40 /* Storable.framework */, - 05C06891358A349995EF1A37F9C6C676 /* iOS */, - ); - name = Frameworks; - sourceTree = ""; - }; - 38452AA0E95CC8B96A87F45F678A4B98 /* CleanJSON */ = { - isa = PBXGroup; - children = ( - 5831D0F980A47608C413B52F2775B2AF /* _CleanJSONDecoder.swift */, - E4EC66EB8543C707E25C6CBFEAC82C66 /* _CleanJSONDecoder+Decode.swift */, - 9688CD14ABEB4BA80B7728B79BF8FA6C /* _CleanJSONDecoder+SingleValueDecodingContainer.swift */, - DE0771BCA1816F78DC9E8AD933233CE5 /* _CleanJSONDecoder+Unbox.swift */, - 41E30F00D82E0EABF90F741F3F00934B /* CaseDefaultable.swift */, - 25C9B6314018A8F3F6932FC6B4CACC66 /* CleanDecoder.swift */, - 0A7B0120AD583D7C97127B80C5D4A3E2 /* CleanJSONDecoder.swift */, - 560CC10DED41878C84F1C22A45BC99DB /* CleanJSONDecodingStorage.swift */, - DE60662059C6ED6562467CF8AF04E6BB /* CleanJSONKey.swift */, - 2AF09C4080D910C5C0C113ABBCF9DD4A /* CleanJSONKeyedDecodingContainer.swift */, - 641365161F8FEB44E0AB88705E928C9A /* CleanJSONUnkeyedDecodingContainer.swift */, - B9701872D8F873C5C4E090962D6D906B /* DecodingError+CleanJSON.swift */, - 03EE4BBD901BC76B6F5FB868C7CE7770 /* DecodingStrategy.swift */, - 9F7B1A00121E15715E059B62F8B88A92 /* Defaultable.swift */, - 0B8DBA2B42F455D8ED1928B25AA28231 /* JSONAdapter.swift */, - 6CBC0335847C81A6593808AF6BD15072 /* ToJSON.swift */, - B4BEC02E15492E15B34694204D7DDA65 /* Support Files */, - ); - name = CleanJSON; - path = CleanJSON; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 sourceTree = ""; }; 263288802A0B47814C74B692C694B3B2 /* Frameworks */ = { @@ -1862,7 +1090,6 @@ path = "Target Support Files/Pods-RxNetwork_Tests"; sourceTree = ""; }; -<<<<<<< HEAD 510DF35B0EFE4A0C0A314B473F85A00B /* Support Files */ = { isa = PBXGroup; children = ( @@ -1902,193 +1129,6 @@ E9ED06A9D0266B72F2774F05DED1CCD7 /* TargetType+Rx.swift */, ); name = Core; -======= - 53F83216F373445449EA85B26B2487DB /* Support Files */ = { - isa = PBXGroup; - children = ( - C0300555A02BBBB5D248EBAB60D375CC /* Alamofire.modulemap */, - 15B163DB9ED27819E703C7DD55E3086D /* Alamofire.xcconfig */, - E826D395A7708799C65A366246C748FC /* Alamofire-dummy.m */, - D1C67944D3204BC7519AD3E3D204EDA9 /* Alamofire-Info.plist */, - 4836F36A4566F57D0561E2D3D234CE4C /* Alamofire-prefix.pch */, - 3F01DF301043248C41FEEBBA26129AD9 /* Alamofire-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/Alamofire"; - sourceTree = ""; - }; - 774D0CE253900C61C6AC212542BD8188 /* Support Files */ = { - isa = PBXGroup; - children = ( - D3D6D50F313EE33EABB600CF2A22D26B /* Moya.modulemap */, - 1230F5D6549CDECCC50F73CA40606D38 /* Moya.xcconfig */, - 664784C9FEE826AE30A4DC20EFF9B210 /* Moya-dummy.m */, - C4452A356C38B390013F49E6861F9F03 /* Moya-Info.plist */, - 550B72C90CDA9426C559F582249F33EB /* Moya-prefix.pch */, - 00E8A7AD482299847A1C182FD859816F /* Moya-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/Moya"; - sourceTree = ""; - }; - 7E6A495A02F79C7B79AD1E3C2FF4D16C /* RxSwift */ = { - isa = PBXGroup; - children = ( - 00F48811F32ED6B14A18D99CFF3ABDF5 /* AddRef.swift */, - C335C154B53FBB7317765ACDB01DD892 /* Amb.swift */, - E4B34E3F2CC0C765C3F50848BBC60264 /* AnonymousDisposable.swift */, - 5770DC337A160CBCBAAF65D0814BE1DD /* AnonymousObserver.swift */, - 5B01892F6E0DCC19983E676CA91CE7C3 /* AnyObserver.swift */, - 0B32437417BEDC48410FA3AEA83CA35D /* AsMaybe.swift */, - 88E2D4023430038457A6166829D174E3 /* AsSingle.swift */, - 1F61709F9216696592A896A59C7F31C3 /* AsyncLock.swift */, - A9559782857BA18C7FC9BE90DD3E2469 /* AsyncSubject.swift */, - 09F47E44CB91BA470DADA5AC2730DE8E /* AtomicInt.swift */, - EF7CF6117033948602F4CC5EC0CCE704 /* Bag.swift */, - 4CDDE44860C3D293EDD5864A7747678A /* Bag+Rx.swift */, - E08421280D09D52FD4F2605AB0E024A6 /* BehaviorSubject.swift */, - 4E39A8C986CCD91EE152B5E2A5B1E2BE /* BinaryDisposable.swift */, - 0D0182C40148B767BECBB0FA23E510C4 /* BooleanDisposable.swift */, - DCBB1EB8794FB8B9E214E86C7C12F3DC /* Buffer.swift */, - 042F6D18E472DA3FF75AB8F1F2D4FD7A /* Cancelable.swift */, - 6793166E9DB973FEFDA7222B302642E6 /* Catch.swift */, - 7E095E2C8DD20BFDA5F1FCC8CB3595EA /* CombineLatest.swift */, - A13108FF29882D9DF6A699C058C71095 /* CombineLatest+arity.swift */, - 0BBB378EA135E7A669C8FAED75C87852 /* CombineLatest+Collection.swift */, - 02E8344CB771BC0261905156BDFB1ECD /* CompactMap.swift */, - 2D00E8B4BC0F2F60A6A675F27507B892 /* Completable.swift */, - 27657E2446314F5E883890BB9CF65A96 /* Completable+AndThen.swift */, - A73B2163ABAEFB26B18B8DD5D9BE387F /* CompositeDisposable.swift */, - 28A53A781B86175B9536777361F8146C /* Concat.swift */, - 5B656E9F068A7DB6E16A700CBE785E4C /* ConcurrentDispatchQueueScheduler.swift */, - D7AD7F718460A28E43410E6C3C1D9C34 /* ConcurrentMainScheduler.swift */, - 00C29BECB773B6BE1D2007D1AF32D732 /* ConnectableObservableType.swift */, - 7FB9ED27A6CAD7DCA1E077274C69A5DF /* Create.swift */, - 5251754EFE1F1454D191CB2B0621E79E /* CurrentThreadScheduler.swift */, - FF3FC365C1F627270E77770265AE1F56 /* Date+Dispatch.swift */, - 728A5CE94ADC6BBE578D98A2970CF7E5 /* Debounce.swift */, - BE81A1F5C40DCB3943B3E4A7049659F4 /* Debug.swift */, - 63B3B1C869DE4C76A671F85CD34A5DDE /* DefaultIfEmpty.swift */, - 01D680BDE31FF351B83D13C18A58A061 /* Deferred.swift */, - 187D7A5430029C0FB277BDFC310256DB /* Delay.swift */, - D724F9E434C4C6FE79DD4FBDDFCD8924 /* DelaySubscription.swift */, - 05CE65C0B8F9C4B8E3217C0D61554E73 /* Dematerialize.swift */, - 463649D510E1F84A0E3530555E650103 /* Deprecated.swift */, - B67644C6D1BEEF69B034706A372D8A53 /* DispatchQueue+Extensions.swift */, - 95C8D00A9EFAEE9C5673BF0AA4FB49CF /* DispatchQueueConfiguration.swift */, - 364329314AA5ED177E098B7690F581EB /* Disposable.swift */, - 3B14188F54C73DD0EF23A38C04ADB52C /* Disposables.swift */, - 2BB2FB18CABAC711A05FFFBD34F7C863 /* DisposeBag.swift */, - 30D6863963F25CF2127172989004C4AE /* DisposeBase.swift */, - 98DC8B9B4DB99C801A0C8E79147B6C5B /* DistinctUntilChanged.swift */, - 529B7340B94A264D366B96E9440E8475 /* Do.swift */, - A1ADDAF9B2B9A758151C7EBD63DEEA55 /* ElementAt.swift */, - D79B957550B9FE5AD4CEA67478DE1EA9 /* Empty.swift */, - D6DC5195195FAF4F34AB781455F2D408 /* Enumerated.swift */, - 86FCFCF89D301ACA3B8A628FD0D516DD /* Error.swift */, - 4AF05A6267146BE8845DE6CCC44618CB /* Errors.swift */, - 30166D92334237F1FE293CE8FD5100B7 /* Event.swift */, - 5F64C1A4EBA305197026AB75744735C7 /* Filter.swift */, - B1265B119E3FB3854BFD5D89DEDB1067 /* First.swift */, - 40C05AF02E95A48779CF2537049E5D06 /* Generate.swift */, - 798FD75BD4753F46C0FD695F89EFDDB3 /* GroupBy.swift */, - 6F5570D644607BCEEE76AAE9BBB8CD75 /* GroupedObservable.swift */, - 861E72C470DE8D12429C1FD12057B8DB /* HistoricalScheduler.swift */, - 7EEE5BF1C3FC928D9DB3521EDDB05596 /* HistoricalSchedulerTimeConverter.swift */, - 35819493E8DAF0DF9E255025E558D35D /* ImmediateSchedulerType.swift */, - FA3AF577DD0BA0FCB910276E72987710 /* InfiniteSequence.swift */, - 38D3BC2F9C6556E44CF8BDFCDB619244 /* InvocableScheduledItem.swift */, - E07D41639AC9D313877456D98F696801 /* InvocableType.swift */, - 3A8ACD9477A34BF0C026623E4C5BE26C /* Just.swift */, - 41639DA5B66904EF85EAC1D3F23620AB /* Lock.swift */, - 9DBA8B8C798DDCF1E0E832462F346A53 /* LockOwnerType.swift */, - 41B73D42DF7028FC8F8C1D609E6F482B /* MainScheduler.swift */, - 682F31A4EBDAD73F8FA6103A24F86135 /* Map.swift */, - 51EF7A39F7CD9F7B9071BD1411BBFFC0 /* Materialize.swift */, - 8D677EBE3FEE830A8C2A0E6EC206C032 /* Maybe.swift */, - 8AEC3EA26361897965229FEFB2F4A8F5 /* Merge.swift */, - 8536160C31FAE2D30ABF6794C5B973ED /* Multicast.swift */, - 37CF58E6838CF5CD626AF8FF6A0A6DAA /* Never.swift */, - 29D74079F6E0A9577781D08780825E23 /* NopDisposable.swift */, - 59A86BB29593AE143F2A90A0A0117848 /* Observable.swift */, - 19A3B0194EB018DE726757882EC6C278 /* ObservableConvertibleType.swift */, - 4ED0EFDDD3DA03BA614FC526956AD80B /* ObservableType.swift */, - 7E8C21AFBCFE3608F0621611ED0A3D0C /* ObservableType+Extensions.swift */, - 79826CE92822C0DA5DF6E03841EB6EA7 /* ObservableType+PrimitiveSequence.swift */, - 5A5C140540238D70BDA4341D06774A37 /* ObserveOn.swift */, - 5C2909A3ECA805A0D5F7AE75282DEAA3 /* ObserverBase.swift */, - 504877C49BAB3D6A6564F6A8406DE058 /* ObserverType.swift */, - C0E44EC19CAB6E07F3358A42656C5666 /* OperationQueueScheduler.swift */, - 8D2A95EC0ABEB068F35C91CF47819A37 /* Optional.swift */, - 37BA23586CD16D00BFAACE2440BB5E56 /* Platform.Darwin.swift */, - 743F963E64F679F0153E1325C6457CDE /* Platform.Linux.swift */, - 3E345660245FEA0A98648AF1FC293054 /* PrimitiveSequence.swift */, - A77827598722441D10AE1BC0C5A4C299 /* PrimitiveSequence+Zip+arity.swift */, - FE40D9904EAF1AE6E613FBA5937BBF09 /* PriorityQueue.swift */, - FEA7FCAC74C591788EB016CD031C14BE /* Producer.swift */, - 7507AB04B6A04778F26746A46DDEB799 /* PublishSubject.swift */, - BDB7EE75AAD152F2CE4E40E1E7AE83ED /* Queue.swift */, - 3733079D45E8CFB50B79339CD9669868 /* Range.swift */, - C16AF086B70C27FC983D79A0E8387773 /* Reactive.swift */, - A8A145F8B570979700134BC85C9CFCC6 /* RecursiveLock.swift */, - 6B5972EF75857BA69BA58F8E2A532827 /* RecursiveScheduler.swift */, - 35374A5864D6B9380A3D4DAC9FA0E275 /* Reduce.swift */, - A0A49F1A5B59ADF706041B162AF816D7 /* RefCountDisposable.swift */, - 4301AB0202F97540AAC919EA7420908C /* Repeat.swift */, - 16D1449ECBA8B988B81592890BE9411C /* ReplaySubject.swift */, - 7954024C12A362D2C9D371BCCB3EAF87 /* RetryWhen.swift */, - 979DE7C7CCEE258A1B193FEDD47412CB /* Rx.swift */, - 814EF7F1F72C253BFB1515EAECEF2E95 /* RxMutableBox.swift */, - 4654A2194D68676CBB504D17BF8737A9 /* Sample.swift */, - FADAFB44968DF01FC53FD92C512A13E0 /* Scan.swift */, - 30AB203E330E3E3A44A8CE7A4AD32F06 /* ScheduledDisposable.swift */, - DB767172E820EC310AAF6698D588B03D /* ScheduledItem.swift */, - 8A8055B366519FF126F3F9117E7B2E77 /* ScheduledItemType.swift */, - 1EA77340F3AB5CB93DD5F4124BF6DB3C /* SchedulerServices+Emulation.swift */, - 1590E68C50A858D5BE4B5ACA8DE9054C /* SchedulerType.swift */, - B01712292DFC16D1D57ED755FCA60CBE /* Sequence.swift */, - C34CE22CAABA0717D94FD6D1A32EEB8B /* SerialDispatchQueueScheduler.swift */, - 9949405720C91F1B3928A6FC8DE67BCA /* SerialDisposable.swift */, - 5A5E35544117C19CDB755F141E3FD6E2 /* ShareReplayScope.swift */, - 7CA0EAB8F254B265501EB62D22198724 /* Single.swift */, - 7B12291928FC224D625B594FE39B6933 /* SingleAssignmentDisposable.swift */, - 85AEFC1CE9C6CFF0C9DC58D1D01C1E11 /* SingleAsync.swift */, - FAA7C3792F17D1CD754DA35C3682084D /* Sink.swift */, - 91C250FD91C4063E0F9506D2B3AD3B11 /* Skip.swift */, - 9C4D54E9E2DC6926A9E8357065C503EF /* SkipUntil.swift */, - AAFD7355B7CDA4B62F4CF2A77E487EA4 /* SkipWhile.swift */, - 5E3E0054DBA7B90B96396D8F00296894 /* StartWith.swift */, - 47F1093F951EA26C495502243242A32D /* SubjectType.swift */, - BB39A660E92F24F9C2E03FB9B4BD3AA5 /* SubscribeOn.swift */, - 646BDA19988FA945F6E15486C09CEE14 /* SubscriptionDisposable.swift */, - 280D123D64FD39B89DA7471CE311B203 /* SwiftSupport.swift */, - 695AA91FCCCB0329D8CB85A06927DCC0 /* Switch.swift */, - 0C62F5F4D65C9F52703F35A4077451FA /* SwitchIfEmpty.swift */, - 60A6ED0686DE61B741FEECD2304A78B1 /* SynchronizedDisposeType.swift */, - A656B134EBC88A969EF31CAD2E1BB262 /* SynchronizedOnType.swift */, - ED1BB4C46B6CF646D50FC467C24CEB8C /* SynchronizedUnsubscribeType.swift */, - 303DEE2BF4F0300BE8A79FE22C7F176F /* TailRecursiveSink.swift */, - 721A60F6F75DD0639A9B7D5BBF1C076D /* Take.swift */, - 2DEC155776CB51B34C93F9671FE96DE6 /* TakeLast.swift */, - 42C43178C6AE1079FBFC3040991DB18B /* TakeUntil.swift */, - 179FF1ED79662CAA650152FC2882DA0C /* TakeWhile.swift */, - 8D6FA31584B7AE39A70B37512ADB96FD /* Throttle.swift */, - 5DAF0DE62D870E7AC4F5E9FCE81AA126 /* Timeout.swift */, - 759BD7C77CE118418E3D5DC79C62D998 /* Timer.swift */, - 3FFA9A074EE3EE4EA4DA4767764A1523 /* ToArray.swift */, - 6E604594F8A283EF724AB6C7E234E3AB /* Using.swift */, - B15D9B0AA6DEBE9C866AE11C773F6670 /* VirtualTimeConverterType.swift */, - 82D5FB094D1408FEDECA47770AE021D3 /* VirtualTimeScheduler.swift */, - C3527B4D8AC4C309DC3078EF0D13DC89 /* Window.swift */, - 0A6C199C0948ADBB3613F7AC1F70165E /* WithLatestFrom.swift */, - 6BAC372028D6CC0262943A5AD5481977 /* Zip.swift */, - 43A8DCCC33363B59747A2AD458C3DB82 /* Zip+arity.swift */, - 3F49890A3C735CD63BA040A631237763 /* Zip+Collection.swift */, - FA9BB6F7AD0DD7E8F276E9A223ED4997 /* Support Files */, - ); - name = RxSwift; - path = RxSwift; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 sourceTree = ""; }; 6CE71EFA6FF1A9DC3C7C2E2463F9BE16 /* Alamofire */ = { @@ -2143,7 +1183,6 @@ path = SwiftyJSON; sourceTree = ""; }; -<<<<<<< HEAD 96AB80EB419A997521F3E00D2766662B /* Moya */ = { isa = PBXGroup; children = ( @@ -2153,33 +1192,6 @@ ); name = Moya; path = Moya; -======= - 8D0B84232D8DDF0DA1C25047FBD72B31 /* Products */ = { - isa = PBXGroup; - children = ( - 5D797E9A5C5782CE845840781FA1CC81 /* Alamofire.framework */, - D9B8AA14A5BB1D0CE3A003CB6A566265 /* CleanJSON.framework */, - 3756A9BBE41ABEE8DCBF5BCA6972C4DA /* Moya.framework */, - 779C3CE97C4D1D629211A0D71656A0EF /* Pods_RxNetwork_Example.framework */, - 09B3AB5E5543F51A3C3E4EA4B410EC5D /* Pods_RxNetwork_Tests.framework */, - 0535CEBD31800342D461C28837CFCC26 /* RxNetwork.framework */, - 809C5FAB588354C9BA37DC3EAB8CB45C /* RxSwift.framework */, - EBF9E916529EE3C7D211886F849EBE1F /* Storable.framework */, - ); - name = Products; - sourceTree = ""; - }; - 96D4A1737A25162825928E42CE923283 /* Pods */ = { - isa = PBXGroup; - children = ( - 040E08D9026BFDDDC9CCF9CE6388C31A /* Alamofire */, - 38452AA0E95CC8B96A87F45F678A4B98 /* CleanJSON */, - DBF9E9D20B2CAA806C985FF4BD698079 /* Moya */, - 7E6A495A02F79C7B79AD1E3C2FF4D16C /* RxSwift */, - C24383A24BCB8030BBB2493B2BD76A9B /* Storable */, - ); - name = Pods; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 sourceTree = ""; }; 97362DF41331F624AD20379D106DECF8 /* Development Pods */ = { @@ -2190,7 +1202,6 @@ name = "Development Pods"; sourceTree = ""; }; -<<<<<<< HEAD AA9C6757E93004BC249A6196F3F329AB /* Support Files */ = { isa = PBXGroup; children = ( @@ -2219,57 +1230,6 @@ ); name = "Support Files"; path = "Example/Pods/Target Support Files/RxNetwork"; -======= - AEFE8092F2A7F0316FBCC05B484B8C17 /* Support Files */ = { - isa = PBXGroup; - children = ( - 7305912DFC32F3FF59DB7BB43029E6CC /* Storable.modulemap */, - FCABD9D9E5AD448B3C81381D8CB1102B /* Storable.xcconfig */, - 490C3FB7BB938B78F6B59DFCB1960E27 /* Storable-dummy.m */, - ECE5D7539D94F4721E6F15D82B3093CD /* Storable-Info.plist */, - 1A0E004B8BE65DFB6D11E0A76E786EB2 /* Storable-prefix.pch */, - 41AEC6686243F9B74940C11D8EBBB004 /* Storable-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/Storable"; - sourceTree = ""; - }; - B4BEC02E15492E15B34694204D7DDA65 /* Support Files */ = { - isa = PBXGroup; - children = ( - 719D86B8E2B834E7C496D76EA4856081 /* CleanJSON.modulemap */, - DC64A5BD466779B117A43D110E3E3844 /* CleanJSON.xcconfig */, - 949F8D414B30ECCE71F49849FA2B888F /* CleanJSON-dummy.m */, - 162899CE5F8408408EE1FB50D895D8D0 /* CleanJSON-Info.plist */, - E81741DB49DA45B644FE5F2C045E397B /* CleanJSON-prefix.pch */, - 80A5D97A9C56178B66FFAD5BB7E588E5 /* CleanJSON-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/CleanJSON"; - sourceTree = ""; - }; - C24383A24BCB8030BBB2493B2BD76A9B /* Storable */ = { - isa = PBXGroup; - children = ( - F2ACA0C82EBC8BC64DCF8954AFE69A2C /* Expirable.swift */, - CEE2DB1F2EBEBC5455984B053106E5F0 /* Expiry.swift */, - BD78ACBE6268C2C979C1432A7EA983DC /* Storable.swift */, - FC2B536A7B43694A1136F547B7BABC61 /* StoringKey.swift */, - AEFE8092F2A7F0316FBCC05B484B8C17 /* Support Files */, - ); - name = Storable; - path = Storable; - sourceTree = ""; - }; - CC2A5CAB947EC64467C7436D74F5E958 /* RxSwift */ = { - isa = PBXGroup; - children = ( - 1C31FEA0D1425EE3692D61D9C898F57A /* MoyaProvider+Rx.swift */, - 0BDF9D9BF1A5774EA0FF1D5147B3CAE5 /* Observable+Response.swift */, - F6E6A3F5A8C443707275A5FC84C7B22A /* Single+Response.swift */, - ); - name = RxSwift; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 sourceTree = ""; }; CF1408CF629C7361332E53B88F7BD30C = { @@ -2278,13 +1238,8 @@ 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, 97362DF41331F624AD20379D106DECF8 /* Development Pods */, 263288802A0B47814C74B692C694B3B2 /* Frameworks */, -<<<<<<< HEAD 35D64357AE8FD2F31DE813CCD34EAC39 /* Pods */, E681BE2A5F078BED40D55710DAAC6CAA /* Products */, -======= - 96D4A1737A25162825928E42CE923283 /* Pods */, - 8D0B84232D8DDF0DA1C25047FBD72B31 /* Products */, ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 15E2C5C54A631B70BE62623D551165CB /* Targets Support Files */, ); sourceTree = ""; @@ -2306,26 +1261,16 @@ path = "Target Support Files/Pods-RxNetwork_Example"; sourceTree = ""; }; -<<<<<<< HEAD D6734C79CDD41ED47E98D30A3CE6D3E7 /* RxSwift */ = { isa = PBXGroup; children = ( D30AEABFA457846FE8D57A09C15BC5A7 /* MoyaProvider+Rx.swift */, 51216CC24E32B0190495566905E0C7B5 /* Observable+Response.swift */, 02F0E81ED9A6717A7C59505E3B1B0A0A /* Single+Response.swift */, -======= - DBF9E9D20B2CAA806C985FF4BD698079 /* Moya */ = { - isa = PBXGroup; - children = ( - 194A9F399F5C626983D27045C74AD788 /* Core */, - CC2A5CAB947EC64467C7436D74F5E958 /* RxSwift */, - 774D0CE253900C61C6AC212542BD8188 /* Support Files */, ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ); name = RxSwift; sourceTree = ""; }; -<<<<<<< HEAD DDFAD0E03B0EBE41D3F3558BA54D9138 /* Storable */ = { isa = PBXGroup; children = ( @@ -2378,20 +1323,6 @@ ); name = "Support Files"; path = "../Target Support Files/SwiftyJSON"; -======= - FA9BB6F7AD0DD7E8F276E9A223ED4997 /* Support Files */ = { - isa = PBXGroup; - children = ( - E39EE7C7879E14ECC919544F8C5F7475 /* RxSwift.modulemap */, - 101CF6E4DBB4F31242ACCBBCEEF51240 /* RxSwift.xcconfig */, - 5E85E4742C5653939DD7B7EF76521AD3 /* RxSwift-dummy.m */, - 43DE38FFE186F6ACF2E014F6C148D2EA /* RxSwift-Info.plist */, - 69A6DBB63C89D3A668A0AA5EAE28A8F9 /* RxSwift-prefix.pch */, - 590D849D15959506945ED0D2C4D34D1B /* RxSwift-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/RxSwift"; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 sourceTree = ""; }; FA8F9EF8DEBA7942526DA90138781793 /* Cacheable */ = { @@ -2410,17 +1341,6 @@ /* Begin PBXHeadersBuildPhase section */ 1699665B56976CE5784FE86E7B372CF2 /* Headers */ = { -<<<<<<< HEAD -======= - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 485E14141484EF943B5921F0C630C4D2 /* Moya-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1E40659C0D7F98272303BDA940C5303C /* Headers */ = { ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( @@ -2428,19 +1348,11 @@ ); runOnlyForDeploymentPostprocessing = 0; }; -<<<<<<< HEAD 1E40659C0D7F98272303BDA940C5303C /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( B90D2337F2914FE4C357BF9742C11E90 /* Pods-RxNetwork_Tests-umbrella.h in Headers */, -======= - 4C94722D3DF87E9ACD4556F52450EF9D /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - F30644E28EACE951945892FE12E511A8 /* Pods-RxNetwork_Example-umbrella.h in Headers */, ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2468,7 +1380,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; -<<<<<<< HEAD 658FA3AB172EFD4A3828CA5647A24193 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -2485,8 +1396,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; -======= ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 A8E36EA9700124B0E95D0F961520943A /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -2495,19 +1404,11 @@ ); runOnlyForDeploymentPostprocessing = 0; }; -<<<<<<< HEAD DD5134CC0AD214337C10CC46995CC3CE /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 2BC73DE30871EA6F7D9F600D50F11726 /* Alamofire-umbrella.h in Headers */, -======= - ADDF288DD930A46B5F0F198C225895C9 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 00FA97D56201027AEB1C7692A2C3CF8B /* Alamofire-umbrella.h in Headers */, ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2593,26 +1494,16 @@ }; 8E13C526B33E1AD69D45907AC0ED80E5 /* Pods-RxNetwork_Example */ = { isa = PBXNativeTarget; -<<<<<<< HEAD buildConfigurationList = 12C2941779A122114C9DB12C7522E135 /* Build configuration list for PBXNativeTarget "Pods-RxNetwork_Example" */; buildPhases = ( 658FA3AB172EFD4A3828CA5647A24193 /* Headers */, C89BF6FD4D1BC3BA7AC6556547318827 /* Sources */, 277547051B7E486FC87DAF6EE67B0413 /* Frameworks */, 57BEC6C3745C83EB31C1BD659B32804B /* Resources */, -======= - buildConfigurationList = 278A8DCB634E7A42979AA196F859E78B /* Build configuration list for PBXNativeTarget "Pods-RxNetwork_Example" */; - buildPhases = ( - 4C94722D3DF87E9ACD4556F52450EF9D /* Headers */, - F00C232490417506900E127ED7344503 /* Sources */, - 8D244E0946A438F1C49031A309164420 /* Frameworks */, - 4481DEDCB6B2A3941F3226994974795C /* Resources */, ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ); buildRules = ( ); dependencies = ( -<<<<<<< HEAD 0CF6E9795A1CFF0C5378DDA4141ECD29 /* PBXTargetDependency */, FA4D23C91A9B119A98B0E48C28D4F275 /* PBXTargetDependency */, 79611EA2F1B458831848D65B76DDB668 /* PBXTargetDependency */, @@ -2620,14 +1511,6 @@ 9E3795284E97D855A983DBA9FC4032A8 /* PBXTargetDependency */, AC42F5146EE3991016C41F53077722DD /* PBXTargetDependency */, 0B610B74F3E89D99DD571DB870A94AB9 /* PBXTargetDependency */, -======= - FCA358A555CE5E1A32A69B2FE809712A /* PBXTargetDependency */, - 8A89C6DB95BCAFC2F7C5E58CB2DFB7EF /* PBXTargetDependency */, - 382A8440DD2B4609A5EF8A645D84B9C8 /* PBXTargetDependency */, - 6DDBA74C3772E032B73B91ABD36FA5B3 /* PBXTargetDependency */, - 83585899D592A272A6EBC62EDE1ED7B2 /* PBXTargetDependency */, - 2824E3B970C49D9345435CB62E86D265 /* PBXTargetDependency */, ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ); name = "Pods-RxNetwork_Example"; productName = "Pods-RxNetwork_Example"; @@ -2652,7 +1535,6 @@ productReference = EBF9E916529EE3C7D211886F849EBE1F /* Storable.framework */; productType = "com.apple.product-type.framework"; }; -<<<<<<< HEAD D118A6A04828FD3CDA8640CD2B6796D2 /* SwiftyJSON */ = { isa = PBXNativeTarget; buildConfigurationList = 62468BF9C7EDA172E951A24083C3ECA7 /* Build configuration list for PBXNativeTarget "SwiftyJSON" */; @@ -2671,8 +1553,6 @@ productReference = E23C076BA70925415F490FEDB215DA92 /* SwiftyJSON.framework */; productType = "com.apple.product-type.framework"; }; -======= ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 EA9EA43B3B503823EE36C60D9C8A865F /* RxSwift */ = { isa = PBXNativeTarget; buildConfigurationList = 82AEBBC70AA17D65EDC8947EED57F401 /* Build configuration list for PBXNativeTarget "RxSwift" */; @@ -2693,21 +1573,12 @@ }; EAAA1AD3A8A1B59AB91319EE40752C6D /* Alamofire */ = { isa = PBXNativeTarget; -<<<<<<< HEAD buildConfigurationList = 4B2E6A7DD9BEFE908126937ABFFCB84F /* Build configuration list for PBXNativeTarget "Alamofire" */; buildPhases = ( DD5134CC0AD214337C10CC46995CC3CE /* Headers */, DA97C7E8121266408747CC86023CA8A2 /* Sources */, 9C1C2D14882937DB0594D5E1A90588BE /* Frameworks */, 69CDCEDFFCFB1CD5B62AE1ADB0858B89 /* Resources */, -======= - buildConfigurationList = 6B2B8EC7E21CDBFF2BDA26B1B4AC4C0D /* Build configuration list for PBXNativeTarget "Alamofire" */; - buildPhases = ( - ADDF288DD930A46B5F0F198C225895C9 /* Headers */, - 7349DB0E9BEBE664696F1DCC25226F26 /* Sources */, - 8B0D8633F410345F93419B8C3D7B6916 /* Frameworks */, - 28FC0024B79C28A420D7C4FEBB9E3AEB /* Resources */, ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ); buildRules = ( ); @@ -2736,11 +1607,7 @@ Base, ); mainGroup = CF1408CF629C7361332E53B88F7BD30C; -<<<<<<< HEAD productRefGroup = E681BE2A5F078BED40D55710DAAC6CAA /* Products */; -======= - productRefGroup = 8D0B84232D8DDF0DA1C25047FBD72B31 /* Products */; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 projectDirPath = ""; projectRoot = ""; targets = ( @@ -2758,11 +1625,7 @@ /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ -<<<<<<< HEAD 36AD5FF9EC478DCBF9F86BA167334C63 /* Resources */ = { -======= - 28FC0024B79C28A420D7C4FEBB9E3AEB /* Resources */ = { ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -2790,7 +1653,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; -<<<<<<< HEAD 69CDCEDFFCFB1CD5B62AE1ADB0858B89 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -2799,20 +1661,13 @@ runOnlyForDeploymentPostprocessing = 0; }; 8CE10F6529A4B25CCCFB3B2418F2CA0B /* Resources */ = { -======= - 4481DEDCB6B2A3941F3226994974795C /* Resources */ = { ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; -<<<<<<< HEAD C528EDDB9CC603A6385C2D6F1506421B /* Resources */ = { -======= - 8CE10F6529A4B25CCCFB3B2418F2CA0B /* Resources */ = { ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -2853,7 +1708,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; -<<<<<<< HEAD 1700C451C98D9DCECBEDFC5E351C5A9E /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2863,8 +1717,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; -======= ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 4AFA60E5280C8187659BBDF794943795 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -2920,49 +1772,6 @@ 20533020B628BCC085D1E0CBC0FF8455 /* URL+Moya.swift in Sources */, 73C5F7A686893DD40BC9F5F67539A78B /* URLRequest+Encoding.swift in Sources */, 5E626665812F7610667D81C73F448189 /* ValidationType.swift in Sources */, -<<<<<<< HEAD -======= - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 7349DB0E9BEBE664696F1DCC25226F26 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 17953A9CF2E354B3E69B9ABC2F367AD9 /* AFError.swift in Sources */, - B1C58F6CED7B3E45170711D9ADF878AF /* Alamofire-dummy.m in Sources */, - B788B3354CCEBE56DFDB963CAFD7F6C2 /* Alamofire.swift in Sources */, - 44127C4B989C9CC6A90D78B66A929A5E /* AlamofireExtended.swift in Sources */, - 0AE06C3AEA6CA45342BA703230ABD2CB /* CachedResponseHandler.swift in Sources */, - E9A5AC2F471699CCA516952A5FEB990B /* DispatchQueue+Alamofire.swift in Sources */, - CACBD166E573774FB5613C34AA6DA7A7 /* EventMonitor.swift in Sources */, - 56EC8ED1535DAB987F3D2B71D4C05773 /* HTTPHeaders.swift in Sources */, - B23E9A5CDA31534491226F4C2EE8F8E6 /* HTTPMethod.swift in Sources */, - 5C4A0685B5A201436AB52EF25829B333 /* MultipartFormData.swift in Sources */, - E07BD425C4EA9ADF15DDFCDB10D0B2FB /* MultipartUpload.swift in Sources */, - 7CF8362BA31492053F5CB165637AE117 /* NetworkReachabilityManager.swift in Sources */, - C7369563F6946D8984124E1A546B6425 /* Notifications.swift in Sources */, - 92811AC5CD9A5004116AE43C4E8FD955 /* OperationQueue+Alamofire.swift in Sources */, - 5D61C8ED0DDCC9F8B576B6514B19EE50 /* ParameterEncoder.swift in Sources */, - 14AB7976E100075ADEA0AB1DB833E72D /* ParameterEncoding.swift in Sources */, - 0419772A87B16DB7DCF405A9E77D671F /* Protector.swift in Sources */, - C64AF152F7928CDB59385528DB65FE19 /* RedirectHandler.swift in Sources */, - 6A22C46CB1EDE471794D9AB2AC10327F /* Request.swift in Sources */, - AD9899986955B2EC1EC20818C860C971 /* RequestInterceptor.swift in Sources */, - 48D97BE7D5CAED273BD2341C239CC934 /* RequestTaskMap.swift in Sources */, - F71789DC91A75033EFB79DB828676451 /* Response.swift in Sources */, - 13457FE4E607509A3B9527B0711033D5 /* ResponseSerialization.swift in Sources */, - 4082513A35C682F2193D002C80F72B79 /* Result+Alamofire.swift in Sources */, - D6B2983389480F48F27A0704EEB5DC81 /* RetryPolicy.swift in Sources */, - 0CC43FF0E31AA320ACFEB0FE6239DF34 /* ServerTrustEvaluation.swift in Sources */, - 69ACE4EEE5A8C1C618B22CC1F7B8EF01 /* Session.swift in Sources */, - 42CDB5C986C78BBC8E5C0185F746CABF /* SessionDelegate.swift in Sources */, - 70517C3BAC2D6614347DEAC15299EB84 /* URLConvertible+URLRequestConvertible.swift in Sources */, - 5D12235D061AEE7459279AAF8C348DFE /* URLEncodedFormEncoder.swift in Sources */, - E4E12208D5246E64B7E6CCAE987ADB03 /* URLRequest+Alamofire.swift in Sources */, - AF92602937CA016548022C600B8CDC16 /* URLSessionConfiguration+Alamofire.swift in Sources */, - 06507A26118BA5ACFBBC8C225776920E /* Validation.swift in Sources */, ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3144,7 +1953,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; -<<<<<<< HEAD C89BF6FD4D1BC3BA7AC6556547318827 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -3191,13 +1999,6 @@ 003B9FC9E937C82635CF68E9E3576B52 /* URLRequest+Alamofire.swift in Sources */, 2933B39BFCEF204A508F4FFF3188AD27 /* URLSessionConfiguration+Alamofire.swift in Sources */, 0FF6A3BBA9E9DAAE2E741513546FC4B6 /* Validation.swift in Sources */, -======= - F00C232490417506900E127ED7344503 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - F0A03B5B54EF60731A50C987341D6294 /* Pods-RxNetwork_Example-dummy.m in Sources */, ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3210,7 +2011,6 @@ target = 17F9141D333DA1A7BE5937F227221070 /* Moya */; targetProxy = 41256A3178444B09D7B6DF807B1BA3EF /* PBXContainerItemProxy */; }; -<<<<<<< HEAD 0B610B74F3E89D99DD571DB870A94AB9 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = SwiftyJSON; @@ -3222,13 +2022,6 @@ name = Alamofire; target = EAAA1AD3A8A1B59AB91319EE40752C6D /* Alamofire */; targetProxy = 444F751BEEB6333AF53CC48012B979D5 /* PBXContainerItemProxy */; -======= - 2824E3B970C49D9345435CB62E86D265 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Storable; - target = 9F445FA5AE809C9022E2F9A48325E6AB /* Storable */; - targetProxy = C6A90E2682DBF1616B2A2982CDC8C53E /* PBXContainerItemProxy */; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 }; 343ED74D8B890C2DDF090999B1DC6029 /* PBXTargetDependency */ = { isa = PBXTargetDependency; @@ -3236,28 +2029,12 @@ target = 9F445FA5AE809C9022E2F9A48325E6AB /* Storable */; targetProxy = 42E97C6CD26A108F4872386DFF21D7F2 /* PBXContainerItemProxy */; }; -<<<<<<< HEAD -======= - 382A8440DD2B4609A5EF8A645D84B9C8 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Moya; - target = 17F9141D333DA1A7BE5937F227221070 /* Moya */; - targetProxy = 6DC199D91DC93068F7D082ECDD6820BA /* PBXContainerItemProxy */; - }; - 6DDBA74C3772E032B73B91ABD36FA5B3 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RxNetwork; - target = 045F970D8042EC014BA1BCBAD66DD876 /* RxNetwork */; - targetProxy = 158F96E735057F8A56F852DE86F4763F /* PBXContainerItemProxy */; - }; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 6F67A69BE5B15A058254AA1ABC37E564 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "Pods-RxNetwork_Example"; target = 8E13C526B33E1AD69D45907AC0ED80E5 /* Pods-RxNetwork_Example */; targetProxy = 712FF6E752334487A0F27CDEAB2DE7B2 /* PBXContainerItemProxy */; }; -<<<<<<< HEAD 79611EA2F1B458831848D65B76DDB668 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Moya; @@ -3275,25 +2052,6 @@ name = RxSwift; target = EA9EA43B3B503823EE36C60D9C8A865F /* RxSwift */; targetProxy = E919686775E4FFDD2339B22380EE744B /* PBXContainerItemProxy */; -======= - 7F31606A128F84643A4BF80583F81524 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RxSwift; - target = EA9EA43B3B503823EE36C60D9C8A865F /* RxSwift */; - targetProxy = EDF9F4D0C960DCFB830C799EFBA7B1D7 /* PBXContainerItemProxy */; - }; - 83585899D592A272A6EBC62EDE1ED7B2 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RxSwift; - target = EA9EA43B3B503823EE36C60D9C8A865F /* RxSwift */; - targetProxy = 1B4B49F2AAC6FD8E2902B164286D43C9 /* PBXContainerItemProxy */; - }; - 8A89C6DB95BCAFC2F7C5E58CB2DFB7EF /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = CleanJSON; - target = 300904838EEDDC3BB8242817D8F97CB6 /* CleanJSON */; - targetProxy = 59A4ED76495FD39A306A578DBBDFF562 /* PBXContainerItemProxy */; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 }; A15A57AB00599F21C12A7E2DEFFF853C /* PBXTargetDependency */ = { isa = PBXTargetDependency; @@ -3301,7 +2059,6 @@ target = EAAA1AD3A8A1B59AB91319EE40752C6D /* Alamofire */; targetProxy = 5210E18E803B371F006D469F7283F550 /* PBXContainerItemProxy */; }; -<<<<<<< HEAD AC42F5146EE3991016C41F53077722DD /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Storable; @@ -3357,20 +2114,6 @@ 038D9BCF022C1C82D7A3FB8D12957B6C /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 6B92A1E79081D7175BDAB1F9BB38959A /* Moya.release.xcconfig */; -======= - FCA358A555CE5E1A32A69B2FE809712A /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Alamofire; - target = EAAA1AD3A8A1B59AB91319EE40752C6D /* Alamofire */; - targetProxy = DAE2B239DDE1BA2B07400D39A108057F /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 00319A2330DC739FCBFBB6CFB0C5F58D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 15B163DB9ED27819E703C7DD55E3086D /* Alamofire.xcconfig */; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 buildSettings = { CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; @@ -3382,7 +2125,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; -<<<<<<< HEAD GCC_PREFIX_HEADER = "Target Support Files/Moya/Moya-prefix.pch"; INFOPLIST_FILE = "Target Support Files/Moya/Moya-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -3391,20 +2133,10 @@ MODULEMAP_FILE = "Target Support Files/Moya/Moya.modulemap"; PRODUCT_MODULE_NAME = Moya; PRODUCT_NAME = Moya; -======= - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Alamofire-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - PRODUCT_MODULE_NAME = Alamofire; - PRODUCT_NAME = Alamofire; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.1; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -3445,10 +2177,11 @@ }; name = Release; }; - 0271F93A77CEDCDE9E4DE6BB7FC2239E /* Debug */ = { + 0582F4263E260BE2ED193AB5BE1204BA /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B44AA8B4D28EFEDF548D76837E9809A7 /* RxNetwork.xcconfig */; + baseConfigurationReference = 609EA9D4146C3002A053FD732F25F5C9 /* Pods-RxNetwork_Tests.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -3459,36 +2192,29 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/RxNetwork/RxNetwork-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxNetwork/RxNetwork-Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/RxNetwork/RxNetwork.modulemap"; - PRODUCT_MODULE_NAME = RxNetwork; - PRODUCT_NAME = RxNetwork; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.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_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; -<<<<<<< HEAD 0C9896C7563CB84B32833F4506F3096C /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 36CCCE1A53EC6478978B7FD368708E5C /* SwiftyJSON.release.xcconfig */; -======= - 0582F4263E260BE2ED193AB5BE1204BA /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 609EA9D4146C3002A053FD732F25F5C9 /* Pods-RxNetwork_Tests.debug.xcconfig */; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 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*]" = ""; @@ -3498,16 +2224,11 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; -<<<<<<< HEAD GCC_PREFIX_HEADER = "Target Support Files/SwiftyJSON/SwiftyJSON-prefix.pch"; INFOPLIST_FILE = "Target Support Files/SwiftyJSON/SwiftyJSON-Info.plist"; -======= - INFOPLIST_FILE = "Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests-Info.plist"; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 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"; -<<<<<<< HEAD MODULEMAP_FILE = "Target Support Files/SwiftyJSON/SwiftyJSON.modulemap"; PRODUCT_MODULE_NAME = SwiftyJSON; PRODUCT_NAME = SwiftyJSON; @@ -3515,17 +2236,6 @@ SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_VERSION = 5.0; -======= - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.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; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -3597,15 +2307,9 @@ }; name = Debug; }; -<<<<<<< HEAD 2055A1E798D7D7C27FCFB4A71795CBC8 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = BE1CB1FD4AF2BEF7EFB22F254E8A1414 /* Storable.debug.xcconfig */; -======= - 22E675D42EEF580A1C7066470F23EDBA /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = FCABD9D9E5AD448B3C81381D8CB1102B /* Storable.xcconfig */; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 buildSettings = { CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; @@ -3635,15 +2339,9 @@ }; name = Debug; }; -<<<<<<< HEAD 3762FEF639E76DF2D72A3EBC6C1BEFC6 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 6DCF2A1FF7DD2725DDE73008969B326A /* RxSwift.release.xcconfig */; -======= - 23012773EE73B2C30ECC302A8AC15B9F /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 101CF6E4DBB4F31242ACCBBCEEF51240 /* RxSwift.xcconfig */; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -3667,18 +2365,15 @@ SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; 3A8B6D14D536ABB2C2EC5CF32FF22DA0 /* Release */ = { isa = XCBuildConfiguration; -<<<<<<< HEAD baseConfigurationReference = 7A1100FBE1E80E81736691378A5FC181 /* RxNetwork.release.xcconfig */; -======= - baseConfigurationReference = DC64A5BD466779B117A43D110E3E3844 /* CleanJSON.xcconfig */; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 buildSettings = { CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; @@ -3709,16 +2404,11 @@ }; name = Release; }; -<<<<<<< HEAD 402AA979A1EA948725C491478B2F3C08 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = CA39BBC6D19BBC768D9855F31B730801 /* Pods-RxNetwork_Example.debug.xcconfig */; -======= - 4E1F17CEAB0B61D7B56146A3CB42AC7F /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B44AA8B4D28EFEDF548D76837E9809A7 /* RxNetwork.xcconfig */; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -3729,34 +2419,30 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/RxNetwork/RxNetwork-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxNetwork/RxNetwork-Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/RxNetwork/RxNetwork.modulemap"; - PRODUCT_MODULE_NAME = RxNetwork; - PRODUCT_NAME = RxNetwork; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_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_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; -<<<<<<< HEAD 58B5C4FF9244B42176792C28754042C5 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 095D38A695ADD592EA6F883B7959B353 /* Storable.release.xcconfig */; -======= - 4FC89E54D80D64E72FD431BC306367BA /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 101CF6E4DBB4F31242ACCBBCEEF51240 /* RxSwift.xcconfig */; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -3766,25 +2452,14 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; -<<<<<<< HEAD GCC_PREFIX_HEADER = "Target Support Files/Storable/Storable-prefix.pch"; INFOPLIST_FILE = "Target Support Files/Storable/Storable-Info.plist"; -======= - GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxSwift/RxSwift-Info.plist"; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 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"; -<<<<<<< HEAD MODULEMAP_FILE = "Target Support Files/Storable/Storable.modulemap"; PRODUCT_MODULE_NAME = Storable; PRODUCT_NAME = Storable; -======= - MODULEMAP_FILE = "Target Support Files/RxSwift/RxSwift.modulemap"; - PRODUCT_MODULE_NAME = RxSwift; - PRODUCT_NAME = RxSwift; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; @@ -3796,43 +2471,7 @@ }; name = Release; }; -<<<<<<< HEAD 620C1603F86514FDAE4468F414075C81 /* Release */ = { -======= - 5808F9277B53A1AFD414F3BB0BF8EE91 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1230F5D6549CDECCC50F73CA40606D38 /* Moya.xcconfig */; - buildSettings = { - 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; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Moya/Moya-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Moya/Moya-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Moya/Moya.modulemap"; - PRODUCT_MODULE_NAME = Moya; - PRODUCT_NAME = Moya; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 76AF589767DEA07382EAB401F6BA30E4 /* Release */ = { ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 isa = XCBuildConfiguration; baseConfigurationReference = ED823EC216935E3D6BF084F242AEE0CF /* Pods-RxNetwork_Example.release.xcconfig */; buildSettings = { @@ -3869,11 +2508,7 @@ }; 76AF589767DEA07382EAB401F6BA30E4 /* Release */ = { isa = XCBuildConfiguration; -<<<<<<< HEAD baseConfigurationReference = 7C8EFFA4AD4EBEEEA1A9C774A7B57920 /* Pods-RxNetwork_Tests.release.xcconfig */; -======= - baseConfigurationReference = FCABD9D9E5AD448B3C81381D8CB1102B /* Storable.xcconfig */; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CLANG_ENABLE_OBJC_WEAK = NO; @@ -3906,18 +2541,10 @@ }; name = Release; }; -<<<<<<< HEAD 809E6BFF3B1962B612C7A1827BB73C3A /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = A12883B910DDCAAE18A23A388D5440A5 /* CleanJSON.release.xcconfig */; -======= - 7D0AE6E5C8E143FC4413C4E9A9C67CDC /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = ED823EC216935E3D6BF084F242AEE0CF /* Pods-RxNetwork_Example.release.xcconfig */; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 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*]" = ""; @@ -3927,7 +2554,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; -<<<<<<< HEAD GCC_PREFIX_HEADER = "Target Support Files/CleanJSON/CleanJSON-prefix.pch"; INFOPLIST_FILE = "Target Support Files/CleanJSON/CleanJSON-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -3936,50 +2562,6 @@ MODULEMAP_FILE = "Target Support Files/CleanJSON/CleanJSON.modulemap"; PRODUCT_MODULE_NAME = CleanJSON; PRODUCT_NAME = CleanJSON; -======= - INFOPLIST_FILE = "Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_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; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 86BE0EAD36B62FDE298458F0F08B3781 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 1230F5D6549CDECCC50F73CA40606D38 /* Moya.xcconfig */; - buildSettings = { - 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; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Moya/Moya-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Moya/Moya-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Moya/Moya.modulemap"; - PRODUCT_MODULE_NAME = Moya; - PRODUCT_NAME = Moya; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; @@ -4051,15 +2633,9 @@ }; name = Release; }; -<<<<<<< HEAD C71A2D4C95A058FB8A8D54CE8D8324DD /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 016B14482A6DEC5A11CAA1E55B00B980 /* Alamofire.debug.xcconfig */; -======= - E071E8876C6FA81059B4FE1CD4615E7B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DC64A5BD466779B117A43D110E3E3844 /* CleanJSON.xcconfig */; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 buildSettings = { CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; @@ -4071,24 +2647,19 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/CleanJSON/CleanJSON-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/CleanJSON/CleanJSON-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Alamofire/Alamofire-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; -<<<<<<< HEAD IPHONEOS_DEPLOYMENT_TARGET = 10.0; -======= - IPHONEOS_DEPLOYMENT_TARGET = 9.0; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/CleanJSON/CleanJSON.modulemap"; - PRODUCT_MODULE_NAME = CleanJSON; - PRODUCT_NAME = CleanJSON; + MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; + PRODUCT_MODULE_NAME = Alamofire; + PRODUCT_NAME = Alamofire; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_VERSION = 5.2; TARGETED_DEVICE_FAMILY = "1,2"; -<<<<<<< HEAD VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -4120,26 +2691,15 @@ SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; -======= - VALIDATE_PRODUCT = YES; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; -<<<<<<< HEAD C890A04822B60529A9F7B4E765B577E0 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 972765C90F41A5E33F29A84F237BF41B /* RxSwift.debug.xcconfig */; -======= - E5428602B41E0CEE86891AC5E51E9846 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = CA39BBC6D19BBC768D9855F31B730801 /* Pods-RxNetwork_Example.debug.xcconfig */; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 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*]" = ""; @@ -4149,34 +2709,27 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/RxSwift/RxSwift-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-RxNetwork_Example/Pods-RxNetwork_Example.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + 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 = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; -<<<<<<< HEAD C9014034C81E8FBEDA9C91BB1CE98797 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 5FA234DDCA350219104107F76B119408 /* Moya.debug.xcconfig */; -======= - F659822BFF3B3C20B29B76B89800A5E9 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 15B163DB9ED27819E703C7DD55E3086D /* Alamofire.xcconfig */; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 buildSettings = { CLANG_ENABLE_OBJC_WEAK = NO; CODE_SIGN_IDENTITY = ""; @@ -4188,7 +2741,6 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; -<<<<<<< HEAD GCC_PREFIX_HEADER = "Target Support Files/Moya/Moya-prefix.pch"; INFOPLIST_FILE = "Target Support Files/Moya/Moya-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -4197,27 +2749,16 @@ MODULEMAP_FILE = "Target Support Files/Moya/Moya.modulemap"; PRODUCT_MODULE_NAME = Moya; PRODUCT_NAME = Moya; -======= - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Alamofire-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - PRODUCT_MODULE_NAME = Alamofire; - PRODUCT_NAME = Alamofire; ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.1; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; -<<<<<<< HEAD FFC69B2CDD719D05EA056BED3464C6F3 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = CCD7D1C448BE9FCE7B0FB15F6A191974 /* RxNetwork.debug.xcconfig */; @@ -4258,25 +2799,6 @@ buildConfigurations = ( 402AA979A1EA948725C491478B2F3C08 /* Debug */, 620C1603F86514FDAE4468F414075C81 /* Release */, -======= -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 278A8DCB634E7A42979AA196F859E78B /* Build configuration list for PBXNativeTarget "Pods-RxNetwork_Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E5428602B41E0CEE86891AC5E51E9846 /* Debug */, - 7D0AE6E5C8E143FC4413C4E9A9C67CDC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 426AA45DD72430F6727D1F1B27EBF289 /* Build configuration list for PBXNativeTarget "Moya" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5808F9277B53A1AFD414F3BB0BF8EE91 /* Debug */, - 86BE0EAD36B62FDE298458F0F08B3781 /* Release */, ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4299,70 +2821,38 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; -<<<<<<< HEAD 4B2E6A7DD9BEFE908126937ABFFCB84F /* Build configuration list for PBXNativeTarget "Alamofire" */ = { isa = XCConfigurationList; buildConfigurations = ( C71A2D4C95A058FB8A8D54CE8D8324DD /* Debug */, 0518F89D5C4730E5D1FB793988114CB0 /* Release */, -======= - 6B2B8EC7E21CDBFF2BDA26B1B4AC4C0D /* Build configuration list for PBXNativeTarget "Alamofire" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00319A2330DC739FCBFBB6CFB0C5F58D /* Debug */, - F659822BFF3B3C20B29B76B89800A5E9 /* Release */, ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; -<<<<<<< HEAD 5D54543275A434C97EE54D125EED008A /* Build configuration list for PBXNativeTarget "Pods-RxNetwork_Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( 0582F4263E260BE2ED193AB5BE1204BA /* Debug */, 76AF589767DEA07382EAB401F6BA30E4 /* Release */, -======= - 82AEBBC70AA17D65EDC8947EED57F401 /* Build configuration list for PBXNativeTarget "RxSwift" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 23012773EE73B2C30ECC302A8AC15B9F /* Debug */, - 4FC89E54D80D64E72FD431BC306367BA /* Release */, ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; -<<<<<<< HEAD 62468BF9C7EDA172E951A24083C3ECA7 /* Build configuration list for PBXNativeTarget "SwiftyJSON" */ = { isa = XCConfigurationList; buildConfigurations = ( 009DB1577F07B2FF797B78F2D1142134 /* Debug */, 0C9896C7563CB84B32833F4506F3096C /* Release */, -======= - AB031934812F833108688EFC9BABBC3B /* Build configuration list for PBXNativeTarget "Storable" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 22E675D42EEF580A1C7066470F23EDBA /* Debug */, - 79085CD6D45B169B6777024E9F0E3D16 /* Release */, ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; -<<<<<<< HEAD 82AEBBC70AA17D65EDC8947EED57F401 /* Build configuration list for PBXNativeTarget "RxSwift" */ = { isa = XCConfigurationList; buildConfigurations = ( C890A04822B60529A9F7B4E765B577E0 /* Debug */, 3762FEF639E76DF2D72A3EBC6C1BEFC6 /* Release */, -======= - D526726212F21C255A4B53300EC1A763 /* Build configuration list for PBXNativeTarget "RxNetwork" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0271F93A77CEDCDE9E4DE6BB7FC2239E /* Debug */, - 4E1F17CEAB0B61D7B56146A3CB42AC7F /* Release */, ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -4376,7 +2866,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; -<<<<<<< HEAD D526726212F21C255A4B53300EC1A763 /* Build configuration list for PBXNativeTarget "RxNetwork" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -4395,8 +2884,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; -======= ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 /* End XCConfigurationList section */ }; rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Alamofire.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Alamofire.xcscheme deleted file mode 100644 index bc06c13..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Alamofire.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/CleanJSON.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/CleanJSON.xcscheme deleted file mode 100644 index 128ecee..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/CleanJSON.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/CryptoSwift.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/CryptoSwift.xcscheme deleted file mode 100644 index 37b74a9..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/CryptoSwift.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Moya.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Moya.xcscheme deleted file mode 100644 index 990a973..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Moya.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Pods-RxNetwork_Example.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Pods-RxNetwork_Example.xcscheme deleted file mode 100644 index a57a278..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Pods-RxNetwork_Example.xcscheme +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Pods-RxNetwork_Tests.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Pods-RxNetwork_Tests.xcscheme deleted file mode 100644 index b179fd1..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Pods-RxNetwork_Tests.xcscheme +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/RxNetwork.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/RxNetwork.xcscheme deleted file mode 100644 index 3fd3a86..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/RxNetwork.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/RxSwift.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/RxSwift.xcscheme deleted file mode 100644 index 7b649f0..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/RxSwift.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Storable.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Storable.xcscheme deleted file mode 100644 index 929d296..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/Storable.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/SwiftyJSON.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/SwiftyJSON.xcscheme deleted file mode 100644 index 24941c0..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/SwiftyJSON.xcscheme +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/xcschememanagement.plist b/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 0217231..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/jialin.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,61 +0,0 @@ - - - - - SchemeUserState - - Alamofire.xcscheme - - isShown - - - CleanJSON.xcscheme - - isShown - - - CryptoSwift.xcscheme - - isShown - - - Moya.xcscheme - - isShown - - - Pods-RxNetwork_Example.xcscheme - - isShown - - - Pods-RxNetwork_Tests.xcscheme - - isShown - - - RxNetwork.xcscheme - - isShown - - - RxSwift.xcscheme - - isShown - - - Storable.xcscheme - - isShown - - - SwiftyJSON.xcscheme - - isShown - - - - SuppressBuildableAutocreation - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Example.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Example.xcscheme deleted file mode 100644 index a57a278..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Example.xcscheme +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Tests.xcscheme b/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Tests.xcscheme deleted file mode 100644 index b179fd1..0000000 --- a/Example/Pods/Pods.xcodeproj/xcuserdata/pircate.xcuserdatad/xcschemes/Pods-RxNetwork_Tests.xcscheme +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/Pods/Target Support Files/Alamofire/Alamofire-Info.plist b/Example/Pods/Target Support Files/Alamofire/Alamofire-Info.plist index e36f8d2..073e064 100644 --- a/Example/Pods/Target Support Files/Alamofire/Alamofire-Info.plist +++ b/Example/Pods/Target Support Files/Alamofire/Alamofire-Info.plist @@ -15,11 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString -<<<<<<< HEAD 5.1.0 -======= - 5.0.2 ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/CleanJSON/CleanJSON-Info.plist b/Example/Pods/Target Support Files/CleanJSON/CleanJSON-Info.plist index 25cf682..3c175b6 100644 --- a/Example/Pods/Target Support Files/CleanJSON/CleanJSON-Info.plist +++ b/Example/Pods/Target Support Files/CleanJSON/CleanJSON-Info.plist @@ -15,11 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString -<<<<<<< HEAD 1.0.1 -======= - 1.0.0 ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.markdown index 172a952..e28213a 100644 --- a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.markdown +++ b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.markdown @@ -73,7 +73,6 @@ SOFTWARE. ## RxNetwork -<<<<<<< HEAD Copyright (c) 2018 Pircate @@ -95,8 +94,6 @@ 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. -======= ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 ## RxSwift diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.plist index c4fb13b..ad87a9d 100644 --- a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.plist +++ b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example-acknowledgements.plist @@ -104,7 +104,6 @@ SOFTWARE. FooterText Copyright (c) 2018 Pircate <gao497868860@163.com> -<<<<<<< HEAD Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -152,8 +151,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI FooterText Copyright (c) 2019 Pircate <gao497868860@gmail.com> -======= ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.debug.xcconfig index 1fe313a..e58f1cf 100644 --- a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.debug.xcconfig @@ -1,17 +1,9 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -<<<<<<< HEAD FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Storable" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON/CleanJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork/RxNetwork.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Storable/Storable.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON/SwiftyJSON.framework/Headers" LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CFNetwork" -framework "CleanJSON" -framework "Foundation" -framework "Moya" -framework "RxNetwork" -framework "RxSwift" -framework "Storable" -framework "SwiftyJSON" -======= -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Storable" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON/CleanJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork/RxNetwork.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Storable/Storable.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CFNetwork" -framework "CleanJSON" -framework "Foundation" -framework "Moya" -framework "RxNetwork" -framework "RxSwift" -framework "Storable" ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.release.xcconfig index 1fe313a..e58f1cf 100644 --- a/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-RxNetwork_Example/Pods-RxNetwork_Example.release.xcconfig @@ -1,17 +1,9 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -<<<<<<< HEAD FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Storable" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON/CleanJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork/RxNetwork.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Storable/Storable.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON/SwiftyJSON.framework/Headers" LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CFNetwork" -framework "CleanJSON" -framework "Foundation" -framework "Moya" -framework "RxNetwork" -framework "RxSwift" -framework "Storable" -framework "SwiftyJSON" -======= -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Storable" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON/CleanJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork/RxNetwork.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Storable/Storable.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CFNetwork" -framework "CleanJSON" -framework "Foundation" -framework "Moya" -framework "RxNetwork" -framework "RxSwift" -framework "Storable" ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.debug.xcconfig b/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.debug.xcconfig index a35fb18..7c125a9 100644 --- a/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.debug.xcconfig @@ -1,14 +1,7 @@ -<<<<<<< HEAD FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Storable" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON/CleanJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork/RxNetwork.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Storable/Storable.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON/SwiftyJSON.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CFNetwork" -framework "CleanJSON" -framework "Foundation" -framework "Moya" -framework "RxNetwork" -framework "RxSwift" -framework "Storable" -framework "SwiftyJSON" -======= -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Storable" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON/CleanJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork/RxNetwork.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Storable/Storable.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CFNetwork" -framework "CleanJSON" -framework "Foundation" -framework "Moya" -framework "RxNetwork" -framework "RxSwift" -framework "Storable" ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. diff --git a/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.release.xcconfig b/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.release.xcconfig index a35fb18..7c125a9 100644 --- a/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-RxNetwork_Tests/Pods-RxNetwork_Tests.release.xcconfig @@ -1,14 +1,7 @@ -<<<<<<< HEAD FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Storable" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON/CleanJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork/RxNetwork.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Storable/Storable.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyJSON/SwiftyJSON.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CFNetwork" -framework "CleanJSON" -framework "Foundation" -framework "Moya" -framework "RxNetwork" -framework "RxSwift" -framework "Storable" -framework "SwiftyJSON" -======= -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/Storable" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CleanJSON/CleanJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxNetwork/RxNetwork.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Storable/Storable.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CFNetwork" -framework "CleanJSON" -framework "Foundation" -framework "Moya" -framework "RxNetwork" -framework "RxSwift" -framework "Storable" ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. diff --git a/Example/Pods/Target Support Files/RxNetwork/RxNetwork-Info.plist b/Example/Pods/Target Support Files/RxNetwork/RxNetwork-Info.plist index 2984009..b35ab35 100644 --- a/Example/Pods/Target Support Files/RxNetwork/RxNetwork-Info.plist +++ b/Example/Pods/Target Support Files/RxNetwork/RxNetwork-Info.plist @@ -15,11 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString -<<<<<<< HEAD 1.0.2 -======= - 1.0.1 ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/RxSwift/RxSwift-Info.plist b/Example/Pods/Target Support Files/RxSwift/RxSwift-Info.plist index a5b3903..5cbb290 100644 --- a/Example/Pods/Target Support Files/RxSwift/RxSwift-Info.plist +++ b/Example/Pods/Target Support Files/RxSwift/RxSwift-Info.plist @@ -15,11 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString -<<<<<<< HEAD 5.1.1 -======= - 5.1.0 ->>>>>>> 06494a9dfa97c52cc9034b21561f54a6f8459079 CFBundleSignature ???? CFBundleVersion diff --git a/Example/RxNetwork.xcworkspace/xcuserdata/nierong.xcuserdatad/UserInterfaceState.xcuserstate b/Example/RxNetwork.xcworkspace/xcuserdata/nierong.xcuserdatad/UserInterfaceState.xcuserstate index 9ec8d2db77c2406bcbfd13c0a1bf31c7694353f1..cce327aa810ee53bfa020d0d27a23b3885b2c3f6 100644 GIT binary patch delta 13282 zcmaKS31Ab&_y5k$%=So|CJkxRkfuq~atWmzia^sgZPFyYlO`!Qls3>pFM4o8W`Hs27{K#Bpt}wqb*O{BlpUhq69`k^C2;?9FL;?kf0!q*t zs6aGOgBYL#9l&#-Gw1?(f?l9ENCqh&6F#a0lE4f3qwLS;U60p{$qtSDJ=dg3x*VxzD zjqE0NGuz01z;0nbWVf;(vD?_~>~3~H`x$$HJ;r{?9%oOmC)sb=bL=hlHhYJ?%id%E zV(+tmvk%yZ>_3o&K`xiPd&4BChsiJnrh1?OronV*geI5)&Cmj^ zumC!s6T09aSPIMF2sjd!!wOgl$HH-NJe&Zh!I$B5_zGMAy>KCX9li?Lv zAHc2fBe)Ijf}g?z@Gv|Bzk%Pv@8I|FNB9%G0)K_q;qUNIco*J7!AOKWAt)4yQ5cdS zDT+sJP+QavwMQM$bEqTggnFPCQBTwhWuqLFi}FxDvLQPvKn~Oo^+(011i4WKszg<& z9!)?znu1=3I+JN3i8__1T88xC0&=&L|+J<(bJ!n7r3>`wpJ?I2F ziO!;L(D&#f`UU-gZlXWYEp!{*!3+kN#UVHpi*ZNX2`AvrI1zWjU2!+u9Y2p>z&-Gb zxF=4*sn~?`a6Y!-{&)Z$hzH@pxEK$|BXK<*jVIx$_$53I&%m?s96T3$@oV^X{4QRH zH)78RcsJgIKgN6UC-^gb7=MGm$3Np=@pXI?|B3J7zwraE6({E+xJXXHMR7{5HK*dD zIW-r{wdcBUUAbOdZ!U>T<&0cDXXET#0q5X`a7Eluu9z#~MsQW!IBq;Qft$v?%uVNJ zb91=4&bZ3@^74~RDC1oKyI~%@K>B$P!B@h6CpUS(@*s`}@jPhDgLd9Q=n4pIwBR>j z*nDOYNg$m`7y3ycUA=z1oci21`;mN8h;?TNlJp)QcQi4g-s88PMd9}vVOtYsbn1^~bU2oS)40|6kAWRo0{OY%rQu@O5d zAP(YO3xa`&iD%-07=!@{d-zws$oVn04*sb-A@RU zfjDo2Ty6*wR4Ckb1f7_OWy?sv6O4_qGwVU(a%Mf_Y_9GKo@XMKgKnTZ89)Xu2QPpg zWDprlm3~pI^&~MPmXYpK@iN_>8;tL-xt{?Tg??!uoeU+#PxNyRt12(49aK_PTwmd? ztjl&+4zDY1?v({xR1hE=29!&5Hr@3G<;QittR2=oo!4xo+j3#49zkdPpi+Z|WJn`#vsofdIBM3;6)I8K| zFwZZcxl}?E{_mlh+b;qQf^1#`uY<+l4X^~f3El!r!P{UNnM5WN4#3 z0^%hL$*W`$d5yfj7W~kH>lbhtT%jtzN*1@kdW*bGmQj^A_*H&Sfb|!7qZ!r%LFEs@ zKf*@A(AjVbeYw!p^K5Z7 zcZg!+D0WuKwq{jqG^=J~SPiRXV_6+pN!}r=$h%}USwq&6_sBZ3ek~i{44v)ZS1Fr7 zHnc$B)TGf5NVmZfWkFSaO>twp&>Y}lds8W}N#y+|DX=M23T!Il6)v)oIt$_IE|E6# zWo9$|GO$t^Y^FfiY^wIg|EeA2GnSMfSF=^iP|x@26@nq=+X9 zh$oRxnh}#{B5r1WIy=*kcLv3~k1j=ucl0yxHn*S0di`J*P_Uob+$d}~!TK1h5MXzPwW7je9>;`h8 zMbT%-S@I3F@o#-#v)LU2*q!8LGuS->*pJ!0!bMJz)4r>_BuFA_25^u);s<<~0{%+S z)={e9uc=pWt%&!WV!!gkJ44}}d!qJVPOf>h^Xz2--39hL_Ivgs`vZH4{gM5N{h9rR zTp-_(@5x2-1Gz+gBtMa#$uDc!D=p}*H>vU_x!i*8YG9Kte{0g^BMJ{P(gzntP`KCs-Cp;frxc8a zF-$}QRFfMGP(%KpQsWiv9WWktW+K+WHn1&h2iwCA@HyBKc7h4yPjZXgCU?kPa*zB) z?vuaQz(hd=up8_SpNB8N9zaAM_yq8f{6ik`fZ+k4_x&0lD3U-Mm~3cs`hQ*3^@B)P3OS5a2^jLd7$7yl-H(` zwSuoQVQ>+AtuVJBp`@s;C{G%(+B;TNhsKPZ=<(iAB?k5_s4p&dyGt75qu*rZv|V9o zS)F@8Zb5ogMRipr4L54Nr($9~X^BjFqNa-kl4zniHL9joTvwkn+L2peH9F~6dOGcz zQ&r+Fmjn?tiOG{nOBqI5T2x(K&QhmeQCU}Gwj28P>Dx~eaE=LNB54elz=RbQ*H#8dp+VT){9PiD3dR7gyKR zF-%Y#E!T~ys}^VrrCW`3*wZOJfDRPW)Rz`BF=ltAyQZvIW3DM0r!f~*R1|5tCUn*0 z*HjHFD|ZWXc_pzLAquG|uNP(%{$l7AQaiFBi~c6inO`a?G79vIl-^uiWGZN)e;r-s z%B6HF!?3Z{b!m1=XHt4-{Ya;Q(j6(iZdgr*lhVnQ{<^f@BG5GMff3_N9fg!uQ##XA zIW#wq-t?k3rNy=B{V3gz(#uQTRzY$UE<9XTXLV4TP6)5pRN0009T)~BmAH*2e>oa9 zvMNhpB9@kaP&>LnDEBcvzBFB6lum}uj3~;?r*s=i-*T6mh4vmg5LQ;#Zw$?2Q~F}0X+p7km0U$3Q`nwN{VVcCNsUE;tJTwxIhu(W~!K>^t+g;WG*rqrj{vV zM*FDYOc7H-FAZg(BfZSDRVBS@Xp35ABrP9K>7QEag?pig(5IT#R58P7%W~SUxm3fH zFdlbPM`4gEdI{ZxfiL?8E^eAIflipNeut^2^`*=;T3<@39Oipp$ymx@1-(zFrS-IK zIHjMQrYp6ju1vm%guD0B4!-Z$yc7_D{G$iF?Ipm6=7Q6tfMHiPvL)3WX)pUOGQ>khc2fW zE1M)#OWAoqhZyN&@UfVMJ{0LZWqrHq>P2&G)qX~JF;yh1j z?&+ZfEq8iKcX?0RhR<3`{$m?-GJFDmi7((&jE4UHh)?6ol=>E*qo1=a4CPY*RgA~4 z4?+Bb`IOP`GFseh1%57zeIFEUYGxR1P)YIo`Fw0PkFD2d3kN3dR4|$|vpzn=Xx2%#9rR7(6ZmQL(SVa7 z2PO`yoTsd=9<*xW-|p(iwSp?#({nv{a+xU|6E`MaOI(?_F7eOA3y+&5ewFxJ;_1W& zT62|VsJ75t)Hb*se$Hs<-FCPaZu3#=;7&X@HKmcIoO(h>d8R7#9}UecX6o z+*DpwQ&3%0>|Q>>@zni^eA}eSG)zjbqAiwBa?pFid-rsVV5d0fkKB8$V|&kLW*f7Y zrtFTjOOKapbcn8Gx8ll50C`9(7d)AV^1O_*R^@Zt_&QNuDFmmpkPnc)BBOOSaN zCrtKGUlj&7!$u);t}Cl>>kOZ0%Ts%bTk}Bc=Wq-B(9eu}Io!fH2RW)rXb@Rcr|HtI zS7KMmufBX1+|D#KFyRC~-bd_)A2SKQvIe-92W?0E$MwBo&6xwu#6=7D~~WE z*3dlfLHGqc2ET;I;R$#Wo}!sv6A#++;5i<2;z4H~bm2iao+ciKqgWfzy;(`8M#3IPVBMk2g+dLj5^WYCc zw_!9x-b2{tHNMq_11=PfTGO02lA%^ejv{D`qd-we$%7Ogr1HSPgEStb^T5ahDwvGb zK!l>Hmx)0dq@}cu^x=V-2X#Cc!-MfWm?#wd&wID)mgi6cqJhZ@)S3DoDn$zqtUSnE zK|`hP=y@Jw@qq67iUoVoc*Wf#z1O=Lv#2LZr}(I+(o@$YI4A?63}o|w?m2ULkjI03 z9?+eh{as|F=rV*9H1&9yJSY&rIcP?L{?I+=5bvb!w>`*-3h6c(xp?4gK$JBX={Hys zM(xv8R9^3{HPkw4-0mjZM+4AcCSf@mhz9YXkOzI1qamn>2Yq?ak96y6ADip08&g#? z(ve?PQrp~T7%CI`6robuiU<7#lJ=n_?c@F9d5s5EqngJ&)bd~;>DSzQG#X1ySD3F) z0~*JJLBiRAPt#~3nk-aJ;=$ks--x7JA)Q#*Mm0B?il#jt_+=gxJsx-ln#m;4jC!}h zY>RkokO#)Dd)6F|GrZo2&~aMvwIyIM{F(8uT#K^S{^P~U()<-ut0 z#uuM!hYt8gX%@#}bW~8q5%f6^#`0j?a=|zRgYd$h=~8qGoe{=3&4URI)Mxea7WQl# zj=n|bh0=38nACtS@L;lcUeDG>^aInd0$oBsqMvx+;lVT>ywc)u&}DRuiCBTIpkL8d z9uOYzJeaZq{YDqW?>tTPP&<2xCS-o^X>W5E{r#+_4`|bWc<{2&bUJN1yqCHyhB)9E zZE+wFVd{8i2yJK5w(EN7JU9$TGYRXl1WR!^mf==djw5g+R^TYC#H}%P*Ryyqn+J1v zFqa23i7}rC3wYq=!9pIq%7aBbc#Q|Iug7W}!+5b4#{vN~%UW{VL)1U7GFL%7gRNg*bZGgK*pnCs7e%>UiF0zZ)pVsT02UJD0sXwA_1!}75L`qPBTJc8c&K-azJ1O+J~P85*xjFISt?81WAlsZN|)nd zjPuEY=DA8SUEabvI*rS51rvrVaTTt{qi_wbW#)UIOD+icfCp=M@F5RYlLYU~D~#oW6FlrNl??=sFay6H197wwbwT@w2&&E7B&hBUjNwDeZy4Z#rO@p1iwkSev7HV zOYz&xdE9`PGpjsQs4MVFCL6EBtLU_~bwxFGWtGEeI96X#nOk2m)Lk=J67H@n`A?y= zxU{IIsJPBuV=t;4?xqKDgC!E0qc5r}tEx0r7FP*fXpz5fc3GvnWw_>9vdd_ysk!vu z<5d-tWCv6BtAtq-Dfai_TjVM+o>C<-=a2gkOzl&@G%d* zrRGKG^8DsWQx^8;f+07MpcfWP*|Ce>0r2CvOy4gC9Z!_5>nFj|5Jx`}6!1x~i%eyosf?E20@0%$K&tQqH zx_)SRS+U=kJJkvYOU=(g{E!Qzxqti*e#9{x;8+fFh{GJm1@Pc7503DFJ`s-c;0qoc z z>86taPDdB}e-Ch*{0G;8qbJ++=$h+D2Jk>Q<@o;}1aRHB7kmc+-1B5856=FpgXoF# zYVQi1=r>GG&n0_z85D?1VVsnR^xiPw7|y_@4VK7T{AiOA71R|Kk6g~Bdt0SxJJa1+ zCX=v|%izp(!$#vX`UL!r2jBDH;z}-y%VyVcxjguR2fvVSc<{ToBrT;Q=j8eceOz22 z*N3A*y2Jx&AoM}`^GYgAFNG+g((6LcJNkH!r4bM3=7zUCV>ud9TyBccxsmh{!Ig8= zsITzgTFWZps=2ynczCX!iRWmT`Ku65TqXVbWV?se3BHa#AyS`wLU0o~^0tL$%di>ReXInTov>HAKZFvsh(#CWI~DQWgT ziYA>qGF@nPH-)Yk7c+nvge>$WBjL58O8Pp{cp-p9G(x1W6wO2p=pZ^xnR8I2zlG;UDSNFWZk!Ft?}zW*~BZ^EC_7kX}Tp`4h$xTB#j z?Retodppl@o#>vvj9bjD;?{8QaT~ae+-7bMcYr&|o#wvc&IUvVXab%K=pN83ASJ*O z;0zcPFeG4TKuN%`fU1B|0kr}30b>Hj1*{JEDli~0F)%yO8Q3SVU*Leiioh{}eBkWB zxqem!_` z@RHz_!HvP&gFgx07ko7Mi{LMV&j$YApGL@$Y^i)M&siROsr zi9B0GJ46RXheU@(pNr0leidC4T^HRD-4xvt-4Wdr-479kgocELNJC^H@{q`osF2nn z(IFi|I))^KB!&zKDGM1HQV~)WvNPmR$dQnvA;&_aLfeG43+)ivF|;Ps6Uv894V@Oc zHFRI-XQ2l}4~rRbs5ne470bkCu|w<<_wk7PiC2g>iua2Th!2U6h>wboiI0mX5pmeWd-Q1EhnbL!|Z6 zG176;3DQYYkCc~Al}?jRm(Gy>Pr6!qKzcPiG`vfALHM}vx59UZe;fW|_%GpC!mozk z3V#^>NCsq3hGhY=Ael&}@W`TMN|{R5UX~zBly#N$koA=Hmg!~LGN;TX>m%zgE0GP8 z)yl@o#>*zkc-d6hG}(07BH0SrN3!j*owD7sk7b|8_Q^hz9h4oGeJ;BwyCnNb_KWO_ z?5gZH+3&JHWPi$T%kH*n)v8;o!dBy2z13<@tDodS@^*4F&AAlFJx+O{e2BbEK2lyG zuab|F*UE`}ntZx^hJ22Eo_v9Pp?rmWmAp~@k$k&+r+lycQ~7@R0r?sECHX!1efb0V zKM_m>8-XIYh`@;8h>!?vgf1dJqHRR`i02|YMRbnn645Q<`G_77j)>Zb*CMt>oR4@E z86RnlERCEVIWN-diF`Hkwa8_WYa-u^Tp#&<t zUq}8Dc_Z>>vip~n7B12(OWGb>1xr%&+UExr;6nzvGiYmn@ zMXjP?F+nj&;Zg94sfuNaJ&H?FII4YAR@A7dSED>1M4gN}7xi7##i&bB*P?Dm z-HrMy>hGwBQIC{BDOSpqa%H4arBo|5%2;I=Wp|}PnW3~OGnIKto3cRZRF)`5DPLB; zqMWImrJSRjr(B?1s9dCcUHOLcedQ))qjHOKt8$xihjN#4k8-c_Q{{f;53ND#_}1pu zBU{gI-RNokRqHz{xk|0ls&uM&Rf4LAs;8>AO0P;$8C1Ed0+mx$s2ZReq#B|csv4!5 zteUEtrkbvrrJAFfr&^$DP;F3ss@ktQpgN>FqB^QNraG=VsXDFtN_9ir_H>g*rH>SeM9{) zCOoE9Ohk+#Mj4}uQO9UvVq@ZB+QjsZ(Z{637-G_6OflvdYfM&5PE1~mEv7PNcFZPE z%*mL$nkY?*rdTsY)1X~n> zb?qD4H?{9;H)$KSTeMrX+q65hp55BL+E2Cnwa2vIX#b4mVxwcb#+qXX$BvDi6T2+- zV(jJE-(&CV0(4@XRM$!usZ;B;x;R~1U3=XC-5A|G-D2HJ-MhNAy7jt^x<=g=-6y(3 zy3cjTbSHFYb?0>7>3-1t7#AAXJ8pPfb=;UZK5kCjt8uT#Es0wi_fFjExc5A98{#&` zZHwCxw>R#KxYKc8$9)@jA?~NR%W+rZuE*Vo`z!82yd*w4J}$m(e24f>@!jKl#P^EV z$EU$i!qo6od8#5+nHrs{NsUd7OKp=nJau&H+o^|BuNeXj zIzyttU@#iYhD<|_A>UA7a2fg%=JxKc}ok@r3TzX)7Wcmx~Iq9R)-%Q_-em?z{5g3s%z!+={HHI0r#sp(G;|s=~ z#$=W?&9BOU!a}tU2D?&itG?!JKGzm|fTh?n%u;F@X{oSGu)N~2EU|2`Y_;sO9I&>jUvzBMA z$y%4SA!}1sW7e*$&$3QteUo)Q>-(%rS-)oemi2qq&8%D5Ty|J?Ty~r6ZrSGSe%S-F zhh^7fkI9~zJuiEH_JZt%*=w?QW*^DEkbOVp`=0@knd7iU*=khM(UCq0hcRTN1-rxCbKF$x!7v+cMN9D)m_sY-CcjouW@1H*~e^@@B z|5E<+{MGsU@-OG#w<&BLZ7gOOZ5-_!T^zj}NseSksw2%|bl4m&M;}Lj#}LO*M~TBT z%u(-{;+XE3;h5!^@9;Wab-d+?+S$$dqBGw)&^gRm<}7zsIcuB~ zoRgirbE@-Y=PStoV%SzoTr>$Ilpn9cYg1@;=Jno&H20Y59gmQsVl){bB%C~ zagBFPauL^5*EH80m)Et(wb-@9wR))Qeb;8!7S~6vJ+4n&`&II-?}cles|q; z-FDq`Jt|}iQDHz~P@$|)RoK3;V`1mQu7%wTUntBhbQf0kU*y{=(xW^7FSo$|+x*>s G@&5x`TR02= delta 9197 zcmbVxcVJUh^#5H+(G))RE&_bbu4VE@Qp|rJ4q0HQ;h=`&> zlp&zB$W#zPaR4GHQ}$3$5paUCWeBKz?@MXn`_tbazh7S7%enX6^*QIAch2rpcqC#357m1AGE@gk4})*bQ2s6{fF{b4>VfQ7IK4uAvUAUF(`LO&b@D_|w8f=|I} zI2lfXA^0kM4bBh31#lr;1Yd`X;S#tM*2C3s1AGr|grC4I@HjjHPr|R@*YFfP4Znfk z!tdZ2cphGW*Wh({1Kxx8kqW7i25C_&(xEsMj}lNKYJpm#j;Isrj7%s6nUMuqksGC> z?x+XKLc`E-Gy*+|iqS|EEJ3Bnk4B-d4OzX&2S5>4bpL6n3e2_%uU zAWx8vq!Y;^*`z1wMS7DQl1uuKz9f(IBmGG}DIkN%5b`7$OU99MGJ#Aabz~BmOs12k z$xQMJnM>xAC1fe7Co9NGvX-nT8_8z!8QDR0lF!K(WS5!jBL~SDa-RH5u9F+&4|0>- z5?4p!tQ&4 zeg*g(d;xZW-Cz%OQWs698PvA|>;wD3m*4<6NW0S~=>$59zD`q)gI+)ZdV?I03yx7h zH8gF6vPY<&yJP4xNo43Hd2HycJ5mC^4!?7UuDkn5z<1$-C)CI7l7RE!f;W^bvqk+9 zrZYzjP|4E zW5R4u0mi-sm5>u|+Mni!Z?lq9CPtKrpunrV9y>12D z0Br+Ig01O5I;a7*h3)8II)sU7hqAT36BxUUnz{DxwB3FUgg;IF^w22uGr(jzoQ`;` zU*V|A^3s~n`Ig#&&<1^s8PEy@;O0hnA24{&{U2RIKevn-2)DvL0>W+ZQ@9;|26w=n@N@VD+y!^j=jm+v z0)3Irp)b*w=__k31%;NM8(%bJk<0dF@Vxy6tydaO&Moc=-)0*b%kKkxwp2qJ_qB1nY9 zbTM5*m(n-rn{*kirww#DeQPa}G@(GzNRAZX4&vyFW)y4aJ9Hh>%JmGzK-jw_1A$u6 zl@CFnHcU*YEovv+bQN74zRk)=rRw2oQ5U2S14P{zz_o0(D479#o9)2mE!)SXB1aet zvNJ62KK}N6%UI5Xyg*xzGU$8t$VWG_KH051^+(yLKhUm0Jy9>z8|9!})CcuNd8i+K zpMF3$(+}xK^ke!7-9opnLHPnYRD=egfoKpK4BFFeVQin$?esIcgYIOdqD{M6r@=5G9T82dJo=HOU(ENY3 zUVs*|NsrK@Y|{1Z;*-#uX!*Yyy@ghwmGlHXNxuqRY1b(Wy@NLVtI>OCBicky(bM!B zn$kA?p_MBEN$n9xI)*+13iL7hWI&&MeQ9x^xG%>o43)MIkO>o~Ob>n6K3P=MqqwYm zle)taq#D{M-&Z-lsf2vwu6R0idlixFw4bs!+Q%2C1v{heDmJNU`JEyFo5-9-~ zUlFKgGb9ZhG&m{Z5I`Ujh=CD+;*y%G-25H|g7xaz-Ir9;inVGqWlhi9UjZo4$Gc_c zB_)Np&W0dYQdJ!Q0Oqmklv00938QB)x_n}wN~jn3q8>R;pb-)1YBn#Ubpk!Qk?tC9 z(@1*+x^#R+DQhDvrK)s%sX%|h=vfnL{fx#rjGj56%s&x;AU?qg?aFJ%m$4UrGFm;} zUt9wKkqPwyf5{j|Co@`BUC`gh=rjN%veA#xBOjv!{yMf$0DP5Ild8)`j|n7oEa{YF zwA*b-+5U;;{y?BxUUA8|;_A{QL1M)fu1Nqiq87S=m>PkzjC)q2-D>S-(lfp`fByZF zanKYRX;KFTSv0qMNIa^mYyiM^i{X3aQQgQz0DSl?0J?7;)wNp&fMNy!n-4#>B&{IJ zF@Zpp!(f;=aiYG=U!oV7()?i!RR7U}txX?%Y#hBXPBW~eO#i6j+VVh>fVZTwyt1}B zsivy9#GlkHN#H^A=m7kGcLX3by;EexV{7Qz-#^M2)-`v|d|2?EX3Qh10!6mtaCVACAapAqJ|NnyKC zURj+lFt%ZG!T%~B%j-9F8Z$3G#{BArsRgVYq@kk@4Qk*+M;z(Fcfn@xDRXHLfJ5L2 zi~CN3uUXu84qO0#fO{<3Q?l4DiJgk=S!CAVnLa&p^*J zd%Fa^#X_e;EL^(CLZlnvz$g(Luo*kC8~4OTcqof_rsJ7-C5va);&<>S{1N^Xe};GB zFO*89M%hN$UTIRMD$|u-WtMWNa)iJw#>*xqKiybvdMX3-+hZdHuN7@Y+lKYY&#es< zk1Y3RGDEzaRecHyi~8gXrKW@BGsOIpmF!^Ii9ScqqFrb=J6_Jv@9CHHEIqdpJqPBZ z{pd?DmjxLISeS91{uruDTMlqh87>PoqDCy=HU@oo<}U z-+)em!r=v#rNxtyiUUbTlf!6M{ucJe(HT%*4`L{ObkdziKLUNYt{(kFf2Apn4S#KJ z7%scf@1TAeO>TU71&m#ZuA*z`I=X@WKsV`c^b);7uhARy56T?8<}e1`4F@5=3(<)b z{Sz)+{&!3h6@kOAuCkD(f0QIlUw;(1Bu8-Js+%mX(dUF?2CT-3K)(uWuolN+9gf5C zIDy`#cj%w=F1<(Z)4x{X7Puw2gOjjE@E_>kJab+PcsP$W6M`3Zgu6rMGvY#C&xHcq z4O@YJHP$n2NybKO!YNE^Ec74xfQNvG%vDA_#5^QC6s-pBu?^d?gQ-;-quo@_Lop9i zcxdIJorg}LqF0D!e9(buT`oJ(aWC8(=kPFshY}t}F2{XvU!2FoC?2-vVVlqp?~}cm zdJY#b4Zs8OAUqfkVcI&3hf*HOco@w?Hl~7yN*;2n@CXL1m_=fDa4GilFh&5TVxZVh z0uNh-#J*cxG}TJbPmAXy(q#)axK+XV3oc+R8QUgBXQ zEo$mJ7l)XR;W{>3J${vkEreLNQH~4nBH`6S9=5Cxk0;1QDNJ1DFGUo&dJck6og;xOmvSo~w?SoD2*Wk@S{|?*fZ?nC=4zI`W;tlvcypiqu_wffj zY|F!TJZ#Uy4m^B? z8G#+&@z7k4zvrPPq|fTo5&sY#rK!=+_<|scU+}LyOy!}iK~Mxi_#r;a$Kk8^x-iBy z9y;oouPhIp%z7dQ-)24wtG&a+w0eA(hpv!3J0TPQ4eFQUfA9msl-$k3Ode)6+XjM3 z1kf%ggop@J?{pq|c$l%AuxNuY#q|nW?qfPNKD&P~hG_q*X)J5XRHVDmv!eo>!4APSpG5uh}6b8!5*>UWz36B(V z_f)haorw+T*O4xyE9pk`#6XgXk(fvdF%t{162`0Ep(9=m+lTo)WP&Q>VG$1ptRr^f z03nh_T!N(_9!7hKk7NSIt${o&rcB5qc~~OY4IcW1;wT=neKn01Y&zDn7RHc5GJvs{ zu;B*P6V_)iV{c+`D5!5B!^m(R4&mYOM~p2d{{I3xiUA$N!=VDuVYFyaGq>7$rkwj< zoElG_`mX`1+3Ev493d?8NhX<_y;Edl3Yp3d`!~Q!GA)#n(pg{<^IM6zCqp$ZO?6m8_2TIw%j(>heI@gxnwa9$5TD)@z6w7Fo5IHU9uYF(BFAj zNkQWfZ;Y1$RF&0PXr4LuKZO(FCWVbNP9v)6&2PN6hD!wEK zMksa6`C_hQpi%L&%W9bVPwE-)kLTfJ9!@<)4w1v;2sz5yA0x-f36}p0U*vS-Z)kPi z`gnE#hA$pYX(Sqfd{54X&KBqhImhswEr@-H?+5Z@D4{S8k)J}=!qx`z3;7-B-y*+~ z3*;jCjfc~D7~~=4A^#S+L@px*xyo`uJbaF> zSj34m|DnVpEx04n@o=`F#4pgIfjRzB0l^7po51tVX4dBj z+vp{>jrt4mRpSVgg(#7Qm5ry5sFSD*Te65*{8vJT0jV+}m=+n)Cw)26epB^;Y>31Q zLR$xR*J_#%MSWd~a5jcRkWJb_3e<1K!~Yb%fj_{@%x%35|78Cl{00AE`I;p5A3-Xz zBPVlJD^UOiSq@T_0!!szLRVP&z70#-TbWDYW^O{C(1anag2U*yKmy`G z8_<=-%np#wyv!mn6bxs%`IqowmXlwPKfs^ht;~P@oMq5&;(&OP_-XOW z;)UYZ#Y@C*h?j}ih~E~k6Td5dPrOO|Lj)I*5ivGmX2i=8^CDi2m>;n!;=PD15ql!` zMSK}?FygQzTB4P-m2{SLmFOkOl2nOZ5_C#jl5|NANv@XOD;>UO0G-(h}1=zBZoxtk*gy2MDB|`7I{4KWaRge zmm_aR{uTL8R78{{Dk@49)hQ}D$`#cks&`aDR3K_f)Z(c3qCSn<5%qc0?x?*{`=hP~ zqi#u&6ibOzELBNcN|U5*r0t{~q#dOxQj0WIYL_~tE@`?nN7_f4C+#m?EL|;KD}6`0 zUV2joWmqPXMab;39*eptH^?{2x5z(}ACw=HpOAkg|5koRepY^7 zep&vPLZlEYBnqiQt!S<2py;URtS~5yiWG%K;Z*ce3{aFSDil>gMYSTJn4qXrOjb-) zOjl6FYl;PmMT*6WrHVHd^@`<+6^d1gHHx>RNGYBRbQxftM;n)2UVw4zo_o3{#HFuLp4^5)Dh}PwNxFgR;b&l zJE%LVJFB~@_3C7`No`hJ)i$+5JwQD{{knRq`kV%7I%;w><2181AoprR8#V81HfuiD?A7eo9MBxq9M_!Ge69IKb5V0!b6@kf=7E-I#af9r7^RKVcF;Pt zE^WFtL+jIa*Jf#ZYI|#QwSBdv+ELmu+OgVlZH2ZkFl3xuf$%9y%Bpe_IB)_vG;TlI+;$cQ|dIjSY4bh zLDyN=O=s2Fblr8mbU8s?A6>q#P&Ys~NH<1TtE;BZ;)BP1Ej^pAw$GPGP;>zNt$IXv> zH*Qzl*YUdeR`DI;jq&dI?(tdiJ>z@F_m3}#FNz-+KRA9){Ob7Nj`;oYC*!}4KOO&V z{F(T(@#o{O#NUd)6Mr}UegaA$3E~7vLR3OZLUF>Jg!u_e6ILa>pRgriTf+8)9SM6A z_9q-jIFxWC;dH{c3Fi~8B-~24lW;fTej-XFiQ+^_VpO6kQJdH~F*VVh=t=Y@W+wJd z%uVc@*e@|ZacE*mVtFtzpjYZ+^a=V-`ec2oK2zUMpRX^}56}V!CL$WV&j)VY+F$W4fCnOKFv2O36+sOqr3gAZ10$#*~j!wx(=P*_pC0 z^?CSZlnsg*D0A*4o}`vRbS*tJCVXdaSwDJZrwS$U4Y6#9CpU zVx4Z~tuw68S)aGgw=S?Qw7zcLX5DZ7(fW(^qVVeb?wg{Wn*4dVB%eRfS z)z|{I3AUh(+Mcn!Xq#tSV0+89%C^?F&bGm}(e{b^PUc;6zT5Q{t35w@d1>#kemj&ZBpYPZ(i#qDa?f^eb?(VEuKa;*F{f+eZ)3>ExNWbjSd0Kng1wBuAI(e)fm&fDrd3tzqJ$asd zPmyP!r_@vFdDgSQv&hrnS>ajjS?k&4IpjI&IpMjL!DU!7vNHS`lQN#oSe~&WV^zkQ zjJGq^XKcvWnDKtbwu}=Qr!%f)-1Tx^tyk}LdNaLQ-d^5ZZ=QFMcc^!Sx7b_i9p$a` zKIaY2^DgnO@ow~f;Qh$E#rvsuk9VK