From ff1be86ca77a15614702615319695b2c5fce8828 Mon Sep 17 00:00:00 2001 From: Alberto Salas Date: Wed, 23 Aug 2017 16:25:55 +0200 Subject: [PATCH 1/6] Update pods --- Sample/Demo.xcodeproj/project.pbxproj | 2 +- Sample/Podfile | 18 +- Sample/Podfile.lock | 35 +- .../Moya-ObjectMapper.podspec.json | 4 +- Sample/Pods/Manifest.lock | 35 +- .../Pods/ObjectMapper/Sources/FromJSON.swift | 20 +- .../Sources/HexColorTransform.swift | 18 +- .../Sources/ImmutableMappable.swift | 5 + .../Sources/IntegerOperators.swift | 80 +- Sample/Pods/ObjectMapper/Sources/Map.swift | 2 +- .../Pods/ObjectMapper/Sources/Mappable.swift | 9 +- Sample/Pods/ObjectMapper/Sources/Mapper.swift | 7 +- Sample/Pods/ObjectMapper/Sources/ToJSON.swift | 12 +- Sample/Pods/Pods.xcodeproj/project.pbxproj | 2493 +++++++++------- Sample/Pods/ReactiveSwift/LICENSE.md | 19 + Sample/Pods/ReactiveSwift/README.md | 161 + .../Pods/ReactiveSwift/Sources/Action.swift | 339 +++ .../Pods/ReactiveSwift/Sources/Atomic.swift | 289 ++ Sample/Pods/ReactiveSwift/Sources/Bag.swift | 102 + .../Sources/Deprecations+Removals.swift | 198 ++ .../ReactiveSwift/Sources/Disposable.swift | 364 +++ Sample/Pods/ReactiveSwift/Sources/Event.swift | 180 ++ .../ReactiveSwift/Sources/EventLogger.swift | 139 + .../Pods/ReactiveSwift/Sources/Flatten.swift | 952 ++++++ .../Sources/FoundationExtensions.swift | 168 ++ .../Sources/InhabitableTypeGuards.swift | 132 + .../Pods/ReactiveSwift/Sources/Lifetime.swift | 110 + .../Pods/ReactiveSwift/Sources/Observer.swift | 122 + .../Pods/ReactiveSwift/Sources/Optional.swift | 42 + .../Pods/ReactiveSwift/Sources/Property.swift | 771 +++++ .../Pods/ReactiveSwift/Sources/Reactive.swift | 33 + .../Sources/ResultExtensions.swift | 13 + .../ReactiveSwift/Sources/Scheduler.swift | 563 ++++ .../Pods/ReactiveSwift/Sources/Signal.swift | 2655 +++++++++++++++++ .../Sources/SignalProducer.swift | 2301 ++++++++++++++ .../Sources/UnidirectionalBinding.swift | 165 + .../Sources/ValidatingProperty.swift | 327 ++ .../Moya-ObjectMapper/Info.plist | 2 +- .../ObjectMapper/Info.plist | 2 +- .../ObjectMapper/ObjectMapper.xcconfig | 2 +- .../Pods-Demo-acknowledgements.markdown | 23 + .../Pods-Demo-acknowledgements.plist | 29 + .../Pods-Demo/Pods-Demo-frameworks.sh | 2 + .../Pods-Demo/Pods-Demo-resources.sh | 3 + .../Pods-Demo/Pods-Demo.debug.xcconfig | 7 +- .../Pods-Demo/Pods-Demo.release.xcconfig | 7 +- .../ReactiveSwift/Info.plist | 26 + .../ReactiveSwift/ReactiveSwift-dummy.m | 5 + .../ReactiveSwift/ReactiveSwift-prefix.pch | 12 + .../ReactiveSwift/ReactiveSwift-umbrella.h | 16 + .../ReactiveSwift/ReactiveSwift.modulemap | 6 + .../ReactiveSwift/ReactiveSwift.xcconfig | 12 + .../RxSwift/RxSwift 2.xcconfig | 10 + 53 files changed, 11834 insertions(+), 1215 deletions(-) create mode 100644 Sample/Pods/ReactiveSwift/LICENSE.md create mode 100644 Sample/Pods/ReactiveSwift/README.md create mode 100644 Sample/Pods/ReactiveSwift/Sources/Action.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/Atomic.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/Bag.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/Deprecations+Removals.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/Disposable.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/Event.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/EventLogger.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/Flatten.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/FoundationExtensions.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/InhabitableTypeGuards.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/Lifetime.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/Observer.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/Optional.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/Property.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/Reactive.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/ResultExtensions.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/Scheduler.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/Signal.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/SignalProducer.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/UnidirectionalBinding.swift create mode 100644 Sample/Pods/ReactiveSwift/Sources/ValidatingProperty.swift create mode 100644 Sample/Pods/Target Support Files/ReactiveSwift/Info.plist create mode 100644 Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-dummy.m create mode 100644 Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-prefix.pch create mode 100644 Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-umbrella.h create mode 100644 Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift.modulemap create mode 100644 Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift.xcconfig create mode 100644 Sample/Pods/Target Support Files/RxSwift/RxSwift 2.xcconfig diff --git a/Sample/Demo.xcodeproj/project.pbxproj b/Sample/Demo.xcodeproj/project.pbxproj index 46c0420a..ab82cbc7 100755 --- a/Sample/Demo.xcodeproj/project.pbxproj +++ b/Sample/Demo.xcodeproj/project.pbxproj @@ -191,7 +191,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; 9C291DA5D8E32DC7E23D2181 /* [CP] Embed Pods Frameworks */ = { diff --git a/Sample/Podfile b/Sample/Podfile index 2b85b057..e8ba9e21 100755 --- a/Sample/Podfile +++ b/Sample/Podfile @@ -7,18 +7,18 @@ def libraries pod 'Moya-ObjectMapper', :path => "../" #pod 'Moya-ObjectMapper/ReactiveCocoa', :path => "../" pod 'Moya-ObjectMapper/RxSwift', :path => "../" - pod 'ObjectMapper', :git => 'https://github.com/Hearst-DD/ObjectMapper' - pod 'Moya' #, :git => 'https://github.com/Moya/Moya' - #pod 'ReactiveSwift', :git => 'https://github.com/ReactiveCocoa/ReactiveSwift' - pod 'RxSwift' #, :git => 'https://github.com/ReactiveX/RxSwift' + pod 'ObjectMapper', '~> 2.2' + pod 'Moya', '~> 8.0' + pod 'ReactiveSwift', '~> 2.0' + pod 'RxSwift', '~> 3.4' end # Test Libraries -def test_pods - pod 'Quick' - pod 'Nimble' - pod 'OHHTTPStubs' -end +#def test_pods +# pod 'Quick' +# pod 'Nimble' +# pod 'OHHTTPStubs' +#end target 'Demo' do platform :ios, '9.0' diff --git a/Sample/Podfile.lock b/Sample/Podfile.lock index d77d2bd0..00ec9b19 100644 --- a/Sample/Podfile.lock +++ b/Sample/Podfile.lock @@ -2,12 +2,12 @@ PODS: - Alamofire (4.4.0) - Moya (8.0.3): - Moya/Core (= 8.0.3) - - Moya-ObjectMapper (2.3.1): - - Moya-ObjectMapper/Core (= 2.3.1) - - Moya-ObjectMapper/Core (2.3.1): + - Moya-ObjectMapper (2.3.2): + - Moya-ObjectMapper/Core (= 2.3.2) + - Moya-ObjectMapper/Core (2.3.2): - Moya (~> 8.0) - ObjectMapper (~> 2.2) - - Moya-ObjectMapper/RxSwift (2.3.1): + - Moya-ObjectMapper/RxSwift (2.3.2): - Moya-ObjectMapper/Core - Moya/RxSwift - RxSwift (~> 3.1) @@ -17,36 +17,33 @@ PODS: - Moya/RxSwift (8.0.3): - Moya/Core - RxSwift (~> 3.0) - - ObjectMapper (2.2.5) + - ObjectMapper (2.2.8) + - ReactiveSwift (2.0.0): + - Result (~> 3.2) - Result (3.2.1) - RxSwift (3.4.0) DEPENDENCIES: - - Moya + - Moya (~> 8.0) - Moya-ObjectMapper (from `../`) - Moya-ObjectMapper/RxSwift (from `../`) - - ObjectMapper (from `https://github.com/Hearst-DD/ObjectMapper`) - - RxSwift + - ObjectMapper (~> 2.2) + - ReactiveSwift (~> 2.0) + - RxSwift (~> 3.4) EXTERNAL SOURCES: Moya-ObjectMapper: :path: ../ - ObjectMapper: - :git: https://github.com/Hearst-DD/ObjectMapper - -CHECKOUT OPTIONS: - ObjectMapper: - :commit: 0b38c787d442714223604919f113d84cd55f5427 - :git: https://github.com/Hearst-DD/ObjectMapper SPEC CHECKSUMS: Alamofire: dc44b1600b800eb63da6a19039a0083d62a6a62d Moya: d3721622e3cc0cc2f038d69a258686f0b66e7252 - Moya-ObjectMapper: 868c88169d20e5b48bff160d3730252e6ac33394 - ObjectMapper: d4cd68f462d89a878a1c2c480f389ec5f9a7ea04 + Moya-ObjectMapper: 46bd1bd986886858c4461b06b6ae1ea368869dc3 + ObjectMapper: 3d571bb5af471c779e1160828cd9ad5c4ef90958 + ReactiveSwift: 36339167e571774d936482d0f6512f5118a74731 Result: 2453a22e5c5b11c0c3a478736e82cd02f763b781 RxSwift: 3789a1af753002a14edecdb698a2424624296a9c -PODFILE CHECKSUM: 9299419ef67b47dd9a0ab9cd611dc44ff80199a2 +PODFILE CHECKSUM: fa24202d17cb64cbe41dd1aeeeb63487d11721c1 -COCOAPODS: 1.2.0 +COCOAPODS: 1.2.1 diff --git a/Sample/Pods/Local Podspecs/Moya-ObjectMapper.podspec.json b/Sample/Pods/Local Podspecs/Moya-ObjectMapper.podspec.json index 4a224ac7..2b0884d7 100644 --- a/Sample/Pods/Local Podspecs/Moya-ObjectMapper.podspec.json +++ b/Sample/Pods/Local Podspecs/Moya-ObjectMapper.podspec.json @@ -1,6 +1,6 @@ { "name": "Moya-ObjectMapper", - "version": "2.3.1", + "version": "2.3.2", "summary": "ObjectMapper bindings for Moya", "description": "[ObjectMapper](https://github.com/Hearst-DD/ObjectMapper) bindings for\n[Moya](https://github.com/Moya/Moya) for easier JSON serialization.\nIncludes [RxSwift](https://github.com/ReactiveX/RxSwift/) bindings as well.\nInstructions on how to use it are in\n[the README](https://github.com/ivanbruel/Moya-ObjectMapper).", "homepage": "https://github.com/ivanbruel/Moya-ObjectMapper", @@ -20,7 +20,7 @@ }, "source": { "git": "https://github.com/ivanbruel/Moya-ObjectMapper.git", - "tag": "2.3.1" + "tag": "2.3.2" }, "default_subspecs": "Core", "subspecs": [ diff --git a/Sample/Pods/Manifest.lock b/Sample/Pods/Manifest.lock index d77d2bd0..00ec9b19 100644 --- a/Sample/Pods/Manifest.lock +++ b/Sample/Pods/Manifest.lock @@ -2,12 +2,12 @@ PODS: - Alamofire (4.4.0) - Moya (8.0.3): - Moya/Core (= 8.0.3) - - Moya-ObjectMapper (2.3.1): - - Moya-ObjectMapper/Core (= 2.3.1) - - Moya-ObjectMapper/Core (2.3.1): + - Moya-ObjectMapper (2.3.2): + - Moya-ObjectMapper/Core (= 2.3.2) + - Moya-ObjectMapper/Core (2.3.2): - Moya (~> 8.0) - ObjectMapper (~> 2.2) - - Moya-ObjectMapper/RxSwift (2.3.1): + - Moya-ObjectMapper/RxSwift (2.3.2): - Moya-ObjectMapper/Core - Moya/RxSwift - RxSwift (~> 3.1) @@ -17,36 +17,33 @@ PODS: - Moya/RxSwift (8.0.3): - Moya/Core - RxSwift (~> 3.0) - - ObjectMapper (2.2.5) + - ObjectMapper (2.2.8) + - ReactiveSwift (2.0.0): + - Result (~> 3.2) - Result (3.2.1) - RxSwift (3.4.0) DEPENDENCIES: - - Moya + - Moya (~> 8.0) - Moya-ObjectMapper (from `../`) - Moya-ObjectMapper/RxSwift (from `../`) - - ObjectMapper (from `https://github.com/Hearst-DD/ObjectMapper`) - - RxSwift + - ObjectMapper (~> 2.2) + - ReactiveSwift (~> 2.0) + - RxSwift (~> 3.4) EXTERNAL SOURCES: Moya-ObjectMapper: :path: ../ - ObjectMapper: - :git: https://github.com/Hearst-DD/ObjectMapper - -CHECKOUT OPTIONS: - ObjectMapper: - :commit: 0b38c787d442714223604919f113d84cd55f5427 - :git: https://github.com/Hearst-DD/ObjectMapper SPEC CHECKSUMS: Alamofire: dc44b1600b800eb63da6a19039a0083d62a6a62d Moya: d3721622e3cc0cc2f038d69a258686f0b66e7252 - Moya-ObjectMapper: 868c88169d20e5b48bff160d3730252e6ac33394 - ObjectMapper: d4cd68f462d89a878a1c2c480f389ec5f9a7ea04 + Moya-ObjectMapper: 46bd1bd986886858c4461b06b6ae1ea368869dc3 + ObjectMapper: 3d571bb5af471c779e1160828cd9ad5c4ef90958 + ReactiveSwift: 36339167e571774d936482d0f6512f5118a74731 Result: 2453a22e5c5b11c0c3a478736e82cd02f763b781 RxSwift: 3789a1af753002a14edecdb698a2424624296a9c -PODFILE CHECKSUM: 9299419ef67b47dd9a0ab9cd611dc44ff80199a2 +PODFILE CHECKSUM: fa24202d17cb64cbe41dd1aeeeb63487d11721c1 -COCOAPODS: 1.2.0 +COCOAPODS: 1.2.1 diff --git a/Sample/Pods/ObjectMapper/Sources/FromJSON.swift b/Sample/Pods/ObjectMapper/Sources/FromJSON.swift index 7cb4655b..952b42b4 100755 --- a/Sample/Pods/ObjectMapper/Sources/FromJSON.swift +++ b/Sample/Pods/ObjectMapper/Sources/FromJSON.swift @@ -48,7 +48,7 @@ internal final class FromJSON { /// Mappable object class func object(_ field: inout N, map: Map) { if map.toObject { - _ = Mapper(context: map.context).map(JSONObject: map.currentValue, toObject: field) + field = Mapper(context: map.context).map(JSONObject: map.currentValue, toObject: field) } else if let value: N = Mapper(context: map.context).map(JSONObject: map.currentValue) { field = value } @@ -57,8 +57,8 @@ internal final class FromJSON { /// Optional Mappable Object class func optionalObject(_ field: inout N?, map: Map) { - if let field = field , map.toObject && map.currentValue != nil { - _ = Mapper(context: map.context).map(JSONObject: map.currentValue, toObject: field) + if let f = field , map.toObject && map.currentValue != nil { + field = Mapper(context: map.context).map(JSONObject: map.currentValue, toObject: f) } else { field = Mapper(context: map.context).map(JSONObject: map.currentValue) } @@ -66,8 +66,8 @@ internal final class FromJSON { /// Implicitly unwrapped Optional Mappable Object class func optionalObject(_ field: inout N!, map: Map) { - if let field = field , map.toObject && map.currentValue != nil { - _ = Mapper(context: map.context).map(JSONObject: map.currentValue, toObject: field) + if let f = field , map.toObject && map.currentValue != nil { + field = Mapper(context: map.context).map(JSONObject: map.currentValue, toObject: f) } else { field = Mapper(context: map.context).map(JSONObject: map.currentValue) } @@ -119,7 +119,7 @@ internal final class FromJSON { /// Dctionary containing Mappable objects class func objectDictionary(_ field: inout Dictionary, map: Map) { if map.toObject { - _ = Mapper(context: map.context).mapDictionary(JSONObject: map.currentValue, toDictionary: field) + field = Mapper(context: map.context).mapDictionary(JSONObject: map.currentValue, toDictionary: field) } else { if let objects = Mapper(context: map.context).mapDictionary(JSONObject: map.currentValue) { field = objects @@ -129,8 +129,8 @@ internal final class FromJSON { /// Optional dictionary containing Mappable objects class func optionalObjectDictionary(_ field: inout Dictionary?, map: Map) { - if let field = field , map.toObject && map.currentValue != nil { - _ = Mapper(context: map.context).mapDictionary(JSONObject: map.currentValue, toDictionary: field) + if let f = field , map.toObject && map.currentValue != nil { + field = Mapper(context: map.context).mapDictionary(JSONObject: map.currentValue, toDictionary: f) } else { field = Mapper(context: map.context).mapDictionary(JSONObject: map.currentValue) } @@ -138,8 +138,8 @@ internal final class FromJSON { /// Implicitly unwrapped Dictionary containing Mappable objects class func optionalObjectDictionary(_ field: inout Dictionary!, map: Map) { - if let field = field , map.toObject && map.currentValue != nil { - _ = Mapper(context: map.context).mapDictionary(JSONObject: map.currentValue, toDictionary: field) + if let f = field , map.toObject && map.currentValue != nil { + field = Mapper(context: map.context).mapDictionary(JSONObject: map.currentValue, toDictionary: f) } else { field = Mapper(context: map.context).mapDictionary(JSONObject: map.currentValue) } diff --git a/Sample/Pods/ObjectMapper/Sources/HexColorTransform.swift b/Sample/Pods/ObjectMapper/Sources/HexColorTransform.swift index 2dce348f..dd9299f9 100644 --- a/Sample/Pods/ObjectMapper/Sources/HexColorTransform.swift +++ b/Sample/Pods/ObjectMapper/Sources/HexColorTransform.swift @@ -54,10 +54,20 @@ open class HexColorTransform: TransformType { fileprivate func hexString(color: Object) -> String { let comps = color.cgColor.components! - let r = Int(comps[0] * 255) - let g = Int(comps[1] * 255) - let b = Int(comps[2] * 255) - let a = Int(comps[3] * 255) + let compsCount = color.cgColor.numberOfComponents + let r: Int + let g: Int + var b: Int + let a = Int(comps[compsCount - 1] * 255) + if compsCount == 4 { // RGBA + r = Int(comps[0] * 255) + g = Int(comps[1] * 255) + b = Int(comps[2] * 255) + } else { // Grayscale + r = Int(comps[0] * 255) + g = Int(comps[0] * 255) + b = Int(comps[0] * 255) + } var hexString: String = "" if prefix { hexString = "#" diff --git a/Sample/Pods/ObjectMapper/Sources/ImmutableMappable.swift b/Sample/Pods/ObjectMapper/Sources/ImmutableMappable.swift index ca5a3f0b..0e2a7d42 100644 --- a/Sample/Pods/ObjectMapper/Sources/ImmutableMappable.swift +++ b/Sample/Pods/ObjectMapper/Sources/ImmutableMappable.swift @@ -83,6 +83,11 @@ public extension Map { public func value(_ key: String, nested: Bool? = nil, delimiter: String = ".", file: StaticString = #file, function: StaticString = #function, line: UInt = #line) throws -> T { return try self.value(key, nested: nested, delimiter: delimiter, using: EnumTransform(), file: file, function: function, line: line) } + + /// Returns a `[RawRepresentable]` type or throws an error. + public func value(_ key: String, nested: Bool? = nil, delimiter: String = ".", file: StaticString = #file, function: StaticString = #function, line: UInt = #line) throws -> [T] { + return try self.value(key, nested: nested, delimiter: delimiter, using: EnumTransform(), file: file, function: function, line: line) + } // MARK: BaseMappable diff --git a/Sample/Pods/ObjectMapper/Sources/IntegerOperators.swift b/Sample/Pods/ObjectMapper/Sources/IntegerOperators.swift index a7dd2f16..269c3bc8 100644 --- a/Sample/Pods/ObjectMapper/Sources/IntegerOperators.swift +++ b/Sample/Pods/ObjectMapper/Sources/IntegerOperators.swift @@ -90,40 +90,56 @@ public func <- (left: inout T!, right: Map) { /// Convert any value to `SignedInteger`. private func toSignedInteger(_ value: Any?) -> T? { - guard let value = value else { return nil } - let max: IntMax - switch value { - case let x as Int: max = .init(x) - case let x as Int8: max = .init(x) - case let x as Int16: max = .init(x) - case let x as Int32: max = .init(x) - case let x as Int64: max = .init(x) - case let x as UInt: max = .init(x) - case let x as UInt8: max = .init(x) - case let x as UInt16: max = .init(x) - case let x as UInt32: max = .init(x) - case let x as UInt64: max = .init(x) - default: return nil - } - return T.init(max) + guard + let value = value, + case let number as NSNumber = value + else { + return nil + } + + if T.self == Int.self, let x = Int(exactly: number.int64Value)?.toIntMax() { + return T.init(x) + } + if T.self == Int8.self, let x = Int8(exactly: number.int64Value)?.toIntMax() { + return T.init(x) + } + if T.self == Int16.self, let x = Int16(exactly: number.int64Value)?.toIntMax() { + return T.init(x) + } + if T.self == Int32.self, let x = Int32(exactly: number.int64Value)?.toIntMax() { + return T.init(x) + } + if T.self == Int64.self, let x = Int64(exactly: number.int64Value)?.toIntMax() { + return T.init(x) + } + + return nil } /// Convert any value to `UnsignedInteger`. private func toUnsignedInteger(_ value: Any?) -> T? { - guard let value = value else { return nil } - let max: UIntMax - switch value { - case let x as Int: max = .init(x) - case let x as Int8: max = .init(x) - case let x as Int16: max = .init(x) - case let x as Int32: max = .init(x) - case let x as Int64: max = .init(x) - case let x as UInt: max = .init(x) - case let x as UInt8: max = .init(x) - case let x as UInt16: max = .init(x) - case let x as UInt32: max = .init(x) - case let x as UInt64: max = .init(x) - default: return nil - } - return T.init(max) + guard + let value = value, + case let number as NSNumber = value + else { + return nil + } + + if T.self == UInt.self, let x = UInt(exactly: number.uint64Value)?.toUIntMax() { + return T.init(x) + } + if T.self == UInt8.self, let x = UInt8(exactly: number.uint64Value)?.toUIntMax() { + return T.init(x) + } + if T.self == UInt16.self, let x = UInt16(exactly: number.uint64Value)?.toUIntMax() { + return T.init(x) + } + if T.self == UInt32.self, let x = UInt32(exactly: number.uint64Value)?.toUIntMax() { + return T.init(x) + } + if T.self == UInt64.self, let x = UInt64(exactly: number.uint64Value)?.toUIntMax() { + return T.init(x) + } + + return nil } diff --git a/Sample/Pods/ObjectMapper/Sources/Map.swift b/Sample/Pods/ObjectMapper/Sources/Map.swift index b1e4e23a..c7e7a5e1 100644 --- a/Sample/Pods/ObjectMapper/Sources/Map.swift +++ b/Sample/Pods/ObjectMapper/Sources/Map.swift @@ -47,7 +47,7 @@ public final class Map { public var context: MapContext? public var shouldIncludeNilValues = false /// If this is set to true, toJSON output will include null values for any variables that are not set. - let toObject: Bool // indicates whether the mapping is being applied to an existing object + public let toObject: Bool // indicates whether the mapping is being applied to an existing object public init(mappingType: MappingType, JSON: [String: Any], toObject: Bool = false, context: MapContext? = nil, shouldIncludeNilValues: Bool = false) { diff --git a/Sample/Pods/ObjectMapper/Sources/Mappable.swift b/Sample/Pods/ObjectMapper/Sources/Mappable.swift index f8abb924..ac5d71d1 100644 --- a/Sample/Pods/ObjectMapper/Sources/Mappable.swift +++ b/Sample/Pods/ObjectMapper/Sources/Mappable.swift @@ -89,12 +89,9 @@ public extension Array where Element: BaseMappable { } /// Initialize Array from a JSON Array - public init?(JSONArray: [[String: Any]], context: MapContext? = nil) { - if let obj: [Element] = Mapper(context: context).mapArray(JSONArray: JSONArray) { - self = obj - } else { - return nil - } + public init(JSONArray: [[String: Any]], context: MapContext? = nil) { + let obj: [Element] = Mapper(context: context).mapArray(JSONArray: JSONArray) + self = obj } /// Returns the JSON Array diff --git a/Sample/Pods/ObjectMapper/Sources/Mapper.swift b/Sample/Pods/ObjectMapper/Sources/Mapper.swift index d12e87a4..b3cd984c 100755 --- a/Sample/Pods/ObjectMapper/Sources/Mapper.swift +++ b/Sample/Pods/ObjectMapper/Sources/Mapper.swift @@ -159,7 +159,7 @@ public final class Mapper { } /// Maps an array of JSON dictionary to an array of Mappable objects - public func mapArray(JSONArray: [[String: Any]]) -> [N]? { + public func mapArray(JSONArray: [[String: Any]]) -> [N] { // map every element in JSON array to type N let result = JSONArray.flatMap(map) return result @@ -242,9 +242,8 @@ public final class Mapper { if let JSONArray = JSONObject as? [[[String: Any]]] { var objectArray = [[N]]() for innerJSONArray in JSONArray { - if let array = mapArray(JSONArray: innerJSONArray){ - objectArray.append(array) - } + let array = mapArray(JSONArray: innerJSONArray) + objectArray.append(array) } if objectArray.isEmpty == false { diff --git a/Sample/Pods/ObjectMapper/Sources/ToJSON.swift b/Sample/Pods/ObjectMapper/Sources/ToJSON.swift index 311d1d51..4b73fdaa 100644 --- a/Sample/Pods/ObjectMapper/Sources/ToJSON.swift +++ b/Sample/Pods/ObjectMapper/Sources/ToJSON.swift @@ -103,7 +103,7 @@ internal final class ToJSON { } class func object(_ field: N, map: Map) { - if let result = Mapper(context: map.context).toJSON(field) as Any? { + if let result = Mapper(context: map.context, shouldIncludeNilValues: map.shouldIncludeNilValues).toJSON(field) as Any? { setValue(result, map: map) } } @@ -115,7 +115,7 @@ internal final class ToJSON { } class func objectArray(_ field: Array, map: Map) { - let JSONObjects = Mapper(context: map.context).toJSONArray(field) + let JSONObjects = Mapper(context: map.context, shouldIncludeNilValues: map.shouldIncludeNilValues).toJSONArray(field) setValue(JSONObjects, map: map) } @@ -129,7 +129,7 @@ internal final class ToJSON { class func twoDimensionalObjectArray(_ field: Array>, map: Map) { var array = [[[String: Any]]]() for innerArray in field { - let JSONObjects = Mapper(context: map.context).toJSONArray(innerArray) + let JSONObjects = Mapper(context: map.context, shouldIncludeNilValues: map.shouldIncludeNilValues).toJSONArray(innerArray) array.append(JSONObjects) } setValue(array, map: map) @@ -142,7 +142,7 @@ internal final class ToJSON { } class func objectSet(_ field: Set, map: Map) where N: Hashable { - let JSONObjects = Mapper(context: map.context).toJSONSet(field) + let JSONObjects = Mapper(context: map.context, shouldIncludeNilValues: map.shouldIncludeNilValues).toJSONSet(field) setValue(JSONObjects, map: map) } @@ -154,7 +154,7 @@ internal final class ToJSON { } class func objectDictionary(_ field: Dictionary, map: Map) { - let JSONObjects = Mapper(context: map.context).toJSONDictionary(field) + let JSONObjects = Mapper(context: map.context, shouldIncludeNilValues: map.shouldIncludeNilValues).toJSONDictionary(field) setValue(JSONObjects, map: map) } @@ -166,7 +166,7 @@ internal final class ToJSON { } class func objectDictionaryOfArrays(_ field: Dictionary, map: Map) { - let JSONObjects = Mapper(context: map.context).toJSONDictionaryOfArrays(field) + let JSONObjects = Mapper(context: map.context, shouldIncludeNilValues: map.shouldIncludeNilValues).toJSONDictionaryOfArrays(field) setValue(JSONObjects, map: map) } diff --git a/Sample/Pods/Pods.xcodeproj/project.pbxproj b/Sample/Pods/Pods.xcodeproj/project.pbxproj index c156eabd..03fbcab0 100644 --- a/Sample/Pods/Pods.xcodeproj/project.pbxproj +++ b/Sample/Pods/Pods.xcodeproj/project.pbxproj @@ -7,273 +7,291 @@ objects = { /* Begin PBXBuildFile section */ - 0007293B7C1233BC97E4ED5AF5A57C91 /* Skip.swift in Sources */ = {isa = PBXBuildFile; fileRef = B20A8FAAF282D8676964013F2760CA6D /* Skip.swift */; }; + 0007293B7C1233BC97E4ED5AF5A57C91 /* Skip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FED2C3C7E03453020D34A902D0A17AD /* Skip.swift */; }; + 000CAA7B68BCC90DFFBD95BED8A2038D /* FromJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76EBBC41CE9B11EAD62E0BCF95E85227 /* FromJSON.swift */; }; 000D350E67D30BCA2FBE7F2924993B84 /* Moya.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 16A860D8F4BF07CDAABA319C5E5658A4 /* Moya.framework */; }; - 009E1D75E836C631CE8DA835A99DD90F /* Throttle.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCE5D36F3E766348A125CB9493210152 /* Throttle.swift */; }; - 015ACB1F69FB7BF7DCAE4CE15F670AA7 /* Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 661CDC5032D166FBA5CE458E1BF640DE /* Zip+arity.swift */; }; - 0234CDBD103EB7AD5EB5A415C14D256C /* ConcurrentDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45995F50FB199435F20E308EEAC306FB /* ConcurrentDispatchQueueScheduler.swift */; }; - 037029FDDBE69FD9CBA0ECCE847A3FEB /* ImmutableMappable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A70F83A8FC06F68A6DCAFCB1C1931A2 /* ImmutableMappable.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 044D8F5D1B623F60FE19897EC2939280 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4236002E282A0F05AE59D0E2E156C8F9 /* Errors.swift */; }; - 04CE8CD210227DC6588E994D44EC48D3 /* ObservableType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C455CE4C2AB49693C462F0F2489ACC41 /* ObservableType+Extensions.swift */; }; - 0589A2581F370CC064FCF684189404A3 /* Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99D1CB2D021B25A05AE5B9642315716B /* Map.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 079DAEF92CDCF3DA376694301E257A48 /* TransformOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54F976946568B16991B730DAFD3EB62D /* TransformOf.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 07B3EC897842B37C329E7E84050BB001 /* Deferred.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8736CD3D4ED9BD6CA17CC10D2B8D8D61 /* Deferred.swift */; }; - 0B6CE56C30B14BCE715607D5F9623255 /* Just.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CA1F613F7A280DFD7B4A97EEA76DED0 /* Just.swift */; }; - 0ED61723CDE26126601F65727397C352 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC29AF625DB92BBFD8CCCBB81875E4ED /* Foundation.framework */; }; - 0F7E7F866EB647B836183A429A087B34 /* SerialDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AC412D307F23E01E9F08B6D676CD74B /* SerialDispatchQueueScheduler.swift */; }; - 10EB23E9ECC4B33E16933BB1EA560B6A /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D882F045A07D6D09D64E94E0010A9B2 /* Timeline.swift */; }; + 009E1D75E836C631CE8DA835A99DD90F /* Throttle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CBA7B0F508B12B0E6ABA92500E3EC2 /* Throttle.swift */; }; + 015ACB1F69FB7BF7DCAE4CE15F670AA7 /* Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82FDCC01E20E2C5AAE034A49D1ED5163 /* Zip+arity.swift */; }; + 0234CDBD103EB7AD5EB5A415C14D256C /* ConcurrentDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = B16391692DB4F8314C30BC547232672C /* ConcurrentDispatchQueueScheduler.swift */; }; + 044D8F5D1B623F60FE19897EC2939280 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E6D5912B420A7B69CCF77E5A9BF85AF /* Errors.swift */; }; + 04CE8CD210227DC6588E994D44EC48D3 /* ObservableType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE44D39AA5ECD4810DFE500D8E781CC3 /* ObservableType+Extensions.swift */; }; + 07B3EC897842B37C329E7E84050BB001 /* Deferred.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEC6DAEDB2A4F64D0361DAC2A90CE887 /* Deferred.swift */; }; + 09DB9B04AEECC7468A86685AD754BE5C /* CustomDateFormatTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CAAA0D52FCA1C1DEC597260623EF2A5 /* CustomDateFormatTransform.swift */; }; + 0AC4D4C16737845EB4BC47ED4C13E504 /* ISO8601DateTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2686171BA16348F07095C4FE784112A0 /* ISO8601DateTransform.swift */; }; + 0B6CE56C30B14BCE715607D5F9623255 /* Just.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57C654F7468F90C4C3D24FED3C7F0D3E /* Just.swift */; }; + 0BEE3A2E43CD635836111FD0AB701E16 /* SignalProducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 903F6654FD1FDACF86081CEF68EE96BB /* SignalProducer.swift */; }; + 0CB40B5FA8ED1D19D39A6E2E45B6F8D9 /* TransformOperators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A6D71F9BF566B4365BE46AB589E7461 /* TransformOperators.swift */; }; + 0E1548980432E6CA13021CA74E639EA2 /* DictionaryTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5920B5993039870B306EC532F225E154 /* DictionaryTransform.swift */; }; + 0ECB1FCB4B9AFE4C0E9A80FC223BC787 /* ReactiveSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7134E6FE5CB1D5BBC04158D17EF07982 /* ReactiveSwift-dummy.m */; }; + 0F7E7F866EB647B836183A429A087B34 /* SerialDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3385E307C8C0628285FFAC438D4B6E7D /* SerialDispatchQueueScheduler.swift */; }; + 10EB23E9ECC4B33E16933BB1EA560B6A /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42D894EA6C6A47B6CFDE3704A55204D7 /* Timeline.swift */; }; 11523975ADA09CD9D08AE04D8DA8DD4D /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7697FC2B90D6509A8AC3659265DC0FB7 /* RxSwift.framework */; }; - 119AF3B25A9CFAA50085DCFE55057051 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CB6BBFA4EAE17E5FED8B104F1C58419 /* Operators.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 12C2557A9EB8643C5418E197CD77AA70 /* DisposeBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6500AB1E0A7CF345A6A5AD93C22AB881 /* DisposeBase.swift */; }; - 14A046FA24D0256F42644010C67328B5 /* ConnectableObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D739F9F4EA372D25C0F421BFB9C9307 /* ConnectableObservableType.swift */; }; - 14A9AC8D888C262918189DCF10B1FC75 /* Timeout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 997F32138543863AC0F210BFA00BB640 /* Timeout.swift */; }; - 160D2378A15056D039FEECF60F12F48D /* SchedulerServices+Emulation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CEA079621EDB8D262AA7E27EFF723D1 /* SchedulerServices+Emulation.swift */; }; - 16576AA661FF85E4BA6D02FEFB402925 /* Empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 847EB8278900D5C808A1AE095CCFB16E /* Empty.swift */; }; - 17CA10FA4E82F2BFAF9643E4929A41FE /* RefCountDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41A25ED627CF34B02A326E2701F21B52 /* RefCountDisposable.swift */; }; - 17F5144A575AFC3DB5BF1F3D469BC837 /* AsSingle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E06217CCEEA5A6A85FF15D452B5036B /* AsSingle.swift */; }; - 18235B4CDF8BED426D20EA5A24A55AFE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC29AF625DB92BBFD8CCCBB81875E4ED /* Foundation.framework */; }; - 18772B6600510FC9AC2A2C07845EBBBE /* SynchronizedDisposeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6338FDB14507B24CB58218F277F30E43 /* SynchronizedDisposeType.swift */; }; - 198DEE3F4FFE846BD52C01F6A53F754C /* AsyncSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 502339D5742C7BA688BB1A497F95BEC5 /* AsyncSubject.swift */; }; - 19D382282D1BD1F7F3872A7C740D31CF /* SchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4073CD83FCA4AC0E3081D4145754045 /* SchedulerType.swift */; }; - 1A171E7748485C86326FB3AC316A7E49 /* TailRecursiveSink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80E161B2311D9D7929D6B7F9882E9AA6 /* TailRecursiveSink.swift */; }; - 1A2B98B68FA7555BE1A35DF42C96A4E7 /* RxSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = AFA910E4D8FDCAF115C39C34BB7DFB8A /* RxSwift-dummy.m */; }; - 1A5E4B94ACF07CE3EDD80F144C65039D /* RecursiveLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 682A7454DD4DE301517D214700298097 /* RecursiveLock.swift */; }; - 1B114BA2ACB4E6B22768B72A520F7692 /* Sample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E415D9D86E08EFA2341F11C9B275535 /* Sample.swift */; }; - 1B49968381587E76C8067F62F5FA1085 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC29AF625DB92BBFD8CCCBB81875E4ED /* Foundation.framework */; }; - 1B9EDEDC964E6B08F78920B4F4B9DB84 /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = BC1268E27E1E327253894BCA8C703B88 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1BA578A0C93C7603A772D319F809D5A1 /* DelaySubscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE73E3CEA2FEA01B426C2D2BE06D16C9 /* DelaySubscription.swift */; }; - 1BFE36BD6F8696E7292CE75586D83AB4 /* SingleAsync.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCF50EC37251107F017096A20FAD1B06 /* SingleAsync.swift */; }; - 1C4BD460D1E1F4243C0925B92D8D8786 /* Multicast.swift in Sources */ = {isa = PBXBuildFile; fileRef = E41176BB627F78B7C7A18255EBC1C3D6 /* Multicast.swift */; }; - 1CAEF92803A506A44E9E8EFBF587B5BE /* PrimitiveSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD56E8455B399BBAA9421C854F6E0500 /* PrimitiveSequence.swift */; }; - 1D00764CF6D44AAD20FBF135E6721976 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC29AF625DB92BBFD8CCCBB81875E4ED /* Foundation.framework */; }; - 1FD6E1149F3EC3B0DD8F893B6762BBBC /* StartWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = A475A7C0B8D84613688AB8C8ACB5884C /* StartWith.swift */; }; - 20ED4F70F7F94FE9EC8D49995F11434B /* CombineLatest+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CD045EE0F7BD32E53266987C5C7EDA0 /* CombineLatest+arity.swift */; }; - 218C9303A963293AF3098CA758C549E2 /* IntegerOperators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78DC3A82104E37427CE082CB98D90BE7 /* IntegerOperators.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 22CFA90FDBDA6D91E5377B5BEE7AEABE /* ScheduledItemType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B2127E2F8A3390CDE0D6D747F686A7D /* ScheduledItemType.swift */; }; - 2646370A1E8A0A940E95F11D50253580 /* TakeLast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 916F25D4C8837908950EA7A5583E6967 /* TakeLast.swift */; }; - 27009AF83A814DA8E88F6707164167B2 /* Repeat.swift in Sources */ = {isa = PBXBuildFile; fileRef = F80B3E882544DF62F4A034AB22053AE3 /* Repeat.swift */; }; - 285C41FA5502F33262E4420A182D9AD8 /* Delay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CA56D9693D713B9544995B44EE44F0D /* Delay.swift */; }; + 12C2557A9EB8643C5418E197CD77AA70 /* DisposeBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE74BAF25E92CDB17782F9AB8F17B753 /* DisposeBase.swift */; }; + 14A046FA24D0256F42644010C67328B5 /* ConnectableObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D57C17E48D6B4C471E30BEBF78305148 /* ConnectableObservableType.swift */; }; + 14A9AC8D888C262918189DCF10B1FC75 /* Timeout.swift in Sources */ = {isa = PBXBuildFile; fileRef = E59D4F322D6E7D3BA6C49B1AA610A934 /* Timeout.swift */; }; + 160D2378A15056D039FEECF60F12F48D /* SchedulerServices+Emulation.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB5F2649EE2009363B0F09C8A6ADA83A /* SchedulerServices+Emulation.swift */; }; + 16576AA661FF85E4BA6D02FEFB402925 /* Empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 408788B1F07BDFF8D6682B7D0F390607 /* Empty.swift */; }; + 17CA10FA4E82F2BFAF9643E4929A41FE /* RefCountDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B1F9906C460EF3154ED146983F06918 /* RefCountDisposable.swift */; }; + 17F5144A575AFC3DB5BF1F3D469BC837 /* AsSingle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0323144B011FDDF6827A6B8DBA85B00B /* AsSingle.swift */; }; + 18772B6600510FC9AC2A2C07845EBBBE /* SynchronizedDisposeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8334CB787F208F16FF132C8023FD6F9C /* SynchronizedDisposeType.swift */; }; + 198DEE3F4FFE846BD52C01F6A53F754C /* AsyncSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 688D59A630A170299AE908873175B206 /* AsyncSubject.swift */; }; + 19D382282D1BD1F7F3872A7C740D31CF /* SchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7479AA1AE7EBE9F210DF7C06D08FA79E /* SchedulerType.swift */; }; + 1A171E7748485C86326FB3AC316A7E49 /* TailRecursiveSink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D64D5D6EAE2F4029F0EE7D6856F4DB /* TailRecursiveSink.swift */; }; + 1A2B98B68FA7555BE1A35DF42C96A4E7 /* RxSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6388C76E87715C20A6CC8DE03465171B /* RxSwift-dummy.m */; }; + 1A5E4B94ACF07CE3EDD80F144C65039D /* RecursiveLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28297762695E3A606FF79D55CD44A1E8 /* RecursiveLock.swift */; }; + 1B114BA2ACB4E6B22768B72A520F7692 /* Sample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98A388B968E9204926C346DCDF6062B0 /* Sample.swift */; }; + 1B9EDEDC964E6B08F78920B4F4B9DB84 /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 99FE737E0F857E5191A1E4F1C1D81AC3 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1BA578A0C93C7603A772D319F809D5A1 /* DelaySubscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1E2F6D667244D405AA74248C94355AA /* DelaySubscription.swift */; }; + 1BFE36BD6F8696E7292CE75586D83AB4 /* SingleAsync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F3FB9AB8D8CB0B217990A29076233B1 /* SingleAsync.swift */; }; + 1C4BD460D1E1F4243C0925B92D8D8786 /* Multicast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89273F92A2616EA7FA505C493114118A /* Multicast.swift */; }; + 1CAEF92803A506A44E9E8EFBF587B5BE /* PrimitiveSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = E27C09CC42C9E61A48D61D96E32C2224 /* PrimitiveSequence.swift */; }; + 1FC11BFA37680C9CA9F198E6A1881005 /* Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65EF88911B1EF37A8A6E08A5847C5CF0 /* Map.swift */; }; + 1FD6E1149F3EC3B0DD8F893B6762BBBC /* StartWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E03DD3956442CB4D8565AD68A91D369 /* StartWith.swift */; }; + 20ED4F70F7F94FE9EC8D49995F11434B /* CombineLatest+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = D92F7DCD41D5266E43DFE3FAD66403EC /* CombineLatest+arity.swift */; }; + 22CFA90FDBDA6D91E5377B5BEE7AEABE /* ScheduledItemType.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4A5B4C75C3181B16E43A4F7B73DE44A /* ScheduledItemType.swift */; }; + 2646370A1E8A0A940E95F11D50253580 /* TakeLast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C6FC130D59DFCF7457E87174231D525 /* TakeLast.swift */; }; + 27009AF83A814DA8E88F6707164167B2 /* Repeat.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE5FB20FE5428FAA73D3437465495EC /* Repeat.swift */; }; + 285C41FA5502F33262E4420A182D9AD8 /* Delay.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7ED7D46DDE3DB9F34D961D4247C9E58 /* Delay.swift */; }; 2931270581FC1B6B83757EB3C3CEC760 /* ObjectMapper.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B87CCF9A5173095B333FB06CA24E143 /* ObjectMapper.framework */; }; - 2AB311218EFF549A0E9E481DB51603E5 /* TakeUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8C41EDF5D0590810A390C8B56A31EA6 /* TakeUntil.swift */; }; + 2AB311218EFF549A0E9E481DB51603E5 /* TakeUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5CFCA13C0BBA88AFC72A9C1CD73A031 /* TakeUntil.swift */; }; 2BBA25B63470ECAF1D6608594313C917 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7697FC2B90D6509A8AC3659265DC0FB7 /* RxSwift.framework */; }; - 2E28CD026DEB6B00E52C1A833343249B /* Plugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8279331EFB9537F40D63DCB795CFF054 /* Plugin.swift */; }; - 2E50C0243F9BBCE7FF7F015FDA3EF6D5 /* RxMutableBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4182FE0590CD87191361E8699241CCF6 /* RxMutableBox.swift */; }; - 31DA6D8BA73FFCA5C1BAE2FF42D58EA3 /* VirtualTimeConverterType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 564A31F989B5B94D2BEB0F13DAC9D57F /* VirtualTimeConverterType.swift */; }; - 32D18A277CA084098022CBBDFC7D1C0F /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58145952B5E58F93AC0CAB35D8BB06DA /* ResultProtocol.swift */; }; - 342F1D53C4E2AA0B324103A4553D668D /* RecursiveScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = B74105286857325F78F5FD3B89A006FC /* RecursiveScheduler.swift */; }; - 349B655C63E8173DBE9D7E6FA7DB3D36 /* DistinctUntilChanged.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52F012528B1DA886C4BDB36128B97C76 /* DistinctUntilChanged.swift */; }; - 35B61F9CC18DE8CA76EA037A2A8712AA /* Merge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07B4A2BA63EA18D09A87E038646E464F /* Merge.swift */; }; - 3626B94094672CB1C9DEA32B9F9502E1 /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68F2BB306D2162504F49E65135E9E9A0 /* TaskDelegate.swift */; }; - 374051E6F49A7295C8F1112894850901 /* Result-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D5C86E305521220FB2D5AA5156E82C39 /* Result-dummy.m */; }; - 380C3B007662930AF04A7C1733070AFB /* FromJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70AF4B49B39C3CFD638D93B2BE35164E /* FromJSON.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 2D694447FB3438F52AEEB36230A387CA /* NSDecimalNumberTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20AEF3C06A5DFD905B23CA9F2E2425FE /* NSDecimalNumberTransform.swift */; }; + 2E28CD026DEB6B00E52C1A833343249B /* Plugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = D714CB5781BB6873581A3DC0A79B9E85 /* Plugin.swift */; }; + 2E50C0243F9BBCE7FF7F015FDA3EF6D5 /* RxMutableBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57A565AA1BD6CD7E0C542B05BE4C9637 /* RxMutableBox.swift */; }; + 2FE4DAE5F7A4342DF8D3DC589B732685 /* Mapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45839231A4901B0E5436EF73077831F0 /* Mapper.swift */; }; + 3176BBD94BCD96863313626D1F2389A6 /* UnidirectionalBinding.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3978B3D1F18561B41C5412350F64F37 /* UnidirectionalBinding.swift */; }; + 31DA6D8BA73FFCA5C1BAE2FF42D58EA3 /* VirtualTimeConverterType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39E05E41EC88853ABC2E4FE509051C89 /* VirtualTimeConverterType.swift */; }; + 32D18A277CA084098022CBBDFC7D1C0F /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F56CB1AD0A49EC42E54D6467761239E /* ResultProtocol.swift */; }; + 342F1D53C4E2AA0B324103A4553D668D /* RecursiveScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16AC502307017147E0782DA0BE937992 /* RecursiveScheduler.swift */; }; + 349B655C63E8173DBE9D7E6FA7DB3D36 /* DistinctUntilChanged.swift in Sources */ = {isa = PBXBuildFile; fileRef = D957E7D9F0804FBE080A56A0A7C32859 /* DistinctUntilChanged.swift */; }; + 35B61F9CC18DE8CA76EA037A2A8712AA /* Merge.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBDB1E14A220EC920FC1FB4625810264 /* Merge.swift */; }; + 3626B94094672CB1C9DEA32B9F9502E1 /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E928AE794F4E1E19A5AD255A37D6752 /* TaskDelegate.swift */; }; + 374051E6F49A7295C8F1112894850901 /* Result-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A02D79B87B95AAC12858D2761EFA288 /* Result-dummy.m */; }; 39346FCED48D5C12D52942507E916C90 /* Moya-ObjectMapper-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 41C6FA254A44FFC58952089BB7F468C9 /* Moya-ObjectMapper-dummy.m */; }; - 3D61AF186EFD00BD31F145AF3241C759 /* ConnectableObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0ED317734300994343806A205124D34D /* ConnectableObservable.swift */; }; - 3E433D1D3D46D117F7DD7269FC35A26C /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = A779A975FD6FDA53C702EB73FA73A276 /* Error.swift */; }; - 3E56DB4136E625DCA0B4F278CE147D6B /* RxMoyaProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8337E7F6FC7B272D06D41B55C51578C2 /* RxMoyaProvider.swift */; }; - 3F0C39B1549DC1FFF72E6556B4F7954E /* TransformType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C1C2F93115B3366C7A6769B1DA2D4C4 /* TransformType.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 3FEAF6012706E5EF26CECD5DBE4449E2 /* Queue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69E2BB057A552EBAB05D658195965BA7 /* Queue.swift */; }; - 40F856F0358939707FF3647BBB99F952 /* Observable+Single.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E9B8FB0063F16BCB8C11836E65F38D /* Observable+Single.swift */; }; - 43270940EB9B038B8D7024555D987E87 /* Bag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B291595EEF8D58E953103A5BA5509F4 /* Bag.swift */; }; - 43642AA220763F271C5BA6F31702624A /* Sink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 240B4D935992E8DADCD79B4A84CFF1EC /* Sink.swift */; }; - 46A64B1499CD09CC2C645D7F06566D7C /* Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92D1E08504CA891FF79253A362861CD4 /* Window.swift */; }; - 481E2BFCD8DDC1B26812081041152FDA /* ObjectMapper-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2336973513914C168F8E404464DDBE17 /* ObjectMapper-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 48FF8AF8C61AD5164BBE6BC9AE9C7FAF /* SwitchIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA6C27F646D9DA37047A67D6E212DE01 /* SwitchIfEmpty.swift */; }; - 49447E816B12F4DCA7008769F344C7BB /* ReplaySubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD6CF9B4AAB372D8C067E3FF8755C6A9 /* ReplaySubject.swift */; }; - 4A01BDF81AB5B9467FA6FC6C6C0259BC /* ShareReplay1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32BD97FABD31ACA7E3146BAAA9954259 /* ShareReplay1.swift */; }; - 4A8374CA5B8CAE6BA944B443C9661AC5 /* Using.swift in Sources */ = {isa = PBXBuildFile; fileRef = B01F093B9DC7BDE27E632935D789B142 /* Using.swift */; }; - 4B4B6DDA48E2D8331209095ADECCBD53 /* AnonymousObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = D365CDF879164B3AA71B7A542A19DC02 /* AnonymousObserver.swift */; }; - 4C28309F83E7306619CB7BF9552F4F17 /* ObservableConvertibleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AC4B3AC33F1BE2EF940BF538BD6050E /* ObservableConvertibleType.swift */; }; - 4C578BC13A227138E6BE26A74025B848 /* HexColorTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD18F80559D118BE5911247C1F7EA041 /* HexColorTransform.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 4D9A631A76A3667DAB7E9FBA2BF9482B /* ImmediateSchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5FE6670A1C419E6BED4E0E0CBD737204 /* ImmediateSchedulerType.swift */; }; - 4EB917C3384DF09068583326C9A1A35B /* ImmediateScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 034ED05283387971F8B44299C90D057D /* ImmediateScheduler.swift */; }; - 4F315ABFC1D4D7B5AA03FC891645AE63 /* HistoricalSchedulerTimeConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16D2DD1873C65581C68D7601F56A7082 /* HistoricalSchedulerTimeConverter.swift */; }; - 5099D1C9653B29E61B197404B9FA05E2 /* ToArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A61D671B6BDB3B11324645435740C94 /* ToArray.swift */; }; - 5165CA7792DBB1E987D6DD48C4122706 /* Lock.swift in Sources */ = {isa = PBXBuildFile; fileRef = A45E07FFEB7005B188DB68E1515ACDFF /* Lock.swift */; }; - 5387216E723A3C68E851CA15573CDD71 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FAC654555E2BE2ED1A38AF599A3A792 /* Request.swift */; }; - 53F91CBCDD0CB393C27AB39E8D1FE555 /* BinaryDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6C05F26232F3BEE8B05B095A35F632A /* BinaryDisposable.swift */; }; - 544E1DC2C392E0257338240259B5B483 /* CombineLatest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC2FE746F7EA2220E4B449A95DB63176 /* CombineLatest.swift */; }; - 54B070EF386B029A9495EF4798EB3236 /* SynchronizedUnsubscribeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C2DC15B4258C3CE43CBD6E60BEBAA49 /* SynchronizedUnsubscribeType.swift */; }; - 5507CB083B137189C6FA790257EBCFC5 /* MainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70D7C4235D797F08CA934E2D7FCF1EF3 /* MainScheduler.swift */; }; - 5522B903C46D80E2A1D1EC8B29C96D54 /* Mappable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68F6717A6A6E815E92790C222C822568 /* Mappable.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 554F838DE57AA41E909DECCAB3134C69 /* GroupBy.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22FB3DC962A9673059640027A60534A /* GroupBy.swift */; }; - 5938575058EF82086F2CBC6BD6E4642D /* Observable+Time.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6894072FB2F0D6A33A3E4E3BA5CCEC9D /* Observable+Time.swift */; }; + 3D61AF186EFD00BD31F145AF3241C759 /* ConnectableObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2DEBF8CC407476366F482DC09F29DC2 /* ConnectableObservable.swift */; }; + 3E433D1D3D46D117F7DD7269FC35A26C /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = B18971046EE71972C2987A1B44C687D6 /* Error.swift */; }; + 3E56DB4136E625DCA0B4F278CE147D6B /* RxMoyaProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E4EC7FEC4148FDD842B176028C55D7C /* RxMoyaProvider.swift */; }; + 3FEAF6012706E5EF26CECD5DBE4449E2 /* Queue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 533E4698572969FE535C01639240BD95 /* Queue.swift */; }; + 40F856F0358939707FF3647BBB99F952 /* Observable+Single.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A9E3FB60CB4A7D2085DAC4A5306B692 /* Observable+Single.swift */; }; + 42DABB15B8D979767E0F44C1F53AE17F /* InhabitableTypeGuards.swift in Sources */ = {isa = PBXBuildFile; fileRef = 404D82726264603AD565560110967D32 /* InhabitableTypeGuards.swift */; }; + 43270940EB9B038B8D7024555D987E87 /* Bag.swift in Sources */ = {isa = PBXBuildFile; fileRef = D452F6F5AA184AAD5F2D67E79A3BD1E3 /* Bag.swift */; }; + 43642AA220763F271C5BA6F31702624A /* Sink.swift in Sources */ = {isa = PBXBuildFile; fileRef = C371E36ECB06A5163E50660874EC28B5 /* Sink.swift */; }; + 46A64B1499CD09CC2C645D7F06566D7C /* Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21EC236CC3C0F46D0FE4C03207C993F2 /* Window.swift */; }; + 481E2BFCD8DDC1B26812081041152FDA /* ObjectMapper-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = AE5D5AF2A28AC7AC8AA786C64A8B0D5D /* ObjectMapper-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 48FF8AF8C61AD5164BBE6BC9AE9C7FAF /* SwitchIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 935C00337EC7391ACE992E18BB6528EC /* SwitchIfEmpty.swift */; }; + 49447E816B12F4DCA7008769F344C7BB /* ReplaySubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27C0B04261BDBBFD9B29D09D21BD1585 /* ReplaySubject.swift */; }; + 4A01BDF81AB5B9467FA6FC6C6C0259BC /* ShareReplay1.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB4181F0665DFDE3AF0C2A4274054C91 /* ShareReplay1.swift */; }; + 4A8374CA5B8CAE6BA944B443C9661AC5 /* Using.swift in Sources */ = {isa = PBXBuildFile; fileRef = F61330C472723B44F49FBA757C173823 /* Using.swift */; }; + 4B4B6DDA48E2D8331209095ADECCBD53 /* AnonymousObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10F5D71DF2264812C5731C22EE801A5A /* AnonymousObserver.swift */; }; + 4B5B309384D3880D2CE23CD3B5375DDB /* IntegerOperators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D6E1BBEE6A3830A885E6B9927A75142 /* IntegerOperators.swift */; }; + 4C28309F83E7306619CB7BF9552F4F17 /* ObservableConvertibleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1703CE57C3548B6E58DA6D64D29E55E /* ObservableConvertibleType.swift */; }; + 4D9A631A76A3667DAB7E9FBA2BF9482B /* ImmediateSchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 001EFFE7D56D6AB9A1B0174B1E4DCC82 /* ImmediateSchedulerType.swift */; }; + 4EB917C3384DF09068583326C9A1A35B /* ImmediateScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B4D6B8F41F79C94313C986AA2C95518 /* ImmediateScheduler.swift */; }; + 4F315ABFC1D4D7B5AA03FC891645AE63 /* HistoricalSchedulerTimeConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23351BF9B507AE749916B9647001DB83 /* HistoricalSchedulerTimeConverter.swift */; }; + 4F9AD7B1CCC4896B36B31A0E03003BB4 /* Flatten.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDE1A466A002C993A806512B2E7382C4 /* Flatten.swift */; }; + 5099D1C9653B29E61B197404B9FA05E2 /* ToArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC3881DD934E863CFEA3B949E0D18C9 /* ToArray.swift */; }; + 5165CA7792DBB1E987D6DD48C4122706 /* Lock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 742EC56A479A268680F0A5C9DF61FB5B /* Lock.swift */; }; + 5387216E723A3C68E851CA15573CDD71 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = B320EE4339DB3EA8E88ED6E7B463000B /* Request.swift */; }; + 53F91CBCDD0CB393C27AB39E8D1FE555 /* BinaryDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9801943BE07AE064B47351ADFD881292 /* BinaryDisposable.swift */; }; + 544E1DC2C392E0257338240259B5B483 /* CombineLatest.swift in Sources */ = {isa = PBXBuildFile; fileRef = B40BE97A1246D8C49845492A55299637 /* CombineLatest.swift */; }; + 54B070EF386B029A9495EF4798EB3236 /* SynchronizedUnsubscribeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AAB9F6E60E4EF7EC35044ABA59EE4A3 /* SynchronizedUnsubscribeType.swift */; }; + 5507CB083B137189C6FA790257EBCFC5 /* MainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D27ED3A89AA80187EF62E0412529A5C /* MainScheduler.swift */; }; + 554F838DE57AA41E909DECCAB3134C69 /* GroupBy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C0A8A53B1859DFABE02D98FD7DF7170 /* GroupBy.swift */; }; + 57D4500DF5AC27397C1EC0D58D4D77A3 /* EnumOperators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 374F5979FAFC0F8EDB295BC6AF726210 /* EnumOperators.swift */; }; + 5938575058EF82086F2CBC6BD6E4642D /* Observable+Time.swift in Sources */ = {isa = PBXBuildFile; fileRef = A241B2831F3DA9FCBD98DDB4EC3E0B1C /* Observable+Time.swift */; }; 59AF979FCB40524EC2764D656321A30E /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 941085FB48E505ED52FF2DFD9B570A8C /* Result.framework */; }; - 5A49DFF9B98FB7D602B3867E6B669EB1 /* SkipWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19AF502504F47C0798E7092BEB6B9B39 /* SkipWhile.swift */; }; - 60170BDDCDD037601717BA153C8B7701 /* Observable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38A8D839A098CE4BE166545247EB9C25 /* Observable.swift */; }; - 61200D01A1855D7920CEF835C8BE00B0 /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 099546DF2E74E63FE6FA7B3EC2F7734A /* DispatchQueue+Alamofire.swift */; }; - 61A3B58787C3FDF6AC3A76128CD4C134 /* ObserveOnSerialDispatchQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A87926F1117ABD9937D1F0F91B80417 /* ObserveOnSerialDispatchQueue.swift */; }; + 5A49DFF9B98FB7D602B3867E6B669EB1 /* SkipWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6804E8E2F017493A8ECEDBBCF0527D6F /* SkipWhile.swift */; }; + 60170BDDCDD037601717BA153C8B7701 /* Observable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B07C2108E8AEAA49EC11D232391921 /* Observable.swift */; }; + 60A8A8EE66C89410E4CF32DCF54B0104 /* Atomic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6705998374BDFFB7FECAF1532B835BE1 /* Atomic.swift */; }; + 60CA6E3F0423817E9812E85C863B3904 /* FoundationExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B66BA2DCA8B77DD590AFFE169CFF7ED6 /* FoundationExtensions.swift */; }; + 61200D01A1855D7920CEF835C8BE00B0 /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 597A28C19BCCC57C5FFF4BF262CCAAF4 /* DispatchQueue+Alamofire.swift */; }; + 61A3B58787C3FDF6AC3A76128CD4C134 /* ObserveOnSerialDispatchQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = D64B2CD1CD8D698E75A8D2074F3ACC4D /* ObserveOnSerialDispatchQueue.swift */; }; 61B9FA99D3933D39E66F9FF40164623F /* Response+ObjectMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F03D4318F25F0CEB39500AE4E751CAD /* Response+ObjectMapper.swift */; }; - 621BEEF9B28AA223F02966B0C96860E0 /* RetryWhen.swift in Sources */ = {isa = PBXBuildFile; fileRef = B440337621937614976B1C2C58BE33BB /* RetryWhen.swift */; }; - 62F65AD8DC4F0F9610F4B8B4738EC094 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDB4955B887B6D682A1E74FA076117E6 /* ServerTrustPolicy.swift */; }; - 6355EBC9033044801712D035B3D8B4DE /* Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 101B539448B8BE627A24AAE294ECAF2A /* Sequence.swift */; }; - 641A5EE7D6614D73EB7C3E0F0DC0CDC2 /* Bag+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF431B0001081EE58BD8C67291EF21B9 /* Bag+Rx.swift */; }; - 641BF4376A1021F8E2D42DAEAF0A5D94 /* SubscriptionDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD30ABDEAF12C709D2CFAEE44BD61855 /* SubscriptionDisposable.swift */; }; - 64B966220380DBFFE5D243FD78B2A3EB /* ConcurrentMainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C27978222879CDDE8F12507361A5025 /* ConcurrentMainScheduler.swift */; }; - 66244D2DD0DF4E7D10C764AF18027E91 /* Disposables.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDABC56738F03E6CF33DBFC19CE76133 /* Disposables.swift */; }; - 694595974AD7EAA7FA86C99E95177A8E /* NopDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40963991FCA619D7799F942D19A4FAA4 /* NopDisposable.swift */; }; - 6965544D8BB4ACDF4EC26910E486D181 /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D3EFB1DE6C0E52AE06057EA3F85A3C /* Event.swift */; }; - 6A02A5C5446ECB184384F6904ECC6004 /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAA484FE691273E5B8770F3749E2D213 /* Image.swift */; }; - 6AB6BE59334ADD093C1B8A16C98642A2 /* VirtualTimeScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BB3D0D57DDA732EEB38F6E1A785D162 /* VirtualTimeScheduler.swift */; }; - 6E19CF8A616A296AD4F1D128CAC2975F /* SubjectType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F96BDB60268FE93517F6A1841809A66A /* SubjectType.swift */; }; - 7086C1435AE7A37F93956ECDE2F45AB2 /* MoyaProvider+Internal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 279F3B60FADF3A816E09532160AE148B /* MoyaProvider+Internal.swift */; }; - 7269E1153109D9A90359F3B4CDFF9AC3 /* RxSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D04530228D0DCF46892AE36E5DC63A88 /* RxSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 747383F70891AD4278847607EF19F9D9 /* GroupedObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACAEF6EE76CA30FA9A3B39D1EF1C6DC4 /* GroupedObservable.swift */; }; - 75FC8E65A81FA6F5312FBF3CA7CA0279 /* Pods-Demo-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C5BC86D40B890A7B0844F888209CA06F /* Pods-Demo-dummy.m */; }; - 772FC6D8B4525B393A95A85B4D5DA001 /* NSDecimalNumberTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F08A5CC14A1BDFDB69684234BAC72F9 /* NSDecimalNumberTransform.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 781A22F566FF70A34B360411A314C068 /* Disposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FFB5D94F9243148195A8AF95A994738 /* Disposable.swift */; }; - 7824DCCF57694D70347315E949C60E39 /* Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B361E3D5A3B5EFF4725B51EE38F6EC9 /* Debug.swift */; }; - 7A1A37147E8BA262F5B3EFA0DBD6E531 /* MultiTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC59C6D24A5BB1D61AD7C03C8438310B /* MultiTarget.swift */; }; - 7B5FE28C7EA4122B0598738E54DBEBD8 /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF4EFFAECD64D5D80D4E3EFB101EC43A /* SessionDelegate.swift */; }; - 7C25E45B76A73FA09B4095D66F09976C /* Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4744F07468C8F6C9FFAC5B65E23BB8F4 /* Rx.swift */; }; - 7D8CC01E8C9EFFF9F4D65406CDE0AB66 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBBC9C860760ECE129F6706293DD343C /* Result.swift */; }; - 7E441805C4C2593D54683EEA350766B4 /* Amb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E3AE6B908A12FA43493763FBA7C35F5 /* Amb.swift */; }; - 7F0667A1E159C84203C889EB30D74E62 /* Zip.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1E3078211D55BC63E1088C38DAB6582 /* Zip.swift */; }; - 7F7D7D024F022010916E550B7632E680 /* MoyaProvider+Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B9002B8A582F4D8A4C711D2D9521573 /* MoyaProvider+Defaults.swift */; }; - 80B53F3C4D714E0F3CA73B7C094F4FE5 /* RefCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FE0DADEA9FB8151F9EE55ADE94BD0A3 /* RefCount.swift */; }; - 824A4C07D443B2F647D7C50DD9564BF9 /* Range.swift in Sources */ = {isa = PBXBuildFile; fileRef = 275CADCB409BD3A62811A9012671CAA2 /* Range.swift */; }; - 82BEE108931EA1A59D0DDDA358745523 /* CompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABD5DBFF68FB3E2C7D5C68F22D2149DA /* CompositeDisposable.swift */; }; - 835B836C69E22C29965079C6D3535142 /* Platform.Linux.swift in Sources */ = {isa = PBXBuildFile; fileRef = 366406296C874C088B74308A835D141E /* Platform.Linux.swift */; }; - 84BB5EBA0C08C28C5E83D6CA263A362B /* NetworkActivityPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DF44F38795767C548C872478129378A /* NetworkActivityPlugin.swift */; }; - 85CB137AADC3D775F639748E4A303415 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8D5F9A33FAFDDD0A06703C1446E11DA /* Result.swift */; }; - 85EB3D734B4186FE763550CA83E6E858 /* Observable+Aggregate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F887A2C3255BBB81512FC348CADBB22 /* Observable+Aggregate.swift */; }; - 8772CA6372E9CA1C2844E0DC2EB52CB2 /* Reactive.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A8817E52F0914C81EBCADAF93798AA6 /* Reactive.swift */; }; - 87A6F6E1EFF2432FEF426AACCA7672BB /* Variable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A486F8B23ABA0F788D6C2127EFE2FBF /* Variable.swift */; }; - 87C9350610025E34B6AD9B9D076AAFB5 /* DataTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3A45E67575A4363BF5289FB4D939BDF /* DataTransform.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - 89E8BC1E18BB887B569C4F17CBF9BC21 /* AsyncLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD06127D1DB37FB9C69025C819693BA5 /* AsyncLock.swift */; }; + 621BEEF9B28AA223F02966B0C96860E0 /* RetryWhen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 678D1077D40DA503F57304A63179B726 /* RetryWhen.swift */; }; + 62F65AD8DC4F0F9610F4B8B4738EC094 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EE119E337ADA617EC124C5243D01215 /* ServerTrustPolicy.swift */; }; + 6355EBC9033044801712D035B3D8B4DE /* Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD4883583337FBFDD03E78A3D2FB8B4 /* Sequence.swift */; }; + 63BFEFECB9A2FFB46347AF8D7A6010C9 /* Disposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D08FF4003628C1CF0EABD27982F41D46 /* Disposable.swift */; }; + 641A5EE7D6614D73EB7C3E0F0DC0CDC2 /* Bag+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = B278163DD8869BD634FBC37A0A78314A /* Bag+Rx.swift */; }; + 641BF4376A1021F8E2D42DAEAF0A5D94 /* SubscriptionDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C241789ED7971C4DFA28779450E54AC2 /* SubscriptionDisposable.swift */; }; + 6495ECC6B3EB7CF17D20A4521995E8EE /* Reactive.swift in Sources */ = {isa = PBXBuildFile; fileRef = B648F3AFC4C4633FA007EB713EA56506 /* Reactive.swift */; }; + 64B966220380DBFFE5D243FD78B2A3EB /* ConcurrentMainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9FDA720EB4651BE9743F2A2025BA3C1 /* ConcurrentMainScheduler.swift */; }; + 66244D2DD0DF4E7D10C764AF18027E91 /* Disposables.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E72054705675D860541F5F6B329ACA /* Disposables.swift */; }; + 6645924370EB7C1E703FB3C2F96AEFF6 /* Pods-Demo-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 03EA1E60232BFA05817BC26ACB8E68BA /* Pods-Demo-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 694595974AD7EAA7FA86C99E95177A8E /* NopDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96C1E5A0EFA527E1432BBE96CDB023DA /* NopDisposable.swift */; }; + 6965544D8BB4ACDF4EC26910E486D181 /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E382DB6FDB65DE94BABDD2844DAF6ED /* Event.swift */; }; + 69BF30EE9140E7086BA82C4DB6938ABC /* DateTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02195DED2D688E2BBFA361F58068011C /* DateTransform.swift */; }; + 6A02A5C5446ECB184384F6904ECC6004 /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF615E8CA506C163CA765AA9770F3AA1 /* Image.swift */; }; + 6AB6BE59334ADD093C1B8A16C98642A2 /* VirtualTimeScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCC878974EE6DA072D98F52B51E84C1D /* VirtualTimeScheduler.swift */; }; + 6C5A8FEF60C73A2EB3E76E377F9A9980 /* Signal.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15B29D41B7D19D513E61510C17CBF58 /* Signal.swift */; }; + 6E19CF8A616A296AD4F1D128CAC2975F /* SubjectType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F11037BCF62A8272D103B2E0875AD7F /* SubjectType.swift */; }; + 7086C1435AE7A37F93956ECDE2F45AB2 /* MoyaProvider+Internal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05788979F32B6C5DF30DD0FD687D5936 /* MoyaProvider+Internal.swift */; }; + 7269E1153109D9A90359F3B4CDFF9AC3 /* RxSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A2A274B029E7DBF68ECEBC41DB939D1 /* RxSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 739F7DBD923F4F358E72B105EB878680 /* DataTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60B30C90645517428578CA8F97388B23 /* DataTransform.swift */; }; + 73B9C996AED49ED7CF8EC2A6F1738059 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */; }; + 747383F70891AD4278847607EF19F9D9 /* GroupedObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAA435219FB8D98ACAC9E82F3073CBFB /* GroupedObservable.swift */; }; + 765794766945F0DF2B0E0298F666ED25 /* Optional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75AAB49A85742D83E67B38D30B60B1D3 /* Optional.swift */; }; + 76776FFFB0888B0064B5D06F87C56F1C /* ValidatingProperty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42090A07F20122A0BC3455BFA86F79A1 /* ValidatingProperty.swift */; }; + 781A22F566FF70A34B360411A314C068 /* Disposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7D4C2831C5B7EDF94A1DD0CC97B961B /* Disposable.swift */; }; + 7824DCCF57694D70347315E949C60E39 /* Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FB6A4378F9D1425C55DF338352E66CA /* Debug.swift */; }; + 7A1A37147E8BA262F5B3EFA0DBD6E531 /* MultiTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1F902FE19E3A7B35BE33971A520703F /* MultiTarget.swift */; }; + 7B5FE28C7EA4122B0598738E54DBEBD8 /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C971A44E2F3D8336CF0FA86D1488C8C /* SessionDelegate.swift */; }; + 7C25E45B76A73FA09B4095D66F09976C /* Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21888844E9B22E9A361BF543DF18D25D /* Rx.swift */; }; + 7D8CC01E8C9EFFF9F4D65406CDE0AB66 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6C987F4B07105EE68202441F72978D2 /* Result.swift */; }; + 7E441805C4C2593D54683EEA350766B4 /* Amb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C59839F18FF5FBE60CAFFB8EC168EBD /* Amb.swift */; }; + 7F0667A1E159C84203C889EB30D74E62 /* Zip.swift in Sources */ = {isa = PBXBuildFile; fileRef = F09BF1757627FA226B630ABB73C959F9 /* Zip.swift */; }; + 7F7D7D024F022010916E550B7632E680 /* MoyaProvider+Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC14C03CD94BFBB95CEB5C52AE617A5 /* MoyaProvider+Defaults.swift */; }; + 7FF874C342E47D633982FB42AC3DC678 /* EventLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 353118FBD87FF65111631E0E224F8A29 /* EventLogger.swift */; }; + 80B53F3C4D714E0F3CA73B7C094F4FE5 /* RefCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 059700FB972CCDBE4E13C737B053F05C /* RefCount.swift */; }; + 82243099E0A10AE0213AEE768956284E /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 941085FB48E505ED52FF2DFD9B570A8C /* Result.framework */; }; + 824A4C07D443B2F647D7C50DD9564BF9 /* Range.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76432EFF66F0610C1FA74F991477EBE0 /* Range.swift */; }; + 8285A0E95F833AD6C8C0B6B4430C6EDC /* Scheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = D61C3FC49E8BFA92C986196BDFE8CAA7 /* Scheduler.swift */; }; + 82BEE108931EA1A59D0DDDA358745523 /* CompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9A5BACE751A31D7CCB9FD6E8C6E8DBC /* CompositeDisposable.swift */; }; + 835B836C69E22C29965079C6D3535142 /* Platform.Linux.swift in Sources */ = {isa = PBXBuildFile; fileRef = B249B91CED2F27F5A58276241ADD4BB7 /* Platform.Linux.swift */; }; + 84AEFE898ED7A873994E4BAE43079AA0 /* ObjectMapper-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C44E15F0C89F0E302C55DC4A79A1BC3D /* ObjectMapper-dummy.m */; }; + 84BB5EBA0C08C28C5E83D6CA263A362B /* NetworkActivityPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55F91E7D6B0D44079FA709F9FA6A475B /* NetworkActivityPlugin.swift */; }; + 85CB137AADC3D775F639748E4A303415 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9427D33D9A21060CC4CC8E4507E7CFAD /* Result.swift */; }; + 85EB3D734B4186FE763550CA83E6E858 /* Observable+Aggregate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA266CC66D3EC65E521FA4162D360F99 /* Observable+Aggregate.swift */; }; + 8772CA6372E9CA1C2844E0DC2EB52CB2 /* Reactive.swift in Sources */ = {isa = PBXBuildFile; fileRef = 863C51FEA45A7EDE989AC2754CDD717C /* Reactive.swift */; }; + 87A6F6E1EFF2432FEF426AACCA7672BB /* Variable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04314B6B8716BBC1C296C41E570D781D /* Variable.swift */; }; + 89E8BC1E18BB887B569C4F17CBF9BC21 /* AsyncLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = E518D6231CACDB520F43AB4E8F044F7A /* AsyncLock.swift */; }; 8AF174F050E51E32AF95469FD8910010 /* Observable+ObjectMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4A41A1EFD287ADC8565B46439DFC266 /* Observable+ObjectMapper.swift */; }; - 8B5A74BFA2A85B41F5C9100055B9C428 /* Endpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = E488687E61384CA517A326F48C094B7F /* Endpoint.swift */; }; - 8BC16C1AB440F23DB46E6CEE43B9F271 /* Concat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A5DFB0C2D16E6F31B15E6A5B14EE4CD /* Concat.swift */; }; - 8C550DC81B578A597EA4E4E75E3C5997 /* TargetType.swift in Sources */ = {isa = PBXBuildFile; fileRef = F297BF8E8E239ADE4CD269BA2BA737F0 /* TargetType.swift */; }; - 8CFECB306B3011D0733ABA8DCC1015AD /* ObserverBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1096F5305E204EF5070EA4183F503458 /* ObserverBase.swift */; }; - 8D1512733BA64A38509CA1F0A660FB3E /* Switch.swift in Sources */ = {isa = PBXBuildFile; fileRef = A78E95B91181E96CFAAD9426F8ECB2B7 /* Switch.swift */; }; - 8DD9818A5601E87E766E1A69042E27FE /* AddRef.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32C75D1C9BCDA389266EEF90117751CB /* AddRef.swift */; }; - 8F8F4F2402BFEDB0013438F114C65074 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC29AF625DB92BBFD8CCCBB81875E4ED /* Foundation.framework */; }; - 8FFA00CAA7FA099C963C0F8CA617A367 /* Scan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CA1E89C5CC4EA175A5C058CF7D40DB1 /* Scan.swift */; }; - 901887B139E41DD2D179ED2A23A4B70A /* Generate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 337539EBBDCD8917D3389B8C2B24A285 /* Generate.swift */; }; - 925DC13DFA8AE78DE71BE11F5C62903C /* Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61B294CF34CCB9E73CCC0847489DDFC2 /* Map.swift */; }; - 92845F50C684624D41FCD9FA8A732D93 /* PrimitiveSequence+Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5905F77A7FB3FE16E87E5D3836092D0 /* PrimitiveSequence+Zip+arity.swift */; }; - 950648597FCE2A584C3FCC8E409FF443 /* Dematerialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55CA01AC98F81BD0B27C0C1575896CA4 /* Dematerialize.swift */; }; - 9700A49E90B452387D2CBB9E23C7D786 /* CurrentThreadScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDBA57D5C91C951AAD0947F284A241E9 /* CurrentThreadScheduler.swift */; }; - 9701EFB020B3EB64920A7D6D2A6BC667 /* Pods-Demo-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 03EA1E60232BFA05817BC26ACB8E68BA /* Pods-Demo-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 97BCD11B822E31AC7F4A4F048CA26052 /* SubscribeOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E12E978DD62B2B314912C8B3D9B2D8 /* SubscribeOn.swift */; }; - 984BC87C7E893BAEBBF23CD760B84E1E /* Producer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E8ADC41BB02F6D7BA9320AF22D0EF54 /* Producer.swift */; }; - 98ECF94F6E7F84B56FB762B98FA919F3 /* MoyaError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 44FB0622417161D44D1295F0594BCC94 /* MoyaError.swift */; }; - 993A1E5EDCCB8C47CDDFA1687F931DE5 /* Zip+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61066E488C46D5D7C153F9ADA1703331 /* Zip+Collection.swift */; }; - 9A7B85EAA2A51F64BCA29067F5DC7D8B /* ObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2BEC8D54E3FAE26C9B12F3D03E14FE7 /* ObservableType.swift */; }; - 9A8D62DC7159E43B84095223BD3E5CDB /* Observable+Creation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D1AD8C28FFC037A4AC35BB236EB481A /* Observable+Creation.swift */; }; - 9BDBA2403372716AB15D531B33E0819D /* AnonymousObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99D3CFACEF6CAE7D2E610B6A1F54D237 /* AnonymousObservable.swift */; }; - 9D0CB68921548770D3E8C6D8426F2A48 /* SerialDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 429C218ACEC9FD71D562C3153D72D416 /* SerialDisposable.swift */; }; - 9D0F4FAB1EF3FCD14CBD5A93D95B6207 /* Catch.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA3B449612A33ED99F23007688E68798 /* Catch.swift */; }; - 9E809940ED4CD86D8A6D0D773B5B2A50 /* Observable+Concurrency.swift in Sources */ = {isa = PBXBuildFile; fileRef = A75A681A3F4A36FEB952747AC623CE57 /* Observable+Concurrency.swift */; }; - 9EC63590781E69500F734CE9B454E9FE /* SingleAssignmentDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DB481A1358C0BE35B508787868D54FD /* SingleAssignmentDisposable.swift */; }; - 9ED2BB2981896E0A39EFA365503F58CE /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4ED2E8EA6C34E294B06DA947F06D4D3F /* AFError.swift */; }; - 9F16D35045DAC73C05BE99C220B7E498 /* WithLatestFrom.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2EA211AF86729D5CE233ABCBDA27563 /* WithLatestFrom.swift */; }; - 9FF323881B6A787E163E7824EB03F288 /* Cancelable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DBA09CBFAEC4A3683226AA1BBEF7BD9 /* Cancelable.swift */; }; - A04BFC558D69E7DBB68023C80A9CFE4E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC29AF625DB92BBFD8CCCBB81875E4ED /* Foundation.framework */; }; - A0964EB62F2DB350A969A8DC8CEF81D3 /* Observable+StandardSequenceOperators.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDE5489F7C49247526C4A628C9E53736 /* Observable+StandardSequenceOperators.swift */; }; - A0ECE61C5E902F165BE28B6D6DBFB11E /* SynchronizedSubscribeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B1358A738A6AB56494A5B17315FB1F2 /* SynchronizedSubscribeType.swift */; }; - A1E2E36B7BF79D24C0AF5FE249172120 /* DefaultIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9BA3057D14507AA8F886194FBD03381 /* DefaultIfEmpty.swift */; }; - A24DAB3DED238E00758C268E995B7E73 /* Moya-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C9F838190778DBDE022037C111E79BB7 /* Moya-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A2A6F71B727312BD45CC7A4AAD7B0AB7 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BEB2995CE08029101069ABB46AD436C /* NetworkReachabilityManager.swift */; }; - A368F15C924F588996B3365876C7A88D /* SkipUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39AAD57F8B68CAE00A161F77370FC914 /* SkipUntil.swift */; }; - A6F179C0FD478E08A4C50AF1160DF4D0 /* OperationQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABA6FE9DD99C7C9AAEE80E80D8625F3B /* OperationQueueScheduler.swift */; }; - A923BA9C11A0F7011736FBA45722082A /* DateFormatterTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = E38E8050EF565B230ED30AF254B0687E /* DateFormatterTransform.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - A9EEEA7477981DEEBC72432DE9990A4B /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = EA39AFC96F15897C9C30A9F8A9FE3519 /* Alamofire-dummy.m */; }; - ABB66F2AFFF577587F84A0FFDB8EF4D0 /* NetworkLoggerPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5082A01A63EDB416806666A348ACA27D /* NetworkLoggerPlugin.swift */; }; - AC90DF39324E1057B63197FE45341AC1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC29AF625DB92BBFD8CCCBB81875E4ED /* Foundation.framework */; }; - AD75968CA7B8D67F6BB9F3E7369240D0 /* Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4941AEE4901EE1EA89034A12E334C2D3 /* Deprecated.swift */; }; - ADB0D84CC07EECA99486F6F7C7A24CA5 /* Do.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D00CE3BB3B1B39702A1D44E499442B9 /* Do.swift */; }; - AE1EF48399533730D0066E04B22CA2D6 /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB56CBFC832EF68A141F312792AD4AF6 /* SessionManager.swift */; }; - AFE6CDA6AFDC813885E1640C037B532F /* Platform.Darwin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88C2777E2FA59660406E11B082DC22E5 /* Platform.Darwin.swift */; }; - B0A8E8D7320DC23AEEC2ED34439D884E /* AnyObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE9A38DE545D9FB4BBA603B074A96BC9 /* AnyObserver.swift */; }; - B13E3435F51146E70094CE23160EECFC /* EnumOperators.swift in Sources */ = {isa = PBXBuildFile; fileRef = D49C9F5050C3E5E241292B6A8B089CC9 /* EnumOperators.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - B2CBB9128902C1CDBD0B2A1C7DD17F59 /* ObserveOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB0AC6ABAAAA34D3E9D492E60583EE3E /* ObserveOn.swift */; }; - B300B909E5AED20A51147C29AA17DC96 /* CustomDateFormatTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA485D4018AE332771BD13B2F9EC57F5 /* CustomDateFormatTransform.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - B5982909C07F473AB5633DAB332EDF46 /* Buffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD3569CBCE17ACD2EBC6E61B942BAC7 /* Buffer.swift */; }; - B5ACCF6D9EEA6074F66037D1396EE2B5 /* Observable+Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE9125CA72BF199A20DBD4B9558D4CF3 /* Observable+Debug.swift */; }; - B64425F3EEED0CE5889881B5E9E2E625 /* Never.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87449C32758CB4EB291D70EAB447C28A /* Never.swift */; }; - B65FCF589DA398C3EFE0128064E510EC /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52100DB4932C37B36D4271C1081B8757 /* MultipartFormData.swift */; }; - B801D52816DF0D0326D2A87867513367 /* Moya+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EDCEA32FD1274388C071D684E597EF3 /* Moya+Alamofire.swift */; }; - B9F44AD8EF027BE41B9CCF0A9AA579CD /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = C23575BCCF705A5D084A8C54D4993EFF /* Timer.swift */; }; - BBEFE2F9CEB73DC7BD97FFA66A0D9D4F /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5EF54E6B2D7127D6A1DA9F817848EF /* Validation.swift */; }; - BE5C67A07E289FE1F9BE27335B159997 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8169FFFAF07FE2B47116D2E16CAF804F /* ParameterEncoding.swift */; }; - BED9715A5EA1F5CFC3F69728D8E91FE7 /* TransformOperators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20A9B0365625986701ED008EA54F7F95 /* TransformOperators.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - BF6631BC5DAE90CD147EBEF561C4DB87 /* MoyaAvailability.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEB2875695A6C93C38BB63FE6F20D065 /* MoyaAvailability.swift */; }; - C0A48D41BF578503DE735C6EDB7EB459 /* URLTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EBBD1A8250EFB9CC900440EAF658DA /* URLTransform.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - C5DDC9BC60F2810EFA773F07822CE322 /* ObjectMapper-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B889118E834FCDF77A85D97F5BA29E51 /* ObjectMapper-dummy.m */; }; + 8B5A74BFA2A85B41F5C9100055B9C428 /* Endpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA89D983DA12F498C2325A2BE8F733 /* Endpoint.swift */; }; + 8BC16C1AB440F23DB46E6CEE43B9F271 /* Concat.swift in Sources */ = {isa = PBXBuildFile; fileRef = E352691A70D68412A4A0795C783344A3 /* Concat.swift */; }; + 8C550DC81B578A597EA4E4E75E3C5997 /* TargetType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0865A76D93AA95B23295EE2BCF3BC18C /* TargetType.swift */; }; + 8CFECB306B3011D0733ABA8DCC1015AD /* ObserverBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5969ECA4583F5C37DC5FBA6ACAA544EA /* ObserverBase.swift */; }; + 8D1512733BA64A38509CA1F0A660FB3E /* Switch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95093E2F9D63EA61DB4DAE904E414937 /* Switch.swift */; }; + 8DD9818A5601E87E766E1A69042E27FE /* AddRef.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0955C8F4EEE352F4F3BB89BDD6435D23 /* AddRef.swift */; }; + 8F9C9D2863DF04D1B82569FB74F92B76 /* ResultExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 069941314ECEE9FA8027A5F8A227FF94 /* ResultExtensions.swift */; }; + 8FFA00CAA7FA099C963C0F8CA617A367 /* Scan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 721E0361F5BD3060CD61E41333AC4C8D /* Scan.swift */; }; + 901887B139E41DD2D179ED2A23A4B70A /* Generate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26D6FB3D54BF5F3F7B355A811BABC5F6 /* Generate.swift */; }; + 925DC13DFA8AE78DE71BE11F5C62903C /* Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F9CA1CA661AEDAD5A2067C8BDB787FC /* Map.swift */; }; + 92845F50C684624D41FCD9FA8A732D93 /* PrimitiveSequence+Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4472D43DC36B93B0AD3D2324A022BD31 /* PrimitiveSequence+Zip+arity.swift */; }; + 950648597FCE2A584C3FCC8E409FF443 /* Dematerialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = B41B5597DB477AB7287337E1EE3C7756 /* Dematerialize.swift */; }; + 96BA1F0C033A1766271910B4E6AC82F7 /* Bag.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED7C53165F3F31D1A0C8C198AD696B9F /* Bag.swift */; }; + 9700A49E90B452387D2CBB9E23C7D786 /* CurrentThreadScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF7114008E9479B082AECBF1E4A5B940 /* CurrentThreadScheduler.swift */; }; + 97BCD11B822E31AC7F4A4F048CA26052 /* SubscribeOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84D4210F88F6EF7B49E63115D1E62FB0 /* SubscribeOn.swift */; }; + 984BC87C7E893BAEBBF23CD760B84E1E /* Producer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B7651A3BECCAA054599F73243B3CB7F /* Producer.swift */; }; + 98ECF94F6E7F84B56FB762B98FA919F3 /* MoyaError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61E8E292AC6AFF21D423EDF3ED36D010 /* MoyaError.swift */; }; + 993A1E5EDCCB8C47CDDFA1687F931DE5 /* Zip+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0EC4E2078B430FE9F8672536722200A /* Zip+Collection.swift */; }; + 9A7B85EAA2A51F64BCA29067F5DC7D8B /* ObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71A192DA8427E760595C241A5AFFDF72 /* ObservableType.swift */; }; + 9A8D62DC7159E43B84095223BD3E5CDB /* Observable+Creation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D173C71BCA0EEB68789915CF5F191766 /* Observable+Creation.swift */; }; + 9BDBA2403372716AB15D531B33E0819D /* AnonymousObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD9B0A6DC72985BDA4754EA5E5CB07AA /* AnonymousObservable.swift */; }; + 9D0CB68921548770D3E8C6D8426F2A48 /* SerialDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 547E11C8EAF852818A6A4D608CE328A3 /* SerialDisposable.swift */; }; + 9D0F4FAB1EF3FCD14CBD5A93D95B6207 /* Catch.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC300EB7F7FA139928F6FFEEB3296AD1 /* Catch.swift */; }; + 9E809940ED4CD86D8A6D0D773B5B2A50 /* Observable+Concurrency.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDCA1BEBEA42409A71611FD24B58954C /* Observable+Concurrency.swift */; }; + 9E9354DCA18BE46AAAAC5338C88DDECD /* ToJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C18E8E928E48BDC1259CBBA11DB0F3 /* ToJSON.swift */; }; + 9EC63590781E69500F734CE9B454E9FE /* SingleAssignmentDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08EC66818EEE7440780A0483FF548F6A /* SingleAssignmentDisposable.swift */; }; + 9ED2BB2981896E0A39EFA365503F58CE /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = B483550D0EABCD7A18A27ACC8CCB69DF /* AFError.swift */; }; + 9F16D35045DAC73C05BE99C220B7E498 /* WithLatestFrom.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9B2274195EE237722674F6AEFFA5573 /* WithLatestFrom.swift */; }; + 9FF323881B6A787E163E7824EB03F288 /* Cancelable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83002D71F6C2A538E2978182ADCAFFE8 /* Cancelable.swift */; }; + A0964EB62F2DB350A969A8DC8CEF81D3 /* Observable+StandardSequenceOperators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06A276080DB9D3C2B9C7EEFD0570A670 /* Observable+StandardSequenceOperators.swift */; }; + A0ECE61C5E902F165BE28B6D6DBFB11E /* SynchronizedSubscribeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEE4E537DE5502F9377401CE6CFC70E6 /* SynchronizedSubscribeType.swift */; }; + A1E2E36B7BF79D24C0AF5FE249172120 /* DefaultIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 512139ACC7B2979F80FAC982F0DEA36D /* DefaultIfEmpty.swift */; }; + A24DAB3DED238E00758C268E995B7E73 /* Moya-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = BC64D2D57252E22F6FB7334A26BB9A40 /* Moya-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A2A6F71B727312BD45CC7A4AAD7B0AB7 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CA2A7E6BBAE7EF0D66E481D28618C44 /* NetworkReachabilityManager.swift */; }; + A368F15C924F588996B3365876C7A88D /* SkipUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF523A051E4C232B87A58BFDCF30CA5B /* SkipUntil.swift */; }; + A6F179C0FD478E08A4C50AF1160DF4D0 /* OperationQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22180E18B43026CD6CE1E8998EE15F6 /* OperationQueueScheduler.swift */; }; + A6F45D447E5A8E9CEB5E8E5C0E84683C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */; }; + A9005AC4AC9220336B29D7B057D0EF7B /* TransformType.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF4FE7D225298AEC8CB75B60A9CFA19A /* TransformType.swift */; }; + A9086E9CAEDB5F1144385BBFD8FCBF2F /* DateFormatterTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64980335396398C7FBAB1BA3E239DF56 /* DateFormatterTransform.swift */; }; + A9EEEA7477981DEEBC72432DE9990A4B /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 35E8D54A1971EB89FE89D4C8426891C5 /* Alamofire-dummy.m */; }; + ABB66F2AFFF577587F84A0FFDB8EF4D0 /* NetworkLoggerPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFC44176F598210ADBD3E383470714FB /* NetworkLoggerPlugin.swift */; }; + AD75968CA7B8D67F6BB9F3E7369240D0 /* Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3907CB168DF78B3C72A05AEDC2EA319D /* Deprecated.swift */; }; + AD779D324F289B9D75A700F384DE93DC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */; }; + ADB0D84CC07EECA99486F6F7C7A24CA5 /* Do.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD0ABD4914D2EE301F7AA43B4A12D682 /* Do.swift */; }; + AE1EF48399533730D0066E04B22CA2D6 /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AD834CFBDD48550EDAF21F31D167032 /* SessionManager.swift */; }; + AE6E5B80B4BBB8EDF5C7515B9E8C0055 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */; }; + AFE6CDA6AFDC813885E1640C037B532F /* Platform.Darwin.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0ED537BF046646C2C53B5881878C455 /* Platform.Darwin.swift */; }; + B0A8E8D7320DC23AEEC2ED34439D884E /* AnyObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5EE38E7FB91AA4AF88DBB6A67269E261 /* AnyObserver.swift */; }; + B2CBB9128902C1CDBD0B2A1C7DD17F59 /* ObserveOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 541F38739DEE9642687281F0AB4AFDAD /* ObserveOn.swift */; }; + B3A17E35B391DA28195A889C979540A4 /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FA8811DC202DD7DDD832600E9FA64F1 /* Event.swift */; }; + B5982909C07F473AB5633DAB332EDF46 /* Buffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78ED1ABA505DCC8516D0016B7499D512 /* Buffer.swift */; }; + B5ACCF6D9EEA6074F66037D1396EE2B5 /* Observable+Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4C0B5AE187B86FDFAE2E9FAE10E7302 /* Observable+Debug.swift */; }; + B5C6D4544EE71387786B09CAC6DDB126 /* Property.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4365A2AB5A0772687317C91D2948110A /* Property.swift */; }; + B64425F3EEED0CE5889881B5E9E2E625 /* Never.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5344FF2D05FA74EC89EA389975D24554 /* Never.swift */; }; + B65FCF589DA398C3EFE0128064E510EC /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70B98B88A29190DF1D9046B75313A6F5 /* MultipartFormData.swift */; }; + B801D52816DF0D0326D2A87867513367 /* Moya+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DAA23E8CA642C818313760DEE872D76 /* Moya+Alamofire.swift */; }; + B841A940A08AE08C411F778E85D6A5A2 /* Observer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09F220F40C48109371DD3B972BC8211F /* Observer.swift */; }; + B8AC7A8094077E16A17F340769E7D6DC /* HexColorTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = F39DB37E28CA0B59F6EAB8F9341535BE /* HexColorTransform.swift */; }; + B9F44AD8EF027BE41B9CCF0A9AA579CD /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F38255D62E9D278E969DB4F061836F2F /* Timer.swift */; }; + BBEFE2F9CEB73DC7BD97FFA66A0D9D4F /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD72A25BD3A7D287FED5F3837E2F099A /* Validation.swift */; }; + BE5C67A07E289FE1F9BE27335B159997 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = E875A3259FA588A7BFA479448540897D /* ParameterEncoding.swift */; }; + BF2052DE8D309C5BA7295921E6135DB9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */; }; + BF6631BC5DAE90CD147EBEF561C4DB87 /* MoyaAvailability.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04EDFDD25786A3582B951724C7D2FB88 /* MoyaAvailability.swift */; }; + C4809B395ED9DA6B754944A80ADFD0AA /* EnumTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02829F9EC43F515274FB1074481F8B84 /* EnumTransform.swift */; }; C8647B547B0AA650F2FD380DB4E13D6D /* Moya-ObjectMapper-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 62384D07F2721B9F6F37280C5563A146 /* Moya-ObjectMapper-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CA1BFF20FE43D75453B6F302BCD287DA /* Mappable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A4E045A2FEAE35414C860EE69E7BF86 /* Mappable.swift */; }; CA4D15B078B3BD4B91C7849F16E040E1 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D443B303EF315755B19810A6928CC875 /* Alamofire.framework */; }; - CA60949CFD90255D0C31785A8428B8CE /* DispatchQueue+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 611EA54DFF3BAAACF801CA2E629651F1 /* DispatchQueue+Extensions.swift */; }; - CB6D60925223897FFA2662667DF83E8A /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9032064867F0EDF8BE9DBBA169EBCEB9 /* Response.swift */; }; - CD9270ED0DB978A37BBAE1D7AF54C3F4 /* ScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C825CD9097CE3E3E6F98AE38F5180C2 /* ScheduledItem.swift */; }; - CE23A14BF39E3B069ABBA2D78A042D7E /* SynchronizedOnType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D887E9EE3AE9CED4927FF3B1167B1666 /* SynchronizedOnType.swift */; }; + CA60949CFD90255D0C31785A8428B8CE /* DispatchQueue+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B00B9BA2EE7FD9C4875DE894CC6A0F3 /* DispatchQueue+Extensions.swift */; }; + CB6D60925223897FFA2662667DF83E8A /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFA2975637898BE2E4745452FD2FA5B3 /* Response.swift */; }; + CD9270ED0DB978A37BBAE1D7AF54C3F4 /* ScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EAD4354AECCA4CA0188E9ED5D4B7980 /* ScheduledItem.swift */; }; + CE23A14BF39E3B069ABBA2D78A042D7E /* SynchronizedOnType.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFE18FFE311C803F1501AFE9840B4850 /* SynchronizedOnType.swift */; }; CE752C436ABC8898B95A66D78CB8191B /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 941085FB48E505ED52FF2DFD9B570A8C /* Result.framework */; }; - CEF40EBDDFE583B854F7E9BCDF3EA797 /* TakeWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB80FE113A2AE03AEB2962D1C5D4D2F4 /* TakeWhile.swift */; }; - CF39A869F4EC7228313BDDF36D9565CB /* ScheduledDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59B2D0EFAEB42BCFB6C7772769D223CF /* ScheduledDisposable.swift */; }; - D062E4840A006E91AB7E20D8843CD3EB /* Observable+Multiple.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABE5EB4CE9918D54049AE761A8781B65 /* Observable+Multiple.swift */; }; - D11FDF5AA69D08B83E8718C717957AF0 /* AccessTokenPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5014812AD79454F0E0FD2BE2D47CC444 /* AccessTokenPlugin.swift */; }; - D20A69E3E808AFD0AE167E03094268C1 /* CombineLatest+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FB0C4FAB2B8F4FE51F36EBB2F457DB8 /* CombineLatest+Collection.swift */; }; - D3A1BD21F5AA4FA25B799B68B54063E5 /* Moya-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = DCEBCFE2E680619444916B5ABA6B1682 /* Moya-dummy.m */; }; - D3C6B770C7598E9C1C3B9854136893F3 /* MoyaProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D2833E1FEABBB28F556F914337C45CC /* MoyaProvider.swift */; }; - D4D36FE6280D716A7B2428DDD0795C2B /* InvocableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AE198DAE49954737161561B5F468CC3 /* InvocableType.swift */; }; - D85731A19947BC9DF5C852C55EF7CA1A /* HistoricalScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48A05B7CA9E8B3A3AD6B5CD6185F4D55 /* HistoricalScheduler.swift */; }; - D8970EF683A1A04ACB770927ED46345B /* ToJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E189ED6C9E024DF8E682C7E687F90A5 /* ToJSON.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - DE1072C02E1C53397773CEBCC52B7AF4 /* DisposeBag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A4FA0D564E069B756F89FA616C5AFFC /* DisposeBag.swift */; }; - DE496B92F346321146865A90D9ED4299 /* PriorityQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEBEAB30EF14346FF796FF063BAC16A0 /* PriorityQueue.swift */; }; - DFFDFFAD6E348BB076DC489A151C022D /* Mapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 366273E57C16B8CB3BC7A597A7C76F5E /* Mapper.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - E01BE28B086995CDED5EB65D92691076 /* ShareReplay1WhileConnected.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D0E0A3427495AAF9A15E58B41A3FFB5 /* ShareReplay1WhileConnected.swift */; }; - E10656661A6108001A523F897126F2CD /* InvocableScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D58D1C70EE521D2DD0DEE04B52C65F5 /* InvocableScheduledItem.swift */; }; - E16230D6FC8EB44F8B697FFB5CD6A25E /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE5C9E18F719DCD67A08AD48AC839955 /* Filter.swift */; }; - E180BA547AEDCE5786138D28AADA312C /* ObserverType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F1D332730FF34B15E98370CFE5EE059 /* ObserverType.swift */; }; - E19E15DFDAF63418F901DFE39DABA5CC /* String+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = B036D274E4D5AD086140240208840000 /* String+Rx.swift */; }; - E34A58D59775F7D9C406CC4090FE2D9F /* DateTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC108DEF8BA98AB09C7BC0EAC6C794F1 /* DateTransform.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - E63D94CF23960E905978B3DAE95125D7 /* Cancellable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6767DF0ABD392382DFED5C7A6D3B65FD /* Cancellable.swift */; }; - E6BD8CBF87FB37DC18F8F9E4300FE530 /* DispatchQueueConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = D220720C0183B953B10997BF2BFC2548 /* DispatchQueueConfiguration.swift */; }; - E73DE9471C81DC527F5DF25F886F10E1 /* Debounce.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA1AFA0CF0FF65750E2D51A226379E2D /* Debounce.swift */; }; + CED27CF9BC6DEADC4034354FFD243D0A /* MapError.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF08EBF411883D53A25FF37FFA2CEC24 /* MapError.swift */; }; + CEF40EBDDFE583B854F7E9BCDF3EA797 /* TakeWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 450BB2F541C923DB26C66811CB4E93F5 /* TakeWhile.swift */; }; + CF39A869F4EC7228313BDDF36D9565CB /* ScheduledDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12F1244D10E55C3D0D44E5B32E114CC5 /* ScheduledDisposable.swift */; }; + D062E4840A006E91AB7E20D8843CD3EB /* Observable+Multiple.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC1CC8FE7C1707568F3CF44D87403355 /* Observable+Multiple.swift */; }; + D11FDF5AA69D08B83E8718C717957AF0 /* AccessTokenPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = B48C9F224CB97BCA0F526B6CE757E808 /* AccessTokenPlugin.swift */; }; + D20A69E3E808AFD0AE167E03094268C1 /* CombineLatest+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27F4F2D54F853B9ABADEDC7188F43473 /* CombineLatest+Collection.swift */; }; + D2143DE4FC2628CC0E41EF58D263C20A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */; }; + D2D6D73DA2F023FA2E7B143443642610 /* Lifetime.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9169B63F6003C0F243F0388BF5958FF7 /* Lifetime.swift */; }; + D3A1BD21F5AA4FA25B799B68B54063E5 /* Moya-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 79433C83DBA7AF7AAF0E9931F79CDEFE /* Moya-dummy.m */; }; + D3C6B770C7598E9C1C3B9854136893F3 /* MoyaProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9B17B3054632B1067BBCA2C71A05333 /* MoyaProvider.swift */; }; + D4D36FE6280D716A7B2428DDD0795C2B /* InvocableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E72FDC1493E8F5625DF4379C9BA5C01 /* InvocableType.swift */; }; + D85731A19947BC9DF5C852C55EF7CA1A /* HistoricalScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1252E1B22A22F475C12151241EFCA4A /* HistoricalScheduler.swift */; }; + DAF69EF73C887FA1D6BD8B789070DCFF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */; }; + DE1072C02E1C53397773CEBCC52B7AF4 /* DisposeBag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9237F94E8BAA36CA82EFBF39F965662F /* DisposeBag.swift */; }; + DE496B92F346321146865A90D9ED4299 /* PriorityQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD92FA237FCFC2D9C81216D0EBACCAAF /* PriorityQueue.swift */; }; + E01BE28B086995CDED5EB65D92691076 /* ShareReplay1WhileConnected.swift in Sources */ = {isa = PBXBuildFile; fileRef = C357B7A689BF299853AB4DBCA4066AD0 /* ShareReplay1WhileConnected.swift */; }; + E10656661A6108001A523F897126F2CD /* InvocableScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = E351E6D538BA2A6289C52171C44274CA /* InvocableScheduledItem.swift */; }; + E16230D6FC8EB44F8B697FFB5CD6A25E /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEE360A15B39C568E762840D3A81CEEE /* Filter.swift */; }; + E180BA547AEDCE5786138D28AADA312C /* ObserverType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AF2389D69944D193711EBCE256D550F /* ObserverType.swift */; }; + E19E15DFDAF63418F901DFE39DABA5CC /* String+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3A65AF290BC5C0CE5D5AF1B2454E60A /* String+Rx.swift */; }; + E29E386B034313C62E76D5DFF609F830 /* ReactiveSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D3891B24536C2EEB56439F4AE948F504 /* ReactiveSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E38B5D9E5AAD37ACD84F32C34FD4C98B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */; }; + E5362121A30FEA455E7E6654111D38E0 /* Action.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B2E3A21F478613F90988F19F11E3569 /* Action.swift */; }; + E63D94CF23960E905978B3DAE95125D7 /* Cancellable.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD752EB8D371397CF0E0A452BFC6C66E /* Cancellable.swift */; }; + E6BD8CBF87FB37DC18F8F9E4300FE530 /* DispatchQueueConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D9789F67B20C11BE9288BBF80C538A2 /* DispatchQueueConfiguration.swift */; }; + E73DE9471C81DC527F5DF25F886F10E1 /* Debounce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 875489DE5BF92D2F4B1BBFCAC174EF6C /* Debounce.swift */; }; E9674E861DAB4BD6475368C1E7F84098 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D443B303EF315755B19810A6928CC875 /* Alamofire.framework */; }; - EBCE7DBA3620ABF1556DF63807C44A1C /* AnonymousInvocable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 794C5EE8CE9FA84905607AA9C2F29BCD /* AnonymousInvocable.swift */; }; - EC408F9747A97C10C8FFF4CF8B637823 /* ElementAt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BCABCFAB741BF1ABFE39EA911E4D8BF /* ElementAt.swift */; }; - ED63927DE90D567408593796F02C51BE /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = D53DBBEB67F5CB59D38B55D8087349A7 /* Response.swift */; }; - EE5B4C0476634A4E8A622D28FFF5FC06 /* AnonymousDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9000B74DF9AC745B40676911D58B7EC3 /* AnonymousDisposable.swift */; }; - EF16CC75D347186F4DD61A34DB325829 /* CredentialsPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF5A85C56ABF93FABAB75D404B933BAF /* CredentialsPlugin.swift */; }; - EFA40542846DF8E2CFF6659FE2739422 /* DictionaryTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = B18B75426512AAA18D540F3D35CBAA65 /* DictionaryTransform.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - EFD264FC408EBF3BA2528E70B08DDD94 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3854D7A0F8D75A28CD9BC5977D8C028 /* Notifications.swift */; }; - F05D5EC4A3A3DE4FFC782BF61EAD21FC /* Observable+Binding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7751EBD96646C167DB2D3D84F8AF8F /* Observable+Binding.swift */; }; - F11CB11BB3FA8065DDC719B339E3526E /* Optional.swift in Sources */ = {isa = PBXBuildFile; fileRef = C49D3AEDD0847D87CFBDC3C43AEC7A5D /* Optional.swift */; }; - F205A1C1630D25EFFE14D37128980424 /* MapError.swift in Sources */ = {isa = PBXBuildFile; fileRef = D44716B9F53DAF5AC9F273FCFA0B399E /* MapError.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - F2E82F7E4AADB73AD627E1558470034B /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9AE2FF3B2C85504AD6B7F9063273BD5 /* MultipartFormData.swift */; }; - F3DF171DAA677F58667F4B082DEB57DB /* Observable+Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0E0EB252103E338667F10410633AFD8 /* Observable+Response.swift */; }; - F435B7412E256D199E674C234792B85B /* PublishSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1A034B745DF8DB60A1412A76521B54E /* PublishSubject.swift */; }; - F6BC0D049730D4315FF3469ECBE981FB /* AsMaybe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E1C096CA1F50B1C1FC34F1960375EF5 /* AsMaybe.swift */; }; - F6BECD98B97CBFEBE2C96F0E9E72A6C0 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = D852756929898E7C884C5591E37695E8 /* ResponseSerialization.swift */; }; - F700E0C8F99C40C769829C7B4AA618DC /* EnumTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1E8265196A3B631CE5537AB9DF3EABE /* EnumTransform.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - F78045F54417825F35CD7E0C5AD08677 /* Reduce.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC88DBEA8726D2E597F82589529F6B6 /* Reduce.swift */; }; - F7CC50FA94AFDE261F512B33FE39FB94 /* ISO8601DateTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6FA79F4F3EE613CEF674C035100A81A /* ISO8601DateTransform.swift */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - F80AE7863D18839F34F60E5BCE111403 /* BehaviorSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A62F8C256D44A21863AB561AC63A4C8 /* BehaviorSubject.swift */; }; - F8B3D3092ED0417E8CDF32033F6122F5 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DD4D5CFDBC23B94526F5361B3BDE4C9 /* Alamofire.swift */; }; - FA455D54FB780C7DABD6EF04B119C852 /* InfiniteSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EC509CD4E27A6008E4737F83CB64E33 /* InfiniteSequence.swift */; }; - FC5075412755DDFAF3BBE70DACFAB357 /* Result-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AB7B0A13BA1A3FEE0C07FF11290FB3B /* Result-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FC7A8735A166AEA5D225647264380BBF /* LockOwnerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 226889B2AD72A44E0383CB333E2070C7 /* LockOwnerType.swift */; }; - FCB654EDC72D1187C5573771EEFA3B7A /* BooleanDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FBD99DE8937641F1E517BC8A86E9232 /* BooleanDisposable.swift */; }; - FEA2B1A5B25AD071CBD711AEF3B9EE4F /* Materialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 592569BB42AC6BF00E98C5030082CFF8 /* Materialize.swift */; }; - FF61036330EB6DE42465B6D8BE2DD8A4 /* Take.swift in Sources */ = {isa = PBXBuildFile; fileRef = 799D3B4718D965111427486583BFCB4C /* Take.swift */; }; + EB11EC3B3706810D31F002F2D479975A /* TransformOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F74CF47C5DE7C590136CD81F9005DAE /* TransformOf.swift */; }; + EBCE7DBA3620ABF1556DF63807C44A1C /* AnonymousInvocable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64C3B69219C8DAC02F5F39DD4B190606 /* AnonymousInvocable.swift */; }; + EC408F9747A97C10C8FFF4CF8B637823 /* ElementAt.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB39F4C98DB2DA3F40DE8A32E7558771 /* ElementAt.swift */; }; + ED63927DE90D567408593796F02C51BE /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B94AD22D41BE0EAB831D4A1FEBD2635 /* Response.swift */; }; + EE5B4C0476634A4E8A622D28FFF5FC06 /* AnonymousDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAA9F221B24D7988307530A187CAD448 /* AnonymousDisposable.swift */; }; + EF16CC75D347186F4DD61A34DB325829 /* CredentialsPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB3363BA24CD0B09109B7746F6285B98 /* CredentialsPlugin.swift */; }; + EF6A3C105AFA2332D931D70A5E8DE01E /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9C57137B4028EDDFB13326F3B372094 /* Operators.swift */; }; + EFD264FC408EBF3BA2528E70B08DDD94 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5B0E739E5861FFF5C38D5227A4A389F /* Notifications.swift */; }; + F05D5EC4A3A3DE4FFC782BF61EAD21FC /* Observable+Binding.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAEEE030CE34EBFEF0FAD1318244A197 /* Observable+Binding.swift */; }; + F11CB11BB3FA8065DDC719B339E3526E /* Optional.swift in Sources */ = {isa = PBXBuildFile; fileRef = D25145D395665027FD536D8204F2A151 /* Optional.swift */; }; + F2E82F7E4AADB73AD627E1558470034B /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48E9530C6F3DCB9C366850CA3F47B7B7 /* MultipartFormData.swift */; }; + F3DF171DAA677F58667F4B082DEB57DB /* Observable+Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29F88EE7273190FB76AA77203F0E09D9 /* Observable+Response.swift */; }; + F435B7412E256D199E674C234792B85B /* PublishSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4802F5EB9C4C88F88895D0E79CACB366 /* PublishSubject.swift */; }; + F5155D5C24499638C6C3124FC4FE4264 /* ImmutableMappable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0F089014191265414BFEE897D8AF3CC /* ImmutableMappable.swift */; }; + F6BC0D049730D4315FF3469ECBE981FB /* AsMaybe.swift in Sources */ = {isa = PBXBuildFile; fileRef = C117BF194A2FAB369D1E4E772735B1E4 /* AsMaybe.swift */; }; + F6BECD98B97CBFEBE2C96F0E9E72A6C0 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 852276A83C97D7B483AAD3516806EF85 /* ResponseSerialization.swift */; }; + F6EBAD7C469937AEDFC63FA87EBEA647 /* URLTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 228F82916F5D132DE5005BBAB76005B8 /* URLTransform.swift */; }; + F7531BCE8855F7B136327F3415C9ED8C /* Deprecations+Removals.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF59E24C322B9D2F5CD6280927C40466 /* Deprecations+Removals.swift */; }; + F78045F54417825F35CD7E0C5AD08677 /* Reduce.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC7FAF6B11CB54F533401E158C245898 /* Reduce.swift */; }; + F80AE7863D18839F34F60E5BCE111403 /* BehaviorSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76263CF98FEED7B4665B6B14CB9D4F8 /* BehaviorSubject.swift */; }; + F8B3D3092ED0417E8CDF32033F6122F5 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2B5C81978957E54CCFB28F7091AD5D3 /* Alamofire.swift */; }; + FA455D54FB780C7DABD6EF04B119C852 /* InfiniteSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B323FC2F2AFFC1287FAEE9BF75E2A28 /* InfiniteSequence.swift */; }; + FC5075412755DDFAF3BBE70DACFAB357 /* Result-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B5CE459308136BFD7A23BAF2F50CE800 /* Result-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FC7A8735A166AEA5D225647264380BBF /* LockOwnerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7355FD9C656F3B499FFED26503A24844 /* LockOwnerType.swift */; }; + FCB654EDC72D1187C5573771EEFA3B7A /* BooleanDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF39CE1238BC9EF2D3214D7964EF396D /* BooleanDisposable.swift */; }; + FEA2B1A5B25AD071CBD711AEF3B9EE4F /* Materialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C4B16E320E5D74A88118C831CBBD69C /* Materialize.swift */; }; + FF1B28B0E4069ADCCDDE21DCC00A09CE /* Pods-Demo-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C5BC86D40B890A7B0844F888209CA06F /* Pods-Demo-dummy.m */; }; + FF61036330EB6DE42465B6D8BE2DD8A4 /* Take.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC4CFA50086C81153480348C921E9D7E /* Take.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 172BFED3498D5C686525F100B519327F /* PBXContainerItemProxy */ = { + 35B40C47871A2BFB66B1DF89719C2C43 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; remoteGlobalIDString = EFDB85DF4827734B35E8A46720ACAEE0; remoteInfo = Result; }; - 2FCB5E9BBEB9FEA8F764DD24E1B328EA /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 88E9EC28B8B46C3631E6B242B50F4442; - remoteInfo = Alamofire; - }; 448CBA2B5AAF3C314D4E4B32B447453F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; @@ -302,12 +320,12 @@ remoteGlobalIDString = 421F6BEF92744C4CA9E5F012EC4C5C8F; remoteInfo = ObjectMapper; }; - 7E295E22CA5CAC345532DF47CADAE8EA /* PBXContainerItemProxy */ = { + 799FA77BC02BC3B70E591F74839DDAE4 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 421F6BEF92744C4CA9E5F012EC4C5C8F; - remoteInfo = ObjectMapper; + remoteGlobalIDString = FDF0AE36CC489EF7ECB20E4E8C5EC6E5; + remoteInfo = ReactiveSwift; }; 8FAC931D00AB3A674FF42918D2F7109F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -323,34 +341,41 @@ remoteGlobalIDString = EFDB85DF4827734B35E8A46720ACAEE0; remoteInfo = Result; }; - C5B2FDD1C7D0714C981FAA527CA63027 /* PBXContainerItemProxy */ = { + A3DE26FFB53C6E483B9E9E586F64C58E /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; remoteGlobalIDString = 2A6D0851BA24DD25864CB23A3A83B9CC; remoteInfo = Moya; }; - D4D369F3E79C27EA7752DBEACC034F00 /* PBXContainerItemProxy */ = { + A3E49214DCAD05F7955595F8042E3AA2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = C419A9BCC9AACDC44A26B80764B6B554; - remoteInfo = RxSwift; + remoteGlobalIDString = EFDB85DF4827734B35E8A46720ACAEE0; + remoteInfo = Result; }; - D7002BCB9BC9247E198B9809447F6EF6 /* PBXContainerItemProxy */ = { + CBB41F96F2BCDB97F851ED133FC81786 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 2A6D0851BA24DD25864CB23A3A83B9CC; - remoteInfo = Moya; + remoteGlobalIDString = 421F6BEF92744C4CA9E5F012EC4C5C8F; + remoteInfo = ObjectMapper; }; - DB9F2D9BCF03D2D690ABC2C1540B4367 /* PBXContainerItemProxy */ = { + D34606F68216E7E7B0E351AA2C8ADF14 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; remoteGlobalIDString = 49C6564B2E2D0A1604946BAD65772E21; remoteInfo = "Moya-ObjectMapper"; }; + D7002BCB9BC9247E198B9809447F6EF6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 2A6D0851BA24DD25864CB23A3A83B9CC; + remoteInfo = Moya; + }; E8E16664D5BFAA9326D20B666C748F50 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; @@ -358,290 +383,332 @@ remoteGlobalIDString = C419A9BCC9AACDC44A26B80764B6B554; remoteInfo = RxSwift; }; + EEA2469DF649FCFD5814639A808C1C6A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 88E9EC28B8B46C3631E6B242B50F4442; + remoteInfo = Alamofire; + }; + FA50F55E715BCB4DB08596E4D2F259BD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = C419A9BCC9AACDC44A26B80764B6B554; + remoteInfo = RxSwift; + }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 034ED05283387971F8B44299C90D057D /* ImmediateScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmediateScheduler.swift; path = RxSwift/Schedulers/ImmediateScheduler.swift; sourceTree = ""; }; + 001EFFE7D56D6AB9A1B0174B1E4DCC82 /* ImmediateSchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmediateSchedulerType.swift; path = RxSwift/ImmediateSchedulerType.swift; sourceTree = ""; }; + 02195DED2D688E2BBFA361F58068011C /* DateTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DateTransform.swift; path = Sources/DateTransform.swift; sourceTree = ""; }; + 02829F9EC43F515274FB1074481F8B84 /* EnumTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EnumTransform.swift; path = Sources/EnumTransform.swift; sourceTree = ""; }; + 0323144B011FDDF6827A6B8DBA85B00B /* AsSingle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsSingle.swift; path = RxSwift/Observables/Implementations/AsSingle.swift; sourceTree = ""; }; 03EA1E60232BFA05817BC26ACB8E68BA /* Pods-Demo-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Demo-umbrella.h"; sourceTree = ""; }; - 051A719FA532DB9A6297CA9ECAB7712F /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; - 07B4A2BA63EA18D09A87E038646E464F /* Merge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Merge.swift; path = RxSwift/Observables/Implementations/Merge.swift; sourceTree = ""; }; - 099546DF2E74E63FE6FA7B3EC2F7734A /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; - 0A87926F1117ABD9937D1F0F91B80417 /* ObserveOnSerialDispatchQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserveOnSerialDispatchQueue.swift; path = RxSwift/Observables/Implementations/ObserveOnSerialDispatchQueue.swift; sourceTree = ""; }; - 0AB7B0A13BA1A3FEE0C07FF11290FB3B /* Result-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-umbrella.h"; sourceTree = ""; }; - 0CA56D9693D713B9544995B44EE44F0D /* Delay.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Delay.swift; path = RxSwift/Observables/Implementations/Delay.swift; sourceTree = ""; }; - 0ED317734300994343806A205124D34D /* ConnectableObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectableObservable.swift; path = RxSwift/Observables/Implementations/ConnectableObservable.swift; sourceTree = ""; }; - 0F1D332730FF34B15E98370CFE5EE059 /* ObserverType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverType.swift; path = RxSwift/ObserverType.swift; sourceTree = ""; }; - 101B539448B8BE627A24AAE294ECAF2A /* Sequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sequence.swift; path = RxSwift/Observables/Implementations/Sequence.swift; sourceTree = ""; }; - 1096F5305E204EF5070EA4183F503458 /* ObserverBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverBase.swift; path = RxSwift/Observers/ObserverBase.swift; sourceTree = ""; }; + 04314B6B8716BBC1C296C41E570D781D /* Variable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Variable.swift; path = RxSwift/Subjects/Variable.swift; sourceTree = ""; }; + 04B07C2108E8AEAA49EC11D232391921 /* Observable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Observable.swift; path = RxSwift/Observable.swift; sourceTree = ""; }; + 04EDFDD25786A3582B951724C7D2FB88 /* MoyaAvailability.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaAvailability.swift; path = Sources/Moya/MoyaAvailability.swift; sourceTree = ""; }; + 05788979F32B6C5DF30DD0FD687D5936 /* MoyaProvider+Internal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Internal.swift"; path = "Sources/Moya/MoyaProvider+Internal.swift"; sourceTree = ""; }; + 059700FB972CCDBE4E13C737B053F05C /* RefCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RefCount.swift; path = RxSwift/Observables/Implementations/RefCount.swift; sourceTree = ""; }; + 069941314ECEE9FA8027A5F8A227FF94 /* ResultExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResultExtensions.swift; path = Sources/ResultExtensions.swift; sourceTree = ""; }; + 06A276080DB9D3C2B9C7EEFD0570A670 /* Observable+StandardSequenceOperators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+StandardSequenceOperators.swift"; path = "RxSwift/Observables/Observable+StandardSequenceOperators.swift"; sourceTree = ""; }; + 079F5BAE309C0CA01FCDB9DDDE38383F /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; + 0865A76D93AA95B23295EE2BCF3BC18C /* TargetType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TargetType.swift; path = Sources/Moya/TargetType.swift; sourceTree = ""; }; + 08EC66818EEE7440780A0483FF548F6A /* SingleAssignmentDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAssignmentDisposable.swift; path = RxSwift/Disposables/SingleAssignmentDisposable.swift; sourceTree = ""; }; + 0955C8F4EEE352F4F3BB89BDD6435D23 /* AddRef.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AddRef.swift; path = RxSwift/Observables/Implementations/AddRef.swift; sourceTree = ""; }; + 0987593EA2560AA5A3F092B2FBC00C33 /* Result-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-prefix.pch"; sourceTree = ""; }; + 09F220F40C48109371DD3B972BC8211F /* Observer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Observer.swift; path = Sources/Observer.swift; sourceTree = ""; }; + 0B94AD22D41BE0EAB831D4A1FEBD2635 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Sources/Moya/Response.swift; sourceTree = ""; }; + 0BECA3CFB229CD34026ABBD1E893ABD8 /* ReactiveSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ReactiveSwift.xcconfig; sourceTree = ""; }; + 0C7805AC2429FAFC54029B4782D5F6A7 /* Moya.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Moya.xcconfig; sourceTree = ""; }; + 0D9789F67B20C11BE9288BBF80C538A2 /* DispatchQueueConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DispatchQueueConfiguration.swift; path = RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift; sourceTree = ""; }; + 0EAD4354AECCA4CA0188E9ED5D4B7980 /* ScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItem.swift; path = RxSwift/Schedulers/Internal/ScheduledItem.swift; sourceTree = ""; }; + 0F64DD81F831A11D65AE6504A27763B1 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Alamofire.modulemap; sourceTree = ""; }; + 10F5D71DF2264812C5731C22EE801A5A /* AnonymousObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousObserver.swift; path = RxSwift/Observers/AnonymousObserver.swift; sourceTree = ""; }; + 12F1244D10E55C3D0D44E5B32E114CC5 /* ScheduledDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledDisposable.swift; path = RxSwift/Disposables/ScheduledDisposable.swift; sourceTree = ""; }; 16A860D8F4BF07CDAABA319C5E5658A4 /* Moya.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Moya.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 16D2DD1873C65581C68D7601F56A7082 /* HistoricalSchedulerTimeConverter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalSchedulerTimeConverter.swift; path = RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift; sourceTree = ""; }; - 19AF502504F47C0798E7092BEB6B9B39 /* SkipWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipWhile.swift; path = RxSwift/Observables/Implementations/SkipWhile.swift; sourceTree = ""; }; - 1C680511F09B57462B53519506B25D68 /* ObjectMapper.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ObjectMapper.xcconfig; sourceTree = ""; }; - 1D00CE3BB3B1B39702A1D44E499442B9 /* Do.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Do.swift; path = RxSwift/Observables/Implementations/Do.swift; sourceTree = ""; }; - 1D882F045A07D6D09D64E94E0010A9B2 /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; - 1F887A2C3255BBB81512FC348CADBB22 /* Observable+Aggregate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Aggregate.swift"; path = "RxSwift/Observables/Observable+Aggregate.swift"; sourceTree = ""; }; - 1F8FFC78A7C1DA25CE9257446083D3C3 /* RxSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-prefix.pch"; sourceTree = ""; }; - 1FFB5D94F9243148195A8AF95A994738 /* Disposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposable.swift; path = RxSwift/Disposable.swift; sourceTree = ""; }; - 20A9B0365625986701ED008EA54F7F95 /* TransformOperators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TransformOperators.swift; path = Sources/TransformOperators.swift; sourceTree = ""; }; - 226889B2AD72A44E0383CB333E2070C7 /* LockOwnerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LockOwnerType.swift; path = RxSwift/Concurrency/LockOwnerType.swift; sourceTree = ""; }; - 2268EAF1576773305A769F28BBA2BF2A /* ObjectMapper-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ObjectMapper-prefix.pch"; sourceTree = ""; }; - 2336973513914C168F8E404464DDBE17 /* ObjectMapper-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ObjectMapper-umbrella.h"; sourceTree = ""; }; - 240B4D935992E8DADCD79B4A84CFF1EC /* Sink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sink.swift; path = RxSwift/Observables/Implementations/Sink.swift; sourceTree = ""; }; - 275CADCB409BD3A62811A9012671CAA2 /* Range.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Range.swift; path = RxSwift/Observables/Implementations/Range.swift; sourceTree = ""; }; - 279F3B60FADF3A816E09532160AE148B /* MoyaProvider+Internal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Internal.swift"; path = "Sources/Moya/MoyaProvider+Internal.swift"; sourceTree = ""; }; - 2A4FA0D564E069B756F89FA616C5AFFC /* DisposeBag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBag.swift; path = RxSwift/Disposables/DisposeBag.swift; sourceTree = ""; }; - 2A61D671B6BDB3B11324645435740C94 /* ToArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToArray.swift; path = RxSwift/Observables/Implementations/ToArray.swift; sourceTree = ""; }; + 16AC502307017147E0782DA0BE937992 /* RecursiveScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveScheduler.swift; path = RxSwift/Schedulers/RecursiveScheduler.swift; sourceTree = ""; }; + 1A6D71F9BF566B4365BE46AB589E7461 /* TransformOperators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TransformOperators.swift; path = Sources/TransformOperators.swift; sourceTree = ""; }; + 1C971A44E2F3D8336CF0FA86D1488C8C /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; + 1EBA89D983DA12F498C2325A2BE8F733 /* Endpoint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Endpoint.swift; path = Sources/Moya/Endpoint.swift; sourceTree = ""; }; + 1EE119E337ADA617EC124C5243D01215 /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; + 1FB6A4378F9D1425C55DF338352E66CA /* Debug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debug.swift; path = RxSwift/Observables/Implementations/Debug.swift; sourceTree = ""; }; + 1FD4883583337FBFDD03E78A3D2FB8B4 /* Sequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sequence.swift; path = RxSwift/Observables/Implementations/Sequence.swift; sourceTree = ""; }; + 205BBF1AA90ABD220FCD3EC814B1E0D7 /* Moya.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Moya.framework; path = Moya.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 20AEF3C06A5DFD905B23CA9F2E2425FE /* NSDecimalNumberTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NSDecimalNumberTransform.swift; path = Sources/NSDecimalNumberTransform.swift; sourceTree = ""; }; + 21888844E9B22E9A361BF543DF18D25D /* Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rx.swift; path = RxSwift/Rx.swift; sourceTree = ""; }; + 21EC236CC3C0F46D0FE4C03207C993F2 /* Window.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Window.swift; path = RxSwift/Observables/Implementations/Window.swift; sourceTree = ""; }; + 228F82916F5D132DE5005BBAB76005B8 /* URLTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = URLTransform.swift; path = Sources/URLTransform.swift; sourceTree = ""; }; + 23351BF9B507AE749916B9647001DB83 /* HistoricalSchedulerTimeConverter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalSchedulerTimeConverter.swift; path = RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift; sourceTree = ""; }; + 24FBE73466F8534532B774BBAC7F2BFB /* RxSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxSwift.xcconfig; sourceTree = ""; }; + 2686171BA16348F07095C4FE784112A0 /* ISO8601DateTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ISO8601DateTransform.swift; path = Sources/ISO8601DateTransform.swift; sourceTree = ""; }; + 26D6FB3D54BF5F3F7B355A811BABC5F6 /* Generate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generate.swift; path = RxSwift/Observables/Implementations/Generate.swift; sourceTree = ""; }; + 27C0B04261BDBBFD9B29D09D21BD1585 /* ReplaySubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ReplaySubject.swift; path = RxSwift/Subjects/ReplaySubject.swift; sourceTree = ""; }; + 27F4F2D54F853B9ABADEDC7188F43473 /* CombineLatest+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+Collection.swift"; path = "RxSwift/Observables/Implementations/CombineLatest+Collection.swift"; sourceTree = ""; }; + 28297762695E3A606FF79D55CD44A1E8 /* RecursiveLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveLock.swift; path = Platform/RecursiveLock.swift; sourceTree = ""; }; + 29F88EE7273190FB76AA77203F0E09D9 /* Observable+Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Response.swift"; path = "Sources/RxMoya/Observable+Response.swift"; sourceTree = ""; }; + 2A2A274B029E7DBF68ECEBC41DB939D1 /* RxSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-umbrella.h"; sourceTree = ""; }; 2B87CCF9A5173095B333FB06CA24E143 /* ObjectMapper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ObjectMapper.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2BEB2995CE08029101069ABB46AD436C /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; - 2C2DC15B4258C3CE43CBD6E60BEBAA49 /* SynchronizedUnsubscribeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedUnsubscribeType.swift; path = RxSwift/Concurrency/SynchronizedUnsubscribeType.swift; sourceTree = ""; }; - 2CB6BBFA4EAE17E5FED8B104F1C58419 /* Operators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Operators.swift; path = Sources/Operators.swift; sourceTree = ""; }; - 2FAC654555E2BE2ED1A38AF599A3A792 /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; + 2CAAA0D52FCA1C1DEC597260623EF2A5 /* CustomDateFormatTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CustomDateFormatTransform.swift; path = Sources/CustomDateFormatTransform.swift; sourceTree = ""; }; + 2E03DD3956442CB4D8565AD68A91D369 /* StartWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StartWith.swift; path = RxSwift/Observables/Implementations/StartWith.swift; sourceTree = ""; }; + 2F11037BCF62A8272D103B2E0875AD7F /* SubjectType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubjectType.swift; path = RxSwift/Subjects/SubjectType.swift; sourceTree = ""; }; 322419E99883B306EE7EC77959FCC8DF /* Pods-Demo.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-Demo.modulemap"; sourceTree = ""; }; - 32BD97FABD31ACA7E3146BAAA9954259 /* ShareReplay1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareReplay1.swift; path = RxSwift/Observables/Implementations/ShareReplay1.swift; sourceTree = ""; }; - 32C75D1C9BCDA389266EEF90117751CB /* AddRef.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AddRef.swift; path = RxSwift/Observables/Implementations/AddRef.swift; sourceTree = ""; }; - 337539EBBDCD8917D3389B8C2B24A285 /* Generate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generate.swift; path = RxSwift/Observables/Implementations/Generate.swift; sourceTree = ""; }; - 366273E57C16B8CB3BC7A597A7C76F5E /* Mapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Mapper.swift; path = Sources/Mapper.swift; sourceTree = ""; }; - 366406296C874C088B74308A835D141E /* Platform.Linux.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Linux.swift; path = Platform/Platform.Linux.swift; sourceTree = ""; }; - 38A8D839A098CE4BE166545247EB9C25 /* Observable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Observable.swift; path = RxSwift/Observable.swift; sourceTree = ""; }; - 39AAD57F8B68CAE00A161F77370FC914 /* SkipUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipUntil.swift; path = RxSwift/Observables/Implementations/SkipUntil.swift; sourceTree = ""; }; - 3B1358A738A6AB56494A5B17315FB1F2 /* SynchronizedSubscribeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedSubscribeType.swift; path = RxSwift/Concurrency/SynchronizedSubscribeType.swift; sourceTree = ""; }; + 3385E307C8C0628285FFAC438D4B6E7D /* SerialDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDispatchQueueScheduler.swift; path = RxSwift/Schedulers/SerialDispatchQueueScheduler.swift; sourceTree = ""; }; + 33CBA7B0F508B12B0E6ABA92500E3EC2 /* Throttle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Throttle.swift; path = RxSwift/Observables/Implementations/Throttle.swift; sourceTree = ""; }; + 353118FBD87FF65111631E0E224F8A29 /* EventLogger.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EventLogger.swift; path = Sources/EventLogger.swift; sourceTree = ""; }; + 35D64D5D6EAE2F4029F0EE7D6856F4DB /* TailRecursiveSink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TailRecursiveSink.swift; path = RxSwift/Observers/TailRecursiveSink.swift; sourceTree = ""; }; + 35E8D54A1971EB89FE89D4C8426891C5 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; + 374F5979FAFC0F8EDB295BC6AF726210 /* EnumOperators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EnumOperators.swift; path = Sources/EnumOperators.swift; sourceTree = ""; }; + 3907CB168DF78B3C72A05AEDC2EA319D /* Deprecated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecated.swift; path = RxSwift/Deprecated.swift; sourceTree = ""; }; + 39E05E41EC88853ABC2E4FE509051C89 /* VirtualTimeConverterType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeConverterType.swift; path = RxSwift/Schedulers/VirtualTimeConverterType.swift; sourceTree = ""; }; + 3B2E3A21F478613F90988F19F11E3569 /* Action.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Action.swift; path = Sources/Action.swift; sourceTree = ""; }; + 3B323FC2F2AFFC1287FAEE9BF75E2A28 /* InfiniteSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InfiniteSequence.swift; path = Platform/DataStructures/InfiniteSequence.swift; sourceTree = ""; }; + 3C0A8A53B1859DFABE02D98FD7DF7170 /* GroupBy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupBy.swift; path = RxSwift/Observables/Implementations/GroupBy.swift; sourceTree = ""; }; 3CD5A30239C90F1B549B4AB9299ECF16 /* Pods-Demo-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Demo-frameworks.sh"; sourceTree = ""; }; 3D653C9DA16200D75AD14323AA830C6B /* Pods-Demo-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Demo-resources.sh"; sourceTree = ""; }; - 3D739F9F4EA372D25C0F421BFB9C9307 /* ConnectableObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectableObservableType.swift; path = RxSwift/ConnectableObservableType.swift; sourceTree = ""; }; - 3E06217CCEEA5A6A85FF15D452B5036B /* AsSingle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsSingle.swift; path = RxSwift/Observables/Implementations/AsSingle.swift; sourceTree = ""; }; - 3EC509CD4E27A6008E4737F83CB64E33 /* InfiniteSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InfiniteSequence.swift; path = Platform/DataStructures/InfiniteSequence.swift; sourceTree = ""; }; - 3ED85804987E79AE8463C4ADA1157197 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Alamofire.modulemap; sourceTree = ""; }; - 3FE0DADEA9FB8151F9EE55ADE94BD0A3 /* RefCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RefCount.swift; path = RxSwift/Observables/Implementations/RefCount.swift; sourceTree = ""; }; - 40963991FCA619D7799F942D19A4FAA4 /* NopDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NopDisposable.swift; path = RxSwift/Disposables/NopDisposable.swift; sourceTree = ""; }; - 4182FE0590CD87191361E8699241CCF6 /* RxMutableBox.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxMutableBox.swift; path = RxSwift/RxMutableBox.swift; sourceTree = ""; }; - 41A25ED627CF34B02A326E2701F21B52 /* RefCountDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RefCountDisposable.swift; path = RxSwift/Disposables/RefCountDisposable.swift; sourceTree = ""; }; + 3E4EC7FEC4148FDD842B176028C55D7C /* RxMoyaProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxMoyaProvider.swift; path = Sources/RxMoya/RxMoyaProvider.swift; sourceTree = ""; }; + 3E928AE794F4E1E19A5AD255A37D6752 /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; + 403F223F4F7DD41EE472F87D183F1020 /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = RxSwift.framework; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 404D82726264603AD565560110967D32 /* InhabitableTypeGuards.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InhabitableTypeGuards.swift; path = Sources/InhabitableTypeGuards.swift; sourceTree = ""; }; + 408788B1F07BDFF8D6682B7D0F390607 /* Empty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Empty.swift; path = RxSwift/Observables/Implementations/Empty.swift; sourceTree = ""; }; 41C6FA254A44FFC58952089BB7F468C9 /* Moya-ObjectMapper-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Moya-ObjectMapper-dummy.m"; sourceTree = ""; }; - 4236002E282A0F05AE59D0E2E156C8F9 /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = RxSwift/Errors.swift; sourceTree = ""; }; - 429C218ACEC9FD71D562C3153D72D416 /* SerialDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDisposable.swift; path = RxSwift/Disposables/SerialDisposable.swift; sourceTree = ""; }; - 42B9037B64668A5DE610FCC3F18B39C5 /* ObjectMapper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = ObjectMapper.framework; path = ObjectMapper.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 44FB0622417161D44D1295F0594BCC94 /* MoyaError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaError.swift; path = Sources/Moya/MoyaError.swift; sourceTree = ""; }; - 458E8181BA8E5F0826DA11AFBFE8F017 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 45995F50FB199435F20E308EEAC306FB /* ConcurrentDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentDispatchQueueScheduler.swift; path = RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift; sourceTree = ""; }; - 4744F07468C8F6C9FFAC5B65E23BB8F4 /* Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rx.swift; path = RxSwift/Rx.swift; sourceTree = ""; }; - 48A05B7CA9E8B3A3AD6B5CD6185F4D55 /* HistoricalScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalScheduler.swift; path = RxSwift/Schedulers/HistoricalScheduler.swift; sourceTree = ""; }; - 4941AEE4901EE1EA89034A12E334C2D3 /* Deprecated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecated.swift; path = RxSwift/Deprecated.swift; sourceTree = ""; }; - 4A62F8C256D44A21863AB561AC63A4C8 /* BehaviorSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BehaviorSubject.swift; path = RxSwift/Subjects/BehaviorSubject.swift; sourceTree = ""; }; - 4C27978222879CDDE8F12507361A5025 /* ConcurrentMainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentMainScheduler.swift; path = RxSwift/Schedulers/ConcurrentMainScheduler.swift; sourceTree = ""; }; - 4C7751EBD96646C167DB2D3D84F8AF8F /* Observable+Binding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Binding.swift"; path = "RxSwift/Observables/Observable+Binding.swift"; sourceTree = ""; }; - 4CD045EE0F7BD32E53266987C5C7EDA0 /* CombineLatest+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+arity.swift"; path = "RxSwift/Observables/Implementations/CombineLatest+arity.swift"; sourceTree = ""; }; - 4DB1A7A3673572B80E0AC0E3446164C9 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 4E3AE6B908A12FA43493763FBA7C35F5 /* Amb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Amb.swift; path = RxSwift/Observables/Implementations/Amb.swift; sourceTree = ""; }; - 4ED2E8EA6C34E294B06DA947F06D4D3F /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; - 5014812AD79454F0E0FD2BE2D47CC444 /* AccessTokenPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AccessTokenPlugin.swift; path = Sources/Moya/Plugins/AccessTokenPlugin.swift; sourceTree = ""; }; - 502339D5742C7BA688BB1A497F95BEC5 /* AsyncSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncSubject.swift; path = RxSwift/Subjects/AsyncSubject.swift; sourceTree = ""; }; - 5082A01A63EDB416806666A348ACA27D /* NetworkLoggerPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkLoggerPlugin.swift; path = Sources/Moya/Plugins/NetworkLoggerPlugin.swift; sourceTree = ""; }; - 52100DB4932C37B36D4271C1081B8757 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; - 52F012528B1DA886C4BDB36128B97C76 /* DistinctUntilChanged.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DistinctUntilChanged.swift; path = RxSwift/Observables/Implementations/DistinctUntilChanged.swift; sourceTree = ""; }; - 54F976946568B16991B730DAFD3EB62D /* TransformOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TransformOf.swift; path = Sources/TransformOf.swift; sourceTree = ""; }; - 5587578262EF141FF7FFB804C806B1B3 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 55CA01AC98F81BD0B27C0C1575896CA4 /* Dematerialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Dematerialize.swift; path = RxSwift/Observables/Implementations/Dematerialize.swift; sourceTree = ""; }; - 564A31F989B5B94D2BEB0F13DAC9D57F /* VirtualTimeConverterType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeConverterType.swift; path = RxSwift/Schedulers/VirtualTimeConverterType.swift; sourceTree = ""; }; - 58145952B5E58F93AC0CAB35D8BB06DA /* ResultProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResultProtocol.swift; path = Result/ResultProtocol.swift; sourceTree = ""; }; - 592569BB42AC6BF00E98C5030082CFF8 /* Materialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Materialize.swift; path = RxSwift/Observables/Implementations/Materialize.swift; sourceTree = ""; }; - 59B2D0EFAEB42BCFB6C7772769D223CF /* ScheduledDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledDisposable.swift; path = RxSwift/Disposables/ScheduledDisposable.swift; sourceTree = ""; }; - 5AC4B3AC33F1BE2EF940BF538BD6050E /* ObservableConvertibleType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableConvertibleType.swift; path = RxSwift/ObservableConvertibleType.swift; sourceTree = ""; }; - 5AE198DAE49954737161561B5F468CC3 /* InvocableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableType.swift; path = RxSwift/Schedulers/Internal/InvocableType.swift; sourceTree = ""; }; - 5BB3D0D57DDA732EEB38F6E1A785D162 /* VirtualTimeScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeScheduler.swift; path = RxSwift/Schedulers/VirtualTimeScheduler.swift; sourceTree = ""; }; - 5CA1E89C5CC4EA175A5C058CF7D40DB1 /* Scan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scan.swift; path = RxSwift/Observables/Implementations/Scan.swift; sourceTree = ""; }; - 5D0E0A3427495AAF9A15E58B41A3FFB5 /* ShareReplay1WhileConnected.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareReplay1WhileConnected.swift; path = RxSwift/Observables/Implementations/ShareReplay1WhileConnected.swift; sourceTree = ""; }; - 5FE6670A1C419E6BED4E0E0CBD737204 /* ImmediateSchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmediateSchedulerType.swift; path = RxSwift/ImmediateSchedulerType.swift; sourceTree = ""; }; - 61066E488C46D5D7C153F9ADA1703331 /* Zip+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+Collection.swift"; path = "RxSwift/Observables/Implementations/Zip+Collection.swift"; sourceTree = ""; }; - 611EA54DFF3BAAACF801CA2E629651F1 /* DispatchQueue+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Extensions.swift"; path = "Platform/DispatchQueue+Extensions.swift"; sourceTree = ""; }; - 61B294CF34CCB9E73CCC0847489DDFC2 /* Map.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Map.swift; path = RxSwift/Observables/Implementations/Map.swift; sourceTree = ""; }; + 42090A07F20122A0BC3455BFA86F79A1 /* ValidatingProperty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ValidatingProperty.swift; path = Sources/ValidatingProperty.swift; sourceTree = ""; }; + 42D894EA6C6A47B6CFDE3704A55204D7 /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; + 4365A2AB5A0772687317C91D2948110A /* Property.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Property.swift; path = Sources/Property.swift; sourceTree = ""; }; + 4472D43DC36B93B0AD3D2324A022BD31 /* PrimitiveSequence+Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "PrimitiveSequence+Zip+arity.swift"; path = "RxSwift/Traits/PrimitiveSequence+Zip+arity.swift"; sourceTree = ""; }; + 450BB2F541C923DB26C66811CB4E93F5 /* TakeWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeWhile.swift; path = RxSwift/Observables/Implementations/TakeWhile.swift; sourceTree = ""; }; + 45839231A4901B0E5436EF73077831F0 /* Mapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Mapper.swift; path = Sources/Mapper.swift; sourceTree = ""; }; + 4802F5EB9C4C88F88895D0E79CACB366 /* PublishSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PublishSubject.swift; path = RxSwift/Subjects/PublishSubject.swift; sourceTree = ""; }; + 48E9530C6F3DCB9C366850CA3F47B7B7 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Sources/Moya/MultipartFormData.swift; sourceTree = ""; }; + 4A9E3FB60CB4A7D2085DAC4A5306B692 /* Observable+Single.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Single.swift"; path = "RxSwift/Observables/Observable+Single.swift"; sourceTree = ""; }; + 4AD834CFBDD48550EDAF21F31D167032 /* SessionManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionManager.swift; path = Source/SessionManager.swift; sourceTree = ""; }; + 4CA2A7E6BBAE7EF0D66E481D28618C44 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; + 4D0593D7232D6CD71C5F0AF9668BF14D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 4F56CB1AD0A49EC42E54D6467761239E /* ResultProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResultProtocol.swift; path = Result/ResultProtocol.swift; sourceTree = ""; }; + 4F74CF47C5DE7C590136CD81F9005DAE /* TransformOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TransformOf.swift; path = Sources/TransformOf.swift; sourceTree = ""; }; + 4F9CA1CA661AEDAD5A2067C8BDB787FC /* Map.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Map.swift; path = RxSwift/Observables/Implementations/Map.swift; sourceTree = ""; }; + 4FA8811DC202DD7DDD832600E9FA64F1 /* Event.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Event.swift; path = Sources/Event.swift; sourceTree = ""; }; + 512139ACC7B2979F80FAC982F0DEA36D /* DefaultIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DefaultIfEmpty.swift; path = RxSwift/Observables/Implementations/DefaultIfEmpty.swift; sourceTree = ""; }; + 533E4698572969FE535C01639240BD95 /* Queue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Queue.swift; path = Platform/DataStructures/Queue.swift; sourceTree = ""; }; + 5344FF2D05FA74EC89EA389975D24554 /* Never.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Never.swift; path = RxSwift/Observables/Implementations/Never.swift; sourceTree = ""; }; + 541F38739DEE9642687281F0AB4AFDAD /* ObserveOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserveOn.swift; path = RxSwift/Observables/Implementations/ObserveOn.swift; sourceTree = ""; }; + 547E11C8EAF852818A6A4D608CE328A3 /* SerialDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDisposable.swift; path = RxSwift/Disposables/SerialDisposable.swift; sourceTree = ""; }; + 55F91E7D6B0D44079FA709F9FA6A475B /* NetworkActivityPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkActivityPlugin.swift; path = Sources/Moya/Plugins/NetworkActivityPlugin.swift; sourceTree = ""; }; + 5738BAEBE9590332CEC15173EF2E68E7 /* ReactiveSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = ReactiveSwift.modulemap; sourceTree = ""; }; + 57A565AA1BD6CD7E0C542B05BE4C9637 /* RxMutableBox.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxMutableBox.swift; path = RxSwift/RxMutableBox.swift; sourceTree = ""; }; + 57C654F7468F90C4C3D24FED3C7F0D3E /* Just.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Just.swift; path = RxSwift/Observables/Implementations/Just.swift; sourceTree = ""; }; + 5920B5993039870B306EC532F225E154 /* DictionaryTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DictionaryTransform.swift; path = Sources/DictionaryTransform.swift; sourceTree = ""; }; + 5969ECA4583F5C37DC5FBA6ACAA544EA /* ObserverBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverBase.swift; path = RxSwift/Observers/ObserverBase.swift; sourceTree = ""; }; + 597A28C19BCCC57C5FFF4BF262CCAAF4 /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; + 5CB47DCB44972D5E0559F3BDACFD6BC7 /* ObjectMapper.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = ObjectMapper.modulemap; sourceTree = ""; }; + 5EE38E7FB91AA4AF88DBB6A67269E261 /* AnyObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyObserver.swift; path = RxSwift/AnyObserver.swift; sourceTree = ""; }; + 60B30C90645517428578CA8F97388B23 /* DataTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DataTransform.swift; path = Sources/DataTransform.swift; sourceTree = ""; }; + 61E8E292AC6AFF21D423EDF3ED36D010 /* MoyaError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaError.swift; path = Sources/Moya/MoyaError.swift; sourceTree = ""; }; 62384D07F2721B9F6F37280C5563A146 /* Moya-ObjectMapper-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-ObjectMapper-umbrella.h"; sourceTree = ""; }; - 6338FDB14507B24CB58218F277F30E43 /* SynchronizedDisposeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedDisposeType.swift; path = RxSwift/Concurrency/SynchronizedDisposeType.swift; sourceTree = ""; }; - 641CC99CF2A41BA53EBC44529FC9D698 /* Result.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Result.xcconfig; sourceTree = ""; }; - 64F6F3D67DCBBFD9C51417546F1841A6 /* Moya.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Moya.framework; path = Moya.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 6500AB1E0A7CF345A6A5AD93C22AB881 /* DisposeBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBase.swift; path = RxSwift/Disposables/DisposeBase.swift; sourceTree = ""; }; - 661CDC5032D166FBA5CE458E1BF640DE /* Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+arity.swift"; path = "RxSwift/Observables/Implementations/Zip+arity.swift"; sourceTree = ""; }; - 6767DF0ABD392382DFED5C7A6D3B65FD /* Cancellable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancellable.swift; path = Sources/Moya/Cancellable.swift; sourceTree = ""; }; - 682A7454DD4DE301517D214700298097 /* RecursiveLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveLock.swift; path = Platform/RecursiveLock.swift; sourceTree = ""; }; - 6894072FB2F0D6A33A3E4E3BA5CCEC9D /* Observable+Time.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Time.swift"; path = "RxSwift/Observables/Observable+Time.swift"; sourceTree = ""; }; - 68F2BB306D2162504F49E65135E9E9A0 /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; - 68F6717A6A6E815E92790C222C822568 /* Mappable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Mappable.swift; path = Sources/Mappable.swift; sourceTree = ""; }; - 69E2BB057A552EBAB05D658195965BA7 /* Queue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Queue.swift; path = Platform/DataStructures/Queue.swift; sourceTree = ""; }; - 6B9002B8A582F4D8A4C711D2D9521573 /* MoyaProvider+Defaults.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Defaults.swift"; path = "Sources/Moya/MoyaProvider+Defaults.swift"; sourceTree = ""; }; - 6C1C2F93115B3366C7A6769B1DA2D4C4 /* TransformType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TransformType.swift; path = Sources/TransformType.swift; sourceTree = ""; }; - 6CEA079621EDB8D262AA7E27EFF723D1 /* SchedulerServices+Emulation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "SchedulerServices+Emulation.swift"; path = "RxSwift/Schedulers/SchedulerServices+Emulation.swift"; sourceTree = ""; }; - 6D58D1C70EE521D2DD0DEE04B52C65F5 /* InvocableScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableScheduledItem.swift; path = RxSwift/Schedulers/Internal/InvocableScheduledItem.swift; sourceTree = ""; }; - 70AF4B49B39C3CFD638D93B2BE35164E /* FromJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FromJSON.swift; path = Sources/FromJSON.swift; sourceTree = ""; }; - 70D7C4235D797F08CA934E2D7FCF1EF3 /* MainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MainScheduler.swift; path = RxSwift/Schedulers/MainScheduler.swift; sourceTree = ""; }; - 712A10695F5EFC41FC3420F2341BEBAF /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = RxSwift.framework; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 6388C76E87715C20A6CC8DE03465171B /* RxSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxSwift-dummy.m"; sourceTree = ""; }; + 64980335396398C7FBAB1BA3E239DF56 /* DateFormatterTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DateFormatterTransform.swift; path = Sources/DateFormatterTransform.swift; sourceTree = ""; }; + 64C3B69219C8DAC02F5F39DD4B190606 /* AnonymousInvocable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousInvocable.swift; path = RxSwift/Schedulers/Internal/AnonymousInvocable.swift; sourceTree = ""; }; + 65EF88911B1EF37A8A6E08A5847C5CF0 /* Map.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Map.swift; path = Sources/Map.swift; sourceTree = ""; }; + 6705998374BDFFB7FECAF1532B835BE1 /* Atomic.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Atomic.swift; path = Sources/Atomic.swift; sourceTree = ""; }; + 678D1077D40DA503F57304A63179B726 /* RetryWhen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RetryWhen.swift; path = RxSwift/Observables/Implementations/RetryWhen.swift; sourceTree = ""; }; + 6804E8E2F017493A8ECEDBBCF0527D6F /* SkipWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipWhile.swift; path = RxSwift/Observables/Implementations/SkipWhile.swift; sourceTree = ""; }; + 688D59A630A170299AE908873175B206 /* AsyncSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncSubject.swift; path = RxSwift/Subjects/AsyncSubject.swift; sourceTree = ""; }; + 694E66730BC717CAADA8FA907A1A5D67 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6A02D79B87B95AAC12858D2761EFA288 /* Result-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Result-dummy.m"; sourceTree = ""; }; + 6B1F9906C460EF3154ED146983F06918 /* RefCountDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RefCountDisposable.swift; path = RxSwift/Disposables/RefCountDisposable.swift; sourceTree = ""; }; + 6E72FDC1493E8F5625DF4379C9BA5C01 /* InvocableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableType.swift; path = RxSwift/Schedulers/Internal/InvocableType.swift; sourceTree = ""; }; + 6F3FB9AB8D8CB0B217990A29076233B1 /* SingleAsync.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAsync.swift; path = RxSwift/Observables/Implementations/SingleAsync.swift; sourceTree = ""; }; + 70B98B88A29190DF1D9046B75313A6F5 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; + 7134E6FE5CB1D5BBC04158D17EF07982 /* ReactiveSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ReactiveSwift-dummy.m"; sourceTree = ""; }; 71940C1CEB7995DC34CFE54CAF1AEF88 /* Pods-Demo-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Demo-acknowledgements.markdown"; sourceTree = ""; }; - 71AC373F6AF7475D9D69EADEAA3AD722 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 74E1D911F9F5881749CDA2F365FFFAC6 /* Moya_ObjectMapper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Moya_ObjectMapper.framework; path = "Moya-ObjectMapper.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 71A192DA8427E760595C241A5AFFDF72 /* ObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableType.swift; path = RxSwift/ObservableType.swift; sourceTree = ""; }; + 721E0361F5BD3060CD61E41333AC4C8D /* Scan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scan.swift; path = RxSwift/Observables/Implementations/Scan.swift; sourceTree = ""; }; + 7355FD9C656F3B499FFED26503A24844 /* LockOwnerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LockOwnerType.swift; path = RxSwift/Concurrency/LockOwnerType.swift; sourceTree = ""; }; + 742EC56A479A268680F0A5C9DF61FB5B /* Lock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Lock.swift; path = RxSwift/Concurrency/Lock.swift; sourceTree = ""; }; + 7479AA1AE7EBE9F210DF7C06D08FA79E /* SchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SchedulerType.swift; path = RxSwift/SchedulerType.swift; sourceTree = ""; }; + 75AAB49A85742D83E67B38D30B60B1D3 /* Optional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Optional.swift; path = Sources/Optional.swift; sourceTree = ""; }; + 76432EFF66F0610C1FA74F991477EBE0 /* Range.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Range.swift; path = RxSwift/Observables/Implementations/Range.swift; sourceTree = ""; }; 7697FC2B90D6509A8AC3659265DC0FB7 /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 76EBBC41CE9B11EAD62E0BCF95E85227 /* FromJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FromJSON.swift; path = Sources/FromJSON.swift; sourceTree = ""; }; 78A4128EC1CBD80E45085664E5D7CF4B /* Moya-ObjectMapper.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Moya-ObjectMapper.xcconfig"; sourceTree = ""; }; - 78DC3A82104E37427CE082CB98D90BE7 /* IntegerOperators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = IntegerOperators.swift; path = Sources/IntegerOperators.swift; sourceTree = ""; }; - 794C5EE8CE9FA84905607AA9C2F29BCD /* AnonymousInvocable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousInvocable.swift; path = RxSwift/Schedulers/Internal/AnonymousInvocable.swift; sourceTree = ""; }; - 799D3B4718D965111427486583BFCB4C /* Take.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Take.swift; path = RxSwift/Observables/Implementations/Take.swift; sourceTree = ""; }; - 7A486F8B23ABA0F788D6C2127EFE2FBF /* Variable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Variable.swift; path = RxSwift/Subjects/Variable.swift; sourceTree = ""; }; - 7A8817E52F0914C81EBCADAF93798AA6 /* Reactive.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reactive.swift; path = RxSwift/Reactive.swift; sourceTree = ""; }; - 7AC412D307F23E01E9F08B6D676CD74B /* SerialDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDispatchQueueScheduler.swift; path = RxSwift/Schedulers/SerialDispatchQueueScheduler.swift; sourceTree = ""; }; - 7B291595EEF8D58E953103A5BA5509F4 /* Bag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bag.swift; path = Platform/DataStructures/Bag.swift; sourceTree = ""; }; - 7BA3BEEAEEC210EC8CF52DC782F44A81 /* Result.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Result.framework; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 7CA1F613F7A280DFD7B4A97EEA76DED0 /* Just.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Just.swift; path = RxSwift/Observables/Implementations/Just.swift; sourceTree = ""; }; - 7D1AD8C28FFC037A4AC35BB236EB481A /* Observable+Creation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Creation.swift"; path = "RxSwift/Observables/Observable+Creation.swift"; sourceTree = ""; }; - 7DB481A1358C0BE35B508787868D54FD /* SingleAssignmentDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAssignmentDisposable.swift; path = RxSwift/Disposables/SingleAssignmentDisposable.swift; sourceTree = ""; }; - 7E189ED6C9E024DF8E682C7E687F90A5 /* ToJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToJSON.swift; path = Sources/ToJSON.swift; sourceTree = ""; }; - 7E415D9D86E08EFA2341F11C9B275535 /* Sample.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sample.swift; path = RxSwift/Observables/Implementations/Sample.swift; sourceTree = ""; }; - 808549CAB48179824CE535700672D8FB /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; - 80E161B2311D9D7929D6B7F9882E9AA6 /* TailRecursiveSink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TailRecursiveSink.swift; path = RxSwift/Observers/TailRecursiveSink.swift; sourceTree = ""; }; - 8169FFFAF07FE2B47116D2E16CAF804F /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; - 8279331EFB9537F40D63DCB795CFF054 /* Plugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Plugin.swift; path = Sources/Moya/Plugin.swift; sourceTree = ""; }; - 8337E7F6FC7B272D06D41B55C51578C2 /* RxMoyaProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxMoyaProvider.swift; path = Sources/RxMoya/RxMoyaProvider.swift; sourceTree = ""; }; - 835A4CCC1208A301A94815286B0DE285 /* Moya.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Moya.xcconfig; sourceTree = ""; }; - 847EB8278900D5C808A1AE095CCFB16E /* Empty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Empty.swift; path = RxSwift/Observables/Implementations/Empty.swift; sourceTree = ""; }; - 84E12E978DD62B2B314912C8B3D9B2D8 /* SubscribeOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscribeOn.swift; path = RxSwift/Observables/Implementations/SubscribeOn.swift; sourceTree = ""; }; - 854373776ABAABE1B1CDF9564C043B69 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 78ED1ABA505DCC8516D0016B7499D512 /* Buffer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Buffer.swift; path = RxSwift/Observables/Implementations/Buffer.swift; sourceTree = ""; }; + 79433C83DBA7AF7AAF0E9931F79CDEFE /* Moya-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Moya-dummy.m"; sourceTree = ""; }; + 7AAB9F6E60E4EF7EC35044ABA59EE4A3 /* SynchronizedUnsubscribeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedUnsubscribeType.swift; path = RxSwift/Concurrency/SynchronizedUnsubscribeType.swift; sourceTree = ""; }; + 7B7651A3BECCAA054599F73243B3CB7F /* Producer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Producer.swift; path = RxSwift/Observables/Implementations/Producer.swift; sourceTree = ""; }; + 7C59839F18FF5FBE60CAFFB8EC168EBD /* Amb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Amb.swift; path = RxSwift/Observables/Implementations/Amb.swift; sourceTree = ""; }; + 7D27ED3A89AA80187EF62E0412529A5C /* MainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MainScheduler.swift; path = RxSwift/Schedulers/MainScheduler.swift; sourceTree = ""; }; + 7D6E1BBEE6A3830A885E6B9927A75142 /* IntegerOperators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = IntegerOperators.swift; path = Sources/IntegerOperators.swift; sourceTree = ""; }; + 7DAA23E8CA642C818313760DEE872D76 /* Moya+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Moya+Alamofire.swift"; path = "Sources/Moya/Moya+Alamofire.swift"; sourceTree = ""; }; + 82FDCC01E20E2C5AAE034A49D1ED5163 /* Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+arity.swift"; path = "RxSwift/Observables/Implementations/Zip+arity.swift"; sourceTree = ""; }; + 83002D71F6C2A538E2978182ADCAFFE8 /* Cancelable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancelable.swift; path = RxSwift/Cancelable.swift; sourceTree = ""; }; + 8334CB787F208F16FF132C8023FD6F9C /* SynchronizedDisposeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedDisposeType.swift; path = RxSwift/Concurrency/SynchronizedDisposeType.swift; sourceTree = ""; }; + 84D4210F88F6EF7B49E63115D1E62FB0 /* SubscribeOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscribeOn.swift; path = RxSwift/Observables/Implementations/SubscribeOn.swift; sourceTree = ""; }; + 84E72054705675D860541F5F6B329ACA /* Disposables.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposables.swift; path = RxSwift/Disposables/Disposables.swift; sourceTree = ""; }; + 852276A83C97D7B483AAD3516806EF85 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; 86088A74332B80EF5B44E52CABB7BD0E /* Moya-ObjectMapper-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-ObjectMapper-prefix.pch"; sourceTree = ""; }; - 8736CD3D4ED9BD6CA17CC10D2B8D8D61 /* Deferred.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deferred.swift; path = RxSwift/Observables/Implementations/Deferred.swift; sourceTree = ""; }; - 87449C32758CB4EB291D70EAB447C28A /* Never.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Never.swift; path = RxSwift/Observables/Implementations/Never.swift; sourceTree = ""; }; - 88C2777E2FA59660406E11B082DC22E5 /* Platform.Darwin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Darwin.swift; path = Platform/Platform.Darwin.swift; sourceTree = ""; }; - 8A5DFB0C2D16E6F31B15E6A5B14EE4CD /* Concat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Concat.swift; path = RxSwift/Observables/Implementations/Concat.swift; sourceTree = ""; }; - 8B361E3D5A3B5EFF4725B51EE38F6EC9 /* Debug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debug.swift; path = RxSwift/Observables/Implementations/Debug.swift; sourceTree = ""; }; - 8BCABCFAB741BF1ABFE39EA911E4D8BF /* ElementAt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ElementAt.swift; path = RxSwift/Observables/Implementations/ElementAt.swift; sourceTree = ""; }; - 8DBA09CBFAEC4A3683226AA1BBEF7BD9 /* Cancelable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancelable.swift; path = RxSwift/Cancelable.swift; sourceTree = ""; }; - 8DD4D5CFDBC23B94526F5361B3BDE4C9 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; - 8DF44F38795767C548C872478129378A /* NetworkActivityPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkActivityPlugin.swift; path = Sources/Moya/Plugins/NetworkActivityPlugin.swift; sourceTree = ""; }; - 8E1C096CA1F50B1C1FC34F1960375EF5 /* AsMaybe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsMaybe.swift; path = RxSwift/Observables/Implementations/AsMaybe.swift; sourceTree = ""; }; - 8E8ADC41BB02F6D7BA9320AF22D0EF54 /* Producer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Producer.swift; path = RxSwift/Observables/Implementations/Producer.swift; sourceTree = ""; }; + 863C51FEA45A7EDE989AC2754CDD717C /* Reactive.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reactive.swift; path = RxSwift/Reactive.swift; sourceTree = ""; }; + 875489DE5BF92D2F4B1BBFCAC174EF6C /* Debounce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debounce.swift; path = RxSwift/Observables/Implementations/Debounce.swift; sourceTree = ""; }; + 89273F92A2616EA7FA505C493114118A /* Multicast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multicast.swift; path = RxSwift/Observables/Implementations/Multicast.swift; sourceTree = ""; }; + 89394607B9FE5C06608B8A97BC48ED42 /* Pods_Demo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Demo.framework; path = "Pods-Demo.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 8A4E045A2FEAE35414C860EE69E7BF86 /* Mappable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Mappable.swift; path = Sources/Mappable.swift; sourceTree = ""; }; + 8B706DBD4A5763AC4E4A8BD768FE1B57 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 8C6FC130D59DFCF7457E87174231D525 /* TakeLast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeLast.swift; path = RxSwift/Observables/Implementations/TakeLast.swift; sourceTree = ""; }; + 8EE4E3C424252CF8A16D59C05C3B8873 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8F03D4318F25F0CEB39500AE4E751CAD /* Response+ObjectMapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Response+ObjectMapper.swift"; sourceTree = ""; }; - 8F08A5CC14A1BDFDB69684234BAC72F9 /* NSDecimalNumberTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NSDecimalNumberTransform.swift; path = Sources/NSDecimalNumberTransform.swift; sourceTree = ""; }; - 8FB0C4FAB2B8F4FE51F36EBB2F457DB8 /* CombineLatest+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+Collection.swift"; path = "RxSwift/Observables/Implementations/CombineLatest+Collection.swift"; sourceTree = ""; }; - 9000B74DF9AC745B40676911D58B7EC3 /* AnonymousDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousDisposable.swift; path = RxSwift/Disposables/AnonymousDisposable.swift; sourceTree = ""; }; - 9032064867F0EDF8BE9DBBA169EBCEB9 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; - 916F25D4C8837908950EA7A5583E6967 /* TakeLast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeLast.swift; path = RxSwift/Observables/Implementations/TakeLast.swift; sourceTree = ""; }; - 926D74E3F48CE52F7E2F31ECE8E94481 /* Result.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Result.modulemap; sourceTree = ""; }; - 92D1E08504CA891FF79253A362861CD4 /* Window.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Window.swift; path = RxSwift/Observables/Implementations/Window.swift; sourceTree = ""; }; + 8FED2C3C7E03453020D34A902D0A17AD /* Skip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Skip.swift; path = RxSwift/Observables/Implementations/Skip.swift; sourceTree = ""; }; + 903F6654FD1FDACF86081CEF68EE96BB /* SignalProducer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SignalProducer.swift; path = Sources/SignalProducer.swift; sourceTree = ""; }; + 9169B63F6003C0F243F0388BF5958FF7 /* Lifetime.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Lifetime.swift; path = Sources/Lifetime.swift; sourceTree = ""; }; + 9237F94E8BAA36CA82EFBF39F965662F /* DisposeBag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBag.swift; path = RxSwift/Disposables/DisposeBag.swift; sourceTree = ""; }; + 935C00337EC7391ACE992E18BB6528EC /* SwitchIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwitchIfEmpty.swift; path = RxSwift/Observables/Implementations/SwitchIfEmpty.swift; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 941085FB48E505ED52FF2DFD9B570A8C /* Result.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 97EBBD1A8250EFB9CC900440EAF658DA /* URLTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = URLTransform.swift; path = Sources/URLTransform.swift; sourceTree = ""; }; - 997F32138543863AC0F210BFA00BB640 /* Timeout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeout.swift; path = RxSwift/Observables/Implementations/Timeout.swift; sourceTree = ""; }; - 99D1CB2D021B25A05AE5B9642315716B /* Map.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Map.swift; path = Sources/Map.swift; sourceTree = ""; }; - 99D3CFACEF6CAE7D2E610B6A1F54D237 /* AnonymousObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousObservable.swift; path = RxSwift/Observables/Implementations/AnonymousObservable.swift; sourceTree = ""; }; - 9A70F83A8FC06F68A6DCAFCB1C1931A2 /* ImmutableMappable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmutableMappable.swift; path = Sources/ImmutableMappable.swift; sourceTree = ""; }; - 9B2127E2F8A3390CDE0D6D747F686A7D /* ScheduledItemType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItemType.swift; path = RxSwift/Schedulers/Internal/ScheduledItemType.swift; sourceTree = ""; }; - 9C825CD9097CE3E3E6F98AE38F5180C2 /* ScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItem.swift; path = RxSwift/Schedulers/Internal/ScheduledItem.swift; sourceTree = ""; }; - 9D2833E1FEABBB28F556F914337C45CC /* MoyaProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaProvider.swift; path = Sources/Moya/MoyaProvider.swift; sourceTree = ""; }; - 9EDCEA32FD1274388C071D684E597EF3 /* Moya+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Moya+Alamofire.swift"; path = "Sources/Moya/Moya+Alamofire.swift"; sourceTree = ""; }; - 9FBD99DE8937641F1E517BC8A86E9232 /* BooleanDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BooleanDisposable.swift; path = RxSwift/Disposables/BooleanDisposable.swift; sourceTree = ""; }; - A2BEC8D54E3FAE26C9B12F3D03E14FE7 /* ObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableType.swift; path = RxSwift/ObservableType.swift; sourceTree = ""; }; - A45E07FFEB7005B188DB68E1515ACDFF /* Lock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Lock.swift; path = RxSwift/Concurrency/Lock.swift; sourceTree = ""; }; - A475A7C0B8D84613688AB8C8ACB5884C /* StartWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StartWith.swift; path = RxSwift/Observables/Implementations/StartWith.swift; sourceTree = ""; }; - A5D3EFB1DE6C0E52AE06057EA3F85A3C /* Event.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Event.swift; path = RxSwift/Event.swift; sourceTree = ""; }; - A6FA79F4F3EE613CEF674C035100A81A /* ISO8601DateTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ISO8601DateTransform.swift; path = Sources/ISO8601DateTransform.swift; sourceTree = ""; }; - A75A681A3F4A36FEB952747AC623CE57 /* Observable+Concurrency.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Concurrency.swift"; path = "RxSwift/Observables/Observable+Concurrency.swift"; sourceTree = ""; }; - A779A975FD6FDA53C702EB73FA73A276 /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = RxSwift/Observables/Implementations/Error.swift; sourceTree = ""; }; - A78E95B91181E96CFAAD9426F8ECB2B7 /* Switch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Switch.swift; path = RxSwift/Observables/Implementations/Switch.swift; sourceTree = ""; }; - A92F976C1DD7037D84C08744E8899197 /* ObjectMapper.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = ObjectMapper.modulemap; sourceTree = ""; }; - A9AE2FF3B2C85504AD6B7F9063273BD5 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Sources/Moya/MultipartFormData.swift; sourceTree = ""; }; - AA6C27F646D9DA37047A67D6E212DE01 /* SwitchIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwitchIfEmpty.swift; path = RxSwift/Observables/Implementations/SwitchIfEmpty.swift; sourceTree = ""; }; - AB0AC6ABAAAA34D3E9D492E60583EE3E /* ObserveOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserveOn.swift; path = RxSwift/Observables/Implementations/ObserveOn.swift; sourceTree = ""; }; - AB56CBFC832EF68A141F312792AD4AF6 /* SessionManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionManager.swift; path = Source/SessionManager.swift; sourceTree = ""; }; - ABA6FE9DD99C7C9AAEE80E80D8625F3B /* OperationQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OperationQueueScheduler.swift; path = RxSwift/Schedulers/OperationQueueScheduler.swift; sourceTree = ""; }; - ABD5DBFF68FB3E2C7D5C68F22D2149DA /* CompositeDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompositeDisposable.swift; path = RxSwift/Disposables/CompositeDisposable.swift; sourceTree = ""; }; - ABE5EB4CE9918D54049AE761A8781B65 /* Observable+Multiple.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Multiple.swift"; path = "RxSwift/Observables/Observable+Multiple.swift"; sourceTree = ""; }; - ACAEF6EE76CA30FA9A3B39D1EF1C6DC4 /* GroupedObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupedObservable.swift; path = RxSwift/GroupedObservable.swift; sourceTree = ""; }; - AD06127D1DB37FB9C69025C819693BA5 /* AsyncLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncLock.swift; path = RxSwift/Concurrency/AsyncLock.swift; sourceTree = ""; }; - AD18F80559D118BE5911247C1F7EA041 /* HexColorTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HexColorTransform.swift; path = Sources/HexColorTransform.swift; sourceTree = ""; }; - ADD3569CBCE17ACD2EBC6E61B942BAC7 /* Buffer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Buffer.swift; path = RxSwift/Observables/Implementations/Buffer.swift; sourceTree = ""; }; - AE5C9E18F719DCD67A08AD48AC839955 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = RxSwift/Observables/Implementations/Filter.swift; sourceTree = ""; }; - AE9125CA72BF199A20DBD4B9558D4CF3 /* Observable+Debug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Debug.swift"; path = "RxSwift/Observables/Observable+Debug.swift"; sourceTree = ""; }; - AFA910E4D8FDCAF115C39C34BB7DFB8A /* RxSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxSwift-dummy.m"; sourceTree = ""; }; - B01F093B9DC7BDE27E632935D789B142 /* Using.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Using.swift; path = RxSwift/Observables/Implementations/Using.swift; sourceTree = ""; }; - B036D274E4D5AD086140240208840000 /* String+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Rx.swift"; path = "RxSwift/Extensions/String+Rx.swift"; sourceTree = ""; }; - B18B75426512AAA18D540F3D35CBAA65 /* DictionaryTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DictionaryTransform.swift; path = Sources/DictionaryTransform.swift; sourceTree = ""; }; - B1E8265196A3B631CE5537AB9DF3EABE /* EnumTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EnumTransform.swift; path = Sources/EnumTransform.swift; sourceTree = ""; }; - B20A8FAAF282D8676964013F2760CA6D /* Skip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Skip.swift; path = RxSwift/Observables/Implementations/Skip.swift; sourceTree = ""; }; - B440337621937614976B1C2C58BE33BB /* RetryWhen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RetryWhen.swift; path = RxSwift/Observables/Implementations/RetryWhen.swift; sourceTree = ""; }; - B68F992C4947F969BFD6675E16DE2F94 /* RxSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxSwift.xcconfig; sourceTree = ""; }; - B6C05F26232F3BEE8B05B095A35F632A /* BinaryDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryDisposable.swift; path = RxSwift/Disposables/BinaryDisposable.swift; sourceTree = ""; }; - B74105286857325F78F5FD3B89A006FC /* RecursiveScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveScheduler.swift; path = RxSwift/Schedulers/RecursiveScheduler.swift; sourceTree = ""; }; + 9427D33D9A21060CC4CC8E4507E7CFAD /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Result/Result.swift; sourceTree = ""; }; + 95093E2F9D63EA61DB4DAE904E414937 /* Switch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Switch.swift; path = RxSwift/Observables/Implementations/Switch.swift; sourceTree = ""; }; + 96C1E5A0EFA527E1432BBE96CDB023DA /* NopDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NopDisposable.swift; path = RxSwift/Disposables/NopDisposable.swift; sourceTree = ""; }; + 9801943BE07AE064B47351ADFD881292 /* BinaryDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryDisposable.swift; path = RxSwift/Disposables/BinaryDisposable.swift; sourceTree = ""; }; + 98A388B968E9204926C346DCDF6062B0 /* Sample.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sample.swift; path = RxSwift/Observables/Implementations/Sample.swift; sourceTree = ""; }; + 99FE737E0F857E5191A1E4F1C1D81AC3 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; + 9AF2389D69944D193711EBCE256D550F /* ObserverType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverType.swift; path = RxSwift/ObserverType.swift; sourceTree = ""; }; + 9B00B9BA2EE7FD9C4875DE894CC6A0F3 /* DispatchQueue+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Extensions.swift"; path = "Platform/DispatchQueue+Extensions.swift"; sourceTree = ""; }; + 9B4D6B8F41F79C94313C986AA2C95518 /* ImmediateScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmediateScheduler.swift; path = RxSwift/Schedulers/ImmediateScheduler.swift; sourceTree = ""; }; + 9C4B16E320E5D74A88118C831CBBD69C /* Materialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Materialize.swift; path = RxSwift/Observables/Implementations/Materialize.swift; sourceTree = ""; }; + 9E382DB6FDB65DE94BABDD2844DAF6ED /* Event.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Event.swift; path = RxSwift/Event.swift; sourceTree = ""; }; + 9E6D5912B420A7B69CCF77E5A9BF85AF /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = RxSwift/Errors.swift; sourceTree = ""; }; + 9EA5E26F527616CA14BA1AD883FEA452 /* Result.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Result.framework; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A0EC4E2078B430FE9F8672536722200A /* Zip+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+Collection.swift"; path = "RxSwift/Observables/Implementations/Zip+Collection.swift"; sourceTree = ""; }; + A0ED537BF046646C2C53B5881878C455 /* Platform.Darwin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Darwin.swift; path = Platform/Platform.Darwin.swift; sourceTree = ""; }; + A1E2F6D667244D405AA74248C94355AA /* DelaySubscription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DelaySubscription.swift; path = RxSwift/Observables/Implementations/DelaySubscription.swift; sourceTree = ""; }; + A241B2831F3DA9FCBD98DDB4EC3E0B1C /* Observable+Time.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Time.swift"; path = "RxSwift/Observables/Observable+Time.swift"; sourceTree = ""; }; + A7ED7D46DDE3DB9F34D961D4247C9E58 /* Delay.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Delay.swift; path = RxSwift/Observables/Implementations/Delay.swift; sourceTree = ""; }; + AC1CC8FE7C1707568F3CF44D87403355 /* Observable+Multiple.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Multiple.swift"; path = "RxSwift/Observables/Observable+Multiple.swift"; sourceTree = ""; }; + AC300EB7F7FA139928F6FFEEB3296AD1 /* Catch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catch.swift; path = RxSwift/Observables/Implementations/Catch.swift; sourceTree = ""; }; + AD92FA237FCFC2D9C81216D0EBACCAAF /* PriorityQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PriorityQueue.swift; path = Platform/DataStructures/PriorityQueue.swift; sourceTree = ""; }; + AD9B0A6DC72985BDA4754EA5E5CB07AA /* AnonymousObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousObservable.swift; path = RxSwift/Observables/Implementations/AnonymousObservable.swift; sourceTree = ""; }; + ADC3881DD934E863CFEA3B949E0D18C9 /* ToArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToArray.swift; path = RxSwift/Observables/Implementations/ToArray.swift; sourceTree = ""; }; + ADE5FB20FE5428FAA73D3437465495EC /* Repeat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Repeat.swift; path = RxSwift/Observables/Implementations/Repeat.swift; sourceTree = ""; }; + AE5D5AF2A28AC7AC8AA786C64A8B0D5D /* ObjectMapper-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ObjectMapper-umbrella.h"; sourceTree = ""; }; + AF523A051E4C232B87A58BFDCF30CA5B /* SkipUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipUntil.swift; path = RxSwift/Observables/Implementations/SkipUntil.swift; sourceTree = ""; }; + AF615E8CA506C163CA765AA9770F3AA1 /* Image.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Image.swift; path = Sources/Moya/Image.swift; sourceTree = ""; }; + B16391692DB4F8314C30BC547232672C /* ConcurrentDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentDispatchQueueScheduler.swift; path = RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift; sourceTree = ""; }; + B18971046EE71972C2987A1B44C687D6 /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = RxSwift/Observables/Implementations/Error.swift; sourceTree = ""; }; + B249B91CED2F27F5A58276241ADD4BB7 /* Platform.Linux.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Linux.swift; path = Platform/Platform.Linux.swift; sourceTree = ""; }; + B278163DD8869BD634FBC37A0A78314A /* Bag+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bag+Rx.swift"; path = "RxSwift/Extensions/Bag+Rx.swift"; sourceTree = ""; }; + B320EE4339DB3EA8E88ED6E7B463000B /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; + B3978B3D1F18561B41C5412350F64F37 /* UnidirectionalBinding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UnidirectionalBinding.swift; path = Sources/UnidirectionalBinding.swift; sourceTree = ""; }; + B40BE97A1246D8C49845492A55299637 /* CombineLatest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CombineLatest.swift; path = RxSwift/Observables/Implementations/CombineLatest.swift; sourceTree = ""; }; + B41B5597DB477AB7287337E1EE3C7756 /* Dematerialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Dematerialize.swift; path = RxSwift/Observables/Implementations/Dematerialize.swift; sourceTree = ""; }; + B483550D0EABCD7A18A27ACC8CCB69DF /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; + B48C9F224CB97BCA0F526B6CE757E808 /* AccessTokenPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AccessTokenPlugin.swift; path = Sources/Moya/Plugins/AccessTokenPlugin.swift; sourceTree = ""; }; + B4A5B4C75C3181B16E43A4F7B73DE44A /* ScheduledItemType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItemType.swift; path = RxSwift/Schedulers/Internal/ScheduledItemType.swift; sourceTree = ""; }; + B4C0B5AE187B86FDFAE2E9FAE10E7302 /* Observable+Debug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Debug.swift"; path = "RxSwift/Observables/Observable+Debug.swift"; sourceTree = ""; }; + B5CE459308136BFD7A23BAF2F50CE800 /* Result-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-umbrella.h"; sourceTree = ""; }; + B648F3AFC4C4633FA007EB713EA56506 /* Reactive.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reactive.swift; path = Sources/Reactive.swift; sourceTree = ""; }; + B66BA2DCA8B77DD590AFFE169CFF7ED6 /* FoundationExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FoundationExtensions.swift; path = Sources/FoundationExtensions.swift; sourceTree = ""; }; B86A6A9B770A11A74DD461B27ED464E3 /* Moya-ObjectMapper.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Moya-ObjectMapper.modulemap"; sourceTree = ""; }; - B889118E834FCDF77A85D97F5BA29E51 /* ObjectMapper-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ObjectMapper-dummy.m"; sourceTree = ""; }; - BA3B449612A33ED99F23007688E68798 /* Catch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catch.swift; path = RxSwift/Observables/Implementations/Catch.swift; sourceTree = ""; }; - BBBC9C860760ECE129F6706293DD343C /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; - BBC88DBEA8726D2E597F82589529F6B6 /* Reduce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reduce.swift; path = RxSwift/Observables/Implementations/Reduce.swift; sourceTree = ""; }; - BC1268E27E1E327253894BCA8C703B88 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; - BC29AF625DB92BBFD8CCCBB81875E4ED /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - BD56E8455B399BBAA9421C854F6E0500 /* PrimitiveSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PrimitiveSequence.swift; path = RxSwift/Traits/PrimitiveSequence.swift; sourceTree = ""; }; - BE579727354900858B64B8ED2C258E07 /* Moya.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Moya.modulemap; sourceTree = ""; }; - BE9A38DE545D9FB4BBA603B074A96BC9 /* AnyObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyObserver.swift; path = RxSwift/AnyObserver.swift; sourceTree = ""; }; - BEBEAB30EF14346FF796FF063BAC16A0 /* PriorityQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PriorityQueue.swift; path = Platform/DataStructures/PriorityQueue.swift; sourceTree = ""; }; - BF4EFFAECD64D5D80D4E3EFB101EC43A /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; - BF5A85C56ABF93FABAB75D404B933BAF /* CredentialsPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CredentialsPlugin.swift; path = Sources/Moya/Plugins/CredentialsPlugin.swift; sourceTree = ""; }; - BF5EF54E6B2D7127D6A1DA9F817848EF /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; - C1E3078211D55BC63E1088C38DAB6582 /* Zip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Zip.swift; path = RxSwift/Observables/Implementations/Zip.swift; sourceTree = ""; }; - C23575BCCF705A5D084A8C54D4993EFF /* Timer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timer.swift; path = RxSwift/Observables/Implementations/Timer.swift; sourceTree = ""; }; - C2EA211AF86729D5CE233ABCBDA27563 /* WithLatestFrom.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WithLatestFrom.swift; path = RxSwift/Observables/Implementations/WithLatestFrom.swift; sourceTree = ""; }; - C3A45E67575A4363BF5289FB4D939BDF /* DataTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DataTransform.swift; path = Sources/DataTransform.swift; sourceTree = ""; }; - C455CE4C2AB49693C462F0F2489ACC41 /* ObservableType+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableType+Extensions.swift"; path = "RxSwift/ObservableType+Extensions.swift"; sourceTree = ""; }; - C49D3AEDD0847D87CFBDC3C43AEC7A5D /* Optional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Optional.swift; path = RxSwift/Observables/Implementations/Optional.swift; sourceTree = ""; }; + BB1F0348FD4C424F19EFB9411323F3FA /* ReactiveSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = ReactiveSwift.framework; path = ReactiveSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + BC64D2D57252E22F6FB7334A26BB9A40 /* Moya-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-umbrella.h"; sourceTree = ""; }; + BC7FAF6B11CB54F533401E158C245898 /* Reduce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reduce.swift; path = RxSwift/Observables/Implementations/Reduce.swift; sourceTree = ""; }; + BCFDB91280BF6D20EBD5B3A66B88AC8A /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + BD0ABD4914D2EE301F7AA43B4A12D682 /* Do.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Do.swift; path = RxSwift/Observables/Implementations/Do.swift; sourceTree = ""; }; + BE44D39AA5ECD4810DFE500D8E781CC3 /* ObservableType+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableType+Extensions.swift"; path = "RxSwift/ObservableType+Extensions.swift"; sourceTree = ""; }; + BF7114008E9479B082AECBF1E4A5B940 /* CurrentThreadScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CurrentThreadScheduler.swift; path = RxSwift/Schedulers/CurrentThreadScheduler.swift; sourceTree = ""; }; + C117BF194A2FAB369D1E4E772735B1E4 /* AsMaybe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsMaybe.swift; path = RxSwift/Observables/Implementations/AsMaybe.swift; sourceTree = ""; }; + C15B29D41B7D19D513E61510C17CBF58 /* Signal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Signal.swift; path = Sources/Signal.swift; sourceTree = ""; }; + C1F902FE19E3A7B35BE33971A520703F /* MultiTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultiTarget.swift; path = Sources/Moya/MultiTarget.swift; sourceTree = ""; }; + C241789ED7971C4DFA28779450E54AC2 /* SubscriptionDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscriptionDisposable.swift; path = RxSwift/Disposables/SubscriptionDisposable.swift; sourceTree = ""; }; + C357B7A689BF299853AB4DBCA4066AD0 /* ShareReplay1WhileConnected.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareReplay1WhileConnected.swift; path = RxSwift/Observables/Implementations/ShareReplay1WhileConnected.swift; sourceTree = ""; }; + C371E36ECB06A5163E50660874EC28B5 /* Sink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sink.swift; path = RxSwift/Observables/Implementations/Sink.swift; sourceTree = ""; }; + C44E15F0C89F0E302C55DC4A79A1BC3D /* ObjectMapper-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ObjectMapper-dummy.m"; sourceTree = ""; }; C5BC86D40B890A7B0844F888209CA06F /* Pods-Demo-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Demo-dummy.m"; sourceTree = ""; }; - C75DB9BB6870235D23E226A0987D94F4 /* Result-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-prefix.pch"; sourceTree = ""; }; - C9F838190778DBDE022037C111E79BB7 /* Moya-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-umbrella.h"; sourceTree = ""; }; + C9C496D6996BC8AFD85DE80CAC38D329 /* ObjectMapper.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ObjectMapper.xcconfig; sourceTree = ""; }; CA19694C0AC41D598DE4ABFEB300E619 /* Pods-Demo-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Demo-acknowledgements.plist"; sourceTree = ""; }; + CA266CC66D3EC65E521FA4162D360F99 /* Observable+Aggregate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Aggregate.swift"; path = "RxSwift/Observables/Observable+Aggregate.swift"; sourceTree = ""; }; + CB5F2649EE2009363B0F09C8A6ADA83A /* SchedulerServices+Emulation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "SchedulerServices+Emulation.swift"; path = "RxSwift/Schedulers/SchedulerServices+Emulation.swift"; sourceTree = ""; }; + CBDB1E14A220EC920FC1FB4625810264 /* Merge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Merge.swift; path = RxSwift/Observables/Implementations/Merge.swift; sourceTree = ""; }; CC6A59B0ADA6CB2F51DAE6508E437829 /* Pods-Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Demo.debug.xcconfig"; sourceTree = ""; }; - D04530228D0DCF46892AE36E5DC63A88 /* RxSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-umbrella.h"; sourceTree = ""; }; - D048A38103EA82DF858BC4ED266694C3 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D1A034B745DF8DB60A1412A76521B54E /* PublishSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PublishSubject.swift; path = RxSwift/Subjects/PublishSubject.swift; sourceTree = ""; }; - D220720C0183B953B10997BF2BFC2548 /* DispatchQueueConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DispatchQueueConfiguration.swift; path = RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift; sourceTree = ""; }; - D365CDF879164B3AA71B7A542A19DC02 /* AnonymousObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousObserver.swift; path = RxSwift/Observers/AnonymousObserver.swift; sourceTree = ""; }; + CD752EB8D371397CF0E0A452BFC6C66E /* Cancellable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancellable.swift; path = Sources/Moya/Cancellable.swift; sourceTree = ""; }; + CDCA1BEBEA42409A71611FD24B58954C /* Observable+Concurrency.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Concurrency.swift"; path = "RxSwift/Observables/Observable+Concurrency.swift"; sourceTree = ""; }; + CE3DB0BD2F238B2028C47A1E2311DB68 /* ObjectMapper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = ObjectMapper.framework; path = ObjectMapper.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + CEE4E537DE5502F9377401CE6CFC70E6 /* SynchronizedSubscribeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedSubscribeType.swift; path = RxSwift/Concurrency/SynchronizedSubscribeType.swift; sourceTree = ""; }; + CF4FE7D225298AEC8CB75B60A9CFA19A /* TransformType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TransformType.swift; path = Sources/TransformType.swift; sourceTree = ""; }; + D08FF4003628C1CF0EABD27982F41D46 /* Disposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposable.swift; path = Sources/Disposable.swift; sourceTree = ""; }; + D0F089014191265414BFEE897D8AF3CC /* ImmutableMappable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmutableMappable.swift; path = Sources/ImmutableMappable.swift; sourceTree = ""; }; + D1252E1B22A22F475C12151241EFCA4A /* HistoricalScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalScheduler.swift; path = RxSwift/Schedulers/HistoricalScheduler.swift; sourceTree = ""; }; + D1703CE57C3548B6E58DA6D64D29E55E /* ObservableConvertibleType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableConvertibleType.swift; path = RxSwift/ObservableConvertibleType.swift; sourceTree = ""; }; + D173C71BCA0EEB68789915CF5F191766 /* Observable+Creation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Creation.swift"; path = "RxSwift/Observables/Observable+Creation.swift"; sourceTree = ""; }; + D1BF1860830C7D6C6C4DCEA29B3B1A72 /* Result.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Result.modulemap; sourceTree = ""; }; + D25145D395665027FD536D8204F2A151 /* Optional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Optional.swift; path = RxSwift/Observables/Implementations/Optional.swift; sourceTree = ""; }; + D2B67F026BFB03CD5D152C213DEBF2BC /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; + D3891B24536C2EEB56439F4AE948F504 /* ReactiveSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ReactiveSwift-umbrella.h"; sourceTree = ""; }; D443B303EF315755B19810A6928CC875 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D44716B9F53DAF5AC9F273FCFA0B399E /* MapError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MapError.swift; path = Sources/MapError.swift; sourceTree = ""; }; - D49C9F5050C3E5E241292B6A8B089CC9 /* EnumOperators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EnumOperators.swift; path = Sources/EnumOperators.swift; sourceTree = ""; }; - D53DBBEB67F5CB59D38B55D8087349A7 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Sources/Moya/Response.swift; sourceTree = ""; }; - D5905F77A7FB3FE16E87E5D3836092D0 /* PrimitiveSequence+Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "PrimitiveSequence+Zip+arity.swift"; path = "RxSwift/Traits/PrimitiveSequence+Zip+arity.swift"; sourceTree = ""; }; - D5C86E305521220FB2D5AA5156E82C39 /* Result-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Result-dummy.m"; sourceTree = ""; }; - D5E9B8FB0063F16BCB8C11836E65F38D /* Observable+Single.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Single.swift"; path = "RxSwift/Observables/Observable+Single.swift"; sourceTree = ""; }; - D852756929898E7C884C5591E37695E8 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; - D887E9EE3AE9CED4927FF3B1167B1666 /* SynchronizedOnType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedOnType.swift; path = RxSwift/Concurrency/SynchronizedOnType.swift; sourceTree = ""; }; - D8C41EDF5D0590810A390C8B56A31EA6 /* TakeUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeUntil.swift; path = RxSwift/Observables/Implementations/TakeUntil.swift; sourceTree = ""; }; - D8D5F9A33FAFDDD0A06703C1446E11DA /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Result/Result.swift; sourceTree = ""; }; + D452F6F5AA184AAD5F2D67E79A3BD1E3 /* Bag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bag.swift; path = Platform/DataStructures/Bag.swift; sourceTree = ""; }; + D57C17E48D6B4C471E30BEBF78305148 /* ConnectableObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectableObservableType.swift; path = RxSwift/ConnectableObservableType.swift; sourceTree = ""; }; + D5CFCA13C0BBA88AFC72A9C1CD73A031 /* TakeUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeUntil.swift; path = RxSwift/Observables/Implementations/TakeUntil.swift; sourceTree = ""; }; + D61C3FC49E8BFA92C986196BDFE8CAA7 /* Scheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scheduler.swift; path = Sources/Scheduler.swift; sourceTree = ""; }; + D64B2CD1CD8D698E75A8D2074F3ACC4D /* ObserveOnSerialDispatchQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserveOnSerialDispatchQueue.swift; path = RxSwift/Observables/Implementations/ObserveOnSerialDispatchQueue.swift; sourceTree = ""; }; + D6C987F4B07105EE68202441F72978D2 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; + D713B360945685B908ADE8C9D5C1E900 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D714CB5781BB6873581A3DC0A79B9E85 /* Plugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Plugin.swift; path = Sources/Moya/Plugin.swift; sourceTree = ""; }; + D92F7DCD41D5266E43DFE3FAD66403EC /* CombineLatest+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+arity.swift"; path = "RxSwift/Observables/Implementations/CombineLatest+arity.swift"; sourceTree = ""; }; + D957E7D9F0804FBE080A56A0A7C32859 /* DistinctUntilChanged.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DistinctUntilChanged.swift; path = RxSwift/Observables/Implementations/DistinctUntilChanged.swift; sourceTree = ""; }; + D9B17B3054632B1067BBCA2C71A05333 /* MoyaProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaProvider.swift; path = Sources/Moya/MoyaProvider.swift; sourceTree = ""; }; + D9C57137B4028EDDFB13326F3B372094 /* Operators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Operators.swift; path = Sources/Operators.swift; sourceTree = ""; }; DAB0701F8F25395B1ED46510ED4B9797 /* Pods-Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Demo.release.xcconfig"; sourceTree = ""; }; - DC108DEF8BA98AB09C7BC0EAC6C794F1 /* DateTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DateTransform.swift; path = Sources/DateTransform.swift; sourceTree = ""; }; - DCEBCFE2E680619444916B5ABA6B1682 /* Moya-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Moya-dummy.m"; sourceTree = ""; }; - DCF50EC37251107F017096A20FAD1B06 /* SingleAsync.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAsync.swift; path = RxSwift/Observables/Implementations/SingleAsync.swift; sourceTree = ""; }; - DDBA57D5C91C951AAD0947F284A241E9 /* CurrentThreadScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CurrentThreadScheduler.swift; path = RxSwift/Schedulers/CurrentThreadScheduler.swift; sourceTree = ""; }; - DDE5489F7C49247526C4A628C9E53736 /* Observable+StandardSequenceOperators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+StandardSequenceOperators.swift"; path = "RxSwift/Observables/Observable+StandardSequenceOperators.swift"; sourceTree = ""; }; - DEB2875695A6C93C38BB63FE6F20D065 /* MoyaAvailability.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaAvailability.swift; path = Sources/Moya/MoyaAvailability.swift; sourceTree = ""; }; - E09B7EE0AC98AE274F75A17113B0DE2C /* RxSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = RxSwift.modulemap; sourceTree = ""; }; - E0E0EB252103E338667F10410633AFD8 /* Observable+Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Response.swift"; path = "Sources/RxMoya/Observable+Response.swift"; sourceTree = ""; }; - E22FB3DC962A9673059640027A60534A /* GroupBy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupBy.swift; path = RxSwift/Observables/Implementations/GroupBy.swift; sourceTree = ""; }; - E3854D7A0F8D75A28CD9BC5977D8C028 /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; - E38E8050EF565B230ED30AF254B0687E /* DateFormatterTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DateFormatterTransform.swift; path = Sources/DateFormatterTransform.swift; sourceTree = ""; }; - E4073CD83FCA4AC0E3081D4145754045 /* SchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SchedulerType.swift; path = RxSwift/SchedulerType.swift; sourceTree = ""; }; - E41176BB627F78B7C7A18255EBC1C3D6 /* Multicast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multicast.swift; path = RxSwift/Observables/Implementations/Multicast.swift; sourceTree = ""; }; - E488687E61384CA517A326F48C094B7F /* Endpoint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Endpoint.swift; path = Sources/Moya/Endpoint.swift; sourceTree = ""; }; + DB39F4C98DB2DA3F40DE8A32E7558771 /* ElementAt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ElementAt.swift; path = RxSwift/Observables/Implementations/ElementAt.swift; sourceTree = ""; }; + DB4181F0665DFDE3AF0C2A4274054C91 /* ShareReplay1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareReplay1.swift; path = RxSwift/Observables/Implementations/ShareReplay1.swift; sourceTree = ""; }; + DC4CFA50086C81153480348C921E9D7E /* Take.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Take.swift; path = RxSwift/Observables/Implementations/Take.swift; sourceTree = ""; }; + DCC878974EE6DA072D98F52B51E84C1D /* VirtualTimeScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeScheduler.swift; path = RxSwift/Schedulers/VirtualTimeScheduler.swift; sourceTree = ""; }; + DD2732BF279345355DC7EAA129BD6F68 /* Moya-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-prefix.pch"; sourceTree = ""; }; + DDC14C03CD94BFBB95CEB5C52AE617A5 /* MoyaProvider+Defaults.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Defaults.swift"; path = "Sources/Moya/MoyaProvider+Defaults.swift"; sourceTree = ""; }; + DDF2E31623D1233F5258FF7BEED50577 /* RxSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-prefix.pch"; sourceTree = ""; }; + DEE360A15B39C568E762840D3A81CEEE /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = RxSwift/Observables/Implementations/Filter.swift; sourceTree = ""; }; + DF39CE1238BC9EF2D3214D7964EF396D /* BooleanDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BooleanDisposable.swift; path = RxSwift/Disposables/BooleanDisposable.swift; sourceTree = ""; }; + DF68A7F635878834BF11B3143131A980 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DFA2975637898BE2E4745452FD2FA5B3 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; + DFE18FFE311C803F1501AFE9840B4850 /* SynchronizedOnType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedOnType.swift; path = RxSwift/Concurrency/SynchronizedOnType.swift; sourceTree = ""; }; + E12B1ED1B4C0A93A3519BA3B7C28DA68 /* ReactiveSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ReactiveSwift-prefix.pch"; sourceTree = ""; }; + E22180E18B43026CD6CE1E8998EE15F6 /* OperationQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OperationQueueScheduler.swift; path = RxSwift/Schedulers/OperationQueueScheduler.swift; sourceTree = ""; }; + E26A4334B8438658855EF11644F7E622 /* ObjectMapper-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ObjectMapper-prefix.pch"; sourceTree = ""; }; + E27C09CC42C9E61A48D61D96E32C2224 /* PrimitiveSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PrimitiveSequence.swift; path = RxSwift/Traits/PrimitiveSequence.swift; sourceTree = ""; }; + E351E6D538BA2A6289C52171C44274CA /* InvocableScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableScheduledItem.swift; path = RxSwift/Schedulers/Internal/InvocableScheduledItem.swift; sourceTree = ""; }; + E352691A70D68412A4A0795C783344A3 /* Concat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Concat.swift; path = RxSwift/Observables/Implementations/Concat.swift; sourceTree = ""; }; E4A41A1EFD287ADC8565B46439DFC266 /* Observable+ObjectMapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Observable+ObjectMapper.swift"; sourceTree = ""; }; + E518D6231CACDB520F43AB4E8F044F7A /* AsyncLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncLock.swift; path = RxSwift/Concurrency/AsyncLock.swift; sourceTree = ""; }; E51B5D4BA11643CC13ABF956AE7470FD /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E54EE1F8C4D762B441FD478AB879D980 /* Moya-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-prefix.pch"; sourceTree = ""; }; + E59D4F322D6E7D3BA6C49B1AA610A934 /* Timeout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeout.swift; path = RxSwift/Observables/Implementations/Timeout.swift; sourceTree = ""; }; + E5B0E739E5861FFF5C38D5227A4A389F /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; + E67B7571F6467514AA83F281E9E22099 /* RxSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = RxSwift.modulemap; sourceTree = ""; }; E68F8C86FB3267A3C87983DA9E269889 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E7DB8A6E1CA6E57C673C24C4AC79CAE3 /* Pods_Demo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Demo.framework; path = "Pods-Demo.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - E9BA3057D14507AA8F886194FBD03381 /* DefaultIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DefaultIfEmpty.swift; path = RxSwift/Observables/Implementations/DefaultIfEmpty.swift; sourceTree = ""; }; - EA39AFC96F15897C9C30A9F8A9FE3519 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; - EA485D4018AE332771BD13B2F9EC57F5 /* CustomDateFormatTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CustomDateFormatTransform.swift; path = Sources/CustomDateFormatTransform.swift; sourceTree = ""; }; - EB80FE113A2AE03AEB2962D1C5D4D2F4 /* TakeWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeWhile.swift; path = RxSwift/Observables/Implementations/TakeWhile.swift; sourceTree = ""; }; - EC59C6D24A5BB1D61AD7C03C8438310B /* MultiTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultiTarget.swift; path = Sources/Moya/MultiTarget.swift; sourceTree = ""; }; - EDB4955B887B6D682A1E74FA076117E6 /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; - EE73E3CEA2FEA01B426C2D2BE06D16C9 /* DelaySubscription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DelaySubscription.swift; path = RxSwift/Observables/Implementations/DelaySubscription.swift; sourceTree = ""; }; - EF431B0001081EE58BD8C67291EF21B9 /* Bag+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bag+Rx.swift"; path = "RxSwift/Extensions/Bag+Rx.swift"; sourceTree = ""; }; - F297BF8E8E239ADE4CD269BA2BA737F0 /* TargetType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TargetType.swift; path = Sources/Moya/TargetType.swift; sourceTree = ""; }; - F80B3E882544DF62F4A034AB22053AE3 /* Repeat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Repeat.swift; path = RxSwift/Observables/Implementations/Repeat.swift; sourceTree = ""; }; - F96BDB60268FE93517F6A1841809A66A /* SubjectType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubjectType.swift; path = RxSwift/Subjects/SubjectType.swift; sourceTree = ""; }; - FA1AFA0CF0FF65750E2D51A226379E2D /* Debounce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debounce.swift; path = RxSwift/Observables/Implementations/Debounce.swift; sourceTree = ""; }; - FAA484FE691273E5B8770F3749E2D213 /* Image.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Image.swift; path = Sources/Moya/Image.swift; sourceTree = ""; }; - FC2FE746F7EA2220E4B449A95DB63176 /* CombineLatest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CombineLatest.swift; path = RxSwift/Observables/Implementations/CombineLatest.swift; sourceTree = ""; }; - FCE5D36F3E766348A125CB9493210152 /* Throttle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Throttle.swift; path = RxSwift/Observables/Implementations/Throttle.swift; sourceTree = ""; }; - FD30ABDEAF12C709D2CFAEE44BD61855 /* SubscriptionDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscriptionDisposable.swift; path = RxSwift/Disposables/SubscriptionDisposable.swift; sourceTree = ""; }; - FD6CF9B4AAB372D8C067E3FF8755C6A9 /* ReplaySubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ReplaySubject.swift; path = RxSwift/Subjects/ReplaySubject.swift; sourceTree = ""; }; - FDABC56738F03E6CF33DBFC19CE76133 /* Disposables.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposables.swift; path = RxSwift/Disposables/Disposables.swift; sourceTree = ""; }; + E875A3259FA588A7BFA479448540897D /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; + E9B9231ACA143FEEA785BA2C77983B8C /* Moya.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Moya.modulemap; sourceTree = ""; }; + EAEEE030CE34EBFEF0FAD1318244A197 /* Observable+Binding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Binding.swift"; path = "RxSwift/Observables/Observable+Binding.swift"; sourceTree = ""; }; + EB3363BA24CD0B09109B7746F6285B98 /* CredentialsPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CredentialsPlugin.swift; path = Sources/Moya/Plugins/CredentialsPlugin.swift; sourceTree = ""; }; + ED4A697F546D5D36E10B1AD245C29F8D /* Moya_ObjectMapper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Moya_ObjectMapper.framework; path = "Moya-ObjectMapper.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + ED7C53165F3F31D1A0C8C198AD696B9F /* Bag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bag.swift; path = Sources/Bag.swift; sourceTree = ""; }; + EDE1A466A002C993A806512B2E7382C4 /* Flatten.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Flatten.swift; path = Sources/Flatten.swift; sourceTree = ""; }; + EE74BAF25E92CDB17782F9AB8F17B753 /* DisposeBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBase.swift; path = RxSwift/Disposables/DisposeBase.swift; sourceTree = ""; }; + EEC6DAEDB2A4F64D0361DAC2A90CE887 /* Deferred.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deferred.swift; path = RxSwift/Observables/Implementations/Deferred.swift; sourceTree = ""; }; + EF08EBF411883D53A25FF37FFA2CEC24 /* MapError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MapError.swift; path = Sources/MapError.swift; sourceTree = ""; }; + EF59E24C322B9D2F5CD6280927C40466 /* Deprecations+Removals.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Deprecations+Removals.swift"; path = "Sources/Deprecations+Removals.swift"; sourceTree = ""; }; + F09BF1757627FA226B630ABB73C959F9 /* Zip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Zip.swift; path = RxSwift/Observables/Implementations/Zip.swift; sourceTree = ""; }; + F2B5C81978957E54CCFB28F7091AD5D3 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; + F2DEBF8CC407476366F482DC09F29DC2 /* ConnectableObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectableObservable.swift; path = RxSwift/Observables/Implementations/ConnectableObservable.swift; sourceTree = ""; }; + F38255D62E9D278E969DB4F061836F2F /* Timer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timer.swift; path = RxSwift/Observables/Implementations/Timer.swift; sourceTree = ""; }; + F39DB37E28CA0B59F6EAB8F9341535BE /* HexColorTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HexColorTransform.swift; path = Sources/HexColorTransform.swift; sourceTree = ""; }; + F3A65AF290BC5C0CE5D5AF1B2454E60A /* String+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Rx.swift"; path = "RxSwift/Extensions/String+Rx.swift"; sourceTree = ""; }; + F61330C472723B44F49FBA757C173823 /* Using.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Using.swift; path = RxSwift/Observables/Implementations/Using.swift; sourceTree = ""; }; + F76263CF98FEED7B4665B6B14CB9D4F8 /* BehaviorSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BehaviorSubject.swift; path = RxSwift/Subjects/BehaviorSubject.swift; sourceTree = ""; }; + F7D4C2831C5B7EDF94A1DD0CC97B961B /* Disposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposable.swift; path = RxSwift/Disposable.swift; sourceTree = ""; }; + F87D4ED948A5076902CE684060F0CE21 /* Result.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Result.xcconfig; sourceTree = ""; }; + F8C18E8E928E48BDC1259CBBA11DB0F3 /* ToJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToJSON.swift; path = Sources/ToJSON.swift; sourceTree = ""; }; + F9A5BACE751A31D7CCB9FD6E8C6E8DBC /* CompositeDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompositeDisposable.swift; path = RxSwift/Disposables/CompositeDisposable.swift; sourceTree = ""; }; + F9B2274195EE237722674F6AEFFA5573 /* WithLatestFrom.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WithLatestFrom.swift; path = RxSwift/Observables/Implementations/WithLatestFrom.swift; sourceTree = ""; }; + F9FDA720EB4651BE9743F2A2025BA3C1 /* ConcurrentMainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentMainScheduler.swift; path = RxSwift/Schedulers/ConcurrentMainScheduler.swift; sourceTree = ""; }; + FAA435219FB8D98ACAC9E82F3073CBFB /* GroupedObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupedObservable.swift; path = RxSwift/GroupedObservable.swift; sourceTree = ""; }; + FAA9F221B24D7988307530A187CAD448 /* AnonymousDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousDisposable.swift; path = RxSwift/Disposables/AnonymousDisposable.swift; sourceTree = ""; }; + FD72A25BD3A7D287FED5F3837E2F099A /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; + FFC44176F598210ADBD3E383470714FB /* NetworkLoggerPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkLoggerPlugin.swift; path = Sources/Moya/Plugins/NetworkLoggerPlugin.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -650,7 +717,7 @@ buildActionMask = 2147483647; files = ( E9674E861DAB4BD6475368C1E7F84098 /* Alamofire.framework in Frameworks */, - AC90DF39324E1057B63197FE45341AC1 /* Foundation.framework in Frameworks */, + A6F45D447E5A8E9CEB5E8E5C0E84683C /* Foundation.framework in Frameworks */, 000D350E67D30BCA2FBE7F2924993B84 /* Moya.framework in Frameworks */, 2931270581FC1B6B83757EB3C3CEC760 /* ObjectMapper.framework in Frameworks */, CE752C436ABC8898B95A66D78CB8191B /* Result.framework in Frameworks */, @@ -662,7 +729,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 1D00764CF6D44AAD20FBF135E6721976 /* Foundation.framework in Frameworks */, + AD779D324F289B9D75A700F384DE93DC /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -670,7 +737,15 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 18235B4CDF8BED426D20EA5A24A55AFE /* Foundation.framework in Frameworks */, + AE6E5B80B4BBB8EDF5C7515B9E8C0055 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 68DBCBEC97BE6A6FD2A426C4CBAF68F7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E38B5D9E5AAD37ACD84F32C34FD4C98B /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -679,7 +754,7 @@ buildActionMask = 2147483647; files = ( CA4D15B078B3BD4B91C7849F16E040E1 /* Alamofire.framework in Frameworks */, - 1B49968381587E76C8067F62F5FA1085 /* Foundation.framework in Frameworks */, + D2143DE4FC2628CC0E41EF58D263C20A /* Foundation.framework in Frameworks */, 59AF979FCB40524EC2764D656321A30E /* Result.framework in Frameworks */, 11523975ADA09CD9D08AE04D8DA8DD4D /* RxSwift.framework in Frameworks */, ); @@ -689,7 +764,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A04BFC558D69E7DBB68023C80A9CFE4E /* Foundation.framework in Frameworks */, + 73B9C996AED49ED7CF8EC2A6F1738059 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -697,21 +772,65 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 8F8F4F2402BFEDB0013438F114C65074 /* Foundation.framework in Frameworks */, + DAF69EF73C887FA1D6BD8B789070DCFF /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - CACE9679738C523492B99E07550C1CA9 /* Frameworks */ = { + A8C1D60D3ABBCFFCC097218325B728B3 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 0ED61723CDE26126601F65727397C352 /* Foundation.framework in Frameworks */, + BF2052DE8D309C5BA7295921E6135DB9 /* Foundation.framework in Frameworks */, + 82243099E0A10AE0213AEE768956284E /* Result.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 085C81FEA3F1B78781776679E8F14B0F /* Moya */ = { + isa = PBXGroup; + children = ( + BCD215DA45F67E786C5A555F0DB273F7 /* Core */, + A47AC22BC83A4DB74586D91553663489 /* RxSwift */, + CCAD1ADCB14E6C0F0E2576EBB7E4FE9A /* Support Files */, + ); + name = Moya; + path = Moya; + sourceTree = ""; + }; + 09B4A2AAF9F0ACD6329138D42CDB30C5 /* ObjectMapper */ = { + isa = PBXGroup; + children = ( + 2CAAA0D52FCA1C1DEC597260623EF2A5 /* CustomDateFormatTransform.swift */, + 60B30C90645517428578CA8F97388B23 /* DataTransform.swift */, + 64980335396398C7FBAB1BA3E239DF56 /* DateFormatterTransform.swift */, + 02195DED2D688E2BBFA361F58068011C /* DateTransform.swift */, + 5920B5993039870B306EC532F225E154 /* DictionaryTransform.swift */, + 374F5979FAFC0F8EDB295BC6AF726210 /* EnumOperators.swift */, + 02829F9EC43F515274FB1074481F8B84 /* EnumTransform.swift */, + 76EBBC41CE9B11EAD62E0BCF95E85227 /* FromJSON.swift */, + F39DB37E28CA0B59F6EAB8F9341535BE /* HexColorTransform.swift */, + D0F089014191265414BFEE897D8AF3CC /* ImmutableMappable.swift */, + 7D6E1BBEE6A3830A885E6B9927A75142 /* IntegerOperators.swift */, + 2686171BA16348F07095C4FE784112A0 /* ISO8601DateTransform.swift */, + 65EF88911B1EF37A8A6E08A5847C5CF0 /* Map.swift */, + EF08EBF411883D53A25FF37FFA2CEC24 /* MapError.swift */, + 8A4E045A2FEAE35414C860EE69E7BF86 /* Mappable.swift */, + 45839231A4901B0E5436EF73077831F0 /* Mapper.swift */, + 20AEF3C06A5DFD905B23CA9F2E2425FE /* NSDecimalNumberTransform.swift */, + D9C57137B4028EDDFB13326F3B372094 /* Operators.swift */, + F8C18E8E928E48BDC1259CBBA11DB0F3 /* ToJSON.swift */, + 4F74CF47C5DE7C590136CD81F9005DAE /* TransformOf.swift */, + 1A6D71F9BF566B4365BE46AB589E7461 /* TransformOperators.swift */, + CF4FE7D225298AEC8CB75B60A9CFA19A /* TransformType.swift */, + 228F82916F5D132DE5005BBAB76005B8 /* URLTransform.swift */, + 5C17C8B7589E302DE126B329CCB2DC62 /* Support Files */, + ); + name = ObjectMapper; + path = ObjectMapper; + sourceTree = ""; + }; 0A556D8227996A7E51BD01E5DC421AE6 /* Support Files */ = { isa = PBXGroup; children = ( @@ -735,30 +854,12 @@ path = Source; sourceTree = ""; }; - 125B74C2B4F5BBAE204A098F5F0DEBBD /* Alamofire */ = { + 0DF092FE17C2523F9C330CD528145673 /* iOS */ = { isa = PBXGroup; children = ( - 4ED2E8EA6C34E294B06DA947F06D4D3F /* AFError.swift */, - 8DD4D5CFDBC23B94526F5361B3BDE4C9 /* Alamofire.swift */, - 099546DF2E74E63FE6FA7B3EC2F7734A /* DispatchQueue+Alamofire.swift */, - 52100DB4932C37B36D4271C1081B8757 /* MultipartFormData.swift */, - 2BEB2995CE08029101069ABB46AD436C /* NetworkReachabilityManager.swift */, - E3854D7A0F8D75A28CD9BC5977D8C028 /* Notifications.swift */, - 8169FFFAF07FE2B47116D2E16CAF804F /* ParameterEncoding.swift */, - 2FAC654555E2BE2ED1A38AF599A3A792 /* Request.swift */, - 9032064867F0EDF8BE9DBBA169EBCEB9 /* Response.swift */, - D852756929898E7C884C5591E37695E8 /* ResponseSerialization.swift */, - BBBC9C860760ECE129F6706293DD343C /* Result.swift */, - EDB4955B887B6D682A1E74FA076117E6 /* ServerTrustPolicy.swift */, - BF4EFFAECD64D5D80D4E3EFB101EC43A /* SessionDelegate.swift */, - AB56CBFC832EF68A141F312792AD4AF6 /* SessionManager.swift */, - 68F2BB306D2162504F49E65135E9E9A0 /* TaskDelegate.swift */, - 1D882F045A07D6D09D64E94E0010A9B2 /* Timeline.swift */, - BF5EF54E6B2D7127D6A1DA9F817848EF /* Validation.swift */, - 3F7C5675BEC425BBDB93E4FB17172813 /* Support Files */, + CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */, ); - name = Alamofire; - path = Alamofire; + name = iOS; sourceTree = ""; }; 1995208C8B8C0486ECCBB40E7E39045E /* RxSwift */ = { @@ -779,20 +880,6 @@ path = Source; sourceTree = ""; }; - 240BCDF90077DF8714427C5131DC2CC9 /* Support Files */ = { - isa = PBXGroup; - children = ( - 4DB1A7A3673572B80E0AC0E3446164C9 /* Info.plist */, - BE579727354900858B64B8ED2C258E07 /* Moya.modulemap */, - 835A4CCC1208A301A94815286B0DE285 /* Moya.xcconfig */, - DCEBCFE2E680619444916B5ABA6B1682 /* Moya-dummy.m */, - E54EE1F8C4D762B441FD478AB879D980 /* Moya-prefix.pch */, - C9F838190778DBDE022037C111E79BB7 /* Moya-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/Moya"; - sourceTree = ""; - }; 35B1193275AB3E48E99302585172BA47 /* Development Pods */ = { isa = PBXGroup; children = ( @@ -801,27 +888,43 @@ name = "Development Pods"; sourceTree = ""; }; - 3B22FC96734AED82C516C58A2D4C6232 /* RxSwift */ = { + 39FA737C2C652DEE3C6D861D0CD0BBFC /* Pods */ = { isa = PBXGroup; children = ( - E0E0EB252103E338667F10410633AFD8 /* Observable+Response.swift */, - 8337E7F6FC7B272D06D41B55C51578C2 /* RxMoyaProvider.swift */, + 3C175B7F56A1E8CBE691188A5B66217D /* Alamofire */, + 085C81FEA3F1B78781776679E8F14B0F /* Moya */, + 09B4A2AAF9F0ACD6329138D42CDB30C5 /* ObjectMapper */, + B5AE83A21A9312E806D59683AEBF2D6A /* ReactiveSwift */, + FDD1695A3B721B245397974BC61D715D /* Result */, + B2AC03BF63856F089A70B7F9B900ADFF /* RxSwift */, ); - name = RxSwift; + name = Pods; sourceTree = ""; }; - 3F7C5675BEC425BBDB93E4FB17172813 /* Support Files */ = { + 3C175B7F56A1E8CBE691188A5B66217D /* Alamofire */ = { isa = PBXGroup; children = ( - 3ED85804987E79AE8463C4ADA1157197 /* Alamofire.modulemap */, - 051A719FA532DB9A6297CA9ECAB7712F /* Alamofire.xcconfig */, - EA39AFC96F15897C9C30A9F8A9FE3519 /* Alamofire-dummy.m */, - 808549CAB48179824CE535700672D8FB /* Alamofire-prefix.pch */, - BC1268E27E1E327253894BCA8C703B88 /* Alamofire-umbrella.h */, - 854373776ABAABE1B1CDF9564C043B69 /* Info.plist */, + B483550D0EABCD7A18A27ACC8CCB69DF /* AFError.swift */, + F2B5C81978957E54CCFB28F7091AD5D3 /* Alamofire.swift */, + 597A28C19BCCC57C5FFF4BF262CCAAF4 /* DispatchQueue+Alamofire.swift */, + 70B98B88A29190DF1D9046B75313A6F5 /* MultipartFormData.swift */, + 4CA2A7E6BBAE7EF0D66E481D28618C44 /* NetworkReachabilityManager.swift */, + E5B0E739E5861FFF5C38D5227A4A389F /* Notifications.swift */, + E875A3259FA588A7BFA479448540897D /* ParameterEncoding.swift */, + B320EE4339DB3EA8E88ED6E7B463000B /* Request.swift */, + DFA2975637898BE2E4745452FD2FA5B3 /* Response.swift */, + 852276A83C97D7B483AAD3516806EF85 /* ResponseSerialization.swift */, + D6C987F4B07105EE68202441F72978D2 /* Result.swift */, + 1EE119E337ADA617EC124C5243D01215 /* ServerTrustPolicy.swift */, + 1C971A44E2F3D8336CF0FA86D1488C8C /* SessionDelegate.swift */, + 4AD834CFBDD48550EDAF21F31D167032 /* SessionManager.swift */, + 3E928AE794F4E1E19A5AD255A37D6752 /* TaskDelegate.swift */, + 42D894EA6C6A47B6CFDE3704A55204D7 /* Timeline.swift */, + FD72A25BD3A7D287FED5F3837E2F099A /* Validation.swift */, + 6B0CACB257F379379D9497DD4E986458 /* Support Files */, ); - name = "Support Files"; - path = "../Target Support Files/Alamofire"; + name = Alamofire; + path = Alamofire; sourceTree = ""; }; 439C1970038273E327AD68795DBC9575 /* Frameworks */ = { @@ -832,333 +935,337 @@ 2B87CCF9A5173095B333FB06CA24E143 /* ObjectMapper.framework */, 941085FB48E505ED52FF2DFD9B570A8C /* Result.framework */, 7697FC2B90D6509A8AC3659265DC0FB7 /* RxSwift.framework */, - 4E9B102318E9EDC90E59279C5DC73C90 /* iOS */, + 0DF092FE17C2523F9C330CD528145673 /* iOS */, ); name = Frameworks; sourceTree = ""; }; - 46E1298E7CA283A97B2B72D0C477E2A2 /* Support Files */ = { + 5C17C8B7589E302DE126B329CCB2DC62 /* Support Files */ = { isa = PBXGroup; children = ( - 71AC373F6AF7475D9D69EADEAA3AD722 /* Info.plist */, - A92F976C1DD7037D84C08744E8899197 /* ObjectMapper.modulemap */, - 1C680511F09B57462B53519506B25D68 /* ObjectMapper.xcconfig */, - B889118E834FCDF77A85D97F5BA29E51 /* ObjectMapper-dummy.m */, - 2268EAF1576773305A769F28BBA2BF2A /* ObjectMapper-prefix.pch */, - 2336973513914C168F8E404464DDBE17 /* ObjectMapper-umbrella.h */, + 8EE4E3C424252CF8A16D59C05C3B8873 /* Info.plist */, + 5CB47DCB44972D5E0559F3BDACFD6BC7 /* ObjectMapper.modulemap */, + C9C496D6996BC8AFD85DE80CAC38D329 /* ObjectMapper.xcconfig */, + C44E15F0C89F0E302C55DC4A79A1BC3D /* ObjectMapper-dummy.m */, + E26A4334B8438658855EF11644F7E622 /* ObjectMapper-prefix.pch */, + AE5D5AF2A28AC7AC8AA786C64A8B0D5D /* ObjectMapper-umbrella.h */, ); name = "Support Files"; path = "../Target Support Files/ObjectMapper"; sourceTree = ""; }; - 4E9B102318E9EDC90E59279C5DC73C90 /* iOS */ = { + 6B0CACB257F379379D9497DD4E986458 /* Support Files */ = { isa = PBXGroup; children = ( - BC29AF625DB92BBFD8CCCBB81875E4ED /* Foundation.framework */, + 0F64DD81F831A11D65AE6504A27763B1 /* Alamofire.modulemap */, + D2B67F026BFB03CD5D152C213DEBF2BC /* Alamofire.xcconfig */, + 35E8D54A1971EB89FE89D4C8426891C5 /* Alamofire-dummy.m */, + 079F5BAE309C0CA01FCDB9DDDE38383F /* Alamofire-prefix.pch */, + 99FE737E0F857E5191A1E4F1C1D81AC3 /* Alamofire-umbrella.h */, + 8B706DBD4A5763AC4E4A8BD768FE1B57 /* Info.plist */, ); - name = iOS; + name = "Support Files"; + path = "../Target Support Files/Alamofire"; sourceTree = ""; }; - 53C7FCEF3A3978D6D4F6D222B67D6E58 /* Support Files */ = { + 6F2351C272926D3E0225FEFC2F9C5D1F /* Targets Support Files */ = { isa = PBXGroup; children = ( - 5587578262EF141FF7FFB804C806B1B3 /* Info.plist */, - 926D74E3F48CE52F7E2F31ECE8E94481 /* Result.modulemap */, - 641CC99CF2A41BA53EBC44529FC9D698 /* Result.xcconfig */, - D5C86E305521220FB2D5AA5156E82C39 /* Result-dummy.m */, - C75DB9BB6870235D23E226A0987D94F4 /* Result-prefix.pch */, - 0AB7B0A13BA1A3FEE0C07FF11290FB3B /* Result-umbrella.h */, + ECC58720C5754A079F9A150E40E2FCDD /* Pods-Demo */, ); - name = "Support Files"; - path = "../Target Support Files/Result"; + name = "Targets Support Files"; sourceTree = ""; }; - 5D7E4758810E16798658755625F3933B /* Result */ = { + 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( - D8D5F9A33FAFDDD0A06703C1446E11DA /* Result.swift */, - 58145952B5E58F93AC0CAB35D8BB06DA /* ResultProtocol.swift */, - 53C7FCEF3A3978D6D4F6D222B67D6E58 /* Support Files */, + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, + 35B1193275AB3E48E99302585172BA47 /* Development Pods */, + 439C1970038273E327AD68795DBC9575 /* Frameworks */, + 39FA737C2C652DEE3C6D861D0CD0BBFC /* Pods */, + EB8FC93A3843019CFC06E2F16CCE292B /* Products */, + 6F2351C272926D3E0225FEFC2F9C5D1F /* Targets Support Files */, ); - name = Result; - path = Result; sourceTree = ""; }; - 6E0423DAD40F1CAABD04CC1985EB7A41 /* RxSwift */ = { + 7FAA33E810429A0457651FC58663CCD5 /* Support Files */ = { isa = PBXGroup; children = ( - 32C75D1C9BCDA389266EEF90117751CB /* AddRef.swift */, - 4E3AE6B908A12FA43493763FBA7C35F5 /* Amb.swift */, - 9000B74DF9AC745B40676911D58B7EC3 /* AnonymousDisposable.swift */, - 794C5EE8CE9FA84905607AA9C2F29BCD /* AnonymousInvocable.swift */, - 99D3CFACEF6CAE7D2E610B6A1F54D237 /* AnonymousObservable.swift */, - D365CDF879164B3AA71B7A542A19DC02 /* AnonymousObserver.swift */, - BE9A38DE545D9FB4BBA603B074A96BC9 /* AnyObserver.swift */, - 8E1C096CA1F50B1C1FC34F1960375EF5 /* AsMaybe.swift */, - 3E06217CCEEA5A6A85FF15D452B5036B /* AsSingle.swift */, - AD06127D1DB37FB9C69025C819693BA5 /* AsyncLock.swift */, - 502339D5742C7BA688BB1A497F95BEC5 /* AsyncSubject.swift */, - 7B291595EEF8D58E953103A5BA5509F4 /* Bag.swift */, - EF431B0001081EE58BD8C67291EF21B9 /* Bag+Rx.swift */, - 4A62F8C256D44A21863AB561AC63A4C8 /* BehaviorSubject.swift */, - B6C05F26232F3BEE8B05B095A35F632A /* BinaryDisposable.swift */, - 9FBD99DE8937641F1E517BC8A86E9232 /* BooleanDisposable.swift */, - ADD3569CBCE17ACD2EBC6E61B942BAC7 /* Buffer.swift */, - 8DBA09CBFAEC4A3683226AA1BBEF7BD9 /* Cancelable.swift */, - BA3B449612A33ED99F23007688E68798 /* Catch.swift */, - FC2FE746F7EA2220E4B449A95DB63176 /* CombineLatest.swift */, - 4CD045EE0F7BD32E53266987C5C7EDA0 /* CombineLatest+arity.swift */, - 8FB0C4FAB2B8F4FE51F36EBB2F457DB8 /* CombineLatest+Collection.swift */, - ABD5DBFF68FB3E2C7D5C68F22D2149DA /* CompositeDisposable.swift */, - 8A5DFB0C2D16E6F31B15E6A5B14EE4CD /* Concat.swift */, - 45995F50FB199435F20E308EEAC306FB /* ConcurrentDispatchQueueScheduler.swift */, - 4C27978222879CDDE8F12507361A5025 /* ConcurrentMainScheduler.swift */, - 0ED317734300994343806A205124D34D /* ConnectableObservable.swift */, - 3D739F9F4EA372D25C0F421BFB9C9307 /* ConnectableObservableType.swift */, - DDBA57D5C91C951AAD0947F284A241E9 /* CurrentThreadScheduler.swift */, - FA1AFA0CF0FF65750E2D51A226379E2D /* Debounce.swift */, - 8B361E3D5A3B5EFF4725B51EE38F6EC9 /* Debug.swift */, - E9BA3057D14507AA8F886194FBD03381 /* DefaultIfEmpty.swift */, - 8736CD3D4ED9BD6CA17CC10D2B8D8D61 /* Deferred.swift */, - 0CA56D9693D713B9544995B44EE44F0D /* Delay.swift */, - EE73E3CEA2FEA01B426C2D2BE06D16C9 /* DelaySubscription.swift */, - 55CA01AC98F81BD0B27C0C1575896CA4 /* Dematerialize.swift */, - 4941AEE4901EE1EA89034A12E334C2D3 /* Deprecated.swift */, - 611EA54DFF3BAAACF801CA2E629651F1 /* DispatchQueue+Extensions.swift */, - D220720C0183B953B10997BF2BFC2548 /* DispatchQueueConfiguration.swift */, - 1FFB5D94F9243148195A8AF95A994738 /* Disposable.swift */, - FDABC56738F03E6CF33DBFC19CE76133 /* Disposables.swift */, - 2A4FA0D564E069B756F89FA616C5AFFC /* DisposeBag.swift */, - 6500AB1E0A7CF345A6A5AD93C22AB881 /* DisposeBase.swift */, - 52F012528B1DA886C4BDB36128B97C76 /* DistinctUntilChanged.swift */, - 1D00CE3BB3B1B39702A1D44E499442B9 /* Do.swift */, - 8BCABCFAB741BF1ABFE39EA911E4D8BF /* ElementAt.swift */, - 847EB8278900D5C808A1AE095CCFB16E /* Empty.swift */, - A779A975FD6FDA53C702EB73FA73A276 /* Error.swift */, - 4236002E282A0F05AE59D0E2E156C8F9 /* Errors.swift */, - A5D3EFB1DE6C0E52AE06057EA3F85A3C /* Event.swift */, - AE5C9E18F719DCD67A08AD48AC839955 /* Filter.swift */, - 337539EBBDCD8917D3389B8C2B24A285 /* Generate.swift */, - E22FB3DC962A9673059640027A60534A /* GroupBy.swift */, - ACAEF6EE76CA30FA9A3B39D1EF1C6DC4 /* GroupedObservable.swift */, - 48A05B7CA9E8B3A3AD6B5CD6185F4D55 /* HistoricalScheduler.swift */, - 16D2DD1873C65581C68D7601F56A7082 /* HistoricalSchedulerTimeConverter.swift */, - 034ED05283387971F8B44299C90D057D /* ImmediateScheduler.swift */, - 5FE6670A1C419E6BED4E0E0CBD737204 /* ImmediateSchedulerType.swift */, - 3EC509CD4E27A6008E4737F83CB64E33 /* InfiniteSequence.swift */, - 6D58D1C70EE521D2DD0DEE04B52C65F5 /* InvocableScheduledItem.swift */, - 5AE198DAE49954737161561B5F468CC3 /* InvocableType.swift */, - 7CA1F613F7A280DFD7B4A97EEA76DED0 /* Just.swift */, - A45E07FFEB7005B188DB68E1515ACDFF /* Lock.swift */, - 226889B2AD72A44E0383CB333E2070C7 /* LockOwnerType.swift */, - 70D7C4235D797F08CA934E2D7FCF1EF3 /* MainScheduler.swift */, - 61B294CF34CCB9E73CCC0847489DDFC2 /* Map.swift */, - 592569BB42AC6BF00E98C5030082CFF8 /* Materialize.swift */, - 07B4A2BA63EA18D09A87E038646E464F /* Merge.swift */, - E41176BB627F78B7C7A18255EBC1C3D6 /* Multicast.swift */, - 87449C32758CB4EB291D70EAB447C28A /* Never.swift */, - 40963991FCA619D7799F942D19A4FAA4 /* NopDisposable.swift */, - 38A8D839A098CE4BE166545247EB9C25 /* Observable.swift */, - 1F887A2C3255BBB81512FC348CADBB22 /* Observable+Aggregate.swift */, - 4C7751EBD96646C167DB2D3D84F8AF8F /* Observable+Binding.swift */, - A75A681A3F4A36FEB952747AC623CE57 /* Observable+Concurrency.swift */, - 7D1AD8C28FFC037A4AC35BB236EB481A /* Observable+Creation.swift */, - AE9125CA72BF199A20DBD4B9558D4CF3 /* Observable+Debug.swift */, - ABE5EB4CE9918D54049AE761A8781B65 /* Observable+Multiple.swift */, - D5E9B8FB0063F16BCB8C11836E65F38D /* Observable+Single.swift */, - DDE5489F7C49247526C4A628C9E53736 /* Observable+StandardSequenceOperators.swift */, - 6894072FB2F0D6A33A3E4E3BA5CCEC9D /* Observable+Time.swift */, - 5AC4B3AC33F1BE2EF940BF538BD6050E /* ObservableConvertibleType.swift */, - A2BEC8D54E3FAE26C9B12F3D03E14FE7 /* ObservableType.swift */, - C455CE4C2AB49693C462F0F2489ACC41 /* ObservableType+Extensions.swift */, - AB0AC6ABAAAA34D3E9D492E60583EE3E /* ObserveOn.swift */, - 0A87926F1117ABD9937D1F0F91B80417 /* ObserveOnSerialDispatchQueue.swift */, - 1096F5305E204EF5070EA4183F503458 /* ObserverBase.swift */, - 0F1D332730FF34B15E98370CFE5EE059 /* ObserverType.swift */, - ABA6FE9DD99C7C9AAEE80E80D8625F3B /* OperationQueueScheduler.swift */, - C49D3AEDD0847D87CFBDC3C43AEC7A5D /* Optional.swift */, - 88C2777E2FA59660406E11B082DC22E5 /* Platform.Darwin.swift */, - 366406296C874C088B74308A835D141E /* Platform.Linux.swift */, - BD56E8455B399BBAA9421C854F6E0500 /* PrimitiveSequence.swift */, - D5905F77A7FB3FE16E87E5D3836092D0 /* PrimitiveSequence+Zip+arity.swift */, - BEBEAB30EF14346FF796FF063BAC16A0 /* PriorityQueue.swift */, - 8E8ADC41BB02F6D7BA9320AF22D0EF54 /* Producer.swift */, - D1A034B745DF8DB60A1412A76521B54E /* PublishSubject.swift */, - 69E2BB057A552EBAB05D658195965BA7 /* Queue.swift */, - 275CADCB409BD3A62811A9012671CAA2 /* Range.swift */, - 7A8817E52F0914C81EBCADAF93798AA6 /* Reactive.swift */, - 682A7454DD4DE301517D214700298097 /* RecursiveLock.swift */, - B74105286857325F78F5FD3B89A006FC /* RecursiveScheduler.swift */, - BBC88DBEA8726D2E597F82589529F6B6 /* Reduce.swift */, - 3FE0DADEA9FB8151F9EE55ADE94BD0A3 /* RefCount.swift */, - 41A25ED627CF34B02A326E2701F21B52 /* RefCountDisposable.swift */, - F80B3E882544DF62F4A034AB22053AE3 /* Repeat.swift */, - FD6CF9B4AAB372D8C067E3FF8755C6A9 /* ReplaySubject.swift */, - B440337621937614976B1C2C58BE33BB /* RetryWhen.swift */, - 4744F07468C8F6C9FFAC5B65E23BB8F4 /* Rx.swift */, - 4182FE0590CD87191361E8699241CCF6 /* RxMutableBox.swift */, - 7E415D9D86E08EFA2341F11C9B275535 /* Sample.swift */, - 5CA1E89C5CC4EA175A5C058CF7D40DB1 /* Scan.swift */, - 59B2D0EFAEB42BCFB6C7772769D223CF /* ScheduledDisposable.swift */, - 9C825CD9097CE3E3E6F98AE38F5180C2 /* ScheduledItem.swift */, - 9B2127E2F8A3390CDE0D6D747F686A7D /* ScheduledItemType.swift */, - 6CEA079621EDB8D262AA7E27EFF723D1 /* SchedulerServices+Emulation.swift */, - E4073CD83FCA4AC0E3081D4145754045 /* SchedulerType.swift */, - 101B539448B8BE627A24AAE294ECAF2A /* Sequence.swift */, - 7AC412D307F23E01E9F08B6D676CD74B /* SerialDispatchQueueScheduler.swift */, - 429C218ACEC9FD71D562C3153D72D416 /* SerialDisposable.swift */, - 32BD97FABD31ACA7E3146BAAA9954259 /* ShareReplay1.swift */, - 5D0E0A3427495AAF9A15E58B41A3FFB5 /* ShareReplay1WhileConnected.swift */, - 7DB481A1358C0BE35B508787868D54FD /* SingleAssignmentDisposable.swift */, - DCF50EC37251107F017096A20FAD1B06 /* SingleAsync.swift */, - 240B4D935992E8DADCD79B4A84CFF1EC /* Sink.swift */, - B20A8FAAF282D8676964013F2760CA6D /* Skip.swift */, - 39AAD57F8B68CAE00A161F77370FC914 /* SkipUntil.swift */, - 19AF502504F47C0798E7092BEB6B9B39 /* SkipWhile.swift */, - A475A7C0B8D84613688AB8C8ACB5884C /* StartWith.swift */, - B036D274E4D5AD086140240208840000 /* String+Rx.swift */, - F96BDB60268FE93517F6A1841809A66A /* SubjectType.swift */, - 84E12E978DD62B2B314912C8B3D9B2D8 /* SubscribeOn.swift */, - FD30ABDEAF12C709D2CFAEE44BD61855 /* SubscriptionDisposable.swift */, - A78E95B91181E96CFAAD9426F8ECB2B7 /* Switch.swift */, - AA6C27F646D9DA37047A67D6E212DE01 /* SwitchIfEmpty.swift */, - 6338FDB14507B24CB58218F277F30E43 /* SynchronizedDisposeType.swift */, - D887E9EE3AE9CED4927FF3B1167B1666 /* SynchronizedOnType.swift */, - 3B1358A738A6AB56494A5B17315FB1F2 /* SynchronizedSubscribeType.swift */, - 2C2DC15B4258C3CE43CBD6E60BEBAA49 /* SynchronizedUnsubscribeType.swift */, - 80E161B2311D9D7929D6B7F9882E9AA6 /* TailRecursiveSink.swift */, - 799D3B4718D965111427486583BFCB4C /* Take.swift */, - 916F25D4C8837908950EA7A5583E6967 /* TakeLast.swift */, - D8C41EDF5D0590810A390C8B56A31EA6 /* TakeUntil.swift */, - EB80FE113A2AE03AEB2962D1C5D4D2F4 /* TakeWhile.swift */, - FCE5D36F3E766348A125CB9493210152 /* Throttle.swift */, - 997F32138543863AC0F210BFA00BB640 /* Timeout.swift */, - C23575BCCF705A5D084A8C54D4993EFF /* Timer.swift */, - 2A61D671B6BDB3B11324645435740C94 /* ToArray.swift */, - B01F093B9DC7BDE27E632935D789B142 /* Using.swift */, - 7A486F8B23ABA0F788D6C2127EFE2FBF /* Variable.swift */, - 564A31F989B5B94D2BEB0F13DAC9D57F /* VirtualTimeConverterType.swift */, - 5BB3D0D57DDA732EEB38F6E1A785D162 /* VirtualTimeScheduler.swift */, - 92D1E08504CA891FF79253A362861CD4 /* Window.swift */, - C2EA211AF86729D5CE233ABCBDA27563 /* WithLatestFrom.swift */, - C1E3078211D55BC63E1088C38DAB6582 /* Zip.swift */, - 661CDC5032D166FBA5CE458E1BF640DE /* Zip+arity.swift */, - 61066E488C46D5D7C153F9ADA1703331 /* Zip+Collection.swift */, - D32CD3AADEE56BFEADB7609198DF067E /* Support Files */, + 694E66730BC717CAADA8FA907A1A5D67 /* Info.plist */, + D1BF1860830C7D6C6C4DCEA29B3B1A72 /* Result.modulemap */, + F87D4ED948A5076902CE684060F0CE21 /* Result.xcconfig */, + 6A02D79B87B95AAC12858D2761EFA288 /* Result-dummy.m */, + 0987593EA2560AA5A3F092B2FBC00C33 /* Result-prefix.pch */, + B5CE459308136BFD7A23BAF2F50CE800 /* Result-umbrella.h */, ); - name = RxSwift; - path = RxSwift; + name = "Support Files"; + path = "../Target Support Files/Result"; sourceTree = ""; }; - 6F2351C272926D3E0225FEFC2F9C5D1F /* Targets Support Files */ = { + 8E7DB3E7C72F1EEC778F39B5EE1ED7CE /* Support Files */ = { isa = PBXGroup; children = ( - ECC58720C5754A079F9A150E40E2FCDD /* Pods-Demo */, + BCFDB91280BF6D20EBD5B3A66B88AC8A /* Info.plist */, + E67B7571F6467514AA83F281E9E22099 /* RxSwift.modulemap */, + 24FBE73466F8534532B774BBAC7F2BFB /* RxSwift.xcconfig */, + 6388C76E87715C20A6CC8DE03465171B /* RxSwift-dummy.m */, + DDF2E31623D1233F5258FF7BEED50577 /* RxSwift-prefix.pch */, + 2A2A274B029E7DBF68ECEBC41DB939D1 /* RxSwift-umbrella.h */, ); - name = "Targets Support Files"; + name = "Support Files"; + path = "../Target Support Files/RxSwift"; sourceTree = ""; }; - 7CDCA8EAE1A76AF33DAE9408851C7386 /* Pods */ = { + 98A89FC49000D297EE97FC5183950416 /* RxSwift */ = { isa = PBXGroup; children = ( - 125B74C2B4F5BBAE204A098F5F0DEBBD /* Alamofire */, - F2E056EBAE0B1E4A610619F2925F4C0F /* Moya */, - CDA813BA90F26D1B7456B04C9ABF1038 /* ObjectMapper */, - 5D7E4758810E16798658755625F3933B /* Result */, - 6E0423DAD40F1CAABD04CC1985EB7A41 /* RxSwift */, + 0DB173081F30C6DAB1125FEC2ED97814 /* Source */, ); - name = Pods; + name = RxSwift; sourceTree = ""; }; - 7DB346D0F39D3F0E887471402A8071AB = { + A47AC22BC83A4DB74586D91553663489 /* RxSwift */ = { isa = PBXGroup; children = ( - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, - 35B1193275AB3E48E99302585172BA47 /* Development Pods */, - 439C1970038273E327AD68795DBC9575 /* Frameworks */, - 7CDCA8EAE1A76AF33DAE9408851C7386 /* Pods */, - F9F72CB2850F29621C1F407FEE5E7F7E /* Products */, - 6F2351C272926D3E0225FEFC2F9C5D1F /* Targets Support Files */, + 29F88EE7273190FB76AA77203F0E09D9 /* Observable+Response.swift */, + 3E4EC7FEC4148FDD842B176028C55D7C /* RxMoyaProvider.swift */, ); + name = RxSwift; sourceTree = ""; }; - 98A89FC49000D297EE97FC5183950416 /* RxSwift */ = { + B2AC03BF63856F089A70B7F9B900ADFF /* RxSwift */ = { isa = PBXGroup; children = ( - 0DB173081F30C6DAB1125FEC2ED97814 /* Source */, + 0955C8F4EEE352F4F3BB89BDD6435D23 /* AddRef.swift */, + 7C59839F18FF5FBE60CAFFB8EC168EBD /* Amb.swift */, + FAA9F221B24D7988307530A187CAD448 /* AnonymousDisposable.swift */, + 64C3B69219C8DAC02F5F39DD4B190606 /* AnonymousInvocable.swift */, + AD9B0A6DC72985BDA4754EA5E5CB07AA /* AnonymousObservable.swift */, + 10F5D71DF2264812C5731C22EE801A5A /* AnonymousObserver.swift */, + 5EE38E7FB91AA4AF88DBB6A67269E261 /* AnyObserver.swift */, + C117BF194A2FAB369D1E4E772735B1E4 /* AsMaybe.swift */, + 0323144B011FDDF6827A6B8DBA85B00B /* AsSingle.swift */, + E518D6231CACDB520F43AB4E8F044F7A /* AsyncLock.swift */, + 688D59A630A170299AE908873175B206 /* AsyncSubject.swift */, + D452F6F5AA184AAD5F2D67E79A3BD1E3 /* Bag.swift */, + B278163DD8869BD634FBC37A0A78314A /* Bag+Rx.swift */, + F76263CF98FEED7B4665B6B14CB9D4F8 /* BehaviorSubject.swift */, + 9801943BE07AE064B47351ADFD881292 /* BinaryDisposable.swift */, + DF39CE1238BC9EF2D3214D7964EF396D /* BooleanDisposable.swift */, + 78ED1ABA505DCC8516D0016B7499D512 /* Buffer.swift */, + 83002D71F6C2A538E2978182ADCAFFE8 /* Cancelable.swift */, + AC300EB7F7FA139928F6FFEEB3296AD1 /* Catch.swift */, + B40BE97A1246D8C49845492A55299637 /* CombineLatest.swift */, + D92F7DCD41D5266E43DFE3FAD66403EC /* CombineLatest+arity.swift */, + 27F4F2D54F853B9ABADEDC7188F43473 /* CombineLatest+Collection.swift */, + F9A5BACE751A31D7CCB9FD6E8C6E8DBC /* CompositeDisposable.swift */, + E352691A70D68412A4A0795C783344A3 /* Concat.swift */, + B16391692DB4F8314C30BC547232672C /* ConcurrentDispatchQueueScheduler.swift */, + F9FDA720EB4651BE9743F2A2025BA3C1 /* ConcurrentMainScheduler.swift */, + F2DEBF8CC407476366F482DC09F29DC2 /* ConnectableObservable.swift */, + D57C17E48D6B4C471E30BEBF78305148 /* ConnectableObservableType.swift */, + BF7114008E9479B082AECBF1E4A5B940 /* CurrentThreadScheduler.swift */, + 875489DE5BF92D2F4B1BBFCAC174EF6C /* Debounce.swift */, + 1FB6A4378F9D1425C55DF338352E66CA /* Debug.swift */, + 512139ACC7B2979F80FAC982F0DEA36D /* DefaultIfEmpty.swift */, + EEC6DAEDB2A4F64D0361DAC2A90CE887 /* Deferred.swift */, + A7ED7D46DDE3DB9F34D961D4247C9E58 /* Delay.swift */, + A1E2F6D667244D405AA74248C94355AA /* DelaySubscription.swift */, + B41B5597DB477AB7287337E1EE3C7756 /* Dematerialize.swift */, + 3907CB168DF78B3C72A05AEDC2EA319D /* Deprecated.swift */, + 9B00B9BA2EE7FD9C4875DE894CC6A0F3 /* DispatchQueue+Extensions.swift */, + 0D9789F67B20C11BE9288BBF80C538A2 /* DispatchQueueConfiguration.swift */, + F7D4C2831C5B7EDF94A1DD0CC97B961B /* Disposable.swift */, + 84E72054705675D860541F5F6B329ACA /* Disposables.swift */, + 9237F94E8BAA36CA82EFBF39F965662F /* DisposeBag.swift */, + EE74BAF25E92CDB17782F9AB8F17B753 /* DisposeBase.swift */, + D957E7D9F0804FBE080A56A0A7C32859 /* DistinctUntilChanged.swift */, + BD0ABD4914D2EE301F7AA43B4A12D682 /* Do.swift */, + DB39F4C98DB2DA3F40DE8A32E7558771 /* ElementAt.swift */, + 408788B1F07BDFF8D6682B7D0F390607 /* Empty.swift */, + B18971046EE71972C2987A1B44C687D6 /* Error.swift */, + 9E6D5912B420A7B69CCF77E5A9BF85AF /* Errors.swift */, + 9E382DB6FDB65DE94BABDD2844DAF6ED /* Event.swift */, + DEE360A15B39C568E762840D3A81CEEE /* Filter.swift */, + 26D6FB3D54BF5F3F7B355A811BABC5F6 /* Generate.swift */, + 3C0A8A53B1859DFABE02D98FD7DF7170 /* GroupBy.swift */, + FAA435219FB8D98ACAC9E82F3073CBFB /* GroupedObservable.swift */, + D1252E1B22A22F475C12151241EFCA4A /* HistoricalScheduler.swift */, + 23351BF9B507AE749916B9647001DB83 /* HistoricalSchedulerTimeConverter.swift */, + 9B4D6B8F41F79C94313C986AA2C95518 /* ImmediateScheduler.swift */, + 001EFFE7D56D6AB9A1B0174B1E4DCC82 /* ImmediateSchedulerType.swift */, + 3B323FC2F2AFFC1287FAEE9BF75E2A28 /* InfiniteSequence.swift */, + E351E6D538BA2A6289C52171C44274CA /* InvocableScheduledItem.swift */, + 6E72FDC1493E8F5625DF4379C9BA5C01 /* InvocableType.swift */, + 57C654F7468F90C4C3D24FED3C7F0D3E /* Just.swift */, + 742EC56A479A268680F0A5C9DF61FB5B /* Lock.swift */, + 7355FD9C656F3B499FFED26503A24844 /* LockOwnerType.swift */, + 7D27ED3A89AA80187EF62E0412529A5C /* MainScheduler.swift */, + 4F9CA1CA661AEDAD5A2067C8BDB787FC /* Map.swift */, + 9C4B16E320E5D74A88118C831CBBD69C /* Materialize.swift */, + CBDB1E14A220EC920FC1FB4625810264 /* Merge.swift */, + 89273F92A2616EA7FA505C493114118A /* Multicast.swift */, + 5344FF2D05FA74EC89EA389975D24554 /* Never.swift */, + 96C1E5A0EFA527E1432BBE96CDB023DA /* NopDisposable.swift */, + 04B07C2108E8AEAA49EC11D232391921 /* Observable.swift */, + CA266CC66D3EC65E521FA4162D360F99 /* Observable+Aggregate.swift */, + EAEEE030CE34EBFEF0FAD1318244A197 /* Observable+Binding.swift */, + CDCA1BEBEA42409A71611FD24B58954C /* Observable+Concurrency.swift */, + D173C71BCA0EEB68789915CF5F191766 /* Observable+Creation.swift */, + B4C0B5AE187B86FDFAE2E9FAE10E7302 /* Observable+Debug.swift */, + AC1CC8FE7C1707568F3CF44D87403355 /* Observable+Multiple.swift */, + 4A9E3FB60CB4A7D2085DAC4A5306B692 /* Observable+Single.swift */, + 06A276080DB9D3C2B9C7EEFD0570A670 /* Observable+StandardSequenceOperators.swift */, + A241B2831F3DA9FCBD98DDB4EC3E0B1C /* Observable+Time.swift */, + D1703CE57C3548B6E58DA6D64D29E55E /* ObservableConvertibleType.swift */, + 71A192DA8427E760595C241A5AFFDF72 /* ObservableType.swift */, + BE44D39AA5ECD4810DFE500D8E781CC3 /* ObservableType+Extensions.swift */, + 541F38739DEE9642687281F0AB4AFDAD /* ObserveOn.swift */, + D64B2CD1CD8D698E75A8D2074F3ACC4D /* ObserveOnSerialDispatchQueue.swift */, + 5969ECA4583F5C37DC5FBA6ACAA544EA /* ObserverBase.swift */, + 9AF2389D69944D193711EBCE256D550F /* ObserverType.swift */, + E22180E18B43026CD6CE1E8998EE15F6 /* OperationQueueScheduler.swift */, + D25145D395665027FD536D8204F2A151 /* Optional.swift */, + A0ED537BF046646C2C53B5881878C455 /* Platform.Darwin.swift */, + B249B91CED2F27F5A58276241ADD4BB7 /* Platform.Linux.swift */, + E27C09CC42C9E61A48D61D96E32C2224 /* PrimitiveSequence.swift */, + 4472D43DC36B93B0AD3D2324A022BD31 /* PrimitiveSequence+Zip+arity.swift */, + AD92FA237FCFC2D9C81216D0EBACCAAF /* PriorityQueue.swift */, + 7B7651A3BECCAA054599F73243B3CB7F /* Producer.swift */, + 4802F5EB9C4C88F88895D0E79CACB366 /* PublishSubject.swift */, + 533E4698572969FE535C01639240BD95 /* Queue.swift */, + 76432EFF66F0610C1FA74F991477EBE0 /* Range.swift */, + 863C51FEA45A7EDE989AC2754CDD717C /* Reactive.swift */, + 28297762695E3A606FF79D55CD44A1E8 /* RecursiveLock.swift */, + 16AC502307017147E0782DA0BE937992 /* RecursiveScheduler.swift */, + BC7FAF6B11CB54F533401E158C245898 /* Reduce.swift */, + 059700FB972CCDBE4E13C737B053F05C /* RefCount.swift */, + 6B1F9906C460EF3154ED146983F06918 /* RefCountDisposable.swift */, + ADE5FB20FE5428FAA73D3437465495EC /* Repeat.swift */, + 27C0B04261BDBBFD9B29D09D21BD1585 /* ReplaySubject.swift */, + 678D1077D40DA503F57304A63179B726 /* RetryWhen.swift */, + 21888844E9B22E9A361BF543DF18D25D /* Rx.swift */, + 57A565AA1BD6CD7E0C542B05BE4C9637 /* RxMutableBox.swift */, + 98A388B968E9204926C346DCDF6062B0 /* Sample.swift */, + 721E0361F5BD3060CD61E41333AC4C8D /* Scan.swift */, + 12F1244D10E55C3D0D44E5B32E114CC5 /* ScheduledDisposable.swift */, + 0EAD4354AECCA4CA0188E9ED5D4B7980 /* ScheduledItem.swift */, + B4A5B4C75C3181B16E43A4F7B73DE44A /* ScheduledItemType.swift */, + CB5F2649EE2009363B0F09C8A6ADA83A /* SchedulerServices+Emulation.swift */, + 7479AA1AE7EBE9F210DF7C06D08FA79E /* SchedulerType.swift */, + 1FD4883583337FBFDD03E78A3D2FB8B4 /* Sequence.swift */, + 3385E307C8C0628285FFAC438D4B6E7D /* SerialDispatchQueueScheduler.swift */, + 547E11C8EAF852818A6A4D608CE328A3 /* SerialDisposable.swift */, + DB4181F0665DFDE3AF0C2A4274054C91 /* ShareReplay1.swift */, + C357B7A689BF299853AB4DBCA4066AD0 /* ShareReplay1WhileConnected.swift */, + 08EC66818EEE7440780A0483FF548F6A /* SingleAssignmentDisposable.swift */, + 6F3FB9AB8D8CB0B217990A29076233B1 /* SingleAsync.swift */, + C371E36ECB06A5163E50660874EC28B5 /* Sink.swift */, + 8FED2C3C7E03453020D34A902D0A17AD /* Skip.swift */, + AF523A051E4C232B87A58BFDCF30CA5B /* SkipUntil.swift */, + 6804E8E2F017493A8ECEDBBCF0527D6F /* SkipWhile.swift */, + 2E03DD3956442CB4D8565AD68A91D369 /* StartWith.swift */, + F3A65AF290BC5C0CE5D5AF1B2454E60A /* String+Rx.swift */, + 2F11037BCF62A8272D103B2E0875AD7F /* SubjectType.swift */, + 84D4210F88F6EF7B49E63115D1E62FB0 /* SubscribeOn.swift */, + C241789ED7971C4DFA28779450E54AC2 /* SubscriptionDisposable.swift */, + 95093E2F9D63EA61DB4DAE904E414937 /* Switch.swift */, + 935C00337EC7391ACE992E18BB6528EC /* SwitchIfEmpty.swift */, + 8334CB787F208F16FF132C8023FD6F9C /* SynchronizedDisposeType.swift */, + DFE18FFE311C803F1501AFE9840B4850 /* SynchronizedOnType.swift */, + CEE4E537DE5502F9377401CE6CFC70E6 /* SynchronizedSubscribeType.swift */, + 7AAB9F6E60E4EF7EC35044ABA59EE4A3 /* SynchronizedUnsubscribeType.swift */, + 35D64D5D6EAE2F4029F0EE7D6856F4DB /* TailRecursiveSink.swift */, + DC4CFA50086C81153480348C921E9D7E /* Take.swift */, + 8C6FC130D59DFCF7457E87174231D525 /* TakeLast.swift */, + D5CFCA13C0BBA88AFC72A9C1CD73A031 /* TakeUntil.swift */, + 450BB2F541C923DB26C66811CB4E93F5 /* TakeWhile.swift */, + 33CBA7B0F508B12B0E6ABA92500E3EC2 /* Throttle.swift */, + E59D4F322D6E7D3BA6C49B1AA610A934 /* Timeout.swift */, + F38255D62E9D278E969DB4F061836F2F /* Timer.swift */, + ADC3881DD934E863CFEA3B949E0D18C9 /* ToArray.swift */, + F61330C472723B44F49FBA757C173823 /* Using.swift */, + 04314B6B8716BBC1C296C41E570D781D /* Variable.swift */, + 39E05E41EC88853ABC2E4FE509051C89 /* VirtualTimeConverterType.swift */, + DCC878974EE6DA072D98F52B51E84C1D /* VirtualTimeScheduler.swift */, + 21EC236CC3C0F46D0FE4C03207C993F2 /* Window.swift */, + F9B2274195EE237722674F6AEFFA5573 /* WithLatestFrom.swift */, + F09BF1757627FA226B630ABB73C959F9 /* Zip.swift */, + 82FDCC01E20E2C5AAE034A49D1ED5163 /* Zip+arity.swift */, + A0EC4E2078B430FE9F8672536722200A /* Zip+Collection.swift */, + 8E7DB3E7C72F1EEC778F39B5EE1ED7CE /* Support Files */, ); name = RxSwift; + path = RxSwift; sourceTree = ""; }; - C57F3013EE6F80888E6491A6406E7ABF /* Core */ = { + B5AE83A21A9312E806D59683AEBF2D6A /* ReactiveSwift */ = { isa = PBXGroup; children = ( - 5014812AD79454F0E0FD2BE2D47CC444 /* AccessTokenPlugin.swift */, - 6767DF0ABD392382DFED5C7A6D3B65FD /* Cancellable.swift */, - BF5A85C56ABF93FABAB75D404B933BAF /* CredentialsPlugin.swift */, - E488687E61384CA517A326F48C094B7F /* Endpoint.swift */, - FAA484FE691273E5B8770F3749E2D213 /* Image.swift */, - 9EDCEA32FD1274388C071D684E597EF3 /* Moya+Alamofire.swift */, - DEB2875695A6C93C38BB63FE6F20D065 /* MoyaAvailability.swift */, - 44FB0622417161D44D1295F0594BCC94 /* MoyaError.swift */, - 9D2833E1FEABBB28F556F914337C45CC /* MoyaProvider.swift */, - 6B9002B8A582F4D8A4C711D2D9521573 /* MoyaProvider+Defaults.swift */, - 279F3B60FADF3A816E09532160AE148B /* MoyaProvider+Internal.swift */, - A9AE2FF3B2C85504AD6B7F9063273BD5 /* MultipartFormData.swift */, - EC59C6D24A5BB1D61AD7C03C8438310B /* MultiTarget.swift */, - 8DF44F38795767C548C872478129378A /* NetworkActivityPlugin.swift */, - 5082A01A63EDB416806666A348ACA27D /* NetworkLoggerPlugin.swift */, - 8279331EFB9537F40D63DCB795CFF054 /* Plugin.swift */, - D53DBBEB67F5CB59D38B55D8087349A7 /* Response.swift */, - F297BF8E8E239ADE4CD269BA2BA737F0 /* TargetType.swift */, - ); - name = Core; + 3B2E3A21F478613F90988F19F11E3569 /* Action.swift */, + 6705998374BDFFB7FECAF1532B835BE1 /* Atomic.swift */, + ED7C53165F3F31D1A0C8C198AD696B9F /* Bag.swift */, + EF59E24C322B9D2F5CD6280927C40466 /* Deprecations+Removals.swift */, + D08FF4003628C1CF0EABD27982F41D46 /* Disposable.swift */, + 4FA8811DC202DD7DDD832600E9FA64F1 /* Event.swift */, + 353118FBD87FF65111631E0E224F8A29 /* EventLogger.swift */, + EDE1A466A002C993A806512B2E7382C4 /* Flatten.swift */, + B66BA2DCA8B77DD590AFFE169CFF7ED6 /* FoundationExtensions.swift */, + 404D82726264603AD565560110967D32 /* InhabitableTypeGuards.swift */, + 9169B63F6003C0F243F0388BF5958FF7 /* Lifetime.swift */, + 09F220F40C48109371DD3B972BC8211F /* Observer.swift */, + 75AAB49A85742D83E67B38D30B60B1D3 /* Optional.swift */, + 4365A2AB5A0772687317C91D2948110A /* Property.swift */, + B648F3AFC4C4633FA007EB713EA56506 /* Reactive.swift */, + 069941314ECEE9FA8027A5F8A227FF94 /* ResultExtensions.swift */, + D61C3FC49E8BFA92C986196BDFE8CAA7 /* Scheduler.swift */, + C15B29D41B7D19D513E61510C17CBF58 /* Signal.swift */, + 903F6654FD1FDACF86081CEF68EE96BB /* SignalProducer.swift */, + B3978B3D1F18561B41C5412350F64F37 /* UnidirectionalBinding.swift */, + 42090A07F20122A0BC3455BFA86F79A1 /* ValidatingProperty.swift */, + F8989E7C0AA2A245A0B8F379B80FA8DC /* Support Files */, + ); + name = ReactiveSwift; + path = ReactiveSwift; sourceTree = ""; }; - CDA813BA90F26D1B7456B04C9ABF1038 /* ObjectMapper */ = { + BCD215DA45F67E786C5A555F0DB273F7 /* Core */ = { isa = PBXGroup; children = ( - EA485D4018AE332771BD13B2F9EC57F5 /* CustomDateFormatTransform.swift */, - C3A45E67575A4363BF5289FB4D939BDF /* DataTransform.swift */, - E38E8050EF565B230ED30AF254B0687E /* DateFormatterTransform.swift */, - DC108DEF8BA98AB09C7BC0EAC6C794F1 /* DateTransform.swift */, - B18B75426512AAA18D540F3D35CBAA65 /* DictionaryTransform.swift */, - D49C9F5050C3E5E241292B6A8B089CC9 /* EnumOperators.swift */, - B1E8265196A3B631CE5537AB9DF3EABE /* EnumTransform.swift */, - 70AF4B49B39C3CFD638D93B2BE35164E /* FromJSON.swift */, - AD18F80559D118BE5911247C1F7EA041 /* HexColorTransform.swift */, - 9A70F83A8FC06F68A6DCAFCB1C1931A2 /* ImmutableMappable.swift */, - 78DC3A82104E37427CE082CB98D90BE7 /* IntegerOperators.swift */, - A6FA79F4F3EE613CEF674C035100A81A /* ISO8601DateTransform.swift */, - 99D1CB2D021B25A05AE5B9642315716B /* Map.swift */, - D44716B9F53DAF5AC9F273FCFA0B399E /* MapError.swift */, - 68F6717A6A6E815E92790C222C822568 /* Mappable.swift */, - 366273E57C16B8CB3BC7A597A7C76F5E /* Mapper.swift */, - 8F08A5CC14A1BDFDB69684234BAC72F9 /* NSDecimalNumberTransform.swift */, - 2CB6BBFA4EAE17E5FED8B104F1C58419 /* Operators.swift */, - 7E189ED6C9E024DF8E682C7E687F90A5 /* ToJSON.swift */, - 54F976946568B16991B730DAFD3EB62D /* TransformOf.swift */, - 20A9B0365625986701ED008EA54F7F95 /* TransformOperators.swift */, - 6C1C2F93115B3366C7A6769B1DA2D4C4 /* TransformType.swift */, - 97EBBD1A8250EFB9CC900440EAF658DA /* URLTransform.swift */, - 46E1298E7CA283A97B2B72D0C477E2A2 /* Support Files */, + B48C9F224CB97BCA0F526B6CE757E808 /* AccessTokenPlugin.swift */, + CD752EB8D371397CF0E0A452BFC6C66E /* Cancellable.swift */, + EB3363BA24CD0B09109B7746F6285B98 /* CredentialsPlugin.swift */, + 1EBA89D983DA12F498C2325A2BE8F733 /* Endpoint.swift */, + AF615E8CA506C163CA765AA9770F3AA1 /* Image.swift */, + 7DAA23E8CA642C818313760DEE872D76 /* Moya+Alamofire.swift */, + 04EDFDD25786A3582B951724C7D2FB88 /* MoyaAvailability.swift */, + 61E8E292AC6AFF21D423EDF3ED36D010 /* MoyaError.swift */, + D9B17B3054632B1067BBCA2C71A05333 /* MoyaProvider.swift */, + DDC14C03CD94BFBB95CEB5C52AE617A5 /* MoyaProvider+Defaults.swift */, + 05788979F32B6C5DF30DD0FD687D5936 /* MoyaProvider+Internal.swift */, + 48E9530C6F3DCB9C366850CA3F47B7B7 /* MultipartFormData.swift */, + C1F902FE19E3A7B35BE33971A520703F /* MultiTarget.swift */, + 55F91E7D6B0D44079FA709F9FA6A475B /* NetworkActivityPlugin.swift */, + FFC44176F598210ADBD3E383470714FB /* NetworkLoggerPlugin.swift */, + D714CB5781BB6873581A3DC0A79B9E85 /* Plugin.swift */, + 0B94AD22D41BE0EAB831D4A1FEBD2635 /* Response.swift */, + 0865A76D93AA95B23295EE2BCF3BC18C /* TargetType.swift */, ); - name = ObjectMapper; - path = ObjectMapper; + name = Core; sourceTree = ""; }; - D32CD3AADEE56BFEADB7609198DF067E /* Support Files */ = { + CCAD1ADCB14E6C0F0E2576EBB7E4FE9A /* Support Files */ = { isa = PBXGroup; children = ( - D048A38103EA82DF858BC4ED266694C3 /* Info.plist */, - E09B7EE0AC98AE274F75A17113B0DE2C /* RxSwift.modulemap */, - B68F992C4947F969BFD6675E16DE2F94 /* RxSwift.xcconfig */, - AFA910E4D8FDCAF115C39C34BB7DFB8A /* RxSwift-dummy.m */, - 1F8FFC78A7C1DA25CE9257446083D3C3 /* RxSwift-prefix.pch */, - D04530228D0DCF46892AE36E5DC63A88 /* RxSwift-umbrella.h */, + 4D0593D7232D6CD71C5F0AF9668BF14D /* Info.plist */, + E9B9231ACA143FEEA785BA2C77983B8C /* Moya.modulemap */, + 0C7805AC2429FAFC54029B4782D5F6A7 /* Moya.xcconfig */, + 79433C83DBA7AF7AAF0E9931F79CDEFE /* Moya-dummy.m */, + DD2732BF279345355DC7EAA129BD6F68 /* Moya-prefix.pch */, + BC64D2D57252E22F6FB7334A26BB9A40 /* Moya-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/RxSwift"; + path = "../Target Support Files/Moya"; sourceTree = ""; }; E72A724B57ABE13EFA3E36D7F3E2C193 /* Moya-ObjectMapper */ = { @@ -1172,6 +1279,21 @@ path = ../..; sourceTree = ""; }; + EB8FC93A3843019CFC06E2F16CCE292B /* Products */ = { + isa = PBXGroup; + children = ( + DF68A7F635878834BF11B3143131A980 /* Alamofire.framework */, + 205BBF1AA90ABD220FCD3EC814B1E0D7 /* Moya.framework */, + ED4A697F546D5D36E10B1AD245C29F8D /* Moya_ObjectMapper.framework */, + CE3DB0BD2F238B2028C47A1E2311DB68 /* ObjectMapper.framework */, + 89394607B9FE5C06608B8A97BC48ED42 /* Pods_Demo.framework */, + BB1F0348FD4C424F19EFB9411323F3FA /* ReactiveSwift.framework */, + 9EA5E26F527616CA14BA1AD883FEA452 /* Result.framework */, + 403F223F4F7DD41EE472F87D183F1020 /* RxSwift.framework */, + ); + name = Products; + sourceTree = ""; + }; ECC58720C5754A079F9A150E40E2FCDD /* Pods-Demo */ = { isa = PBXGroup; children = ( @@ -1190,37 +1312,37 @@ path = "Target Support Files/Pods-Demo"; sourceTree = ""; }; - F2E056EBAE0B1E4A610619F2925F4C0F /* Moya */ = { + F610F1E53D83CA0357103F3CB8C75AAC /* Core */ = { isa = PBXGroup; children = ( - C57F3013EE6F80888E6491A6406E7ABF /* Core */, - 3B22FC96734AED82C516C58A2D4C6232 /* RxSwift */, - 240BCDF90077DF8714427C5131DC2CC9 /* Support Files */, + 1B69AE029462AB330D6C645E827BE555 /* Source */, ); - name = Moya; - path = Moya; + name = Core; sourceTree = ""; }; - F610F1E53D83CA0357103F3CB8C75AAC /* Core */ = { + F8989E7C0AA2A245A0B8F379B80FA8DC /* Support Files */ = { isa = PBXGroup; children = ( - 1B69AE029462AB330D6C645E827BE555 /* Source */, + D713B360945685B908ADE8C9D5C1E900 /* Info.plist */, + 5738BAEBE9590332CEC15173EF2E68E7 /* ReactiveSwift.modulemap */, + 0BECA3CFB229CD34026ABBD1E893ABD8 /* ReactiveSwift.xcconfig */, + 7134E6FE5CB1D5BBC04158D17EF07982 /* ReactiveSwift-dummy.m */, + E12B1ED1B4C0A93A3519BA3B7C28DA68 /* ReactiveSwift-prefix.pch */, + D3891B24536C2EEB56439F4AE948F504 /* ReactiveSwift-umbrella.h */, ); - name = Core; + name = "Support Files"; + path = "../Target Support Files/ReactiveSwift"; sourceTree = ""; }; - F9F72CB2850F29621C1F407FEE5E7F7E /* Products */ = { + FDD1695A3B721B245397974BC61D715D /* Result */ = { isa = PBXGroup; children = ( - 458E8181BA8E5F0826DA11AFBFE8F017 /* Alamofire.framework */, - 64F6F3D67DCBBFD9C51417546F1841A6 /* Moya.framework */, - 74E1D911F9F5881749CDA2F365FFFAC6 /* Moya_ObjectMapper.framework */, - 42B9037B64668A5DE610FCC3F18B39C5 /* ObjectMapper.framework */, - E7DB8A6E1CA6E57C673C24C4AC79CAE3 /* Pods_Demo.framework */, - 7BA3BEEAEEC210EC8CF52DC782F44A81 /* Result.framework */, - 712A10695F5EFC41FC3420F2341BEBAF /* RxSwift.framework */, + 9427D33D9A21060CC4CC8E4507E7CFAD /* Result.swift */, + 4F56CB1AD0A49EC42E54D6467761239E /* ResultProtocol.swift */, + 7FAA33E810429A0457651FC58663CCD5 /* Support Files */, ); - name = Products; + name = Result; + path = Result; sourceTree = ""; }; /* End PBXGroup section */ @@ -1250,11 +1372,11 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 650FE484FC73065432C2356FF5B244E6 /* Headers */ = { + 5F93B701DD1956BB7B8E207C6B6440EA /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 9701EFB020B3EB64920A7D6D2A6BC667 /* Pods-Demo-umbrella.h in Headers */, + 6645924370EB7C1E703FB3C2F96AEFF6 /* Pods-Demo-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1274,6 +1396,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 9285BDE0320C7663A2F34BF73CCB9B8A /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + E29E386B034313C62E76D5DFF609F830 /* ReactiveSwift-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; B4002B6E97835FDCCAA5963EFE09A3E0 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -1302,14 +1432,14 @@ ); name = Moya; productName = Moya; - productReference = 64F6F3D67DCBBFD9C51417546F1841A6 /* Moya.framework */; + productReference = 205BBF1AA90ABD220FCD3EC814B1E0D7 /* Moya.framework */; productType = "com.apple.product-type.framework"; }; 421F6BEF92744C4CA9E5F012EC4C5C8F /* ObjectMapper */ = { isa = PBXNativeTarget; buildConfigurationList = 87F2C5A63CCA45E4DAD04FD5F0F3B408 /* Build configuration list for PBXNativeTarget "ObjectMapper" */; buildPhases = ( - 9FB6967D6284FCF457F4EE6C6D983DA7 /* Sources */, + 41CF8C636E06846C7404D2423D825020 /* Sources */, 57DAEC1F412B81BA3BAAEE802D25A74A /* Frameworks */, 8D9E6122EE97FD52CD98930DD2F3471F /* Headers */, ); @@ -1319,7 +1449,7 @@ ); name = ObjectMapper; productName = ObjectMapper; - productReference = 42B9037B64668A5DE610FCC3F18B39C5 /* ObjectMapper.framework */; + productReference = CE3DB0BD2F238B2028C47A1E2311DB68 /* ObjectMapper.framework */; productType = "com.apple.product-type.framework"; }; 49C6564B2E2D0A1604946BAD65772E21 /* Moya-ObjectMapper */ = { @@ -1341,47 +1471,48 @@ ); name = "Moya-ObjectMapper"; productName = "Moya-ObjectMapper"; - productReference = 74E1D911F9F5881749CDA2F365FFFAC6 /* Moya_ObjectMapper.framework */; + productReference = ED4A697F546D5D36E10B1AD245C29F8D /* Moya_ObjectMapper.framework */; productType = "com.apple.product-type.framework"; }; - 8877E08ADA63ED416CDAD570805E542C /* Pods-Demo */ = { + 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */ = { isa = PBXNativeTarget; - buildConfigurationList = FC86D0FB9B9BC3EDC784978B82192B26 /* Build configuration list for PBXNativeTarget "Pods-Demo" */; + buildConfigurationList = 419E5D95491847CD79841B971A8A3277 /* Build configuration list for PBXNativeTarget "Alamofire" */; buildPhases = ( - 187102A71F311BE6F5C3DBCD6FFEAD89 /* Sources */, - CACE9679738C523492B99E07550C1CA9 /* Frameworks */, - 650FE484FC73065432C2356FF5B244E6 /* Headers */, + 32B9974868188C4803318E36329C87FE /* Sources */, + 99195E4207764744AEC07ECCBCD550EB /* Frameworks */, + B4002B6E97835FDCCAA5963EFE09A3E0 /* Headers */, ); buildRules = ( ); dependencies = ( - 5016FB89549450F6D8BECD6F498E920A /* PBXTargetDependency */, - 0966EEB7D7BBBB2171382E743EC11DB2 /* PBXTargetDependency */, - A44BC6C967AF8FDD38BA09C0533B38D1 /* PBXTargetDependency */, - 0896172A4E39B66EEE123CAE1124A792 /* PBXTargetDependency */, - B08E59184B1009B64FE0895690C984D7 /* PBXTargetDependency */, - 44C6FACC27EBDE1CF853476AFB1E5540 /* PBXTargetDependency */, ); - name = "Pods-Demo"; - productName = "Pods-Demo"; - productReference = E7DB8A6E1CA6E57C673C24C4AC79CAE3 /* Pods_Demo.framework */; + name = Alamofire; + productName = Alamofire; + productReference = DF68A7F635878834BF11B3143131A980 /* Alamofire.framework */; productType = "com.apple.product-type.framework"; }; - 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */ = { + BEB7C81E62FD25739CA5BB7DD89CC19F /* Pods-Demo */ = { isa = PBXNativeTarget; - buildConfigurationList = 419E5D95491847CD79841B971A8A3277 /* Build configuration list for PBXNativeTarget "Alamofire" */; + buildConfigurationList = DCAEB9DC05E4B00969EEDA5239B5D1CE /* Build configuration list for PBXNativeTarget "Pods-Demo" */; buildPhases = ( - 32B9974868188C4803318E36329C87FE /* Sources */, - 99195E4207764744AEC07ECCBCD550EB /* Frameworks */, - B4002B6E97835FDCCAA5963EFE09A3E0 /* Headers */, + 06E6E99B0490EF6B1838F6FA5EDDD90B /* Sources */, + 68DBCBEC97BE6A6FD2A426C4CBAF68F7 /* Frameworks */, + 5F93B701DD1956BB7B8E207C6B6440EA /* Headers */, ); buildRules = ( ); dependencies = ( + 72707AFB3EBC1B8A7A4DEA3440058911 /* PBXTargetDependency */, + A7D5A143C8177B1DF392BF2179558685 /* PBXTargetDependency */, + 4B0E8D78D36E9B0E838DDA23E7E70EC6 /* PBXTargetDependency */, + BE1C6A30343ADD12B4C0A213B62072E8 /* PBXTargetDependency */, + 41311E25157250731EBEB5CE437C0ED0 /* PBXTargetDependency */, + 1C40F60B71AF0364B7E000EDE0779F4C /* PBXTargetDependency */, + 21664BF2E2BAF4ED27C03D6B5AA3EDFC /* PBXTargetDependency */, ); - name = Alamofire; - productName = Alamofire; - productReference = 458E8181BA8E5F0826DA11AFBFE8F017 /* Alamofire.framework */; + name = "Pods-Demo"; + productName = "Pods-Demo"; + productReference = 89394607B9FE5C06608B8A97BC48ED42 /* Pods_Demo.framework */; productType = "com.apple.product-type.framework"; }; C419A9BCC9AACDC44A26B80764B6B554 /* RxSwift */ = { @@ -1398,7 +1529,7 @@ ); name = RxSwift; productName = RxSwift; - productReference = 712A10695F5EFC41FC3420F2341BEBAF /* RxSwift.framework */; + productReference = 403F223F4F7DD41EE472F87D183F1020 /* RxSwift.framework */; productType = "com.apple.product-type.framework"; }; EFDB85DF4827734B35E8A46720ACAEE0 /* Result */ = { @@ -1415,7 +1546,25 @@ ); name = Result; productName = Result; - productReference = 7BA3BEEAEEC210EC8CF52DC782F44A81 /* Result.framework */; + productReference = 9EA5E26F527616CA14BA1AD883FEA452 /* Result.framework */; + productType = "com.apple.product-type.framework"; + }; + FDF0AE36CC489EF7ECB20E4E8C5EC6E5 /* ReactiveSwift */ = { + isa = PBXNativeTarget; + buildConfigurationList = EF35564E0995115C18C0EF751687764B /* Build configuration list for PBXNativeTarget "ReactiveSwift" */; + buildPhases = ( + 2FEE51447579C8C24CDD62E671BA516C /* Sources */, + A8C1D60D3ABBCFFCC097218325B728B3 /* Frameworks */, + 9285BDE0320C7663A2F34BF73CCB9B8A /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 7CD6378E14F4CB903EA9F867812CB21D /* PBXTargetDependency */, + ); + name = ReactiveSwift; + productName = ReactiveSwift; + productReference = BB1F0348FD4C424F19EFB9411323F3FA /* ReactiveSwift.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -1424,7 +1573,7 @@ D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0730; + LastSwiftUpdateCheck = 0830; LastUpgradeCheck = 0700; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; @@ -1435,7 +1584,7 @@ en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = F9F72CB2850F29621C1F407FEE5E7F7E /* Products */; + productRefGroup = EB8FC93A3843019CFC06E2F16CCE292B /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( @@ -1443,7 +1592,8 @@ 2A6D0851BA24DD25864CB23A3A83B9CC /* Moya */, 49C6564B2E2D0A1604946BAD65772E21 /* Moya-ObjectMapper */, 421F6BEF92744C4CA9E5F012EC4C5C8F /* ObjectMapper */, - 8877E08ADA63ED416CDAD570805E542C /* Pods-Demo */, + BEB7C81E62FD25739CA5BB7DD89CC19F /* Pods-Demo */, + FDF0AE36CC489EF7ECB20E4E8C5EC6E5 /* ReactiveSwift */, EFDB85DF4827734B35E8A46720ACAEE0 /* Result */, C419A9BCC9AACDC44A26B80764B6B554 /* RxSwift */, ); @@ -1451,11 +1601,40 @@ /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - 187102A71F311BE6F5C3DBCD6FFEAD89 /* Sources */ = { + 06E6E99B0490EF6B1838F6FA5EDDD90B /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 75FC8E65A81FA6F5312FBF3CA7CA0279 /* Pods-Demo-dummy.m in Sources */, + FF1B28B0E4069ADCCDDE21DCC00A09CE /* Pods-Demo-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2FEE51447579C8C24CDD62E671BA516C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E5362121A30FEA455E7E6654111D38E0 /* Action.swift in Sources */, + 60A8A8EE66C89410E4CF32DCF54B0104 /* Atomic.swift in Sources */, + 96BA1F0C033A1766271910B4E6AC82F7 /* Bag.swift in Sources */, + F7531BCE8855F7B136327F3415C9ED8C /* Deprecations+Removals.swift in Sources */, + 63BFEFECB9A2FFB46347AF8D7A6010C9 /* Disposable.swift in Sources */, + B3A17E35B391DA28195A889C979540A4 /* Event.swift in Sources */, + 7FF874C342E47D633982FB42AC3DC678 /* EventLogger.swift in Sources */, + 4F9AD7B1CCC4896B36B31A0E03003BB4 /* Flatten.swift in Sources */, + 60CA6E3F0423817E9812E85C863B3904 /* FoundationExtensions.swift in Sources */, + 42DABB15B8D979767E0F44C1F53AE17F /* InhabitableTypeGuards.swift in Sources */, + D2D6D73DA2F023FA2E7B143443642610 /* Lifetime.swift in Sources */, + B841A940A08AE08C411F778E85D6A5A2 /* Observer.swift in Sources */, + 765794766945F0DF2B0E0298F666ED25 /* Optional.swift in Sources */, + B5C6D4544EE71387786B09CAC6DDB126 /* Property.swift in Sources */, + 6495ECC6B3EB7CF17D20A4521995E8EE /* Reactive.swift in Sources */, + 0ECB1FCB4B9AFE4C0E9A80FC223BC787 /* ReactiveSwift-dummy.m in Sources */, + 8F9C9D2863DF04D1B82569FB74F92B76 /* ResultExtensions.swift in Sources */, + 8285A0E95F833AD6C8C0B6B4430C6EDC /* Scheduler.swift in Sources */, + 6C5A8FEF60C73A2EB3E76E377F9A9980 /* Signal.swift in Sources */, + 0BEE3A2E43CD635836111FD0AB701E16 /* SignalProducer.swift in Sources */, + 3176BBD94BCD96863313626D1F2389A6 /* UnidirectionalBinding.swift in Sources */, + 76776FFFB0888B0064B5D06F87C56F1C /* ValidatingProperty.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1484,6 +1663,37 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 41CF8C636E06846C7404D2423D825020 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 09DB9B04AEECC7468A86685AD754BE5C /* CustomDateFormatTransform.swift in Sources */, + 739F7DBD923F4F358E72B105EB878680 /* DataTransform.swift in Sources */, + A9086E9CAEDB5F1144385BBFD8FCBF2F /* DateFormatterTransform.swift in Sources */, + 69BF30EE9140E7086BA82C4DB6938ABC /* DateTransform.swift in Sources */, + 0E1548980432E6CA13021CA74E639EA2 /* DictionaryTransform.swift in Sources */, + 57D4500DF5AC27397C1EC0D58D4D77A3 /* EnumOperators.swift in Sources */, + C4809B395ED9DA6B754944A80ADFD0AA /* EnumTransform.swift in Sources */, + 000CAA7B68BCC90DFFBD95BED8A2038D /* FromJSON.swift in Sources */, + B8AC7A8094077E16A17F340769E7D6DC /* HexColorTransform.swift in Sources */, + F5155D5C24499638C6C3124FC4FE4264 /* ImmutableMappable.swift in Sources */, + 4B5B309384D3880D2CE23CD3B5375DDB /* IntegerOperators.swift in Sources */, + 0AC4D4C16737845EB4BC47ED4C13E504 /* ISO8601DateTransform.swift in Sources */, + 1FC11BFA37680C9CA9F198E6A1881005 /* Map.swift in Sources */, + CED27CF9BC6DEADC4034354FFD243D0A /* MapError.swift in Sources */, + CA1BFF20FE43D75453B6F302BCD287DA /* Mappable.swift in Sources */, + 2FE4DAE5F7A4342DF8D3DC589B732685 /* Mapper.swift in Sources */, + 2D694447FB3438F52AEEB36230A387CA /* NSDecimalNumberTransform.swift in Sources */, + 84AEFE898ED7A873994E4BAE43079AA0 /* ObjectMapper-dummy.m in Sources */, + EF6A3C105AFA2332D931D70A5E8DE01E /* Operators.swift in Sources */, + 9E9354DCA18BE46AAAAC5338C88DDECD /* ToJSON.swift in Sources */, + EB11EC3B3706810D31F002F2D479975A /* TransformOf.swift in Sources */, + 0CB40B5FA8ED1D19D39A6E2E45B6F8D9 /* TransformOperators.swift in Sources */, + A9005AC4AC9220336B29D7B057D0EF7B /* TransformType.swift in Sources */, + F6EBAD7C469937AEDFC63FA87EBEA647 /* URLTransform.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 67467CBD1F09727991BB579C830B7EA6 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -1522,37 +1732,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 9FB6967D6284FCF457F4EE6C6D983DA7 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - B300B909E5AED20A51147C29AA17DC96 /* CustomDateFormatTransform.swift in Sources */, - 87C9350610025E34B6AD9B9D076AAFB5 /* DataTransform.swift in Sources */, - A923BA9C11A0F7011736FBA45722082A /* DateFormatterTransform.swift in Sources */, - E34A58D59775F7D9C406CC4090FE2D9F /* DateTransform.swift in Sources */, - EFA40542846DF8E2CFF6659FE2739422 /* DictionaryTransform.swift in Sources */, - B13E3435F51146E70094CE23160EECFC /* EnumOperators.swift in Sources */, - F700E0C8F99C40C769829C7B4AA618DC /* EnumTransform.swift in Sources */, - 380C3B007662930AF04A7C1733070AFB /* FromJSON.swift in Sources */, - 4C578BC13A227138E6BE26A74025B848 /* HexColorTransform.swift in Sources */, - 037029FDDBE69FD9CBA0ECCE847A3FEB /* ImmutableMappable.swift in Sources */, - 218C9303A963293AF3098CA758C549E2 /* IntegerOperators.swift in Sources */, - F7CC50FA94AFDE261F512B33FE39FB94 /* ISO8601DateTransform.swift in Sources */, - 0589A2581F370CC064FCF684189404A3 /* Map.swift in Sources */, - F205A1C1630D25EFFE14D37128980424 /* MapError.swift in Sources */, - 5522B903C46D80E2A1D1EC8B29C96D54 /* Mappable.swift in Sources */, - DFFDFFAD6E348BB076DC489A151C022D /* Mapper.swift in Sources */, - 772FC6D8B4525B393A95A85B4D5DA001 /* NSDecimalNumberTransform.swift in Sources */, - C5DDC9BC60F2810EFA773F07822CE322 /* ObjectMapper-dummy.m in Sources */, - 119AF3B25A9CFAA50085DCFE55057051 /* Operators.swift in Sources */, - D8970EF683A1A04ACB770927ED46345B /* ToJSON.swift in Sources */, - 079DAEF92CDCF3DA376694301E257A48 /* TransformOf.swift in Sources */, - BED9715A5EA1F5CFC3F69728D8E91FE7 /* TransformOperators.swift in Sources */, - 3F0C39B1549DC1FFF72E6556B4F7954E /* TransformType.swift in Sources */, - C0A48D41BF578503DE735C6EDB7EB459 /* URLTransform.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; CBCCE006462499F6127948ACF97EF490 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -1731,17 +1910,17 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 0896172A4E39B66EEE123CAE1124A792 /* PBXTargetDependency */ = { + 1C40F60B71AF0364B7E000EDE0779F4C /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = ObjectMapper; - target = 421F6BEF92744C4CA9E5F012EC4C5C8F /* ObjectMapper */; - targetProxy = 7E295E22CA5CAC345532DF47CADAE8EA /* PBXContainerItemProxy */; + name = Result; + target = EFDB85DF4827734B35E8A46720ACAEE0 /* Result */; + targetProxy = 35B40C47871A2BFB66B1DF89719C2C43 /* PBXContainerItemProxy */; }; - 0966EEB7D7BBBB2171382E743EC11DB2 /* PBXTargetDependency */ = { + 21664BF2E2BAF4ED27C03D6B5AA3EDFC /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = Moya; - target = 2A6D0851BA24DD25864CB23A3A83B9CC /* Moya */; - targetProxy = C5B2FDD1C7D0714C981FAA527CA63027 /* PBXContainerItemProxy */; + name = RxSwift; + target = C419A9BCC9AACDC44A26B80764B6B554 /* RxSwift */; + targetProxy = FA50F55E715BCB4DB08596E4D2F259BD /* PBXContainerItemProxy */; }; 304A51463AA62541C01678DE43BFA33F /* PBXTargetDependency */ = { isa = PBXTargetDependency; @@ -1755,17 +1934,17 @@ target = EFDB85DF4827734B35E8A46720ACAEE0 /* Result */; targetProxy = A1AF79BA4FFB31FAEFB631D90EA93418 /* PBXContainerItemProxy */; }; - 44C6FACC27EBDE1CF853476AFB1E5540 /* PBXTargetDependency */ = { + 41311E25157250731EBEB5CE437C0ED0 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = RxSwift; - target = C419A9BCC9AACDC44A26B80764B6B554 /* RxSwift */; - targetProxy = D4D369F3E79C27EA7752DBEACC034F00 /* PBXContainerItemProxy */; + name = ReactiveSwift; + target = FDF0AE36CC489EF7ECB20E4E8C5EC6E5 /* ReactiveSwift */; + targetProxy = 799FA77BC02BC3B70E591F74839DDAE4 /* PBXContainerItemProxy */; }; - 5016FB89549450F6D8BECD6F498E920A /* PBXTargetDependency */ = { + 4B0E8D78D36E9B0E838DDA23E7E70EC6 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = Alamofire; - target = 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */; - targetProxy = 2FCB5E9BBEB9FEA8F764DD24E1B328EA /* PBXContainerItemProxy */; + name = "Moya-ObjectMapper"; + target = 49C6564B2E2D0A1604946BAD65772E21 /* Moya-ObjectMapper */; + targetProxy = D34606F68216E7E7B0E351AA2C8ADF14 /* PBXContainerItemProxy */; }; 60E025535DE828762DEF1025B460FC8A /* PBXTargetDependency */ = { isa = PBXTargetDependency; @@ -1779,17 +1958,29 @@ target = 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */; targetProxy = 563430843E61782275D71EED528CBEFF /* PBXContainerItemProxy */; }; - A44BC6C967AF8FDD38BA09C0533B38D1 /* PBXTargetDependency */ = { + 72707AFB3EBC1B8A7A4DEA3440058911 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "Moya-ObjectMapper"; - target = 49C6564B2E2D0A1604946BAD65772E21 /* Moya-ObjectMapper */; - targetProxy = DB9F2D9BCF03D2D690ABC2C1540B4367 /* PBXContainerItemProxy */; + name = Alamofire; + target = 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */; + targetProxy = EEA2469DF649FCFD5814639A808C1C6A /* PBXContainerItemProxy */; }; - B08E59184B1009B64FE0895690C984D7 /* PBXTargetDependency */ = { + 7CD6378E14F4CB903EA9F867812CB21D /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Result; target = EFDB85DF4827734B35E8A46720ACAEE0 /* Result */; - targetProxy = 172BFED3498D5C686525F100B519327F /* PBXContainerItemProxy */; + targetProxy = A3E49214DCAD05F7955595F8042E3AA2 /* PBXContainerItemProxy */; + }; + A7D5A143C8177B1DF392BF2179558685 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Moya; + target = 2A6D0851BA24DD25864CB23A3A83B9CC /* Moya */; + targetProxy = A3DE26FFB53C6E483B9E9E586F64C58E /* PBXContainerItemProxy */; + }; + BE1C6A30343ADD12B4C0A213B62072E8 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = ObjectMapper; + target = 421F6BEF92744C4CA9E5F012EC4C5C8F /* ObjectMapper */; + targetProxy = CBB41F96F2BCDB97F851ED133FC81786 /* PBXContainerItemProxy */; }; C46C0FBEB937D4E7BDA5BE25A905EA46 /* PBXTargetDependency */ = { isa = PBXTargetDependency; @@ -1818,10 +2009,11 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 0105E95059DC7D914EE728380201A0BB /* Release */ = { + 4497E56B2264E0931C8297A3CB1CCFB5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B68F992C4947F969BFD6675E16DE2F94 /* RxSwift.xcconfig */; + baseConfigurationReference = 0C7805AC2429FAFC54029B4782D5F6A7 /* Moya.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -1833,16 +2025,17 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxSwift/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Moya/Moya-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/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/RxSwift/RxSwift.modulemap"; + MODULEMAP_FILE = "Target Support Files/Moya/Moya.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = RxSwift; + PRODUCT_NAME = Moya; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; @@ -1850,10 +2043,59 @@ }; name = Release; }; - 0846747F48797E2E5D20795EB9797102 /* Debug */ = { + 4E487F173E6C9664F4E9E26B9635D23C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = CC6A59B0ADA6CB2F51DAE6508E437829 /* Pods-Demo.debug.xcconfig */; buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + ONLY_ACTIVE_ARCH = YES; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + 70CC9B0A50824719A3CE6904E8C04621 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 24FBE73466F8534532B774BBAC7F2BFB /* RxSwift.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -1865,31 +2107,30 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-Demo/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/RxSwift/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.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-Demo/Pods-Demo.modulemap"; + MODULEMAP_FILE = "Target Support Files/RxSwift/RxSwift.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_Demo; + PRODUCT_NAME = RxSwift; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 0A29B6F510198AF64EFD762EF6FA97A5 /* Release */ = { + 7D072D0D174F12EAACC1862DA756E67A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 051A719FA532DB9A6297CA9ECAB7712F /* Alamofire.xcconfig */; + baseConfigurationReference = D2B67F026BFB03CD5D152C213DEBF2BC /* Alamofire.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -1911,6 +2152,7 @@ PRODUCT_NAME = Alamofire; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; @@ -1918,43 +2160,45 @@ }; name = Release; }; - 18CE3A9514DE5309012D26338C9CCBAA /* Debug */ = { + 828F7F4CEDE6FAA20950646139BF3C13 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 641CC99CF2A41BA53EBC44529FC9D698 /* Result.xcconfig */; + baseConfigurationReference = 24FBE73466F8534532B774BBAC7F2BFB /* RxSwift.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Result/Result-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Result/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/RxSwift/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Result/Result.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Result; + MODULEMAP_FILE = "Target Support Files/RxSwift/RxSwift.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = RxSwift; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - 22D1335CE6968074A157FBF2E5514FE2 /* Debug */ = { + 9297A6E0B9ED86304C3FBD7DA208EBDE /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 835A4CCC1208A301A94815286B0DE285 /* Moya.xcconfig */; + baseConfigurationReference = 78A4128EC1CBD80E45085664E5D7CF4B /* Moya-ObjectMapper.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -1966,16 +2210,17 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Moya/Moya-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Moya/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Moya-ObjectMapper/Moya-ObjectMapper-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Moya-ObjectMapper/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"; + MODULEMAP_FILE = "Target Support Files/Moya-ObjectMapper/Moya-ObjectMapper.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Moya; + PRODUCT_NAME = Moya_ObjectMapper; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1984,10 +2229,45 @@ }; name = Debug; }; - 2449B02C3394F5813139D62FAFB7F262 /* Release */ = { + 9AC62FAC9BD7263A39A52519E97FF911 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 78A4128EC1CBD80E45085664E5D7CF4B /* Moya-ObjectMapper.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/Moya-ObjectMapper/Moya-ObjectMapper-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Moya-ObjectMapper/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-ObjectMapper/Moya-ObjectMapper.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = Moya_ObjectMapper; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 9CD8E4195A995ADAE1FAF22815A61B51 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = DAB0701F8F25395B1ED46510ED4B9797 /* Pods-Demo.release.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -2013,48 +2293,54 @@ PRODUCT_NAME = Pods_Demo; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - 2665E7676BD062E54B6924F01BA9B617 /* Release */ = { + AD58472A97F9820F8411E093CA83C192 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 641CC99CF2A41BA53EBC44529FC9D698 /* Result.xcconfig */; + baseConfigurationReference = 0BECA3CFB229CD34026ABBD1E893ABD8 /* ReactiveSwift.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Result/Result-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Result/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/ReactiveSwift/ReactiveSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/ReactiveSwift/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Result/Result.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Result; + MODULEMAP_FILE = "Target Support Files/ReactiveSwift/ReactiveSwift.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = ReactiveSwift; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - 3C111DD46E693429FF48D344367B8235 /* Release */ = { + AD955452219BEA709ACE34C7410D8FC2 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1C680511F09B57462B53519506B25D68 /* ObjectMapper.xcconfig */; + baseConfigurationReference = F87D4ED948A5076902CE684060F0CE21 /* Result.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -2066,16 +2352,17 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/ObjectMapper/ObjectMapper-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/ObjectMapper/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Result/Result-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Result/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/ObjectMapper/ObjectMapper.modulemap"; + MODULEMAP_FILE = "Target Support Files/Result/Result.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = ObjectMapper; + PRODUCT_NAME = Result; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; @@ -2083,118 +2370,85 @@ }; name = Release; }; - 4972B5769ABEF0347A863954882857D2 /* Release */ = { + B2ACBF5404E1D85CF618B51F9C3772E5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 78A4128EC1CBD80E45085664E5D7CF4B /* Moya-ObjectMapper.xcconfig */; + baseConfigurationReference = 0C7805AC2429FAFC54029B4782D5F6A7 /* 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; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Moya-ObjectMapper/Moya-ObjectMapper-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Moya-ObjectMapper/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Moya/Moya-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/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-ObjectMapper/Moya-ObjectMapper.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Moya_ObjectMapper; + MODULEMAP_FILE = "Target Support Files/Moya/Moya.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = Moya; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; - }; - 59B042A655B7C20CBAB90E385BF4E4C7 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - }; name = Debug; }; - 84CDC80FB0C422BA65B62F0147CD3818 /* Release */ = { + B2C5CA79AABB9B1D6E081B7EBE7576BF /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 835A4CCC1208A301A94815286B0DE285 /* Moya.xcconfig */; + baseConfigurationReference = CC6A59B0ADA6CB2F51DAE6508E437829 /* Pods-Demo.debug.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Moya/Moya-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Moya/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-Demo/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/Moya/Moya.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Moya; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-Demo/Pods-Demo.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_Demo; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - A8C65D7DCDC22026A85288A376E04B97 /* Debug */ = { + BC27256FF866F4C545DAC8ACC955DD2F /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B68F992C4947F969BFD6675E16DE2F94 /* RxSwift.xcconfig */; + baseConfigurationReference = C9C496D6996BC8AFD85DE80CAC38D329 /* ObjectMapper.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -2206,16 +2460,17 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxSwift/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/ObjectMapper/ObjectMapper-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/ObjectMapper/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"; + MODULEMAP_FILE = "Target Support Files/ObjectMapper/ObjectMapper.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = RxSwift; + PRODUCT_NAME = ObjectMapper; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -2224,11 +2479,12 @@ }; name = Debug; }; - B7324857C38B065FEB1EEE3105C2367A /* Release */ = { + BDD0139D6EB93FA375F887ABD62DAB2E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -2236,10 +2492,13 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGNING_REQUIRED = NO; @@ -2264,43 +2523,45 @@ }; name = Release; }; - D8531D535CEDBB80608E7E6C7E7E5E04 /* Debug */ = { + BF52078B09DAFA6019E725AC8FA9EFCE /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 78A4128EC1CBD80E45085664E5D7CF4B /* Moya-ObjectMapper.xcconfig */; + baseConfigurationReference = C9C496D6996BC8AFD85DE80CAC38D329 /* ObjectMapper.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Moya-ObjectMapper/Moya-ObjectMapper-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Moya-ObjectMapper/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/ObjectMapper/ObjectMapper-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/ObjectMapper/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-ObjectMapper/Moya-ObjectMapper.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Moya_ObjectMapper; + MODULEMAP_FILE = "Target Support Files/ObjectMapper/ObjectMapper.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = ObjectMapper; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - F383079BFBF927813EA3613CFB679FDE /* Debug */ = { + C9660A42FEDD040185578ADA021EC8E0 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 051A719FA532DB9A6297CA9ECAB7712F /* Alamofire.xcconfig */; + baseConfigurationReference = D2B67F026BFB03CD5D152C213DEBF2BC /* Alamofire.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -2322,6 +2583,7 @@ PRODUCT_NAME = Alamofire; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -2330,10 +2592,11 @@ }; name = Debug; }; - FBB99EA485CA74B81A0DA85FF4B2BA9E /* Debug */ = { + D09918F06224BC8D4DC1EE59F7A043E3 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1C680511F09B57462B53519506B25D68 /* ObjectMapper.xcconfig */; + baseConfigurationReference = F87D4ED948A5076902CE684060F0CE21 /* Result.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; @@ -2345,16 +2608,17 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/ObjectMapper/ObjectMapper-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/ObjectMapper/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Result/Result-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Result/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/ObjectMapper/ObjectMapper.modulemap"; + MODULEMAP_FILE = "Target Support Files/Result/Result.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = ObjectMapper; + PRODUCT_NAME = Result; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -2363,14 +2627,48 @@ }; name = Debug; }; + FA43FC19FF4B7DF4ABFA6F3F4049B4EA /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 0BECA3CFB229CD34026ABBD1E893ABD8 /* ReactiveSwift.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/ReactiveSwift/ReactiveSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/ReactiveSwift/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/ReactiveSwift/ReactiveSwift.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = ReactiveSwift; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 04DCCDCD98BFA3F8C4E09C4D68686DEF /* Build configuration list for PBXNativeTarget "Moya-ObjectMapper" */ = { isa = XCConfigurationList; buildConfigurations = ( - D8531D535CEDBB80608E7E6C7E7E5E04 /* Debug */, - 4972B5769ABEF0347A863954882857D2 /* Release */, + 9297A6E0B9ED86304C3FBD7DA208EBDE /* Debug */, + 9AC62FAC9BD7263A39A52519E97FF911 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2378,8 +2676,8 @@ 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 59B042A655B7C20CBAB90E385BF4E4C7 /* Debug */, - B7324857C38B065FEB1EEE3105C2367A /* Release */, + 4E487F173E6C9664F4E9E26B9635D23C /* Debug */, + BDD0139D6EB93FA375F887ABD62DAB2E /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2387,8 +2685,8 @@ 419E5D95491847CD79841B971A8A3277 /* Build configuration list for PBXNativeTarget "Alamofire" */ = { isa = XCConfigurationList; buildConfigurations = ( - F383079BFBF927813EA3613CFB679FDE /* Debug */, - 0A29B6F510198AF64EFD762EF6FA97A5 /* Release */, + C9660A42FEDD040185578ADA021EC8E0 /* Debug */, + 7D072D0D174F12EAACC1862DA756E67A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2396,8 +2694,8 @@ 55498414C06D636BD5A964403C0608F5 /* Build configuration list for PBXNativeTarget "Moya" */ = { isa = XCConfigurationList; buildConfigurations = ( - 22D1335CE6968074A157FBF2E5514FE2 /* Debug */, - 84CDC80FB0C422BA65B62F0147CD3818 /* Release */, + B2ACBF5404E1D85CF618B51F9C3772E5 /* Debug */, + 4497E56B2264E0931C8297A3CB1CCFB5 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2405,8 +2703,8 @@ 823C0DFC675B00046AAA3DB1E22E7778 /* Build configuration list for PBXNativeTarget "RxSwift" */ = { isa = XCConfigurationList; buildConfigurations = ( - A8C65D7DCDC22026A85288A376E04B97 /* Debug */, - 0105E95059DC7D914EE728380201A0BB /* Release */, + 70CC9B0A50824719A3CE6904E8C04621 /* Debug */, + 828F7F4CEDE6FAA20950646139BF3C13 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2414,8 +2712,8 @@ 87F2C5A63CCA45E4DAD04FD5F0F3B408 /* Build configuration list for PBXNativeTarget "ObjectMapper" */ = { isa = XCConfigurationList; buildConfigurations = ( - FBB99EA485CA74B81A0DA85FF4B2BA9E /* Debug */, - 3C111DD46E693429FF48D344367B8235 /* Release */, + BC27256FF866F4C545DAC8ACC955DD2F /* Debug */, + BF52078B09DAFA6019E725AC8FA9EFCE /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2423,17 +2721,26 @@ C01316BC6E3841F3B09491831731F213 /* Build configuration list for PBXNativeTarget "Result" */ = { isa = XCConfigurationList; buildConfigurations = ( - 18CE3A9514DE5309012D26338C9CCBAA /* Debug */, - 2665E7676BD062E54B6924F01BA9B617 /* Release */, + D09918F06224BC8D4DC1EE59F7A043E3 /* Debug */, + AD955452219BEA709ACE34C7410D8FC2 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DCAEB9DC05E4B00969EEDA5239B5D1CE /* Build configuration list for PBXNativeTarget "Pods-Demo" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B2C5CA79AABB9B1D6E081B7EBE7576BF /* Debug */, + 9CD8E4195A995ADAE1FAF22815A61B51 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - FC86D0FB9B9BC3EDC784978B82192B26 /* Build configuration list for PBXNativeTarget "Pods-Demo" */ = { + EF35564E0995115C18C0EF751687764B /* Build configuration list for PBXNativeTarget "ReactiveSwift" */ = { isa = XCConfigurationList; buildConfigurations = ( - 0846747F48797E2E5D20795EB9797102 /* Debug */, - 2449B02C3394F5813139D62FAFB7F262 /* Release */, + AD58472A97F9820F8411E093CA83C192 /* Debug */, + FA43FC19FF4B7DF4ABFA6F3F4049B4EA /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Sample/Pods/ReactiveSwift/LICENSE.md b/Sample/Pods/ReactiveSwift/LICENSE.md new file mode 100644 index 00000000..49bc3746 --- /dev/null +++ b/Sample/Pods/ReactiveSwift/LICENSE.md @@ -0,0 +1,19 @@ +**Copyright (c) 2012 - 2016, GitHub, Inc.** +**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. diff --git a/Sample/Pods/ReactiveSwift/README.md b/Sample/Pods/ReactiveSwift/README.md new file mode 100644 index 00000000..6333090a --- /dev/null +++ b/Sample/Pods/ReactiveSwift/README.md @@ -0,0 +1,161 @@ +

+ ReactiveSwift

+ Streams of values over time. Tailored for Swift.

+ Latest ReactiveSwift Documentation Join the ReactiveSwift Slack community. +

+
+ +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](#carthage) [![CocoaPods compatible](https://img.shields.io/cocoapods/v/ReactiveSwift.svg)](#cocoapods) [![SwiftPM compatible](https://img.shields.io/badge/SwiftPM-compatible-orange.svg)](#swift-package-manager) [![GitHub release](https://img.shields.io/github/release/ReactiveCocoa/ReactiveSwift.svg)](https://github.com/ReactiveCocoa/ReactiveSwift/releases) ![Swift 3.0.x](https://img.shields.io/badge/Swift-3.0.x-orange.svg) ![platforms](https://img.shields.io/badge/platform-iOS%20%7C%20macOS%20%7C%20tvOS%20%7C%20watchOS%20%7C%20Linux-lightgrey.svg) + +☕️ [Looking for Cocoa extensions?][ReactiveCocoa] +🎉 [Getting Started](#getting-started) + +🚄 [Release Roadmap](#release-roadmap) +## What is ReactiveSwift? +__ReactiveSwift__ offers composable, declarative and flexible primitives that are built around the grand concept of ___streams of values over time___. + +These primitives can be used to uniformly represent common Cocoa and generic programming patterns that are fundamentally an act of observation, e.g. delegate pattern, callback closures, notifications, control actions, responder chain events, [futures/promises](https://en.wikipedia.org/wiki/Futures_and_promises) and [key-value observing](https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/KeyValueObserving/KeyValueObserving.html) (KVO). + +Because all of these different mechanisms can be represented in the _same_ way, +it’s easy to declaratively compose them together, with less spaghetti +code and state to bridge the gap. + +## Getting Started + +1. **[Core Reactive Primitives][]** + + An overview of the semantics and example use cases of the ReactiveSwift primitives, including [`Signal`][], [`SignalProducer`][], [`Property`][] and [`Action`][]. + +1. **[Basic Operators][]** + + An overview of the operators provided to compose and transform streams of values. + +1. **[How does ReactiveSwift relate to RxSwift?][]** + + An overview of how ReactiveSwift differs from RxSwift for Swift idiomaticity. + +## Examples + +1. **Interactive Form UI** + + ReactiveSwift includes a [_UI Examples_ playground][], which demonstrates: + * how to build an interactive form UI with bindings, properties and `Action`s, with a live view in action. + * how to use reactive primitives to implement the Model-View-ViewModel architectural pattern, with the View Model being the source of truth for the View. + +1. **[Online Searching][]** + +## Advanced Topics + +1. **[ReactiveCocoa][]** + + Bindings and reactive extensions for Cocoa and Cocoa Touch frameworks are offered separately as ReactiveCocoa. + +1. **[API Reference][]** + +1. **[API Contracts][]** + + Contracts of the ReactiveSwift primitives, Best Practices with ReactiveSwift, and Guidelines on implementing custom operators. + +1. **[Debugging Techniques][]** + +## Installation + +ReactiveSwift supports macOS 10.9+, iOS 8.0+, watchOS 2.0+, tvOS 9.0+ and Linux. + +#### Carthage + +If you use [Carthage][] to manage your dependencies, simply add +ReactiveSwift to your `Cartfile`: + +``` +github "ReactiveCocoa/ReactiveSwift" ~> 2.0 +``` + +If you use Carthage to build your dependencies, make sure you have added `ReactiveSwift.framework`, and `Result.framework` to the "_Linked Frameworks and Libraries_" section of your target, and have included them in your Carthage framework copying build phase. + +#### CocoaPods + +If you use [CocoaPods][] to manage your dependencies, simply add +ReactiveSwift to your `Podfile`: + +``` +pod 'ReactiveSwift', '~> 2.0' +``` + +#### Swift Package Manager + +If you use Swift Package Manager, simply add ReactiveSwift as a dependency +of your package in `Package.swift`: + +``` +.Package(url: "https://github.com/ReactiveCocoa/ReactiveSwift.git", majorVersion: 2) +``` + +#### Git submodule + + 1. Add the ReactiveSwift repository as a [submodule][] of your + application’s repository. + 1. Run `git submodule update --init --recursive` from within the ReactiveCocoa folder. + 1. Drag and drop `ReactiveSwift.xcodeproj` and + `Carthage/Checkouts/Result/Result.xcodeproj` into your application’s Xcode + project or workspace. + 1. On the “General” tab of your application target’s settings, add + `ReactiveSwift.framework`, and `Result.framework` + to the “Embedded Binaries” section. + 1. If your application target does not contain Swift code at all, you should also + set the `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting to “Yes”. + +## Playground + +We also provide a great Playground, so you can get used to ReactiveCocoa's operators. In order to start using it: + + 1. Clone the ReactiveSwift repository. + 1. Retrieve the project dependencies using one of the following terminal commands from the ReactiveSwift project root directory: + - `git submodule update --init --recursive` **OR**, if you have [Carthage][] installed + - `carthage checkout` + 1. Open `ReactiveSwift.xcworkspace` + 1. Build `Result-Mac` scheme + 1. Build `ReactiveSwift-macOS` scheme + 1. Finally open the `ReactiveSwift.playground` + 1. Choose `View > Show Debug Area` + +## Have a question? +If you need any help, please visit our [GitHub issues][] or [Stack Overflow][]. Feel free to file an issue if you do not manage to find any solution from the archives. + +## Release Roadmap +**Current Stable Release:**
[![GitHub release](https://img.shields.io/github/release/ReactiveCocoa/ReactiveSwift.svg)](https://github.com/ReactiveCocoa/ReactiveSwift/releases) + +#### Swift 3.2 and Swift 4.0 compatibility +While the development would be Swift 3.2 and Swift 4.0 aware, ReactiveSwift 2.0 would not declare official support until Swift 3.2 and Swift 4.0 launch. + +The official release for Swift 3.2 and Swift 4.0 is expected to be a minor 2.x release with full API compatibility. + +### Plan of Record +#### ReactiveSwift 3.0 +ReactiveSwift 3.0 is expected to declare library ABI stability as it adopts generics features arriving in a later Swift 4 release, e.g. conditional conformance. There is no ETA for now. + +[Core Reactive Primitives]: Documentation/ReactivePrimitives.md +[Basic Operators]: Documentation/BasicOperators.md +[How does ReactiveSwift relate to RxSwift?]: Documentation/RxComparison.md +[API Contracts]: Documentation/APIContracts.md +[API Reference]: http://reactivecocoa.io/reactiveswift/docs/latest/ +[Debugging Techniques]: Documentation/DebuggingTechniques.md +[Online Searching]: Documentation/Example.OnlineSearch.md +[_UI Examples_ playground]: https://github.com/ReactiveCocoa/ReactiveSwift/blob/master/ReactiveSwift-UIExamples.playground/Pages/ValidatingProperty.xcplaygroundpage/Contents.swift + +[`Action`]: Documentation/ReactivePrimitives.md#action-a-serialized-worker-with-a-preset-action +[`SignalProducer`]: Documentation/ReactivePrimitives.md#signalproducer-deferred-work-that-creates-a-stream-of-values +[`Signal`]: Documentation/ReactivePrimitives.md#signal-a-unidirectional-stream-of-events +[`Property`]: Documentation/ReactivePrimitives.md#property-an-observable-box-that-always-holds-a-value + +[ReactiveCocoa]: https://github.com/ReactiveCocoa/ReactiveCocoa/#readme + +[Carthage]: https://github.com/Carthage/Carthage/#readme +[CocoaPods]: https://cocoapods.org/ +[submodule]: https://git-scm.com/docs/git-submodule + +[GitHub issues]: https://github.com/ReactiveCocoa/ReactiveSwift/issues?q=is%3Aissue+label%3Aquestion+ +[Stack Overflow]: http://stackoverflow.com/questions/tagged/reactive-cocoa + +[Looking for the Objective-C API?]: https://github.com/ReactiveCocoa/ReactiveObjC/#readme +[Still using Swift 2.x?]: https://github.com/ReactiveCocoa/ReactiveCocoa/tree/v4.0.0 diff --git a/Sample/Pods/ReactiveSwift/Sources/Action.swift b/Sample/Pods/ReactiveSwift/Sources/Action.swift new file mode 100644 index 00000000..9eecbbb9 --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/Action.swift @@ -0,0 +1,339 @@ +import Dispatch +import Foundation +import Result + +/// `Action` represents a repeatable work like `SignalProducer`. But on top of the +/// isolation of produced `Signal`s from a `SignalProducer`, `Action` provides +/// higher-order features like availability and mutual exclusion. +/// +/// Similar to a produced `Signal` from a `SignalProducer`, each unit of the repreatable +/// work may output zero or more values, and terminate with or without an error at some +/// point. +/// +/// The core of `Action` is the `execute` closure it created with. For every execution +/// attempt with a varying input, if the `Action` is enabled, it would request from the +/// `execute` closure a customized unit of work — represented by a `SignalProducer`. +/// Specifically, the `execute` closure would be supplied with the latest state of +/// `Action` and the external input from `apply()`. +/// +/// `Action` enforces serial execution, and disables the `Action` during the execution. +public final class Action { + private struct ActionState { + var isEnabled: Bool { + return isUserEnabled && !isExecuting + } + + var isUserEnabled: Bool + var isExecuting: Bool + var value: Value + } + + private let execute: (Action, Input) -> SignalProducer> + private let eventsObserver: Signal.Event, NoError>.Observer + private let disabledErrorsObserver: Signal<(), NoError>.Observer + + private let deinitToken: Lifetime.Token + + /// The lifetime of the `Action`. + public let lifetime: Lifetime + + /// A signal of all events generated from all units of work of the `Action`. + /// + /// In other words, this sends every `Event` from every unit of work that the `Action` + /// executes. + public let events: Signal.Event, NoError> + + /// A signal of all values generated from all units of work of the `Action`. + /// + /// In other words, this sends every value from every unit of work that the `Action` + /// executes. + public let values: Signal + + /// A signal of all errors generated from all units of work of the `Action`. + /// + /// In other words, this sends every error from every unit of work that the `Action` + /// executes. + public let errors: Signal + + /// A signal of all failed attempts to start a unit of work of the `Action`. + public let disabledErrors: Signal<(), NoError> + + /// A signal of all completed events generated from applications of the action. + /// + /// In other words, this will send completed events from every signal generated + /// by each SignalProducer returned from apply(). + public let completed: Signal<(), NoError> + + /// Whether the action is currently executing. + public let isExecuting: Property + + /// Whether the action is currently enabled. + public let isEnabled: Property + + /// Initializes an `Action` that would be conditionally enabled depending on its + /// state. + /// + /// When the `Action` is asked to start the execution with an input value, a unit of + /// work — represented by a `SignalProducer` — would be created by invoking + /// `execute` with the latest state and the input value. + /// + /// - note: `Action` guarantees that changes to `state` are observed in a + /// thread-safe way. Thus, the value passed to `isEnabled` will + /// always be identical to the value passed to `execute`, for each + /// application of the action. + /// + /// - note: This initializer should only be used if you need to provide + /// custom input can also influence whether the action is enabled. + /// The various convenience initializers should cover most use cases. + /// + /// - parameters: + /// - state: A property to be the state of the `Action`. + /// - isEnabled: A predicate which determines the availability of the `Action`, + /// given the latest `Action` state. + /// - execute: A closure that produces a unit of work, as `SignalProducer`, to be + /// executed by the `Action`. + public init(state: State, enabledIf isEnabled: @escaping (State.Value) -> Bool, execute: @escaping (State.Value, Input) -> SignalProducer) { + let isUserEnabled = isEnabled + + deinitToken = Lifetime.Token() + lifetime = Lifetime(deinitToken) + + // `Action` retains its state property. + lifetime.observeEnded { _ = state } + + (events, eventsObserver) = Signal.Event, NoError>.pipe() + (disabledErrors, disabledErrorsObserver) = Signal<(), NoError>.pipe() + + values = events.filterMap { $0.value } + errors = events.filterMap { $0.error } + completed = events.filterMap { $0.isCompleted ? () : nil } + + let actionState = MutableProperty(ActionState(isUserEnabled: true, isExecuting: false, value: state.value)) + + // `isEnabled` and `isExecuting` have their own backing so that when the observers + // of these synchronously affects the action state, the signal of the action state + // does not deadlock due to the recursion. + let isExecuting = MutableProperty(false) + self.isExecuting = Property(capturing: isExecuting) + let isEnabled = MutableProperty(actionState.value.isEnabled) + self.isEnabled = Property(capturing: isEnabled) + + func modifyActionState(_ action: (inout ActionState) throws -> Result) rethrows -> Result { + return try actionState.begin { storage in + let oldState = storage.value + defer { + let newState = storage.value + if oldState.isEnabled != newState.isEnabled { + isEnabled.value = newState.isEnabled + } + if oldState.isExecuting != newState.isExecuting { + isExecuting.value = newState.isExecuting + } + } + return try storage.modify(action) + } + } + + let disposable = state.producer.startWithValues { value in + modifyActionState { state in + state.value = value + state.isUserEnabled = isUserEnabled(value) + } + } + + lifetime.observeEnded(disposable.dispose) + + self.execute = { action, input in + return SignalProducer { observer, lifetime in + let latestState: State.Value? = modifyActionState { state in + guard state.isEnabled else { + return nil + } + + state.isExecuting = true + return state.value + } + + guard let state = latestState else { + observer.send(error: .disabled) + action.disabledErrorsObserver.send(value: ()) + return + } + + let interruptHandle = execute(state, input).start { event in + observer.action(event.mapError(ActionError.producerFailed)) + action.eventsObserver.send(value: event) + } + + lifetime.observeEnded { + interruptHandle.dispose() + modifyActionState { $0.isExecuting = false } + } + } + } + } + + /// Initializes an `Action` that uses a property as its state. + /// + /// When the `Action` is asked to start the execution, a unit of work — represented by + /// a `SignalProducer` — would be created by invoking `execute` with the latest value + /// of the state. + /// + /// - parameters: + /// - state: A property to be the state of the `Action`. + /// - execute: A closure that produces a unit of work, as `SignalProducer`, to + /// be executed by the `Action`. + public convenience init(state: P, execute: @escaping (P.Value, Input) -> SignalProducer) { + self.init(state: state, enabledIf: { _ in true }, execute: execute) + } + + /// Initializes an `Action` that would be conditionally enabled. + /// + /// When the `Action` is asked to start the execution with an input value, a unit of + /// work — represented by a `SignalProducer` — would be created by invoking + /// `execute` with the input value. + /// + /// - parameters: + /// - isEnabled: A property which determines the availability of the `Action`. + /// - execute: A closure that produces a unit of work, as `SignalProducer`, to be + /// executed by the `Action`. + public convenience init(enabledIf isEnabled: P, execute: @escaping (Input) -> SignalProducer) where P.Value == Bool { + self.init(state: isEnabled, enabledIf: { $0 }) { _, input in + execute(input) + } + } + + /// Initializes an `Action` that uses a property of optional as its state. + /// + /// When the `Action` is asked to start executing, a unit of work (represented by + /// a `SignalProducer`) is created by invoking `execute` with the latest value + /// of the state and the `input` that was passed to `apply()`. + /// + /// If the property holds a `nil`, the `Action` would be disabled until it is not + /// `nil`. + /// + /// - parameters: + /// - state: A property of optional to be the state of the `Action`. + /// - execute: A closure that produces a unit of work, as `SignalProducer`, to + /// be executed by the `Action`. + public convenience init(unwrapping state: P, execute: @escaping (T, Input) -> SignalProducer) where P.Value == T? { + self.init(state: state, enabledIf: { $0 != nil }) { state, input in + execute(state!, input) + } + } + + /// Initializes an `Action` that would always be enabled. + /// + /// When the `Action` is asked to start the execution with an input value, a unit of + /// work — represented by a `SignalProducer` — would be created by invoking + /// `execute` with the input value. + /// + /// - parameters: + /// - execute: A closure that produces a unit of work, as `SignalProducer`, to be + /// executed by the `Action`. + public convenience init(execute: @escaping (Input) -> SignalProducer) { + self.init(enabledIf: Property(value: true), execute: execute) + } + + deinit { + eventsObserver.sendCompleted() + disabledErrorsObserver.sendCompleted() + } + + /// Create a `SignalProducer` that would attempt to create and start a unit of work of + /// the `Action`. The `SignalProducer` would forward only events generated by the unit + /// of work it created. + /// + /// If the execution attempt is failed, the producer would fail with + /// `ActionError.disabled`. + /// + /// - parameters: + /// - input: A value to be used to create the unit of work. + /// + /// - returns: A producer that forwards events generated by its started unit of work, + /// or emits `ActionError.disabled` if the execution attempt is failed. + public func apply(_ input: Input) -> SignalProducer> { + return execute(self, input) + } +} + +extension Action: BindingTargetProvider { + public var bindingTarget: BindingTarget { + return BindingTarget(lifetime: lifetime) { [weak self] in self?.apply($0).start() } + } +} + +extension Action where Input == Void { + /// Create a `SignalProducer` that would attempt to create and start a unit of work of + /// the `Action`. The `SignalProducer` would forward only events generated by the unit + /// of work it created. + /// + /// If the execution attempt is failed, the producer would fail with + /// `ActionError.disabled`. + /// + /// - returns: A producer that forwards events generated by its started unit of work, + /// or emits `ActionError.disabled` if the execution attempt is failed. + public func apply() -> SignalProducer> { + return apply(()) + } + + /// Initializes an `Action` that uses a property of optional as its state. + /// + /// When the `Action` is asked to start the execution, a unit of work — represented by + /// a `SignalProducer` — would be created by invoking `execute` with the latest value + /// of the state. + /// + /// If the property holds a `nil`, the `Action` would be disabled until it is not + /// `nil`. + /// + /// - parameters: + /// - state: A property of optional to be the state of the `Action`. + /// - execute: A closure that produces a unit of work, as `SignalProducer`, to + /// be executed by the `Action`. + public convenience init(unwrapping state: P, execute: @escaping (T) -> SignalProducer) where P.Value == T? { + self.init(unwrapping: state) { state, _ in + execute(state) + } + } + + /// Initializes an `Action` that uses a property as its state. + /// + /// When the `Action` is asked to start the execution, a unit of work — represented by + /// a `SignalProducer` — would be created by invoking `execute` with the latest value + /// of the state. + /// + /// - parameters: + /// - state: A property to be the state of the `Action`. + /// - execute: A closure that produces a unit of work, as `SignalProducer`, to + /// be executed by the `Action`. + public convenience init(state: P, execute: @escaping (T) -> SignalProducer) where P.Value == T { + self.init(state: state) { state, _ in + execute(state) + } + } +} + +/// `ActionError` represents the error that could be emitted by a unit of work of a +/// certain `Action`. +public enum ActionError: Swift.Error { + /// The execution attempt was failed, since the `Action` was disabled. + case disabled + + /// The unit of work emitted an error. + case producerFailed(Error) +} + +extension ActionError where Error: Equatable { + public static func == (lhs: ActionError, rhs: ActionError) -> Bool { + switch (lhs, rhs) { + case (.disabled, .disabled): + return true + + case let (.producerFailed(left), .producerFailed(right)): + return left == right + + default: + return false + } + } +} diff --git a/Sample/Pods/ReactiveSwift/Sources/Atomic.swift b/Sample/Pods/ReactiveSwift/Sources/Atomic.swift new file mode 100644 index 00000000..0f75d196 --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/Atomic.swift @@ -0,0 +1,289 @@ +// +// Atomic.swift +// ReactiveSwift +// +// Created by Justin Spahr-Summers on 2014-06-10. +// Copyright (c) 2014 GitHub. All rights reserved. +// + +import Foundation +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +import MachO +#endif + +/// A simple, generic lock-free finite state machine. +/// +/// - warning: `deinitialize` must be called to dispose of the consumed memory. +internal struct UnsafeAtomicState where State.RawValue == Int32 { + internal typealias Transition = (expected: State, next: State) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + private let value: UnsafeMutablePointer + + /// Create a finite state machine with the specified initial state. + /// + /// - parameters: + /// - initial: The desired initial state. + internal init(_ initial: State) { + value = UnsafeMutablePointer.allocate(capacity: 1) + value.initialize(to: initial.rawValue) + } + + /// Deinitialize the finite state machine. + internal func deinitialize() { + value.deinitialize() + value.deallocate(capacity: 1) + } + + /// Compare the current state with the specified state. + /// + /// - parameters: + /// - expected: The expected state. + /// + /// - returns: `true` if the current state matches the expected state. + /// `false` otherwise. + internal func `is`(_ expected: State) -> Bool { + return OSAtomicCompareAndSwap32Barrier(expected.rawValue, + expected.rawValue, + value) + } + + /// Try to transition from the expected current state to the specified next + /// state. + /// + /// - parameters: + /// - expected: The expected state. + /// - next: The state to transition to. + /// + /// - returns: `true` if the transition succeeds. `false` otherwise. + internal func tryTransition(from expected: State, to next: State) -> Bool { + return OSAtomicCompareAndSwap32Barrier(expected.rawValue, + next.rawValue, + value) + } +#else + private let value: Atomic + + /// Create a finite state machine with the specified initial state. + /// + /// - parameters: + /// - initial: The desired initial state. + internal init(_ initial: State) { + value = Atomic(initial.rawValue) + } + + /// Deinitialize the finite state machine. + internal func deinitialize() {} + + /// Compare the current state with the specified state. + /// + /// - parameters: + /// - expected: The expected state. + /// + /// - returns: `true` if the current state matches the expected state. + /// `false` otherwise. + internal func `is`(_ expected: State) -> Bool { + return value.modify { $0 == expected.rawValue } + } + + /// Try to transition from the expected current state to the specified next + /// state. + /// + /// - parameters: + /// - expected: The expected state. + /// + /// - returns: `true` if the transition succeeds. `false` otherwise. + internal func tryTransition(from expected: State, to next: State) -> Bool { + return value.modify { value in + if value == expected.rawValue { + value = next.rawValue + return true + } + return false + } + } +#endif +} + +/// `Lock` exposes `os_unfair_lock` on supported platforms, with pthread mutex as the +// fallback. +internal class Lock { + #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + @available(iOS 10.0, *) + @available(macOS 10.12, *) + @available(tvOS 10.0, *) + @available(watchOS 3.0, *) + internal final class UnfairLock: Lock { + private let _lock: os_unfair_lock_t + + override init() { + _lock = .allocate(capacity: 1) + _lock.initialize(to: os_unfair_lock()) + super.init() + } + + override func lock() { + os_unfair_lock_lock(_lock) + } + + override func unlock() { + os_unfair_lock_unlock(_lock) + } + + override func `try`() -> Bool { + return os_unfair_lock_trylock(_lock) + } + + deinit { + _lock.deinitialize() + _lock.deallocate(capacity: 1) + } + } + #endif + + internal final class PthreadLock: Lock { + private let _lock: UnsafeMutablePointer + + init(recursive: Bool = false) { + _lock = .allocate(capacity: 1) + _lock.initialize(to: pthread_mutex_t()) + + let attr = UnsafeMutablePointer.allocate(capacity: 1) + attr.initialize(to: pthread_mutexattr_t()) + pthread_mutexattr_init(attr) + + defer { + pthread_mutexattr_destroy(attr) + attr.deinitialize() + attr.deallocate(capacity: 1) + } + + #if DEBUG + pthread_mutexattr_settype(attr, Int32(recursive ? PTHREAD_MUTEX_RECURSIVE : PTHREAD_MUTEX_ERRORCHECK)) + #else + pthread_mutexattr_settype(attr, Int32(recursive ? PTHREAD_MUTEX_RECURSIVE : PTHREAD_MUTEX_NORMAL)) + #endif + + let status = pthread_mutex_init(_lock, attr) + assert(status == 0, "Unexpected pthread mutex error code: \(status)") + + super.init() + } + + override func lock() { + let status = pthread_mutex_lock(_lock) + assert(status == 0, "Unexpected pthread mutex error code: \(status)") + } + + override func unlock() { + let status = pthread_mutex_unlock(_lock) + assert(status == 0, "Unexpected pthread mutex error code: \(status)") + } + + override func `try`() -> Bool { + let status = pthread_mutex_trylock(_lock) + switch status { + case 0: + return true + case EBUSY: + return false + default: + assertionFailure("Unexpected pthread mutex error code: \(status)") + return false + } + } + + deinit { + let status = pthread_mutex_destroy(_lock) + assert(status == 0, "Unexpected pthread mutex error code: \(status)") + + _lock.deinitialize() + _lock.deallocate(capacity: 1) + } + } + + static func make() -> Lock { + #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + if #available(*, iOS 10.0, macOS 10.12, tvOS 10.0, watchOS 3.0) { + return UnfairLock() + } + #endif + + return PthreadLock() + } + + private init() {} + + func lock() { fatalError() } + func unlock() { fatalError() } + func `try`() -> Bool { fatalError() } +} + +/// An atomic variable. +public final class Atomic { + private let lock: Lock + private var _value: Value + + /// Atomically get or set the value of the variable. + public var value: Value { + get { + return withValue { $0 } + } + + set(newValue) { + swap(newValue) + } + } + + /// Initialize the variable with the given initial value. + /// + /// - parameters: + /// - value: Initial value for `self`. + public init(_ value: Value) { + _value = value + lock = Lock.make() + } + + /// Atomically modifies the variable. + /// + /// - parameters: + /// - action: A closure that takes the current value. + /// + /// - returns: The result of the action. + @discardableResult + public func modify(_ action: (inout Value) throws -> Result) rethrows -> Result { + lock.lock() + defer { lock.unlock() } + + return try action(&_value) + } + + /// Atomically perform an arbitrary action using the current value of the + /// variable. + /// + /// - parameters: + /// - action: A closure that takes the current value. + /// + /// - returns: The result of the action. + @discardableResult + public func withValue(_ action: (Value) throws -> Result) rethrows -> Result { + lock.lock() + defer { lock.unlock() } + + return try action(_value) + } + + /// Atomically replace the contents of the variable. + /// + /// - parameters: + /// - newValue: A new value for the variable. + /// + /// - returns: The old value. + @discardableResult + public func swap(_ newValue: Value) -> Value { + return modify { (value: inout Value) in + let oldValue = value + value = newValue + return oldValue + } + } +} diff --git a/Sample/Pods/ReactiveSwift/Sources/Bag.swift b/Sample/Pods/ReactiveSwift/Sources/Bag.swift new file mode 100644 index 00000000..882e2d04 --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/Bag.swift @@ -0,0 +1,102 @@ +// +// Bag.swift +// ReactiveSwift +// +// Created by Justin Spahr-Summers on 2014-07-10. +// Copyright (c) 2014 GitHub. All rights reserved. +// + +/// An unordered, non-unique collection of values of type `Element`. +public struct Bag { + /// A uniquely identifying token for removing a value that was inserted into a + /// Bag. + public struct Token { + fileprivate let value: UInt64 + } + + fileprivate var elements: ContiguousArray = [] + fileprivate var tokens: ContiguousArray = [] + + private var nextToken: Token = Token(value: 0) + + public init() {} + + /// Insert the given value into `self`, and return a token that can + /// later be passed to `remove(using:)`. + /// + /// - parameters: + /// - value: A value that will be inserted. + @discardableResult + public mutating func insert(_ value: Element) -> Token { + let token = nextToken + + // Practically speaking, this would overflow only if we have 101% uptime and we + // manage to call `insert(_:)` every 1 ns for 500+ years non-stop. + nextToken = Token(value: token.value + 1) + + elements.append(value) + tokens.append(token.value) + + return token + } + + /// Remove a value, given the token returned from `insert()`. + /// + /// - note: If the value has already been removed, nothing happens. + /// + /// - parameters: + /// - token: A token returned from a call to `insert()`. + @discardableResult + public mutating func remove(using token: Token) -> Element? { + for i in (elements.startIndex ..< elements.endIndex).reversed() { + if tokens[i] == token.value { + tokens.remove(at: i) + return elements.remove(at: i) + } + } + + return nil + } +} + +extension Bag: RandomAccessCollection { + public var startIndex: Int { + return elements.startIndex + } + + public var endIndex: Int { + return elements.endIndex + } + + public subscript(index: Int) -> Element { + return elements[index] + } + + public func makeIterator() -> Iterator { + return Iterator(elements) + } + + /// An iterator of `Bag`. + public struct Iterator: IteratorProtocol { + private let base: ContiguousArray + private var nextIndex: Int + private let endIndex: Int + + fileprivate init(_ base: ContiguousArray) { + self.base = base + nextIndex = base.startIndex + endIndex = base.endIndex + } + + public mutating func next() -> Element? { + let currentIndex = nextIndex + + if currentIndex < endIndex { + nextIndex = currentIndex + 1 + return base[currentIndex] + } + + return nil + } + } +} diff --git a/Sample/Pods/ReactiveSwift/Sources/Deprecations+Removals.swift b/Sample/Pods/ReactiveSwift/Sources/Deprecations+Removals.swift new file mode 100644 index 00000000..51ca1c85 --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/Deprecations+Removals.swift @@ -0,0 +1,198 @@ +import Foundation +import Dispatch +import Result + +// MARK: Unavailable methods in ReactiveSwift 2.0. +extension AnyDisposable { + @available(*, unavailable, renamed:"init(_:)") + public convenience init(action: @escaping () -> Void) { fatalError() } +} + +extension Signal { + @available(*, unavailable, renamed:"promoteError") + public func promoteErrors(_: F.Type) -> Signal { fatalError() } +} + +extension SignalProducer { + @available(*, unavailable, renamed:"promoteError") + public func promoteErrors(_: F.Type) -> SignalProducer { fatalError() } +} + +extension Lifetime { + @available(*, unavailable, renamed:"hasEnded") + public var isDisposed: Bool { fatalError() } + + @discardableResult + @available(*, unavailable, renamed:"observeEnded(_:)") + public func add(_ action: () -> Void) -> Disposable? { fatalError() } + + @discardableResult + @available(*, unavailable, message:"Use `observeEnded(_:)` instead.") + public static func += (left: Lifetime, right: () -> Void) -> Disposable? { fatalError() } + + @discardableResult + @available(*, deprecated, message:"Use `observeEnded(_:)` with a method reference to `dispose()` instead. This method is subject to removal in a future release.") + public func add(_ d: Disposable?) -> Disposable? { + return d.flatMap { observeEnded($0.dispose) } + } +} + +extension SignalProducer { + @available(*, unavailable, renamed:"init(_:)") + public static func attempt(_ operation: @escaping () -> Result) -> SignalProducer { fatalError() } +} + +extension SignalProducer where Error == AnyError { + @available(*, unavailable, renamed:"init(_:)") + public static func attempt(_ operation: @escaping () throws -> Value) -> SignalProducer { fatalError() } +} + +extension PropertyProtocol { + @available(*, unavailable, renamed:"flatMap(_:_:)") + public func flatMap(_ strategy: FlattenStrategy, transform: @escaping (Value) -> P) -> Property { fatalError() } +} + +extension Signal { + @available(*, unavailable, renamed:"flatMap(_:_:)") + public func flatMap(_ strategy: FlattenStrategy, transform: @escaping (Value) -> Inner) -> Signal where Error == Inner.Error { fatalError() } + + @available(*, unavailable, renamed:"flatMap(_:_:)") + public func flatMap(_ strategy: FlattenStrategy, transform: @escaping (Value) -> Inner) -> Signal where Inner.Error == NoError { fatalError() } +} + +extension Signal where Error == NoError { + @available(*, unavailable, renamed:"flatMap(_:_:)") + public func flatMap(_ strategy: FlattenStrategy, transform: @escaping (Value) -> Inner) -> Signal where Error == Inner.Error { fatalError() } + + @available(*, unavailable, renamed:"flatMap(_:_:)") + public func flatMap(_ strategy: FlattenStrategy, transform: @escaping (Value) -> Inner) -> Signal { fatalError() } +} + +extension SignalProducer { + @available(*, unavailable, renamed:"flatMap(_:_:)") + public func flatMap(_ strategy: FlattenStrategy, transform: @escaping (Value) -> Inner) -> SignalProducer where Error == Inner.Error { fatalError() } + + @available(*, unavailable, renamed:"flatMap(_:_:)") + public func flatMap(_ strategy: FlattenStrategy, transform: @escaping (Value) -> Inner) -> SignalProducer where Inner.Error == NoError { fatalError() } +} + +extension SignalProducer where Error == NoError { + @available(*, unavailable, renamed:"flatMap(_:_:)") + public func flatMap(_ strategy: FlattenStrategy, transform: @escaping (Value) -> Inner) -> SignalProducer where Error == Inner.Error { fatalError() } + + @available(*, unavailable, renamed:"flatMap(_:_:)") + public func flatMap(_ strategy: FlattenStrategy, transform: @escaping (Value) -> Inner) -> SignalProducer { fatalError() } +} + +extension ComposableMutablePropertyProtocol { + @available(*, unavailable, renamed:"withValue(_:)") + public func withValue(action: (Value) throws -> Result) rethrows -> Result { fatalError() } +} + +extension SignalProducer { + @available(*, unavailable, renamed:"attempt(_:)") + public func attempt(action: @escaping (Value) -> Result<(), Error>) -> SignalProducer { fatalError() } +} + +extension CompositeDisposable { + @available(*, unavailable, message:"Use `Disposable?` instead.") + public typealias DisposableHandle = Disposable? +} + +extension Optional where Wrapped == Disposable { + @available(*, unavailable, renamed:"dispose") + public func remove() { fatalError() } +} + +@available(*, unavailable, renamed:"SignalProducer.timer") +public func timer(interval: DispatchTimeInterval, on scheduler: DateScheduler) -> SignalProducer { fatalError() } + +@available(*, unavailable, renamed:"SignalProducer.timer") +public func timer(interval: DispatchTimeInterval, on scheduler: DateScheduler, leeway: DispatchTimeInterval) -> SignalProducer { fatalError() } + +// MARK: Obsolete types in ReactiveSwift 2.0. +@available(*, unavailable, renamed:"AnyDisposable") +public typealias SimpleDisposable = AnyDisposable + +@available(*, unavailable, renamed:"AnyDisposable") +public typealias ActionDisposable = AnyDisposable + +@available(*, unavailable, renamed:"Signal.Event") +public typealias Event = Signal.Event + +@available(*, unavailable, renamed:"Signal.Observer") +public typealias Observer = Signal.Observer + +extension Action { + @available(*, unavailable, renamed:"init(state:enabledIf:execute:)") + public convenience init(state property: State, enabledIf isEnabled: @escaping (State.Value) -> Bool, _ execute: @escaping (State.Value, Input) -> SignalProducer) { fatalError() } + + @available(*, unavailable, renamed:"init(enabledIf:execute:)") + public convenience init(enabledIf property: P, _ execute: @escaping (Input) -> SignalProducer) where P.Value == Bool { fatalError() } + + @available(*, unavailable, renamed:"init(execute:)") + public convenience init(_ execute: @escaping (Input) -> SignalProducer) { fatalError() } +} + +extension Action where Input == Void { + @available(*, unavailable, renamed:"init(unwrapping:execute:)") + public convenience init(state: P, _ execute: @escaping (T) -> SignalProducer) where P.Value == T? { fatalError() } + + @available(*, unavailable, renamed:"init(unwrapping:execute:)") + public convenience init(input: P, _ execute: @escaping (T) -> SignalProducer) where P.Value == T? { fatalError() } + + @available(*, unavailable, renamed:"init(state:execute:)") + public convenience init(input: P, _ execute: @escaping (T) -> SignalProducer) where P.Value == T { fatalError() } +} + +@available(*, unavailable, renamed:"Bag.Token") +public typealias RemovalToken = Bag.Token + +@available(*, unavailable, message: "This protocol has been removed. Constrain `Action` directly instead.") +public protocol ActionProtocol {} + +@available(*, unavailable, message: "The protocol has been removed. Constrain `Observer` directly instead.") +public protocol ObserverProtocol {} + +@available(*, unavailable, message:"The protocol has been replaced by `BindingTargetProvider`.") +public protocol BindingTargetProtocol {} + +@available(*, unavailable, message:"The protocol has been removed. Constrain `Atomic` directly instead.") +public protocol AtomicProtocol {} + +// MARK: Deprecated types in ReactiveSwift 1.x. +@available(*, unavailable, renamed:"ValidationProperty.Result") +public typealias ValidationResult = ValidatingProperty.Result + +@available(*, unavailable, renamed:"ValidationProperty.Decision") +public typealias ValidatorOutput = ValidatingProperty.Decision + +extension Signal where Value == Bool { + @available(*, unavailable, renamed: "negate()") + public var negated: Signal { + return negate() + } +} + +extension SignalProducer where Value == Bool { + @available(*, unavailable, renamed: "negate()") + public var negated: SignalProducer { + return negate() + } +} + +extension PropertyProtocol where Value == Bool { + @available(*, unavailable, renamed: "negate()") + public var negated: Property { + return negate() + } +} + +@available(*, unavailable, renamed:"Scheduler") +public typealias SchedulerProtocol = Scheduler + +@available(*, unavailable, renamed:"DateScheduler") +public typealias DateSchedulerProtocol = DateScheduler + +@available(*, unavailable, renamed:"BindingSource") +public typealias BindingSourceProtocol = BindingSource diff --git a/Sample/Pods/ReactiveSwift/Sources/Disposable.swift b/Sample/Pods/ReactiveSwift/Sources/Disposable.swift new file mode 100644 index 00000000..4b5c36e6 --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/Disposable.swift @@ -0,0 +1,364 @@ +// +// Disposable.swift +// ReactiveSwift +// +// Created by Justin Spahr-Summers on 2014-06-02. +// Copyright (c) 2014 GitHub. All rights reserved. +// + +/// Represents something that can be “disposed”, usually associated with freeing +/// resources or canceling work. +public protocol Disposable: class { + /// Whether this disposable has been disposed already. + var isDisposed: Bool { get } + + /// Disposing of the resources represented by `self`. If `self` has already + /// been disposed of, it does nothing. + /// + /// - note: Implementations must issue a memory barrier. + func dispose() +} + +/// Represents the state of a disposable. +private enum DisposableState: Int32 { + /// The disposable is active. + case active + + /// The disposable has been disposed. + case disposed +} + +extension UnsafeAtomicState where State == DisposableState { + /// Try to transition from `active` to `disposed`. + /// + /// - returns: `true` if the transition succeeds. `false` otherwise. + @inline(__always) + fileprivate func tryDispose() -> Bool { + return tryTransition(from: .active, to: .disposed) + } +} + +/// A type-erased disposable that forwards operations to an underlying disposable. +public final class AnyDisposable: Disposable { + private final class ActionDisposable: Disposable { + let state: UnsafeAtomicState + var action: (() -> Void)? + + var isDisposed: Bool { + return state.is(.disposed) + } + + init(_ action: (() -> Void)?) { + self.state = UnsafeAtomicState(.active) + self.action = action + } + + deinit { + state.deinitialize() + } + + func dispose() { + if state.tryDispose() { + action?() + action = nil + } + } + } + + private let base: Disposable + + public var isDisposed: Bool { + return base.isDisposed + } + + /// Create a disposable which runs the given action upon disposal. + /// + /// - parameters: + /// - action: A closure to run when calling `dispose()`. + public init(_ action: @escaping () -> Void) { + base = ActionDisposable(action) + } + + /// Create a disposable. + public init() { + base = ActionDisposable(nil) + } + + /// Create a disposable which wraps the given disposable. + /// + /// - parameters: + /// - disposable: The disposable to be wrapped. + public init(_ disposable: Disposable) { + base = disposable + } + + public func dispose() { + base.dispose() + } +} + +/// A disposable that will dispose of any number of other disposables. +public final class CompositeDisposable: Disposable { + private let disposables: Atomic?> + private var state: UnsafeAtomicState + + public var isDisposed: Bool { + return state.is(.disposed) + } + + /// Initialize a `CompositeDisposable` containing the given sequence of + /// disposables. + /// + /// - parameters: + /// - disposables: A collection of objects conforming to the `Disposable` + /// protocol + public init(_ disposables: S) + where S.Iterator.Element == Disposable + { + var bag: Bag = Bag() + + for disposable in disposables { + bag.insert(disposable) + } + + self.disposables = Atomic(bag) + self.state = UnsafeAtomicState(DisposableState.active) + } + + /// Initialize a `CompositeDisposable` containing the given sequence of + /// disposables. + /// + /// - parameters: + /// - disposables: A collection of objects conforming to the `Disposable` + /// protocol + public convenience init(_ disposables: S) + where S.Iterator.Element == Disposable? + { + self.init(disposables.flatMap { $0 }) + } + + /// Initializes an empty `CompositeDisposable`. + public convenience init() { + self.init([Disposable]()) + } + + public func dispose() { + if state.tryDispose() { + if let ds = disposables.swap(nil) { + for d in ds { + d.dispose() + } + } + } + } + + /// Add the given disposable to the composite. + /// + /// - parameters: + /// - disposable: A disposable. + /// + /// - returns: A disposable to remove `disposable` from the composite. `nil` if the + /// composite has been disposed of, `disposable` has been disposed of, or + /// `disposable` is `nil`. + @discardableResult + public func add(_ disposable: Disposable?) -> Disposable? { + guard let d = disposable, !d.isDisposed, !isDisposed else { + disposable?.dispose() + return nil + } + + return disposables.modify { disposables in + guard disposables != nil else { return nil } + + let token = disposables!.insert(d) + return AnyDisposable { [weak self] in + self?.disposables.modify { + $0?.remove(using: token) + } + } + } + } + + /// Add the given action to the composite. + /// + /// - parameters: + /// - action: A closure to be invoked when the composite is disposed of. + /// + /// - returns: A disposable to remove `disposable` from the composite. `nil` if the + /// composite has been disposed of, `disposable` has been disposed of, or + /// `disposable` is `nil`. + @discardableResult + public func add(_ action: @escaping () -> Void) -> Disposable? { + return add(AnyDisposable(action)) + } + + deinit { + state.deinitialize() + } + + /// Adds the right-hand-side disposable to the left-hand-side + /// `CompositeDisposable`. + /// + /// ```` + /// disposable += producer + /// .filter { ... } + /// .map { ... } + /// .start(observer) + /// ```` + /// + /// - parameters: + /// - lhs: Disposable to add to. + /// - rhs: Disposable to add. + /// + /// - returns: An instance of `DisposableHandle` that can be used to opaquely + /// remove the disposable later (if desired). + @discardableResult + public static func +=(lhs: CompositeDisposable, rhs: Disposable?) -> Disposable? { + return lhs.add(rhs) + } + + /// Adds the right-hand-side `ActionDisposable` to the left-hand-side + /// `CompositeDisposable`. + /// + /// ```` + /// disposable += { ... } + /// ```` + /// + /// - parameters: + /// - lhs: Disposable to add to. + /// - rhs: Closure to add as a disposable. + /// + /// - returns: An instance of `DisposableHandle` that can be used to opaquely + /// remove the disposable later (if desired). + @discardableResult + public static func +=(lhs: CompositeDisposable, rhs: @escaping () -> ()) -> Disposable? { + return lhs.add(rhs) + } +} + +/// A disposable that, upon deinitialization, will automatically dispose of +/// its inner disposable. +public final class ScopedDisposable: Disposable { + /// The disposable which will be disposed when the ScopedDisposable + /// deinitializes. + public let inner: Inner + + public var isDisposed: Bool { + return inner.isDisposed + } + + /// Initialize the receiver to dispose of the argument upon + /// deinitialization. + /// + /// - parameters: + /// - disposable: A disposable to dispose of when deinitializing. + public init(_ disposable: Inner) { + inner = disposable + } + + deinit { + dispose() + } + + public func dispose() { + return inner.dispose() + } +} + +extension ScopedDisposable where Inner == AnyDisposable { + /// Initialize the receiver to dispose of the argument upon + /// deinitialization. + /// + /// - parameters: + /// - disposable: A disposable to dispose of when deinitializing, which + /// will be wrapped in an `AnyDisposable`. + public convenience init(_ disposable: Disposable) { + self.init(Inner(disposable)) + } +} + +extension ScopedDisposable where Inner == CompositeDisposable { + /// Adds the right-hand-side disposable to the left-hand-side + /// `ScopedDisposable`. + /// + /// ```` + /// disposable += { ... } + /// ```` + /// + /// - parameters: + /// - lhs: Disposable to add to. + /// - rhs: Disposable to add. + /// + /// - returns: An instance of `DisposableHandle` that can be used to opaquely + /// remove the disposable later (if desired). + @discardableResult + public static func +=(lhs: ScopedDisposable, rhs: Disposable?) -> Disposable? { + return lhs.inner.add(rhs) + } + + /// Adds the right-hand-side disposable to the left-hand-side + /// `ScopedDisposable`. + /// + /// ```` + /// disposable += { ... } + /// ```` + /// + /// - parameters: + /// - lhs: Disposable to add to. + /// - rhs: Closure to add as a disposable. + /// + /// - returns: An instance of `DisposableHandle` that can be used to opaquely + /// remove the disposable later (if desired). + @discardableResult + public static func +=(lhs: ScopedDisposable, rhs: @escaping () -> ()) -> Disposable? { + return lhs.inner.add(rhs) + } +} + +/// A disposable that disposes of its wrapped disposable, and allows its +/// wrapped disposable to be replaced. +public final class SerialDisposable: Disposable { + private let _inner: Atomic + private var state: UnsafeAtomicState + + public var isDisposed: Bool { + return state.is(.disposed) + } + + /// The current inner disposable to dispose of. + /// + /// Whenever this property is set (even to the same value!), the previous + /// disposable is automatically disposed. + public var inner: Disposable? { + get { + return _inner.value + } + + set(d) { + _inner.swap(d)?.dispose() + if let d = d, isDisposed { + d.dispose() + } + } + } + + /// Initializes the receiver to dispose of the argument when the + /// SerialDisposable is disposed. + /// + /// - parameters: + /// - disposable: Optional disposable. + public init(_ disposable: Disposable? = nil) { + self._inner = Atomic(disposable) + self.state = UnsafeAtomicState(DisposableState.active) + } + + public func dispose() { + if state.tryDispose() { + _inner.swap(nil)?.dispose() + } + } + + deinit { + state.deinitialize() + } +} diff --git a/Sample/Pods/ReactiveSwift/Sources/Event.swift b/Sample/Pods/ReactiveSwift/Sources/Event.swift new file mode 100644 index 00000000..32f604d4 --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/Event.swift @@ -0,0 +1,180 @@ +// +// Event.swift +// ReactiveSwift +// +// Created by Justin Spahr-Summers on 2015-01-16. +// Copyright (c) 2015 GitHub. All rights reserved. +// + +extension Signal { + /// Represents a signal event. + /// + /// Signals must conform to the grammar: + /// `value* (failed | completed | interrupted)?` + public enum Event { + /// A value provided by the signal. + case value(Value) + + /// The signal terminated because of an error. No further events will be + /// received. + case failed(Error) + + /// The signal successfully terminated. No further events will be received. + case completed + + /// Event production on the signal has been interrupted. No further events + /// will be received. + /// + /// - important: This event does not signify the successful or failed + /// completion of the signal. + case interrupted + + /// Whether this event is a completed event. + public var isCompleted: Bool { + switch self { + case .completed: + return true + + case .value, .failed, .interrupted: + return false + } + } + + /// Whether this event indicates signal termination (i.e., that no further + /// events will be received). + public var isTerminating: Bool { + switch self { + case .value: + return false + + case .failed, .completed, .interrupted: + return true + } + } + + /// Lift the given closure over the event's value. + /// + /// - important: The closure is called only on `value` type events. + /// + /// - parameters: + /// - f: A closure that accepts a value and returns a new value + /// + /// - returns: An event with function applied to a value in case `self` is a + /// `value` type of event. + public func map(_ f: (Value) -> U) -> Signal.Event { + switch self { + case let .value(value): + return .value(f(value)) + + case let .failed(error): + return .failed(error) + + case .completed: + return .completed + + case .interrupted: + return .interrupted + } + } + + /// Lift the given closure over the event's error. + /// + /// - important: The closure is called only on failed type event. + /// + /// - parameters: + /// - f: A closure that accepts an error object and returns + /// a new error object + /// + /// - returns: An event with function applied to an error object in case + /// `self` is a `.Failed` type of event. + public func mapError(_ f: (Error) -> F) -> Signal.Event { + switch self { + case let .value(value): + return .value(value) + + case let .failed(error): + return .failed(f(error)) + + case .completed: + return .completed + + case .interrupted: + return .interrupted + } + } + + /// Unwrap the contained `value` value. + public var value: Value? { + if case let .value(value) = self { + return value + } else { + return nil + } + } + + /// Unwrap the contained `Error` value. + public var error: Error? { + if case let .failed(error) = self { + return error + } else { + return nil + } + } + } +} + +extension Signal.Event where Value: Equatable, Error: Equatable { + public static func == (lhs: Signal.Event, rhs: Signal.Event) -> Bool { + switch (lhs, rhs) { + case let (.value(left), .value(right)): + return left == right + + case let (.failed(left), .failed(right)): + return left == right + + case (.completed, .completed): + return true + + case (.interrupted, .interrupted): + return true + + default: + return false + } + } +} + +extension Signal.Event: CustomStringConvertible { + public var description: String { + switch self { + case let .value(value): + return "VALUE \(value)" + + case let .failed(error): + return "FAILED \(error)" + + case .completed: + return "COMPLETED" + + case .interrupted: + return "INTERRUPTED" + } + } +} + +/// Event protocol for constraining signal extensions +public protocol EventProtocol { + /// The value type of an event. + associatedtype Value + /// The error type of an event. If errors aren't possible then `NoError` can + /// be used. + associatedtype Error: Swift.Error + /// Extracts the event from the receiver. + var event: Signal.Event { get } +} + +extension Signal.Event: EventProtocol { + public var event: Signal.Event { + return self + } +} diff --git a/Sample/Pods/ReactiveSwift/Sources/EventLogger.swift b/Sample/Pods/ReactiveSwift/Sources/EventLogger.swift new file mode 100644 index 00000000..263101c1 --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/EventLogger.swift @@ -0,0 +1,139 @@ +// +// EventLogger.swift +// ReactiveSwift +// +// Created by Rui Peres on 30/04/2016. +// Copyright © 2016 GitHub. All rights reserved. +// + +import Foundation + +/// A namespace for logging event types. +public enum LoggingEvent { + public enum Signal: String { + case value, completed, failed, terminated, disposed, interrupted + + public static let allEvents: Set = [ + .value, .completed, .failed, .terminated, .disposed, .interrupted, + ] + } + + public enum SignalProducer: String { + case starting, started, value, completed, failed, terminated, disposed, interrupted + + public static let allEvents: Set = [ + .starting, .started, .value, .completed, .failed, .terminated, .disposed, .interrupted, + ] + } +} + +public func defaultEventLog(identifier: String, event: String, fileName: String, functionName: String, lineNumber: Int) { + print("[\(identifier)] \(event) fileName: \(fileName), functionName: \(functionName), lineNumber: \(lineNumber)") +} + +/// A type that represents an event logging function. +/// Signature is: +/// - identifier +/// - event +/// - fileName +/// - functionName +/// - lineNumber +public typealias EventLogger = ( + _ identifier: String, + _ event: String, + _ fileName: String, + _ functionName: String, + _ lineNumber: Int +) -> Void + +extension Signal { + /// Logs all events that the receiver sends. By default, it will print to + /// the standard output. + /// + /// - parameters: + /// - identifier: a string to identify the Signal firing events. + /// - events: Types of events to log. + /// - fileName: Name of the file containing the code which fired the + /// event. + /// - functionName: Function where event was fired. + /// - lineNumber: Line number where event was fired. + /// - logger: Logger that logs the events. + /// + /// - returns: Signal that, when observed, logs the fired events. + public func logEvents(identifier: String = "", events: Set = LoggingEvent.Signal.allEvents, fileName: String = #file, functionName: String = #function, lineNumber: Int = #line, logger: @escaping EventLogger = defaultEventLog) -> Signal { + func log(_ event: LoggingEvent.Signal) -> ((T) -> Void)? { + return event.logIfNeeded(events: events) { event in + logger(identifier, event, fileName, functionName, lineNumber) + } + } + + return self.on( + failed: log(.failed), + completed: log(.completed) as ((()) -> Void)?, + interrupted: log(.interrupted) as ((()) -> Void)?, + terminated: log(.terminated) as ((()) -> Void)?, + disposed: log(.disposed) as ((()) -> Void)?, + value: log(.value) + ) + } +} + +extension SignalProducer { + /// Logs all events that the receiver sends. By default, it will print to + /// the standard output. + /// + /// - parameters: + /// - identifier: a string to identify the SignalProducer firing events. + /// - events: Types of events to log. + /// - fileName: Name of the file containing the code which fired the + /// event. + /// - functionName: Function where event was fired. + /// - lineNumber: Line number where event was fired. + /// - logger: Logger that logs the events. + /// + /// - returns: Signal producer that, when started, logs the fired events. + public func logEvents(identifier: String = "", + events: Set = LoggingEvent.SignalProducer.allEvents, + fileName: String = #file, + functionName: String = #function, + lineNumber: Int = #line, + logger: @escaping EventLogger = defaultEventLog + ) -> SignalProducer { + func log(_ event: LoggingEvent.SignalProducer) -> ((T) -> Void)? { + return event.logIfNeeded(events: events) { event in + logger(identifier, event, fileName, functionName, lineNumber) + } + } + + return self.on( + starting: log(.starting) as ((()) -> Void)?, + started: log(.started) as ((()) -> Void)?, + failed: log(.failed), + completed: log(.completed) as ((()) -> Void)?, + interrupted: log(.interrupted) as ((()) -> Void)?, + terminated: log(.terminated) as ((()) -> Void)?, + disposed: log(.disposed) as ((()) -> Void)?, + value: log(.value) + ) + } +} + +private protocol LoggingEventProtocol: Hashable, RawRepresentable {} +extension LoggingEvent.Signal: LoggingEventProtocol {} +extension LoggingEvent.SignalProducer: LoggingEventProtocol {} + +private extension LoggingEventProtocol { + func logIfNeeded(events: Set, logger: @escaping (String) -> Void) -> ((T) -> Void)? { + guard events.contains(self) else { + return nil + } + + return { value in + if value is Void { + logger("\(self.rawValue)") + } else { + logger("\(self.rawValue) \(value)") + } + } + } +} diff --git a/Sample/Pods/ReactiveSwift/Sources/Flatten.swift b/Sample/Pods/ReactiveSwift/Sources/Flatten.swift new file mode 100644 index 00000000..bcf293d8 --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/Flatten.swift @@ -0,0 +1,952 @@ +// +// Flatten.swift +// ReactiveSwift +// +// Created by Neil Pankey on 11/30/15. +// Copyright © 2015 GitHub. All rights reserved. +// + +import enum Result.NoError + +/// Describes how a stream of inner streams should be flattened into a stream of values. +public struct FlattenStrategy { + fileprivate enum Kind { + case concurrent(limit: UInt) + case latest + case race + } + + fileprivate let kind: Kind + + private init(kind: Kind) { + self.kind = kind + } + + /// The stream of streams is merged, so that any value sent by any of the inner + /// streams is forwarded immediately to the flattened stream of values. + /// + /// The flattened stream of values completes only when the stream of streams, and all + /// the inner streams it sent, have completed. + /// + /// Any interruption of inner streams is treated as completion, and does not interrupt + /// the flattened stream of values. + /// + /// Any failure from the inner streams is propagated immediately to the flattened + /// stream of values. + public static let merge = FlattenStrategy(kind: .concurrent(limit: .max)) + + /// The stream of streams is concatenated, so that only values from one inner stream + /// are forwarded at a time, in the order the inner streams are received. + /// + /// In other words, if an inner stream is received when a previous inner stream has + /// yet terminated, the received stream would be enqueued. + /// + /// The flattened stream of values completes only when the stream of streams, and all + /// the inner streams it sent, have completed. + /// + /// Any interruption of inner streams is treated as completion, and does not interrupt + /// the flattened stream of values. + /// + /// Any failure from the inner streams is propagated immediately to the flattened + /// stream of values. + public static let concat = FlattenStrategy(kind: .concurrent(limit: 1)) + + /// The stream of streams is merged with the given concurrency cap, so that any value + /// sent by any of the inner streams on the fly is forwarded immediately to the + /// flattened stream of values. + /// + /// In other words, if an inner stream is received when a previous inner stream has + /// yet terminated, the received stream would be enqueued. + /// + /// The flattened stream of values completes only when the stream of streams, and all + /// the inner streams it sent, have completed. + /// + /// Any interruption of inner streams is treated as completion, and does not interrupt + /// the flattened stream of values. + /// + /// Any failure from the inner streams is propagated immediately to the flattened + /// stream of values. + /// + /// - precondition: `limit > 0`. + public static func concurrent(limit: UInt) -> FlattenStrategy { + return FlattenStrategy(kind: .concurrent(limit: limit)) + } + + /// Forward only values from the latest inner stream sent by the stream of streams. + /// The active inner stream is disposed of as a new inner stream is received. + /// + /// The flattened stream of values completes only when the stream of streams, and all + /// the inner streams it sent, have completed. + /// + /// Any interruption of inner streams is treated as completion, and does not interrupt + /// the flattened stream of values. + /// + /// Any failure from the inner streams is propagated immediately to the flattened + /// stream of values. + public static let latest = FlattenStrategy(kind: .latest) + + /// Forward only events from the first inner stream that sends an event. Any other + /// in-flight inner streams is disposed of when the winning inner stream is + /// determined. + /// + /// The flattened stream of values completes only when the stream of streams, and the + /// winning inner stream, have completed. + /// + /// Any interruption of inner streams is propagated immediately to the flattened + /// stream of values. + /// + /// Any failure from the inner streams is propagated immediately to the flattened + /// stream of values. + public static let race = FlattenStrategy(kind: .race) +} + +extension Signal where Value: SignalProducerConvertible, Error == Value.Error { + /// Flattens the inner producers sent upon `signal` (into a single signal of + /// values), according to the semantics of the given strategy. + /// + /// - note: If `signal` or an active inner producer fails, the returned + /// signal will forward that failure immediately. + /// + /// - warning: `interrupted` events on inner producers will be treated like + /// `completed` events on inner producers. + /// + /// - parameters: + /// - strategy: Strategy used when flattening signals. + public func flatten(_ strategy: FlattenStrategy) -> Signal { + switch strategy.kind { + case .concurrent(let limit): + return self.concurrent(limit: limit) + + case .latest: + return self.switchToLatest() + + case .race: + return self.race() + } + } +} + +extension Signal where Value: SignalProducerConvertible, Error == NoError { + /// Flattens the inner producers sent upon `signal` (into a single signal of + /// values), according to the semantics of the given strategy. + /// + /// - note: If `signal` or an active inner producer fails, the returned + /// signal will forward that failure immediately. + /// + /// - warning: `interrupted` events on inner producers will be treated like + /// `completed` events on inner producers. + /// + /// - parameters: + /// - strategy: Strategy used when flattening signals. + public func flatten(_ strategy: FlattenStrategy) -> Signal { + return self + .promoteError(Value.Error.self) + .flatten(strategy) + } +} + +extension Signal where Value: SignalProducerConvertible, Error == NoError, Value.Error == NoError { + /// Flattens the inner producers sent upon `signal` (into a single signal of + /// values), according to the semantics of the given strategy. + /// + /// - warning: `interrupted` events on inner producers will be treated like + /// `completed` events on inner producers. + /// + /// - parameters: + /// - strategy: Strategy used when flattening signals. + public func flatten(_ strategy: FlattenStrategy) -> Signal { + switch strategy.kind { + case .concurrent(let limit): + return self.concurrent(limit: limit) + + case .latest: + return self.switchToLatest() + + case .race: + return self.race() + } + } +} + +extension Signal where Value: SignalProducerConvertible, Value.Error == NoError { + /// Flattens the inner producers sent upon `signal` (into a single signal of + /// values), according to the semantics of the given strategy. + /// + /// - note: If `signal` fails, the returned signal will forward that failure + /// immediately. + /// + /// - warning: `interrupted` events on inner producers will be treated like + /// `completed` events on inner producers. + /// + /// - parameters: + /// - strategy: Strategy used when flattening signals. + public func flatten(_ strategy: FlattenStrategy) -> Signal { + return self.flatMap(strategy) { $0.producer.promoteError(Error.self) } + } +} + +extension SignalProducer where Value: SignalProducerConvertible, Error == Value.Error { + /// Flattens the inner producers sent upon `producer` (into a single + /// producer of values), according to the semantics of the given strategy. + /// + /// - note: If `producer` or an active inner producer fails, the returned + /// producer will forward that failure immediately. + /// + /// - warning: `interrupted` events on inner producers will be treated like + /// `completed` events on inner producers. + /// + /// - parameters: + /// - strategy: Strategy used when flattening signals. + public func flatten(_ strategy: FlattenStrategy) -> SignalProducer { + switch strategy.kind { + case .concurrent(let limit): + return self.concurrent(limit: limit) + + case .latest: + return self.switchToLatest() + + case .race: + return self.race() + } + } +} + +extension SignalProducer where Value: SignalProducerConvertible, Error == NoError { + /// Flattens the inner producers sent upon `producer` (into a single + /// producer of values), according to the semantics of the given strategy. + /// + /// - note: If an active inner producer fails, the returned producer will + /// forward that failure immediately. + /// + /// - warning: `interrupted` events on inner producers will be treated like + /// `completed` events on inner producers. + /// + /// - parameters: + /// - strategy: Strategy used when flattening signals. + public func flatten(_ strategy: FlattenStrategy) -> SignalProducer { + return self + .promoteError(Value.Error.self) + .flatten(strategy) + } +} + +extension SignalProducer where Value: SignalProducerConvertible, Error == NoError, Value.Error == NoError { + /// Flattens the inner producers sent upon `producer` (into a single + /// producer of values), according to the semantics of the given strategy. + /// + /// - warning: `interrupted` events on inner producers will be treated like + /// `completed` events on inner producers. + /// + /// - parameters: + /// - strategy: Strategy used when flattening signals. + public func flatten(_ strategy: FlattenStrategy) -> SignalProducer { + switch strategy.kind { + case .concurrent(let limit): + return self.concurrent(limit: limit) + + case .latest: + return self.switchToLatest() + + case .race: + return self.race() + } + } +} + +extension SignalProducer where Value: SignalProducerConvertible, Value.Error == NoError { + /// Flattens the inner producers sent upon `signal` (into a single signal of + /// values), according to the semantics of the given strategy. + /// + /// - note: If `signal` fails, the returned signal will forward that failure + /// immediately. + /// + /// - warning: `interrupted` events on inner producers will be treated like + /// `completed` events on inner producers. + /// + /// - parameters: + /// - strategy: Strategy used when flattening signals. + public func flatten(_ strategy: FlattenStrategy) -> SignalProducer { + return self.flatMap(strategy) { $0.producer.promoteError(Error.self) } + } +} + +extension Signal where Value: Sequence { + /// Flattens the `sequence` value sent by `signal`. + public func flatten() -> Signal { + return self.flatMap(.merge, SignalProducer.init) + } +} + +extension SignalProducer where Value: Sequence { + /// Flattens the `sequence` value sent by `signal`. + public func flatten() -> SignalProducer { + return self.flatMap(.merge, SignalProducer.init) + } +} + +extension Signal where Value: SignalProducerConvertible, Error == Value.Error { + fileprivate func concurrent(limit: UInt) -> Signal { + precondition(limit > 0, "The concurrent limit must be greater than zero.") + + return Signal { relayObserver in + let disposable = CompositeDisposable() + let relayDisposable = CompositeDisposable() + + disposable += relayDisposable + disposable += self.observeConcurrent(relayObserver, limit, relayDisposable) + + return disposable + } + } + + fileprivate func observeConcurrent(_ observer: Signal.Observer, _ limit: UInt, _ disposable: CompositeDisposable) -> Disposable? { + let state = Atomic(ConcurrentFlattenState(limit: limit)) + + func startNextIfNeeded() { + while let producer = state.modify({ $0.dequeue() }) { + let producerState = UnsafeAtomicState(.starting) + let deinitializer = ScopedDisposable(AnyDisposable(producerState.deinitialize)) + + producer.startWithSignal { signal, inner in + let handle = disposable.add(inner) + + signal.observe { event in + switch event { + case .completed, .interrupted: + handle?.dispose() + + let shouldComplete: Bool = state.modify { state in + state.activeCount -= 1 + return state.shouldComplete + } + + withExtendedLifetime(deinitializer) { + if shouldComplete { + observer.sendCompleted() + } else if producerState.is(.started) { + startNextIfNeeded() + } + } + + case .value, .failed: + observer.action(event) + } + } + } + + withExtendedLifetime(deinitializer) { + producerState.setStarted() + } + } + } + + return observe { event in + switch event { + case let .value(value): + state.modify { $0.queue.append(value.producer) } + startNextIfNeeded() + + case let .failed(error): + observer.send(error: error) + + case .completed: + let shouldComplete: Bool = state.modify { state in + state.isOuterCompleted = true + return state.shouldComplete + } + + if shouldComplete { + observer.sendCompleted() + } + + case .interrupted: + observer.sendInterrupted() + } + } + } +} + +extension SignalProducer where Value: SignalProducerConvertible, Error == Value.Error { + fileprivate func concurrent(limit: UInt) -> SignalProducer { + precondition(limit > 0, "The concurrent limit must be greater than zero.") + + return SignalProducer { relayObserver, lifetime in + self.startWithSignal { signal, signalDisposable in + let disposables = CompositeDisposable() + lifetime.observeEnded(signalDisposable.dispose) + lifetime.observeEnded(disposables.dispose) + + _ = signal.observeConcurrent(relayObserver, limit, disposables) + } + } + } +} + +extension SignalProducer { + /// `concat`s `next` onto `self`. + /// + /// - parameters: + /// - next: A follow-up producer to concat `self` with. + /// + /// - returns: A producer that will start `self` and then on completion of + /// `self` - will start `next`. + public func concat(_ next: SignalProducer) -> SignalProducer { + return SignalProducer, Error>([ self.producer, next ]).flatten(.concat) + } + + /// `concat`s `value` onto `self`. + /// + /// - parameters: + /// - value: A value to concat onto `self`. + /// + /// - returns: A producer that, when started, will emit own values and on + /// completion will emit a `value`. + public func concat(value: Value) -> SignalProducer { + return self.concat(SignalProducer(value: value)) + } + + /// `concat`s `self` onto initial `previous`. + /// + /// - parameters: + /// - previous: A producer to start before `self`. + /// + /// - returns: A signal producer that, when started, first emits values from + /// `previous` producer and then from `self`. + public func prefix(_ previous: SignalProducer) -> SignalProducer { + return previous.concat(self) + } + + /// `concat`s `self` onto initial `value`. + /// + /// - parameters: + /// - value: A first value to emit. + /// + /// - returns: A producer that, when started, first emits `value`, then all + /// values emited by `self`. + public func prefix(value: Value) -> SignalProducer { + return self.prefix(SignalProducer(value: value)) + } +} + +private final class ConcurrentFlattenState { + typealias Producer = ReactiveSwift.SignalProducer + + /// The limit of active producers. + let limit: UInt + + /// The number of active producers. + var activeCount: UInt = 0 + + /// The producers waiting to be started. + var queue: [Producer] = [] + + /// Whether the outer producer has completed. + var isOuterCompleted = false + + /// Whether the flattened signal should complete. + var shouldComplete: Bool { + return isOuterCompleted && activeCount == 0 && queue.isEmpty + } + + init(limit: UInt) { + self.limit = limit + } + + /// Dequeue the next producer if one should be started. + /// + /// - returns: The `Producer` to start or `nil` if no producer should be + /// started. + func dequeue() -> Producer? { + if activeCount < limit, !queue.isEmpty { + activeCount += 1 + return queue.removeFirst() + } else { + return nil + } + } +} + +private enum ProducerState: Int32 { + case starting + case started +} + +extension UnsafeAtomicState where State == ProducerState { + fileprivate func setStarted() { + precondition(tryTransition(from: .starting, to: .started), "The transition is not supposed to fail.") + } +} + +extension Signal { + /// Merges the given signals into a single `Signal` that will emit all + /// values from each of them, and complete when all of them have completed. + /// + /// - parameters: + /// - signals: A sequence of signals to merge. + public static func merge(_ signals: Seq) -> Signal where Seq.Iterator.Element == Signal + { + return SignalProducer, Error>(signals) + .flatten(.merge) + .startAndRetrieveSignal() + } + + /// Merges the given signals into a single `Signal` that will emit all + /// values from each of them, and complete when all of them have completed. + /// + /// - parameters: + /// - signals: A list of signals to merge. + public static func merge(_ signals: Signal...) -> Signal { + return Signal.merge(signals) + } +} + +extension SignalProducer { + /// Merges the given producers into a single `SignalProducer` that will emit + /// all values from each of them, and complete when all of them have + /// completed. + /// + /// - parameters: + /// - producers: A sequence of producers to merge. + public static func merge(_ producers: Seq) -> SignalProducer where Seq.Iterator.Element == SignalProducer + { + return SignalProducer(producers).flatten(.merge) + } + + /// Merges the given producers into a single `SignalProducer` that will emit + /// all values from each of them, and complete when all of them have + /// completed. + /// + /// - parameters: + /// - producers: A sequence of producers to merge. + public static func merge(_ producers: SignalProducer...) -> SignalProducer { + return SignalProducer.merge(producers) + } +} + +extension Signal where Value: SignalProducerConvertible, Error == Value.Error { + /// Returns a signal that forwards values from the latest signal sent on + /// `signal`, ignoring values sent on previous inner signal. + /// + /// - warning: An error sent on `signal` or the latest inner signal will be + /// sent on the returned signal. + /// + /// - note: The returned signal completes when `signal` and the latest inner + /// signal have both completed. + fileprivate func switchToLatest() -> Signal { + return Signal { observer in + let composite = CompositeDisposable() + let serial = SerialDisposable() + + composite += serial + composite += self.observeSwitchToLatest(observer, serial) + + return composite + } + } + + fileprivate func observeSwitchToLatest(_ observer: Signal.Observer, _ latestInnerDisposable: SerialDisposable) -> Disposable? { + let state = Atomic(LatestState()) + + return self.observe { event in + switch event { + case let .value(p): + p.producer.startWithSignal { innerSignal, innerDisposable in + state.modify { + // When we replace the disposable below, this prevents + // the generated Interrupted event from doing any work. + $0.replacingInnerSignal = true + } + + latestInnerDisposable.inner = innerDisposable + + state.modify { + $0.replacingInnerSignal = false + $0.innerSignalComplete = false + } + + innerSignal.observe { event in + switch event { + case .interrupted: + // If interruption occurred as a result of a new + // producer arriving, we don't want to notify our + // observer. + let shouldComplete: Bool = state.modify { state in + if !state.replacingInnerSignal { + state.innerSignalComplete = true + } + return !state.replacingInnerSignal && state.outerSignalComplete + } + + if shouldComplete { + observer.sendCompleted() + } + + case .completed: + let shouldComplete: Bool = state.modify { + $0.innerSignalComplete = true + return $0.outerSignalComplete + } + + if shouldComplete { + observer.sendCompleted() + } + + case .value, .failed: + observer.action(event) + } + } + } + + case let .failed(error): + observer.send(error: error) + + case .completed: + let shouldComplete: Bool = state.modify { + $0.outerSignalComplete = true + return $0.innerSignalComplete + } + + if shouldComplete { + observer.sendCompleted() + } + + case .interrupted: + observer.sendInterrupted() + } + } + } +} + +extension SignalProducer where Value: SignalProducerConvertible, Error == Value.Error { + /// - warning: An error sent on `signal` or the latest inner signal will be + /// sent on the returned signal. + /// + /// - note: The returned signal completes when `signal` and the latest inner + /// signal have both completed. + /// + /// - returns: A signal that forwards values from the latest signal sent on + /// `signal`, ignoring values sent on previous inner signal. + fileprivate func switchToLatest() -> SignalProducer { + return SignalProducer { observer, lifetime in + let latestInnerDisposable = SerialDisposable() + lifetime.observeEnded(latestInnerDisposable.dispose) + + self.startWithSignal { signal, signalDisposable in + lifetime.observeEnded(signalDisposable.dispose) + + if let disposable = signal.observeSwitchToLatest(observer, latestInnerDisposable) { + lifetime.observeEnded(disposable.dispose) + } + } + } + } +} + +private struct LatestState { + var outerSignalComplete: Bool = false + var innerSignalComplete: Bool = true + + var replacingInnerSignal: Bool = false +} + +extension Signal where Value: SignalProducerConvertible, Error == Value.Error { + /// Returns a signal that forwards values from the "first input signal to send an event" + /// (winning signal) that is sent on `self`, ignoring values sent from other inner signals. + /// + /// An error sent on `self` or the winning inner signal will be sent on the + /// returned signal. + /// + /// The returned signal completes when `self` and the winning inner signal have both completed. + fileprivate func race() -> Signal { + return Signal { observer in + let composite = CompositeDisposable() + let relayDisposable = CompositeDisposable() + + composite += relayDisposable + composite += self.observeRace(observer, relayDisposable) + + return composite + } + } + + fileprivate func observeRace(_ observer: Signal.Observer, _ relayDisposable: CompositeDisposable) -> Disposable? { + let state = Atomic(RaceState()) + + return self.observe { event in + switch event { + case let .value(innerProducer): + // Ignore consecutive `innerProducer`s if any `innerSignal` already sent an event. + guard !relayDisposable.isDisposed else { + return + } + + innerProducer.producer.startWithSignal { innerSignal, innerDisposable in + state.modify { + $0.innerSignalComplete = false + } + + let disposableHandle = relayDisposable.add(innerDisposable) + var isWinningSignal = false + + innerSignal.observe { event in + if !isWinningSignal { + isWinningSignal = state.modify { state in + guard !state.isActivated else { + return false + } + + state.isActivated = true + return true + } + + // Ignore non-winning signals. + guard isWinningSignal else { return } + + // The disposals would be run exactly once immediately after + // the winning signal flips `state.isActivated`. + disposableHandle?.dispose() + relayDisposable.dispose() + } + + switch event { + case .completed: + let shouldComplete: Bool = state.modify { state in + state.innerSignalComplete = true + return state.outerSignalComplete + } + + if shouldComplete { + observer.sendCompleted() + } + + case .value, .failed, .interrupted: + observer.action(event) + } + } + } + + case let .failed(error): + observer.send(error: error) + + case .completed: + let shouldComplete: Bool = state.modify { state in + state.outerSignalComplete = true + return state.innerSignalComplete + } + + if shouldComplete { + observer.sendCompleted() + } + + case .interrupted: + observer.sendInterrupted() + } + } + } +} + +extension SignalProducer where Value: SignalProducerConvertible, Error == Value.Error { + /// Returns a producer that forwards values from the "first input producer to send an event" + /// (winning producer) that is sent on `self`, ignoring values sent from other inner producers. + /// + /// An error sent on `self` or the winning inner producer will be sent on the + /// returned producer. + /// + /// The returned producer completes when `self` and the winning inner producer have both completed. + fileprivate func race() -> SignalProducer { + return SignalProducer { observer, lifetime in + let relayDisposable = CompositeDisposable() + lifetime.observeEnded(relayDisposable.dispose) + + self.startWithSignal { signal, signalDisposable in + lifetime.observeEnded(signalDisposable.dispose) + + if let disposable = signal.observeRace(observer, relayDisposable) { + lifetime.observeEnded(disposable.dispose) + } + } + } + } +} + +private struct RaceState { + var outerSignalComplete = false + var innerSignalComplete = true + var isActivated = false +} + +extension Signal { + /// Maps each event from `signal` to a new signal, then flattens the + /// resulting producers (into a signal of values), according to the + /// semantics of the given strategy. + /// + /// - warning: If `signal` or any of the created producers fail, the + /// returned signal will forward that failure immediately. + /// + /// - parameters: + /// - strategy: Strategy used when flattening signals. + /// - transform: A closure that takes a value emitted by `self` and + /// returns a signal producer with transformed value. + public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> Signal where Inner.Error == Error { + return map(transform).flatten(strategy) + } + + /// Maps each event from `signal` to a new signal, then flattens the + /// resulting producers (into a signal of values), according to the + /// semantics of the given strategy. + /// + /// - warning: If `signal` fails, the returned signal will forward that + /// failure immediately. + /// + /// - parameters: + /// - strategy: Strategy used when flattening signals. + /// - transform: A closure that takes a value emitted by `self` and + /// returns a signal producer with transformed value. + public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> Signal where Inner.Error == NoError { + return map(transform).flatten(strategy) + } +} + +extension Signal where Error == NoError { + /// Maps each event from `signal` to a new signal, then flattens the + /// resulting signals (into a signal of values), according to the + /// semantics of the given strategy. + /// + /// - warning: If any of the created signals emit an error, the returned + /// signal will forward that error immediately. + /// + /// - parameters: + /// - strategy: Strategy used when flattening signals. + /// - transform: A closure that takes a value emitted by `self` and + /// returns a signal producer with transformed value. + public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> Signal { + return map(transform).flatten(strategy) + } + + /// Maps each event from `signal` to a new signal, then flattens the + /// resulting signals (into a signal of values), according to the + /// semantics of the given strategy. + /// + /// - parameters: + /// - strategy: Strategy used when flattening signals. + /// - transform: A closure that takes a value emitted by `self` and + /// returns a signal producer with transformed value. + public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> Signal where Inner.Error == NoError { + return map(transform).flatten(strategy) + } +} + +extension SignalProducer { + /// Maps each event from `self` to a new producer, then flattens the + /// resulting producers (into a producer of values), according to the + /// semantics of the given strategy. + /// + /// - warning: If `self` or any of the created producers fail, the returned + /// producer will forward that failure immediately. + /// + /// - parameters: + /// - strategy: Strategy used when flattening signals. + /// - transform: A closure that takes a value emitted by `self` and + /// returns a signal producer with transformed value. + public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> SignalProducer where Inner.Error == Error { + return map(transform).flatten(strategy) + } + + /// Maps each event from `self` to a new producer, then flattens the + /// resulting producers (into a producer of values), according to the + /// semantics of the given strategy. + /// + /// - warning: If `self` fails, the returned producer will forward that + /// failure immediately. + /// + /// - parameters: + /// - strategy: Strategy used when flattening signals. + /// - transform: A closure that takes a value emitted by `self` and + /// returns a signal producer with transformed value. + public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> SignalProducer where Inner.Error == NoError { + return map(transform).flatten(strategy) + } +} + +extension SignalProducer where Error == NoError { + /// Maps each event from `self` to a new producer, then flattens the + /// resulting producers (into a producer of values), according to the + /// semantics of the given strategy. + /// + /// - parameters: + /// - strategy: Strategy used when flattening signals. + /// - transform: A closure that takes a value emitted by `self` and + /// returns a signal producer with transformed value. + public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> SignalProducer where Inner.Error == Error { + return map(transform).flatten(strategy) + } + + /// Maps each event from `self` to a new producer, then flattens the + /// resulting producers (into a producer of values), according to the + /// semantics of the given strategy. + /// + /// - warning: If any of the created producers fail, the returned producer + /// will forward that failure immediately. + /// + /// - parameters: + /// - strategy: Strategy used when flattening signals. + /// - transform: A closure that takes a value emitted by `self` and + /// returns a signal producer with transformed value. + public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> SignalProducer { + return map(transform).flatten(strategy) + } +} + + +extension Signal { + /// Catches any failure that may occur on the input signal, mapping to a new + /// producer that starts in its place. + /// + /// - parameters: + /// - transform: A closure that accepts emitted error and returns a signal + /// producer with a different type of error. + public func flatMapError(_ transform: @escaping (Error) -> SignalProducer) -> Signal { + return Signal { observer in + self.observeFlatMapError(transform, observer, SerialDisposable()) + } + } + + fileprivate func observeFlatMapError(_ handler: @escaping (Error) -> SignalProducer, _ observer: Signal.Observer, _ serialDisposable: SerialDisposable) -> Disposable? { + return self.observe { event in + switch event { + case let .value(value): + observer.send(value: value) + case let .failed(error): + handler(error).startWithSignal { signal, disposable in + serialDisposable.inner = disposable + signal.observe(observer) + } + case .completed: + observer.sendCompleted() + case .interrupted: + observer.sendInterrupted() + } + } + } +} + +extension SignalProducer { + /// Catches any failure that may occur on the input producer, mapping to a + /// new producer that starts in its place. + /// + /// - parameters: + /// - transform: A closure that accepts emitted error and returns a signal + /// producer with a different type of error. + public func flatMapError(_ transform: @escaping (Error) -> SignalProducer) -> SignalProducer { + return SignalProducer { observer, lifetime in + let serialDisposable = SerialDisposable() + lifetime.observeEnded(serialDisposable.dispose) + + self.startWithSignal { signal, signalDisposable in + serialDisposable.inner = signalDisposable + + _ = signal.observeFlatMapError(transform, observer, serialDisposable) + } + } + } +} diff --git a/Sample/Pods/ReactiveSwift/Sources/FoundationExtensions.swift b/Sample/Pods/ReactiveSwift/Sources/FoundationExtensions.swift new file mode 100644 index 00000000..5524b3b6 --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/FoundationExtensions.swift @@ -0,0 +1,168 @@ +// +// FoundationExtensions.swift +// ReactiveSwift +// +// Created by Justin Spahr-Summers on 2014-10-19. +// Copyright (c) 2014 GitHub. All rights reserved. +// + +import Foundation +import Dispatch +import enum Result.NoError +import struct Result.AnyError + +#if os(Linux) + import let CDispatch.NSEC_PER_USEC + import let CDispatch.NSEC_PER_SEC +#endif + +extension NotificationCenter: ReactiveExtensionsProvider {} + +extension Reactive where Base: NotificationCenter { + /// Returns a Signal to observe posting of the specified notification. + /// + /// - parameters: + /// - name: name of the notification to observe + /// - object: an instance which sends the notifications + /// + /// - returns: A Signal of notifications posted that match the given criteria. + /// + /// - note: The signal does not terminate naturally. Observers must be + /// explicitly disposed to avoid leaks. + public func notifications(forName name: Notification.Name?, object: AnyObject? = nil) -> Signal { + return Signal { [base = self.base] observer in + let notificationObserver = base.addObserver(forName: name, object: object, queue: nil) { notification in + observer.send(value: notification) + } + + return AnyDisposable { + base.removeObserver(notificationObserver) + } + } + } +} + +private let defaultSessionError = NSError(domain: "org.reactivecocoa.ReactiveSwift.Reactivity.URLSession.dataWithRequest", + code: 1, + userInfo: nil) + +extension URLSession: ReactiveExtensionsProvider {} + +extension Reactive where Base: URLSession { + /// Returns a SignalProducer which performs the work associated with an + /// `NSURLSession` + /// + /// - parameters: + /// - request: A request that will be performed when the producer is + /// started + /// + /// - returns: A producer that will execute the given request once for each + /// invocation of `start()`. + /// + /// - note: This method will not send an error event in the case of a server + /// side error (i.e. when a response with status code other than + /// 200...299 is received). + public func data(with request: URLRequest) -> SignalProducer<(Data, URLResponse), AnyError> { + return SignalProducer { [base = self.base] observer, lifetime in + let task = base.dataTask(with: request) { data, response, error in + if let data = data, let response = response { + observer.send(value: (data, response)) + observer.sendCompleted() + } else { + observer.send(error: AnyError(error ?? defaultSessionError)) + } + } + + lifetime.observeEnded(task.cancel) + task.resume() + } + } +} + +extension Date { + internal func addingTimeInterval(_ interval: DispatchTimeInterval) -> Date { + return addingTimeInterval(interval.timeInterval) + } +} + +extension DispatchTimeInterval { + internal var timeInterval: TimeInterval { + #if swift(>=3.2) && !os(Linux) + switch self { + case let .seconds(s): + return TimeInterval(s) + case let .milliseconds(ms): + return TimeInterval(TimeInterval(ms) / 1000.0) + case let .microseconds(us): + return TimeInterval(Int64(us) * Int64(NSEC_PER_USEC)) / TimeInterval(NSEC_PER_SEC) + case let .nanoseconds(ns): + return TimeInterval(ns) / TimeInterval(NSEC_PER_SEC) + case .never: + return .infinity + } + #else + switch self { + case let .seconds(s): + return TimeInterval(s) + case let .milliseconds(ms): + return TimeInterval(TimeInterval(ms) / 1000.0) + case let .microseconds(us): + return TimeInterval(Int64(us) * Int64(NSEC_PER_USEC)) / TimeInterval(NSEC_PER_SEC) + case let .nanoseconds(ns): + return TimeInterval(ns) / TimeInterval(NSEC_PER_SEC) + } + #endif + } + + // This was added purely so that our test scheduler to "go backwards" in + // time. See `TestScheduler.rewind(by interval: DispatchTimeInterval)`. + internal static prefix func -(lhs: DispatchTimeInterval) -> DispatchTimeInterval { + #if swift(>=3.2) && !os(Linux) + switch lhs { + case let .seconds(s): + return .seconds(-s) + case let .milliseconds(ms): + return .milliseconds(-ms) + case let .microseconds(us): + return .microseconds(-us) + case let .nanoseconds(ns): + return .nanoseconds(-ns) + case .never: + return .never + } + #else + switch lhs { + case let .seconds(s): + return .seconds(-s) + case let .milliseconds(ms): + return .milliseconds(-ms) + case let .microseconds(us): + return .microseconds(-us) + case let .nanoseconds(ns): + return .nanoseconds(-ns) + } + #endif + } + + /// Scales a time interval by the given scalar specified in `rhs`. + /// + /// - note: This method is only used internally to "scale down" a time + /// interval. Specifically it's used only to scale intervals to 10% + /// of their original value for the default `leeway` parameter in + /// `Scheduler.schedule(after:action:)` schedule and similar + /// other methods. + /// + /// If seconds is over 200,000, 10% is ~2,000, and hence we end up + /// with a value of ~2,000,000,000. Not quite overflowing a signed + /// integer on 32-bit platforms, but close. + /// + /// Even still, 200,000 seconds should be a rarely (if ever) + /// specified interval for our APIs. And even then, folks should be + /// smart and specify their own `leeway` parameter. + /// + /// - returns: Scaled interval in microseconds + internal static func *(lhs: DispatchTimeInterval, rhs: Double) -> DispatchTimeInterval { + let seconds = lhs.timeInterval * rhs + return .microseconds(Int(seconds * 1000 * 1000)) + } +} diff --git a/Sample/Pods/ReactiveSwift/Sources/InhabitableTypeGuards.swift b/Sample/Pods/ReactiveSwift/Sources/InhabitableTypeGuards.swift new file mode 100644 index 00000000..5c5d44a4 --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/InhabitableTypeGuards.swift @@ -0,0 +1,132 @@ +import Result + +// Observation +extension SignalProducer where Value == Never { + @discardableResult + @available(*, deprecated, message:"`Result.success` is never delivered - `Value` is inhabitable (Instantiation at runtime would trap)") + public func startWithResult(_ action: @escaping (Result) -> Void) -> Disposable { observingInhabitableTypeError() } + + @discardableResult + @available(*, deprecated, message:"Observer is never called - `Value` is inhabitable (Instantiation at runtime would trap)") + public func startWithValues(_ action: @escaping (Value) -> Void) -> Disposable { observingInhabitableTypeError() } +} + +extension SignalProducer where Value == Never, Error == NoError { + @discardableResult + @available(*, deprecated, message:"Observer is never called - `Value` and `Error` are inhabitable (Instantiation at runtime would trap)") + public func startWithResult(_ action: @escaping (Result) -> Void) -> Disposable { observingInhabitableTypeError() } +} + +extension SignalProducer where Error == NoError { + @discardableResult + @available(*, deprecated, message:"`Error` is inhabitable so the observer is never called (Instantiation at runtime would trap)") + public func startWithFailed(_ action: @escaping (Error) -> Void) -> Disposable { observingInhabitableTypeError() } +} + +extension Signal where Value == Never { + @discardableResult + @available(*, deprecated, message:"`Result.success` is never delivered - `Value` is inhabitable (Instantiation at runtime would trap)") + public func observeResult(_ action: @escaping (Result) -> Void) -> Disposable? { observingInhabitableTypeError() } + + @discardableResult + @available(*, deprecated, message:"Observer is never called - `Value` is inhabitable (Instantiation at runtime would trap)") + public func observeValues(_ action: @escaping (Value) -> Void) -> Disposable? { observingInhabitableTypeError() } +} + +extension Signal where Value == Never, Error == NoError { + @discardableResult + @available(*, deprecated, message:"Observer is never called - `Value` and `Error` are inhabitable (Instantiation at runtime would trap)") + public func observeResult(_ action: @escaping (Result) -> Void) -> Disposable? { observingInhabitableTypeError() } +} + +extension Signal where Error == NoError { + @discardableResult + @available(*, deprecated, message:"Observer is never invoked - `Error` is inhabitable (Instantiation at runtime would trap)") + public func observeFailed(_ action: @escaping (Error) -> Void) -> Disposable? { observingInhabitableTypeError() } +} + +// flatMap +extension SignalProducer where Value == Never { + @discardableResult + @available(*, deprecated, message:"Use `promoteValue` instead - `Value` is inhabitable (Instantiation at runtime would trap)") + public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> SignalProducer where Inner.Error == Error { observingInhabitableTypeError() } + + @discardableResult + @available(*, deprecated, message:"Use `promoteValue` instead - `Value` is inhabitable (Instantiation at runtime would trap)") + public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> SignalProducer where Inner.Error == NoError { observingInhabitableTypeError() } +} + +extension SignalProducer where Value == Never, Error == NoError { + @discardableResult + @available(*, deprecated, message:"Use `promoteValue` instead - `Value` and `Error` are inhabitable (Instantiation at runtime would trap)") + public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> SignalProducer { observingInhabitableTypeError() } + + @discardableResult + @available(*, deprecated, message:"Use `promoteValue` instead - `Value` and `Error` are inhabitable (Instantiation at runtime would trap)") + public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> SignalProducer where Inner.Error == Error { observingInhabitableTypeError() } +} + +extension SignalProducer where Error == NoError { + @discardableResult + @available(*, deprecated, message:"Use `promoteError` instead - `Error` is inhabitable (Instantiation at runtime would trap)") + public func flatMapError(_ transform: @escaping (Error) -> SignalProducer) -> SignalProducer { observingInhabitableTypeError() } +} + +extension Signal where Value == Never { + @discardableResult + @available(*, deprecated, message:"Use `promoteValue` instead - `Value` is inhabitable (Instantiation at runtime would trap)") + public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> Signal where Inner.Error == Error { observingInhabitableTypeError() } + + @discardableResult + @available(*, deprecated, message:"Use `promoteValue` instead - `Value` is inhabitable (Instantiation at runtime would trap)") + public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> Signal where Inner.Error == NoError { observingInhabitableTypeError() } + +} + +extension Signal where Value == Never, Error == NoError { + @discardableResult + @available(*, deprecated, message:"Use `promoteValue` instead - `Value` and `Error` are inhabitable (Instantiation at runtime would trap)") + public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> Signal { observingInhabitableTypeError() } + + @discardableResult + @available(*, deprecated, message:"Use `promoteValue` instead - `Value` and `Error` are inhabitable (Instantiation at runtime would trap)") + public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> Signal where Inner.Error == Error { observingInhabitableTypeError() } +} + +extension Signal where Error == NoError { + @discardableResult + @available(*, deprecated, message:"Use `promoteError` instead - `Error` is inhabitable (Instantiation at runtime would trap)") + public func flatMapError(_ transform: @escaping (Error) -> SignalProducer) -> Signal { observingInhabitableTypeError() } +} + +@inline(never) +private func observingInhabitableTypeError() -> Never { + fatalError("Detected an attempt to instantiate a `Signal` or `SignalProducer` that observes an inhabitable type, e.g. `Never` or `NoError`. This is considered a logical error, and appropriate operators should be used instead. Please refer to the warnings raised by the compiler.") +} + +/* +func test() { + SignalProducer.never.startWithResult { _ in } + SignalProducer.never.startWithResult { _ in } + SignalProducer.never.startWithFailed { _ in } + SignalProducer.never.startWithFailed { _ in } + Signal.never.observeResult { _ in } + Signal.never.observeResult { _ in } + Signal.never.observeFailed { _ in } + Signal.never.observeFailed { _ in } + + SignalProducer.never.flatMap(.latest) { _ in SignalProducer.empty } + SignalProducer.never.flatMap(.latest) { _ in SignalProducer.empty } + SignalProducer.never.flatMap(.latest) { _ in SignalProducer.empty } + SignalProducer.never.flatMap(.latest) { _ in SignalProducer.empty } + SignalProducer.never.flatMapError { _ in SignalProducer.empty } + SignalProducer.never.flatMapError { _ in SignalProducer.empty } + + Signal.never.flatMap(.latest) { _ in SignalProducer.empty } + Signal.never.flatMap(.latest) { _ in SignalProducer.empty } + Signal.never.flatMap(.latest) { _ in SignalProducer.empty } + Signal.never.flatMap(.latest) { _ in SignalProducer.empty } + Signal.never.flatMapError { _ in SignalProducer.empty } + Signal.never.flatMapError { _ in SignalProducer.empty } +} +*/ diff --git a/Sample/Pods/ReactiveSwift/Sources/Lifetime.swift b/Sample/Pods/ReactiveSwift/Sources/Lifetime.swift new file mode 100644 index 00000000..08bcc1c1 --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/Lifetime.swift @@ -0,0 +1,110 @@ +import Foundation +import enum Result.NoError + +/// Represents the lifetime of an object, and provides a hook to observe when +/// the object deinitializes. +public final class Lifetime { + private let disposables: CompositeDisposable + + /// A signal that sends a `completed` event when the lifetime ends. + /// + /// - note: Consider using `Lifetime.observeEnded` if only a closure observer + /// is to be attached. + public var ended: Signal { + return Signal { observer in + return disposables += observer.sendCompleted + } + } + + /// A flag indicating whether the lifetime has ended. + public var hasEnded: Bool { + return disposables.isDisposed + } + + /// Initialize a `Lifetime` object with the supplied composite disposable. + /// + /// - parameters: + /// - signal: The composite disposable. + internal init(_ disposables: CompositeDisposable) { + self.disposables = disposables + } + + /// Initialize a `Lifetime` from a lifetime token, which is expected to be + /// associated with an object. + /// + /// - important: The resulting lifetime object does not retain the lifetime + /// token. + /// + /// - parameters: + /// - token: A lifetime token for detecting the deinitialization of the + /// associated object. + public convenience init(_ token: Token) { + self.init(token.disposables) + } + + /// Observe the termination of `self`. + /// + /// - parameters: + /// - action: The action to be invoked when `self` ends. + /// + /// - returns: A disposable that detaches `action` from the lifetime, or `nil` + /// if `lifetime` has already ended. + @discardableResult + public func observeEnded(_ action: @escaping () -> Void) -> Disposable? { + return disposables += action + } + + /// Add the given disposable as an observer of `self`. + /// + /// - parameters: + /// - disposable: The disposable to be disposed of when `self` ends. + /// + /// - returns: A disposable that detaches `disposable` from the lifetime, or `nil` + /// if `lifetime` has already ended. + @discardableResult + public static func += (lifetime: Lifetime, disposable: Disposable?) -> Disposable? { + return (disposable?.dispose).flatMap(lifetime.observeEnded) + } +} + +extension Lifetime { + /// Factory method for creating a `Lifetime` and its associated `Token`. + /// + /// - returns: A `(lifetime, token)` tuple. + public static func make() -> (lifetime: Lifetime, token: Token) { + let token = Token() + return (Lifetime(token), token) + } + + /// A `Lifetime` that has already ended. + public static let empty: Lifetime = { + let disposables = CompositeDisposable() + disposables.dispose() + return Lifetime(disposables) + }() +} + +extension Lifetime { + /// A token object which completes its signal when it deinitializes. + /// + /// It is generally used in conjuncion with `Lifetime` as a private + /// deinitialization trigger. + /// + /// ``` + /// class MyController { + /// private let (lifetime, token) = Lifetime.make() + /// } + /// ``` + public final class Token { + /// A signal that sends a Completed event when the lifetime ends. + fileprivate let disposables: CompositeDisposable + + public init() { + disposables = CompositeDisposable() + } + + deinit { + disposables.dispose() + } + } +} diff --git a/Sample/Pods/ReactiveSwift/Sources/Observer.swift b/Sample/Pods/ReactiveSwift/Sources/Observer.swift new file mode 100644 index 00000000..41cace94 --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/Observer.swift @@ -0,0 +1,122 @@ +// +// Observer.swift +// ReactiveSwift +// +// Created by Andy Matuschak on 10/2/15. +// Copyright © 2015 GitHub. All rights reserved. +// + +extension Signal { + /// An Observer is a simple wrapper around a function which can receive Events + /// (typically from a Signal). + public final class Observer { + public typealias Action = (Event) -> Void + + /// An action that will be performed upon arrival of the event. + public let action: Action + + /// Whether the observer should send an `interrupted` event as it deinitializes. + private let interruptsOnDeinit: Bool + + /// An initializer that accepts a closure accepting an event for the + /// observer. + /// + /// - parameters: + /// - action: A closure to lift over received event. + /// - interruptsOnDeinit: `true` if the observer should send an `interrupted` + /// event as it deinitializes. `false` otherwise. + internal init(action: @escaping Action, interruptsOnDeinit: Bool) { + self.action = action + self.interruptsOnDeinit = interruptsOnDeinit + } + + /// An initializer that accepts a closure accepting an event for the + /// observer. + /// + /// - parameters: + /// - action: A closure to lift over received event. + public init(_ action: @escaping Action) { + self.action = action + self.interruptsOnDeinit = false + } + + /// An initializer that accepts closures for different event types. + /// + /// - parameters: + /// - value: Optional closure executed when a `value` event is observed. + /// - failed: Optional closure that accepts an `Error` parameter when a + /// failed event is observed. + /// - completed: Optional closure executed when a `completed` event is + /// observed. + /// - interruped: Optional closure executed when an `interrupted` event is + /// observed. + public convenience init( + value: ((Value) -> Void)? = nil, + failed: ((Error) -> Void)? = nil, + completed: (() -> Void)? = nil, + interrupted: (() -> Void)? = nil + ) { + self.init { event in + switch event { + case let .value(v): + value?(v) + + case let .failed(error): + failed?(error) + + case .completed: + completed?() + + case .interrupted: + interrupted?() + } + } + } + + internal convenience init(mappingInterruptedToCompleted observer: Signal.Observer) { + self.init { event in + switch event { + case .value, .completed, .failed: + observer.action(event) + case .interrupted: + observer.sendCompleted() + } + } + } + + deinit { + if interruptsOnDeinit { + // Since `Signal` would ensure that only one terminal event would ever be + // sent for any given `Signal`, we do not need to assert any condition + // here. + action(.interrupted) + } + } + + /// Puts a `value` event into `self`. + /// + /// - parameters: + /// - value: A value sent with the `value` event. + public func send(value: Value) { + action(.value(value)) + } + + /// Puts a failed event into `self`. + /// + /// - parameters: + /// - error: An error object sent with failed event. + public func send(error: Error) { + action(.failed(error)) + } + + /// Puts a `completed` event into `self`. + public func sendCompleted() { + action(.completed) + } + + /// Puts an `interrupted` event into `self`. + public func sendInterrupted() { + action(.interrupted) + } + } +} diff --git a/Sample/Pods/ReactiveSwift/Sources/Optional.swift b/Sample/Pods/ReactiveSwift/Sources/Optional.swift new file mode 100644 index 00000000..1e8584c8 --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/Optional.swift @@ -0,0 +1,42 @@ +// +// Optional.swift +// ReactiveSwift +// +// Created by Neil Pankey on 6/24/15. +// Copyright (c) 2015 GitHub. All rights reserved. +// + +/// An optional protocol for use in type constraints. +public protocol OptionalProtocol { + /// The type contained in the otpional. + associatedtype Wrapped + + init(reconstructing value: Wrapped?) + + /// Extracts an optional from the receiver. + var optional: Wrapped? { get } +} + +extension Optional: OptionalProtocol { + public var optional: Wrapped? { + return self + } + + public init(reconstructing value: Wrapped?) { + self = value + } +} + +extension Signal { + /// Turns each value into an Optional. + internal func optionalize() -> Signal { + return map(Optional.init) + } +} + +extension SignalProducer { + /// Turns each value into an Optional. + internal func optionalize() -> SignalProducer { + return lift { $0.optionalize() } + } +} diff --git a/Sample/Pods/ReactiveSwift/Sources/Property.swift b/Sample/Pods/ReactiveSwift/Sources/Property.swift new file mode 100644 index 00000000..4262f04f --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/Property.swift @@ -0,0 +1,771 @@ +#if os(iOS) || os(macOS) || os(tvOS) || os(watchOS) +import Darwin.POSIX.pthread +#else +import Glibc +#endif +import enum Result.NoError + +/// Represents a property that allows observation of its changes. +/// +/// Only classes can conform to this protocol, because having a signal +/// for changes over time implies the origin must have a unique identity. +public protocol PropertyProtocol: class, BindingSource { + associatedtype Value + + /// The current value of the property. + var value: Value { get } + + /// The values producer of the property. + /// + /// It produces a signal that sends the property's current value, + /// followed by all changes over time. It completes when the property + /// has deinitialized, or has no further change. + /// + /// - note: If `self` is a composed property, the producer would be + /// bound to the lifetime of its sources. + var producer: SignalProducer { get } + + /// A signal that will send the property's changes over time. It + /// completes when the property has deinitialized, or has no further + /// change. + /// + /// - note: If `self` is a composed property, the signal would be + /// bound to the lifetime of its sources. + var signal: Signal { get } +} + +/// Represents an observable property that can be mutated directly. +public protocol MutablePropertyProtocol: PropertyProtocol, BindingTargetProvider { + /// The current value of the property. + var value: Value { get set } + + /// The lifetime of the property. + var lifetime: Lifetime { get } +} + +/// Default implementation of `BindingTargetProvider` for mutable properties. +extension MutablePropertyProtocol { + public var bindingTarget: BindingTarget { + return BindingTarget(lifetime: lifetime) { [weak self] in self?.value = $0 } + } +} + +/// Represents a mutable property that can be safety composed by exposing its +/// synchronization mechanic through the defined closure-based interface. +public protocol ComposableMutablePropertyProtocol: MutablePropertyProtocol { + /// Atomically performs an arbitrary action using the current value of the + /// variable. + /// + /// - parameters: + /// - action: A closure that accepts current property value. + /// + /// - returns: the result of the action. + func withValue(_ action: (Value) throws -> Result) rethrows -> Result + + /// Atomically modifies the variable. + /// + /// - parameters: + /// - action: A closure that accepts old property value and returns a new + /// property value. + /// + /// - returns: The result of the action. + func modify(_ action: (inout Value) throws -> Result) rethrows -> Result +} + +// Property operators. +// +// A composed property is a transformed view of its sources, and does not +// own its lifetime. Its producer and signal are bound to the lifetime of +// its sources. + +extension PropertyProtocol { + /// Lifts a unary SignalProducer operator to operate upon PropertyProtocol instead. + fileprivate func lift(_ transform: @escaping (SignalProducer) -> SignalProducer) -> Property { + return Property(unsafeProducer: transform(producer)) + } + + /// Lifts a binary SignalProducer operator to operate upon PropertyProtocol instead. + fileprivate func lift(_ transform: @escaping (SignalProducer) -> (SignalProducer) -> SignalProducer) -> (P) -> Property { + return { other in + return Property(unsafeProducer: transform(self.producer)(other.producer)) + } + } + + /// Maps the current value and all subsequent values to a new property. + /// + /// - parameters: + /// - transform: A closure that will map the current `value` of this + /// `Property` to a new value. + /// + /// - returns: A property that holds a mapped value from `self`. + public func map(_ transform: @escaping (Value) -> U) -> Property { + return lift { $0.map(transform) } + } + +#if swift(>=3.2) + /// Maps the current value and all subsequent values to a new property + /// by applying a key path. + /// + /// - parameters: + /// - keyPath: A key path relative to the property's `Value` type. + /// + /// - returns: A property that holds a mapped value from `self`. + public func map(_ keyPath: KeyPath) -> Property { + return lift { $0.map(keyPath) } + } +#endif + + /// Combines the current value and the subsequent values of two `Property`s in + /// the manner described by `Signal.combineLatest(with:)`. + /// + /// - parameters: + /// - other: A property to combine `self`'s value with. + /// + /// - returns: A property that holds a tuple containing values of `self` and + /// the given property. + public func combineLatest(with other: P) -> Property<(Value, P.Value)> { + return Property.combineLatest(self, other) + } + + /// Zips the current value and the subsequent values of two `Property`s in + /// the manner described by `Signal.zipWith`. + /// + /// - parameters: + /// - other: A property to zip `self`'s value with. + /// + /// - returns: A property that holds a tuple containing values of `self` and + /// the given property. + public func zip(with other: P) -> Property<(Value, P.Value)> { + return Property.zip(self, other) + } + + /// Forward events from `self` with history: values of the returned property + /// are a tuple whose first member is the previous value and whose second + /// member is the current value. `initial` is supplied as the first member + /// when `self` sends its first value. + /// + /// - parameters: + /// - initial: A value that will be combined with the first value sent by + /// `self`. + /// + /// - returns: A property that holds tuples that contain previous and + /// current values of `self`. + public func combinePrevious(_ initial: Value) -> Property<(Value, Value)> { + return lift { $0.combinePrevious(initial) } + } + + /// Forward only values from `self` that are not considered equivalent to its + /// consecutive predecessor. + /// + /// - note: The first value is always forwarded. + /// + /// - parameters: + /// - isEquivalent: A closure to determine whether two values are equivalent. + /// + /// - returns: A property which conditionally forwards values from `self`. + public func skipRepeats(_ isEquivalent: @escaping (Value, Value) -> Bool) -> Property { + return lift { $0.skipRepeats(isEquivalent) } + } +} + +extension PropertyProtocol where Value: Equatable { + /// Forward only values from `self` that are not equal to its consecutive predecessor. + /// + /// - note: The first value is always forwarded. + /// + /// - returns: A property which conditionally forwards values from `self`. + public func skipRepeats() -> Property { + return lift { $0.skipRepeats() } + } +} + +extension PropertyProtocol where Value: PropertyProtocol { + /// Flattens the inner property held by `self` (into a single property of + /// values), according to the semantics of the given strategy. + /// + /// - parameters: + /// - strategy: The preferred flatten strategy. + /// + /// - returns: A property that sends the values of its inner properties. + public func flatten(_ strategy: FlattenStrategy) -> Property { + return lift { $0.flatMap(strategy) { $0.producer } } + } +} + +extension PropertyProtocol { + /// Maps each property from `self` to a new property, then flattens the + /// resulting properties (into a single property), according to the + /// semantics of the given strategy. + /// + /// - parameters: + /// - strategy: The preferred flatten strategy. + /// - transform: The transform to be applied on `self` before flattening. + /// + /// - returns: A property that sends the values of its inner properties. + public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> P) -> Property { + return lift { $0.flatMap(strategy) { transform($0).producer } } + } + + /// Forward only those values from `self` that have unique identities across + /// the set of all values that have been held. + /// + /// - note: This causes the identities to be retained to check for + /// uniqueness. + /// + /// - parameters: + /// - transform: A closure that accepts a value and returns identity + /// value. + /// + /// - returns: A property that sends unique values during its lifetime. + public func uniqueValues(_ transform: @escaping (Value) -> Identity) -> Property { + return lift { $0.uniqueValues(transform) } + } +} + +extension PropertyProtocol where Value: Hashable { + /// Forwards only those values from `self` that are unique across the set of + /// all values that have been seen. + /// + /// - note: This causes the identities to be retained to check for uniqueness. + /// Providing a function that returns a unique value for each sent + /// value can help you reduce the memory footprint. + /// + /// - returns: A property that sends unique values during its lifetime. + public func uniqueValues() -> Property { + return lift { $0.uniqueValues() } + } +} + +extension PropertyProtocol { + /// Combines the values of all the given properties, in the manner described + /// by `combineLatest(with:)`. + public static func combineLatest(_ a: A, _ b: B) -> Property<(A.Value, B.Value)> where Value == A.Value { + return a.lift { SignalProducer.combineLatest($0, b.producer) } + } + + /// Combines the values of all the given properties, in the manner described + /// by `combineLatest(with:)`. + public static func combineLatest(_ a: A, _ b: B, _ c: C) -> Property<(A.Value, B.Value, C.Value)> where Value == A.Value { + return a.lift { SignalProducer.combineLatest($0, b.producer, c.producer) } + } + + /// Combines the values of all the given properties, in the manner described + /// by `combineLatest(with:)`. + public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D) -> Property<(A.Value, B.Value, C.Value, D.Value)> where Value == A.Value { + return a.lift { SignalProducer.combineLatest($0, b.producer, c.producer, d.producer) } + } + + /// Combines the values of all the given properties, in the manner described + /// by `combineLatest(with:)`. + public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value)> where Value == A.Value { + return a.lift { SignalProducer.combineLatest($0, b.producer, c.producer, d.producer, e.producer) } + } + + /// Combines the values of all the given properties, in the manner described + /// by `combineLatest(with:)`. + public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value)> where Value == A.Value { + return a.lift { SignalProducer.combineLatest($0, b.producer, c.producer, d.producer, e.producer, f.producer) } + } + + /// Combines the values of all the given properties, in the manner described + /// by `combineLatest(with:)`. + public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value)> where Value == A.Value { + return a.lift { SignalProducer.combineLatest($0, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer) } + } + + /// Combines the values of all the given properties, in the manner described + /// by `combineLatest(with:)`. + public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value)> where Value == A.Value { + return a.lift { SignalProducer.combineLatest($0, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer) } + } + + /// Combines the values of all the given properties, in the manner described + /// by `combineLatest(with:)`. + public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value, I.Value)> where Value == A.Value { + return a.lift { SignalProducer.combineLatest($0, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer, i.producer) } + } + + /// Combines the values of all the given properties, in the manner described + /// by `combineLatest(with:)`. + public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I, _ j: J) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value, I.Value, J.Value)> where Value == A.Value { + return a.lift { SignalProducer.combineLatest($0, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer, i.producer, j.producer) } + } + + /// Combines the values of all the given producers, in the manner described by + /// `combineLatest(with:)`. Returns nil if the sequence is empty. + public static func combineLatest(_ properties: S) -> Property<[S.Iterator.Element.Value]>? where S.Iterator.Element: PropertyProtocol { + let producers = properties.map { $0.producer } + guard !producers.isEmpty else { + return nil + } + + return Property(unsafeProducer: SignalProducer.combineLatest(producers)) + } + + /// Zips the values of all the given properties, in the manner described by + /// `zip(with:)`. + public static func zip(_ a: A, _ b: B) -> Property<(A.Value, B.Value)> where Value == A.Value { + return a.lift { SignalProducer.zip($0, b.producer) } + } + + /// Zips the values of all the given properties, in the manner described by + /// `zip(with:)`. + public static func zip(_ a: A, _ b: B, _ c: C) -> Property<(A.Value, B.Value, C.Value)> where Value == A.Value { + return a.lift { SignalProducer.zip($0, b.producer, c.producer) } + } + + /// Zips the values of all the given properties, in the manner described by + /// `zip(with:)`. + public static func zip(_ a: A, _ b: B, _ c: C, _ d: D) -> Property<(A.Value, B.Value, C.Value, D.Value)> where Value == A.Value { + return a.lift { SignalProducer.zip($0, b.producer, c.producer, d.producer) } + } + + /// Zips the values of all the given properties, in the manner described by + /// `zip(with:)`. + public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value)> where Value == A.Value { + return a.lift { SignalProducer.zip($0, b.producer, c.producer, d.producer, e.producer) } + } + + /// Zips the values of all the given properties, in the manner described by + /// `zip(with:)`. + public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value)> where Value == A.Value { + return a.lift { SignalProducer.zip($0, b.producer, c.producer, d.producer, e.producer, f.producer) } + } + + /// Zips the values of all the given properties, in the manner described by + /// `zip(with:)`. + public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value)> where Value == A.Value { + return a.lift { SignalProducer.zip($0, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer) } + } + + /// Zips the values of all the given properties, in the manner described by + /// `zip(with:)`. + public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value)> where Value == A.Value { + return a.lift { SignalProducer.zip($0, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer) } + } + + /// Zips the values of all the given properties, in the manner described by + /// `zip(with:)`. + public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value, I.Value)> where Value == A.Value { + return a.lift { SignalProducer.zip($0, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer, i.producer) } + } + + /// Zips the values of all the given properties, in the manner described by + /// `zip(with:)`. + public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I, _ j: J) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value, I.Value, J.Value)> where Value == A.Value { + return a.lift { SignalProducer.zip($0, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer, i.producer, j.producer) } + } + + /// Zips the values of all the given properties, in the manner described by + /// `zip(with:)`. Returns nil if the sequence is empty. + public static func zip(_ properties: S) -> Property<[S.Iterator.Element.Value]>? where S.Iterator.Element: PropertyProtocol { + let producers = properties.map { $0.producer } + guard !producers.isEmpty else { + return nil + } + + return Property(unsafeProducer: SignalProducer.zip(producers)) + } +} + +extension PropertyProtocol where Value == Bool { + /// Create a property that computes a logical NOT in the latest values of `self`. + /// + /// - returns: A property that contains the logial NOT results. + public func negate() -> Property { + return self.lift { $0.negate() } + } + + /// Create a property that computes a logical AND between the latest values of `self` + /// and `property`. + /// + /// - parameters: + /// - property: Property to be combined with `self`. + /// + /// - returns: A property that contains the logial AND results. + public func and(_ property: P) -> Property where P.Value == Value { + return self.lift(SignalProducer.and)(property) + } + + /// Create a property that computes a logical OR between the latest values of `self` + /// and `property`. + /// + /// - parameters: + /// - property: Property to be combined with `self`. + /// + /// - returns: A property that contains the logial OR results. + public func or(_ property: P) -> Property where P.Value == Value { + return self.lift(SignalProducer.or)(property) + } +} + +/// A read-only property that can be observed for its changes over time. There +/// are three categories of read-only properties: +/// +/// # Constant property +/// Created by `Property(value:)`, the producer and signal of a constant +/// property would complete immediately when it is initialized. +/// +/// # Existential property +/// Created by `Property(capturing:)`, it wraps any arbitrary `PropertyProtocol` +/// types, and passes through the behavior. Note that it would retain the +/// wrapped property. +/// +/// Existential property would be deprecated when generalized existential +/// eventually lands in Swift. +/// +/// # Composed property +/// A composed property presents a composed view of its sources, which can be +/// one or more properties, a producer, or a signal. It can be created using +/// property composition operators, `Property(_:)` or `Property(initial:then:)`. +/// +/// It does not own its lifetime, and its producer and signal are bound to the +/// lifetime of its sources. It also does not have an influence on its sources, +/// so retaining a composed property would not prevent its sources from +/// deinitializing. +/// +/// Note that composed properties do not retain any of its sources. +public final class Property: PropertyProtocol { + private let _value: () -> Value + + /// The current value of the property. + public var value: Value { + return _value() + } + + /// A producer for Signals that will send the property's current + /// value, followed by all changes over time, then complete when the + /// property has deinitialized or has no further changes. + /// + /// - note: If `self` is a composed property, the producer would be + /// bound to the lifetime of its sources. + public let producer: SignalProducer + + /// A signal that will send the property's changes over time, then + /// complete when the property has deinitialized or has no further changes. + /// + /// - note: If `self` is a composed property, the signal would be + /// bound to the lifetime of its sources. + public let signal: Signal + + /// Initializes a constant property. + /// + /// - parameters: + /// - property: A value of the constant property. + public init(value: Value) { + _value = { value } + producer = SignalProducer(value: value) + signal = Signal.empty + } + + /// Initializes an existential property which wraps the given property. + /// + /// - note: The resulting property retains the given property. + /// + /// - parameters: + /// - property: A property to be wrapped. + public init(capturing property: P) where P.Value == Value { + _value = { property.value } + producer = property.producer + signal = property.signal + } + + /// Initializes a composed property which reflects the given property. + /// + /// - note: The resulting property does not retain the given property. + /// + /// - parameters: + /// - property: A property to be wrapped. + public convenience init(_ property: P) where P.Value == Value { + self.init(unsafeProducer: property.producer) + } + + /// Initializes a composed property that first takes on `initial`, then each + /// value sent on a signal created by `producer`. + /// + /// - parameters: + /// - initial: Starting value for the property. + /// - values: A producer that will start immediately and send values to + /// the property. + public convenience init(initial: Value, then values: SignalProducer) { + self.init(unsafeProducer: SignalProducer { observer, lifetime in + observer.send(value: initial) + let disposable = values.start(Signal.Observer(mappingInterruptedToCompleted: observer)) + lifetime.observeEnded(disposable.dispose) + }) + } + + /// Initialize a composed property that first takes on `initial`, then each + /// value sent on `signal`. + /// + /// - parameters: + /// - initialValue: Starting value for the property. + /// - values: A signal that will send values to the property. + public convenience init(initial: Value, then values: Signal) { + self.init(initial: initial, then: SignalProducer(values)) + } + + /// Initialize a composed property from a producer that promises to send + /// at least one value synchronously in its start handler before sending any + /// subsequent event. + /// + /// - important: The producer and the signal of the created property would + /// complete only when the `unsafeProducer` completes. + /// + /// - warning: If the producer fails its promise, a fatal error would be + /// raised. + /// + /// - warning: `unsafeProducer` should not emit any `interrupted` event unless it is + /// a result of being interrupted by the downstream. + /// + /// - parameters: + /// - unsafeProducer: The composed producer for creating the property. + fileprivate init( + unsafeProducer: SignalProducer, + transform: ((Signal.Observer) -> Signal.Observer)? = nil + ) { + // The ownership graph: + // + // ------------ weak ----------- strong ------------------ + // | Upstream | ~~~~~~~~> | Box | <======== | SignalProducer | <=== strong + // ------------ ----------- // ------------------ \\ + // \\ // \\ + // \\ ------------ weak ----------- <== ------------ + // ==> | Observer | ~~~~> | Relay | <=========================== | Property | + // strong ------------ ----------- strong ------------ + + let box = PropertyBox(nil) + var relay: Signal! + + unsafeProducer.startWithSignal { upstream, interruptHandle in + // A composed property tracks its active consumers through its relay signal, and + // interrupts `unsafeProducer` if the relay signal terminates. + let (signal, _observer) = Signal.pipe(disposable: interruptHandle) + let observer = transform?(_observer) ?? _observer + relay = signal + + // `observer` receives `interrupted` only as a result of the termination of + // `signal`, and would not be delivered anyway. So transforming + // `interrupted` to `completed` is unnecessary here. + upstream.observe { [weak box] event in + guard let box = box else { + // Just forward the event, since no one owns the box or IOW no demand + // for a cached latest value. + return observer.action(event) + } + + box.begin { storage in + storage.modify { value in + if let newValue = event.value { + value = newValue + } + } + observer.action(event) + } + } + } + + // Verify that an initial is sent. This is friendlier than deadlocking + // in the event that one isn't. + guard box.value != nil else { + fatalError("The producer promised to send at least one value. Received none.") + } + + _value = { box.value! } + signal = relay + + producer = SignalProducer { [box, signal = relay!] observer, lifetime in + box.withValue { value in + observer.send(value: value!) + lifetime += signal.observe(Signal.Observer(mappingInterruptedToCompleted: observer)) + } + } + } +} + +extension Property where Value: OptionalProtocol { + /// Initializes a composed property that first takes on `initial`, then each + /// value sent on a signal created by `producer`. + /// + /// - parameters: + /// - initial: Starting value for the property. + /// - values: A producer that will start immediately and send values to + /// the property. + public convenience init(initial: Value, then values: SignalProducer) { + self.init(initial: initial, then: values.map(Value.init(reconstructing:))) + } + + /// Initialize a composed property that first takes on `initial`, then each + /// value sent on `signal`. + /// + /// - parameters: + /// - initialValue: Starting value for the property. + /// - values: A signal that will send values to the property. + public convenience init(initial: Value, then values: Signal) { + self.init(initial: initial, then: SignalProducer(values)) + } +} + +/// A mutable property of type `Value` that allows observation of its changes. +/// +/// Instances of this class are thread-safe. +public final class MutableProperty: ComposableMutablePropertyProtocol { + private let token: Lifetime.Token + private let observer: Signal.Observer + private let box: PropertyBox + + /// The current value of the property. + /// + /// Setting this to a new value will notify all observers of `signal`, or + /// signals created using `producer`. + public var value: Value { + get { return box.value } + set { modify { $0 = newValue } } + } + + /// The lifetime of the property. + public let lifetime: Lifetime + + /// A signal that will send the property's changes over time, + /// then complete when the property has deinitialized. + public let signal: Signal + + /// A producer for Signals that will send the property's current value, + /// followed by all changes over time, then complete when the property has + /// deinitialized. + public var producer: SignalProducer { + return SignalProducer { [box, signal] observer, lifetime in + box.withValue { value in + observer.send(value: value) + if let d = signal.observe(Signal.Observer(mappingInterruptedToCompleted: observer)) { + lifetime.observeEnded(d.dispose) + } + } + } + } + + /// Initializes a mutable property that first takes on `initialValue` + /// + /// - parameters: + /// - initialValue: Starting value for the mutable property. + public init(_ initialValue: Value) { + (signal, observer) = Signal.pipe() + token = Lifetime.Token() + lifetime = Lifetime(token) + + /// Need a recursive lock around `value` to allow recursive access to + /// `value`. Note that recursive sets will still deadlock because the + /// underlying producer prevents sending recursive events. + box = PropertyBox(initialValue) + } + + /// Atomically replaces the contents of the variable. + /// + /// - parameters: + /// - newValue: New property value. + /// + /// - returns: The previous property value. + @discardableResult + public func swap(_ newValue: Value) -> Value { + return modify { value in + defer { value = newValue } + return value + } + } + + /// Atomically modifies the variable. + /// + /// - parameters: + /// - action: A closure that accepts an inout reference to the value. + /// + /// - returns: The result of the action. + @discardableResult + public func modify(_ action: (inout Value) throws -> Result) rethrows -> Result { + return try box.begin { storage in + defer { observer.send(value: storage.value) } + return try storage.modify(action) + } + } + + /// Atomically modifies the variable. + /// + /// - warning: The reference should not be escaped. + /// + /// - parameters: + /// - action: A closure that accepts a reference to the property storage. + /// + /// - returns: The result of the action. + @discardableResult + internal func begin(_ action: (PropertyStorage) throws -> Result) rethrows -> Result { + return try box.begin(action) + } + + /// Atomically performs an arbitrary action using the current value of the + /// variable. + /// + /// - parameters: + /// - action: A closure that accepts current property value. + /// + /// - returns: the result of the action. + @discardableResult + public func withValue(_ action: (Value) throws -> Result) rethrows -> Result { + return try box.withValue { try action($0) } + } + + deinit { + observer.sendCompleted() + } +} + +internal struct PropertyStorage { + private unowned let box: PropertyBox + + var value: Value { + return box._value + } + + func modify(_ action: (inout Value) throws -> Result) rethrows -> Result { + guard !box.isModifying else { fatalError("Nested modifications violate exclusivity of access.") } + box.isModifying = true + defer { box.isModifying = false } + return try action(&box._value) + } + + fileprivate init(_ box: PropertyBox) { + self.box = box + } +} + +/// A reference counted box which holds a recursive lock and a value storage. +/// +/// The requirement of a `Value?` storage from composed properties prevents further +/// implementation sharing with `MutableProperty`. +private final class PropertyBox { + + private let lock: Lock.PthreadLock + fileprivate var _value: Value + fileprivate var isModifying = false + + internal var value: Value { + lock.lock() + defer { lock.unlock() } + return _value + } + + init(_ value: Value) { + _value = value + lock = Lock.PthreadLock(recursive: true) + } + + func withValue(_ action: (Value) throws -> Result) rethrows -> Result { + lock.lock() + defer { lock.unlock() } + return try action(_value) + } + + func begin(_ action: (PropertyStorage) throws -> Result) rethrows -> Result { + lock.lock() + defer { lock.unlock() } + return try action(PropertyStorage(self)) + } +} diff --git a/Sample/Pods/ReactiveSwift/Sources/Reactive.swift b/Sample/Pods/ReactiveSwift/Sources/Reactive.swift new file mode 100644 index 00000000..e48c02b4 --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/Reactive.swift @@ -0,0 +1,33 @@ +/// Describes a provider of reactive extensions. +/// +/// - note: `ReactiveExtensionsProvider` does not indicate whether a type is +/// reactive. It is intended for extensions to types that are not owned +/// by the module in order to avoid name collisions and return type +/// ambiguities. +public protocol ReactiveExtensionsProvider: class {} + +extension ReactiveExtensionsProvider { + /// A proxy which hosts reactive extensions for `self`. + public var reactive: Reactive { + return Reactive(self) + } + + /// A proxy which hosts static reactive extensions for the type of `self`. + public static var reactive: Reactive.Type { + return Reactive.self + } +} + +/// A proxy which hosts reactive extensions of `Base`. +public struct Reactive { + /// The `Base` instance the extensions would be invoked with. + public let base: Base + + /// Construct a proxy + /// + /// - parameters: + /// - base: The object to be proxied. + fileprivate init(_ base: Base) { + self.base = base + } +} diff --git a/Sample/Pods/ReactiveSwift/Sources/ResultExtensions.swift b/Sample/Pods/ReactiveSwift/Sources/ResultExtensions.swift new file mode 100644 index 00000000..c0f71433 --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/ResultExtensions.swift @@ -0,0 +1,13 @@ +import Result + +/// Private alias of the free `materialize()` from `Result`. +/// +/// This exists because within a `Signal` or `SignalProducer` operator, +/// `materialize()` refers to the operator with that name. +/// Namespacing as `Result.materialize()` doesn't work either, +/// because it tries to resolve a static member on the _type_ +/// `Result`, rather than the free function in the _module_ +/// of the same name. +internal func materialize(_ f: () throws -> T) -> Result { + return materialize(try f()) +} diff --git a/Sample/Pods/ReactiveSwift/Sources/Scheduler.swift b/Sample/Pods/ReactiveSwift/Sources/Scheduler.swift new file mode 100644 index 00000000..f8a26c5f --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/Scheduler.swift @@ -0,0 +1,563 @@ +// +// Scheduler.swift +// ReactiveSwift +// +// Created by Justin Spahr-Summers on 2014-06-02. +// Copyright (c) 2014 GitHub. All rights reserved. +// + +import Dispatch +import Foundation + +#if os(Linux) + import let CDispatch.NSEC_PER_SEC +#endif + +/// Represents a serial queue of work items. +public protocol Scheduler: class { + /// Enqueues an action on the scheduler. + /// + /// When the work is executed depends on the scheduler in use. + /// + /// - parameters: + /// - action: The action to be scheduled. + /// + /// - returns: Optional `Disposable` that can be used to cancel the work + /// before it begins. + @discardableResult + func schedule(_ action: @escaping () -> Void) -> Disposable? +} + +/// A particular kind of scheduler that supports enqueuing actions at future +/// dates. +public protocol DateScheduler: Scheduler { + /// The current date, as determined by this scheduler. + /// + /// This can be implemented to deterministically return a known date (e.g., + /// for testing purposes). + var currentDate: Date { get } + + /// Schedules an action for execution at or after the given date. + /// + /// - parameters: + /// - date: The start date. + /// - action: A closure of the action to be performed. + /// + /// - returns: Optional `Disposable` that can be used to cancel the work + /// before it begins. + @discardableResult + func schedule(after date: Date, action: @escaping () -> Void) -> Disposable? + + /// Schedules a recurring action at the given interval, beginning at the + /// given date. + /// + /// - parameters: + /// - date: The start date. + /// - interval: A repetition interval. + /// - leeway: Some delta for repetition. + /// - action: A closure of the action to be performed. + /// + /// - note: If you plan to specify an `interval` value greater than 200,000 + /// seconds, use `schedule(after:interval:leeway:action)` instead + /// and specify your own `leeway` value to avoid potential overflow. + /// + /// - returns: Optional `Disposable` that can be used to cancel the work + /// before it begins. + @discardableResult + func schedule(after date: Date, interval: DispatchTimeInterval, leeway: DispatchTimeInterval, action: @escaping () -> Void) -> Disposable? +} + +/// A scheduler that performs all work synchronously. +public final class ImmediateScheduler: Scheduler { + public init() {} + + /// Immediately calls passed in `action`. + /// + /// - parameters: + /// - action: A closure of the action to be performed. + /// + /// - returns: `nil`. + @discardableResult + public func schedule(_ action: @escaping () -> Void) -> Disposable? { + action() + return nil + } +} + +/// A scheduler that performs all work on the main queue, as soon as possible. +/// +/// If the caller is already running on the main queue when an action is +/// scheduled, it may be run synchronously. However, ordering between actions +/// will always be preserved. +public final class UIScheduler: Scheduler { + private static let dispatchSpecificKey = DispatchSpecificKey() + private static let dispatchSpecificValue = UInt8.max + private static var __once: () = { + DispatchQueue.main.setSpecific(key: UIScheduler.dispatchSpecificKey, + value: dispatchSpecificValue) + }() + + #if os(Linux) + private var queueLength: Atomic = Atomic(0) + #else + // `inout` references do not guarantee atomicity. Use `UnsafeMutablePointer` + // instead. + // + // https://lists.swift.org/pipermail/swift-users/Week-of-Mon-20161205/004147.html + private let queueLength: UnsafeMutablePointer = { + let memory = UnsafeMutablePointer.allocate(capacity: 1) + memory.initialize(to: 0) + return memory + }() + + deinit { + queueLength.deinitialize() + queueLength.deallocate(capacity: 1) + } + #endif + + /// Initializes `UIScheduler` + public init() { + /// This call is to ensure the main queue has been setup appropriately + /// for `UIScheduler`. It is only called once during the application + /// lifetime, since Swift has a `dispatch_once` like mechanism to + /// lazily initialize global variables and static variables. + _ = UIScheduler.__once + } + + /// Queues an action to be performed on main queue. If the action is called + /// on the main thread and no work is queued, no scheduling takes place and + /// the action is called instantly. + /// + /// - parameters: + /// - action: A closure of the action to be performed on the main thread. + /// + /// - returns: `Disposable` that can be used to cancel the work before it + /// begins. + @discardableResult + public func schedule(_ action: @escaping () -> Void) -> Disposable? { + let positionInQueue = enqueue() + + // If we're already running on the main queue, and there isn't work + // already enqueued, we can skip scheduling and just execute directly. + if positionInQueue == 1 && DispatchQueue.getSpecific(key: UIScheduler.dispatchSpecificKey) == UIScheduler.dispatchSpecificValue { + action() + dequeue() + return nil + } else { + let disposable = AnyDisposable() + + DispatchQueue.main.async { + defer { self.dequeue() } + guard !disposable.isDisposed else { return } + action() + } + + return disposable + } + } + + private func dequeue() { + #if os(Linux) + queueLength.modify { $0 -= 1 } + #else + OSAtomicDecrement32(queueLength) + #endif + } + + private func enqueue() -> Int32 { + #if os(Linux) + return queueLength.modify { value -> Int32 in + value += 1 + return value + } + #else + return OSAtomicIncrement32(queueLength) + #endif + } +} + +/// A scheduler backed by a serial GCD queue. +public final class QueueScheduler: DateScheduler { + /// A singleton `QueueScheduler` that always targets the main thread's GCD + /// queue. + /// + /// - note: Unlike `UIScheduler`, this scheduler supports scheduling for a + /// future date, and will always schedule asynchronously (even if + /// already running on the main thread). + public static let main = QueueScheduler(internalQueue: DispatchQueue.main) + + public var currentDate: Date { + return Date() + } + + public let queue: DispatchQueue + + internal init(internalQueue: DispatchQueue) { + queue = internalQueue + } + + /// Initializes a scheduler that will target the given queue with its + /// work. + /// + /// - note: Even if the queue is concurrent, all work items enqueued with + /// the `QueueScheduler` will be serial with respect to each other. + /// + /// - warning: Obsoleted in OS X 10.11 + @available(OSX, deprecated:10.10, obsoleted:10.11, message:"Use init(qos:name:targeting:) instead") + @available(iOS, deprecated:8.0, obsoleted:9.0, message:"Use init(qos:name:targeting:) instead.") + public convenience init(queue: DispatchQueue, name: String = "org.reactivecocoa.ReactiveSwift.QueueScheduler") { + self.init(internalQueue: DispatchQueue(label: name, target: queue)) + } + + /// Initializes a scheduler that creates a new serial queue with the + /// given quality of service class. + /// + /// - parameters: + /// - qos: Dispatch queue's QoS value. + /// - name: A name for the queue in the form of reverse domain. + /// - targeting: (Optional) The queue on which this scheduler's work is + /// targeted + @available(OSX 10.10, *) + public convenience init( + qos: DispatchQoS = .default, + name: String = "org.reactivecocoa.ReactiveSwift.QueueScheduler", + targeting targetQueue: DispatchQueue? = nil + ) { + self.init(internalQueue: DispatchQueue( + label: name, + qos: qos, + target: targetQueue + )) + } + + /// Schedules action for dispatch on internal queue + /// + /// - parameters: + /// - action: A closure of the action to be scheduled. + /// + /// - returns: `Disposable` that can be used to cancel the work before it + /// begins. + @discardableResult + public func schedule(_ action: @escaping () -> Void) -> Disposable? { + let d = AnyDisposable() + + queue.async { + if !d.isDisposed { + action() + } + } + + return d + } + + private func wallTime(with date: Date) -> DispatchWallTime { + let (seconds, frac) = modf(date.timeIntervalSince1970) + + let nsec: Double = frac * Double(NSEC_PER_SEC) + let walltime = timespec(tv_sec: Int(seconds), tv_nsec: Int(nsec)) + + return DispatchWallTime(timespec: walltime) + } + + /// Schedules an action for execution at or after the given date. + /// + /// - parameters: + /// - date: The start date. + /// - action: A closure of the action to be performed. + /// + /// - returns: Optional `Disposable` that can be used to cancel the work + /// before it begins. + @discardableResult + public func schedule(after date: Date, action: @escaping () -> Void) -> Disposable? { + let d = AnyDisposable() + + queue.asyncAfter(wallDeadline: wallTime(with: date)) { + if !d.isDisposed { + action() + } + } + + return d + } + + /// Schedules a recurring action at the given interval and beginning at the + /// given start date. A reasonable default timer interval leeway is + /// provided. + /// + /// - parameters: + /// - date: A date to schedule the first action for. + /// - interval: A repetition interval. + /// - action: Closure of the action to repeat. + /// + /// - note: If you plan to specify an `interval` value greater than 200,000 + /// seconds, use `schedule(after:interval:leeway:action)` instead + /// and specify your own `leeway` value to avoid potential overflow. + /// + /// - returns: Optional disposable that can be used to cancel the work + /// before it begins. + @discardableResult + public func schedule(after date: Date, interval: DispatchTimeInterval, action: @escaping () -> Void) -> Disposable? { + // Apple's "Power Efficiency Guide for Mac Apps" recommends a leeway of + // at least 10% of the timer interval. + return schedule(after: date, interval: interval, leeway: interval * 0.1, action: action) + } + + /// Schedules a recurring action at the given interval with provided leeway, + /// beginning at the given start time. + /// + /// - precondition: `interval` must be non-negative number. + /// - precondition: `leeway` must be non-negative number. + /// + /// - parameters: + /// - date: A date to schedule the first action for. + /// - interval: A repetition interval. + /// - leeway: Some delta for repetition interval. + /// - action: A closure of the action to repeat. + /// + /// - returns: Optional `Disposable` that can be used to cancel the work + /// before it begins. + @discardableResult + public func schedule(after date: Date, interval: DispatchTimeInterval, leeway: DispatchTimeInterval, action: @escaping () -> Void) -> Disposable? { + precondition(interval.timeInterval >= 0) + precondition(leeway.timeInterval >= 0) + + let timer = DispatchSource.makeTimerSource( + flags: DispatchSource.TimerFlags(rawValue: UInt(0)), + queue: queue + ) + timer.scheduleRepeating(wallDeadline: wallTime(with: date), + interval: interval, + leeway: leeway) + timer.setEventHandler(handler: action) + timer.resume() + + return AnyDisposable { + timer.cancel() + } + } +} + +/// A scheduler that implements virtualized time, for use in testing. +public final class TestScheduler: DateScheduler { + private final class ScheduledAction { + let date: Date + let action: () -> Void + + init(date: Date, action: @escaping () -> Void) { + self.date = date + self.action = action + } + + func less(_ rhs: ScheduledAction) -> Bool { + return date.compare(rhs.date) == .orderedAscending + } + } + + private let lock = NSRecursiveLock() + private var _currentDate: Date + + /// The virtual date that the scheduler is currently at. + public var currentDate: Date { + let d: Date + + lock.lock() + d = _currentDate + lock.unlock() + + return d + } + + private var scheduledActions: [ScheduledAction] = [] + + /// Initializes a TestScheduler with the given start date. + /// + /// - parameters: + /// - startDate: The start date of the scheduler. + public init(startDate: Date = Date(timeIntervalSinceReferenceDate: 0)) { + lock.name = "org.reactivecocoa.ReactiveSwift.TestScheduler" + _currentDate = startDate + } + + private func schedule(_ action: ScheduledAction) -> Disposable { + lock.lock() + scheduledActions.append(action) + scheduledActions.sort { $0.less($1) } + lock.unlock() + + return AnyDisposable { + self.lock.lock() + self.scheduledActions = self.scheduledActions.filter { $0 !== action } + self.lock.unlock() + } + } + + /// Enqueues an action on the scheduler. + /// + /// - note: The work is executed on `currentDate` as it is understood by the + /// scheduler. + /// + /// - parameters: + /// - action: An action that will be performed on scheduler's + /// `currentDate`. + /// + /// - returns: Optional `Disposable` that can be used to cancel the work + /// before it begins. + @discardableResult + public func schedule(_ action: @escaping () -> Void) -> Disposable? { + return schedule(ScheduledAction(date: currentDate, action: action)) + } + + /// Schedules an action for execution after some delay. + /// + /// - parameters: + /// - delay: A delay for execution. + /// - action: A closure of the action to perform. + /// + /// - returns: Optional disposable that can be used to cancel the work + /// before it begins. + @discardableResult + public func schedule(after delay: DispatchTimeInterval, action: @escaping () -> Void) -> Disposable? { + return schedule(after: currentDate.addingTimeInterval(delay), action: action) + } + + /// Schedules an action for execution at or after the given date. + /// + /// - parameters: + /// - date: A starting date. + /// - action: A closure of the action to perform. + /// + /// - returns: Optional disposable that can be used to cancel the work + /// before it begins. + @discardableResult + public func schedule(after date: Date, action: @escaping () -> Void) -> Disposable? { + return schedule(ScheduledAction(date: date, action: action)) + } + + /// Schedules a recurring action at the given interval, beginning at the + /// given start date. + /// + /// - precondition: `interval` must be non-negative. + /// + /// - parameters: + /// - date: A date to schedule the first action for. + /// - interval: A repetition interval. + /// - disposable: A disposable. + /// - action: A closure of the action to repeat. + /// + /// - note: If you plan to specify an `interval` value greater than 200,000 + /// seconds, use `schedule(after:interval:leeway:action)` instead + /// and specify your own `leeway` value to avoid potential overflow. + /// + /// - returns: Optional `Disposable` that can be used to cancel the work + /// before it begins. + private func schedule(after date: Date, interval: DispatchTimeInterval, disposable: SerialDisposable, action: @escaping () -> Void) { + precondition(interval.timeInterval >= 0) + + disposable.inner = schedule(after: date) { [unowned self] in + action() + self.schedule(after: date.addingTimeInterval(interval), interval: interval, disposable: disposable, action: action) + } + } + + /// Schedules a recurring action after given delay repeated at the given, + /// interval, beginning at the given interval counted from `currentDate`. + /// + /// - parameters: + /// - delay: A delay for action's dispatch. + /// - interval: A repetition interval. + /// - leeway: Some delta for repetition interval. + /// - action: A closure of the action to repeat. + /// + /// - returns: Optional `Disposable` that can be used to cancel the work + /// before it begins. + @discardableResult + public func schedule(after delay: DispatchTimeInterval, interval: DispatchTimeInterval, leeway: DispatchTimeInterval = .seconds(0), action: @escaping () -> Void) -> Disposable? { + return schedule(after: currentDate.addingTimeInterval(delay), interval: interval, leeway: leeway, action: action) + } + + /// Schedules a recurring action at the given interval with + /// provided leeway, beginning at the given start date. + /// + /// - parameters: + /// - date: A date to schedule the first action for. + /// - interval: A repetition interval. + /// - leeway: Some delta for repetition interval. + /// - action: A closure of the action to repeat. + /// + /// - returns: Optional `Disposable` that can be used to cancel the work + /// before it begins. + public func schedule(after date: Date, interval: DispatchTimeInterval, leeway: DispatchTimeInterval = .seconds(0), action: @escaping () -> Void) -> Disposable? { + let disposable = SerialDisposable() + schedule(after: date, interval: interval, disposable: disposable, action: action) + return disposable + } + + /// Advances the virtualized clock by an extremely tiny interval, dequeuing + /// and executing any actions along the way. + /// + /// This is intended to be used as a way to execute actions that have been + /// scheduled to run as soon as possible. + public func advance() { + advance(by: .nanoseconds(1)) + } + + /// Advances the virtualized clock by the given interval, dequeuing and + /// executing any actions along the way. + /// + /// - parameters: + /// - interval: Interval by which the current date will be advanced. + public func advance(by interval: DispatchTimeInterval) { + lock.lock() + advance(to: currentDate.addingTimeInterval(interval)) + lock.unlock() + } + + /// Advances the virtualized clock to the given future date, dequeuing and + /// executing any actions up until that point. + /// + /// - parameters: + /// - newDate: Future date to which the virtual clock will be advanced. + public func advance(to newDate: Date) { + lock.lock() + + assert(currentDate.compare(newDate) != .orderedDescending) + + while scheduledActions.count > 0 { + if newDate.compare(scheduledActions[0].date) == .orderedAscending { + break + } + + _currentDate = scheduledActions[0].date + + let scheduledAction = scheduledActions.remove(at: 0) + scheduledAction.action() + } + + _currentDate = newDate + + lock.unlock() + } + + /// Dequeues and executes all scheduled actions, leaving the scheduler's + /// date at `Date.distantFuture()`. + public func run() { + advance(to: Date.distantFuture) + } + + /// Rewinds the virtualized clock by the given interval. + /// This simulates that user changes device date. + /// + /// - parameters: + /// - interval: An interval by which the current date will be retreated. + public func rewind(by interval: DispatchTimeInterval) { + lock.lock() + + let newDate = currentDate.addingTimeInterval(-interval) + assert(currentDate.compare(newDate) != .orderedAscending) + _currentDate = newDate + + lock.unlock() + + } +} diff --git a/Sample/Pods/ReactiveSwift/Sources/Signal.swift b/Sample/Pods/ReactiveSwift/Sources/Signal.swift new file mode 100644 index 00000000..739bdb8e --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/Signal.swift @@ -0,0 +1,2655 @@ +import Foundation +import Result + +/// A push-driven stream that sends Events over time, parameterized by the type +/// of values being sent (`Value`) and the type of failure that can occur +/// (`Error`). If no failures should be possible, NoError can be specified for +/// `Error`. +/// +/// An observer of a Signal will see the exact same sequence of events as all +/// other observers. In other words, events will be sent to all observers at the +/// same time. +/// +/// Signals are generally used to represent event streams that are already “in +/// progress,” like notifications, user input, etc. To represent streams that +/// must first be _started_, see the SignalProducer type. +/// +/// A Signal is kept alive until either of the following happens: +/// 1. its input observer receives a terminating event; or +/// 2. it has no active observers, and is not being retained. +public final class Signal { + /// The `Signal` core which manages the event stream. + /// + /// A `Signal` is the externally retained shell of the `Signal` core. The separation + /// enables an explicit metric for the `Signal` self-disposal in case of having no + /// observer and no external retain. + /// + /// `Signal` ownership graph from the perspective of an operator. + /// Note that there is no circular strong reference in the graph. + /// ``` + /// ------------ -------------- -------- + /// | | | endObserve | | | + /// | | <~~ weak ~~~ | disposable | <== strong === | | + /// | | -------------- | | ... downstream(s) + /// | Upstream | ------------ | | + /// | Core | === strong ==> | Observer | === strong ==> | Core | + /// ------------ ===\\ ------------ -------- ===\\ + /// \\ ------------------ ^^ \\ + /// \\ | Signal (shell) | === strong ==// \\ + /// \\ ------------------ \\ + /// || strong || strong + /// vv vv + /// ------------------- ------------------- + /// | Other observers | | Other observers | + /// ------------------- ------------------- + /// ``` + private let core: Core + + private final class Core { + /// The disposable associated with the signal. + /// + /// Disposing of `disposable` is assumed to remove the generator + /// observer from its attached `Signal`, so that the generator observer + /// as the last +1 retain of the `Signal` core may deinitialize. + private let disposable: SerialDisposable + + /// The state of the signal. + private var state: State + + /// Used to ensure that all state accesses are serialized. + private let stateLock: Lock + + /// Used to ensure that events are serialized during delivery to observers. + private let sendLock: Lock + + fileprivate init(_ generator: (Observer) -> Disposable?) { + state = .alive(Bag(), hasDeinitialized: false) + + stateLock = Lock.make() + sendLock = Lock.make() + disposable = SerialDisposable() + + // The generator observer retains the `Signal` core. + disposable.inner = generator(Observer(action: self.send, interruptsOnDeinit: true)) + } + + private func send(_ event: Event) { + if event.isTerminating { + // Recursive events are disallowed for `value` events, but are permitted + // for termination events. Specifically: + // + // - `interrupted` + // It can inadvertently be sent by downstream consumers as part of the + // `SignalProducer` mechanics. + // + // - `completed` + // If a downstream consumer weakly references an object, invocation of + // such consumer may cause a race condition with its weak retain against + // the last strong release of the object. If the `Lifetime` of the + // object is being referenced by an upstream `take(during:)`, a + // signal recursion might occur. + // + // So we would treat termination events specially. If it happens to + // occur while the `sendLock` is acquired, the observer call-out and + // the disposal would be delegated to the current sender, or + // occasionally one of the senders waiting on `sendLock`. + + self.stateLock.lock() + + if case let .alive(observers, _) = state { + self.state = .terminating(observers, .init(event)) + self.stateLock.unlock() + } else { + self.stateLock.unlock() + } + + tryToCommitTermination() + } else { + self.sendLock.lock() + self.stateLock.lock() + + if case let .alive(observers, _) = self.state { + self.stateLock.unlock() + + for observer in observers { + observer.action(event) + } + } else { + self.stateLock.unlock() + } + + self.sendLock.unlock() + + // Check if the status has been bumped to `terminating` due to a + // terminal event being sent concurrently or recursively. + // + // The check is deliberately made outside of the `sendLock` so that it + // covers also any potential concurrent terminal event in one shot. + // + // Related PR: + // https://github.com/ReactiveCocoa/ReactiveSwift/pull/112 + // + // While calling `tryToCommitTermination` is sufficient, this is a fast + // path for the recurring value delivery. + // + // Note that this cannot be `try` since any concurrent observer bag + // manipulation might then cause the terminating state being missed. + stateLock.lock() + if case .terminating = state { + stateLock.unlock() + tryToCommitTermination() + } else { + stateLock.unlock() + } + } + } + + /// Observe the Signal by sending any future events to the given observer. + /// + /// - parameters: + /// - observer: An observer to forward the events to. + /// + /// - returns: A `Disposable` which can be used to disconnect the observer, + /// or `nil` if the signal has already terminated. + fileprivate func observe(_ observer: Observer) -> Disposable? { + var token: Bag.Token? + + stateLock.lock() + + if case let .alive(observers, hasDeinitialized) = state { + var newObservers = observers + token = newObservers.insert(observer) + self.state = .alive(newObservers, hasDeinitialized: hasDeinitialized) + } + + stateLock.unlock() + + if let token = token { + return AnyDisposable { [weak self] in + self?.removeObserver(with: token) + } + } else { + observer.sendInterrupted() + return nil + } + } + + /// Remove the observer associated with the given token. + /// + /// - parameters: + /// - token: The token of the observer to remove. + private func removeObserver(with token: Bag.Token) { + stateLock.lock() + + if case let .alive(observers, hasDeinitialized) = state { + var newObservers = observers + let observer = newObservers.remove(using: token) + self.state = .alive(newObservers, hasDeinitialized: hasDeinitialized) + + // Ensure `observer` is deallocated after `stateLock` is + // released to avoid deadlocks. + withExtendedLifetime(observer) { + // Start the disposal of the `Signal` core if the `Signal` has + // deinitialized and there is no active observer. + tryToDisposeSilentlyIfQualified(unlocking: stateLock) + } + } else { + stateLock.unlock() + } + } + + /// Try to commit the termination, or in other words transition the signal from a + /// terminating state to a terminated state. + /// + /// It fails gracefully if the signal is alive or has terminated. Calling this + /// method as a result of a false positive `terminating` check is permitted. + /// + /// - precondition: `stateLock` must not be acquired by the caller. + private func tryToCommitTermination() { + // Acquire `stateLock`. If the termination has still not yet been + // handled, take it over and bump the status to `terminated`. + stateLock.lock() + + if case let .terminating(observers, terminationKind) = state { + // Try to acquire the `sendLock`, and fail gracefully since the current + // lock holder would attempt to commit after it is done anyway. + if sendLock.try() { + state = .terminated + stateLock.unlock() + + if let event = terminationKind.materialize() { + for observer in observers { + observer.action(event) + } + } + + sendLock.unlock() + disposable.dispose() + return + } + } + + stateLock.unlock() + } + + /// Try to dispose of the signal silently if the `Signal` has deinitialized and + /// has no observer. + /// + /// It fails gracefully if the signal is terminating or terminated, has one or + /// more observers, or has not deinitialized. + /// + /// - precondition: `stateLock` must have been acquired by the caller. + /// + /// - parameters: + /// - stateLock: The `stateLock` acquired by the caller. + private func tryToDisposeSilentlyIfQualified(unlocking stateLock: Lock) { + assert(!stateLock.try(), "Calling `unconditionallyTerminate` without acquiring `stateLock`.") + + if case let .alive(observers, true) = state, observers.isEmpty { + // Transition to `terminated` directly only if there is no event delivery + // on going. + if sendLock.try() { + self.state = .terminated + stateLock.unlock() + sendLock.unlock() + + disposable.dispose() + return + } + + self.state = .terminating(Bag(), .silent) + stateLock.unlock() + + tryToCommitTermination() + return + } + + stateLock.unlock() + } + + /// Acknowledge the deinitialization of the `Signal`. + fileprivate func signalDidDeinitialize() { + stateLock.lock() + + // Mark the `Signal` has now deinitialized. + if case let .alive(observers, false) = state { + state = .alive(observers, hasDeinitialized: true) + } + + // Attempt to start the disposal of the signal if it has no active observer. + tryToDisposeSilentlyIfQualified(unlocking: stateLock) + } + + deinit { + disposable.dispose() + } + } + + /// Initialize a Signal that will immediately invoke the given generator, + /// then forward events sent to the given observer. + /// + /// - note: The disposable returned from the closure will be automatically + /// disposed if a terminating event is sent to the observer. The + /// Signal itself will remain alive until the observer is released. + /// + /// - parameters: + /// - generator: A closure that accepts an implicitly created observer + /// that will act as an event emitter for the signal. + public init(_ generator: (Observer) -> Disposable?) { + core = Core(generator) + } + + /// Observe the Signal by sending any future events to the given observer. + /// + /// - note: If the Signal has already terminated, the observer will + /// immediately receive an `interrupted` event. + /// + /// - parameters: + /// - observer: An observer to forward the events to. + /// + /// - returns: A `Disposable` which can be used to disconnect the observer, + /// or `nil` if the signal has already terminated. + @discardableResult + public func observe(_ observer: Observer) -> Disposable? { + return core.observe(observer) + } + + deinit { + core.signalDidDeinitialize() + } + + /// The state of a `Signal`. + /// + /// `SignalState` is guaranteed to be laid out as a tagged pointer by the Swift + /// compiler in the support targets of the Swift 3.0.1 ABI. + /// + /// The Swift compiler has also an optimization for enums with payloads that are + /// all reference counted, and at most one no-payload case. + private enum State { + // `TerminationKind` is constantly pointer-size large to keep `Signal.Core` + // allocation size independent of the actual `Value` and `Error` types. + enum TerminationKind { + case completed + case interrupted + case failed(Swift.Error) + case silent + + init(_ event: Event) { + switch event { + case .value: + fatalError() + case .interrupted: + self = .interrupted + case let .failed(error): + self = .failed(error) + case .completed: + self = .completed + } + } + + func materialize() -> Event? { + switch self { + case .completed: + return .completed + case .interrupted: + return .interrupted + case let .failed(error): + return .failed(error as! Error) + case .silent: + return nil + } + } + } + + /// The `Signal` is alive. + case alive(Bag, hasDeinitialized: Bool) + + /// The `Signal` has received a termination event, and is about to be + /// terminated. + case terminating(Bag, TerminationKind) + + /// The `Signal` has terminated. + case terminated + } +} + +extension Signal { + /// A Signal that never sends any events to its observers. + public static var never: Signal { + return self.init { observer in + // If `observer` deinitializes, the `Signal` would interrupt which is + // undesirable for `Signal.never`. + return AnyDisposable { _ = observer } + } + } + + /// A Signal that completes immediately without emitting any value. + public static var empty: Signal { + return self.init { observer in + observer.sendCompleted() + return nil + } + } + + /// Create a `Signal` that will be controlled by sending events to an + /// input observer. + /// + /// - note: The `Signal` will remain alive until a terminating event is sent + /// to the input observer, or until it has no observers and there + /// are no strong references to it. + /// + /// - parameters: + /// - disposable: An optional disposable to associate with the signal, and + /// to be disposed of when the signal terminates. + /// + /// - returns: A tuple of `output: Signal`, the output end of the pipe, + /// and `input: Observer`, the input end of the pipe. + public static func pipe(disposable: Disposable? = nil) -> (output: Signal, input: Observer) { + var observer: Observer! + let signal = self.init { innerObserver in + observer = innerObserver + return disposable + } + + return (signal, observer) + } +} + +public protocol SignalProtocol: class { + /// The type of values being sent by `self`. + associatedtype Value + + /// The type of error that can occur on `self`. + associatedtype Error: Swift.Error + + /// The materialized `self`. + var signal: Signal { get } +} + +extension Signal: SignalProtocol { + public var signal: Signal { + return self + } +} + +extension Signal: SignalProducerConvertible { + public var producer: SignalProducer { + return SignalProducer(self) + } +} + +extension Signal { + /// Observe `self` for all events being emitted. + /// + /// - note: If `self` has terminated, the closure would be invoked with an + /// `interrupted` event immediately. + /// + /// - parameters: + /// - action: A closure to be invoked with every event from `self`. + /// + /// - returns: A disposable to detach `action` from `self`. `nil` if `self` has + /// terminated. + @discardableResult + public func observe(_ action: @escaping Signal.Observer.Action) -> Disposable? { + return observe(Observer(action)) + } + + /// Observe `self` for all values being emitted, and if any, the failure. + /// + /// - parameters: + /// - action: A closure to be invoked with values from `self`, or the propagated + /// error should any `failed` event is emitted. + /// + /// - returns: A disposable to detach `action` from `self`. `nil` if `self` has + /// terminated. + @discardableResult + public func observeResult(_ action: @escaping (Result) -> Void) -> Disposable? { + return observe( + Observer( + value: { action(.success($0)) }, + failed: { action(.failure($0)) } + ) + ) + } + + /// Observe `self` for its completion. + /// + /// - parameters: + /// - action: A closure to be invoked when a `completed` event is emitted. + /// + /// - returns: A disposable to detach `action` from `self`. `nil` if `self` has + /// terminated. + @discardableResult + public func observeCompleted(_ action: @escaping () -> Void) -> Disposable? { + return observe(Observer(completed: action)) + } + + /// Observe `self` for its failure. + /// + /// - parameters: + /// - action: A closure to be invoked with the propagated error, should any + /// `failed` event is emitted. + /// + /// - returns: A disposable to detach `action` from `self`. `nil` if `self` has + /// terminated. + @discardableResult + public func observeFailed(_ action: @escaping (Error) -> Void) -> Disposable? { + return observe(Observer(failed: action)) + } + + /// Observe `self` for its interruption. + /// + /// - note: If `self` has terminated, the closure would be invoked immediately. + /// + /// - parameters: + /// - action: A closure to be invoked when an `interrupted` event is emitted. + /// + /// - returns: A disposable to detach `action` from `self`. `nil` if `self` has + /// terminated. + @discardableResult + public func observeInterrupted(_ action: @escaping () -> Void) -> Disposable? { + return observe(Observer(interrupted: action)) + } +} + +extension Signal where Error == NoError { + /// Observe `self` for all values being emitted. + /// + /// - parameters: + /// - action: A closure to be invoked with values from `self`. + /// + /// - returns: A disposable to detach `action` from `self`. `nil` if `self` has + /// terminated. + @discardableResult + public func observeValues(_ action: @escaping (Value) -> Void) -> Disposable? { + return observe(Observer(value: action)) + } +} + +extension Signal { + /// Map each value in the signal to a new value. + /// + /// - parameters: + /// - transform: A closure that accepts a value from the `value` event and + /// returns a new value. + /// + /// - returns: A signal that will send new values. + public func map(_ transform: @escaping (Value) -> U) -> Signal { + return Signal { observer in + return self.observe { event in + observer.action(event.map(transform)) + } + } + } + +#if swift(>=3.2) + /// Map each value in the signal to a new value by applying a key path. + /// + /// - parameters: + /// - keyPath: A key path relative to the signal's `Value` type. + /// + /// - returns: A signal that will send new values. + public func map(_ keyPath: KeyPath) -> Signal { + return map { $0[keyPath: keyPath] } + } +#endif + + /// Map errors in the signal to a new error. + /// + /// - parameters: + /// - transform: A closure that accepts current error object and returns + /// a new type of error object. + /// + /// - returns: A signal that will send new type of errors. + public func mapError(_ transform: @escaping (Error) -> F) -> Signal { + return Signal { observer in + return self.observe { event in + observer.action(event.mapError(transform)) + } + } + } + + /// Maps each value in the signal to a new value, lazily evaluating the + /// supplied transformation on the specified scheduler. + /// + /// - important: Unlike `map`, there is not a 1-1 mapping between incoming + /// values, and values sent on the returned signal. If + /// `scheduler` has not yet scheduled `transform` for + /// execution, then each new value will replace the last one as + /// the parameter to `transform` once it is finally executed. + /// + /// - parameters: + /// - transform: The closure used to obtain the returned value from this + /// signal's underlying value. + /// + /// - returns: A signal that sends values obtained using `transform` as this + /// signal sends values. + public func lazyMap(on scheduler: Scheduler, transform: @escaping (Value) -> U) -> Signal { + return flatMap(.latest) { value in + return SignalProducer({ transform(value) }) + .start(on: scheduler) + } + } + + /// Preserve only values which pass the given closure. + /// + /// - parameters: + /// - isIncluded: A closure to determine whether a value from `self` should be + /// included in the returned `Signal`. + /// + /// - returns: A signal that forwards the values passing the given closure. + public func filter(_ isIncluded: @escaping (Value) -> Bool) -> Signal { + return Signal { observer in + return self.observe { (event: Event) -> Void in + guard let value = event.value else { + observer.action(event) + return + } + + if isIncluded(value) { + observer.send(value: value) + } + } + } + } + + /// Applies `transform` to values from `signal` and forwards values with non `nil` results unwrapped. + /// - parameters: + /// - transform: A closure that accepts a value from the `value` event and + /// returns a new optional value. + /// + /// - returns: A signal that will send new values, that are non `nil` after the transformation. + public func filterMap(_ transform: @escaping (Value) -> U?) -> Signal { + return Signal { observer in + return self.observe { (event: Event) -> Void in + switch event { + case let .value(value): + if let mapped = transform(value) { + observer.send(value: mapped) + } + case let .failed(error): + observer.send(error: error) + case .completed: + observer.sendCompleted() + case .interrupted: + observer.sendInterrupted() + } + } + } + } +} + +extension Signal where Value: OptionalProtocol { + /// Unwrap non-`nil` values and forward them on the returned signal, `nil` + /// values are dropped. + /// + /// - returns: A signal that sends only non-nil values. + public func skipNil() -> Signal { + return filterMap { $0.optional } + } +} + +extension Signal { + /// Take up to `n` values from the signal and then complete. + /// + /// - precondition: `count` must be non-negative number. + /// + /// - parameters: + /// - count: A number of values to take from the signal. + /// + /// - returns: A signal that will yield the first `count` values from `self` + public func take(first count: Int) -> Signal { + precondition(count >= 0) + + return Signal { observer in + if count == 0 { + observer.sendCompleted() + return nil + } + + var taken = 0 + + return self.observe { event in + guard let value = event.value else { + observer.action(event) + return + } + + if taken < count { + taken += 1 + observer.send(value: value) + } + + if taken == count { + observer.sendCompleted() + } + } + } + } +} + +/// A reference type which wraps an array to auxiliate the collection of values +/// for `collect` operator. +private final class CollectState { + var values: [Value] = [] + + /// Collects a new value. + func append(_ value: Value) { + values.append(value) + } + + /// Check if there are any items remaining. + /// + /// - note: This method also checks if there weren't collected any values + /// and, in that case, it means an empty array should be sent as the + /// result of collect. + var isEmpty: Bool { + /// We use capacity being zero to determine if we haven't collected any + /// value since we're keeping the capacity of the array to avoid + /// unnecessary and expensive allocations). This also guarantees + /// retro-compatibility around the original `collect()` operator. + return values.isEmpty && values.capacity > 0 + } + + /// Removes all values previously collected if any. + func flush() { + // Minor optimization to avoid consecutive allocations. Can + // be useful for sequences of regular or similar size and to + // track if any value was ever collected. + values.removeAll(keepingCapacity: true) + } +} + +extension Signal { + /// Collect all values sent by the signal then forward them as a single + /// array and complete. + /// + /// - note: When `self` completes without collecting any value, it will send + /// an empty array of values. + /// + /// - returns: A signal that will yield an array of values when `self` + /// completes. + public func collect() -> Signal<[Value], Error> { + return collect { _,_ in false } + } + + /// Collect at most `count` values from `self`, forward them as a single + /// array and complete. + /// + /// - note: When the count is reached the array is sent and the signal + /// starts over yielding a new array of values. + /// + /// - note: When `self` completes any remaining values will be sent, the + /// last array may not have `count` values. Alternatively, if were + /// not collected any values will sent an empty array of values. + /// + /// - precondition: `count` should be greater than zero. + /// + public func collect(count: Int) -> Signal<[Value], Error> { + precondition(count > 0) + return collect { values in values.count == count } + } + + /// Collect values from `self`, and emit them if the predicate passes. + /// + /// When `self` completes any remaining values will be sent, regardless of the + /// collected values matching `shouldEmit` or not. + /// + /// If `self` completes without having emitted any value, an empty array would be + /// emitted, followed by the completion of the returned `Signal`. + /// + /// ```` + /// let (signal, observer) = Signal.pipe() + /// + /// signal + /// .collect { values in values.reduce(0, combine: +) == 8 } + /// .observeValues { print($0) } + /// + /// observer.send(value: 1) + /// observer.send(value: 3) + /// observer.send(value: 4) + /// observer.send(value: 7) + /// observer.send(value: 1) + /// observer.send(value: 5) + /// observer.send(value: 6) + /// observer.sendCompleted() + /// + /// // Output: + /// // [1, 3, 4] + /// // [7, 1] + /// // [5, 6] + /// ```` + /// + /// - parameters: + /// - shouldEmit: A closure to determine, when every time a new value is received, + /// whether the collected values should be emitted. The new value + /// is included in the collected values. + /// + /// - returns: A signal of arrays of values, as instructed by the `shouldEmit` + /// closure. + public func collect(_ shouldEmit: @escaping (_ collectedValues: [Value]) -> Bool) -> Signal<[Value], Error> { + return Signal<[Value], Error> { observer in + let state = CollectState() + + return self.observe { event in + switch event { + case let .value(value): + state.append(value) + if shouldEmit(state.values) { + observer.send(value: state.values) + state.flush() + } + case .completed: + if !state.isEmpty { + observer.send(value: state.values) + } + observer.sendCompleted() + case let .failed(error): + observer.send(error: error) + case .interrupted: + observer.sendInterrupted() + } + } + } + } + + /// Collect values from `self`, and emit them if the predicate passes. + /// + /// When `self` completes any remaining values will be sent, regardless of the + /// collected values matching `shouldEmit` or not. + /// + /// If `self` completes without having emitted any value, an empty array would be + /// emitted, followed by the completion of the returned `Signal`. + /// + /// ```` + /// let (signal, observer) = Signal.pipe() + /// + /// signal + /// .collect { values, value in value == 7 } + /// .observeValues { print($0) } + /// + /// observer.send(value: 1) + /// observer.send(value: 1) + /// observer.send(value: 7) + /// observer.send(value: 7) + /// observer.send(value: 5) + /// observer.send(value: 6) + /// observer.sendCompleted() + /// + /// // Output: + /// // [1, 1] + /// // [7] + /// // [7, 5, 6] + /// ```` + /// + /// - parameters: + /// - shouldEmit: A closure to determine, when every time a new value is received, + /// whether the collected values should be emitted. The new value + /// is **not** included in the collected values, and is included when + /// the next value is received. + /// + /// - returns: A signal of arrays of values, as instructed by the `shouldEmit` + /// closure. + public func collect(_ shouldEmit: @escaping (_ collected: [Value], _ latest: Value) -> Bool) -> Signal<[Value], Error> { + return Signal<[Value], Error> { observer in + let state = CollectState() + + return self.observe { event in + switch event { + case let .value(value): + if shouldEmit(state.values, value) { + observer.send(value: state.values) + state.flush() + } + state.append(value) + case .completed: + if !state.isEmpty { + observer.send(value: state.values) + } + observer.sendCompleted() + case let .failed(error): + observer.send(error: error) + case .interrupted: + observer.sendInterrupted() + } + } + } + } + + /// Forward all events onto the given scheduler, instead of whichever + /// scheduler they originally arrived upon. + /// + /// - parameters: + /// - scheduler: A scheduler to deliver events on. + /// + /// - returns: A signal that will yield `self` values on provided scheduler. + public func observe(on scheduler: Scheduler) -> Signal { + return Signal { observer in + return self.observe { event in + scheduler.schedule { + observer.action(event) + } + } + } + } +} + +extension Signal { + /// Combine the latest value of the receiver with the latest value from the + /// given signal. + /// + /// - note: The returned signal will not send a value until both inputs have + /// sent at least one value each. + /// + /// - note: If either signal is interrupted, the returned signal will also + /// be interrupted. + /// + /// - note: The returned signal will not complete until both inputs + /// complete. + /// + /// - parameters: + /// - otherSignal: A signal to combine `self`'s value with. + /// + /// - returns: A signal that will yield a tuple containing values of `self` + /// and given signal. + public func combineLatest(with other: Signal) -> Signal<(Value, U), Error> { + return Signal.combineLatest(self, other) + } + + /// Delay `value` and `completed` events by the given interval, forwarding + /// them on the given scheduler. + /// + /// - note: failed and `interrupted` events are always scheduled + /// immediately. + /// + /// - precondition: `interval` must be non-negative number. + /// + /// - parameters: + /// - interval: Interval to delay `value` and `completed` events by. + /// - scheduler: A scheduler to deliver delayed events on. + /// + /// - returns: A signal that will delay `value` and `completed` events and + /// will yield them on given scheduler. + public func delay(_ interval: TimeInterval, on scheduler: DateScheduler) -> Signal { + precondition(interval >= 0) + + return Signal { observer in + return self.observe { event in + switch event { + case .failed, .interrupted: + scheduler.schedule { + observer.action(event) + } + + case .value, .completed: + let date = scheduler.currentDate.addingTimeInterval(interval) + scheduler.schedule(after: date) { + observer.action(event) + } + } + } + } + } + + /// Skip first `count` number of values then act as usual. + /// + /// - precondition: `count` must be non-negative number. + /// + /// - parameters: + /// - count: A number of values to skip. + /// + /// - returns: A signal that will skip the first `count` values, then + /// forward everything afterward. + public func skip(first count: Int) -> Signal { + precondition(count >= 0) + + if count == 0 { + return self + } + + return Signal { observer in + var skipped = 0 + + return self.observe { event in + if case .value = event, skipped < count { + skipped += 1 + } else { + observer.action(event) + } + } + } + } + + /// Treat all Events from `self` as plain values, allowing them to be + /// manipulated just like any other value. + /// + /// In other words, this brings Events “into the monad”. + /// + /// - note: When a Completed or Failed event is received, the resulting + /// signal will send the Event itself and then complete. When an + /// Interrupted event is received, the resulting signal will send + /// the Event itself and then interrupt. + /// + /// - returns: A signal that sends events as its values. + public func materialize() -> Signal { + return Signal { observer in + return self.observe { event in + observer.send(value: event) + + switch event { + case .interrupted: + observer.sendInterrupted() + + case .completed, .failed: + observer.sendCompleted() + + case .value: + break + } + } + } + } +} + +extension Signal where Value: EventProtocol, Error == NoError { + /// Translate a signal of `Event` _values_ into a signal of those events + /// themselves. + /// + /// - returns: A signal that sends values carried by `self` events. + public func dematerialize() -> Signal { + return Signal { observer in + return self.observe { event in + switch event { + case let .value(innerEvent): + observer.action(innerEvent.event) + + case .failed: + fatalError("NoError is impossible to construct") + + case .completed: + observer.sendCompleted() + + case .interrupted: + observer.sendInterrupted() + } + } + } + } +} + +extension Signal { + /// Inject side effects to be performed upon the specified signal events. + /// + /// - parameters: + /// - event: A closure that accepts an event and is invoked on every + /// received event. + /// - failed: A closure that accepts error object and is invoked for + /// failed event. + /// - completed: A closure that is invoked for `completed` event. + /// - interrupted: A closure that is invoked for `interrupted` event. + /// - terminated: A closure that is invoked for any terminating event. + /// - disposed: A closure added as disposable when signal completes. + /// - value: A closure that accepts a value from `value` event. + /// + /// - returns: A signal with attached side-effects for given event cases. + public func on( + event: ((Event) -> Void)? = nil, + failed: ((Error) -> Void)? = nil, + completed: (() -> Void)? = nil, + interrupted: (() -> Void)? = nil, + terminated: (() -> Void)? = nil, + disposed: (() -> Void)? = nil, + value: ((Value) -> Void)? = nil + ) -> Signal { + return Signal { observer in + let disposable = CompositeDisposable() + + if let action = disposed { + disposable.add(action) + } + + disposable += self.observe { receivedEvent in + event?(receivedEvent) + + switch receivedEvent { + case let .value(v): + value?(v) + + case let .failed(error): + failed?(error) + + case .completed: + completed?() + + case .interrupted: + interrupted?() + } + + if receivedEvent.isTerminating { + terminated?() + } + + observer.action(receivedEvent) + } + + return disposable + } + } +} + +private struct SampleState { + var latestValue: Value? = nil + var isSignalCompleted: Bool = false + var isSamplerCompleted: Bool = false +} + +extension Signal { + /// Forward the latest value from `self` with the value from `sampler` as a + /// tuple, only when`sampler` sends a `value` event. + /// + /// - note: If `sampler` fires before a value has been observed on `self`, + /// nothing happens. + /// + /// - parameters: + /// - sampler: A signal that will trigger the delivery of `value` event + /// from `self`. + /// + /// - returns: A signal that will send values from `self` and `sampler`, + /// sampled (possibly multiple times) by `sampler`, then complete + /// once both input signals have completed, or interrupt if + /// either input signal is interrupted. + public func sample(with sampler: Signal) -> Signal<(Value, T), Error> { + return Signal<(Value, T), Error> { observer in + let state = Atomic(SampleState()) + let disposable = CompositeDisposable() + + disposable += self.observe { event in + switch event { + case let .value(value): + state.modify { + $0.latestValue = value + } + + case let .failed(error): + observer.send(error: error) + + case .completed: + let shouldComplete: Bool = state.modify { + $0.isSignalCompleted = true + return $0.isSamplerCompleted + } + + if shouldComplete { + observer.sendCompleted() + } + + case .interrupted: + observer.sendInterrupted() + } + } + + disposable += sampler.observe { event in + switch event { + case .value(let samplerValue): + if let value = state.value.latestValue { + observer.send(value: (value, samplerValue)) + } + + case .completed: + let shouldComplete: Bool = state.modify { + $0.isSamplerCompleted = true + return $0.isSignalCompleted + } + + if shouldComplete { + observer.sendCompleted() + } + + case .interrupted: + observer.sendInterrupted() + + case .failed: + break + } + } + + return disposable + } + } + + /// Forward the latest value from `self` whenever `sampler` sends a `value` + /// event. + /// + /// - note: If `sampler` fires before a value has been observed on `self`, + /// nothing happens. + /// + /// - parameters: + /// - sampler: A signal that will trigger the delivery of `value` event + /// from `self`. + /// + /// - returns: A signal that will send values from `self`, sampled (possibly + /// multiple times) by `sampler`, then complete once both input + /// signals have completed, or interrupt if either input signal + /// is interrupted. + public func sample(on sampler: Signal<(), NoError>) -> Signal { + return sample(with: sampler) + .map { $0.0 } + } + + /// Forward the latest value from `samplee` with the value from `self` as a + /// tuple, only when `self` sends a `value` event. + /// This is like a flipped version of `sample(with:)`, but `samplee`'s + /// terminal events are completely ignored. + /// + /// - note: If `self` fires before a value has been observed on `samplee`, + /// nothing happens. + /// + /// - parameters: + /// - samplee: A signal whose latest value is sampled by `self`. + /// + /// - returns: A signal that will send values from `self` and `samplee`, + /// sampled (possibly multiple times) by `self`, then terminate + /// once `self` has terminated. **`samplee`'s terminated events + /// are ignored**. + public func withLatest(from samplee: Signal) -> Signal<(Value, U), Error> { + return Signal<(Value, U), Error> { observer in + let state = Atomic(nil) + let disposable = CompositeDisposable() + + disposable += samplee.observeValues { value in + state.value = value + } + + disposable += self.observe { event in + switch event { + case let .value(value): + if let value2 = state.value { + observer.send(value: (value, value2)) + } + case .completed: + observer.sendCompleted() + case let .failed(error): + observer.send(error: error) + case .interrupted: + observer.sendInterrupted() + } + } + + return disposable + } + } + + /// Forward the latest value from `samplee` with the value from `self` as a + /// tuple, only when `self` sends a `value` event. + /// This is like a flipped version of `sample(with:)`, but `samplee`'s + /// terminal events are completely ignored. + /// + /// - note: If `self` fires before a value has been observed on `samplee`, + /// nothing happens. + /// + /// - parameters: + /// - samplee: A producer whose latest value is sampled by `self`. + /// + /// - returns: A signal that will send values from `self` and `samplee`, + /// sampled (possibly multiple times) by `self`, then terminate + /// once `self` has terminated. **`samplee`'s terminated events + /// are ignored**. + public func withLatest(from samplee: SignalProducer) -> Signal<(Value, U), Error> { + return Signal<(Value, U), Error> { observer in + let d = CompositeDisposable() + samplee.startWithSignal { signal, disposable in + d += disposable + d += self.withLatest(from: signal).observe(observer) + } + return d + } + } +} + +extension Signal { + /// Forwards events from `self` until `lifetime` ends, at which point the + /// returned signal will complete. + /// + /// - parameters: + /// - lifetime: A lifetime whose `ended` signal will cause the returned + /// signal to complete. + /// + /// - returns: A signal that will deliver events until `lifetime` ends. + public func take(during lifetime: Lifetime) -> Signal { + return Signal { observer in + let disposable = CompositeDisposable() + disposable += self.observe(observer) + disposable += lifetime.observeEnded(observer.sendCompleted) + return disposable + } + } + + /// Forward events from `self` until `trigger` sends a `value` or + /// `completed` event, at which point the returned signal will complete. + /// + /// - parameters: + /// - trigger: A signal whose `value` or `completed` events will stop the + /// delivery of `value` events from `self`. + /// + /// - returns: A signal that will deliver events until `trigger` sends + /// `value` or `completed` events. + public func take(until trigger: Signal<(), NoError>) -> Signal { + return Signal { observer in + let disposable = CompositeDisposable() + disposable += self.observe(observer) + + disposable += trigger.observe { event in + switch event { + case .value, .completed: + observer.sendCompleted() + + case .failed, .interrupted: + break + } + } + + return disposable + } + } + + /// Do not forward any values from `self` until `trigger` sends a `value` or + /// `completed` event, at which point the returned signal behaves exactly + /// like `signal`. + /// + /// - parameters: + /// - trigger: A signal whose `value` or `completed` events will start the + /// deliver of events on `self`. + /// + /// - returns: A signal that will deliver events once the `trigger` sends + /// `value` or `completed` events. + public func skip(until trigger: Signal<(), NoError>) -> Signal { + return Signal { observer in + let disposable = SerialDisposable() + + disposable.inner = trigger.observe { event in + switch event { + case .value, .completed: + disposable.inner = self.observe(observer) + + case .failed, .interrupted: + break + } + } + + return disposable + } + } + + /// Forward events from `self` with history: values of the returned signal + /// are a tuples whose first member is the previous value and whose second member + /// is the current value. `initial` is supplied as the first member when `self` + /// sends its first value. + /// + /// - parameters: + /// - initial: A value that will be combined with the first value sent by + /// `self`. + /// + /// - returns: A signal that sends tuples that contain previous and current + /// sent values of `self`. + public func combinePrevious(_ initial: Value) -> Signal<(Value, Value), Error> { + return combinePrevious(initial: initial) + } + + /// Forward events from `self` with history: values of the returned signal + /// are a tuples whose first member is the previous value and whose second member + /// is the current value. + /// + /// The returned `Signal` would not emit any tuple until it has received at least two + /// values. + /// + /// - returns: A signal that sends tuples that contain previous and current + /// sent values of `self`. + public func combinePrevious() -> Signal<(Value, Value), Error> { + return combinePrevious(initial: nil) + } + + /// Implementation detail of `combinePrevious`. A default argument of a `nil` initial + /// is deliberately avoided, since in the case of `Value` being an optional, the + /// `nil` literal would be materialized as `Optional.none` instead of `Value`, + /// thus changing the semantic. + private func combinePrevious(initial: Value?) -> Signal<(Value, Value), Error> { + return Signal<(Value, Value), Error> { observer in + var previous = initial + + return self.observe { event in + switch event { + case let .value(value): + if let previous = previous { + observer.send(value: (previous, value)) + } + previous = value + case .completed: + observer.sendCompleted() + case let .failed(error): + observer.send(error: error) + case .interrupted: + observer.sendInterrupted() + } + } + } + } + + /// Combine all values from `self`, and forward only the final accumuated result. + /// + /// See `scan(_:_:)` if the resulting producer needs to forward also the partial + /// results. + /// + /// - parameters: + /// - initialResult: The value to use as the initial accumulating value. + /// - nextPartialResult: A closure that combines the accumulating value and the + /// latest value from `self`. The result would be used in the + /// next call of `nextPartialResult`, or emit to the returned + /// `Signal` when `self` completes. + /// + /// - returns: A signal that sends the final result as `self` completes. + public func reduce(_ initialResult: U, _ nextPartialResult: @escaping (U, Value) -> U) -> Signal { + return self.reduce(into: initialResult) { accumulator, value in + accumulator = nextPartialResult(accumulator, value) + } + } + + /// Combine all values from `self`, and forward only the final accumuated result. + /// + /// See `scan(into:_:)` if the resulting producer needs to forward also the partial + /// results. + /// + /// - parameters: + /// - initialResult: The value to use as the initial accumulating value. + /// - nextPartialResult: A closure that combines the accumulating value and the + /// latest value from `self`. The result would be used in the + /// next call of `nextPartialResult`, or emit to the returned + /// `Signal` when `self` completes. + /// + /// - returns: A signal that sends the final result as `self` completes. + public func reduce(into initialResult: U, _ nextPartialResult: @escaping (inout U, Value) -> Void) -> Signal { + // We need to handle the special case in which `signal` sends no values. + // We'll do that by sending `initial` on the output signal (before + // taking the last value). + let (scannedSignalWithInitialValue, outputSignalObserver) = Signal.pipe() + let outputSignal = scannedSignalWithInitialValue.take(last: 1) + + // Now that we've got takeLast() listening to the piped signal, send + + // that initial value. + outputSignalObserver.send(value: initialResult) + + // Pipe the scanned input signal into the output signal. + self.scan(into: initialResult, nextPartialResult) + .observe(outputSignalObserver) + + return outputSignal + } + + /// Combine all values from `self`, and forward the partial results and the final + /// result. + /// + /// See `reduce(_:_:)` if the resulting producer needs to forward only the final + /// result. + /// + /// - parameters: + /// - initialResult: The value to use as the initial accumulating value. + /// - nextPartialResult: A closure that combines the accumulating value and the + /// latest value from `self`. The result would be forwarded, + /// and would be used in the next call of `nextPartialResult`. + /// + /// - returns: A signal that sends the partial results of the accumuation, and the + /// final result as `self` completes. + public func scan(_ initialResult: U, _ nextPartialResult: @escaping (U, Value) -> U) -> Signal { + return self.scan(into: initialResult) { accumulator, value in + accumulator = nextPartialResult(accumulator, value) + } + } + + /// Combine all values from `self`, and forward the partial results and the final + /// result. + /// + /// See `reduce(into:_:)` if the resulting producer needs to forward only the final + /// result. + /// + /// - parameters: + /// - initialResult: The value to use as the initial accumulating value. + /// - nextPartialResult: A closure that combines the accumulating value and the + /// latest value from `self`. The result would be forwarded, + /// and would be used in the next call of `nextPartialResult`. + /// + /// - returns: A signal that sends the partial results of the accumuation, and the + /// final result as `self` completes. + public func scan(into initialResult: U, _ nextPartialResult: @escaping (inout U, Value) -> Void) -> Signal { + return Signal { observer in + var accumulator = initialResult + + return self.observe { event in + observer.action(event.map { value in + nextPartialResult(&accumulator, value) + return accumulator + }) + } + } + } +} + +extension Signal where Value: Equatable { + /// Forward only values from `self` that are not equal to its immediately preceding + /// value. + /// + /// - note: The first value is always forwarded. + /// + /// - returns: A signal which conditionally forwards values from `self`. + public func skipRepeats() -> Signal { + return skipRepeats(==) + } +} + +extension Signal { + /// Forward only values from `self` that are not considered equivalent to its + /// immediately preceding value. + /// + /// - note: The first value is always forwarded. + /// + /// - parameters: + /// - isEquivalent: A closure to determine whether two values are equivalent. + /// + /// - returns: A signal which conditionally forwards values from `self`. + public func skipRepeats(_ isEquivalent: @escaping (Value, Value) -> Bool) -> Signal { + return self + .scan((nil, false)) { (accumulated: (Value?, Bool), next: Value) -> (value: Value?, repeated: Bool) in + switch accumulated.0 { + case nil: + return (next, false) + case let prev? where isEquivalent(prev, next): + return (prev, true) + case _?: + return (Optional(next), false) + } + } + .filter { !$0.repeated } + .filterMap { $0.value } + } + + /// Do not forward any value from `self` until `shouldContinue` returns `false`, at + /// which point the returned signal starts to forward values from `self`, including + /// the one leading to the toggling. + /// + /// - parameters: + /// - shouldContinue: A closure to determine whether the skipping should continue. + /// + /// - returns: A signal which conditionally forwards values from `self`. + public func skip(while shouldContinue: @escaping (Value) -> Bool) -> Signal { + return Signal { observer in + var isSkipping = true + + return self.observe { event in + switch event { + case let .value(value): + isSkipping = isSkipping && shouldContinue(value) + if !isSkipping { + fallthrough + } + + case .failed, .completed, .interrupted: + observer.action(event) + } + } + } + } + + /// Forward events from `self` until `replacement` begins sending events. + /// + /// - parameters: + /// - replacement: A signal to wait to wait for values from and start + /// sending them as a replacement to `self`'s values. + /// + /// - returns: A signal which passes through `value`, failed, and + /// `interrupted` events from `self` until `replacement` sends + /// an event, at which point the returned signal will send that + /// event and switch to passing through events from `replacement` + /// instead, regardless of whether `self` has sent events + /// already. + public func take(untilReplacement signal: Signal) -> Signal { + return Signal { observer in + let disposable = CompositeDisposable() + + let signalDisposable = self.observe { event in + switch event { + case .completed: + break + + case .value, .failed, .interrupted: + observer.action(event) + } + } + + disposable += signalDisposable + disposable += signal.observe { event in + signalDisposable?.dispose() + observer.action(event) + } + + return disposable + } + } + + /// Wait until `self` completes and then forward the final `count` values + /// on the returned signal. + /// + /// - parameters: + /// - count: Number of last events to send after `self` completes. + /// + /// - returns: A signal that receives up to `count` values from `self` + /// after `self` completes. + public func take(last count: Int) -> Signal { + return Signal { observer in + var buffer: [Value] = [] + buffer.reserveCapacity(count) + + return self.observe { event in + switch event { + case let .value(value): + // To avoid exceeding the reserved capacity of the buffer, + // we remove then add. Remove elements until we have room to + // add one more. + while (buffer.count + 1) > count { + buffer.remove(at: 0) + } + + buffer.append(value) + case let .failed(error): + observer.send(error: error) + case .completed: + buffer.forEach(observer.send(value:)) + + observer.sendCompleted() + case .interrupted: + observer.sendInterrupted() + } + } + } + } + + /// Forward any values from `self` until `shouldContinue` returns `false`, at which + /// point the returned signal would complete. + /// + /// - parameters: + /// - shouldContinue: A closure to determine whether the forwarding of values should + /// continue. + /// + /// - returns: A signal which conditionally forwards values from `self`. + public func take(while shouldContinue: @escaping (Value) -> Bool) -> Signal { + return Signal { observer in + return self.observe { event in + if let value = event.value, !shouldContinue(value) { + observer.sendCompleted() + } else { + observer.action(event) + } + } + } + } +} + +extension Signal { + /// Zip elements of two signals into pairs. The elements of any Nth pair + /// are the Nth elements of the two input signals. + /// + /// - parameters: + /// - otherSignal: A signal to zip values with. + /// + /// - returns: A signal that sends tuples of `self` and `otherSignal`. + public func zip(with other: Signal) -> Signal<(Value, U), Error> { + return Signal.zip(self, other) + } + + /// Forward the latest value on `scheduler` after at least `interval` + /// seconds have passed since *the returned signal* last sent a value. + /// + /// If `self` always sends values more frequently than `interval` seconds, + /// then the returned signal will send a value every `interval` seconds. + /// + /// To measure from when `self` last sent a value, see `debounce`. + /// + /// - seealso: `debounce` + /// + /// - note: If multiple values are received before the interval has elapsed, + /// the latest value is the one that will be passed on. + /// + /// - note: If `self` terminates while a value is being throttled, that + /// value will be discarded and the returned signal will terminate + /// immediately. + /// + /// - note: If the device time changed backwards before previous date while + /// a value is being throttled, and if there is a new value sent, + /// the new value will be passed anyway. + /// + /// - precondition: `interval` must be non-negative number. + /// + /// - parameters: + /// - interval: Number of seconds to wait between sent values. + /// - scheduler: A scheduler to deliver events on. + /// + /// - returns: A signal that sends values at least `interval` seconds + /// appart on a given scheduler. + public func throttle(_ interval: TimeInterval, on scheduler: DateScheduler) -> Signal { + precondition(interval >= 0) + + return Signal { observer in + let state: Atomic> = Atomic(ThrottleState()) + let schedulerDisposable = SerialDisposable() + + let disposable = CompositeDisposable() + disposable += schedulerDisposable + + disposable += self.observe { event in + guard let value = event.value else { + schedulerDisposable.inner = scheduler.schedule { + observer.action(event) + } + return + } + + var scheduleDate: Date! + state.modify { + $0.pendingValue = value + + let proposedScheduleDate: Date + if let previousDate = $0.previousDate, previousDate.compare(scheduler.currentDate) != .orderedDescending { + proposedScheduleDate = previousDate.addingTimeInterval(interval) + } else { + proposedScheduleDate = scheduler.currentDate + } + + switch proposedScheduleDate.compare(scheduler.currentDate) { + case .orderedAscending: + scheduleDate = scheduler.currentDate + + case .orderedSame: fallthrough + case .orderedDescending: + scheduleDate = proposedScheduleDate + } + } + + schedulerDisposable.inner = scheduler.schedule(after: scheduleDate) { + let pendingValue: Value? = state.modify { state in + defer { + if state.pendingValue != nil { + state.pendingValue = nil + state.previousDate = scheduleDate + } + } + return state.pendingValue + } + + if let pendingValue = pendingValue { + observer.send(value: pendingValue) + } + } + } + + return disposable + } + } + + /// Conditionally throttles values sent on the receiver whenever + /// `shouldThrottle` is true, forwarding values on the given scheduler. + /// + /// - note: While `shouldThrottle` remains false, values are forwarded on the + /// given scheduler. If multiple values are received while + /// `shouldThrottle` is true, the latest value is the one that will + /// be passed on. + /// + /// - note: If the input signal terminates while a value is being throttled, + /// that value will be discarded and the returned signal will + /// terminate immediately. + /// + /// - note: If `shouldThrottle` completes before the receiver, and its last + /// value is `true`, the returned signal will remain in the throttled + /// state, emitting no further values until it terminates. + /// + /// - parameters: + /// - shouldThrottle: A boolean property that controls whether values + /// should be throttled. + /// - scheduler: A scheduler to deliver events on. + /// + /// - returns: A signal that sends values only while `shouldThrottle` is false. + public func throttle(while shouldThrottle: P, on scheduler: Scheduler) -> Signal + where P.Value == Bool + { + return Signal { observer in + let initial: ThrottleWhileState = .resumed + let state = Atomic(initial) + let schedulerDisposable = SerialDisposable() + + let disposable = CompositeDisposable() + disposable += schedulerDisposable + + disposable += shouldThrottle.producer + .skipRepeats() + .startWithValues { shouldThrottle in + let valueToSend = state.modify { state -> Value? in + guard !state.isTerminated else { return nil } + + if shouldThrottle { + state = .throttled(nil) + } else { + defer { state = .resumed } + + if case let .throttled(value?) = state { + return value + } + } + + return nil + } + + if let value = valueToSend { + schedulerDisposable.inner = scheduler.schedule { + observer.send(value: value) + } + } + } + + disposable += self.observe { event in + let eventToSend = state.modify { state -> Event? in + switch event { + case let .value(value): + switch state { + case .throttled: + state = .throttled(value) + return nil + case .resumed: + return event + case .terminated: + return nil + } + + case .completed, .interrupted, .failed: + state = .terminated + return event + } + } + + if let event = eventToSend { + schedulerDisposable.inner = scheduler.schedule { + observer.action(event) + } + } + } + + return disposable + } + } + + /// Forward the latest value on `scheduler` after at least `interval` + /// seconds have passed since `self` last sent a value. + /// + /// If `self` always sends values more frequently than `interval` seconds, + /// then the returned signal will never send any values. + /// + /// To measure from when the *returned signal* last sent a value, see + /// `throttle`. + /// + /// - seealso: `throttle` + /// + /// - note: If multiple values are received before the interval has elapsed, + /// the latest value is the one that will be passed on. + /// + /// - note: If the input signal terminates while a value is being debounced, + /// that value will be discarded and the returned signal will + /// terminate immediately. + /// + /// - precondition: `interval` must be non-negative number. + /// + /// - parameters: + /// - interval: A number of seconds to wait before sending a value. + /// - scheduler: A scheduler to send values on. + /// + /// - returns: A signal that sends values that are sent from `self` at least + /// `interval` seconds apart. + public func debounce(_ interval: TimeInterval, on scheduler: DateScheduler) -> Signal { + precondition(interval >= 0) + + let d = SerialDisposable() + + return Signal { observer in + return self.observe { event in + switch event { + case let .value(value): + let date = scheduler.currentDate.addingTimeInterval(interval) + d.inner = scheduler.schedule(after: date) { + observer.send(value: value) + } + + case .completed, .failed, .interrupted: + d.inner = scheduler.schedule { + observer.action(event) + } + } + } + } + } +} + +extension Signal { + /// Forward only those values from `self` that have unique identities across + /// the set of all values that have been seen. + /// + /// - note: This causes the identities to be retained to check for + /// uniqueness. + /// + /// - parameters: + /// - transform: A closure that accepts a value and returns identity + /// value. + /// + /// - returns: A signal that sends unique values during its lifetime. + public func uniqueValues(_ transform: @escaping (Value) -> Identity) -> Signal { + return Signal { observer in + var seenValues: Set = [] + + return self + .observe { event in + switch event { + case let .value(value): + let identity = transform(value) + let (inserted, _) = seenValues.insert(identity) + if inserted { + fallthrough + } + + case .failed, .completed, .interrupted: + observer.action(event) + } + } + } + } +} + +extension Signal where Value: Hashable { + /// Forward only those values from `self` that are unique across the set of + /// all values that have been seen. + /// + /// - note: This causes the values to be retained to check for uniqueness. + /// Providing a function that returns a unique value for each sent + /// value can help you reduce the memory footprint. + /// + /// - returns: A signal that sends unique values during its lifetime. + public func uniqueValues() -> Signal { + return uniqueValues { $0 } + } +} + +private struct ThrottleState { + var previousDate: Date? = nil + var pendingValue: Value? = nil +} + +private enum ThrottleWhileState { + case resumed + case throttled(Value?) + case terminated + + var isTerminated: Bool { + switch self { + case .terminated: + return true + case .resumed, .throttled: + return false + } + } +} + +private protocol SignalAggregateStrategy: class { + /// Update the latest value of the signal at `position` to be `value`. + /// + /// - parameters: + /// - value: The latest value emitted by the signal at `position`. + /// - position: The position of the signal. + func update(_ value: Any, at position: Int) + + /// Record the completion of the signal at `position`. + /// + /// - parameters: + /// - position: The position of the signal. + func complete(at position: Int) + + init(count: Int, action: @escaping (AggregateStrategyEvent) -> Void) +} + +private enum AggregateStrategyEvent { + case value(ContiguousArray) + case completed +} + +extension Signal { + // Threading of `CombineLatestStrategy` and `ZipStrategy`. + // + // The threading models of these strategies mirror that of `Signal.Core` to allow + // recursive termial event from the upstreams that is triggered by the combined + // values. + // + // The strategies do not unique the delivery of `completed`, since `Signal` already + // guarantees that no event would ever be delivered after a terminal event. + + private final class CombineLatestStrategy: SignalAggregateStrategy { + private enum Placeholder { + case none + } + + var values: ContiguousArray + + private var _haveAllSentInitial: Bool + private var haveAllSentInitial: Bool { + get { + if _haveAllSentInitial { + return true + } + + _haveAllSentInitial = values.reduce(true) { $0 && !($1 is Placeholder) } + return _haveAllSentInitial + } + } + + private let count: Int + private let lock: Lock + + private let completion: Atomic + private let action: (AggregateStrategyEvent) -> Void + + func update(_ value: Any, at position: Int) { + lock.lock() + values[position] = value + + if haveAllSentInitial { + action(.value(values)) + } + + lock.unlock() + + if completion.value == self.count, lock.try() { + action(.completed) + lock.unlock() + } + } + + func complete(at position: Int) { + let count: Int = completion.modify { count in + count += 1 + return count + } + + if count == self.count, lock.try() { + action(.completed) + lock.unlock() + } + } + + init(count: Int, action: @escaping (AggregateStrategyEvent) -> Void) { + self.count = count + self.lock = Lock.make() + self.values = ContiguousArray(repeating: Placeholder.none, count: count) + self._haveAllSentInitial = false + self.completion = Atomic(0) + self.action = action + } + } + + private final class ZipStrategy: SignalAggregateStrategy { + private let stateLock: Lock + private let sendLock: Lock + + private var values: ContiguousArray<[Any]> + private var canEmit: Bool { + return values.reduce(true) { $0 && !$1.isEmpty } + } + + private var hasConcurrentlyCompleted: Bool + private var isCompleted: ContiguousArray + + private var hasCompletedAndEmptiedSignal: Bool { + return Swift.zip(values, isCompleted).contains(where: { $0.0.isEmpty && $0.1 }) + } + + private var areAllCompleted: Bool { + return isCompleted.reduce(true) { $0 && $1 } + } + + private let action: (AggregateStrategyEvent) -> Void + + func update(_ value: Any, at position: Int) { + stateLock.lock() + values[position].append(value) + + if canEmit { + var buffer = ContiguousArray() + buffer.reserveCapacity(values.count) + + for index in values.startIndex ..< values.endIndex { + buffer.append(values[index].removeFirst()) + } + + let shouldComplete = areAllCompleted || hasCompletedAndEmptiedSignal + sendLock.lock() + stateLock.unlock() + + action(.value(buffer)) + + if shouldComplete { + action(.completed) + } + + sendLock.unlock() + + stateLock.lock() + + if hasConcurrentlyCompleted { + sendLock.lock() + action(.completed) + sendLock.unlock() + } + } + + stateLock.unlock() + } + + func complete(at position: Int) { + stateLock.lock() + isCompleted[position] = true + + if hasConcurrentlyCompleted || areAllCompleted || hasCompletedAndEmptiedSignal { + if sendLock.try() { + stateLock.unlock() + + action(.completed) + sendLock.unlock() + return + } + + hasConcurrentlyCompleted = true + } + + stateLock.unlock() + } + + init(count: Int, action: @escaping (AggregateStrategyEvent) -> Void) { + self.values = ContiguousArray(repeating: [], count: count) + self.hasConcurrentlyCompleted = false + self.isCompleted = ContiguousArray(repeating: false, count: count) + self.action = action + self.sendLock = Lock.make() + self.stateLock = Lock.make() + } + } + + private final class AggregateBuilder { + fileprivate var startHandlers: [(_ index: Int, _ strategy: Strategy, _ action: @escaping (Signal.Event) -> Void) -> Disposable?] + + init() { + self.startHandlers = [] + } + + @discardableResult + func add(_ signal: Signal) -> Self { + startHandlers.append { index, strategy, action in + return signal.observe { event in + switch event { + case let .value(value): + strategy.update(value, at: index) + + case .completed: + strategy.complete(at: index) + + case .interrupted: + action(.interrupted) + + case let .failed(error): + action(.failed(error)) + } + } + } + + return self + } + } + + private convenience init(_ builder: AggregateBuilder, _ transform: @escaping (ContiguousArray) -> Value) { + self.init { observer in + let disposables = CompositeDisposable() + let strategy = Strategy(count: builder.startHandlers.count) { event in + switch event { + case let .value(value): + observer.send(value: transform(value)) + case .completed: + observer.sendCompleted() + } + } + + for (index, action) in builder.startHandlers.enumerated() where !disposables.isDisposed { + disposables += action(index, strategy) { observer.action($0.map { _ in fatalError() }) } + } + + return disposables + } + } + + private convenience init(_ strategy: Strategy.Type, _ signals: S) where Value == [U], S.Iterator.Element == Signal { + self.init(signals.reduce(AggregateBuilder()) { $0.add($1) }) { $0.map { $0 as! U } } + } + + private convenience init(_ strategy: Strategy.Type, _ a: Signal, _ b: Signal) where Value == (A, B) { + self.init(AggregateBuilder().add(a).add(b)) { + return ($0[0] as! A, $0[1] as! B) + } + } + + private convenience init(_ strategy: Strategy.Type, _ a: Signal, _ b: Signal, _ c: Signal) where Value == (A, B, C) { + self.init(AggregateBuilder().add(a).add(b).add(c)) { + return ($0[0] as! A, $0[1] as! B, $0[2] as! C) + } + } + + private convenience init(_ strategy: Strategy.Type, _ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal) where Value == (A, B, C, D) { + self.init(AggregateBuilder().add(a).add(b).add(c).add(d)) { + return ($0[0] as! A, $0[1] as! B, $0[2] as! C, $0[3] as! D) + } + } + + private convenience init(_ strategy: Strategy.Type, _ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal) where Value == (A, B, C, D, E) { + self.init(AggregateBuilder().add(a).add(b).add(c).add(d).add(e)) { + return ($0[0] as! A, $0[1] as! B, $0[2] as! C, $0[3] as! D, $0[4] as! E) + } + } + + private convenience init(_ strategy: Strategy.Type, _ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal) where Value == (A, B, C, D, E, F) { + self.init(AggregateBuilder().add(a).add(b).add(c).add(d).add(e).add(f)) { + return ($0[0] as! A, $0[1] as! B, $0[2] as! C, $0[3] as! D, $0[4] as! E, $0[5] as! F) + } + } + + private convenience init(_ strategy: Strategy.Type, _ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal) where Value == (A, B, C, D, E, F, G) { + self.init(AggregateBuilder().add(a).add(b).add(c).add(d).add(e).add(f).add(g)) { + return ($0[0] as! A, $0[1] as! B, $0[2] as! C, $0[3] as! D, $0[4] as! E, $0[5] as! F, $0[6] as! G) + } + } + + private convenience init(_ strategy: Strategy.Type, _ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal, _ h: Signal) where Value == (A, B, C, D, E, F, G, H) { + self.init(AggregateBuilder().add(a).add(b).add(c).add(d).add(e).add(f).add(g).add(h)) { + return ($0[0] as! A, $0[1] as! B, $0[2] as! C, $0[3] as! D, $0[4] as! E, $0[5] as! F, $0[6] as! G, $0[7] as! H) + } + } + + private convenience init(_ strategy: Strategy.Type, _ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal, _ h: Signal, _ i: Signal) where Value == (A, B, C, D, E, F, G, H, I) { + self.init(AggregateBuilder().add(a).add(b).add(c).add(d).add(e).add(f).add(g).add(h).add(i)) { + return ($0[0] as! A, $0[1] as! B, $0[2] as! C, $0[3] as! D, $0[4] as! E, $0[5] as! F, $0[6] as! G, $0[7] as! H, $0[8] as! I) + } + } + + private convenience init(_ strategy: Strategy.Type, _ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal, _ h: Signal, _ i: Signal, _ j: Signal) where Value == (A, B, C, D, E, F, G, H, I, J) { + self.init(AggregateBuilder().add(a).add(b).add(c).add(d).add(e).add(f).add(g).add(h).add(i).add(j)) { + return ($0[0] as! A, $0[1] as! B, $0[2] as! C, $0[3] as! D, $0[4] as! E, $0[5] as! F, $0[6] as! G, $0[7] as! H, $0[8] as! I, $0[9] as! J) + } + } + + /// Combines the values of all the given signals, in the manner described by + /// `combineLatest(with:)`. + public static func combineLatest(_ a: Signal, _ b: Signal) -> Signal<(Value, B), Error> { + return .init(CombineLatestStrategy.self, a, b) + } + + /// Combines the values of all the given signals, in the manner described by + /// `combineLatest(with:)`. + public static func combineLatest(_ a: Signal, _ b: Signal, _ c: Signal) -> Signal<(Value, B, C), Error> { + return .init(CombineLatestStrategy.self, a, b, c) + } + + /// Combines the values of all the given signals, in the manner described by + /// `combineLatest(with:)`. + public static func combineLatest(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal) -> Signal<(Value, B, C, D), Error> { + return .init(CombineLatestStrategy.self, a, b, c, d) + } + + /// Combines the values of all the given signals, in the manner described by + /// `combineLatest(with:)`. + public static func combineLatest(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal) -> Signal<(Value, B, C, D, E), Error> { + return .init(CombineLatestStrategy.self, a, b, c, d, e) + } + + /// Combines the values of all the given signals, in the manner described by + /// `combineLatest(with:)`. + public static func combineLatest(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal) -> Signal<(Value, B, C, D, E, F), Error> { + return .init(CombineLatestStrategy.self, a, b, c, d, e, f) + } + + /// Combines the values of all the given signals, in the manner described by + /// `combineLatest(with:)`. + public static func combineLatest(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal) -> Signal<(Value, B, C, D, E, F, G), Error> { + return .init(CombineLatestStrategy.self, a, b, c, d, e, f, g) + } + + /// Combines the values of all the given signals, in the manner described by + /// `combineLatest(with:)`. + public static func combineLatest(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal, _ h: Signal) -> Signal<(Value, B, C, D, E, F, G, H), Error> { + return .init(CombineLatestStrategy.self, a, b, c, d, e, f, g, h) + } + + /// Combines the values of all the given signals, in the manner described by + /// `combineLatest(with:)`. + public static func combineLatest(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal, _ h: Signal, _ i: Signal) -> Signal<(Value, B, C, D, E, F, G, H, I), Error> { + return .init(CombineLatestStrategy.self, a, b, c, d, e, f, g, h, i) + } + + /// Combines the values of all the given signals, in the manner described by + /// `combineLatest(with:)`. + public static func combineLatest(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal, _ h: Signal, _ i: Signal, _ j: Signal) -> Signal<(Value, B, C, D, E, F, G, H, I, J), Error> { + return .init(CombineLatestStrategy.self, a, b, c, d, e, f, g, h, i, j) + } + + /// Combines the values of all the given signals, in the manner described by + /// `combineLatest(with:)`. No events will be sent if the sequence is empty. + public static func combineLatest(_ signals: S) -> Signal<[Value], Error> where S.Iterator.Element == Signal { + return .init(CombineLatestStrategy.self, signals) + } + + /// Zip the values of all the given signals, in the manner described by `zip(with:)`. + public static func zip(_ a: Signal, _ b: Signal) -> Signal<(Value, B), Error> { + return .init(ZipStrategy.self, a, b) + } + + /// Zip the values of all the given signals, in the manner described by `zip(with:)`. + public static func zip(_ a: Signal, _ b: Signal, _ c: Signal) -> Signal<(Value, B, C), Error> { + return .init(ZipStrategy.self, a, b, c) + } + + /// Zip the values of all the given signals, in the manner described by `zip(with:)`. + public static func zip(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal) -> Signal<(Value, B, C, D), Error> { + return .init(ZipStrategy.self, a, b, c, d) + } + + /// Zip the values of all the given signals, in the manner described by `zip(with:)`. + public static func zip(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal) -> Signal<(Value, B, C, D, E), Error> { + return .init(ZipStrategy.self, a, b, c, d, e) + } + + /// Zip the values of all the given signals, in the manner described by `zip(with:)`. + public static func zip(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal) -> Signal<(Value, B, C, D, E, F), Error> { + return .init(ZipStrategy.self, a, b, c, d, e, f) + } + + /// Zip the values of all the given signals, in the manner described by `zip(with:)`. + public static func zip(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal) -> Signal<(Value, B, C, D, E, F, G), Error> { + return .init(ZipStrategy.self, a, b, c, d, e, f, g) + } + + /// Zip the values of all the given signals, in the manner described by `zip(with:)`. + public static func zip(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal, _ h: Signal) -> Signal<(Value, B, C, D, E, F, G, H), Error> { + return .init(ZipStrategy.self, a, b, c, d, e, f, g, h) + } + + /// Zip the values of all the given signals, in the manner described by `zip(with:)`. + public static func zip(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal, _ h: Signal, _ i: Signal) -> Signal<(Value, B, C, D, E, F, G, H, I), Error> { + return .init(ZipStrategy.self, a, b, c, d, e, f, g, h, i) + } + + /// Zip the values of all the given signals, in the manner described by `zip(with:)`. + public static func zip(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal, _ h: Signal, _ i: Signal, _ j: Signal) -> Signal<(Value, B, C, D, E, F, G, H, I, J), Error> { + return .init(ZipStrategy.self, a, b, c, d, e, f, g, h, i, j) + } + + /// Zips the values of all the given signals, in the manner described by + /// `zip(with:)`. No events will be sent if the sequence is empty. + public static func zip(_ signals: S) -> Signal<[Value], Error> where S.Iterator.Element == Signal { + return .init(ZipStrategy.self, signals) + } +} + +extension Signal { + /// Forward events from `self` until `interval`. Then if signal isn't + /// completed yet, fails with `error` on `scheduler`. + /// + /// - note: If the interval is 0, the timeout will be scheduled immediately. + /// The signal must complete synchronously (or on a faster + /// scheduler) to avoid the timeout. + /// + /// - precondition: `interval` must be non-negative number. + /// + /// - parameters: + /// - error: Error to send with failed event if `self` is not completed + /// when `interval` passes. + /// - interval: Number of seconds to wait for `self` to complete. + /// - scheudler: A scheduler to deliver error on. + /// + /// - returns: A signal that sends events for at most `interval` seconds, + /// then, if not `completed` - sends `error` with failed event + /// on `scheduler`. + public func timeout(after interval: TimeInterval, raising error: Error, on scheduler: DateScheduler) -> Signal { + precondition(interval >= 0) + + return Signal { observer in + let disposable = CompositeDisposable() + let date = scheduler.currentDate.addingTimeInterval(interval) + + disposable += scheduler.schedule(after: date) { + observer.send(error: error) + } + + disposable += self.observe(observer) + return disposable + } + } +} + +extension Signal where Error == NoError { + /// Promote a signal that does not generate failures into one that can. + /// + /// - note: This does not actually cause failures to be generated for the + /// given signal, but makes it easier to combine with other signals + /// that may fail; for example, with operators like + /// `combineLatestWith`, `zipWith`, `flatten`, etc. + /// + /// - parameters: + /// - _ An `ErrorType`. + /// + /// - returns: A signal that has an instantiatable `ErrorType`. + public func promoteError(_: F.Type = F.self) -> Signal { + return Signal { observer in + return self.observe { event in + switch event { + case let .value(value): + observer.send(value: value) + case .failed: + fatalError("NoError is impossible to construct") + case .completed: + observer.sendCompleted() + case .interrupted: + observer.sendInterrupted() + } + } + } + } + + /// Promote a signal that does not generate failures into one that can. + /// + /// - note: This does not actually cause failures to be generated for the + /// given signal, but makes it easier to combine with other signals + /// that may fail; for example, with operators like + /// `combineLatestWith`, `zipWith`, `flatten`, etc. + /// + /// - parameters: + /// - _ An `ErrorType`. + /// + /// - returns: A signal that has an instantiatable `ErrorType`. + public func promoteError(_: Error.Type = Error.self) -> Signal { + return self + } + + /// Forward events from `self` until `interval`. Then if signal isn't + /// completed yet, fails with `error` on `scheduler`. + /// + /// - note: If the interval is 0, the timeout will be scheduled immediately. + /// The signal must complete synchronously (or on a faster + /// scheduler) to avoid the timeout. + /// + /// - parameters: + /// - interval: Number of seconds to wait for `self` to complete. + /// - error: Error to send with `failed` event if `self` is not completed + /// when `interval` passes. + /// - scheudler: A scheduler to deliver error on. + /// + /// - returns: A signal that sends events for at most `interval` seconds, + /// then, if not `completed` - sends `error` with `failed` event + /// on `scheduler`. + public func timeout( + after interval: TimeInterval, + raising error: NewError, + on scheduler: DateScheduler + ) -> Signal { + return self + .promoteError(NewError.self) + .timeout(after: interval, raising: error, on: scheduler) + } +} + +extension Signal where Value == Never { + /// Promote a signal that does not generate values, as indicated by `Never`, to be + /// a signal of the given type of value. + /// + /// - note: The promotion does not result in any value being generated. + /// + /// - parameters: + /// - _ The type of value to promote to. + /// + /// - returns: A signal that forwards all terminal events from `self`. + public func promoteValue(_: U.Type = U.self) -> Signal { + return Signal { observer in + return self.observe { event in + switch event { + case .value: + fatalError("Never is impossible to construct") + case let .failed(error): + observer.send(error: error) + case .completed: + observer.sendCompleted() + case .interrupted: + observer.sendInterrupted() + } + } + } + } + + /// Promote a signal that does not generate values, as indicated by `Never`, to be + /// a signal of the given type of value. + /// + /// - note: The promotion does not result in any value being generated. + /// + /// - parameters: + /// - _ The type of value to promote to. + /// + /// - returns: A signal that forwards all terminal events from `self`. + public func promoteValue(_: Value.Type = Value.self) -> Signal { + return self + } +} + +extension Signal where Value == Bool { + /// Create a signal that computes a logical NOT in the latest values of `self`. + /// + /// - returns: A signal that emits the logical NOT results. + public func negate() -> Signal { + return self.map(!) + } + + /// Create a signal that computes a logical AND between the latest values of `self` + /// and `signal`. + /// + /// - parameters: + /// - signal: Signal to be combined with `self`. + /// + /// - returns: A signal that emits the logical AND results. + public func and(_ signal: Signal) -> Signal { + return self.combineLatest(with: signal).map { $0.0 && $0.1 } + } + + /// Create a signal that computes a logical OR between the latest values of `self` + /// and `signal`. + /// + /// - parameters: + /// - signal: Signal to be combined with `self`. + /// + /// - returns: A signal that emits the logical OR results. + public func or(_ signal: Signal) -> Signal { + return self.combineLatest(with: signal).map { $0.0 || $0.1 } + } +} + +extension Signal { + /// Apply an action to every value from `self`, and forward the value if the action + /// succeeds. If the action fails with an error, the returned `Signal` would propagate + /// the failure and terminate. + /// + /// - parameters: + /// - action: An action which yields a `Result`. + /// + /// - returns: A signal which forwards the values from `self` until the given action + /// fails. + public func attempt(_ action: @escaping (Value) -> Result<(), Error>) -> Signal { + return attemptMap { value -> Result in + return action(value).map { _ -> Value in + return value + } + } + } + + /// Apply a transform to every value from `self`, and forward the transformed value + /// if the action succeeds. If the action fails with an error, the returned `Signal` + /// would propagate the failure and terminate. + /// + /// - parameters: + /// - action: A transform which yields a `Result` of the transformed value or the + /// error. + /// + /// - returns: A signal which forwards the transformed values. + public func attemptMap(_ transform: @escaping (Value) -> Result) -> Signal { + return Signal { observer in + self.observe { event in + switch event { + case let .value(value): + transform(value).analysis( + ifSuccess: observer.send(value:), + ifFailure: observer.send(error:) + ) + case let .failed(error): + observer.send(error: error) + case .completed: + observer.sendCompleted() + case .interrupted: + observer.sendInterrupted() + } + } + } + } +} + +extension Signal where Error == NoError { + /// Apply a throwable action to every value from `self`, and forward the values + /// if the action succeeds. If the action throws an error, the returned `Signal` + /// would propagate the failure and terminate. + /// + /// - parameters: + /// - action: A throwable closure to perform an arbitrary action on the value. + /// + /// - returns: A signal which forwards the successful values of the given action. + public func attempt(_ action: @escaping (Value) throws -> Void) -> Signal { + return self + .promoteError(AnyError.self) + .attempt(action) + } + + /// Apply a throwable transform to every value from `self`, and forward the results + /// if the action succeeds. If the transform throws an error, the returned `Signal` + /// would propagate the failure and terminate. + /// + /// - parameters: + /// - transform: A throwable transform. + /// + /// - returns: A signal which forwards the successfully transformed values. + public func attemptMap(_ transform: @escaping (Value) throws -> U) -> Signal { + return self + .promoteError(AnyError.self) + .attemptMap(transform) + } +} + +extension Signal where Error == AnyError { + /// Apply a throwable action to every value from `self`, and forward the values + /// if the action succeeds. If the action throws an error, the returned `Signal` + /// would propagate the failure and terminate. + /// + /// - parameters: + /// - action: A throwable closure to perform an arbitrary action on the value. + /// + /// - returns: A signal which forwards the successful values of the given action. + public func attempt(_ action: @escaping (Value) throws -> Void) -> Signal { + return attemptMap { value in + try action(value) + return value + } + } + + /// Apply a throwable transform to every value from `self`, and forward the results + /// if the action succeeds. If the transform throws an error, the returned `Signal` + /// would propagate the failure and terminate. + /// + /// - parameters: + /// - transform: A throwable transform. + /// + /// - returns: A signal which forwards the successfully transformed values. + public func attemptMap(_ transform: @escaping (Value) throws -> U) -> Signal { + return attemptMap { value in + ReactiveSwift.materialize { + try transform(value) + } + } + } +} diff --git a/Sample/Pods/ReactiveSwift/Sources/SignalProducer.swift b/Sample/Pods/ReactiveSwift/Sources/SignalProducer.swift new file mode 100644 index 00000000..377a8e32 --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/SignalProducer.swift @@ -0,0 +1,2301 @@ +import Dispatch +import Foundation +import Result + +/// A SignalProducer creates Signals that can produce values of type `Value` +/// and/or fail with errors of type `Error`. If no failure should be possible, +/// `NoError` can be specified for `Error`. +/// +/// SignalProducers can be used to represent operations or tasks, like network +/// requests, where each invocation of `start()` will create a new underlying +/// operation. This ensures that consumers will receive the results, versus a +/// plain Signal, where the results might be sent before any observers are +/// attached. +/// +/// Because of the behavior of `start()`, different Signals created from the +/// producer may see a different version of Events. The Events may arrive in a +/// different order between Signals, or the stream might be completely +/// different! +public struct SignalProducer { + public typealias ProducedSignal = Signal + + /// Wraps a closure which, when invoked, produces a new instance of `Signal`, a + /// customized `observerDidSetup` post-creation side effect for the `Signal` and a + /// disposable to interrupt the produced `Signal`. + /// + /// Unlike the safe `startWithSignal(_:)` API, `builder` shifts the responsibility of + /// invoking the post-creation side effect to the caller, while it takes from the + /// caller the responsibility of the `Signal` creation. + /// + /// The design allows producer lifting to be as efficient as native `Signal` + /// operators, by eliminating the unnecessary relay `Signal` imposed by the old + /// `startWithSignal(_:)`, regardless of the fact that lifted operators can rely on + /// the upstreams for producer interruption. + /// + /// `observerDidSetup` must be invoked before any other post-creation side effect. + fileprivate struct Instance { + let producedSignal: Signal + let observerDidSetup: () -> Void + let interruptHandle: Disposable + } + + fileprivate let builder: () -> Instance + + /// Convert an entity into its equivalent representation as `SignalProducer`. + /// + /// - parameters: + /// - base: The entity to convert from. + public init(_ base: T) where T.Value == Value, T.Error == Error { + self = base.producer + } + + /// Initializes a `SignalProducer` that will emit the same events as the + /// given signal. + /// + /// If the Disposable returned from `start()` is disposed or a terminating + /// event is sent to the observer, the given signal will be disposed. + /// + /// - parameters: + /// - signal: A signal to observe after starting the producer. + public init(_ signal: Signal) { + self.init { observer, lifetime in + lifetime += signal.observe(observer) + } + } + + /// Initializes a SignalProducer that will invoke the given closure once for + /// each invocation of `start()`. + /// + /// The events that the closure puts into the given observer will become + /// the events sent by the started `Signal` to its observers. + /// + /// - note: If the `Disposable` returned from `start()` is disposed or a + /// terminating event is sent to the observer, the given + /// `CompositeDisposable` will be disposed, at which point work + /// should be interrupted and any temporary resources cleaned up. + /// + /// - parameters: + /// - startHandler: A closure that accepts observer and a disposable. + public init(_ startHandler: @escaping (Signal.Observer, Lifetime) -> Void) { + self.init { () -> Instance in + let disposable = CompositeDisposable() + let (signal, observer) = Signal.pipe(disposable: disposable) + let observerDidSetup = { startHandler(observer, Lifetime(disposable)) } + let interruptHandle = AnyDisposable(observer.sendInterrupted) + + return Instance(producedSignal: signal, observerDidSetup: observerDidSetup, interruptHandle: interruptHandle) + } + } + + /// Create a SignalProducer that will invoke the given factory once for each + /// invocation of `start()`. + /// + /// - parameters: + /// - builder: A builder that is used by `startWithSignal` to create new `Signal`s. + fileprivate init(_ builder: @escaping () -> Instance) { + self.builder = builder + } + + /// Creates a producer for a `Signal` that will immediately send one value + /// then complete. + /// + /// - parameters: + /// - value: A value that should be sent by the `Signal` in a `value` + /// event. + public init(value: Value) { + self.init { observer, lifetime in + observer.send(value: value) + observer.sendCompleted() + } + } + + /// Creates a producer for a `Signal` that immediately sends one value, then + /// completes. + /// + /// This initializer differs from `init(value:)` in that its sole `value` + /// event is constructed lazily by invoking the supplied `action` when + /// the `SignalProducer` is started. + /// + /// - parameters: + /// - action: A action that yields a value to be sent by the `Signal` as + /// a `value` event. + public init(_ action: @escaping () -> Value) { + self.init { observer, lifetime in + observer.send(value: action()) + observer.sendCompleted() + } + } + + /// Create a `SignalProducer` that will attempt the given operation once for + /// each invocation of `start()`. + /// + /// Upon success, the started signal will send the resulting value then + /// complete. Upon failure, the started signal will fail with the error that + /// occurred. + /// + /// - parameters: + /// - action: A closure that returns instance of `Result`. + public init(_ action: @escaping () -> Result) { + self.init { observer, disposable in + action().analysis(ifSuccess: { value in + observer.send(value: value) + observer.sendCompleted() + }, ifFailure: { error in + observer.send(error: error) + }) + } + } + + /// Creates a producer for a `Signal` that will immediately fail with the + /// given error. + /// + /// - parameters: + /// - error: An error that should be sent by the `Signal` in a `failed` + /// event. + public init(error: Error) { + self.init { observer, lifetime in + observer.send(error: error) + } + } + + /// Creates a producer for a Signal that will immediately send one value + /// then complete, or immediately fail, depending on the given Result. + /// + /// - parameters: + /// - result: A `Result` instance that will send either `value` event if + /// `result` is `success`ful or `failed` event if `result` is a + /// `failure`. + public init(result: Result) { + switch result { + case let .success(value): + self.init(value: value) + + case let .failure(error): + self.init(error: error) + } + } + + /// Creates a producer for a Signal that will immediately send the values + /// from the given sequence, then complete. + /// + /// - parameters: + /// - values: A sequence of values that a `Signal` will send as separate + /// `value` events and then complete. + public init(_ values: S) where S.Iterator.Element == Value { + self.init { observer, lifetime in + for value in values { + observer.send(value: value) + + if lifetime.hasEnded { + break + } + } + + observer.sendCompleted() + } + } + + /// Creates a producer for a Signal that will immediately send the values + /// from the given sequence, then complete. + /// + /// - parameters: + /// - first: First value for the `Signal` to send. + /// - second: Second value for the `Signal` to send. + /// - tail: Rest of the values to be sent by the `Signal`. + public init(values first: Value, _ second: Value, _ tail: Value...) { + self.init([ first, second ] + tail) + } + + /// A producer for a Signal that will immediately complete without sending + /// any values. + public static var empty: SignalProducer { + return self.init { observer, lifetime in + observer.sendCompleted() + } + } + + /// A producer for a Signal that never sends any events to its observers. + public static var never: SignalProducer { + return self.init { observer, lifetime in + lifetime.observeEnded { _ = observer } + } + } + + /// Create a `Signal` from `self`, pass it into the given closure, and start the + /// associated work on the produced `Signal` as the closure returns. + /// + /// - parameters: + /// - setup: A closure to be invoked before the work associated with the produced + /// `Signal` commences. Both the produced `Signal` and an interrupt handle + /// of the signal would be passed to the closure. + public func startWithSignal(_ setup: (_ signal: Signal, _ interruptHandle: Disposable) -> Void) { + let instance = builder() + setup(instance.producedSignal, instance.interruptHandle) + guard !instance.interruptHandle.isDisposed else { return } + instance.observerDidSetup() + } +} + +extension SignalProducer where Error == AnyError { + /// Create a `SignalProducer` that will attempt the given failable operation once for + /// each invocation of `start()`. + /// + /// Upon success, the started producer will send the resulting value then + /// complete. Upon failure, the started signal will fail with the error that + /// occurred. + /// + /// - parameters: + /// - operation: A failable closure. + public init(_ action: @escaping () throws -> Value) { + self.init { + return ReactiveSwift.materialize { + return try action() + } + } + } +} + +/// Represents reactive primitives that can be represented by `SignalProducer`. +public protocol SignalProducerConvertible { + /// The type of values being sent by `self`. + associatedtype Value + + /// The type of error that can occur on `self`. + associatedtype Error: Swift.Error + + /// The `SignalProducer` representation of `self`. + var producer: SignalProducer { get } +} + +/// A protocol for constraining associated types to `SignalProducer`. +public protocol SignalProducerProtocol { + /// The type of values being sent by `self`. + associatedtype Value + + /// The type of error that can occur on `self`. + associatedtype Error: Swift.Error + + /// The materialized `self`. + var producer: SignalProducer { get } +} + +extension SignalProducer: SignalProducerConvertible, SignalProducerProtocol { + public var producer: SignalProducer { + return self + } +} + +extension SignalProducer { + /// Create a `Signal` from `self`, and observe it with the given observer. + /// + /// - parameters: + /// - observer: An observer to attach to the produced `Signal`. + /// + /// - returns: A disposable to interrupt the produced `Signal`. + @discardableResult + public func start(_ observer: Signal.Observer = .init()) -> Disposable { + var disposable: Disposable! + + startWithSignal { signal, innerDisposable in + signal.observe(observer) + disposable = innerDisposable + } + + return disposable + } + + /// Create a `Signal` from `self`, and observe the `Signal` for all events + /// being emitted. + /// + /// - parameters: + /// - action: A closure to be invoked with every event from `self`. + /// + /// - returns: A disposable to interrupt the produced `Signal`. + @discardableResult + public func start(_ action: @escaping Signal.Observer.Action) -> Disposable { + return start(Signal.Observer(action)) + } + + /// Create a `Signal` from `self`, and observe the `Signal` for all values being + /// emitted, and if any, its failure. + /// + /// - parameters: + /// - action: A closure to be invoked with values from `self`, or the propagated + /// error should any `failed` event is emitted. + /// + /// - returns: A disposable to interrupt the produced `Signal`. + @discardableResult + public func startWithResult(_ action: @escaping (Result) -> Void) -> Disposable { + return start( + Signal.Observer( + value: { action(.success($0)) }, + failed: { action(.failure($0)) } + ) + ) + } + + /// Create a `Signal` from `self`, and observe its completion. + /// + /// - parameters: + /// - action: A closure to be invoked when a `completed` event is emitted. + /// + /// - returns: A disposable to interrupt the produced `Signal`. + @discardableResult + public func startWithCompleted(_ action: @escaping () -> Void) -> Disposable { + return start(Signal.Observer(completed: action)) + } + + /// Create a `Signal` from `self`, and observe its failure. + /// + /// - parameters: + /// - action: A closure to be invoked with the propagated error, should any + /// `failed` event is emitted. + /// + /// - returns: A disposable to interrupt the produced `Signal`. + @discardableResult + public func startWithFailed(_ action: @escaping (Error) -> Void) -> Disposable { + return start(Signal.Observer(failed: action)) + } + + /// Create a `Signal` from `self`, and observe its interruption. + /// + /// - parameters: + /// - action: A closure to be invoked when an `interrupted` event is emitted. + /// + /// - returns: A disposable to interrupt the produced `Signal`. + @discardableResult + public func startWithInterrupted(_ action: @escaping () -> Void) -> Disposable { + return start(Signal.Observer(interrupted: action)) + } + + /// Creates a `Signal` from the producer. + /// + /// This is equivalent to `SignalProducer.startWithSignal`, but it has + /// the downside that any values emitted synchronously upon starting will + /// be missed by the observer, because it won't be able to subscribe in time. + /// That's why we don't want this method to be exposed as `public`, + /// but it's useful internally. + internal func startAndRetrieveSignal() -> Signal { + var result: Signal! + self.startWithSignal { signal, _ in + result = signal + } + + return result + } + + /// Create a `Signal` from `self` in the manner described by `startWithSignal`, and + /// put the interrupt handle into the given `CompositeDisposable`. + /// + /// - parameters: + /// - lifetime: The `Lifetime` the interrupt handle to be added to. + /// - setup: A closure that accepts the produced `Signal`. + fileprivate func startWithSignal(during lifetime: Lifetime, setup: (Signal) -> Void) { + startWithSignal { signal, interruptHandle in + lifetime += interruptHandle + setup(signal) + } + } +} + +extension SignalProducer where Error == NoError { + /// Create a `Signal` from `self`, and observe the `Signal` for all values being + /// emitted. + /// + /// - parameters: + /// - action: A closure to be invoked with values from the produced `Signal`. + /// + /// - returns: A disposable to interrupt the produced `Signal`. + @discardableResult + public func startWithValues(_ action: @escaping (Value) -> Void) -> Disposable { + return start(Signal.Observer(value: action)) + } +} + +extension SignalProducer { + /// Lift an unary Signal operator to operate upon SignalProducers instead. + /// + /// In other words, this will create a new `SignalProducer` which will apply + /// the given `Signal` operator to _every_ created `Signal`, just as if the + /// operator had been applied to each `Signal` yielded from `start()`. + /// + /// - parameters: + /// - transform: An unary operator to lift. + /// + /// - returns: A signal producer that applies signal's operator to every + /// created signal. + public func lift(_ transform: @escaping (Signal) -> Signal) -> SignalProducer { + return SignalProducer { () -> SignalProducer.Instance in + // Transform the `Signal`, and pass through the `didCreate` side effect and + // the interruptHandle. + let instance = self.producer.builder() + return SignalProducer.Instance(producedSignal: transform(instance.producedSignal), + observerDidSetup: instance.observerDidSetup, + interruptHandle: instance.interruptHandle) + } + } + + /// Lift a binary Signal operator to operate upon SignalProducers. + /// + /// The left producer would first be started. When both producers are synchronous this + /// order can be important depending on the operator to generate correct results. + /// + /// - returns: A factory that creates a SignalProducer with the given operator + /// applied. `self` would be the LHS, and the factory input would + /// be the RHS. + fileprivate func liftLeft(_ transform: @escaping (Signal) -> (Signal) -> Signal) -> (SignalProducer) -> SignalProducer { + return lift(leftFirst: true, transform) + } + + /// Lift a binary Signal operator to operate upon SignalProducers. + /// + /// The right producer would first be started. When both producers are synchronous + /// this order can be important depending on the operator to generate correct results. + /// + /// - returns: A factory that creates a SignalProducer with the given operator + /// applied. `self` would be the LHS, and the factory input would + /// be the RHS. + fileprivate func liftRight(_ transform: @escaping (Signal) -> (Signal) -> Signal) -> (SignalProducer) -> SignalProducer { + return lift(leftFirst: false, transform) + } + + private func lift(leftFirst: Bool, _ transform: @escaping (Signal) -> (Signal) -> Signal) -> (SignalProducer) -> SignalProducer { + return { otherProducer in + return SignalProducer { () -> SignalProducer.Instance in + let left = self.producer.builder() + let right = otherProducer.builder() + + return .init(producedSignal: transform(left.producedSignal)(right.producedSignal), + observerDidSetup: { + if leftFirst { + left.observerDidSetup() + right.observerDidSetup() + } else { + right.observerDidSetup() + left.observerDidSetup() + }}, + interruptHandle: CompositeDisposable([left.interruptHandle, right.interruptHandle])) + } + } + } + + /// Lift a binary Signal operator to operate upon SignalProducers instead. + /// + /// In other words, this will create a new `SignalProducer` which will apply + /// the given `Signal` operator to _every_ `Signal` created from the two + /// producers, just as if the operator had been applied to each `Signal` + /// yielded from `start()`. + /// + /// - note: starting the returned producer will start the receiver of the + /// operator, which may not be adviseable for some operators. + /// + /// - parameters: + /// - transform: A binary operator to lift. + /// + /// - returns: A binary operator that operates on two signal producers. + public func lift(_ transform: @escaping (Signal) -> (Signal) -> Signal) -> (SignalProducer) -> SignalProducer { + return liftRight(transform) + } +} + +/// Start the producers in the argument order. +/// +/// - parameters: +/// - disposable: The `CompositeDisposable` to collect the interrupt handles of all +/// produced `Signal`s. +/// - setup: The closure to accept all produced `Signal`s at once. +private func flattenStart(_ lifetime: Lifetime, _ a: SignalProducer, _ b: SignalProducer, _ setup: (Signal, Signal) -> Void) { + b.startWithSignal(during: lifetime) { b in + a.startWithSignal(during: lifetime) { setup($0, b) } + } +} + +/// Start the producers in the argument order. +/// +/// - parameters: +/// - disposable: The `CompositeDisposable` to collect the interrupt handles of all +/// produced `Signal`s. +/// - setup: The closure to accept all produced `Signal`s at once. +private func flattenStart(_ lifetime: Lifetime, _ a: SignalProducer, _ b: SignalProducer, _ c: SignalProducer, _ setup: (Signal, Signal, Signal) -> Void) { + c.startWithSignal(during: lifetime) { c in + flattenStart(lifetime, a, b) { setup($0, $1, c) } + } +} + +/// Start the producers in the argument order. +/// +/// - parameters: +/// - disposable: The `CompositeDisposable` to collect the interrupt handles of all +/// produced `Signal`s. +/// - setup: The closure to accept all produced `Signal`s at once. +private func flattenStart(_ lifetime: Lifetime, _ a: SignalProducer, _ b: SignalProducer, _ c: SignalProducer, _ d: SignalProducer, _ setup: (Signal, Signal, Signal, Signal) -> Void) { + d.startWithSignal(during: lifetime) { d in + flattenStart(lifetime, a, b, c) { setup($0, $1, $2, d) } + } +} + +/// Start the producers in the argument order. +/// +/// - parameters: +/// - disposable: The `CompositeDisposable` to collect the interrupt handles of all +/// produced `Signal`s. +/// - setup: The closure to accept all produced `Signal`s at once. +private func flattenStart(_ lifetime: Lifetime, _ a: SignalProducer, _ b: SignalProducer, _ c: SignalProducer, _ d: SignalProducer, _ e: SignalProducer, _ setup: (Signal, Signal, Signal, Signal, Signal) -> Void) { + e.startWithSignal(during: lifetime) { e in + flattenStart(lifetime, a, b, c, d) { setup($0, $1, $2, $3, e) } + } +} + +/// Start the producers in the argument order. +/// +/// - parameters: +/// - disposable: The `CompositeDisposable` to collect the interrupt handles of all +/// produced `Signal`s. +/// - setup: The closure to accept all produced `Signal`s at once. +private func flattenStart(_ lifetime: Lifetime, _ a: SignalProducer, _ b: SignalProducer, _ c: SignalProducer, _ d: SignalProducer, _ e: SignalProducer, _ f: SignalProducer, _ setup: (Signal, Signal, Signal, Signal, Signal, Signal) -> Void) { + f.startWithSignal(during: lifetime) { f in + flattenStart(lifetime, a, b, c, d, e) { setup($0, $1, $2, $3, $4, f) } + } +} + +/// Start the producers in the argument order. +/// +/// - parameters: +/// - disposable: The `CompositeDisposable` to collect the interrupt handles of all +/// produced `Signal`s. +/// - setup: The closure to accept all produced `Signal`s at once. +private func flattenStart(_ lifetime: Lifetime, _ a: SignalProducer, _ b: SignalProducer, _ c: SignalProducer, _ d: SignalProducer, _ e: SignalProducer, _ f: SignalProducer, _ g: SignalProducer, _ setup: (Signal, Signal, Signal, Signal, Signal, Signal, Signal) -> Void) { + g.startWithSignal(during: lifetime) { g in + flattenStart(lifetime, a, b, c, d, e, f) { setup($0, $1, $2, $3, $4, $5, g) } + } +} + +/// Start the producers in the argument order. +/// +/// - parameters: +/// - disposable: The `CompositeDisposable` to collect the interrupt handles of all +/// produced `Signal`s. +/// - setup: The closure to accept all produced `Signal`s at once. +private func flattenStart(_ lifetime: Lifetime, _ a: SignalProducer, _ b: SignalProducer, _ c: SignalProducer, _ d: SignalProducer, _ e: SignalProducer, _ f: SignalProducer, _ g: SignalProducer, _ h: SignalProducer, _ setup: (Signal, Signal, Signal, Signal, Signal, Signal, Signal, Signal) -> Void) { + h.startWithSignal(during: lifetime) { h in + flattenStart(lifetime, a, b, c, d, e, f, g) { setup($0, $1, $2, $3, $4, $5, $6, h) } + } +} + +/// Start the producers in the argument order. +/// +/// - parameters: +/// - disposable: The `CompositeDisposable` to collect the interrupt handles of all +/// produced `Signal`s. +/// - setup: The closure to accept all produced `Signal`s at once. +private func flattenStart(_ lifetime: Lifetime, _ a: SignalProducer, _ b: SignalProducer, _ c: SignalProducer, _ d: SignalProducer, _ e: SignalProducer, _ f: SignalProducer, _ g: SignalProducer, _ h: SignalProducer, _ i: SignalProducer, _ setup: (Signal, Signal, Signal, Signal, Signal, Signal, Signal, Signal, Signal) -> Void) { + i.startWithSignal(during: lifetime) { i in + flattenStart(lifetime, a, b, c, d, e, f, g, h) { setup($0, $1, $2, $3, $4, $5, $6, $7, i) } + } +} + +/// Start the producers in the argument order. +/// +/// - parameters: +/// - disposable: The `CompositeDisposable` to collect the interrupt handles of all +/// produced `Signal`s. +/// - setup: The closure to accept all produced `Signal`s at once. +private func flattenStart(_ lifetime: Lifetime, _ a: SignalProducer, _ b: SignalProducer, _ c: SignalProducer, _ d: SignalProducer, _ e: SignalProducer, _ f: SignalProducer, _ g: SignalProducer, _ h: SignalProducer, _ i: SignalProducer, _ j: SignalProducer, _ setup: (Signal, Signal, Signal, Signal, Signal, Signal, Signal, Signal, Signal, Signal) -> Void) { + j.startWithSignal(during: lifetime) { j in + flattenStart(lifetime, a, b, c, d, e, f, g, h, i) { setup($0, $1, $2, $3, $4, $5, $6, $7, $8, j) } + } +} + +extension SignalProducer { + /// Map each value in the producer to a new value. + /// + /// - parameters: + /// - transform: A closure that accepts a value and returns a different + /// value. + /// + /// - returns: A signal producer that, when started, will send a mapped + /// value of `self.` + public func map(_ transform: @escaping (Value) -> U) -> SignalProducer { + return lift { $0.map(transform) } + } + +#if swift(>=3.2) + /// Map each value in the producer to a new value by applying a key path. + /// + /// - parameters: + /// - keyPath: A key path relative to the producer's `Value` type. + /// + /// - returns: A producer that will send new values. + public func map(_ keyPath: KeyPath) -> SignalProducer { + return lift { $0.map(keyPath) } + } +#endif + + /// Map errors in the producer to a new error. + /// + /// - parameters: + /// - transform: A closure that accepts an error object and returns a + /// different error. + /// + /// - returns: A producer that emits errors of new type. + public func mapError(_ transform: @escaping (Error) -> F) -> SignalProducer { + return lift { $0.mapError(transform) } + } + + /// Maps each value in the producer to a new value, lazily evaluating the + /// supplied transformation on the specified scheduler. + /// + /// - important: Unlike `map`, there is not a 1-1 mapping between incoming + /// values, and values sent on the returned producer. If + /// `scheduler` has not yet scheduled `transform` for + /// execution, then each new value will replace the last one as + /// the parameter to `transform` once it is finally executed. + /// + /// - parameters: + /// - transform: The closure used to obtain the returned value from this + /// producer's underlying value. + /// + /// - returns: A producer that, when started, sends values obtained using + /// `transform` as this producer sends values. + public func lazyMap(on scheduler: Scheduler, transform: @escaping (Value) -> U) -> SignalProducer { + return lift { $0.lazyMap(on: scheduler, transform: transform) } + } + + /// Preserve only values which pass the given closure. + /// + /// - parameters: + /// - isIncluded: A closure to determine whether a value from `self` should be + /// included in the produced `Signal`. + /// + /// - returns: A producer that, when started, forwards the values passing the given + /// closure. + public func filter(_ isIncluded: @escaping (Value) -> Bool) -> SignalProducer { + return lift { $0.filter(isIncluded) } + } + + /// Applies `transform` to values from the producer and forwards values with non `nil` results unwrapped. + /// - parameters: + /// - transform: A closure that accepts a value from the `value` event and + /// returns a new optional value. + /// + /// - returns: A producer that will send new values, that are non `nil` after the transformation. + public func filterMap(_ transform: @escaping (Value) -> U?) -> SignalProducer { + return lift { $0.filterMap(transform) } + } + + /// Yield the first `count` values from the input producer. + /// + /// - precondition: `count` must be non-negative number. + /// + /// - parameters: + /// - count: A number of values to take from the signal. + /// + /// - returns: A producer that, when started, will yield the first `count` + /// values from `self`. + public func take(first count: Int) -> SignalProducer { + return lift { $0.take(first: count) } + } + + /// Yield an array of values when `self` completes. + /// + /// - note: When `self` completes without collecting any value, it will send + /// an empty array of values. + /// + /// - returns: A producer that, when started, will yield an array of values + /// when `self` completes. + public func collect() -> SignalProducer<[Value], Error> { + return lift { $0.collect() } + } + + /// Yield an array of values until it reaches a certain count. + /// + /// - precondition: `count` must be greater than zero. + /// + /// - note: When the count is reached the array is sent and the signal + /// starts over yielding a new array of values. + /// + /// - note: When `self` completes any remaining values will be sent, the + /// last array may not have `count` values. Alternatively, if were + /// not collected any values will sent an empty array of values. + /// + /// - returns: A producer that, when started, collects at most `count` + /// values from `self`, forwards them as a single array and + /// completes. + public func collect(count: Int) -> SignalProducer<[Value], Error> { + precondition(count > 0) + return lift { $0.collect(count: count) } + } + + /// Collect values from `self`, and emit them if the predicate passes. + /// + /// When `self` completes any remaining values will be sent, regardless of the + /// collected values matching `shouldEmit` or not. + /// + /// If `self` completes without having emitted any value, an empty array would be + /// emitted, followed by the completion of the produced `Signal`. + /// + /// ```` + /// let (producer, observer) = SignalProducer.buffer(1) + /// + /// producer + /// .collect { values in values.reduce(0, combine: +) == 8 } + /// .startWithValues { print($0) } + /// + /// observer.send(value: 1) + /// observer.send(value: 3) + /// observer.send(value: 4) + /// observer.send(value: 7) + /// observer.send(value: 1) + /// observer.send(value: 5) + /// observer.send(value: 6) + /// observer.sendCompleted() + /// + /// // Output: + /// // [1, 3, 4] + /// // [7, 1] + /// // [5, 6] + /// ```` + /// + /// - parameters: + /// - shouldEmit: A closure to determine, when every time a new value is received, + /// whether the collected values should be emitted. + /// + /// - returns: A signal of arrays of values, as instructed by the `shouldEmit` + /// closure. + public func collect(_ shouldEmit: @escaping (_ values: [Value]) -> Bool) -> SignalProducer<[Value], Error> { + return lift { $0.collect(shouldEmit) } + } + + /// Collect values from `self`, and emit them if the predicate passes. + /// + /// When `self` completes any remaining values will be sent, regardless of the + /// collected values matching `shouldEmit` or not. + /// + /// If `self` completes without having emitted any value, an empty array would be + /// emitted, followed by the completion of the produced `Signal`. + /// + /// ```` + /// let (producer, observer) = SignalProducer.buffer(1) + /// + /// producer + /// .collect { values, value in value == 7 } + /// .startWithValues { print($0) } + /// + /// observer.send(value: 1) + /// observer.send(value: 1) + /// observer.send(value: 7) + /// observer.send(value: 7) + /// observer.send(value: 5) + /// observer.send(value: 6) + /// observer.sendCompleted() + /// + /// // Output: + /// // [1, 1] + /// // [7] + /// // [7, 5, 6] + /// ```` + /// + /// - parameters: + /// - shouldEmit: A closure to determine, when every time a new value is received, + /// whether the collected values should be emitted. The new value + /// is **not** included in the collected values, and is included when + /// the next value is received. + /// + /// - returns: A producer of arrays of values, as instructed by the `shouldEmit` + /// closure. + public func collect(_ shouldEmit: @escaping (_ collected: [Value], _ latest: Value) -> Bool) -> SignalProducer<[Value], Error> { + return lift { $0.collect(shouldEmit) } + } + + /// Forward all events onto the given scheduler, instead of whichever + /// scheduler they originally arrived upon. + /// + /// - parameters: + /// - scheduler: A scheduler to deliver events on. + /// + /// - returns: A producer that, when started, will yield `self` values on + /// provided scheduler. + public func observe(on scheduler: Scheduler) -> SignalProducer { + return lift { $0.observe(on: scheduler) } + } + + /// Combine the latest value of the receiver with the latest value from the + /// given producer. + /// + /// - note: The returned producer will not send a value until both inputs + /// have sent at least one value each. + /// + /// - note: If either producer is interrupted, the returned producer will + /// also be interrupted. + /// + /// - note: The returned producer will not complete until both inputs + /// complete. + /// + /// - parameters: + /// - other: A producer to combine `self`'s value with. + /// + /// - returns: A producer that, when started, will yield a tuple containing + /// values of `self` and given producer. + public func combineLatest(with other: Other) -> SignalProducer<(Value, Other.Value), Error> where Other.Error == Error { + return SignalProducer.combineLatest(self, other) + } + + /// Delay `value` and `completed` events by the given interval, forwarding + /// them on the given scheduler. + /// + /// - note: `failed` and `interrupted` events are always scheduled + /// immediately. + /// + /// - parameters: + /// - interval: Interval to delay `value` and `completed` events by. + /// - scheduler: A scheduler to deliver delayed events on. + /// + /// - returns: A producer that, when started, will delay `value` and + /// `completed` events and will yield them on given scheduler. + public func delay(_ interval: TimeInterval, on scheduler: DateScheduler) -> SignalProducer { + return lift { $0.delay(interval, on: scheduler) } + } + + /// Skip the first `count` values, then forward everything afterward. + /// + /// - parameters: + /// - count: A number of values to skip. + /// + /// - returns: A producer that, when started, will skip the first `count` + /// values, then forward everything afterward. + public func skip(first count: Int) -> SignalProducer { + return lift { $0.skip(first: count) } + } + + /// Treats all Events from the input producer as plain values, allowing them + /// to be manipulated just like any other value. + /// + /// In other words, this brings Events “into the monad.” + /// + /// - note: When a Completed or Failed event is received, the resulting + /// producer will send the Event itself and then complete. When an + /// `interrupted` event is received, the resulting producer will + /// send the `Event` itself and then interrupt. + /// + /// - returns: A producer that sends events as its values. + public func materialize() -> SignalProducer { + return lift { $0.materialize() } + } + + /// Forward the latest value from `self` with the value from `sampler` as a + /// tuple, only when `sampler` sends a `value` event. + /// + /// - note: If `sampler` fires before a value has been observed on `self`, + /// nothing happens. + /// + /// - parameters: + /// - sampler: A producer that will trigger the delivery of `value` event + /// from `self`. + /// + /// - returns: A producer that will send values from `self` and `sampler`, + /// sampled (possibly multiple times) by `sampler`, then complete + /// once both input producers have completed, or interrupt if + /// either input producer is interrupted. + public func sample(with sampler: Sampler) -> SignalProducer<(Value, Sampler.Value), Error> where Sampler.Error == NoError { + return liftLeft(Signal.sample(with:))(sampler.producer) + } + + /// Forward the latest value from `self` whenever `sampler` sends a `value` + /// event. + /// + /// - note: If `sampler` fires before a value has been observed on `self`, + /// nothing happens. + /// + /// - parameters: + /// - sampler: A producer that will trigger the delivery of `value` event + /// from `self`. + /// + /// - returns: A producer that, when started, will send values from `self`, + /// sampled (possibly multiple times) by `sampler`, then complete + /// once both input producers have completed, or interrupt if + /// either input producer is interrupted. + public func sample(on sampler: Sampler) -> SignalProducer where Sampler.Value == (), Sampler.Error == NoError { + return liftLeft(Signal.sample(on:))(sampler.producer) + } + + /// Forward the latest value from `samplee` with the value from `self` as a + /// tuple, only when `self` sends a `value` event. + /// This is like a flipped version of `sample(with:)`, but `samplee`'s + /// terminal events are completely ignored. + /// + /// - note: If `self` fires before a value has been observed on `samplee`, + /// nothing happens. + /// + /// - parameters: + /// - samplee: A producer whose latest value is sampled by `self`. + /// + /// - returns: A signal that will send values from `self` and `samplee`, + /// sampled (possibly multiple times) by `self`, then terminate + /// once `self` has terminated. **`samplee`'s terminated events + /// are ignored**. + public func withLatest(from samplee: Samplee) -> SignalProducer<(Value, Samplee.Value), Error> where Samplee.Error == NoError { + return liftRight(Signal.withLatest)(samplee.producer) + } + + /// Forwards events from `self` until `lifetime` ends, at which point the + /// returned producer will complete. + /// + /// - parameters: + /// - lifetime: A lifetime whose `ended` signal will cause the returned + /// producer to complete. + /// + /// - returns: A producer that will deliver events until `lifetime` ends. + public func take(during lifetime: Lifetime) -> SignalProducer { + return lift { $0.take(during: lifetime) } + } + + /// Forward events from `self` until `trigger` sends a `value` or `completed` + /// event, at which point the returned producer will complete. + /// + /// - parameters: + /// - trigger: A producer whose `value` or `completed` events will stop the + /// delivery of `value` events from `self`. + /// + /// - returns: A producer that will deliver events until `trigger` sends + /// `value` or `completed` events. + public func take(until trigger: Trigger) -> SignalProducer where Trigger.Value == (), Trigger.Error == NoError { + return liftRight(Signal.take(until:))(trigger.producer) + } + + /// Do not forward any values from `self` until `trigger` sends a `value` + /// or `completed`, at which point the returned producer behaves exactly + /// like `producer`. + /// + /// - parameters: + /// - trigger: A producer whose `value` or `completed` events will start + /// the deliver of events on `self`. + /// + /// - returns: A producer that will deliver events once the `trigger` sends + /// `value` or `completed` events. + public func skip(until trigger: Trigger) -> SignalProducer where Trigger.Value == (), Trigger.Error == NoError { + return liftRight(Signal.skip(until:))(trigger.producer) + } + + /// Forward events from `self` with history: values of the returned signal + /// are a tuples whose first member is the previous value and whose second member + /// is the current value. `initial` is supplied as the first member when `self` + /// sends its first value. + /// + /// - parameters: + /// - initial: A value that will be combined with the first value sent by + /// `self`. + /// + /// - returns: A signal that sends tuples that contain previous and current + /// sent values of `self`. + public func combinePrevious(_ initial: Value) -> SignalProducer<(Value, Value), Error> { + return lift { $0.combinePrevious(initial) } + } + + /// Forward events from `self` with history: values of the produced signal + /// are a tuples whose first member is the previous value and whose second member + /// is the current value. + /// + /// The produced `Signal` would not emit any tuple until it has received at least two + /// values. + /// + /// - returns: A producer that sends tuples that contain previous and current + /// sent values of `self`. + public func combinePrevious() -> SignalProducer<(Value, Value), Error> { + return lift { $0.combinePrevious() } + } + + /// Combine all values from `self`, and forward the final result. + /// + /// See `scan(_:_:)` if the resulting producer needs to forward also the partial + /// results. + /// + /// - parameters: + /// - initialResult: The value to use as the initial accumulating value. + /// - nextPartialResult: A closure that combines the accumulating value and the + /// latest value from `self`. The result would be used in the + /// next call of `nextPartialResult`, or emit to the returned + /// `Signal` when `self` completes. + /// + /// - returns: A producer that sends the final result as `self` completes. + public func reduce(_ initialResult: U, _ nextPartialResult: @escaping (U, Value) -> U) -> SignalProducer { + return lift { $0.reduce(initialResult, nextPartialResult) } + } + + /// Combine all values from `self`, and forward the final result. + /// + /// See `scan(into:_:)` if the resulting producer needs to forward also the partial + /// results. + /// + /// - parameters: + /// - initialResult: The value to use as the initial accumulating value. + /// - nextPartialResult: A closure that combines the accumulating value and the + /// latest value from `self`. The result would be used in the + /// next call of `nextPartialResult`, or emit to the returned + /// `Signal` when `self` completes. + /// + /// - returns: A producer that sends the final value as `self` completes. + public func reduce(into initialResult: U, _ nextPartialResult: @escaping (inout U, Value) -> Void) -> SignalProducer { + return lift { $0.reduce(into: initialResult, nextPartialResult) } + } + + /// Combine all values from `self`, and forward the partial results and the final + /// result. + /// + /// See `reduce(_:_:)` if the resulting producer needs to forward only the final + /// result. + /// + /// - parameters: + /// - initialResult: The value to use as the initial accumulating value. + /// - nextPartialResult: A closure that combines the accumulating value and the + /// latest value from `self`. The result would be forwarded, + /// and would be used in the next call of `nextPartialResult`. + /// + /// - returns: A producer that sends the partial results of the accumuation, and the + /// final result as `self` completes. + public func scan(_ initialResult: U, _ nextPartialResult: @escaping (U, Value) -> U) -> SignalProducer { + return lift { $0.scan(initialResult, nextPartialResult) } + } + + /// Combine all values from `self`, and forward the partial results and the final + /// result. + /// + /// See `reduce(into:_:)` if the resulting producer needs to forward only the final + /// result. + /// + /// - parameters: + /// - initialResult: The value to use as the initial accumulating value. + /// - nextPartialResult: A closure that combines the accumulating value and the + /// latest value from `self`. The result would be forwarded, + /// and would be used in the next call of `nextPartialResult`. + /// + /// - returns: A producer that sends the partial results of the accumuation, and the + /// final result as `self` completes. + public func scan(into initialResult: U, _ nextPartialResult: @escaping (inout U, Value) -> Void) -> SignalProducer { + return lift { $0.scan(into: initialResult, nextPartialResult) } + } + + /// Forward only values from `self` that are not considered equivalent to its + /// immediately preceding value. + /// + /// - note: The first value is always forwarded. + /// + /// - parameters: + /// - isEquivalent: A closure to determine whether two values are equivalent. + /// + /// - returns: A producer which conditionally forwards values from `self` + public func skipRepeats(_ isEquivalent: @escaping (Value, Value) -> Bool) -> SignalProducer { + return lift { $0.skipRepeats(isEquivalent) } + } + + /// Do not forward any value from `self` until `shouldContinue` returns `false`, at + /// which point the returned signal starts to forward values from `self`, including + /// the one leading to the toggling. + /// + /// - parameters: + /// - shouldContinue: A closure to determine whether the skipping should continue. + /// + /// - returns: A producer which conditionally forwards values from `self`. + public func skip(while shouldContinue: @escaping (Value) -> Bool) -> SignalProducer { + return lift { $0.skip(while: shouldContinue) } + } + + /// Forwards events from `self` until `replacement` begins sending events. + /// + /// - parameters: + /// - replacement: A producer to wait to wait for values from and start + /// sending them as a replacement to `self`'s values. + /// + /// - returns: A producer which passes through `value`, `failed`, and + /// `interrupted` events from `self` until `replacement` sends an + /// event, at which point the returned producer will send that + /// event and switch to passing through events from `replacement` + /// instead, regardless of whether `self` has sent events + /// already. + public func take(untilReplacement replacement: Replacement) -> SignalProducer where Replacement.Value == Value, Replacement.Error == Error { + return liftRight(Signal.take(untilReplacement:))(replacement.producer) + } + + /// Wait until `self` completes and then forward the final `count` values + /// on the returned producer. + /// + /// - parameters: + /// - count: Number of last events to send after `self` completes. + /// + /// - returns: A producer that receives up to `count` values from `self` + /// after `self` completes. + public func take(last count: Int) -> SignalProducer { + return lift { $0.take(last: count) } + } + + /// Forward any values from `self` until `shouldContinue` returns `false`, at which + /// point the produced `Signal` would complete. + /// + /// - parameters: + /// - shouldContinue: A closure to determine whether the forwarding of values should + /// continue. + /// + /// - returns: A producer which conditionally forwards values from `self`. + public func take(while shouldContinue: @escaping (Value) -> Bool) -> SignalProducer { + return lift { $0.take(while: shouldContinue) } + } + + /// Zip elements of two producers into pairs. The elements of any Nth pair + /// are the Nth elements of the two input producers. + /// + /// - parameters: + /// - other: A producer to zip values with. + /// + /// - returns: A producer that sends tuples of `self` and `otherProducer`. + public func zip(with other: Other) -> SignalProducer<(Value, Other.Value), Error> where Other.Error == Error { + return SignalProducer.zip(self, other) + } + + /// Apply an action to every value from `self`, and forward the value if the action + /// succeeds. If the action fails with an error, the produced `Signal` would propagate + /// the failure and terminate. + /// + /// - parameters: + /// - action: An action which yields a `Result`. + /// + /// - returns: A producer which forwards the values from `self` until the given action + /// fails. + public func attempt(_ action: @escaping (Value) -> Result<(), Error>) -> SignalProducer { + return lift { $0.attempt(action) } + } + + /// Apply a transform to every value from `self`, and forward the transformed value + /// if the action succeeds. If the action fails with an error, the produced `Signal` + /// would propagate the failure and terminate. + /// + /// - parameters: + /// - action: A transform which yields a `Result` of the transformed value or the + /// error. + /// + /// - returns: A producer which forwards the transformed values. + public func attemptMap(_ action: @escaping (Value) -> Result) -> SignalProducer { + return lift { $0.attemptMap(action) } + } + + /// Forward the latest value on `scheduler` after at least `interval` + /// seconds have passed since *the returned signal* last sent a value. + /// + /// If `self` always sends values more frequently than `interval` seconds, + /// then the returned signal will send a value every `interval` seconds. + /// + /// To measure from when `self` last sent a value, see `debounce`. + /// + /// - seealso: `debounce` + /// + /// - note: If multiple values are received before the interval has elapsed, + /// the latest value is the one that will be passed on. + /// + /// - note: If `self` terminates while a value is being throttled, that + /// value will be discarded and the returned producer will terminate + /// immediately. + /// + /// - note: If the device time changed backwards before previous date while + /// a value is being throttled, and if there is a new value sent, + /// the new value will be passed anyway. + /// + /// - parameters: + /// - interval: Number of seconds to wait between sent values. + /// - scheduler: A scheduler to deliver events on. + /// + /// - returns: A producer that sends values at least `interval` seconds + /// appart on a given scheduler. + public func throttle(_ interval: TimeInterval, on scheduler: DateScheduler) -> SignalProducer { + return lift { $0.throttle(interval, on: scheduler) } + } + + /// Conditionally throttles values sent on the receiver whenever + /// `shouldThrottle` is true, forwarding values on the given scheduler. + /// + /// - note: While `shouldThrottle` remains false, values are forwarded on the + /// given scheduler. If multiple values are received while + /// `shouldThrottle` is true, the latest value is the one that will + /// be passed on. + /// + /// - note: If the input signal terminates while a value is being throttled, + /// that value will be discarded and the returned signal will + /// terminate immediately. + /// + /// - note: If `shouldThrottle` completes before the receiver, and its last + /// value is `true`, the returned signal will remain in the throttled + /// state, emitting no further values until it terminates. + /// + /// - parameters: + /// - shouldThrottle: A boolean property that controls whether values + /// should be throttled. + /// - scheduler: A scheduler to deliver events on. + /// + /// - returns: A producer that sends values only while `shouldThrottle` is false. + public func throttle(while shouldThrottle: P, on scheduler: Scheduler) -> SignalProducer + where P.Value == Bool + { + // Using `Property.init(_:)` avoids capturing a strong reference + // to `shouldThrottle`, so that we don't extend its lifetime. + let shouldThrottle = Property(shouldThrottle) + + return lift { $0.throttle(while: shouldThrottle, on: scheduler) } + } + + /// Forward the latest value on `scheduler` after at least `interval` + /// seconds have passed since `self` last sent a value. + /// + /// If `self` always sends values more frequently than `interval` seconds, + /// then the returned signal will never send any values. + /// + /// To measure from when the *returned signal* last sent a value, see + /// `throttle`. + /// + /// - seealso: `throttle` + /// + /// - note: If multiple values are received before the interval has elapsed, + /// the latest value is the one that will be passed on. + /// + /// - note: If `self` terminates while a value is being debounced, + /// that value will be discarded and the returned producer will + /// terminate immediately. + /// + /// - parameters: + /// - interval: A number of seconds to wait before sending a value. + /// - scheduler: A scheduler to send values on. + /// + /// - returns: A producer that sends values that are sent from `self` at + /// least `interval` seconds apart. + public func debounce(_ interval: TimeInterval, on scheduler: DateScheduler) -> SignalProducer { + return lift { $0.debounce(interval, on: scheduler) } + } + + /// Forward events from `self` until `interval`. Then if producer isn't + /// completed yet, fails with `error` on `scheduler`. + /// + /// - note: If the interval is 0, the timeout will be scheduled immediately. + /// The producer must complete synchronously (or on a faster + /// scheduler) to avoid the timeout. + /// + /// - parameters: + /// - interval: Number of seconds to wait for `self` to complete. + /// - error: Error to send with `failed` event if `self` is not completed + /// when `interval` passes. + /// - scheduler: A scheduler to deliver error on. + /// + /// - returns: A producer that sends events for at most `interval` seconds, + /// then, if not `completed` - sends `error` with `failed` event + /// on `scheduler`. + public func timeout(after interval: TimeInterval, raising error: Error, on scheduler: DateScheduler) -> SignalProducer { + return lift { $0.timeout(after: interval, raising: error, on: scheduler) } + } +} + +extension SignalProducer where Value: OptionalProtocol { + /// Unwraps non-`nil` values and forwards them on the returned signal, `nil` + /// values are dropped. + /// + /// - returns: A producer that sends only non-nil values. + public func skipNil() -> SignalProducer { + return lift { $0.skipNil() } + } +} + +extension SignalProducer where Value: EventProtocol, Error == NoError { + /// The inverse of materialize(), this will translate a producer of `Event` + /// _values_ into a producer of those events themselves. + /// + /// - returns: A producer that sends values carried by `self` events. + public func dematerialize() -> SignalProducer { + return lift { $0.dematerialize() } + } +} + +extension SignalProducer where Error == NoError { + /// Promote a producer that does not generate failures into one that can. + /// + /// - note: This does not actually cause failers to be generated for the + /// given producer, but makes it easier to combine with other + /// producers that may fail; for example, with operators like + /// `combineLatestWith`, `zipWith`, `flatten`, etc. + /// + /// - parameters: + /// - _ An `ErrorType`. + /// + /// - returns: A producer that has an instantiatable `ErrorType`. + public func promoteError(_: F.Type = F.self) -> SignalProducer { + return lift { $0.promoteError(F.self) } + } + + /// Promote a producer that does not generate failures into one that can. + /// + /// - note: This does not actually cause failers to be generated for the + /// given producer, but makes it easier to combine with other + /// producers that may fail; for example, with operators like + /// `combineLatestWith`, `zipWith`, `flatten`, etc. + /// + /// - parameters: + /// - _ An `ErrorType`. + /// + /// - returns: A producer that has an instantiatable `ErrorType`. + public func promoteError(_: Error.Type = Error.self) -> SignalProducer { + return self + } + + /// Forward events from `self` until `interval`. Then if producer isn't + /// completed yet, fails with `error` on `scheduler`. + /// + /// - note: If the interval is 0, the timeout will be scheduled immediately. + /// The producer must complete synchronously (or on a faster + /// scheduler) to avoid the timeout. + /// + /// - parameters: + /// - interval: Number of seconds to wait for `self` to complete. + /// - error: Error to send with `failed` event if `self` is not completed + /// when `interval` passes. + /// - scheudler: A scheduler to deliver error on. + /// + /// - returns: A producer that sends events for at most `interval` seconds, + /// then, if not `completed` - sends `error` with `failed` event + /// on `scheduler`. + public func timeout( + after interval: TimeInterval, + raising error: NewError, + on scheduler: DateScheduler + ) -> SignalProducer { + return lift { $0.timeout(after: interval, raising: error, on: scheduler) } + } + + /// Apply a throwable action to every value from `self`, and forward the values + /// if the action succeeds. If the action throws an error, the produced `Signal` + /// would propagate the failure and terminate. + /// + /// - parameters: + /// - action: A throwable closure to perform an arbitrary action on the value. + /// + /// - returns: A producer which forwards the successful values of the given action. + public func attempt(_ action: @escaping (Value) throws -> Void) -> SignalProducer { + return lift { $0.attempt(action) } + } + + /// Apply a throwable action to every value from `self`, and forward the results + /// if the action succeeds. If the action throws an error, the produced `Signal` + /// would propagate the failure and terminate. + /// + /// - parameters: + /// - action: A throwable closure to perform an arbitrary action on the value, and + /// yield a result. + /// + /// - returns: A producer which forwards the successful results of the given action. + public func attemptMap(_ action: @escaping (Value) throws -> U) -> SignalProducer { + return lift { $0.attemptMap(action) } + } +} + +extension SignalProducer where Error == AnyError { + /// Apply a throwable action to every value from `self`, and forward the values + /// if the action succeeds. If the action throws an error, the produced `Signal` + /// would propagate the failure and terminate. + /// + /// - parameters: + /// - action: A throwable closure to perform an arbitrary action on the value. + /// + /// - returns: A producer which forwards the successful values of the given action. + public func attempt(_ action: @escaping (Value) throws -> Void) -> SignalProducer { + return lift { $0.attempt(action) } + } + + /// Apply a throwable transform to every value from `self`, and forward the results + /// if the action succeeds. If the transform throws an error, the produced `Signal` + /// would propagate the failure and terminate. + /// + /// - parameters: + /// - transform: A throwable transform. + /// + /// - returns: A producer which forwards the successfully transformed values. + public func attemptMap(_ transform: @escaping (Value) throws -> U) -> SignalProducer { + return lift { $0.attemptMap(transform) } + } +} + +extension SignalProducer where Value == Never { + /// Promote a signal that does not generate values, as indicated by `Never`, to be + /// a signal of the given type of value. + /// + /// - note: The promotion does not result in any value being generated. + /// + /// - parameters: + /// - _ The type of value to promote to. + /// + /// - returns: A signal that forwards all terminal events from `self`. + public func promoteValue(_: U.Type = U.self) -> SignalProducer { + return lift { $0.promoteValue(U.self) } + } + + /// Promote a signal that does not generate values, as indicated by `Never`, to be + /// a signal of the given type of value. + /// + /// - note: The promotion does not result in any value being generated. + /// + /// - parameters: + /// - _ The type of value to promote to. + /// + /// - returns: A signal that forwards all terminal events from `self`. + public func promoteValue(_: Value.Type = Value.self) -> SignalProducer { + return self + } +} + +extension SignalProducer where Value: Equatable { + /// Forward only values from `self` that are not equal to its immediately preceding + /// value. + /// + /// - note: The first value is always forwarded. + /// + /// - returns: A property which conditionally forwards values from `self`. + public func skipRepeats() -> SignalProducer { + return lift { $0.skipRepeats() } + } +} + +extension SignalProducer { + /// Forward only those values from `self` that have unique identities across + /// the set of all values that have been seen. + /// + /// - note: This causes the identities to be retained to check for + /// uniqueness. + /// + /// - parameters: + /// - transform: A closure that accepts a value and returns identity + /// value. + /// + /// - returns: A producer that sends unique values during its lifetime. + public func uniqueValues(_ transform: @escaping (Value) -> Identity) -> SignalProducer { + return lift { $0.uniqueValues(transform) } + } +} + +extension SignalProducer where Value: Hashable { + /// Forward only those values from `self` that are unique across the set of + /// all values that have been seen. + /// + /// - note: This causes the values to be retained to check for uniqueness. + /// Providing a function that returns a unique value for each sent + /// value can help you reduce the memory footprint. + /// + /// - returns: A producer that sends unique values during its lifetime. + public func uniqueValues() -> SignalProducer { + return lift { $0.uniqueValues() } + } +} + +extension SignalProducer { + /// Injects side effects to be performed upon the specified producer events. + /// + /// - note: In a composed producer, `starting` is invoked in the reverse + /// direction of the flow of events. + /// + /// - parameters: + /// - starting: A closure that is invoked before the producer is started. + /// - started: A closure that is invoked after the producer is started. + /// - event: A closure that accepts an event and is invoked on every + /// received event. + /// - failed: A closure that accepts error object and is invoked for + /// `failed` event. + /// - completed: A closure that is invoked for `completed` event. + /// - interrupted: A closure that is invoked for `interrupted` event. + /// - terminated: A closure that is invoked for any terminating event. + /// - disposed: A closure added as disposable when signal completes. + /// - value: A closure that accepts a value from `value` event. + /// + /// - returns: A producer with attached side-effects for given event cases. + public func on( + starting: (() -> Void)? = nil, + started: (() -> Void)? = nil, + event: ((ProducedSignal.Event) -> Void)? = nil, + failed: ((Error) -> Void)? = nil, + completed: (() -> Void)? = nil, + interrupted: (() -> Void)? = nil, + terminated: (() -> Void)? = nil, + disposed: (() -> Void)? = nil, + value: ((Value) -> Void)? = nil + ) -> SignalProducer { + return SignalProducer { () -> Instance in + let instance = self.producer.builder() + let signal = instance.producedSignal.on(event: event, + failed: failed, + completed: completed, + interrupted: interrupted, + terminated: terminated, + disposed: disposed, + value: value) + + return Instance(producedSignal: signal, + observerDidSetup: { starting?(); instance.observerDidSetup(); started?() }, + interruptHandle: instance.interruptHandle) + } + } + + /// Start the returned producer on the given `Scheduler`. + /// + /// - note: This implies that any side effects embedded in the producer will + /// be performed on the given scheduler as well. + /// + /// - note: Events may still be sent upon other schedulers — this merely + /// affects where the `start()` method is run. + /// + /// - parameters: + /// - scheduler: A scheduler to deliver events on. + /// + /// - returns: A producer that will deliver events on given `scheduler` when + /// started. + public func start(on scheduler: Scheduler) -> SignalProducer { + return SignalProducer { observer, lifetime in + lifetime += scheduler.schedule { + self.startWithSignal { signal, signalDisposable in + lifetime.observeEnded(signalDisposable.dispose) + signal.observe(observer) + } + } + } + } +} + +extension SignalProducer { + /// Combines the values of all the given producers, in the manner described by + /// `combineLatest(with:)`. + public static func combineLatest(_ a: A, _ b: B) -> SignalProducer<(Value, B.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error { + return .init { observer, lifetime in + flattenStart(lifetime, a.producer, b.producer) { Signal.combineLatest($0, $1).observe(observer) } + } + } + + /// Combines the values of all the given producers, in the manner described by + /// `combineLatest(with:)`. + public static func combineLatest(_ a: A, _ b: B, _ c: C) -> SignalProducer<(Value, B.Value, C.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error { + return .init { observer, lifetime in + flattenStart(lifetime, a.producer, b.producer, c.producer) { Signal.combineLatest($0, $1, $2).observe(observer) } + } + } + + /// Combines the values of all the given producers, in the manner described by + /// `combineLatest(with:)`. + public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D) -> SignalProducer<(Value, B.Value, C.Value, D.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error { + return .init { observer, lifetime in + flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer) { Signal.combineLatest($0, $1, $2, $3).observe(observer) } + } + } + + /// Combines the values of all the given producers, in the manner described by + /// `combineLatest(with:)`. + public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value), Error> where A.Value == Value, A.Error == Error , B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error { + return .init { observer, lifetime in + flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer) { Signal.combineLatest($0, $1, $2, $3, $4).observe(observer) } + } + } + + /// Combines the values of all the given producers, in the manner described by + /// `combineLatest(with:)`. + public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error { + return .init { observer, lifetime in + flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer) { Signal.combineLatest($0, $1, $2, $3, $4, $5).observe(observer) } + } + } + + /// Combines the values of all the given producers, in the manner described by + /// `combineLatest(with:)`. + public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error, G.Error == Error { + return .init { observer, lifetime in + flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer) { Signal.combineLatest($0, $1, $2, $3, $4, $5, $6).observe(observer) } + } + } + + /// Combines the values of all the given producers, in the manner described by + /// `combineLatest(with:)`. + public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error, G.Error == Error, H.Error == Error { + return .init { observer, lifetime in + flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer) { Signal.combineLatest($0, $1, $2, $3, $4, $5, $6, $7).observe(observer) } + } + } + + /// Combines the values of all the given producers, in the manner described by + /// `combineLatest(with:)`. + public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value, I.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error, G.Error == Error, H.Error == Error, I.Error == Error { + return .init { observer, lifetime in + flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer, i.producer) { Signal.combineLatest($0, $1, $2, $3, $4, $5, $6, $7, $8).observe(observer) } + } + } + + /// Combines the values of all the given producers, in the manner described by + /// `combineLatest(with:)`. + public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I, _ j: J) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value, I.Value, J.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error, G.Error == Error, H.Error == Error, I.Error == Error, J.Error == Error { + return .init { observer, lifetime in + flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer, i.producer, j.producer) { Signal.combineLatest($0, $1, $2, $3, $4, $5, $6, $7, $8, $9).observe(observer) } + } + } + + /// Combines the values of all the given producers, in the manner described by + /// `combineLatest(with:)`. Will return an empty `SignalProducer` if the sequence is empty. + public static func combineLatest(_ producers: S) -> SignalProducer<[Value], Error> where S.Iterator.Element: SignalProducerConvertible, S.Iterator.Element.Value == Value, S.Iterator.Element.Error == Error { + return start(producers, Signal.combineLatest) + } + + /// Zips the values of all the given producers, in the manner described by + /// `zip(with:)`. + public static func zip(_ a: A, _ b: B) -> SignalProducer<(Value, B.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error { + return .init { observer, lifetime in + flattenStart(lifetime, a.producer, b.producer) { Signal.zip($0, $1).observe(observer) } + } + } + + /// Zips the values of all the given producers, in the manner described by + /// `zip(with:)`. + public static func zip(_ a: A, _ b: B, _ c: C) -> SignalProducer<(Value, B.Value, C.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error { + return .init { observer, lifetime in + flattenStart(lifetime, a.producer, b.producer, c.producer) { Signal.zip($0, $1, $2).observe(observer) } + } + } + + /// Zips the values of all the given producers, in the manner described by + /// `zip(with:)`. + public static func zip(_ a: A, _ b: B, _ c: C, _ d: D) -> SignalProducer<(Value, B.Value, C.Value, D.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error { + return .init { observer, lifetime in + flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer) { Signal.zip($0, $1, $2, $3).observe(observer) } + } + } + + /// Zips the values of all the given producers, in the manner described by + /// `zip(with:)`. + public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error { + return .init { observer, lifetime in + flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer) { Signal.zip($0, $1, $2, $3, $4).observe(observer) } + } + } + + /// Zips the values of all the given producers, in the manner described by + /// `zip(with:)`. + public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error { + return .init { observer, lifetime in + flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer) { Signal.zip($0, $1, $2, $3, $4, $5).observe(observer) } + } + } + + /// Zips the values of all the given producers, in the manner described by + /// `zip(with:)`. + public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error, G.Error == Error { + return .init { observer, lifetime in + flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer) { Signal.zip($0, $1, $2, $3, $4, $5, $6).observe(observer) } + } + } + + /// Zips the values of all the given producers, in the manner described by + /// `zip(with:)`. + public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error, G.Error == Error, H.Error == Error { + return .init { observer, lifetime in + flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer) { Signal.zip($0, $1, $2, $3, $4, $5, $6, $7).observe(observer) } + } + } + + /// Zips the values of all the given producers, in the manner described by + /// `zip(with:)`. + public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value, I.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error, G.Error == Error, H.Error == Error, I.Error == Error { + return .init { observer, lifetime in + flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer, i.producer) { Signal.zip($0, $1, $2, $3, $4, $5, $6, $7, $8).observe(observer) } + } + } + + /// Zips the values of all the given producers, in the manner described by + /// `zip(with:)`. + public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I, _ j: J) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value, I.Value, J.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error, G.Error == Error, H.Error == Error, I.Error == Error, J.Error == Error { + return .init { observer, lifetime in + flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer, i.producer, j.producer) { Signal.zip($0, $1, $2, $3, $4, $5, $6, $7, $8, $9).observe(observer) } + } + } + + /// Zips the values of all the given producers, in the manner described by + /// `zipWith`. Will return an empty `SignalProducer` if the sequence is empty. + public static func zip(_ producers: S) -> SignalProducer<[Value], Error> where S.Iterator.Element: SignalProducerConvertible, S.Iterator.Element.Value == Value, S.Iterator.Element.Error == Error { + return start(producers, Signal.zip) + } + + private static func start(_ producers: S, _ transform: @escaping (ReversedRandomAccessCollection<[Signal]>) -> Signal<[Value], Error>) -> SignalProducer<[Value], Error> where S.Iterator.Element: SignalProducerConvertible, S.Iterator.Element.Value == Value, S.Iterator.Element.Error == Error { + return SignalProducer<[Value], Error> { observer, lifetime in + var producers = Array(producers) + var signals: [Signal] = [] + + guard !producers.isEmpty else { + observer.sendCompleted() + return + } + + func start() { + guard !producers.isEmpty else { + transform(signals.reversed()).observe(observer) + return + } + + producers.removeLast().producer.startWithSignal { signal, interruptHandle in + lifetime.observeEnded(interruptHandle.dispose) + signals.append(signal) + + start() + } + } + + start() + } + } +} + +extension SignalProducer { + /// Repeat `self` a total of `count` times. In other words, start producer + /// `count` number of times, each one after previously started producer + /// completes. + /// + /// - note: Repeating `1` time results in an equivalent signal producer. + /// + /// - note: Repeating `0` times results in a producer that instantly + /// completes. + /// + /// - precondition: `count` must be non-negative integer. + /// + /// - parameters: + /// - count: Number of repetitions. + /// + /// - returns: A signal producer start sequentially starts `self` after + /// previously started producer completes. + public func `repeat`(_ count: Int) -> SignalProducer { + precondition(count >= 0) + + if count == 0 { + return .empty + } else if count == 1 { + return producer + } + + return SignalProducer { observer, lifetime in + let serialDisposable = SerialDisposable() + lifetime += serialDisposable + + func iterate(_ current: Int) { + self.startWithSignal { signal, signalDisposable in + serialDisposable.inner = signalDisposable + + signal.observe { event in + if case .completed = event { + let remainingTimes = current - 1 + if remainingTimes > 0 { + iterate(remainingTimes) + } else { + observer.sendCompleted() + } + } else { + observer.action(event) + } + } + } + } + + iterate(count) + } + } + + /// Ignore failures up to `count` times. + /// + /// - precondition: `count` must be non-negative integer. + /// + /// - parameters: + /// - count: Number of retries. + /// + /// - returns: A signal producer that restarts up to `count` times. + public func retry(upTo count: Int) -> SignalProducer { + precondition(count >= 0) + + if count == 0 { + return producer + } else { + return flatMapError { _ in + self.retry(upTo: count - 1) + } + } + } + + /// Wait for completion of `self`, *then* forward all events from + /// `replacement`. Any failure or interruption sent from `self` is + /// forwarded immediately, in which case `replacement` will not be started, + /// and none of its events will be be forwarded. + /// + /// - note: All values sent from `self` are ignored. + /// + /// - parameters: + /// - replacement: A producer to start when `self` completes. + /// + /// - returns: A producer that sends events from `self` and then from + /// `replacement` when `self` completes. + public func then(_ replacement: SignalProducer) -> SignalProducer { + return _then(replacement.promoteError(Error.self)) + } + + /// Wait for completion of `self`, *then* forward all events from + /// `replacement`. Any failure or interruption sent from `self` is + /// forwarded immediately, in which case `replacement` will not be started, + /// and none of its events will be be forwarded. + /// + /// - note: All values sent from `self` are ignored. + /// + /// - parameters: + /// - replacement: A producer to start when `self` completes. + /// + /// - returns: A producer that sends events from `self` and then from + /// `replacement` when `self` completes. + public func then(_ replacement: SignalProducer) -> SignalProducer { + return _then(replacement) + } + + // NOTE: The overload below is added to disambiguate compile-time selection of + // `then(_:)`. + + /// Wait for completion of `self`, *then* forward all events from + /// `replacement`. Any failure or interruption sent from `self` is + /// forwarded immediately, in which case `replacement` will not be started, + /// and none of its events will be be forwarded. + /// + /// - note: All values sent from `self` are ignored. + /// + /// - parameters: + /// - replacement: A producer to start when `self` completes. + /// + /// - returns: A producer that sends events from `self` and then from + /// `replacement` when `self` completes. + public func then(_ replacement: SignalProducer) -> SignalProducer { + return _then(replacement) + } + + // NOTE: The method below is the shared implementation of `then(_:)`. The underscore + // prefix is added to avoid self referencing in `then(_:)` overloads with + // regard to the most specific rule of overload selection in Swift. + + internal func _then(_ replacement: SignalProducer) -> SignalProducer { + return SignalProducer { observer, lifetime in + self.startWithSignal { signal, signalDisposable in + lifetime += signalDisposable + + signal.observe { event in + switch event { + case let .failed(error): + observer.send(error: error) + case .completed: + lifetime += replacement.start(observer) + case .interrupted: + observer.sendInterrupted() + case .value: + break + } + } + } + } + } +} + +extension SignalProducer where Error == NoError { + /// Wait for completion of `self`, *then* forward all events from + /// `replacement`. + /// + /// - note: All values sent from `self` are ignored. + /// + /// - parameters: + /// - replacement: A producer to start when `self` completes. + /// + /// - returns: A producer that sends events from `self` and then from + /// `replacement` when `self` completes. + public func then(_ replacement: SignalProducer) -> SignalProducer { + return promoteError(NewError.self)._then(replacement) + } + + // NOTE: The overload below is added to disambiguate compile-time selection of + // `then(_:)`. + + /// Wait for completion of `self`, *then* forward all events from + /// `replacement`. + /// + /// - note: All values sent from `self` are ignored. + /// + /// - parameters: + /// - replacement: A producer to start when `self` completes. + /// + /// - returns: A producer that sends events from `self` and then from + /// `replacement` when `self` completes. + public func then(_ replacement: SignalProducer) -> SignalProducer { + return _then(replacement) + } +} + +extension SignalProducer { + /// Start the producer, then block, waiting for the first value. + /// + /// When a single value or error is sent, the returned `Result` will + /// represent those cases. However, when no values are sent, `nil` will be + /// returned. + /// + /// - returns: Result when single `value` or `failed` event is received. + /// `nil` when no events are received. + public func first() -> Result? { + return take(first: 1).single() + } + + /// Start the producer, then block, waiting for events: `value` and + /// `completed`. + /// + /// When a single value or error is sent, the returned `Result` will + /// represent those cases. However, when no values are sent, or when more + /// than one value is sent, `nil` will be returned. + /// + /// - returns: Result when single `value` or `failed` event is received. + /// `nil` when 0 or more than 1 events are received. + public func single() -> Result? { + let semaphore = DispatchSemaphore(value: 0) + var result: Result? + + take(first: 2).start { event in + switch event { + case let .value(value): + if result != nil { + // Move into failure state after recieving another value. + result = nil + return + } + result = .success(value) + case let .failed(error): + result = .failure(error) + semaphore.signal() + case .completed, .interrupted: + semaphore.signal() + } + } + + semaphore.wait() + return result + } + + /// Start the producer, then block, waiting for the last value. + /// + /// When a single value or error is sent, the returned `Result` will + /// represent those cases. However, when no values are sent, `nil` will be + /// returned. + /// + /// - returns: Result when single `value` or `failed` event is received. + /// `nil` when no events are received. + public func last() -> Result? { + return take(last: 1).single() + } + + /// Starts the producer, then blocks, waiting for completion. + /// + /// When a completion or error is sent, the returned `Result` will represent + /// those cases. + /// + /// - returns: Result when single `completion` or `failed` event is + /// received. + public func wait() -> Result<(), Error> { + return then(SignalProducer<(), Error>(value: ())).last() ?? .success(()) + } + + /// Creates a new `SignalProducer` that will multicast values emitted by + /// the underlying producer, up to `capacity`. + /// This means that all clients of this `SignalProducer` will see the same + /// version of the emitted values/errors. + /// + /// The underlying `SignalProducer` will not be started until `self` is + /// started for the first time. When subscribing to this producer, all + /// previous values (up to `capacity`) will be emitted, followed by any new + /// values. + /// + /// If you find yourself needing *the current value* (the last buffered + /// value) you should consider using `PropertyType` instead, which, unlike + /// this operator, will guarantee at compile time that there's always a + /// buffered value. This operator is not recommended in most cases, as it + /// will introduce an implicit relationship between the original client and + /// the rest, so consider alternatives like `PropertyType`, or representing + /// your stream using a `Signal` instead. + /// + /// This operator is only recommended when you absolutely need to introduce + /// a layer of caching in front of another `SignalProducer`. + /// + /// - precondition: `capacity` must be non-negative integer. + /// + /// - parameters: + /// - capacity: Number of values to hold. + /// + /// - returns: A caching producer that will hold up to last `capacity` + /// values. + public func replayLazily(upTo capacity: Int) -> SignalProducer { + precondition(capacity >= 0, "Invalid capacity: \(capacity)") + + // This will go "out of scope" when the returned `SignalProducer` goes + // out of scope. This lets us know when we're supposed to dispose the + // underlying producer. This is necessary because `struct`s don't have + // `deinit`. + let lifetimeToken = Lifetime.Token() + let lifetime = Lifetime(lifetimeToken) + + let state = Atomic(ReplayState(upTo: capacity)) + + let start: Atomic<(() -> Void)?> = Atomic { + // Start the underlying producer. + self + .take(during: lifetime) + .start { event in + let observers: Bag.Observer>? = state.modify { state in + defer { state.enqueue(event) } + return state.observers + } + observers?.forEach { $0.action(event) } + } + } + + return SignalProducer { observer, lifetime in + // Don't dispose of the original producer until all observers + // have terminated. + lifetime.observeEnded { _ = lifetimeToken } + + while true { + var result: Result.Observer>.Token?, ReplayError>! + state.modify { + result = $0.observe(observer) + } + + switch result! { + case let .success(token): + if let token = token { + lifetime.observeEnded { + state.modify { + $0.removeObserver(using: token) + } + } + } + + // Start the underlying producer if it has never been started. + start.swap(nil)?() + + // Terminate the replay loop. + return + + case let .failure(error): + error.values.forEach(observer.send(value:)) + } + } + } + } +} + +extension SignalProducer where Value == Bool { + /// Create a producer that computes a logical NOT in the latest values of `self`. + /// + /// - returns: A producer that emits the logical NOT results. + public func negate() -> SignalProducer { + return self.lift { $0.negate() } + } + + /// Create a producer that computes a logical AND between the latest values of `self` + /// and `producer`. + /// + /// - parameters: + /// - booleans: A producer of booleans to be combined with `self`. + /// + /// - returns: A producer that emits the logical AND results. + public func and(_ booleans: Booleans) -> SignalProducer where Booleans.Value == Value, Booleans.Error == Error { + return self.liftLeft(Signal.and)(booleans.producer) + } + + /// Create a producer that computes a logical OR between the latest values of `self` + /// and `producer`. + /// + /// - parameters: + /// - booleans: A producer of booleans to be combined with `self`. + /// + /// - returns: A producer that emits the logical OR results. + public func or(_ booleans: Booleans) -> SignalProducer where Booleans.Value == Value, Booleans.Error == Error { + return self.liftLeft(Signal.or)(booleans.producer) + } +} + +/// Represents a recoverable error of an observer not being ready for an +/// attachment to a `ReplayState`, and the observer should replay the supplied +/// values before attempting to observe again. +private struct ReplayError: Error { + /// The values that should be replayed by the observer. + let values: [Value] +} + +private struct ReplayState { + let capacity: Int + + /// All cached values. + var values: [Value] = [] + + /// A termination event emitted by the underlying producer. + /// + /// This will be nil if termination has not occurred. + var terminationEvent: Signal.Event? + + /// The observers currently attached to the caching producer, or `nil` if the + /// caching producer was terminated. + var observers: Bag.Observer>? = Bag() + + /// The set of in-flight replay buffers. + var replayBuffers: [ObjectIdentifier: [Value]] = [:] + + /// Initialize the replay state. + /// + /// - parameters: + /// - capacity: The maximum amount of values which can be cached by the + /// replay state. + init(upTo capacity: Int) { + self.capacity = capacity + } + + /// Attempt to observe the replay state. + /// + /// - warning: Repeatedly observing the replay state with the same observer + /// should be avoided. + /// + /// - parameters: + /// - observer: The observer to be registered. + /// + /// - returns: If the observer is successfully attached, a `Result.success` + /// with the corresponding removal token would be returned. + /// Otherwise, a `Result.failure` with a `ReplayError` would be + /// returned. + mutating func observe(_ observer: Signal.Observer) -> Result.Observer>.Token?, ReplayError> { + // Since the only use case is `replayLazily`, which always creates a unique + // `Observer` for every produced signal, we can use the ObjectIdentifier of + // the `Observer` to track them directly. + let id = ObjectIdentifier(observer) + + switch replayBuffers[id] { + case .none where !values.isEmpty: + // No in-flight replay buffers was found, but the `ReplayState` has one or + // more cached values in the `ReplayState`. The observer should replay + // them before attempting to observe again. + replayBuffers[id] = [] + return .failure(ReplayError(values: values)) + + case let .some(buffer) where !buffer.isEmpty: + // An in-flight replay buffer was found with one or more buffered values. + // The observer should replay them before attempting to observe again. + defer { replayBuffers[id] = [] } + return .failure(ReplayError(values: buffer)) + + case let .some(buffer) where buffer.isEmpty: + // Since an in-flight but empty replay buffer was found, the observer is + // ready to be attached to the `ReplayState`. + replayBuffers.removeValue(forKey: id) + + default: + // No values has to be replayed. The observer is ready to be attached to + // the `ReplayState`. + break + } + + if let event = terminationEvent { + observer.action(event) + } + + return .success(observers?.insert(observer)) + } + + /// Enqueue the supplied event to the replay state. + /// + /// - parameter: + /// - event: The event to be cached. + mutating func enqueue(_ event: Signal.Event) { + switch event { + case let .value(value): + for key in replayBuffers.keys { + replayBuffers[key]!.append(value) + } + + switch capacity { + case 0: + // With a capacity of zero, `state.values` can never be filled. + break + + case 1: + values = [value] + + default: + values.append(value) + + let overflow = values.count - capacity + if overflow > 0 { + values.removeFirst(overflow) + } + } + + case .completed, .failed, .interrupted: + // Disconnect all observers and prevent future attachments. + terminationEvent = event + observers = nil + } + } + + /// Remove the observer represented by the supplied token. + /// + /// - parameters: + /// - token: The token of the observer to be removed. + mutating func removeObserver(using token: Bag.Observer>.Token) { + observers?.remove(using: token) + } +} + +extension SignalProducer where Value == Date, Error == NoError { + /// Create a repeating timer of the given interval, with a reasonable default + /// leeway, sending updates on the given scheduler. + /// + /// - note: This timer will never complete naturally, so all invocations of + /// `start()` must be disposed to avoid leaks. + /// + /// - precondition: `interval` must be non-negative number. + /// + /// - note: If you plan to specify an `interval` value greater than 200,000 + /// seconds, use `timer(interval:on:leeway:)` instead + /// and specify your own `leeway` value to avoid potential overflow. + /// + /// - parameters: + /// - interval: An interval between invocations. + /// - scheduler: A scheduler to deliver events on. + /// + /// - returns: A producer that sends `NSDate` values every `interval` seconds. + public static func timer(interval: DispatchTimeInterval, on scheduler: DateScheduler) -> SignalProducer { + // Apple's "Power Efficiency Guide for Mac Apps" recommends a leeway of + // at least 10% of the timer interval. + return timer(interval: interval, on: scheduler, leeway: interval * 0.1) + } + + /// Creates a repeating timer of the given interval, sending updates on the + /// given scheduler. + /// + /// - note: This timer will never complete naturally, so all invocations of + /// `start()` must be disposed to avoid leaks. + /// + /// - precondition: `interval` must be non-negative number. + /// + /// - precondition: `leeway` must be non-negative number. + /// + /// - parameters: + /// - interval: An interval between invocations. + /// - scheduler: A scheduler to deliver events on. + /// - leeway: Interval leeway. Apple's "Power Efficiency Guide for Mac Apps" + /// recommends a leeway of at least 10% of the timer interval. + /// + /// - returns: A producer that sends `NSDate` values every `interval` seconds. + public static func timer(interval: DispatchTimeInterval, on scheduler: DateScheduler, leeway: DispatchTimeInterval) -> SignalProducer { + precondition(interval.timeInterval >= 0) + precondition(leeway.timeInterval >= 0) + + return SignalProducer { observer, lifetime in + let disposable = scheduler.schedule(after: scheduler.currentDate.addingTimeInterval(interval), + interval: interval, + leeway: leeway, + action: { observer.send(value: scheduler.currentDate) }) + if let d = disposable { lifetime.observeEnded(d.dispose)} + } + } +} diff --git a/Sample/Pods/ReactiveSwift/Sources/UnidirectionalBinding.swift b/Sample/Pods/ReactiveSwift/Sources/UnidirectionalBinding.swift new file mode 100644 index 00000000..5c811b03 --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/UnidirectionalBinding.swift @@ -0,0 +1,165 @@ +import Foundation +import Dispatch +import enum Result.NoError + +precedencegroup BindingPrecedence { + associativity: right + + // Binds tighter than assignment but looser than everything else + higherThan: AssignmentPrecedence +} + +infix operator <~ : BindingPrecedence + +// FIXME: Swift 4 - associated type arbitrary requirements +// public protocol BindingSource: SignalProducerConvertible where Error == NoError {} + +/// Describes a source which can be bound. +public protocol BindingSource: SignalProducerConvertible { + // FIXME: Swift 4 compiler regression. + // All requirements are replicated to workaround the type checker issue. + // https://bugs.swift.org/browse/SR-5090 + + associatedtype Value + associatedtype Error + + var producer: SignalProducer { get } +} +extension Signal: BindingSource {} +extension SignalProducer: BindingSource {} + +/// Describes an entity which be bond towards. +public protocol BindingTargetProvider { + associatedtype Value + + var bindingTarget: BindingTarget { get } +} + +extension BindingTargetProvider { + /// Binds a source to a target, updating the target's value to the latest + /// value sent by the source. + /// + /// - note: The binding will automatically terminate when the target is + /// deinitialized, or when the source sends a `completed` event. + /// + /// ```` + /// let property = MutableProperty(0) + /// let signal = Signal({ /* do some work after some time */ }) + /// property <~ signal + /// ```` + /// + /// ```` + /// let property = MutableProperty(0) + /// let signal = Signal({ /* do some work after some time */ }) + /// let disposable = property <~ signal + /// ... + /// // Terminates binding before property dealloc or signal's + /// // `completed` event. + /// disposable.dispose() + /// ```` + /// + /// - parameters: + /// - target: A target to be bond to. + /// - source: A source to bind. + /// + /// - returns: A disposable that can be used to terminate binding before the + /// deinitialization of the target or the source's `completed` + /// event. + @discardableResult + public static func <~ + + (provider: Self, source: Source) -> Disposable? + where Source.Value == Value, Source.Error == NoError + { + return source.producer + .take(during: provider.bindingTarget.lifetime) + .startWithValues(provider.bindingTarget.action) + } + + /// Binds a source to a target, updating the target's value to the latest + /// value sent by the source. + /// + /// - note: The binding will automatically terminate when the target is + /// deinitialized, or when the source sends a `completed` event. + /// + /// ```` + /// let property = MutableProperty(0) + /// let signal = Signal({ /* do some work after some time */ }) + /// property <~ signal + /// ```` + /// + /// ```` + /// let property = MutableProperty(0) + /// let signal = Signal({ /* do some work after some time */ }) + /// let disposable = property <~ signal + /// ... + /// // Terminates binding before property dealloc or signal's + /// // `completed` event. + /// disposable.dispose() + /// ```` + /// + /// - parameters: + /// - target: A target to be bond to. + /// - source: A source to bind. + /// + /// - returns: A disposable that can be used to terminate binding before the + /// deinitialization of the target or the source's `completed` + /// event. + @discardableResult + public static func <~ + + (provider: Self, source: Source) -> Disposable? + where Value == Source.Value?, Source.Error == NoError + { + return provider <~ source.producer.optionalize() + } +} + +/// A binding target that can be used with the `<~` operator. +public struct BindingTarget: BindingTargetProvider { + public let lifetime: Lifetime + public let action: (Value) -> Void + + public var bindingTarget: BindingTarget { + return self + } + + /// Creates a binding target which consumes values on the specified scheduler. + /// + /// If no scheduler is specified, the binding target would consume the value + /// immediately. + /// + /// - parameters: + /// - scheduler: The scheduler on which the `action` consumes the values. + /// - lifetime: The expected lifetime of any bindings towards `self`. + /// - action: The action to consume values. + public init(on scheduler: Scheduler = ImmediateScheduler(), lifetime: Lifetime, action: @escaping (Value) -> Void) { + self.lifetime = lifetime + + if scheduler is ImmediateScheduler { + self.action = action + } else { + self.action = { value in + scheduler.schedule { + action(value) + } + } + } + } + + #if swift(>=3.2) + /// Creates a binding target which consumes values on the specified scheduler. + /// + /// If no scheduler is specified, the binding target would consume the value + /// immediately. + /// + /// - parameters: + /// - scheduler: The scheduler on which the key path consumes the values. + /// - lifetime: The expected lifetime of any bindings towards `self`. + /// - object: The object to consume values. + /// - keyPath: The key path of the object that consumes values. + public init(on scheduler: Scheduler = ImmediateScheduler(), lifetime: Lifetime, object: Object, keyPath: WritableKeyPath) { + self.init(on: scheduler, lifetime: lifetime) { [weak object] in object?[keyPath: keyPath] = $0 } + } + #endif +} diff --git a/Sample/Pods/ReactiveSwift/Sources/ValidatingProperty.swift b/Sample/Pods/ReactiveSwift/Sources/ValidatingProperty.swift new file mode 100644 index 00000000..086d15f0 --- /dev/null +++ b/Sample/Pods/ReactiveSwift/Sources/ValidatingProperty.swift @@ -0,0 +1,327 @@ +import Result + +/// A mutable property that validates mutations before committing them. +/// +/// If the property wraps an arbitrary mutable property, changes originated from +/// the inner property are monitored, and would be automatically validated. +/// Note that these would still appear as committed values even if they fail the +/// validation. +/// +/// ``` +/// let root = MutableProperty("Valid") +/// let outer = ValidatingProperty(root) { +/// $0 == "Valid" ? .valid : .invalid(.outerInvalid) +/// } +/// +/// outer.result.value // `.valid("Valid") +/// +/// root.value = "🎃" +/// outer.result.value // `.invalid("🎃", .outerInvalid)` +/// ``` +public final class ValidatingProperty: MutablePropertyProtocol { + private let getter: () -> Value + private let setter: (Value) -> Void + + /// The result of the last attempted edit of the root property. + public let result: Property + + /// The current value of the property. + /// + /// The value could have failed the validation. Refer to `result` for the + /// latest validation result. + public var value: Value { + get { return getter() } + set { setter(newValue) } + } + + /// A producer for Signals that will send the property's current value, + /// followed by all changes over time, then complete when the property has + /// deinitialized. + public let producer: SignalProducer + + /// A signal that will send the property's changes over time, + /// then complete when the property has deinitialized. + public let signal: Signal + + /// The lifetime of the property. + public let lifetime: Lifetime + + /// Create a `ValidatingProperty` that presents a mutable validating + /// view for an inner mutable property. + /// + /// The proposed value is only committed when `valid` is returned by the + /// `validator` closure. + /// + /// - note: `inner` is retained by the created property. + /// + /// - parameters: + /// - inner: The inner property which validated values are committed to. + /// - validator: The closure to invoke for any proposed value to `self`. + public init( + _ inner: Inner, + _ validator: @escaping (Value) -> Decision + ) where Inner.Value == Value { + getter = { inner.value } + producer = inner.producer + signal = inner.signal + lifetime = inner.lifetime + + // This flag temporarily suspends the monitoring on the inner property for + // writebacks that are triggered by successful validations. + var isSettingInnerValue = false + + (result, setter) = inner.withValue { initial in + let mutableResult = MutableProperty(Result(initial, validator(initial))) + + mutableResult <~ inner.signal + .filter { _ in !isSettingInnerValue } + .map { Result($0, validator($0)) } + + return (Property(capturing: mutableResult), { input in + // Acquire the lock of `inner` to ensure no modification happens until + // the validation logic here completes. + inner.withValue { _ in + let writebackValue: Value? = mutableResult.modify { result in + result = Result(input, validator(input)) + return result.value + } + + if let value = writebackValue { + isSettingInnerValue = true + inner.value = value + isSettingInnerValue = false + } + } + }) + } + } + + /// Create a `ValidatingProperty` that validates mutations before + /// committing them. + /// + /// The proposed value is only committed when `valid` is returned by the + /// `validator` closure. + /// + /// - parameters: + /// - initial: The initial value of the property. It is not required to + /// pass the validation as specified by `validator`. + /// - validator: The closure to invoke for any proposed value to `self`. + public convenience init( + _ initial: Value, + _ validator: @escaping (Value) -> Decision + ) { + self.init(MutableProperty(initial), validator) + } + + /// Create a `ValidatingProperty` that presents a mutable validating + /// view for an inner mutable property. + /// + /// The proposed value is only committed when `valid` is returned by the + /// `validator` closure. + /// + /// - note: `inner` is retained by the created property. + /// + /// - parameters: + /// - inner: The inner property which validated values are committed to. + /// - other: The property that `validator` depends on. + /// - validator: The closure to invoke for any proposed value to `self`. + public convenience init( + _ inner: MutableProperty, + with other: Other, + _ validator: @escaping (Value, Other.Value) -> Decision + ) { + // Capture a copy that reflects `other` without influencing the lifetime of + // `other`. + let other = Property(other) + + self.init(inner) { input in + return validator(input, other.value) + } + + // When `other` pushes out a new value, the resulting property would react + // by revalidating itself with its last attempted value, regardless of + // success or failure. + other.signal + .take(during: lifetime) + .observeValues { [weak self] _ in + guard let s = self else { return } + + switch s.result.value { + case let .invalid(value, _): + s.value = value + + case let .coerced(_, value, _): + s.value = value + + case let .valid(value): + s.value = value + } + } + } + + /// Create a `ValidatingProperty` that validates mutations before + /// committing them. + /// + /// The proposed value is only committed when `valid` is returned by the + /// `validator` closure. + /// + /// - parameters: + /// - initial: The initial value of the property. It is not required to + /// pass the validation as specified by `validator`. + /// - other: The property that `validator` depends on. + /// - validator: The closure to invoke for any proposed value to `self`. + public convenience init( + _ initial: Value, + with other: Other, + _ validator: @escaping (Value, Other.Value) -> Decision + ) { + self.init(MutableProperty(initial), with: other, validator) + } + + /// Create a `ValidatingProperty` that presents a mutable validating + /// view for an inner mutable property. + /// + /// The proposed value is only committed when `valid` is returned by the + /// `validator` closure. + /// + /// - note: `inner` is retained by the created property. + /// + /// - parameters: + /// - inner: The inner property which validated values are committed to. + /// - other: The property that `validator` depends on. + /// - validator: The closure to invoke for any proposed value to `self`. + public convenience init( + _ inner: MutableProperty, + with other: ValidatingProperty, + _ validator: @escaping (Value, U) -> Decision + ) { + self.init(inner, with: other, validator) + } + + /// Create a `ValidatingProperty` that validates mutations before + /// committing them. + /// + /// The proposed value is only committed when `valid` is returned by the + /// `validator` closure. + /// + /// - parameters: + /// - initial: The initial value of the property. It is not required to + /// pass the validation as specified by `validator`. + /// - other: The property that `validator` depends on. + /// - validator: The closure to invoke for any proposed value to `self`. + public convenience init( + _ initial: Value, + with other: ValidatingProperty, + _ validator: @escaping (Value, U) -> Decision + ) { + // Capture only `other.result` but not `other`. + let otherValidations = other.result + + self.init(initial) { input in + let otherValue: U + + switch otherValidations.value { + case let .valid(value): + otherValue = value + + case let .coerced(_, value, _): + otherValue = value + + case let .invalid(value, _): + otherValue = value + } + + return validator(input, otherValue) + } + + // When `other` pushes out a new validation result, the resulting property + // would react by revalidating itself with its last attempted value, + // regardless of success or failure. + otherValidations.signal + .take(during: lifetime) + .observeValues { [weak self] _ in + guard let s = self else { return } + + switch s.result.value { + case let .invalid(value, _): + s.value = value + + case let .coerced(_, value, _): + s.value = value + + case let .valid(value): + s.value = value + } + } + } + + /// Represents a decision of a validator of a validating property made on a + /// proposed value. + public enum Decision { + /// The proposed value is valid. + case valid + + /// The proposed value is invalid, but the validator coerces it into a + /// replacement which it deems valid. + case coerced(Value, ValidationError?) + + /// The proposed value is invalid. + case invalid(ValidationError) + } + + /// Represents the result of the validation performed by a validating property. + public enum Result { + /// The proposed value is valid. + case valid(Value) + + /// The proposed value is invalid, but the validator was able to coerce it + /// into a replacement which it deemed valid. + case coerced(replacement: Value, proposed: Value, error: ValidationError?) + + /// The proposed value is invalid. + case invalid(Value, ValidationError) + + /// Whether the value is invalid. + public var isInvalid: Bool { + if case .invalid = self { + return true + } else { + return false + } + } + + /// Extract the valid value, or `nil` if the value is invalid. + public var value: Value? { + switch self { + case let .valid(value): + return value + case let .coerced(value, _, _): + return value + case .invalid: + return nil + } + } + + /// Extract the error if the value is invalid. + public var error: ValidationError? { + if case let .invalid(_, error) = self { + return error + } else { + return nil + } + } + + fileprivate init(_ value: Value, _ decision: Decision) { + switch decision { + case .valid: + self = .valid(value) + + case let .coerced(replacement, error): + self = .coerced(replacement: replacement, proposed: value, error: error) + + case let .invalid(error): + self = .invalid(value, error) + } + } + } +} diff --git a/Sample/Pods/Target Support Files/Moya-ObjectMapper/Info.plist b/Sample/Pods/Target Support Files/Moya-ObjectMapper/Info.plist index a7b58ed3..ecb8f033 100644 --- a/Sample/Pods/Target Support Files/Moya-ObjectMapper/Info.plist +++ b/Sample/Pods/Target Support Files/Moya-ObjectMapper/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.3.1 + 2.3.2 CFBundleSignature ???? CFBundleVersion diff --git a/Sample/Pods/Target Support Files/ObjectMapper/Info.plist b/Sample/Pods/Target Support Files/ObjectMapper/Info.plist index ce4ba6f8..d275f297 100644 --- a/Sample/Pods/Target Support Files/ObjectMapper/Info.plist +++ b/Sample/Pods/Target Support Files/ObjectMapper/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.2.5 + 2.2.8 CFBundleSignature ???? CFBundleVersion diff --git a/Sample/Pods/Target Support Files/ObjectMapper/ObjectMapper.xcconfig b/Sample/Pods/Target Support Files/ObjectMapper/ObjectMapper.xcconfig index c2b8915f..9d809b66 100644 --- a/Sample/Pods/Target Support Files/ObjectMapper/ObjectMapper.xcconfig +++ b/Sample/Pods/Target Support Files/ObjectMapper/ObjectMapper.xcconfig @@ -8,4 +8,4 @@ PODS_ROOT = ${SRCROOT} PODS_TARGET_SRCROOT = ${PODS_ROOT}/ObjectMapper PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES -SWIFT_VERSION = 3.0 +SWIFT_VERSION = 3.1 diff --git a/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-acknowledgements.markdown b/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-acknowledgements.markdown index 33337e29..f1197e5f 100644 --- a/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-acknowledgements.markdown +++ b/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-acknowledgements.markdown @@ -87,6 +87,29 @@ The above copyright notice and this permission notice shall be included in all c 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. +## ReactiveSwift + +**Copyright (c) 2012 - 2016, GitHub, Inc.** +**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. + + ## Result The MIT License (MIT) diff --git a/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-acknowledgements.plist b/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-acknowledgements.plist index 06ec5d4f..272a09bb 100644 --- a/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-acknowledgements.plist +++ b/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-acknowledgements.plist @@ -122,6 +122,35 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI Type PSGroupSpecifier + + FooterText + **Copyright (c) 2012 - 2016, GitHub, Inc.** +**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. + + License + MIT + Title + ReactiveSwift + Type + PSGroupSpecifier + FooterText The MIT License (MIT) diff --git a/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-frameworks.sh b/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-frameworks.sh index 3ab8ab7e..79744d9a 100755 --- a/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-frameworks.sh +++ b/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-frameworks.sh @@ -93,6 +93,7 @@ if [[ "$CONFIGURATION" == "Debug" ]]; then install_framework "$BUILT_PRODUCTS_DIR/Moya/Moya.framework" install_framework "$BUILT_PRODUCTS_DIR/Moya-ObjectMapper/Moya_ObjectMapper.framework" install_framework "$BUILT_PRODUCTS_DIR/ObjectMapper/ObjectMapper.framework" + install_framework "$BUILT_PRODUCTS_DIR/ReactiveSwift/ReactiveSwift.framework" install_framework "$BUILT_PRODUCTS_DIR/Result/Result.framework" install_framework "$BUILT_PRODUCTS_DIR/RxSwift/RxSwift.framework" fi @@ -101,6 +102,7 @@ if [[ "$CONFIGURATION" == "Release" ]]; then install_framework "$BUILT_PRODUCTS_DIR/Moya/Moya.framework" install_framework "$BUILT_PRODUCTS_DIR/Moya-ObjectMapper/Moya_ObjectMapper.framework" install_framework "$BUILT_PRODUCTS_DIR/ObjectMapper/ObjectMapper.framework" + install_framework "$BUILT_PRODUCTS_DIR/ReactiveSwift/ReactiveSwift.framework" install_framework "$BUILT_PRODUCTS_DIR/Result/Result.framework" install_framework "$BUILT_PRODUCTS_DIR/RxSwift/RxSwift.framework" fi diff --git a/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-resources.sh b/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-resources.sh index 4602c68a..aed060f0 100755 --- a/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-resources.sh +++ b/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-resources.sh @@ -21,6 +21,9 @@ case "${TARGETED_DEVICE_FAMILY}" in 3) TARGET_DEVICE_ARGS="--target-device tv" ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; *) TARGET_DEVICE_ARGS="--target-device mac" ;; diff --git a/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig b/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig index f6d584d1..5768e44a 100644 --- a/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig +++ b/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig @@ -1,10 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Moya" "$PODS_CONFIGURATION_BUILD_DIR/Moya-ObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/Result" "$PODS_CONFIGURATION_BUILD_DIR/RxSwift" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Moya" "$PODS_CONFIGURATION_BUILD_DIR/Moya-ObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/ReactiveSwift" "$PODS_CONFIGURATION_BUILD_DIR/Result" "$PODS_CONFIGURATION_BUILD_DIR/RxSwift" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Moya-ObjectMapper/Moya_ObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Moya/Moya.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper/ObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Result/Result.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RxSwift/RxSwift.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Moya" -framework "Moya_ObjectMapper" -framework "ObjectMapper" -framework "Result" -framework "RxSwift" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Moya-ObjectMapper/Moya_ObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Moya/Moya.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper/ObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ReactiveSwift/ReactiveSwift.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Result/Result.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RxSwift/RxSwift.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Moya" -framework "Moya_ObjectMapper" -framework "ObjectMapper" -framework "ReactiveSwift" -framework "Result" -framework "RxSwift" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods diff --git a/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo.release.xcconfig b/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo.release.xcconfig index f6d584d1..5768e44a 100644 --- a/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo.release.xcconfig +++ b/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo.release.xcconfig @@ -1,10 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Moya" "$PODS_CONFIGURATION_BUILD_DIR/Moya-ObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/Result" "$PODS_CONFIGURATION_BUILD_DIR/RxSwift" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Moya" "$PODS_CONFIGURATION_BUILD_DIR/Moya-ObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/ReactiveSwift" "$PODS_CONFIGURATION_BUILD_DIR/Result" "$PODS_CONFIGURATION_BUILD_DIR/RxSwift" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Moya-ObjectMapper/Moya_ObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Moya/Moya.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper/ObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Result/Result.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RxSwift/RxSwift.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Moya" -framework "Moya_ObjectMapper" -framework "ObjectMapper" -framework "Result" -framework "RxSwift" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Moya-ObjectMapper/Moya_ObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Moya/Moya.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper/ObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ReactiveSwift/ReactiveSwift.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Result/Result.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RxSwift/RxSwift.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Moya" -framework "Moya_ObjectMapper" -framework "ObjectMapper" -framework "ReactiveSwift" -framework "Result" -framework "RxSwift" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" PODS_BUILD_DIR = $BUILD_DIR PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods diff --git a/Sample/Pods/Target Support Files/ReactiveSwift/Info.plist b/Sample/Pods/Target Support Files/ReactiveSwift/Info.plist new file mode 100644 index 00000000..0a12077e --- /dev/null +++ b/Sample/Pods/Target Support Files/ReactiveSwift/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 2.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-dummy.m b/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-dummy.m new file mode 100644 index 00000000..2f7b75cf --- /dev/null +++ b/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_ReactiveSwift : NSObject +@end +@implementation PodsDummy_ReactiveSwift +@end diff --git a/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-prefix.pch b/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-prefix.pch new file mode 100644 index 00000000..beb2a244 --- /dev/null +++ b/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-prefix.pch @@ -0,0 +1,12 @@ +#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/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-umbrella.h b/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-umbrella.h new file mode 100644 index 00000000..20aed9e4 --- /dev/null +++ b/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-umbrella.h @@ -0,0 +1,16 @@ +#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 ReactiveSwiftVersionNumber; +FOUNDATION_EXPORT const unsigned char ReactiveSwiftVersionString[]; + diff --git a/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift.modulemap b/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift.modulemap new file mode 100644 index 00000000..0e321871 --- /dev/null +++ b/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift.modulemap @@ -0,0 +1,6 @@ +framework module ReactiveSwift { + umbrella header "ReactiveSwift-umbrella.h" + + export * + module * { export * } +} diff --git a/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift.xcconfig b/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift.xcconfig new file mode 100644 index 00000000..b960e9cb --- /dev/null +++ b/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift.xcconfig @@ -0,0 +1,12 @@ +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/ReactiveSwift +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Result" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +OTHER_SWIFT_FLAGS[config=Release] = -suppress-warnings +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/ReactiveSwift +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/Sample/Pods/Target Support Files/RxSwift/RxSwift 2.xcconfig b/Sample/Pods/Target Support Files/RxSwift/RxSwift 2.xcconfig new file mode 100644 index 00000000..8b032edd --- /dev/null +++ b/Sample/Pods/Target Support Files/RxSwift/RxSwift 2.xcconfig @@ -0,0 +1,10 @@ +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/RxSwift +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +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}/RxSwift +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES From 6adabc6245007e2a3e737d02976b75ff75269dbf Mon Sep 17 00:00:00 2001 From: Alberto Salas Date: Wed, 23 Aug 2017 16:38:39 +0200 Subject: [PATCH 2/6] Compile error with Moya.TargetType fixed --- Sample/Demo/GitHubAPI.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sample/Demo/GitHubAPI.swift b/Sample/Demo/GitHubAPI.swift index 43a4f063..661dd531 100755 --- a/Sample/Demo/GitHubAPI.swift +++ b/Sample/Demo/GitHubAPI.swift @@ -52,6 +52,9 @@ extension GitHub: TargetType { return nil } } + public var parameterEncoding: ParameterEncoding { + return URLEncoding.default + } public var task: Task { return .request } From d21a1d075b1f7908983229f7fc02c785956355f5 Mon Sep 17 00:00:00 2001 From: Alberto Salas Date: Wed, 23 Aug 2017 17:07:29 +0200 Subject: [PATCH 3/6] Added ReactiveSwift 9.0.0-alpha support --- Moya-ObjectMapper.podspec | 14 +++++++------- .../SignalProducer+ObjectMapper.swift | 18 +++++++++--------- 2 files changed, 16 insertions(+), 16 deletions(-) rename Source/{ReactiveCocoa => ReactiveSwift}/SignalProducer+ObjectMapper.swift (55%) diff --git a/Moya-ObjectMapper.podspec b/Moya-ObjectMapper.podspec index bbc40149..1c9de452 100755 --- a/Moya-ObjectMapper.podspec +++ b/Moya-ObjectMapper.podspec @@ -22,7 +22,7 @@ Pod::Spec.new do |s| s.subspec "Core" do |ss| ss.source_files = "Source/*.swift" - ss.dependency "Moya", '~> 8.0' + ss.dependency "Moya", '~> 9.0.0-alpha.1' ss.dependency "ObjectMapper", '~> 2.2' ss.framework = "Foundation" end @@ -34,10 +34,10 @@ Pod::Spec.new do |s| ss.dependency "RxSwift", '~> 3.1' end - # s.subspec "ReactiveCocoa" do |ss| - # ss.source_files = "Source/ReactiveCocoa/*.swift" - # ss.dependency "Moya/ReactiveCocoa" - # ss.dependency "Moya-ObjectMapper/Core" - # ss.dependency "ReactiveSwift" - # end + s.subspec "ReactiveSwift" do |ss| + ss.source_files = "Source/ReactiveSwift/*.swift" + ss.dependency "Moya/ReactiveSwift" + ss.dependency "Moya-ObjectMapper/Core" + ss.dependency "ReactiveSwift", '~> 2.0' + end end diff --git a/Source/ReactiveCocoa/SignalProducer+ObjectMapper.swift b/Source/ReactiveSwift/SignalProducer+ObjectMapper.swift similarity index 55% rename from Source/ReactiveCocoa/SignalProducer+ObjectMapper.swift rename to Source/ReactiveSwift/SignalProducer+ObjectMapper.swift index 6f78c979..df4de81b 100755 --- a/Source/ReactiveCocoa/SignalProducer+ObjectMapper.swift +++ b/Source/ReactiveSwift/SignalProducer+ObjectMapper.swift @@ -3,31 +3,31 @@ import Moya import ObjectMapper /// Extension for processing Responses into Mappable objects through ObjectMapper -extension SignalProducerProtocol where Value == Moya.Response, Error == Moya.Error { +extension SignalProducerProtocol where Value == Moya.Response, Error == MoyaError { /// Maps data received from the signal into an object which implements the Mappable protocol. /// If the conversion fails, the signal errors. - public func mapObject(_ type: T.Type, context: MapContext? = nil) -> SignalProducer { - return producer.flatMap(.Latest) { response -> SignalProducer in - return unwrapThrowable { try response.mapObject(T, context) } + public func mapObject(_ type: T.Type) -> SignalProducer { + return producer.flatMap(.latest) { response -> SignalProducer in + return unwrapThrowable { try response.mapObject(T.self) } } } /// Maps data received from the signal into an array of objects which implement the Mappable /// protocol. /// If the conversion fails, the signal errors. - public func mapArray(_ type: T.Type, context: MapContext? = nil) -> SignalProducer<[T], Error> { - return producer.flatMap(.Latest) { response -> SignalProducer<[T], Error> in - return unwrapThrowable { try response.mapArray(T, context) } + public func mapArray(_ type: T.Type) -> SignalProducer<[T], MoyaError> { + return producer.flatMap(.latest) { response -> SignalProducer<[T], Error> in + return unwrapThrowable { try response.mapArray(T.self) } } } } /// Maps throwable to SignalProducer -private func unwrapThrowable(_ throwable: () throws -> T) -> SignalProducer { +private func unwrapThrowable(_ throwable: () throws -> T) -> SignalProducer { do { return SignalProducer(value: try throwable()) } catch { - return SignalProducer(error: error as! Moya.Error) + return SignalProducer(error: error as! MoyaError) } } From 39c6ad608bafd0fb38b098640f284e1489e32000 Mon Sep 17 00:00:00 2001 From: Alberto Salas Date: Wed, 23 Aug 2017 17:15:37 +0200 Subject: [PATCH 4/6] Updated README.md to add ReactiveSwift --- README.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 99ca2e40..460ddbe5 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,15 @@ pod 'RxSwift' ``` +The subspec if you want to use the bindings over ReactiveSwift. + +```ruby +pod 'Moya-ObjectMapper/ReactiveSwift' +pod 'Moya' +pod 'ReactiveSwift' + +``` + # Usage Create a `Class` or `Struct` which implements the `Mappable` protocol. @@ -54,7 +63,7 @@ struct Repository: Mappable { } ``` -## 1. Without RxSwift +## 1. Without RxSwift/ReactiveSwift ```swift @@ -103,6 +112,23 @@ GitHubProvider.request(.userRepositories(username)) }.addDisposableTo(disposeBag) ``` +## 3. With ReactiveSwift + +```swift +GitHubProvider.request(.userRepositories(username)) + .mapArray(Repository.self) + .start() { event -> Void in + switch event { + case .value(let repos): + self.repos = repos + case .failed(let error): + print(error) + default: + break + } + } +``` + # Contributing Issues and pull requests are welcome! From 248448113078b01ff4337176446dba95b0da6ebe Mon Sep 17 00:00:00 2001 From: Alberto Salas Date: Sun, 27 Aug 2017 21:12:01 +0200 Subject: [PATCH 5/6] Update pods --- Moya-ObjectMapper.podspec | 4 +- Sample/Podfile | 22 +- Sample/Podfile.lock | 39 +- Sample/Pods/Alamofire/README.md | 185 +- Sample/Pods/Alamofire/Source/Alamofire.swift | 2 +- .../Alamofire/Source/MultipartFormData.swift | 2 +- .../Source/NetworkReachabilityManager.swift | 23 +- .../Alamofire/Source/ParameterEncoding.swift | 5 +- Sample/Pods/Alamofire/Source/Request.swift | 4 +- .../Source/ResponseSerialization.swift | 3 +- Sample/Pods/Alamofire/Source/Result.swift | 99 +- .../Alamofire/Source/SessionDelegate.swift | 16 +- .../Alamofire/Source/SessionManager.swift | 8 + .../Moya-ObjectMapper.podspec.json | 17 +- .../Pods/Local Podspecs/RxSwift.podspec.json | 27 - Sample/Pods/Manifest.lock | 39 +- Sample/Pods/Moya/Readme.md | 26 +- Sample/Pods/Moya/Sources/Moya/Endpoint.swift | 4 +- .../Sources/Moya/MoyaProvider+Defaults.swift | 14 +- .../Sources/Moya/MoyaProvider+Internal.swift | 2 +- .../Moya/Plugins/NetworkActivityPlugin.swift | 2 +- .../Pods/Moya/Sources/Moya/TargetType.swift | 2 +- .../Sources/RxMoya/Observable+Response.swift | 84 - .../Moya/Sources/RxMoya/RxMoyaProvider.swift | 72 - Sample/Pods/Pods.xcodeproj/project.pbxproj | 2456 ++++----------- Sample/Pods/ReactiveSwift/LICENSE.md | 19 - Sample/Pods/ReactiveSwift/README.md | 161 - .../Pods/ReactiveSwift/Sources/Action.swift | 339 --- .../Pods/ReactiveSwift/Sources/Atomic.swift | 289 -- Sample/Pods/ReactiveSwift/Sources/Bag.swift | 102 - .../Sources/Deprecations+Removals.swift | 198 -- .../ReactiveSwift/Sources/Disposable.swift | 364 --- Sample/Pods/ReactiveSwift/Sources/Event.swift | 180 -- .../ReactiveSwift/Sources/EventLogger.swift | 139 - .../Pods/ReactiveSwift/Sources/Flatten.swift | 952 ------ .../Sources/FoundationExtensions.swift | 168 -- .../Sources/InhabitableTypeGuards.swift | 132 - .../Pods/ReactiveSwift/Sources/Lifetime.swift | 110 - .../Pods/ReactiveSwift/Sources/Observer.swift | 122 - .../Pods/ReactiveSwift/Sources/Optional.swift | 42 - .../Pods/ReactiveSwift/Sources/Property.swift | 771 ----- .../Pods/ReactiveSwift/Sources/Reactive.swift | 33 - .../Sources/ResultExtensions.swift | 13 - .../ReactiveSwift/Sources/Scheduler.swift | 563 ---- .../Pods/ReactiveSwift/Sources/Signal.swift | 2655 ----------------- .../Sources/SignalProducer.swift | 2301 -------------- .../Sources/UnidirectionalBinding.swift | 165 - .../Sources/ValidatingProperty.swift | 327 -- Sample/Pods/Result/Result/Result.swift | 11 +- .../Pods/Result/Result/ResultProtocol.swift | 13 +- Sample/Pods/RxSwift/LICENSE.md | 9 - .../RxSwift/Platform/DataStructures/Bag.swift | 187 -- .../DataStructures/InfiniteSequence.swift | 26 - .../DataStructures/PriorityQueue.swift | 112 - .../Platform/DataStructures/Queue.swift | 152 - .../Platform/DispatchQueue+Extensions.swift | 21 - .../RxSwift/Platform/Platform.Darwin.swift | 66 - .../RxSwift/Platform/Platform.Linux.swift | 105 - .../Pods/RxSwift/Platform/RecursiveLock.swift | 34 - Sample/Pods/RxSwift/README.md | 207 -- Sample/Pods/RxSwift/RxSwift/AnyObserver.swift | 72 - Sample/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 - .../SynchronizedSubscribeType.swift | 18 - .../SynchronizedUnsubscribeType.swift | 13 - .../RxSwift/ConnectableObservableType.swift | 19 - Sample/Pods/RxSwift/RxSwift/Deprecated.swift | 49 - Sample/Pods/RxSwift/RxSwift/Disposable.swift | 13 - .../Disposables/AnonymousDisposable.swift | 61 - .../Disposables/BinaryDisposable.swift | 53 - .../Disposables/BooleanDisposable.swift | 33 - .../Disposables/CompositeDisposable.swift | 151 - .../RxSwift/Disposables/Disposables.swift | 13 - .../RxSwift/Disposables/DisposeBag.swift | 84 - .../RxSwift/Disposables/DisposeBase.swift | 22 - .../RxSwift/Disposables/NopDisposable.swift | 32 - .../Disposables/RefCountDisposable.swift | 117 - .../Disposables/ScheduledDisposable.swift | 50 - .../Disposables/SerialDisposable.swift | 75 - .../SingleAssignmentDisposable.swift | 76 - .../Disposables/SubscriptionDisposable.swift | 21 - Sample/Pods/RxSwift/RxSwift/Errors.swift | 52 - Sample/Pods/RxSwift/RxSwift/Event.swift | 106 - .../RxSwift/RxSwift/Extensions/Bag+Rx.swift | 62 - .../RxSwift/Extensions/String+Rx.swift | 22 - .../RxSwift/RxSwift/GroupedObservable.swift | 37 - .../RxSwift/ImmediateSchedulerType.swift | 36 - Sample/Pods/RxSwift/RxSwift/Observable.swift | 44 - .../RxSwift/ObservableConvertibleType.swift | 18 - .../RxSwift/ObservableType+Extensions.swift | 117 - .../Pods/RxSwift/RxSwift/ObservableType.swift | 50 - .../Observables/Implementations/AddRef.swift | 45 - .../Observables/Implementations/Amb.swift | 124 - .../Implementations/AnonymousObservable.swift | 67 - .../Observables/Implementations/AsMaybe.swift | 49 - .../Implementations/AsSingle.swift | 52 - .../Observables/Implementations/Buffer.swift | 119 - .../Observables/Implementations/Catch.swift | 160 - .../CombineLatest+Collection.swift | 126 - .../Implementations/CombineLatest+arity.swift | 843 ------ .../Implementations/CombineLatest.swift | 132 - .../Observables/Implementations/Concat.swift | 61 - .../ConnectableObservable.swift | 108 - .../Implementations/Debounce.swift | 102 - .../Observables/Implementations/Debug.swift | 86 - .../Implementations/DefaultIfEmpty.swift | 51 - .../Implementations/Deferred.swift | 59 - .../Observables/Implementations/Delay.swift | 164 - .../Implementations/DelaySubscription.swift | 49 - .../Implementations/Dematerialize.swift | 39 - .../DistinctUntilChanged.swift | 68 - .../Observables/Implementations/Do.swift | 64 - .../Implementations/ElementAt.swift | 78 - .../Observables/Implementations/Empty.swift | 14 - .../Observables/Implementations/Error.swift | 20 - .../Observables/Implementations/Filter.swift | 56 - .../Implementations/Generate.swift | 69 - .../Observables/Implementations/GroupBy.swift | 119 - .../Observables/Implementations/Just.swift | 60 - .../Observables/Implementations/Map.swift | 143 - .../Implementations/Materialize.swift | 33 - .../Observables/Implementations/Merge.swift | 437 --- .../Implementations/Multicast.swift | 69 - .../Observables/Implementations/Never.swift | 13 - .../Implementations/ObserveOn.swift | 127 - .../ObserveOnSerialDispatchQueue.swift | 85 - .../Implementations/Optional.swift | 68 - .../Implementations/Producer.swift | 98 - .../Observables/Implementations/Range.swift | 57 - .../Observables/Implementations/Reduce.swift | 72 - .../Implementations/RefCount.swift | 86 - .../Observables/Implementations/Repeat.swift | 42 - .../Implementations/RetryWhen.swift | 151 - .../Observables/Implementations/Sample.swift | 122 - .../Observables/Implementations/Scan.swift | 63 - .../Implementations/Sequence.swift | 48 - .../Implementations/ShareReplay1.swift | 104 - .../ShareReplay1WhileConnected.swift | 155 - .../Implementations/SingleAsync.swift | 75 - .../Observables/Implementations/Sink.swift | 81 - .../Observables/Implementations/Skip.swift | 126 - .../Implementations/SkipUntil.swift | 123 - .../Implementations/SkipWhile.swift | 115 - .../Implementations/StartWith.swift | 26 - .../Implementations/SubscribeOn.swift | 60 - .../Observables/Implementations/Switch.swift | 191 -- .../Implementations/SwitchIfEmpty.swift | 90 - .../Observables/Implementations/Take.swift | 142 - .../Implementations/TakeLast.swift | 60 - .../Implementations/TakeUntil.swift | 115 - .../Implementations/TakeWhile.swift | 130 - .../Implementations/Throttle.swift | 143 - .../Observables/Implementations/Timeout.swift | 120 - .../Observables/Implementations/Timer.swift | 71 - .../Observables/Implementations/ToArray.swift | 48 - .../Observables/Implementations/Using.swift | 75 - .../Observables/Implementations/Window.swift | 152 - .../Implementations/WithLatestFrom.swift | 121 - .../Implementations/Zip+Collection.swift | 137 - .../Implementations/Zip+arity.swift | 948 ------ .../Observables/Implementations/Zip.swift | 155 - .../Observables/Observable+Aggregate.swift | 59 - .../Observables/Observable+Binding.swift | 179 -- .../Observables/Observable+Concurrency.swift | 58 - .../Observables/Observable+Creation.swift | 226 -- .../Observables/Observable+Debug.swift | 26 - .../Observables/Observable+Multiple.swift | 402 --- .../Observables/Observable+Single.swift | 256 -- ...Observable+StandardSequenceOperators.swift | 320 -- .../RxSwift/Observables/Observable+Time.swift | 258 -- .../Pods/RxSwift/RxSwift/ObserverType.swift | 40 - .../RxSwift/Observers/AnonymousObserver.swift | 32 - .../RxSwift/Observers/ObserverBase.swift | 34 - .../RxSwift/Observers/TailRecursiveSink.swift | 150 - Sample/Pods/RxSwift/RxSwift/Reactive.swift | 74 - Sample/Pods/RxSwift/RxSwift/Rx.swift | 67 - .../Pods/RxSwift/RxSwift/RxMutableBox.swift | 27 - .../Pods/RxSwift/RxSwift/SchedulerType.swift | 71 - .../ConcurrentDispatchQueueScheduler.swift | 82 - .../Schedulers/ConcurrentMainScheduler.swift | 88 - .../Schedulers/CurrentThreadScheduler.swift | 136 - .../Schedulers/HistoricalScheduler.swift | 22 - .../HistoricalSchedulerTimeConverter.swift | 67 - .../Schedulers/ImmediateScheduler.swift | 35 - .../Internal/AnonymousInvocable.swift | 19 - .../Internal/DispatchQueueConfiguration.swift | 104 - .../Internal/InvocableScheduledItem.swift | 22 - .../Schedulers/Internal/InvocableType.swift | 17 - .../Schedulers/Internal/ScheduledItem.swift | 35 - .../Internal/ScheduledItemType.swift | 13 - .../RxSwift/Schedulers/MainScheduler.swift | 68 - .../Schedulers/OperationQueueScheduler.swift | 50 - .../Schedulers/RecursiveScheduler.swift | 226 -- .../SchedulerServices+Emulation.swift | 61 - .../SerialDispatchQueueScheduler.swift | 123 - .../Schedulers/VirtualTimeConverterType.swift | 95 - .../Schedulers/VirtualTimeScheduler.swift | 269 -- .../RxSwift/Subjects/AsyncSubject.swift | 146 - .../RxSwift/Subjects/BehaviorSubject.swift | 159 - .../RxSwift/Subjects/PublishSubject.swift | 142 - .../RxSwift/Subjects/ReplaySubject.swift | 273 -- .../RxSwift/Subjects/SubjectType.swift | 21 - .../RxSwift/RxSwift/Subjects/Variable.swift | 72 - .../Traits/PrimitiveSequence+Zip+arity.swift | 276 -- .../RxSwift/Traits/PrimitiveSequence.swift | 661 ---- .../Target Support Files/Alamofire/Info.plist | 2 +- .../Moya-ObjectMapper.xcconfig | 2 +- .../Pods/Target Support Files/Moya/Info.plist | 2 +- .../Target Support Files/Moya/Moya.xcconfig | 2 +- .../Pods-Demo-acknowledgements.markdown | 35 - .../Pods-Demo-acknowledgements.plist | 47 - .../Pods-Demo/Pods-Demo-frameworks.sh | 4 - .../Pods-Demo/Pods-Demo.debug.xcconfig | 6 +- .../Pods-Demo/Pods-Demo.release.xcconfig | 6 +- .../ReactiveSwift/Info.plist | 26 - .../ReactiveSwift/ReactiveSwift-dummy.m | 5 - .../ReactiveSwift/ReactiveSwift-prefix.pch | 12 - .../ReactiveSwift/ReactiveSwift-umbrella.h | 16 - .../ReactiveSwift/ReactiveSwift.modulemap | 6 - .../ReactiveSwift/ReactiveSwift.xcconfig | 12 - .../Target Support Files/Result/Info.plist | 2 +- .../Target Support Files/RxSwift/Info.plist | 26 - .../RxSwift/RxSwift 2.xcconfig | 10 - .../RxSwift/RxSwift-dummy.m | 5 - .../RxSwift/RxSwift-prefix.pch | 12 - .../RxSwift/RxSwift-umbrella.h | 16 - .../RxSwift/RxSwift.modulemap | 6 - .../RxSwift/RxSwift.xcconfig | 10 - 232 files changed, 970 insertions(+), 29091 deletions(-) delete mode 100644 Sample/Pods/Local Podspecs/RxSwift.podspec.json delete mode 100644 Sample/Pods/Moya/Sources/RxMoya/Observable+Response.swift delete mode 100644 Sample/Pods/Moya/Sources/RxMoya/RxMoyaProvider.swift delete mode 100644 Sample/Pods/ReactiveSwift/LICENSE.md delete mode 100644 Sample/Pods/ReactiveSwift/README.md delete mode 100644 Sample/Pods/ReactiveSwift/Sources/Action.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/Atomic.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/Bag.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/Deprecations+Removals.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/Disposable.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/Event.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/EventLogger.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/Flatten.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/FoundationExtensions.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/InhabitableTypeGuards.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/Lifetime.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/Observer.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/Optional.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/Property.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/Reactive.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/ResultExtensions.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/Scheduler.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/Signal.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/SignalProducer.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/UnidirectionalBinding.swift delete mode 100644 Sample/Pods/ReactiveSwift/Sources/ValidatingProperty.swift delete mode 100644 Sample/Pods/RxSwift/LICENSE.md delete mode 100644 Sample/Pods/RxSwift/Platform/DataStructures/Bag.swift delete mode 100644 Sample/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift delete mode 100644 Sample/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift delete mode 100644 Sample/Pods/RxSwift/Platform/DataStructures/Queue.swift delete mode 100644 Sample/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift delete mode 100644 Sample/Pods/RxSwift/Platform/Platform.Darwin.swift delete mode 100644 Sample/Pods/RxSwift/Platform/Platform.Linux.swift delete mode 100644 Sample/Pods/RxSwift/Platform/RecursiveLock.swift delete mode 100644 Sample/Pods/RxSwift/README.md delete mode 100644 Sample/Pods/RxSwift/RxSwift/AnyObserver.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Cancelable.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Concurrency/Lock.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Concurrency/SynchronizedSubscribeType.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/ConnectableObservableType.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Deprecated.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Disposable.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Disposables/Disposables.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Errors.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Event.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/GroupedObservable.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observable.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/ObservableType.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/AddRef.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Amb.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/AnonymousObservable.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/AsMaybe.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/AsSingle.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Buffer.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Catch.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+Collection.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+arity.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Concat.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ConnectableObservable.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Debounce.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Debug.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/DefaultIfEmpty.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Deferred.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Delay.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/DelaySubscription.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Dematerialize.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/DistinctUntilChanged.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Do.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ElementAt.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Empty.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Error.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Filter.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Generate.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/GroupBy.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Just.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Map.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Materialize.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Merge.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Multicast.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Never.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOn.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOnSerialDispatchQueue.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Optional.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Producer.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Range.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Reduce.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/RefCount.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Repeat.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/RetryWhen.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Sample.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Scan.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Sequence.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1WhileConnected.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SingleAsync.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Sink.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Skip.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SkipUntil.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SkipWhile.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/StartWith.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SubscribeOn.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Switch.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SwitchIfEmpty.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Take.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/TakeLast.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/TakeUntil.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/TakeWhile.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Throttle.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Timeout.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Timer.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ToArray.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Using.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Window.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/WithLatestFrom.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+Collection.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+arity.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Zip.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Observable+Aggregate.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Observable+Binding.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Observable+Concurrency.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Observable+Creation.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Observable+Debug.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Observable+Multiple.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Observable+Single.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Observable+StandardSequenceOperators.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observables/Observable+Time.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/ObserverType.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Reactive.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Rx.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/RxMutableBox.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/SchedulerType.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Schedulers/ImmediateScheduler.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/AnonymousInvocable.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Subjects/AsyncSubject.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Subjects/BehaviorSubject.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Subjects/PublishSubject.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Subjects/ReplaySubject.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Subjects/SubjectType.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Subjects/Variable.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence+Zip+arity.swift delete mode 100644 Sample/Pods/RxSwift/RxSwift/Traits/PrimitiveSequence.swift delete mode 100644 Sample/Pods/Target Support Files/ReactiveSwift/Info.plist delete mode 100644 Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-dummy.m delete mode 100644 Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-prefix.pch delete mode 100644 Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-umbrella.h delete mode 100644 Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift.modulemap delete mode 100644 Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift.xcconfig delete mode 100644 Sample/Pods/Target Support Files/RxSwift/Info.plist delete mode 100644 Sample/Pods/Target Support Files/RxSwift/RxSwift 2.xcconfig delete mode 100644 Sample/Pods/Target Support Files/RxSwift/RxSwift-dummy.m delete mode 100644 Sample/Pods/Target Support Files/RxSwift/RxSwift-prefix.pch delete mode 100644 Sample/Pods/Target Support Files/RxSwift/RxSwift-umbrella.h delete mode 100644 Sample/Pods/Target Support Files/RxSwift/RxSwift.modulemap delete mode 100644 Sample/Pods/Target Support Files/RxSwift/RxSwift.xcconfig diff --git a/Moya-ObjectMapper.podspec b/Moya-ObjectMapper.podspec index 1c9de452..b2472943 100755 --- a/Moya-ObjectMapper.podspec +++ b/Moya-ObjectMapper.podspec @@ -22,7 +22,7 @@ Pod::Spec.new do |s| s.subspec "Core" do |ss| ss.source_files = "Source/*.swift" - ss.dependency "Moya", '~> 9.0.0-alpha.1' + ss.dependency "Moya" ss.dependency "ObjectMapper", '~> 2.2' ss.framework = "Foundation" end @@ -36,7 +36,7 @@ Pod::Spec.new do |s| s.subspec "ReactiveSwift" do |ss| ss.source_files = "Source/ReactiveSwift/*.swift" - ss.dependency "Moya/ReactiveSwift" + ss.dependency "Moya/ReactiveSwift", '~> 9.0.0-alpha.1' ss.dependency "Moya-ObjectMapper/Core" ss.dependency "ReactiveSwift", '~> 2.0' end diff --git a/Sample/Podfile b/Sample/Podfile index e8ba9e21..068c063e 100755 --- a/Sample/Podfile +++ b/Sample/Podfile @@ -5,20 +5,20 @@ use_frameworks! # Our Libraries def libraries pod 'Moya-ObjectMapper', :path => "../" - #pod 'Moya-ObjectMapper/ReactiveCocoa', :path => "../" - pod 'Moya-ObjectMapper/RxSwift', :path => "../" - pod 'ObjectMapper', '~> 2.2' - pod 'Moya', '~> 8.0' - pod 'ReactiveSwift', '~> 2.0' - pod 'RxSwift', '~> 3.4' + #pod 'Moya-ObjectMapper/ReactiveSwift', :path => "../" + #pod 'Moya-ObjectMapper/RxSwift', :path => "../" + #pod 'ObjectMapper', :git => 'https://github.com/Hearst-DD/ObjectMapper' + #pod 'Moya' #, :git => 'https://github.com/Moya/Moya' + #pod 'ReactiveSwift', :git => 'https://github.com/ReactiveCocoa/ReactiveSwift' + #pod 'RxSwift' #, :git => 'https://github.com/ReactiveX/RxSwift' end # Test Libraries -#def test_pods -# pod 'Quick' -# pod 'Nimble' -# pod 'OHHTTPStubs' -#end +def test_pods + pod 'Quick' + pod 'Nimble' + pod 'OHHTTPStubs' +end target 'Demo' do platform :ios, '9.0' diff --git a/Sample/Podfile.lock b/Sample/Podfile.lock index 00ec9b19..3ac2123a 100644 --- a/Sample/Podfile.lock +++ b/Sample/Podfile.lock @@ -1,49 +1,32 @@ PODS: - - Alamofire (4.4.0) - - Moya (8.0.3): - - Moya/Core (= 8.0.3) + - Alamofire (4.5.0) + - Moya (8.0.5): + - Moya/Core (= 8.0.5) - Moya-ObjectMapper (2.3.2): - Moya-ObjectMapper/Core (= 2.3.2) - Moya-ObjectMapper/Core (2.3.2): - - Moya (~> 8.0) + - Moya - ObjectMapper (~> 2.2) - - Moya-ObjectMapper/RxSwift (2.3.2): - - Moya-ObjectMapper/Core - - Moya/RxSwift - - RxSwift (~> 3.1) - - Moya/Core (8.0.3): + - Moya/Core (8.0.5): - Alamofire (~> 4.1) - Result (~> 3.0) - - Moya/RxSwift (8.0.3): - - Moya/Core - - RxSwift (~> 3.0) - ObjectMapper (2.2.8) - - ReactiveSwift (2.0.0): - - Result (~> 3.2) - - Result (3.2.1) - - RxSwift (3.4.0) + - Result (3.2.3) DEPENDENCIES: - - Moya (~> 8.0) - Moya-ObjectMapper (from `../`) - - Moya-ObjectMapper/RxSwift (from `../`) - - ObjectMapper (~> 2.2) - - ReactiveSwift (~> 2.0) - - RxSwift (~> 3.4) EXTERNAL SOURCES: Moya-ObjectMapper: :path: ../ SPEC CHECKSUMS: - Alamofire: dc44b1600b800eb63da6a19039a0083d62a6a62d - Moya: d3721622e3cc0cc2f038d69a258686f0b66e7252 - Moya-ObjectMapper: 46bd1bd986886858c4461b06b6ae1ea368869dc3 + Alamofire: f28cdffd29de33a7bfa022cbd63ae95a27fae140 + Moya: c37eec09a098ba9991b5a963b291fc5704bdb9ef + Moya-ObjectMapper: 6796feb29c8a1761722b96ea5ffa6893b6e0c15b ObjectMapper: 3d571bb5af471c779e1160828cd9ad5c4ef90958 - ReactiveSwift: 36339167e571774d936482d0f6512f5118a74731 - Result: 2453a22e5c5b11c0c3a478736e82cd02f763b781 - RxSwift: 3789a1af753002a14edecdb698a2424624296a9c + Result: 128640a6347e8d2ae48b142556739a2d13f90ce6 -PODFILE CHECKSUM: fa24202d17cb64cbe41dd1aeeeb63487d11721c1 +PODFILE CHECKSUM: b48a2cd0c99cd97066deb40b55e6cf4a8a900bec COCOAPODS: 1.2.1 diff --git a/Sample/Pods/Alamofire/README.md b/Sample/Pods/Alamofire/README.md index 12ea4c74..e1966fdc 100644 --- a/Sample/Pods/Alamofire/README.md +++ b/Sample/Pods/Alamofire/README.md @@ -57,8 +57,8 @@ 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.1+ -- Swift 3.0+ +- Xcode 8.1, 8.2, 8.3, and 9.0 +- Swift 3.0, 3.1, 3.2, and 4.0 ## Migration Guides @@ -137,21 +137,21 @@ dependencies: [ ### Manually -If you prefer not to use either of the aforementioned dependency managers, you can integrate Alamofire into your project 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 -``` + $ git init + ``` - Add Alamofire as a git [submodule](http://git-scm.com/docs/git-submodule) by running the following command: ```bash -$ git submodule add https://github.com/Alamofire/Alamofire.git -``` + $ 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. @@ -191,13 +191,16 @@ Handling the `Response` of a `Request` made in Alamofire involves chaining a res ```swift Alamofire.request("https://httpbin.org/get").responseJSON { response in - print(response.request) // original URL request - print(response.response) // HTTP URL response - print(response.data) // server data - print(response.result) // result of response serialization + print("Request: \(String(describing: response.request))") // original url request + print("Response: \(String(describing: response.response))") // http url response + print("Result: \(response.result)") // response serialization result - if let JSON = response.result.value { - print("JSON: \(JSON)") + if let json = response.result.value { + print("JSON: \(json)") // serialized json response + } + + if let data = response.data, let utf8Text = String(data: data, encoding: .utf8) { + print("Data: \(utf8Text)") // original server data as UTF8 string } } ``` @@ -243,7 +246,7 @@ func responsePropertyList( None of the response handlers perform any validation of the `HTTPURLResponse` it gets back from the server. -> For example, response status codes in the `400..<499` and `500..<599` ranges do NOT automatically trigger an `Error`. Alamofire uses [Response Validation](#response-validation) method chaining to achieve this. +> For example, response status codes in the `400..<500` and `500..<600` ranges do NOT automatically trigger an `Error`. Alamofire uses [Response Validation](#response-validation) method chaining to achieve this. #### Response Handler @@ -345,18 +348,18 @@ Alamofire.request("https://httpbin.org/get") .validate(statusCode: 200..<300) .validate(contentType: ["application/json"]) .responseData { response in - switch response.result { - case .success: - print("Validation Successful") - case .failure(let error): - print(error) - } + switch response.result { + case .success: + print("Validation Successful") + case .failure(let error): + print(error) + } } ``` #### Automatic Validation -Automatically validates status code within `200...299` range, and that the `Content-Type` header of the response matches the `Accept` header of the request, if one is provided. +Automatically validates status code within `200..<300` range, and that the `Content-Type` header of the response matches the `Accept` header of the request, if one is provided. ```swift Alamofire.request("https://httpbin.org/get").validate().responseJSON { response in @@ -491,7 +494,7 @@ struct JSONStringArrayEncoding: ParameterEncoding { } func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = urlRequest.urlRequest + var urlRequest = try urlRequest.asURLRequest() let data = try JSONSerialization.data(withJSONObject: array, options: []) @@ -612,9 +615,9 @@ Requests made in Alamofire that fetch data from a server can download the data i ```swift Alamofire.download("https://httpbin.org/image/png").responseData { response in - if let data = response.result.value { - let image = UIImage(data: data) - } + if let data = response.result.value { + let image = UIImage(data: data) + } } ``` @@ -629,8 +632,8 @@ You can also provide a `DownloadFileDestination` closure to move the file from t ```swift let destination: DownloadRequest.DownloadFileDestination = { _, _ in - let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] - let fileURL = documentsURL.appendPathComponent("pig.png") + let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] + let fileURL = documentsURL.appendingPathComponent("pig.png") return (fileURL, [.removePreviousFile, .createIntermediateDirectories]) } @@ -638,16 +641,16 @@ let destination: DownloadRequest.DownloadFileDestination = { _, _ in Alamofire.download(urlString, to: destination).response { response in print(response) - if response.error == nil, let imagePath = response.destinationURL?.path { - let image = UIImage(contentsOfFile: imagePath) - } + if response.error == nil, let imagePath = response.destinationURL?.path { + let image = UIImage(contentsOfFile: imagePath) + } } ``` You can also use the suggested download destination API. ```swift -let destination = DownloadRequest.suggestedDownloadDestination(directory: .documentDirectory) +let destination = DownloadRequest.suggestedDownloadDestination(for: .documentDirectory) Alamofire.download("https://httpbin.org/image/png", to: destination) ``` @@ -661,9 +664,9 @@ Alamofire.download("https://httpbin.org/image/png") print("Download Progress: \(progress.fractionCompleted)") } .responseData { response in - if let data = response.result.value { - let image = UIImage(data: data) - } + if let data = response.result.value { + let image = UIImage(data: data) + } } ``` @@ -677,9 +680,9 @@ Alamofire.download("https://httpbin.org/image/png") print("Download Progress: \(progress.fractionCompleted)") } .responseData { response in - if let data = response.result.value { - let image = UIImage(data: data) - } + if let data = response.result.value { + let image = UIImage(data: data) + } } ``` @@ -691,34 +694,34 @@ If a `DownloadRequest` is cancelled or interrupted, the underlying URL session m ```swift class ImageRequestor { - private var resumeData: Data? - private var image: UIImage? + private var resumeData: Data? + private var image: UIImage? func fetchImage(completion: (UIImage?) -> Void) { - guard image == nil else { completion(image) ; return } + guard image == nil else { completion(image) ; return } - let destination: DownloadRequest.DownloadFileDestination = { _, _ in - let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] - let fileURL = documentsURL.appendPathComponent("pig.png") + let destination: DownloadRequest.DownloadFileDestination = { _, _ in + let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] + let fileURL = documentsURL.appendingPathComponent("pig.png") - return (fileURL, [.removePreviousFile, .createIntermediateDirectories]) - } + return (fileURL, [.removePreviousFile, .createIntermediateDirectories]) + } - let request: DownloadRequest + let request: DownloadRequest if let resumeData = resumeData { - request = Alamofire.download(resumingWith: resumeData) - } else { - request = Alamofire.download("https://httpbin.org/image/png") + request = Alamofire.download(resumingWith: resumeData) + } else { + request = Alamofire.download("https://httpbin.org/image/png") } request.responseData { response in - switch response.result { - case .success(let data): - self.image = UIImage(data: data) - case .failure: - self.resumeData = response.resumeData - } + switch response.result { + case .success(let data): + self.image = UIImage(data: data) + case .failure: + self.resumeData = response.resumeData + } } } } @@ -816,7 +819,7 @@ In iOS and tvOS 10 and macOS 10.12, Apple introduced the new [URLSessionTaskMetr ```swift Alamofire.request("https://httpbin.org/get").responseJSON { response in - print(response.metrics) + print(response.metrics) } ``` @@ -824,8 +827,8 @@ It's important to note that these APIs are only available on iOS and tvOS 10 and ```swift Alamofire.request("https://httpbin.org/get").responseJSON { response in - if #available(iOS 10.0. *) { - print(response.metrics) + if #available(iOS 10.0, *) { + print(response.metrics) } } ``` @@ -854,10 +857,10 @@ Outputs: ```bash $ curl -i \ - -H "User-Agent: Alamofire/4.0.0" \ - -H "Accept-Encoding: gzip;q=1.0, compress;q=0.5" \ - -H "Accept-Language: en;q=1.0,fr;q=0.9,de;q=0.8,zh-Hans;q=0.7,zh-Hant;q=0.6,ja;q=0.5" \ - "https://httpbin.org/get?foo=bar" + -H "User-Agent: Alamofire/4.0.0" \ + -H "Accept-Encoding: gzip;q=1.0, compress;q=0.5" \ + -H "Accept-Language: en;q=1.0,fr;q=0.9,de;q=0.8,zh-Hans;q=0.7,zh-Hant;q=0.6,ja;q=0.5" \ + "https://httpbin.org/get?foo=bar" ``` --- @@ -1183,20 +1186,20 @@ The `RequestAdapter` protocol allows each `Request` made on a `SessionManager` t ```swift class AccessTokenAdapter: RequestAdapter { - private let accessToken: String + private let accessToken: String - init(accessToken: String) { - self.accessToken = accessToken - } + init(accessToken: String) { + self.accessToken = accessToken + } - func adapt(_ urlRequest: URLRequest) throws -> URLRequest { - var urlRequest = urlRequest + func adapt(_ urlRequest: URLRequest) throws -> URLRequest { + var urlRequest = urlRequest if let urlString = urlRequest.url?.absoluteString, urlString.hasPrefix("https://httpbin.org") { - urlRequest.setValue("Bearer " + accessToken, forHTTPHeaderField: "Authorization") - } + urlRequest.setValue("Bearer " + accessToken, forHTTPHeaderField: "Authorization") + } - return urlRequest + return urlRequest } } ``` @@ -1414,7 +1417,7 @@ func loadUser(completionHandler: @escaping (DataResponse) -> Void) -> Alam } loadUser { response in - if let user = userResponse.value { + if let user = response.value { print("User: { username: \(user.username), name: \(user.name) }") } } @@ -1749,24 +1752,24 @@ If you run into this problem (high probability with self-signed certificates), y ```xml - NSAppTransportSecurity - - NSExceptionDomains - - example.com - - NSExceptionAllowsInsecureHTTPLoads - - NSExceptionRequiresForwardSecrecy - - NSIncludesSubdomains - - - NSTemporaryExceptionMinimumTLSVersion - TLSv1.2 - - - + NSAppTransportSecurity + + NSExceptionDomains + + example.com + + NSExceptionAllowsInsecureHTTPLoads + + NSExceptionRequiresForwardSecrecy + + NSIncludesSubdomains + + + NSTemporaryExceptionMinimumTLSVersion + TLSv1.2 + + + ``` @@ -1851,4 +1854,4 @@ The community adoption of the ASF libraries has been amazing. We are greatly hum ## License -Alamofire is released under the MIT license. See LICENSE for details. +Alamofire is released under the MIT license. [See LICENSE](https://github.com/Alamofire/Alamofire/blob/master/LICENSE) for details. diff --git a/Sample/Pods/Alamofire/Source/Alamofire.swift b/Sample/Pods/Alamofire/Source/Alamofire.swift index 86d54d85..edcf717c 100644 --- a/Sample/Pods/Alamofire/Source/Alamofire.swift +++ b/Sample/Pods/Alamofire/Source/Alamofire.swift @@ -53,7 +53,7 @@ extension URL: URLConvertible { } extension URLComponents: URLConvertible { - /// Returns a URL if `url` is not nil, otherise throws an `Error`. + /// Returns a URL if `url` is not nil, otherwise throws an `Error`. /// /// - throws: An `AFError.invalidURL` if `url` is `nil`. /// diff --git a/Sample/Pods/Alamofire/Source/MultipartFormData.swift b/Sample/Pods/Alamofire/Source/MultipartFormData.swift index 6d0d5560..c5093f9f 100644 --- a/Sample/Pods/Alamofire/Source/MultipartFormData.swift +++ b/Sample/Pods/Alamofire/Source/MultipartFormData.swift @@ -92,7 +92,7 @@ open class MultipartFormData { // MARK: - Properties /// The `Content-Type` header value containing the boundary used to generate the `multipart/form-data`. - open var contentType: String { return "multipart/form-data; boundary=\(boundary)" } + 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 } } diff --git a/Sample/Pods/Alamofire/Source/NetworkReachabilityManager.swift b/Sample/Pods/Alamofire/Source/NetworkReachabilityManager.swift index 888818df..30443b99 100644 --- a/Sample/Pods/Alamofire/Source/NetworkReachabilityManager.swift +++ b/Sample/Pods/Alamofire/Source/NetworkReachabilityManager.swift @@ -182,21 +182,24 @@ public class NetworkReachabilityManager { // MARK: - Internal - Network Reachability Status func networkReachabilityStatusForFlags(_ flags: SCNetworkReachabilityFlags) -> NetworkReachabilityStatus { - guard flags.contains(.reachable) else { return .notReachable } + guard isNetworkReachable(with: flags) else { return .notReachable } - var networkStatus: NetworkReachabilityStatus = .notReachable + var networkStatus: NetworkReachabilityStatus = .reachable(.ethernetOrWiFi) - if !flags.contains(.connectionRequired) { networkStatus = .reachable(.ethernetOrWiFi) } + #if os(iOS) + if flags.contains(.isWWAN) { networkStatus = .reachable(.wwan) } + #endif - if flags.contains(.connectionOnDemand) || flags.contains(.connectionOnTraffic) { - if !flags.contains(.interventionRequired) { networkStatus = .reachable(.ethernetOrWiFi) } - } + return networkStatus + } - #if os(iOS) - if flags.contains(.isWWAN) { networkStatus = .reachable(.wwan) } - #endif + 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 networkStatus + return isReachable && (!needsConnection || canConnectWithoutUserInteraction) } } diff --git a/Sample/Pods/Alamofire/Source/ParameterEncoding.swift b/Sample/Pods/Alamofire/Source/ParameterEncoding.swift index 242f6a83..959af6f9 100644 --- a/Sample/Pods/Alamofire/Source/ParameterEncoding.swift +++ b/Sample/Pods/Alamofire/Source/ParameterEncoding.swift @@ -241,8 +241,11 @@ public struct URLEncoding: ParameterEncoding { let value = parameters[key]! components += queryComponents(fromKey: key, value: value) } - + #if swift(>=4.0) + return components.map { "\($0.0)=\($0.1)" }.joined(separator: "&") + #else return components.map { "\($0)=\($1)" }.joined(separator: "&") + #endif } private func encodesParametersInURL(with method: HTTPMethod) -> Bool { diff --git a/Sample/Pods/Alamofire/Source/Request.swift b/Sample/Pods/Alamofire/Source/Request.swift index 78864952..4f6350c5 100644 --- a/Sample/Pods/Alamofire/Source/Request.swift +++ b/Sample/Pods/Alamofire/Source/Request.swift @@ -46,7 +46,7 @@ public typealias RequestRetryCompletion = (_ shouldRetry: Bool, _ timeDelay: Tim public protocol RequestRetrier { /// Determines whether the `Request` should be retried by calling the `completion` closure. /// - /// This operation is fully asychronous. Any amount of time can be taken to determine whether the request needs + /// 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. /// @@ -269,7 +269,7 @@ extension Request: CustomDebugStringConvertible { } func cURLRepresentation() -> String { - var components = ["$ curl -i"] + var components = ["$ curl -v"] guard let request = self.request, let url = request.url, diff --git a/Sample/Pods/Alamofire/Source/ResponseSerialization.swift b/Sample/Pods/Alamofire/Source/ResponseSerialization.swift index 47780fd6..1a59da55 100644 --- a/Sample/Pods/Alamofire/Source/ResponseSerialization.swift +++ b/Sample/Pods/Alamofire/Source/ResponseSerialization.swift @@ -88,11 +88,12 @@ public struct DownloadResponseSerializer: DownloadResponseSerializerProto extension Request { var timeline: Timeline { + let requestStartTime = self.startTime ?? CFAbsoluteTimeGetCurrent() let requestCompletedTime = self.endTime ?? CFAbsoluteTimeGetCurrent() let initialResponseTime = self.delegate.initialResponseTime ?? requestCompletedTime return Timeline( - requestStartTime: self.startTime ?? CFAbsoluteTimeGetCurrent(), + requestStartTime: requestStartTime, initialResponseTime: initialResponseTime, requestCompletedTime: requestCompletedTime, serializationCompletedTime: CFAbsoluteTimeGetCurrent() diff --git a/Sample/Pods/Alamofire/Source/Result.swift b/Sample/Pods/Alamofire/Source/Result.swift index c13b1fcf..bf7e7025 100644 --- a/Sample/Pods/Alamofire/Source/Result.swift +++ b/Sample/Pods/Alamofire/Source/Result.swift @@ -162,7 +162,7 @@ extension Result { /// try print(noInt.unwrap()) /// // Throws error /// - /// - parameter transform: A closure that takes the success value of the result instance. + /// - 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. @@ -200,4 +200,101 @@ extension Result { 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) -> Void) -> Result { + if case let .success(value) = self { 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) -> Void) -> Result { + if case let .failure(error) = self { 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: () -> Void) -> Result { + if isSuccess { 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: () -> Void) -> Result { + if isFailure { closure() } + + return self + } } diff --git a/Sample/Pods/Alamofire/Source/SessionDelegate.swift b/Sample/Pods/Alamofire/Source/SessionDelegate.swift index 27ad8812..8edb492b 100644 --- a/Sample/Pods/Alamofire/Source/SessionDelegate.swift +++ b/Sample/Pods/Alamofire/Source/SessionDelegate.swift @@ -36,7 +36,7 @@ open class SessionDelegate: NSObject { 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, (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? + open var sessionDidReceiveChallengeWithCompletion: ((URLSession, URLAuthenticationChallenge, @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? /// Overrides default behavior for URLSessionDelegate method `urlSessionDidFinishEvents(forBackgroundURLSession:)`. open var sessionDidFinishEventsForBackgroundURLSession: ((URLSession) -> Void)? @@ -48,21 +48,21 @@ open class SessionDelegate: NSObject { /// 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, (URLRequest?) -> Void) -> Void)? + 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, (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? + 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, (InputStream?) -> Void) -> Void)? + 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)? @@ -77,7 +77,7 @@ open class SessionDelegate: NSObject { /// Overrides all behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:completionHandler:)` and /// requires caller to call the `completionHandler`. - open var dataTaskDidReceiveResponseWithCompletion: ((URLSession, URLSessionDataTask, URLResponse, (URLSession.ResponseDisposition) -> Void) -> Void)? + 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)? @@ -90,7 +90,7 @@ open class SessionDelegate: NSObject { /// Overrides all behavior for URLSessionDataDelegate method `urlSession(_:dataTask:willCacheResponse:completionHandler:)` and /// requires caller to call the `completionHandler`. - open var dataTaskWillCacheResponseWithCompletion: ((URLSession, URLSessionDataTask, CachedURLResponse, (CachedURLResponse?) -> Void) -> Void)? + open var dataTaskWillCacheResponseWithCompletion: ((URLSession, URLSessionDataTask, CachedURLResponse, @escaping (CachedURLResponse?) -> Void) -> Void)? // MARK: URLSessionDownloadDelegate Overrides @@ -462,8 +462,8 @@ extension SessionDelegate: URLSessionTaskDelegate { // Determine whether an error has occurred var error: Error? = error - if let taskDelegate = self[task]?.delegate, taskDelegate.error != nil { - error = taskDelegate.error + if request.delegate.error != nil { + error = request.delegate.error } /// If an error occurred and the retrier is set, asynchronously ask the retrier if the request diff --git a/Sample/Pods/Alamofire/Source/SessionManager.swift b/Sample/Pods/Alamofire/Source/SessionManager.swift index 450f750d..493ce29c 100644 --- a/Sample/Pods/Alamofire/Source/SessionManager.swift +++ b/Sample/Pods/Alamofire/Source/SessionManager.swift @@ -58,10 +58,18 @@ open class SessionManager { 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 + #if swift(>=4.0) + let acceptLanguage = Locale.preferredLanguages.prefix(6).enumerated().map { enumeratedLanguage in + let (index, languageCode) = enumeratedLanguage + let quality = 1.0 - (Double(index) * 0.1) + return "\(languageCode);q=\(quality)" + }.joined(separator: ", ") + #else 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: ", ") + #endif // 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` diff --git a/Sample/Pods/Local Podspecs/Moya-ObjectMapper.podspec.json b/Sample/Pods/Local Podspecs/Moya-ObjectMapper.podspec.json index 2b0884d7..1ed5c9d6 100644 --- a/Sample/Pods/Local Podspecs/Moya-ObjectMapper.podspec.json +++ b/Sample/Pods/Local Podspecs/Moya-ObjectMapper.podspec.json @@ -29,7 +29,7 @@ "source_files": "Source/*.swift", "dependencies": { "Moya": [ - "~> 8.0" + ], "ObjectMapper": [ "~> 2.2" @@ -51,6 +51,21 @@ "~> 3.1" ] } + }, + { + "name": "ReactiveSwift", + "source_files": "Source/ReactiveSwift/*.swift", + "dependencies": { + "Moya/ReactiveSwift": [ + "~> 9.0.0-alpha.1" + ], + "Moya-ObjectMapper/Core": [ + + ], + "ReactiveSwift": [ + "~> 2.0" + ] + } } ] } diff --git a/Sample/Pods/Local Podspecs/RxSwift.podspec.json b/Sample/Pods/Local Podspecs/RxSwift.podspec.json deleted file mode 100644 index 026022b0..00000000 --- a/Sample/Pods/Local Podspecs/RxSwift.podspec.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "RxSwift", - "version": "3.0.0", - "summary": "RxSwift is a Swift implementation of Reactive Extensions", - "description": "This is a Swift port of [ReactiveX.io](https://github.com/ReactiveX)\n\nLike the original [Rx](https://github.com/Reactive-extensions/Rx.Net), its intention is to enable easy composition of asynchronous operations and event streams.\n\nIt tries to port as many concepts from the original Rx as possible, but some concepts were adapted for more pleasant and performant integration with iOS/macOS/Linux environment.\n\nProbably the best analogy for those who have never heard of Rx would be:\n\n```\ngit diff | grep bug | less # linux pipes - programs communicate by sending\n\t\t\t\t # sequences of bytes, words, lines, '\u0000' terminated strings...\n```\nwould become if written in RxSwift\n```\ngitDiff().grep(\"bug\").less // sequences of swift objects\n```", - "homepage": "https://github.com/ReactiveX/RxSwift", - "license": "MIT", - "authors": { - "Krunoslav Zaher": "krunoslav.zaher@gmail.com" - }, - "source": { - "git": "https://github.com/ReactiveX/RxSwift.git", - "tag": "3.0.0" - }, - "requires_arc": true, - "platforms": { - "ios": "8.0", - "osx": "10.10", - "watchos": "2.0", - "tvos": "9.0" - }, - "source_files": [ - "RxSwift/**/*.swift", - "Platform/**/*.swift" - ], - "exclude_files": "RxSwift/Platform/**/*.swift" -} diff --git a/Sample/Pods/Manifest.lock b/Sample/Pods/Manifest.lock index 00ec9b19..3ac2123a 100644 --- a/Sample/Pods/Manifest.lock +++ b/Sample/Pods/Manifest.lock @@ -1,49 +1,32 @@ PODS: - - Alamofire (4.4.0) - - Moya (8.0.3): - - Moya/Core (= 8.0.3) + - Alamofire (4.5.0) + - Moya (8.0.5): + - Moya/Core (= 8.0.5) - Moya-ObjectMapper (2.3.2): - Moya-ObjectMapper/Core (= 2.3.2) - Moya-ObjectMapper/Core (2.3.2): - - Moya (~> 8.0) + - Moya - ObjectMapper (~> 2.2) - - Moya-ObjectMapper/RxSwift (2.3.2): - - Moya-ObjectMapper/Core - - Moya/RxSwift - - RxSwift (~> 3.1) - - Moya/Core (8.0.3): + - Moya/Core (8.0.5): - Alamofire (~> 4.1) - Result (~> 3.0) - - Moya/RxSwift (8.0.3): - - Moya/Core - - RxSwift (~> 3.0) - ObjectMapper (2.2.8) - - ReactiveSwift (2.0.0): - - Result (~> 3.2) - - Result (3.2.1) - - RxSwift (3.4.0) + - Result (3.2.3) DEPENDENCIES: - - Moya (~> 8.0) - Moya-ObjectMapper (from `../`) - - Moya-ObjectMapper/RxSwift (from `../`) - - ObjectMapper (~> 2.2) - - ReactiveSwift (~> 2.0) - - RxSwift (~> 3.4) EXTERNAL SOURCES: Moya-ObjectMapper: :path: ../ SPEC CHECKSUMS: - Alamofire: dc44b1600b800eb63da6a19039a0083d62a6a62d - Moya: d3721622e3cc0cc2f038d69a258686f0b66e7252 - Moya-ObjectMapper: 46bd1bd986886858c4461b06b6ae1ea368869dc3 + Alamofire: f28cdffd29de33a7bfa022cbd63ae95a27fae140 + Moya: c37eec09a098ba9991b5a963b291fc5704bdb9ef + Moya-ObjectMapper: 6796feb29c8a1761722b96ea5ffa6893b6e0c15b ObjectMapper: 3d571bb5af471c779e1160828cd9ad5c4ef90958 - ReactiveSwift: 36339167e571774d936482d0f6512f5118a74731 - Result: 2453a22e5c5b11c0c3a478736e82cd02f763b781 - RxSwift: 3789a1af753002a14edecdb698a2424624296a9c + Result: 128640a6347e8d2ae48b142556739a2d13f90ce6 -PODFILE CHECKSUM: fa24202d17cb64cbe41dd1aeeeb63487d11721c1 +PODFILE CHECKSUM: b48a2cd0c99cd97066deb40b55e6cf4a8a900bec COCOAPODS: 1.2.1 diff --git a/Sample/Pods/Moya/Readme.md b/Sample/Pods/Moya/Readme.md index f08ffc4a..09bbf520 100644 --- a/Sample/Pods/Moya/Readme.md +++ b/Sample/Pods/Moya/Readme.md @@ -68,7 +68,7 @@ you should use for your Swift version. 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", majorVersion: 8) +.Package(url: "https://github.com/Moya/Moya.git", majorVersion: 8) ``` and then specify `.Target(name: "Moya")` as a dependency of the Target in which you wish to use Moya. @@ -80,7 +80,7 @@ import PackageDescription let package = Package( name: "MyApp", dependencies: [ - .Package(url: "https://github.com/Moya/Moya", majorVersion: 8) + .Package(url: "https://github.com/Moya/Moya.git", majorVersion: 8) ] ) ``` @@ -249,24 +249,10 @@ for filtering out certain status codes. This means that you can place your code handling API errors like 400's in the same places as code for handling invalid responses. -Community Extensions +Community Projects -------------------- -Moya has a great community around it and some people have created some very helpful extensions. - -- [Moya-ObjectMapper](https://github.com/ivanbruel/Moya-ObjectMapper) - ObjectMapper bindings for Moya for easier JSON serialization -- [Moya-SwiftyJSONMapper](https://github.com/AvdLee/Moya-SwiftyJSONMapper) - SwiftyJSON bindings for Moya for easier JSON serialization -- [Moya-Argo](https://github.com/wattson12/Moya-Argo) - Argo bindings for Moya for easier JSON serialization -- [Moya-ModelMapper](https://github.com/sunshinejr/Moya-ModelMapper) - ModelMapper bindings for Moya for easier JSON serialization -- [Moya-Gloss](https://github.com/spxrogers/Moya-Gloss) - Gloss bindings for Moya for easier JSON serialization -- [Moya-JASON](https://github.com/DroidsOnRoids/Moya-JASON) - JASON bindings for Moya for easier JSON serialization -- [Moya-JASONMapper](https://github.com/AvdLee/Moya-JASONMapper) - JASON bindings for Moya for easier JSON serialization -- [Moya-Unbox](https://github.com/RyogaK/Moya-Unbox) - Unbox bindings for Moya for easier JSON serialization -- [MoyaSugar](https://github.com/devxoul/MoyaSugar) – Syntactic sugar for Moya -- [Moya-EVReflection](https://github.com/evermeer/EVReflection/tree/master/Source/Alamofire/Moya) - EVReflection bindings for Moya for easier JSON serialization (including subspecs for [RxSwift](https://github.com/evermeer/EVReflection/tree/master/Source/Alamofire/Moya/RxSwift) and [ReactiveCocoa](https://github.com/evermeer/EVReflection/tree/master/Source/Alamofire/Moya/ReactiveCocoa)) -- [Moya-Marshal](https://github.com/JARMourato/Moya-Marshal) - Marshal bindings for Moya for easier JSON serialization - -We appreciate all the work being done by the community around Moya. If you would like to have your extension featured in the list above, simply create a pull request adding your extensions to the list. +[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 ------------ @@ -290,7 +276,7 @@ requests and help steer the ship :ship: You can read more details about that [in 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/contributors/blob/master/Code of Conduct.md). +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/contributors/blob/master/Code%20of%20Conduct.md). ### Adding new source files @@ -299,4 +285,4 @@ If you add or remove a source file from Moya, a corresponding change needs to be License ------- -Moya is released under an MIT license. See License.md for more information. +Moya is released under an MIT license. See [License.md](License.md) for more information. diff --git a/Sample/Pods/Moya/Sources/Moya/Endpoint.swift b/Sample/Pods/Moya/Sources/Moya/Endpoint.swift index 0d9444ae..0482209d 100755 --- a/Sample/Pods/Moya/Sources/Moya/Endpoint.swift +++ b/Sample/Pods/Moya/Sources/Moya/Endpoint.swift @@ -110,8 +110,8 @@ extension Endpoint: Equatable, Hashable { } public static func == (lhs: Endpoint, rhs: Endpoint) -> Bool { - if let _ = lhs.urlRequest, rhs.urlRequest == nil { return false } - if lhs.urlRequest == nil, let _ = rhs.urlRequest { return false } + if lhs.urlRequest != nil, rhs.urlRequest == nil { return false } + if lhs.urlRequest == nil, rhs.urlRequest != nil { return false } if lhs.urlRequest == nil, rhs.urlRequest == nil { return lhs.hashValue == rhs.hashValue } return (lhs.urlRequest == rhs.urlRequest) } diff --git a/Sample/Pods/Moya/Sources/Moya/MoyaProvider+Defaults.swift b/Sample/Pods/Moya/Sources/Moya/MoyaProvider+Defaults.swift index e10e3f68..4d1eb65b 100644 --- a/Sample/Pods/Moya/Sources/Moya/MoyaProvider+Defaults.swift +++ b/Sample/Pods/Moya/Sources/Moya/MoyaProvider+Defaults.swift @@ -4,9 +4,8 @@ import Alamofire /// These functions are default mappings to `MoyaProvider`'s properties: endpoints, requests, manager, etc. public extension MoyaProvider { public final class func defaultEndpointMapping(for target: Target) -> Endpoint { - let url = target.baseURL.appendingPathComponent(target.path).absoluteString return Endpoint( - url: url, + url: url(for: target).absoluteString, sampleResponseClosure: { .networkResponse(200, target.sampleData) }, method: target.method, parameters: target.parameters, @@ -30,4 +29,15 @@ public extension MoyaProvider { manager.startRequestsImmediately = false return manager } + + // 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 + private final class func url(for target: Target) -> URL { + if target.path.isEmpty { + return target.baseURL + } + + return target.baseURL.appendingPathComponent(target.path) + } } diff --git a/Sample/Pods/Moya/Sources/Moya/MoyaProvider+Internal.swift b/Sample/Pods/Moya/Sources/Moya/MoyaProvider+Internal.swift index f9a67834..cd3f4745 100644 --- a/Sample/Pods/Moya/Sources/Moya/MoyaProvider+Internal.swift +++ b/Sample/Pods/Moya/Sources/Moya/MoyaProvider+Internal.swift @@ -235,7 +235,7 @@ private extension MoyaProvider { } // Perform the actual request - if let _ = progressCompletion { + if progressCompletion != nil { switch progressAlamoRequest { case let downloadRequest as DownloadRequest: if let downloadRequest = downloadRequest.downloadProgress(closure: progressClosure) as? T { diff --git a/Sample/Pods/Moya/Sources/Moya/Plugins/NetworkActivityPlugin.swift b/Sample/Pods/Moya/Sources/Moya/Plugins/NetworkActivityPlugin.swift index 332c3235..1dd34b94 100644 --- a/Sample/Pods/Moya/Sources/Moya/Plugins/NetworkActivityPlugin.swift +++ b/Sample/Pods/Moya/Sources/Moya/Plugins/NetworkActivityPlugin.swift @@ -23,7 +23,7 @@ public final class NetworkActivityPlugin: PluginType { networkActivityClosure(.began) } - /// Called by the provider as soon as a response arrives, even if the request is cancelled. + /// 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) } diff --git a/Sample/Pods/Moya/Sources/Moya/TargetType.swift b/Sample/Pods/Moya/Sources/Moya/TargetType.swift index 4aaab855..da96f98f 100644 --- a/Sample/Pods/Moya/Sources/Moya/TargetType.swift +++ b/Sample/Pods/Moya/Sources/Moya/TargetType.swift @@ -13,7 +13,7 @@ public protocol TargetType { /// The HTTP method used in the request. var method: Moya.Method { get } - /// The parameters to be incoded in the request. + /// The parameters to be encoded in the request. var parameters: [String: Any]? { get } /// The method used for parameter encoding. diff --git a/Sample/Pods/Moya/Sources/RxMoya/Observable+Response.swift b/Sample/Pods/Moya/Sources/RxMoya/Observable+Response.swift deleted file mode 100644 index 2a5a220a..00000000 --- a/Sample/Pods/Moya/Sources/RxMoya/Observable+Response.swift +++ /dev/null @@ -1,84 +0,0 @@ -import Foundation -import RxSwift -#if !COCOAPODS -import Moya -#endif - -/// Extension for processing raw NSData generated by network access. -extension ObservableType where E == Response { - - /// Filters out responses that don't fall within the given range, generating errors when others are encountered. - public func filter(statusCodes: ClosedRange) -> Observable { - return flatMap { response -> Observable in - return Observable.just(try response.filter(statusCodes: statusCodes)) - } - } - - public func filter(statusCode: Int) -> Observable { - return flatMap { response -> Observable in - return Observable.just(try response.filter(statusCode: statusCode)) - } - } - - public func filterSuccessfulStatusCodes() -> Observable { - return flatMap { response -> Observable in - return Observable.just(try response.filterSuccessfulStatusCodes()) - } - } - - public func filterSuccessfulStatusAndRedirectCodes() -> Observable { - return flatMap { response -> Observable in - return Observable.just(try response.filterSuccessfulStatusAndRedirectCodes()) - } - } - - /// Maps data received from the signal into an Image. If the conversion fails, the signal errors. - public func mapImage() -> Observable { - return flatMap { response -> Observable in - return Observable.just(try response.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 { - return flatMap { response -> Observable in - return Observable.just(try response.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 { - return flatMap { response -> Observable in - return Observable.just(try response.mapString(atKeyPath: keyPath)) - } - } -} - -extension ObservableType where E == ProgressResponse { - - /** - Filter completed progress response and maps to actual response - - - returns: response associated with ProgressResponse object - */ - public 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 - */ - public func filterProgress() -> Observable { - return self.filter { !$0.completed }.map { $0.progress } - } -} diff --git a/Sample/Pods/Moya/Sources/RxMoya/RxMoyaProvider.swift b/Sample/Pods/Moya/Sources/RxMoya/RxMoyaProvider.swift deleted file mode 100644 index a05138f8..00000000 --- a/Sample/Pods/Moya/Sources/RxMoya/RxMoyaProvider.swift +++ /dev/null @@ -1,72 +0,0 @@ -import Foundation -import RxSwift -#if !COCOAPODS -import Moya -#endif - -/// Subclass of MoyaProvider that returns Observable instances when requests are made. Much better than using completion closures. -open class RxMoyaProvider: MoyaProvider where Target: TargetType { - /// Initializes a reactive provider. - override public init(endpointClosure: @escaping EndpointClosure = MoyaProvider.defaultEndpointMapping, - requestClosure: @escaping RequestClosure = MoyaProvider.defaultRequestMapping, - stubClosure: @escaping StubClosure = MoyaProvider.neverStub, - manager: Manager = RxMoyaProvider.defaultAlamofireManager(), - plugins: [PluginType] = [], - trackInflights: Bool = false) { - super.init(endpointClosure: endpointClosure, requestClosure: requestClosure, stubClosure: stubClosure, manager: manager, plugins: plugins, trackInflights: trackInflights) - } - - /// Designated request-making method. - open func request(_ token: Target) -> Observable { - - // Creates an observable that starts a request each time it's subscribed to. - return Observable.create { observer in - let cancellableToken = self.request(token) { result in - switch result { - case let .success(response): - observer.onNext(response) - observer.onCompleted() - case let .failure(error): - observer.onError(error) - } - } - - return Disposables.create { - cancellableToken.cancel() - } - } - } -} - -public extension RxMoyaProvider { - public func requestWithProgress(_ token: Target) -> Observable { - let progressBlock: (AnyObserver) -> (ProgressResponse) -> Void = { observer in - return { progress in - observer.onNext(progress) - } - } - - let response: Observable = Observable.create { observer in - let cancellableToken = self.request(token, queue: nil, progress: progressBlock(observer)) { result in - switch result { - case let .success(response): - observer.onNext(ProgressResponse(response: response)) - 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/Sample/Pods/Pods.xcodeproj/project.pbxproj b/Sample/Pods/Pods.xcodeproj/project.pbxproj index 03fbcab0..64125b8b 100644 --- a/Sample/Pods/Pods.xcodeproj/project.pbxproj +++ b/Sample/Pods/Pods.xcodeproj/project.pbxproj @@ -7,756 +7,307 @@ objects = { /* Begin PBXBuildFile section */ - 0007293B7C1233BC97E4ED5AF5A57C91 /* Skip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FED2C3C7E03453020D34A902D0A17AD /* Skip.swift */; }; - 000CAA7B68BCC90DFFBD95BED8A2038D /* FromJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76EBBC41CE9B11EAD62E0BCF95E85227 /* FromJSON.swift */; }; - 000D350E67D30BCA2FBE7F2924993B84 /* Moya.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 16A860D8F4BF07CDAABA319C5E5658A4 /* Moya.framework */; }; - 009E1D75E836C631CE8DA835A99DD90F /* Throttle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CBA7B0F508B12B0E6ABA92500E3EC2 /* Throttle.swift */; }; - 015ACB1F69FB7BF7DCAE4CE15F670AA7 /* Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82FDCC01E20E2C5AAE034A49D1ED5163 /* Zip+arity.swift */; }; - 0234CDBD103EB7AD5EB5A415C14D256C /* ConcurrentDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = B16391692DB4F8314C30BC547232672C /* ConcurrentDispatchQueueScheduler.swift */; }; - 044D8F5D1B623F60FE19897EC2939280 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E6D5912B420A7B69CCF77E5A9BF85AF /* Errors.swift */; }; - 04CE8CD210227DC6588E994D44EC48D3 /* ObservableType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE44D39AA5ECD4810DFE500D8E781CC3 /* ObservableType+Extensions.swift */; }; - 07B3EC897842B37C329E7E84050BB001 /* Deferred.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEC6DAEDB2A4F64D0361DAC2A90CE887 /* Deferred.swift */; }; - 09DB9B04AEECC7468A86685AD754BE5C /* CustomDateFormatTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CAAA0D52FCA1C1DEC597260623EF2A5 /* CustomDateFormatTransform.swift */; }; - 0AC4D4C16737845EB4BC47ED4C13E504 /* ISO8601DateTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2686171BA16348F07095C4FE784112A0 /* ISO8601DateTransform.swift */; }; - 0B6CE56C30B14BCE715607D5F9623255 /* Just.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57C654F7468F90C4C3D24FED3C7F0D3E /* Just.swift */; }; - 0BEE3A2E43CD635836111FD0AB701E16 /* SignalProducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 903F6654FD1FDACF86081CEF68EE96BB /* SignalProducer.swift */; }; - 0CB40B5FA8ED1D19D39A6E2E45B6F8D9 /* TransformOperators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A6D71F9BF566B4365BE46AB589E7461 /* TransformOperators.swift */; }; - 0E1548980432E6CA13021CA74E639EA2 /* DictionaryTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5920B5993039870B306EC532F225E154 /* DictionaryTransform.swift */; }; - 0ECB1FCB4B9AFE4C0E9A80FC223BC787 /* ReactiveSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7134E6FE5CB1D5BBC04158D17EF07982 /* ReactiveSwift-dummy.m */; }; - 0F7E7F866EB647B836183A429A087B34 /* SerialDispatchQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3385E307C8C0628285FFAC438D4B6E7D /* SerialDispatchQueueScheduler.swift */; }; - 10EB23E9ECC4B33E16933BB1EA560B6A /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42D894EA6C6A47B6CFDE3704A55204D7 /* Timeline.swift */; }; - 11523975ADA09CD9D08AE04D8DA8DD4D /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7697FC2B90D6509A8AC3659265DC0FB7 /* RxSwift.framework */; }; - 12C2557A9EB8643C5418E197CD77AA70 /* DisposeBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE74BAF25E92CDB17782F9AB8F17B753 /* DisposeBase.swift */; }; - 14A046FA24D0256F42644010C67328B5 /* ConnectableObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D57C17E48D6B4C471E30BEBF78305148 /* ConnectableObservableType.swift */; }; - 14A9AC8D888C262918189DCF10B1FC75 /* Timeout.swift in Sources */ = {isa = PBXBuildFile; fileRef = E59D4F322D6E7D3BA6C49B1AA610A934 /* Timeout.swift */; }; - 160D2378A15056D039FEECF60F12F48D /* SchedulerServices+Emulation.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB5F2649EE2009363B0F09C8A6ADA83A /* SchedulerServices+Emulation.swift */; }; - 16576AA661FF85E4BA6D02FEFB402925 /* Empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 408788B1F07BDFF8D6682B7D0F390607 /* Empty.swift */; }; - 17CA10FA4E82F2BFAF9643E4929A41FE /* RefCountDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B1F9906C460EF3154ED146983F06918 /* RefCountDisposable.swift */; }; - 17F5144A575AFC3DB5BF1F3D469BC837 /* AsSingle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0323144B011FDDF6827A6B8DBA85B00B /* AsSingle.swift */; }; - 18772B6600510FC9AC2A2C07845EBBBE /* SynchronizedDisposeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8334CB787F208F16FF132C8023FD6F9C /* SynchronizedDisposeType.swift */; }; - 198DEE3F4FFE846BD52C01F6A53F754C /* AsyncSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 688D59A630A170299AE908873175B206 /* AsyncSubject.swift */; }; - 19D382282D1BD1F7F3872A7C740D31CF /* SchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7479AA1AE7EBE9F210DF7C06D08FA79E /* SchedulerType.swift */; }; - 1A171E7748485C86326FB3AC316A7E49 /* TailRecursiveSink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35D64D5D6EAE2F4029F0EE7D6856F4DB /* TailRecursiveSink.swift */; }; - 1A2B98B68FA7555BE1A35DF42C96A4E7 /* RxSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6388C76E87715C20A6CC8DE03465171B /* RxSwift-dummy.m */; }; - 1A5E4B94ACF07CE3EDD80F144C65039D /* RecursiveLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28297762695E3A606FF79D55CD44A1E8 /* RecursiveLock.swift */; }; - 1B114BA2ACB4E6B22768B72A520F7692 /* Sample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98A388B968E9204926C346DCDF6062B0 /* Sample.swift */; }; - 1B9EDEDC964E6B08F78920B4F4B9DB84 /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 99FE737E0F857E5191A1E4F1C1D81AC3 /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1BA578A0C93C7603A772D319F809D5A1 /* DelaySubscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1E2F6D667244D405AA74248C94355AA /* DelaySubscription.swift */; }; - 1BFE36BD6F8696E7292CE75586D83AB4 /* SingleAsync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F3FB9AB8D8CB0B217990A29076233B1 /* SingleAsync.swift */; }; - 1C4BD460D1E1F4243C0925B92D8D8786 /* Multicast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89273F92A2616EA7FA505C493114118A /* Multicast.swift */; }; - 1CAEF92803A506A44E9E8EFBF587B5BE /* PrimitiveSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = E27C09CC42C9E61A48D61D96E32C2224 /* PrimitiveSequence.swift */; }; - 1FC11BFA37680C9CA9F198E6A1881005 /* Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65EF88911B1EF37A8A6E08A5847C5CF0 /* Map.swift */; }; - 1FD6E1149F3EC3B0DD8F893B6762BBBC /* StartWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E03DD3956442CB4D8565AD68A91D369 /* StartWith.swift */; }; - 20ED4F70F7F94FE9EC8D49995F11434B /* CombineLatest+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = D92F7DCD41D5266E43DFE3FAD66403EC /* CombineLatest+arity.swift */; }; - 22CFA90FDBDA6D91E5377B5BEE7AEABE /* ScheduledItemType.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4A5B4C75C3181B16E43A4F7B73DE44A /* ScheduledItemType.swift */; }; - 2646370A1E8A0A940E95F11D50253580 /* TakeLast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C6FC130D59DFCF7457E87174231D525 /* TakeLast.swift */; }; - 27009AF83A814DA8E88F6707164167B2 /* Repeat.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADE5FB20FE5428FAA73D3437465495EC /* Repeat.swift */; }; - 285C41FA5502F33262E4420A182D9AD8 /* Delay.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7ED7D46DDE3DB9F34D961D4247C9E58 /* Delay.swift */; }; - 2931270581FC1B6B83757EB3C3CEC760 /* ObjectMapper.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B87CCF9A5173095B333FB06CA24E143 /* ObjectMapper.framework */; }; - 2AB311218EFF549A0E9E481DB51603E5 /* TakeUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5CFCA13C0BBA88AFC72A9C1CD73A031 /* TakeUntil.swift */; }; - 2BBA25B63470ECAF1D6608594313C917 /* RxSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7697FC2B90D6509A8AC3659265DC0FB7 /* RxSwift.framework */; }; - 2D694447FB3438F52AEEB36230A387CA /* NSDecimalNumberTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20AEF3C06A5DFD905B23CA9F2E2425FE /* NSDecimalNumberTransform.swift */; }; - 2E28CD026DEB6B00E52C1A833343249B /* Plugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = D714CB5781BB6873581A3DC0A79B9E85 /* Plugin.swift */; }; - 2E50C0243F9BBCE7FF7F015FDA3EF6D5 /* RxMutableBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57A565AA1BD6CD7E0C542B05BE4C9637 /* RxMutableBox.swift */; }; - 2FE4DAE5F7A4342DF8D3DC589B732685 /* Mapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45839231A4901B0E5436EF73077831F0 /* Mapper.swift */; }; - 3176BBD94BCD96863313626D1F2389A6 /* UnidirectionalBinding.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3978B3D1F18561B41C5412350F64F37 /* UnidirectionalBinding.swift */; }; - 31DA6D8BA73FFCA5C1BAE2FF42D58EA3 /* VirtualTimeConverterType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39E05E41EC88853ABC2E4FE509051C89 /* VirtualTimeConverterType.swift */; }; - 32D18A277CA084098022CBBDFC7D1C0F /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F56CB1AD0A49EC42E54D6467761239E /* ResultProtocol.swift */; }; - 342F1D53C4E2AA0B324103A4553D668D /* RecursiveScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16AC502307017147E0782DA0BE937992 /* RecursiveScheduler.swift */; }; - 349B655C63E8173DBE9D7E6FA7DB3D36 /* DistinctUntilChanged.swift in Sources */ = {isa = PBXBuildFile; fileRef = D957E7D9F0804FBE080A56A0A7C32859 /* DistinctUntilChanged.swift */; }; - 35B61F9CC18DE8CA76EA037A2A8712AA /* Merge.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBDB1E14A220EC920FC1FB4625810264 /* Merge.swift */; }; - 3626B94094672CB1C9DEA32B9F9502E1 /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E928AE794F4E1E19A5AD255A37D6752 /* TaskDelegate.swift */; }; - 374051E6F49A7295C8F1112894850901 /* Result-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A02D79B87B95AAC12858D2761EFA288 /* Result-dummy.m */; }; - 39346FCED48D5C12D52942507E916C90 /* Moya-ObjectMapper-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 41C6FA254A44FFC58952089BB7F468C9 /* Moya-ObjectMapper-dummy.m */; }; - 3D61AF186EFD00BD31F145AF3241C759 /* ConnectableObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2DEBF8CC407476366F482DC09F29DC2 /* ConnectableObservable.swift */; }; - 3E433D1D3D46D117F7DD7269FC35A26C /* Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = B18971046EE71972C2987A1B44C687D6 /* Error.swift */; }; - 3E56DB4136E625DCA0B4F278CE147D6B /* RxMoyaProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E4EC7FEC4148FDD842B176028C55D7C /* RxMoyaProvider.swift */; }; - 3FEAF6012706E5EF26CECD5DBE4449E2 /* Queue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 533E4698572969FE535C01639240BD95 /* Queue.swift */; }; - 40F856F0358939707FF3647BBB99F952 /* Observable+Single.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A9E3FB60CB4A7D2085DAC4A5306B692 /* Observable+Single.swift */; }; - 42DABB15B8D979767E0F44C1F53AE17F /* InhabitableTypeGuards.swift in Sources */ = {isa = PBXBuildFile; fileRef = 404D82726264603AD565560110967D32 /* InhabitableTypeGuards.swift */; }; - 43270940EB9B038B8D7024555D987E87 /* Bag.swift in Sources */ = {isa = PBXBuildFile; fileRef = D452F6F5AA184AAD5F2D67E79A3BD1E3 /* Bag.swift */; }; - 43642AA220763F271C5BA6F31702624A /* Sink.swift in Sources */ = {isa = PBXBuildFile; fileRef = C371E36ECB06A5163E50660874EC28B5 /* Sink.swift */; }; - 46A64B1499CD09CC2C645D7F06566D7C /* Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21EC236CC3C0F46D0FE4C03207C993F2 /* Window.swift */; }; - 481E2BFCD8DDC1B26812081041152FDA /* ObjectMapper-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = AE5D5AF2A28AC7AC8AA786C64A8B0D5D /* ObjectMapper-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 48FF8AF8C61AD5164BBE6BC9AE9C7FAF /* SwitchIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 935C00337EC7391ACE992E18BB6528EC /* SwitchIfEmpty.swift */; }; - 49447E816B12F4DCA7008769F344C7BB /* ReplaySubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27C0B04261BDBBFD9B29D09D21BD1585 /* ReplaySubject.swift */; }; - 4A01BDF81AB5B9467FA6FC6C6C0259BC /* ShareReplay1.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB4181F0665DFDE3AF0C2A4274054C91 /* ShareReplay1.swift */; }; - 4A8374CA5B8CAE6BA944B443C9661AC5 /* Using.swift in Sources */ = {isa = PBXBuildFile; fileRef = F61330C472723B44F49FBA757C173823 /* Using.swift */; }; - 4B4B6DDA48E2D8331209095ADECCBD53 /* AnonymousObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10F5D71DF2264812C5731C22EE801A5A /* AnonymousObserver.swift */; }; - 4B5B309384D3880D2CE23CD3B5375DDB /* IntegerOperators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D6E1BBEE6A3830A885E6B9927A75142 /* IntegerOperators.swift */; }; - 4C28309F83E7306619CB7BF9552F4F17 /* ObservableConvertibleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1703CE57C3548B6E58DA6D64D29E55E /* ObservableConvertibleType.swift */; }; - 4D9A631A76A3667DAB7E9FBA2BF9482B /* ImmediateSchedulerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 001EFFE7D56D6AB9A1B0174B1E4DCC82 /* ImmediateSchedulerType.swift */; }; - 4EB917C3384DF09068583326C9A1A35B /* ImmediateScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B4D6B8F41F79C94313C986AA2C95518 /* ImmediateScheduler.swift */; }; - 4F315ABFC1D4D7B5AA03FC891645AE63 /* HistoricalSchedulerTimeConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23351BF9B507AE749916B9647001DB83 /* HistoricalSchedulerTimeConverter.swift */; }; - 4F9AD7B1CCC4896B36B31A0E03003BB4 /* Flatten.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDE1A466A002C993A806512B2E7382C4 /* Flatten.swift */; }; - 5099D1C9653B29E61B197404B9FA05E2 /* ToArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC3881DD934E863CFEA3B949E0D18C9 /* ToArray.swift */; }; - 5165CA7792DBB1E987D6DD48C4122706 /* Lock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 742EC56A479A268680F0A5C9DF61FB5B /* Lock.swift */; }; - 5387216E723A3C68E851CA15573CDD71 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = B320EE4339DB3EA8E88ED6E7B463000B /* Request.swift */; }; - 53F91CBCDD0CB393C27AB39E8D1FE555 /* BinaryDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9801943BE07AE064B47351ADFD881292 /* BinaryDisposable.swift */; }; - 544E1DC2C392E0257338240259B5B483 /* CombineLatest.swift in Sources */ = {isa = PBXBuildFile; fileRef = B40BE97A1246D8C49845492A55299637 /* CombineLatest.swift */; }; - 54B070EF386B029A9495EF4798EB3236 /* SynchronizedUnsubscribeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AAB9F6E60E4EF7EC35044ABA59EE4A3 /* SynchronizedUnsubscribeType.swift */; }; - 5507CB083B137189C6FA790257EBCFC5 /* MainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D27ED3A89AA80187EF62E0412529A5C /* MainScheduler.swift */; }; - 554F838DE57AA41E909DECCAB3134C69 /* GroupBy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C0A8A53B1859DFABE02D98FD7DF7170 /* GroupBy.swift */; }; - 57D4500DF5AC27397C1EC0D58D4D77A3 /* EnumOperators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 374F5979FAFC0F8EDB295BC6AF726210 /* EnumOperators.swift */; }; - 5938575058EF82086F2CBC6BD6E4642D /* Observable+Time.swift in Sources */ = {isa = PBXBuildFile; fileRef = A241B2831F3DA9FCBD98DDB4EC3E0B1C /* Observable+Time.swift */; }; - 59AF979FCB40524EC2764D656321A30E /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 941085FB48E505ED52FF2DFD9B570A8C /* Result.framework */; }; - 5A49DFF9B98FB7D602B3867E6B669EB1 /* SkipWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6804E8E2F017493A8ECEDBBCF0527D6F /* SkipWhile.swift */; }; - 60170BDDCDD037601717BA153C8B7701 /* Observable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B07C2108E8AEAA49EC11D232391921 /* Observable.swift */; }; - 60A8A8EE66C89410E4CF32DCF54B0104 /* Atomic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6705998374BDFFB7FECAF1532B835BE1 /* Atomic.swift */; }; - 60CA6E3F0423817E9812E85C863B3904 /* FoundationExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B66BA2DCA8B77DD590AFFE169CFF7ED6 /* FoundationExtensions.swift */; }; - 61200D01A1855D7920CEF835C8BE00B0 /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 597A28C19BCCC57C5FFF4BF262CCAAF4 /* DispatchQueue+Alamofire.swift */; }; - 61A3B58787C3FDF6AC3A76128CD4C134 /* ObserveOnSerialDispatchQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = D64B2CD1CD8D698E75A8D2074F3ACC4D /* ObserveOnSerialDispatchQueue.swift */; }; - 61B9FA99D3933D39E66F9FF40164623F /* Response+ObjectMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F03D4318F25F0CEB39500AE4E751CAD /* Response+ObjectMapper.swift */; }; - 621BEEF9B28AA223F02966B0C96860E0 /* RetryWhen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 678D1077D40DA503F57304A63179B726 /* RetryWhen.swift */; }; - 62F65AD8DC4F0F9610F4B8B4738EC094 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EE119E337ADA617EC124C5243D01215 /* ServerTrustPolicy.swift */; }; - 6355EBC9033044801712D035B3D8B4DE /* Sequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD4883583337FBFDD03E78A3D2FB8B4 /* Sequence.swift */; }; - 63BFEFECB9A2FFB46347AF8D7A6010C9 /* Disposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D08FF4003628C1CF0EABD27982F41D46 /* Disposable.swift */; }; - 641A5EE7D6614D73EB7C3E0F0DC0CDC2 /* Bag+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = B278163DD8869BD634FBC37A0A78314A /* Bag+Rx.swift */; }; - 641BF4376A1021F8E2D42DAEAF0A5D94 /* SubscriptionDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C241789ED7971C4DFA28779450E54AC2 /* SubscriptionDisposable.swift */; }; - 6495ECC6B3EB7CF17D20A4521995E8EE /* Reactive.swift in Sources */ = {isa = PBXBuildFile; fileRef = B648F3AFC4C4633FA007EB713EA56506 /* Reactive.swift */; }; - 64B966220380DBFFE5D243FD78B2A3EB /* ConcurrentMainScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9FDA720EB4651BE9743F2A2025BA3C1 /* ConcurrentMainScheduler.swift */; }; - 66244D2DD0DF4E7D10C764AF18027E91 /* Disposables.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84E72054705675D860541F5F6B329ACA /* Disposables.swift */; }; - 6645924370EB7C1E703FB3C2F96AEFF6 /* Pods-Demo-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 03EA1E60232BFA05817BC26ACB8E68BA /* Pods-Demo-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 694595974AD7EAA7FA86C99E95177A8E /* NopDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96C1E5A0EFA527E1432BBE96CDB023DA /* NopDisposable.swift */; }; - 6965544D8BB4ACDF4EC26910E486D181 /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E382DB6FDB65DE94BABDD2844DAF6ED /* Event.swift */; }; - 69BF30EE9140E7086BA82C4DB6938ABC /* DateTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02195DED2D688E2BBFA361F58068011C /* DateTransform.swift */; }; - 6A02A5C5446ECB184384F6904ECC6004 /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF615E8CA506C163CA765AA9770F3AA1 /* Image.swift */; }; - 6AB6BE59334ADD093C1B8A16C98642A2 /* VirtualTimeScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCC878974EE6DA072D98F52B51E84C1D /* VirtualTimeScheduler.swift */; }; - 6C5A8FEF60C73A2EB3E76E377F9A9980 /* Signal.swift in Sources */ = {isa = PBXBuildFile; fileRef = C15B29D41B7D19D513E61510C17CBF58 /* Signal.swift */; }; - 6E19CF8A616A296AD4F1D128CAC2975F /* SubjectType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F11037BCF62A8272D103B2E0875AD7F /* SubjectType.swift */; }; - 7086C1435AE7A37F93956ECDE2F45AB2 /* MoyaProvider+Internal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05788979F32B6C5DF30DD0FD687D5936 /* MoyaProvider+Internal.swift */; }; - 7269E1153109D9A90359F3B4CDFF9AC3 /* RxSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A2A274B029E7DBF68ECEBC41DB939D1 /* RxSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 739F7DBD923F4F358E72B105EB878680 /* DataTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60B30C90645517428578CA8F97388B23 /* DataTransform.swift */; }; - 73B9C996AED49ED7CF8EC2A6F1738059 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */; }; - 747383F70891AD4278847607EF19F9D9 /* GroupedObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAA435219FB8D98ACAC9E82F3073CBFB /* GroupedObservable.swift */; }; - 765794766945F0DF2B0E0298F666ED25 /* Optional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75AAB49A85742D83E67B38D30B60B1D3 /* Optional.swift */; }; - 76776FFFB0888B0064B5D06F87C56F1C /* ValidatingProperty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42090A07F20122A0BC3455BFA86F79A1 /* ValidatingProperty.swift */; }; - 781A22F566FF70A34B360411A314C068 /* Disposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7D4C2831C5B7EDF94A1DD0CC97B961B /* Disposable.swift */; }; - 7824DCCF57694D70347315E949C60E39 /* Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FB6A4378F9D1425C55DF338352E66CA /* Debug.swift */; }; - 7A1A37147E8BA262F5B3EFA0DBD6E531 /* MultiTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1F902FE19E3A7B35BE33971A520703F /* MultiTarget.swift */; }; - 7B5FE28C7EA4122B0598738E54DBEBD8 /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C971A44E2F3D8336CF0FA86D1488C8C /* SessionDelegate.swift */; }; - 7C25E45B76A73FA09B4095D66F09976C /* Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21888844E9B22E9A361BF543DF18D25D /* Rx.swift */; }; - 7D8CC01E8C9EFFF9F4D65406CDE0AB66 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6C987F4B07105EE68202441F72978D2 /* Result.swift */; }; - 7E441805C4C2593D54683EEA350766B4 /* Amb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C59839F18FF5FBE60CAFFB8EC168EBD /* Amb.swift */; }; - 7F0667A1E159C84203C889EB30D74E62 /* Zip.swift in Sources */ = {isa = PBXBuildFile; fileRef = F09BF1757627FA226B630ABB73C959F9 /* Zip.swift */; }; - 7F7D7D024F022010916E550B7632E680 /* MoyaProvider+Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDC14C03CD94BFBB95CEB5C52AE617A5 /* MoyaProvider+Defaults.swift */; }; - 7FF874C342E47D633982FB42AC3DC678 /* EventLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 353118FBD87FF65111631E0E224F8A29 /* EventLogger.swift */; }; - 80B53F3C4D714E0F3CA73B7C094F4FE5 /* RefCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 059700FB972CCDBE4E13C737B053F05C /* RefCount.swift */; }; - 82243099E0A10AE0213AEE768956284E /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 941085FB48E505ED52FF2DFD9B570A8C /* Result.framework */; }; - 824A4C07D443B2F647D7C50DD9564BF9 /* Range.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76432EFF66F0610C1FA74F991477EBE0 /* Range.swift */; }; - 8285A0E95F833AD6C8C0B6B4430C6EDC /* Scheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = D61C3FC49E8BFA92C986196BDFE8CAA7 /* Scheduler.swift */; }; - 82BEE108931EA1A59D0DDDA358745523 /* CompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9A5BACE751A31D7CCB9FD6E8C6E8DBC /* CompositeDisposable.swift */; }; - 835B836C69E22C29965079C6D3535142 /* Platform.Linux.swift in Sources */ = {isa = PBXBuildFile; fileRef = B249B91CED2F27F5A58276241ADD4BB7 /* Platform.Linux.swift */; }; - 84AEFE898ED7A873994E4BAE43079AA0 /* ObjectMapper-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C44E15F0C89F0E302C55DC4A79A1BC3D /* ObjectMapper-dummy.m */; }; - 84BB5EBA0C08C28C5E83D6CA263A362B /* NetworkActivityPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55F91E7D6B0D44079FA709F9FA6A475B /* NetworkActivityPlugin.swift */; }; - 85CB137AADC3D775F639748E4A303415 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9427D33D9A21060CC4CC8E4507E7CFAD /* Result.swift */; }; - 85EB3D734B4186FE763550CA83E6E858 /* Observable+Aggregate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA266CC66D3EC65E521FA4162D360F99 /* Observable+Aggregate.swift */; }; - 8772CA6372E9CA1C2844E0DC2EB52CB2 /* Reactive.swift in Sources */ = {isa = PBXBuildFile; fileRef = 863C51FEA45A7EDE989AC2754CDD717C /* Reactive.swift */; }; - 87A6F6E1EFF2432FEF426AACCA7672BB /* Variable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04314B6B8716BBC1C296C41E570D781D /* Variable.swift */; }; - 89E8BC1E18BB887B569C4F17CBF9BC21 /* AsyncLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = E518D6231CACDB520F43AB4E8F044F7A /* AsyncLock.swift */; }; - 8AF174F050E51E32AF95469FD8910010 /* Observable+ObjectMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4A41A1EFD287ADC8565B46439DFC266 /* Observable+ObjectMapper.swift */; }; - 8B5A74BFA2A85B41F5C9100055B9C428 /* Endpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA89D983DA12F498C2325A2BE8F733 /* Endpoint.swift */; }; - 8BC16C1AB440F23DB46E6CEE43B9F271 /* Concat.swift in Sources */ = {isa = PBXBuildFile; fileRef = E352691A70D68412A4A0795C783344A3 /* Concat.swift */; }; - 8C550DC81B578A597EA4E4E75E3C5997 /* TargetType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0865A76D93AA95B23295EE2BCF3BC18C /* TargetType.swift */; }; - 8CFECB306B3011D0733ABA8DCC1015AD /* ObserverBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5969ECA4583F5C37DC5FBA6ACAA544EA /* ObserverBase.swift */; }; - 8D1512733BA64A38509CA1F0A660FB3E /* Switch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95093E2F9D63EA61DB4DAE904E414937 /* Switch.swift */; }; - 8DD9818A5601E87E766E1A69042E27FE /* AddRef.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0955C8F4EEE352F4F3BB89BDD6435D23 /* AddRef.swift */; }; - 8F9C9D2863DF04D1B82569FB74F92B76 /* ResultExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 069941314ECEE9FA8027A5F8A227FF94 /* ResultExtensions.swift */; }; - 8FFA00CAA7FA099C963C0F8CA617A367 /* Scan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 721E0361F5BD3060CD61E41333AC4C8D /* Scan.swift */; }; - 901887B139E41DD2D179ED2A23A4B70A /* Generate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26D6FB3D54BF5F3F7B355A811BABC5F6 /* Generate.swift */; }; - 925DC13DFA8AE78DE71BE11F5C62903C /* Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F9CA1CA661AEDAD5A2067C8BDB787FC /* Map.swift */; }; - 92845F50C684624D41FCD9FA8A732D93 /* PrimitiveSequence+Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4472D43DC36B93B0AD3D2324A022BD31 /* PrimitiveSequence+Zip+arity.swift */; }; - 950648597FCE2A584C3FCC8E409FF443 /* Dematerialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = B41B5597DB477AB7287337E1EE3C7756 /* Dematerialize.swift */; }; - 96BA1F0C033A1766271910B4E6AC82F7 /* Bag.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED7C53165F3F31D1A0C8C198AD696B9F /* Bag.swift */; }; - 9700A49E90B452387D2CBB9E23C7D786 /* CurrentThreadScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF7114008E9479B082AECBF1E4A5B940 /* CurrentThreadScheduler.swift */; }; - 97BCD11B822E31AC7F4A4F048CA26052 /* SubscribeOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84D4210F88F6EF7B49E63115D1E62FB0 /* SubscribeOn.swift */; }; - 984BC87C7E893BAEBBF23CD760B84E1E /* Producer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B7651A3BECCAA054599F73243B3CB7F /* Producer.swift */; }; - 98ECF94F6E7F84B56FB762B98FA919F3 /* MoyaError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61E8E292AC6AFF21D423EDF3ED36D010 /* MoyaError.swift */; }; - 993A1E5EDCCB8C47CDDFA1687F931DE5 /* Zip+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0EC4E2078B430FE9F8672536722200A /* Zip+Collection.swift */; }; - 9A7B85EAA2A51F64BCA29067F5DC7D8B /* ObservableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71A192DA8427E760595C241A5AFFDF72 /* ObservableType.swift */; }; - 9A8D62DC7159E43B84095223BD3E5CDB /* Observable+Creation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D173C71BCA0EEB68789915CF5F191766 /* Observable+Creation.swift */; }; - 9BDBA2403372716AB15D531B33E0819D /* AnonymousObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD9B0A6DC72985BDA4754EA5E5CB07AA /* AnonymousObservable.swift */; }; - 9D0CB68921548770D3E8C6D8426F2A48 /* SerialDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 547E11C8EAF852818A6A4D608CE328A3 /* SerialDisposable.swift */; }; - 9D0F4FAB1EF3FCD14CBD5A93D95B6207 /* Catch.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC300EB7F7FA139928F6FFEEB3296AD1 /* Catch.swift */; }; - 9E809940ED4CD86D8A6D0D773B5B2A50 /* Observable+Concurrency.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDCA1BEBEA42409A71611FD24B58954C /* Observable+Concurrency.swift */; }; - 9E9354DCA18BE46AAAAC5338C88DDECD /* ToJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C18E8E928E48BDC1259CBBA11DB0F3 /* ToJSON.swift */; }; - 9EC63590781E69500F734CE9B454E9FE /* SingleAssignmentDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08EC66818EEE7440780A0483FF548F6A /* SingleAssignmentDisposable.swift */; }; - 9ED2BB2981896E0A39EFA365503F58CE /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = B483550D0EABCD7A18A27ACC8CCB69DF /* AFError.swift */; }; - 9F16D35045DAC73C05BE99C220B7E498 /* WithLatestFrom.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9B2274195EE237722674F6AEFFA5573 /* WithLatestFrom.swift */; }; - 9FF323881B6A787E163E7824EB03F288 /* Cancelable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83002D71F6C2A538E2978182ADCAFFE8 /* Cancelable.swift */; }; - A0964EB62F2DB350A969A8DC8CEF81D3 /* Observable+StandardSequenceOperators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06A276080DB9D3C2B9C7EEFD0570A670 /* Observable+StandardSequenceOperators.swift */; }; - A0ECE61C5E902F165BE28B6D6DBFB11E /* SynchronizedSubscribeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEE4E537DE5502F9377401CE6CFC70E6 /* SynchronizedSubscribeType.swift */; }; - A1E2E36B7BF79D24C0AF5FE249172120 /* DefaultIfEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 512139ACC7B2979F80FAC982F0DEA36D /* DefaultIfEmpty.swift */; }; - A24DAB3DED238E00758C268E995B7E73 /* Moya-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = BC64D2D57252E22F6FB7334A26BB9A40 /* Moya-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A2A6F71B727312BD45CC7A4AAD7B0AB7 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CA2A7E6BBAE7EF0D66E481D28618C44 /* NetworkReachabilityManager.swift */; }; - A368F15C924F588996B3365876C7A88D /* SkipUntil.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF523A051E4C232B87A58BFDCF30CA5B /* SkipUntil.swift */; }; - A6F179C0FD478E08A4C50AF1160DF4D0 /* OperationQueueScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22180E18B43026CD6CE1E8998EE15F6 /* OperationQueueScheduler.swift */; }; - A6F45D447E5A8E9CEB5E8E5C0E84683C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */; }; - A9005AC4AC9220336B29D7B057D0EF7B /* TransformType.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF4FE7D225298AEC8CB75B60A9CFA19A /* TransformType.swift */; }; - A9086E9CAEDB5F1144385BBFD8FCBF2F /* DateFormatterTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64980335396398C7FBAB1BA3E239DF56 /* DateFormatterTransform.swift */; }; - A9EEEA7477981DEEBC72432DE9990A4B /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 35E8D54A1971EB89FE89D4C8426891C5 /* Alamofire-dummy.m */; }; - ABB66F2AFFF577587F84A0FFDB8EF4D0 /* NetworkLoggerPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFC44176F598210ADBD3E383470714FB /* NetworkLoggerPlugin.swift */; }; - AD75968CA7B8D67F6BB9F3E7369240D0 /* Deprecated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3907CB168DF78B3C72A05AEDC2EA319D /* Deprecated.swift */; }; - AD779D324F289B9D75A700F384DE93DC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */; }; - ADB0D84CC07EECA99486F6F7C7A24CA5 /* Do.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD0ABD4914D2EE301F7AA43B4A12D682 /* Do.swift */; }; - AE1EF48399533730D0066E04B22CA2D6 /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AD834CFBDD48550EDAF21F31D167032 /* SessionManager.swift */; }; - AE6E5B80B4BBB8EDF5C7515B9E8C0055 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */; }; - AFE6CDA6AFDC813885E1640C037B532F /* Platform.Darwin.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0ED537BF046646C2C53B5881878C455 /* Platform.Darwin.swift */; }; - B0A8E8D7320DC23AEEC2ED34439D884E /* AnyObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5EE38E7FB91AA4AF88DBB6A67269E261 /* AnyObserver.swift */; }; - B2CBB9128902C1CDBD0B2A1C7DD17F59 /* ObserveOn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 541F38739DEE9642687281F0AB4AFDAD /* ObserveOn.swift */; }; - B3A17E35B391DA28195A889C979540A4 /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FA8811DC202DD7DDD832600E9FA64F1 /* Event.swift */; }; - B5982909C07F473AB5633DAB332EDF46 /* Buffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78ED1ABA505DCC8516D0016B7499D512 /* Buffer.swift */; }; - B5ACCF6D9EEA6074F66037D1396EE2B5 /* Observable+Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4C0B5AE187B86FDFAE2E9FAE10E7302 /* Observable+Debug.swift */; }; - B5C6D4544EE71387786B09CAC6DDB126 /* Property.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4365A2AB5A0772687317C91D2948110A /* Property.swift */; }; - B64425F3EEED0CE5889881B5E9E2E625 /* Never.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5344FF2D05FA74EC89EA389975D24554 /* Never.swift */; }; - B65FCF589DA398C3EFE0128064E510EC /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70B98B88A29190DF1D9046B75313A6F5 /* MultipartFormData.swift */; }; - B801D52816DF0D0326D2A87867513367 /* Moya+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DAA23E8CA642C818313760DEE872D76 /* Moya+Alamofire.swift */; }; - B841A940A08AE08C411F778E85D6A5A2 /* Observer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09F220F40C48109371DD3B972BC8211F /* Observer.swift */; }; - B8AC7A8094077E16A17F340769E7D6DC /* HexColorTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = F39DB37E28CA0B59F6EAB8F9341535BE /* HexColorTransform.swift */; }; - B9F44AD8EF027BE41B9CCF0A9AA579CD /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F38255D62E9D278E969DB4F061836F2F /* Timer.swift */; }; - BBEFE2F9CEB73DC7BD97FFA66A0D9D4F /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD72A25BD3A7D287FED5F3837E2F099A /* Validation.swift */; }; - BE5C67A07E289FE1F9BE27335B159997 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = E875A3259FA588A7BFA479448540897D /* ParameterEncoding.swift */; }; - BF2052DE8D309C5BA7295921E6135DB9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */; }; - BF6631BC5DAE90CD147EBEF561C4DB87 /* MoyaAvailability.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04EDFDD25786A3582B951724C7D2FB88 /* MoyaAvailability.swift */; }; - C4809B395ED9DA6B754944A80ADFD0AA /* EnumTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02829F9EC43F515274FB1074481F8B84 /* EnumTransform.swift */; }; - C8647B547B0AA650F2FD380DB4E13D6D /* Moya-ObjectMapper-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 62384D07F2721B9F6F37280C5563A146 /* Moya-ObjectMapper-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CA1BFF20FE43D75453B6F302BCD287DA /* Mappable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A4E045A2FEAE35414C860EE69E7BF86 /* Mappable.swift */; }; - CA4D15B078B3BD4B91C7849F16E040E1 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D443B303EF315755B19810A6928CC875 /* Alamofire.framework */; }; - CA60949CFD90255D0C31785A8428B8CE /* DispatchQueue+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B00B9BA2EE7FD9C4875DE894CC6A0F3 /* DispatchQueue+Extensions.swift */; }; - CB6D60925223897FFA2662667DF83E8A /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFA2975637898BE2E4745452FD2FA5B3 /* Response.swift */; }; - CD9270ED0DB978A37BBAE1D7AF54C3F4 /* ScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EAD4354AECCA4CA0188E9ED5D4B7980 /* ScheduledItem.swift */; }; - CE23A14BF39E3B069ABBA2D78A042D7E /* SynchronizedOnType.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFE18FFE311C803F1501AFE9840B4850 /* SynchronizedOnType.swift */; }; - CE752C436ABC8898B95A66D78CB8191B /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 941085FB48E505ED52FF2DFD9B570A8C /* Result.framework */; }; - CED27CF9BC6DEADC4034354FFD243D0A /* MapError.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF08EBF411883D53A25FF37FFA2CEC24 /* MapError.swift */; }; - CEF40EBDDFE583B854F7E9BCDF3EA797 /* TakeWhile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 450BB2F541C923DB26C66811CB4E93F5 /* TakeWhile.swift */; }; - CF39A869F4EC7228313BDDF36D9565CB /* ScheduledDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12F1244D10E55C3D0D44E5B32E114CC5 /* ScheduledDisposable.swift */; }; - D062E4840A006E91AB7E20D8843CD3EB /* Observable+Multiple.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC1CC8FE7C1707568F3CF44D87403355 /* Observable+Multiple.swift */; }; - D11FDF5AA69D08B83E8718C717957AF0 /* AccessTokenPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = B48C9F224CB97BCA0F526B6CE757E808 /* AccessTokenPlugin.swift */; }; - D20A69E3E808AFD0AE167E03094268C1 /* CombineLatest+Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27F4F2D54F853B9ABADEDC7188F43473 /* CombineLatest+Collection.swift */; }; - D2143DE4FC2628CC0E41EF58D263C20A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */; }; - D2D6D73DA2F023FA2E7B143443642610 /* Lifetime.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9169B63F6003C0F243F0388BF5958FF7 /* Lifetime.swift */; }; - D3A1BD21F5AA4FA25B799B68B54063E5 /* Moya-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 79433C83DBA7AF7AAF0E9931F79CDEFE /* Moya-dummy.m */; }; - D3C6B770C7598E9C1C3B9854136893F3 /* MoyaProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9B17B3054632B1067BBCA2C71A05333 /* MoyaProvider.swift */; }; - D4D36FE6280D716A7B2428DDD0795C2B /* InvocableType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E72FDC1493E8F5625DF4379C9BA5C01 /* InvocableType.swift */; }; - D85731A19947BC9DF5C852C55EF7CA1A /* HistoricalScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1252E1B22A22F475C12151241EFCA4A /* HistoricalScheduler.swift */; }; - DAF69EF73C887FA1D6BD8B789070DCFF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */; }; - DE1072C02E1C53397773CEBCC52B7AF4 /* DisposeBag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9237F94E8BAA36CA82EFBF39F965662F /* DisposeBag.swift */; }; - DE496B92F346321146865A90D9ED4299 /* PriorityQueue.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD92FA237FCFC2D9C81216D0EBACCAAF /* PriorityQueue.swift */; }; - E01BE28B086995CDED5EB65D92691076 /* ShareReplay1WhileConnected.swift in Sources */ = {isa = PBXBuildFile; fileRef = C357B7A689BF299853AB4DBCA4066AD0 /* ShareReplay1WhileConnected.swift */; }; - E10656661A6108001A523F897126F2CD /* InvocableScheduledItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = E351E6D538BA2A6289C52171C44274CA /* InvocableScheduledItem.swift */; }; - E16230D6FC8EB44F8B697FFB5CD6A25E /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEE360A15B39C568E762840D3A81CEEE /* Filter.swift */; }; - E180BA547AEDCE5786138D28AADA312C /* ObserverType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AF2389D69944D193711EBCE256D550F /* ObserverType.swift */; }; - E19E15DFDAF63418F901DFE39DABA5CC /* String+Rx.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3A65AF290BC5C0CE5D5AF1B2454E60A /* String+Rx.swift */; }; - E29E386B034313C62E76D5DFF609F830 /* ReactiveSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D3891B24536C2EEB56439F4AE948F504 /* ReactiveSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E38B5D9E5AAD37ACD84F32C34FD4C98B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */; }; - E5362121A30FEA455E7E6654111D38E0 /* Action.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B2E3A21F478613F90988F19F11E3569 /* Action.swift */; }; - E63D94CF23960E905978B3DAE95125D7 /* Cancellable.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD752EB8D371397CF0E0A452BFC6C66E /* Cancellable.swift */; }; - E6BD8CBF87FB37DC18F8F9E4300FE530 /* DispatchQueueConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D9789F67B20C11BE9288BBF80C538A2 /* DispatchQueueConfiguration.swift */; }; - E73DE9471C81DC527F5DF25F886F10E1 /* Debounce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 875489DE5BF92D2F4B1BBFCAC174EF6C /* Debounce.swift */; }; - E9674E861DAB4BD6475368C1E7F84098 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D443B303EF315755B19810A6928CC875 /* Alamofire.framework */; }; - EB11EC3B3706810D31F002F2D479975A /* TransformOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F74CF47C5DE7C590136CD81F9005DAE /* TransformOf.swift */; }; - EBCE7DBA3620ABF1556DF63807C44A1C /* AnonymousInvocable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64C3B69219C8DAC02F5F39DD4B190606 /* AnonymousInvocable.swift */; }; - EC408F9747A97C10C8FFF4CF8B637823 /* ElementAt.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB39F4C98DB2DA3F40DE8A32E7558771 /* ElementAt.swift */; }; - ED63927DE90D567408593796F02C51BE /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B94AD22D41BE0EAB831D4A1FEBD2635 /* Response.swift */; }; - EE5B4C0476634A4E8A622D28FFF5FC06 /* AnonymousDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAA9F221B24D7988307530A187CAD448 /* AnonymousDisposable.swift */; }; - EF16CC75D347186F4DD61A34DB325829 /* CredentialsPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB3363BA24CD0B09109B7746F6285B98 /* CredentialsPlugin.swift */; }; - EF6A3C105AFA2332D931D70A5E8DE01E /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9C57137B4028EDDFB13326F3B372094 /* Operators.swift */; }; - EFD264FC408EBF3BA2528E70B08DDD94 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5B0E739E5861FFF5C38D5227A4A389F /* Notifications.swift */; }; - F05D5EC4A3A3DE4FFC782BF61EAD21FC /* Observable+Binding.swift in Sources */ = {isa = PBXBuildFile; fileRef = EAEEE030CE34EBFEF0FAD1318244A197 /* Observable+Binding.swift */; }; - F11CB11BB3FA8065DDC719B339E3526E /* Optional.swift in Sources */ = {isa = PBXBuildFile; fileRef = D25145D395665027FD536D8204F2A151 /* Optional.swift */; }; - F2E82F7E4AADB73AD627E1558470034B /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48E9530C6F3DCB9C366850CA3F47B7B7 /* MultipartFormData.swift */; }; - F3DF171DAA677F58667F4B082DEB57DB /* Observable+Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29F88EE7273190FB76AA77203F0E09D9 /* Observable+Response.swift */; }; - F435B7412E256D199E674C234792B85B /* PublishSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4802F5EB9C4C88F88895D0E79CACB366 /* PublishSubject.swift */; }; - F5155D5C24499638C6C3124FC4FE4264 /* ImmutableMappable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0F089014191265414BFEE897D8AF3CC /* ImmutableMappable.swift */; }; - F6BC0D049730D4315FF3469ECBE981FB /* AsMaybe.swift in Sources */ = {isa = PBXBuildFile; fileRef = C117BF194A2FAB369D1E4E772735B1E4 /* AsMaybe.swift */; }; - F6BECD98B97CBFEBE2C96F0E9E72A6C0 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 852276A83C97D7B483AAD3516806EF85 /* ResponseSerialization.swift */; }; - F6EBAD7C469937AEDFC63FA87EBEA647 /* URLTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 228F82916F5D132DE5005BBAB76005B8 /* URLTransform.swift */; }; - F7531BCE8855F7B136327F3415C9ED8C /* Deprecations+Removals.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF59E24C322B9D2F5CD6280927C40466 /* Deprecations+Removals.swift */; }; - F78045F54417825F35CD7E0C5AD08677 /* Reduce.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC7FAF6B11CB54F533401E158C245898 /* Reduce.swift */; }; - F80AE7863D18839F34F60E5BCE111403 /* BehaviorSubject.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76263CF98FEED7B4665B6B14CB9D4F8 /* BehaviorSubject.swift */; }; - F8B3D3092ED0417E8CDF32033F6122F5 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2B5C81978957E54CCFB28F7091AD5D3 /* Alamofire.swift */; }; - FA455D54FB780C7DABD6EF04B119C852 /* InfiniteSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B323FC2F2AFFC1287FAEE9BF75E2A28 /* InfiniteSequence.swift */; }; - FC5075412755DDFAF3BBE70DACFAB357 /* Result-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B5CE459308136BFD7A23BAF2F50CE800 /* Result-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FC7A8735A166AEA5D225647264380BBF /* LockOwnerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7355FD9C656F3B499FFED26503A24844 /* LockOwnerType.swift */; }; - FCB654EDC72D1187C5573771EEFA3B7A /* BooleanDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF39CE1238BC9EF2D3214D7964EF396D /* BooleanDisposable.swift */; }; - FEA2B1A5B25AD071CBD711AEF3B9EE4F /* Materialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C4B16E320E5D74A88118C831CBBD69C /* Materialize.swift */; }; - FF1B28B0E4069ADCCDDE21DCC00A09CE /* Pods-Demo-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C5BC86D40B890A7B0844F888209CA06F /* Pods-Demo-dummy.m */; }; - FF61036330EB6DE42465B6D8BE2DD8A4 /* Take.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC4CFA50086C81153480348C921E9D7E /* Take.swift */; }; + 016F5DCE78049592DA9F9A1066F666BB /* NSDecimalNumberTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F2078DCDEA30A414D2697107BC790EC /* NSDecimalNumberTransform.swift */; }; + 08590DAF0E5ACBBB6350FC6FE372338E /* Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = E3387B663EB69B620C91F0E12EBCD182 /* Map.swift */; }; + 0C6C2653EECAA533DD114CE29079640B /* AccessTokenPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BB54D3FDFD46C1C70DF6BC561A5CF33 /* AccessTokenPlugin.swift */; }; + 0E5462C516F9BDD82F954825924B4ABE /* ObjectMapper-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B5F442785A210EC56C3BD176B23B3F20 /* ObjectMapper-dummy.m */; }; + 108BEFE8654D69EE6E963A52E2EA91D6 /* FromJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = D31B4AF8BA0DB7F777930FB26C31E747 /* FromJSON.swift */; }; + 10EB23E9ECC4B33E16933BB1EA560B6A /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92A77CADD4F761989C665109AD7BAB46 /* Timeline.swift */; }; + 1696B0E2B6A79368FDB8328CAAF86C05 /* DataTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFC5B404F6D3614DEEA42FBC64D95BED /* DataTransform.swift */; }; + 19FAF6873559665BCBDABF0D516A64A4 /* MultiTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA0E8B311390639742CBBDA672B7DC9B /* MultiTarget.swift */; }; + 1B9EDEDC964E6B08F78920B4F4B9DB84 /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 59503DDA43A5EF5587C9414186E5662C /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1E551D6261B9CA27BD3D6B763B9FBBC1 /* Mapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = E599388093916828E5D94CD3B257F434 /* Mapper.swift */; }; + 259AA2985037A91CFB5F1589C55F63CC /* DateTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC36512D95EECE880A9E926186132940 /* DateTransform.swift */; }; + 2B851FE95CDFEE93B7DBCE96FB37A4F6 /* URLTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61861F43A5B8F9D32CAD215C8DD6B884 /* URLTransform.swift */; }; + 31E2C47C2555D6199B14D3FCA82E6FA2 /* MapError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FCAB8EB3E96133C136248D5576CF909 /* MapError.swift */; }; + 349D10D78FEB4E9E72E2F63C8083D616 /* EnumTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4121B29C69055D4024A52A1988F2404 /* EnumTransform.swift */; }; + 3626B94094672CB1C9DEA32B9F9502E1 /* TaskDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9344830916D9873DF00E10193EC83FB /* TaskDelegate.swift */; }; + 362D09614DDFE12D6B1A169D07E34955 /* MoyaProvider+Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2873431E75317CF2F957E7E65D90F25E /* MoyaProvider+Defaults.swift */; }; + 368EE849358D9D60DFBA7BE2806C2D97 /* TransformOperators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88B49E4248E1EFE0B55CA03D2F6A4DF6 /* TransformOperators.swift */; }; + 41B695C8BB20624433D2EEE9C7DB01BB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BAFDC003EF1F886338ADA5E64D3C805F /* Foundation.framework */; }; + 42352574494E4F44BF4D19F6A32D14BF /* Moya-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B0137EE1A0AE89FB1469D32BC789FB6 /* Moya-dummy.m */; }; + 4418C8657F31E73C66BF9578205DC3C7 /* MoyaError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C0C12FB5B1160B1601B851FDB3F79ED /* MoyaError.swift */; }; + 4D0E6BE561959AF00C65003885C8A4BF /* ObjectMapper.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4AA4B6ED2D05BD3DA851DB3854CFBBF9 /* ObjectMapper.framework */; }; + 4FB1845AF74A773450E84C90E293CF2A /* NetworkLoggerPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DA2DC0EAA1A8E61424964ED76F19FB6 /* NetworkLoggerPlugin.swift */; }; + 4FDA5B6636B138C43246AD98F971CA2B /* ToJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19923E37970DD593220E43FC7051C147 /* ToJSON.swift */; }; + 50AADB03EEE03971420E193BE4F2A1F4 /* EnumOperators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43CD2FC145E05708245FD9B91943A72D /* EnumOperators.swift */; }; + 5387216E723A3C68E851CA15573CDD71 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61EAB337B1F7EA5E772864125CB1AB43 /* Request.swift */; }; + 574D806991FD44BBA298169DF048A572 /* CredentialsPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90FEC72F7F380429E61EA2CD851315CC /* CredentialsPlugin.swift */; }; + 5A7600D41031DA30BDB6FD7882792C46 /* ResultProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA55B04A2F2C9EA141DF995EBBBBA916 /* ResultProtocol.swift */; }; + 61200D01A1855D7920CEF835C8BE00B0 /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = D759C20AC8BFFD6BBF9FC7CE2A680244 /* DispatchQueue+Alamofire.swift */; }; + 62A36077DDBB4D6A582AFEFFACC659CA /* MoyaProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74FD38960945B76B11B050D52218B482 /* MoyaProvider.swift */; }; + 62F65AD8DC4F0F9610F4B8B4738EC094 /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B98144400337259E98FCB5B184CD46E /* ServerTrustPolicy.swift */; }; + 6BA9E5D773052DBCD13B1DB7527FBF86 /* ImmutableMappable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4348DBC880EAF8CA8AD286B2CE8095F /* ImmutableMappable.swift */; }; + 6E024E5D4101ED5C23ACFBDB1C4A1D70 /* Endpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = E729FE5E80F2E2AB50BCE24222FCFF8C /* Endpoint.swift */; }; + 70878E4B770F3F62810ABE294EC5D016 /* Mappable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC6098D94F54AD0D03E502C500DD4521 /* Mappable.swift */; }; + 73B9C996AED49ED7CF8EC2A6F1738059 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BAFDC003EF1F886338ADA5E64D3C805F /* Foundation.framework */; }; + 74B6D1A8230C28C657193D9F30FB1ED5 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EACB6A2A4D2FF9431DC5B3D340B5F73 /* MultipartFormData.swift */; }; + 763CCB40A53380EED44F049AF772EA07 /* Pods-Demo-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 03EA1E60232BFA05817BC26ACB8E68BA /* Pods-Demo-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7877064BA276437D24E9E1C06AEB0441 /* CustomDateFormatTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40E053AB72ADDF93BA3E65854DD31DF7 /* CustomDateFormatTransform.swift */; }; + 78FE9B53DF05C8CDD2A665F8579A314C /* Result-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D10BA1D7EBE6C8BF508A17B3C0BE2936 /* Result-dummy.m */; }; + 792297F58B43A4A9F7C0AAECE33DE1A3 /* TransformType.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF02FD893B4411DB960C342A433C446B /* TransformType.swift */; }; + 793D20AC0C4410895657E43E42FE4F48 /* Result-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A7247C35642C6E18E1E0ECE44092142 /* Result-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7A689CB0C0925A6E162FBAED469EF754 /* Pods-Demo-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C5BC86D40B890A7B0844F888209CA06F /* Pods-Demo-dummy.m */; }; + 7B5FE28C7EA4122B0598738E54DBEBD8 /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B5E0D743F446BF327DAC3D3D835FA54 /* SessionDelegate.swift */; }; + 7D8CC01E8C9EFFF9F4D65406CDE0AB66 /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B9C23EDF36E7F2F816612823F05421D /* Result.swift */; }; + 7E6E34C212041337189F111719D26698 /* MoyaProvider+Internal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93ED444A4B08B56B6ADF93D677BB4CB5 /* MoyaProvider+Internal.swift */; }; + 8554FDD63A222310587233F10F1B2D85 /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9B1A2DE58691388097422B9FD2C410C /* Image.swift */; }; + 912AEB85DFD8A8F6C3ECBCA8739F6D3B /* Moya-ObjectMapper-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1B2C695B0BE5E7E396ED8A2E4C689838 /* Moya-ObjectMapper-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 924479FFEAFF6111EDA3A90BA719D36A /* ISO8601DateTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8F4D55E0B456743933BF3C9FCC02DB5 /* ISO8601DateTransform.swift */; }; + 9A006942DB4789D53C45C8D1670E3054 /* TargetType.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7AFB0CEAEBD66866383FD2E7844C8DD /* TargetType.swift */; }; + 9ED2BB2981896E0A39EFA365503F58CE /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAE850DBB38E8873D1850C9311BD9974 /* AFError.swift */; }; + A2A6F71B727312BD45CC7A4AAD7B0AB7 /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A582E80B8CFA3E48F5B477F2BA2965E /* NetworkReachabilityManager.swift */; }; + A9EEEA7477981DEEBC72432DE9990A4B /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 21449410DC6A0D49ACE25200C84D04C3 /* Alamofire-dummy.m */; }; + AD1996CB888174F24B80DF8F348E508F /* DateFormatterTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA5C4ADF070B443469DD9B817E2628B0 /* DateFormatterTransform.swift */; }; + AE1EF48399533730D0066E04B22CA2D6 /* SessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A49EF6210F5179725AEEFA7FD12EA687 /* SessionManager.swift */; }; + B65FCF589DA398C3EFE0128064E510EC /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD6BF40A2D5F8A9F4F7C0206DEB801D7 /* MultipartFormData.swift */; }; + BA4F44E8CD8ECF8E33AE951448BDA8E5 /* Moya+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 395804EB89C8420229ADDB1C3D667512 /* Moya+Alamofire.swift */; }; + BBEFE2F9CEB73DC7BD97FFA66A0D9D4F /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A0B3E5A1D43566CE9B79B921CF6E1B7 /* Validation.swift */; }; + BDD34D624EF75D4A8C599E234ABB425A /* Plugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6550E0325CFB935CFCB031648A7F8B7 /* Plugin.swift */; }; + BE5C67A07E289FE1F9BE27335B159997 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 013C33A42B0DB5557FCBFBEAF1BCBE6B /* ParameterEncoding.swift */; }; + BECBD02FE80EE5891C2A5DB54C1E306D /* Result.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9746C71C483A1C4640718C9BBD7A590 /* Result.swift */; }; + C22CD02C8A69F8D6C5A6AC294DABC0B5 /* IntegerOperators.swift in Sources */ = {isa = PBXBuildFile; fileRef = D82946A0D295761EE37B4A43F43AB79E /* IntegerOperators.swift */; }; + C67A1841438E37F75854C59135D12638 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BAFDC003EF1F886338ADA5E64D3C805F /* Foundation.framework */; }; + C86CA08AE851244279CA3F9B57ADAE96 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BAFDC003EF1F886338ADA5E64D3C805F /* Foundation.framework */; }; + CB6D60925223897FFA2662667DF83E8A /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 334B41B0A52B782DE441532AA6A85CBC /* Response.swift */; }; + CF6C7CEF81CB840D6ABC54F45FBA37C3 /* Cancellable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66F99F38D69DD00230B7D924890E476D /* Cancellable.swift */; }; + D2096F894CEB71E86585445E1A6BB15E /* MoyaAvailability.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62726FB095063F9E353C02BE2C4F6F70 /* MoyaAvailability.swift */; }; + D9D10E109F26763E7F2B49024AC10D8B /* HexColorTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4969F96A4A144D7292FE42C3923AA3B8 /* HexColorTransform.swift */; }; + DB0717B9962D0455AF413525BC929DE5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BAFDC003EF1F886338ADA5E64D3C805F /* Foundation.framework */; }; + DD7659D3BD5BFBE56442531B651CD704 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A343E96349DE4EA0B9DF6C29BA90A286 /* Alamofire.framework */; }; + DF8A32F7C63F3DFE57E209A2563EC490 /* Moya.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20D9B9A9AA661504922DB840287D0F36 /* Moya.framework */; }; + E101BB35F7C470411D1963A68D528593 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA9A30146C65C03BDACA599000D7BB97 /* Result.framework */; }; + E454625842032CE9948636C13EF18692 /* ObjectMapper-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F10BE00775897D25E7A12F91969F4C9 /* ObjectMapper-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E6AC3124324A09BCE9B7AADBDAF31F72 /* Moya-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 6469FC24D84BC9964D815C101A54129D /* Moya-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E6D73C99746FF2CEBB61C53D0BA6BA41 /* Response+ObjectMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = A11222F9D813A8D7882AF69CA5EA991A /* Response+ObjectMapper.swift */; }; + EBC5840E357A651E7AA35FC19AB5C006 /* NetworkActivityPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = C613490EC475967C38AC59993BEAAA5F /* NetworkActivityPlugin.swift */; }; + EEC0711CD2D65D50545963611F2BC091 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BAFDC003EF1F886338ADA5E64D3C805F /* Foundation.framework */; }; + EFD264FC408EBF3BA2528E70B08DDD94 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE2D5687C27DC946C3C1F3DC1842553D /* Notifications.swift */; }; + F4DC51B4DACF9A6BD61201BC3A8529F8 /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5D52BBE6D6374C9938AE58D8D3879B9 /* Response.swift */; }; + F6BECD98B97CBFEBE2C96F0E9E72A6C0 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79D9882980381D4325EE1A76440897C0 /* ResponseSerialization.swift */; }; + F8B3D3092ED0417E8CDF32033F6122F5 /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 514ACFF0A1456742CDBCD177D914BB41 /* Alamofire.swift */; }; + FA8536C94898E642793F533BC35DDD93 /* Operators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1865FCE7874B46A3920EA3DEC4AB1048 /* Operators.swift */; }; + FB33014C77D6CDB8A9D8CA13F093C8F6 /* DictionaryTransform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42AD6850922BEBA0A7A8C82B7D577C3D /* DictionaryTransform.swift */; }; + FC7F2B1276ABF6A3D58546114F63F0CA /* TransformOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65AC7F7CCAFFD28A95E6ECC0E6C2A49F /* TransformOf.swift */; }; + FF77B0DF996E2D2DC5EE814B572FED64 /* Moya-ObjectMapper-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C1BDF7BB1D4FDC8F5E7304800098135C /* Moya-ObjectMapper-dummy.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 35B40C47871A2BFB66B1DF89719C2C43 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = EFDB85DF4827734B35E8A46720ACAEE0; - remoteInfo = Result; - }; - 448CBA2B5AAF3C314D4E4B32B447453F /* PBXContainerItemProxy */ = { + 2AEB141962859E6E03DA2FF7C69888F2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; remoteGlobalIDString = 88E9EC28B8B46C3631E6B242B50F4442; remoteInfo = Alamofire; }; - 563430843E61782275D71EED528CBEFF /* PBXContainerItemProxy */ = { + 416E924213AF02AE6A6EC230EEEF18FF /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; remoteGlobalIDString = 88E9EC28B8B46C3631E6B242B50F4442; remoteInfo = Alamofire; }; - 5C018009CFFB83E9435346DF3A9FFD0D /* PBXContainerItemProxy */ = { + 4257252C3214AFC40F9F41A9ECBD1419 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = EFDB85DF4827734B35E8A46720ACAEE0; + remoteGlobalIDString = 1215771836B84E9F9899950098D2FF80; remoteInfo = Result; }; - 6E912DC97156EABFDE2C4B6EF06784DF /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 421F6BEF92744C4CA9E5F012EC4C5C8F; - remoteInfo = ObjectMapper; - }; - 799FA77BC02BC3B70E591F74839DDAE4 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = FDF0AE36CC489EF7ECB20E4E8C5EC6E5; - remoteInfo = ReactiveSwift; - }; - 8FAC931D00AB3A674FF42918D2F7109F /* PBXContainerItemProxy */ = { + 47F3952E44EF6FD16AE37E54849B127E /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = C419A9BCC9AACDC44A26B80764B6B554; - remoteInfo = RxSwift; + remoteGlobalIDString = CF9F83025EEE1E89490800018F391A28; + remoteInfo = "Moya-ObjectMapper"; }; - A1AF79BA4FFB31FAEFB631D90EA93418 /* PBXContainerItemProxy */ = { + 58E2F4731F808540FC0434BAADAA5650 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = EFDB85DF4827734B35E8A46720ACAEE0; + remoteGlobalIDString = 1215771836B84E9F9899950098D2FF80; remoteInfo = Result; }; - A3DE26FFB53C6E483B9E9E586F64C58E /* PBXContainerItemProxy */ = { + 5FFD80BEA33A9D9B35CFE6E85A8ACB05 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 2A6D0851BA24DD25864CB23A3A83B9CC; + remoteGlobalIDString = 52ACA0236F086E72B74F0A090A743D41; remoteInfo = Moya; }; - A3E49214DCAD05F7955595F8042E3AA2 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = EFDB85DF4827734B35E8A46720ACAEE0; - remoteInfo = Result; - }; - CBB41F96F2BCDB97F851ED133FC81786 /* PBXContainerItemProxy */ = { + 7D925F1D7B9FB97BEC1CA8B1BBC71DE2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 421F6BEF92744C4CA9E5F012EC4C5C8F; + remoteGlobalIDString = B27F1F7B862582A90168D876BFA178C0; remoteInfo = ObjectMapper; }; - D34606F68216E7E7B0E351AA2C8ADF14 /* PBXContainerItemProxy */ = { + 890A71BBBFCC5F1362BB1AD1CAD8CC84 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 49C6564B2E2D0A1604946BAD65772E21; - remoteInfo = "Moya-ObjectMapper"; + remoteGlobalIDString = B27F1F7B862582A90168D876BFA178C0; + remoteInfo = ObjectMapper; }; - D7002BCB9BC9247E198B9809447F6EF6 /* PBXContainerItemProxy */ = { + 9C43B6F8E05C87B75135D31D6FBE93CB /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 2A6D0851BA24DD25864CB23A3A83B9CC; + remoteGlobalIDString = 52ACA0236F086E72B74F0A090A743D41; remoteInfo = Moya; }; - E8E16664D5BFAA9326D20B666C748F50 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = C419A9BCC9AACDC44A26B80764B6B554; - remoteInfo = RxSwift; - }; - EEA2469DF649FCFD5814639A808C1C6A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 88E9EC28B8B46C3631E6B242B50F4442; - remoteInfo = Alamofire; - }; - FA50F55E715BCB4DB08596E4D2F259BD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = C419A9BCC9AACDC44A26B80764B6B554; - remoteInfo = RxSwift; - }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 001EFFE7D56D6AB9A1B0174B1E4DCC82 /* ImmediateSchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmediateSchedulerType.swift; path = RxSwift/ImmediateSchedulerType.swift; sourceTree = ""; }; - 02195DED2D688E2BBFA361F58068011C /* DateTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DateTransform.swift; path = Sources/DateTransform.swift; sourceTree = ""; }; - 02829F9EC43F515274FB1074481F8B84 /* EnumTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EnumTransform.swift; path = Sources/EnumTransform.swift; sourceTree = ""; }; - 0323144B011FDDF6827A6B8DBA85B00B /* AsSingle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsSingle.swift; path = RxSwift/Observables/Implementations/AsSingle.swift; sourceTree = ""; }; + 013C33A42B0DB5557FCBFBEAF1BCBE6B /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; 03EA1E60232BFA05817BC26ACB8E68BA /* Pods-Demo-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Demo-umbrella.h"; sourceTree = ""; }; - 04314B6B8716BBC1C296C41E570D781D /* Variable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Variable.swift; path = RxSwift/Subjects/Variable.swift; sourceTree = ""; }; - 04B07C2108E8AEAA49EC11D232391921 /* Observable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Observable.swift; path = RxSwift/Observable.swift; sourceTree = ""; }; - 04EDFDD25786A3582B951724C7D2FB88 /* MoyaAvailability.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaAvailability.swift; path = Sources/Moya/MoyaAvailability.swift; sourceTree = ""; }; - 05788979F32B6C5DF30DD0FD687D5936 /* MoyaProvider+Internal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Internal.swift"; path = "Sources/Moya/MoyaProvider+Internal.swift"; sourceTree = ""; }; - 059700FB972CCDBE4E13C737B053F05C /* RefCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RefCount.swift; path = RxSwift/Observables/Implementations/RefCount.swift; sourceTree = ""; }; - 069941314ECEE9FA8027A5F8A227FF94 /* ResultExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResultExtensions.swift; path = Sources/ResultExtensions.swift; sourceTree = ""; }; - 06A276080DB9D3C2B9C7EEFD0570A670 /* Observable+StandardSequenceOperators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+StandardSequenceOperators.swift"; path = "RxSwift/Observables/Observable+StandardSequenceOperators.swift"; sourceTree = ""; }; - 079F5BAE309C0CA01FCDB9DDDE38383F /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; - 0865A76D93AA95B23295EE2BCF3BC18C /* TargetType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TargetType.swift; path = Sources/Moya/TargetType.swift; sourceTree = ""; }; - 08EC66818EEE7440780A0483FF548F6A /* SingleAssignmentDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAssignmentDisposable.swift; path = RxSwift/Disposables/SingleAssignmentDisposable.swift; sourceTree = ""; }; - 0955C8F4EEE352F4F3BB89BDD6435D23 /* AddRef.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AddRef.swift; path = RxSwift/Observables/Implementations/AddRef.swift; sourceTree = ""; }; - 0987593EA2560AA5A3F092B2FBC00C33 /* Result-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-prefix.pch"; sourceTree = ""; }; - 09F220F40C48109371DD3B972BC8211F /* Observer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Observer.swift; path = Sources/Observer.swift; sourceTree = ""; }; - 0B94AD22D41BE0EAB831D4A1FEBD2635 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Sources/Moya/Response.swift; sourceTree = ""; }; - 0BECA3CFB229CD34026ABBD1E893ABD8 /* ReactiveSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ReactiveSwift.xcconfig; sourceTree = ""; }; - 0C7805AC2429FAFC54029B4782D5F6A7 /* Moya.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Moya.xcconfig; sourceTree = ""; }; - 0D9789F67B20C11BE9288BBF80C538A2 /* DispatchQueueConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DispatchQueueConfiguration.swift; path = RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift; sourceTree = ""; }; - 0EAD4354AECCA4CA0188E9ED5D4B7980 /* ScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItem.swift; path = RxSwift/Schedulers/Internal/ScheduledItem.swift; sourceTree = ""; }; - 0F64DD81F831A11D65AE6504A27763B1 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Alamofire.modulemap; sourceTree = ""; }; - 10F5D71DF2264812C5731C22EE801A5A /* AnonymousObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousObserver.swift; path = RxSwift/Observers/AnonymousObserver.swift; sourceTree = ""; }; - 12F1244D10E55C3D0D44E5B32E114CC5 /* ScheduledDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledDisposable.swift; path = RxSwift/Disposables/ScheduledDisposable.swift; sourceTree = ""; }; - 16A860D8F4BF07CDAABA319C5E5658A4 /* Moya.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Moya.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 16AC502307017147E0782DA0BE937992 /* RecursiveScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveScheduler.swift; path = RxSwift/Schedulers/RecursiveScheduler.swift; sourceTree = ""; }; - 1A6D71F9BF566B4365BE46AB589E7461 /* TransformOperators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TransformOperators.swift; path = Sources/TransformOperators.swift; sourceTree = ""; }; - 1C971A44E2F3D8336CF0FA86D1488C8C /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; - 1EBA89D983DA12F498C2325A2BE8F733 /* Endpoint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Endpoint.swift; path = Sources/Moya/Endpoint.swift; sourceTree = ""; }; - 1EE119E337ADA617EC124C5243D01215 /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; - 1FB6A4378F9D1425C55DF338352E66CA /* Debug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debug.swift; path = RxSwift/Observables/Implementations/Debug.swift; sourceTree = ""; }; - 1FD4883583337FBFDD03E78A3D2FB8B4 /* Sequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sequence.swift; path = RxSwift/Observables/Implementations/Sequence.swift; sourceTree = ""; }; - 205BBF1AA90ABD220FCD3EC814B1E0D7 /* Moya.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Moya.framework; path = Moya.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 20AEF3C06A5DFD905B23CA9F2E2425FE /* NSDecimalNumberTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NSDecimalNumberTransform.swift; path = Sources/NSDecimalNumberTransform.swift; sourceTree = ""; }; - 21888844E9B22E9A361BF543DF18D25D /* Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Rx.swift; path = RxSwift/Rx.swift; sourceTree = ""; }; - 21EC236CC3C0F46D0FE4C03207C993F2 /* Window.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Window.swift; path = RxSwift/Observables/Implementations/Window.swift; sourceTree = ""; }; - 228F82916F5D132DE5005BBAB76005B8 /* URLTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = URLTransform.swift; path = Sources/URLTransform.swift; sourceTree = ""; }; - 23351BF9B507AE749916B9647001DB83 /* HistoricalSchedulerTimeConverter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalSchedulerTimeConverter.swift; path = RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift; sourceTree = ""; }; - 24FBE73466F8534532B774BBAC7F2BFB /* RxSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = RxSwift.xcconfig; sourceTree = ""; }; - 2686171BA16348F07095C4FE784112A0 /* ISO8601DateTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ISO8601DateTransform.swift; path = Sources/ISO8601DateTransform.swift; sourceTree = ""; }; - 26D6FB3D54BF5F3F7B355A811BABC5F6 /* Generate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Generate.swift; path = RxSwift/Observables/Implementations/Generate.swift; sourceTree = ""; }; - 27C0B04261BDBBFD9B29D09D21BD1585 /* ReplaySubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ReplaySubject.swift; path = RxSwift/Subjects/ReplaySubject.swift; sourceTree = ""; }; - 27F4F2D54F853B9ABADEDC7188F43473 /* CombineLatest+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+Collection.swift"; path = "RxSwift/Observables/Implementations/CombineLatest+Collection.swift"; sourceTree = ""; }; - 28297762695E3A606FF79D55CD44A1E8 /* RecursiveLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveLock.swift; path = Platform/RecursiveLock.swift; sourceTree = ""; }; - 29F88EE7273190FB76AA77203F0E09D9 /* Observable+Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Response.swift"; path = "Sources/RxMoya/Observable+Response.swift"; sourceTree = ""; }; - 2A2A274B029E7DBF68ECEBC41DB939D1 /* RxSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-umbrella.h"; sourceTree = ""; }; - 2B87CCF9A5173095B333FB06CA24E143 /* ObjectMapper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ObjectMapper.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2CAAA0D52FCA1C1DEC597260623EF2A5 /* CustomDateFormatTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CustomDateFormatTransform.swift; path = Sources/CustomDateFormatTransform.swift; sourceTree = ""; }; - 2E03DD3956442CB4D8565AD68A91D369 /* StartWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StartWith.swift; path = RxSwift/Observables/Implementations/StartWith.swift; sourceTree = ""; }; - 2F11037BCF62A8272D103B2E0875AD7F /* SubjectType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubjectType.swift; path = RxSwift/Subjects/SubjectType.swift; sourceTree = ""; }; + 0BF0FE4A53B4C66F9C0E7CE83972F235 /* Result-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-prefix.pch"; sourceTree = ""; }; + 0F10BE00775897D25E7A12F91969F4C9 /* ObjectMapper-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ObjectMapper-umbrella.h"; sourceTree = ""; }; + 16793EEB2074C9CC3EE2B1F07EA49DF4 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1865FCE7874B46A3920EA3DEC4AB1048 /* Operators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Operators.swift; path = Sources/Operators.swift; sourceTree = ""; }; + 19923E37970DD593220E43FC7051C147 /* ToJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToJSON.swift; path = Sources/ToJSON.swift; sourceTree = ""; }; + 1B2C695B0BE5E7E396ED8A2E4C689838 /* Moya-ObjectMapper-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-ObjectMapper-umbrella.h"; sourceTree = ""; }; + 1CC63217A3BA783AFEB9C34A57FB4641 /* Moya_ObjectMapper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Moya_ObjectMapper.framework; path = "Moya-ObjectMapper.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 20D9B9A9AA661504922DB840287D0F36 /* Moya.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Moya.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 21449410DC6A0D49ACE25200C84D04C3 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; + 2873431E75317CF2F957E7E65D90F25E /* MoyaProvider+Defaults.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Defaults.swift"; path = "Sources/Moya/MoyaProvider+Defaults.swift"; sourceTree = ""; }; + 28E6F8F4F5102C758400F9A91C6931AA /* Moya-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-prefix.pch"; sourceTree = ""; }; + 2C0C12FB5B1160B1601B851FDB3F79ED /* MoyaError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaError.swift; path = Sources/Moya/MoyaError.swift; sourceTree = ""; }; 322419E99883B306EE7EC77959FCC8DF /* Pods-Demo.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-Demo.modulemap"; sourceTree = ""; }; - 3385E307C8C0628285FFAC438D4B6E7D /* SerialDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDispatchQueueScheduler.swift; path = RxSwift/Schedulers/SerialDispatchQueueScheduler.swift; sourceTree = ""; }; - 33CBA7B0F508B12B0E6ABA92500E3EC2 /* Throttle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Throttle.swift; path = RxSwift/Observables/Implementations/Throttle.swift; sourceTree = ""; }; - 353118FBD87FF65111631E0E224F8A29 /* EventLogger.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EventLogger.swift; path = Sources/EventLogger.swift; sourceTree = ""; }; - 35D64D5D6EAE2F4029F0EE7D6856F4DB /* TailRecursiveSink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TailRecursiveSink.swift; path = RxSwift/Observers/TailRecursiveSink.swift; sourceTree = ""; }; - 35E8D54A1971EB89FE89D4C8426891C5 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; - 374F5979FAFC0F8EDB295BC6AF726210 /* EnumOperators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EnumOperators.swift; path = Sources/EnumOperators.swift; sourceTree = ""; }; - 3907CB168DF78B3C72A05AEDC2EA319D /* Deprecated.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deprecated.swift; path = RxSwift/Deprecated.swift; sourceTree = ""; }; - 39E05E41EC88853ABC2E4FE509051C89 /* VirtualTimeConverterType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeConverterType.swift; path = RxSwift/Schedulers/VirtualTimeConverterType.swift; sourceTree = ""; }; - 3B2E3A21F478613F90988F19F11E3569 /* Action.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Action.swift; path = Sources/Action.swift; sourceTree = ""; }; - 3B323FC2F2AFFC1287FAEE9BF75E2A28 /* InfiniteSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InfiniteSequence.swift; path = Platform/DataStructures/InfiniteSequence.swift; sourceTree = ""; }; - 3C0A8A53B1859DFABE02D98FD7DF7170 /* GroupBy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupBy.swift; path = RxSwift/Observables/Implementations/GroupBy.swift; sourceTree = ""; }; + 325BC9271672C4E29F980B567E8CA553 /* Moya-ObjectMapper.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Moya-ObjectMapper.xcconfig"; sourceTree = ""; }; + 334B41B0A52B782DE441532AA6A85CBC /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; + 35E19B5A44F377A7681B3DFB6DE350CA /* Result.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Result.xcconfig; sourceTree = ""; }; + 395804EB89C8420229ADDB1C3D667512 /* Moya+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Moya+Alamofire.swift"; path = "Sources/Moya/Moya+Alamofire.swift"; sourceTree = ""; }; + 3AB7BC23968BB64D2C4A640E56778C4F /* ObjectMapper.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = ObjectMapper.modulemap; sourceTree = ""; }; 3CD5A30239C90F1B549B4AB9299ECF16 /* Pods-Demo-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Demo-frameworks.sh"; sourceTree = ""; }; 3D653C9DA16200D75AD14323AA830C6B /* Pods-Demo-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Demo-resources.sh"; sourceTree = ""; }; - 3E4EC7FEC4148FDD842B176028C55D7C /* RxMoyaProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxMoyaProvider.swift; path = Sources/RxMoya/RxMoyaProvider.swift; sourceTree = ""; }; - 3E928AE794F4E1E19A5AD255A37D6752 /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; - 403F223F4F7DD41EE472F87D183F1020 /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = RxSwift.framework; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 404D82726264603AD565560110967D32 /* InhabitableTypeGuards.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InhabitableTypeGuards.swift; path = Sources/InhabitableTypeGuards.swift; sourceTree = ""; }; - 408788B1F07BDFF8D6682B7D0F390607 /* Empty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Empty.swift; path = RxSwift/Observables/Implementations/Empty.swift; sourceTree = ""; }; - 41C6FA254A44FFC58952089BB7F468C9 /* Moya-ObjectMapper-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Moya-ObjectMapper-dummy.m"; sourceTree = ""; }; - 42090A07F20122A0BC3455BFA86F79A1 /* ValidatingProperty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ValidatingProperty.swift; path = Sources/ValidatingProperty.swift; sourceTree = ""; }; - 42D894EA6C6A47B6CFDE3704A55204D7 /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; - 4365A2AB5A0772687317C91D2948110A /* Property.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Property.swift; path = Sources/Property.swift; sourceTree = ""; }; - 4472D43DC36B93B0AD3D2324A022BD31 /* PrimitiveSequence+Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "PrimitiveSequence+Zip+arity.swift"; path = "RxSwift/Traits/PrimitiveSequence+Zip+arity.swift"; sourceTree = ""; }; - 450BB2F541C923DB26C66811CB4E93F5 /* TakeWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeWhile.swift; path = RxSwift/Observables/Implementations/TakeWhile.swift; sourceTree = ""; }; - 45839231A4901B0E5436EF73077831F0 /* Mapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Mapper.swift; path = Sources/Mapper.swift; sourceTree = ""; }; - 4802F5EB9C4C88F88895D0E79CACB366 /* PublishSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PublishSubject.swift; path = RxSwift/Subjects/PublishSubject.swift; sourceTree = ""; }; - 48E9530C6F3DCB9C366850CA3F47B7B7 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Sources/Moya/MultipartFormData.swift; sourceTree = ""; }; - 4A9E3FB60CB4A7D2085DAC4A5306B692 /* Observable+Single.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Single.swift"; path = "RxSwift/Observables/Observable+Single.swift"; sourceTree = ""; }; - 4AD834CFBDD48550EDAF21F31D167032 /* SessionManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionManager.swift; path = Source/SessionManager.swift; sourceTree = ""; }; - 4CA2A7E6BBAE7EF0D66E481D28618C44 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; - 4D0593D7232D6CD71C5F0AF9668BF14D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 4F56CB1AD0A49EC42E54D6467761239E /* ResultProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResultProtocol.swift; path = Result/ResultProtocol.swift; sourceTree = ""; }; - 4F74CF47C5DE7C590136CD81F9005DAE /* TransformOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TransformOf.swift; path = Sources/TransformOf.swift; sourceTree = ""; }; - 4F9CA1CA661AEDAD5A2067C8BDB787FC /* Map.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Map.swift; path = RxSwift/Observables/Implementations/Map.swift; sourceTree = ""; }; - 4FA8811DC202DD7DDD832600E9FA64F1 /* Event.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Event.swift; path = Sources/Event.swift; sourceTree = ""; }; - 512139ACC7B2979F80FAC982F0DEA36D /* DefaultIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DefaultIfEmpty.swift; path = RxSwift/Observables/Implementations/DefaultIfEmpty.swift; sourceTree = ""; }; - 533E4698572969FE535C01639240BD95 /* Queue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Queue.swift; path = Platform/DataStructures/Queue.swift; sourceTree = ""; }; - 5344FF2D05FA74EC89EA389975D24554 /* Never.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Never.swift; path = RxSwift/Observables/Implementations/Never.swift; sourceTree = ""; }; - 541F38739DEE9642687281F0AB4AFDAD /* ObserveOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserveOn.swift; path = RxSwift/Observables/Implementations/ObserveOn.swift; sourceTree = ""; }; - 547E11C8EAF852818A6A4D608CE328A3 /* SerialDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SerialDisposable.swift; path = RxSwift/Disposables/SerialDisposable.swift; sourceTree = ""; }; - 55F91E7D6B0D44079FA709F9FA6A475B /* NetworkActivityPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkActivityPlugin.swift; path = Sources/Moya/Plugins/NetworkActivityPlugin.swift; sourceTree = ""; }; - 5738BAEBE9590332CEC15173EF2E68E7 /* ReactiveSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = ReactiveSwift.modulemap; sourceTree = ""; }; - 57A565AA1BD6CD7E0C542B05BE4C9637 /* RxMutableBox.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RxMutableBox.swift; path = RxSwift/RxMutableBox.swift; sourceTree = ""; }; - 57C654F7468F90C4C3D24FED3C7F0D3E /* Just.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Just.swift; path = RxSwift/Observables/Implementations/Just.swift; sourceTree = ""; }; - 5920B5993039870B306EC532F225E154 /* DictionaryTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DictionaryTransform.swift; path = Sources/DictionaryTransform.swift; sourceTree = ""; }; - 5969ECA4583F5C37DC5FBA6ACAA544EA /* ObserverBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverBase.swift; path = RxSwift/Observers/ObserverBase.swift; sourceTree = ""; }; - 597A28C19BCCC57C5FFF4BF262CCAAF4 /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; - 5CB47DCB44972D5E0559F3BDACFD6BC7 /* ObjectMapper.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = ObjectMapper.modulemap; sourceTree = ""; }; - 5EE38E7FB91AA4AF88DBB6A67269E261 /* AnyObserver.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyObserver.swift; path = RxSwift/AnyObserver.swift; sourceTree = ""; }; - 60B30C90645517428578CA8F97388B23 /* DataTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DataTransform.swift; path = Sources/DataTransform.swift; sourceTree = ""; }; - 61E8E292AC6AFF21D423EDF3ED36D010 /* MoyaError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaError.swift; path = Sources/Moya/MoyaError.swift; sourceTree = ""; }; - 62384D07F2721B9F6F37280C5563A146 /* Moya-ObjectMapper-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-ObjectMapper-umbrella.h"; sourceTree = ""; }; - 6388C76E87715C20A6CC8DE03465171B /* RxSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "RxSwift-dummy.m"; sourceTree = ""; }; - 64980335396398C7FBAB1BA3E239DF56 /* DateFormatterTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DateFormatterTransform.swift; path = Sources/DateFormatterTransform.swift; sourceTree = ""; }; - 64C3B69219C8DAC02F5F39DD4B190606 /* AnonymousInvocable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousInvocable.swift; path = RxSwift/Schedulers/Internal/AnonymousInvocable.swift; sourceTree = ""; }; - 65EF88911B1EF37A8A6E08A5847C5CF0 /* Map.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Map.swift; path = Sources/Map.swift; sourceTree = ""; }; - 6705998374BDFFB7FECAF1532B835BE1 /* Atomic.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Atomic.swift; path = Sources/Atomic.swift; sourceTree = ""; }; - 678D1077D40DA503F57304A63179B726 /* RetryWhen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RetryWhen.swift; path = RxSwift/Observables/Implementations/RetryWhen.swift; sourceTree = ""; }; - 6804E8E2F017493A8ECEDBBCF0527D6F /* SkipWhile.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipWhile.swift; path = RxSwift/Observables/Implementations/SkipWhile.swift; sourceTree = ""; }; - 688D59A630A170299AE908873175B206 /* AsyncSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncSubject.swift; path = RxSwift/Subjects/AsyncSubject.swift; sourceTree = ""; }; - 694E66730BC717CAADA8FA907A1A5D67 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 6A02D79B87B95AAC12858D2761EFA288 /* Result-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Result-dummy.m"; sourceTree = ""; }; - 6B1F9906C460EF3154ED146983F06918 /* RefCountDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RefCountDisposable.swift; path = RxSwift/Disposables/RefCountDisposable.swift; sourceTree = ""; }; - 6E72FDC1493E8F5625DF4379C9BA5C01 /* InvocableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableType.swift; path = RxSwift/Schedulers/Internal/InvocableType.swift; sourceTree = ""; }; - 6F3FB9AB8D8CB0B217990A29076233B1 /* SingleAsync.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SingleAsync.swift; path = RxSwift/Observables/Implementations/SingleAsync.swift; sourceTree = ""; }; - 70B98B88A29190DF1D9046B75313A6F5 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; - 7134E6FE5CB1D5BBC04158D17EF07982 /* ReactiveSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ReactiveSwift-dummy.m"; sourceTree = ""; }; + 3EACB6A2A4D2FF9431DC5B3D340B5F73 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Sources/Moya/MultipartFormData.swift; sourceTree = ""; }; + 40E053AB72ADDF93BA3E65854DD31DF7 /* CustomDateFormatTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CustomDateFormatTransform.swift; path = Sources/CustomDateFormatTransform.swift; sourceTree = ""; }; + 42AD6850922BEBA0A7A8C82B7D577C3D /* DictionaryTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DictionaryTransform.swift; path = Sources/DictionaryTransform.swift; sourceTree = ""; }; + 43CD2FC145E05708245FD9B91943A72D /* EnumOperators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EnumOperators.swift; path = Sources/EnumOperators.swift; sourceTree = ""; }; + 4969F96A4A144D7292FE42C3923AA3B8 /* HexColorTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HexColorTransform.swift; path = Sources/HexColorTransform.swift; sourceTree = ""; }; + 4A0B3E5A1D43566CE9B79B921CF6E1B7 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; + 4A7247C35642C6E18E1E0ECE44092142 /* Result-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-umbrella.h"; sourceTree = ""; }; + 4AA4B6ED2D05BD3DA851DB3854CFBBF9 /* ObjectMapper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ObjectMapper.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 4B5E0D743F446BF327DAC3D3D835FA54 /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; + 4DA2DC0EAA1A8E61424964ED76F19FB6 /* NetworkLoggerPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkLoggerPlugin.swift; path = Sources/Moya/Plugins/NetworkLoggerPlugin.swift; sourceTree = ""; }; + 4F2078DCDEA30A414D2697107BC790EC /* NSDecimalNumberTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NSDecimalNumberTransform.swift; path = Sources/NSDecimalNumberTransform.swift; sourceTree = ""; }; + 4FCAB8EB3E96133C136248D5576CF909 /* MapError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MapError.swift; path = Sources/MapError.swift; sourceTree = ""; }; + 514ACFF0A1456742CDBCD177D914BB41 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; + 57E38BBA86E69241983C806A9032FC99 /* Moya.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Moya.modulemap; sourceTree = ""; }; + 59503DDA43A5EF5587C9414186E5662C /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; + 5B98144400337259E98FCB5B184CD46E /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustPolicy.swift; path = Source/ServerTrustPolicy.swift; sourceTree = ""; }; + 61861F43A5B8F9D32CAD215C8DD6B884 /* URLTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = URLTransform.swift; path = Sources/URLTransform.swift; sourceTree = ""; }; + 61EAB337B1F7EA5E772864125CB1AB43 /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; + 62726FB095063F9E353C02BE2C4F6F70 /* MoyaAvailability.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaAvailability.swift; path = Sources/Moya/MoyaAvailability.swift; sourceTree = ""; }; + 6469FC24D84BC9964D815C101A54129D /* Moya-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-umbrella.h"; sourceTree = ""; }; + 65AC7F7CCAFFD28A95E6ECC0E6C2A49F /* TransformOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TransformOf.swift; path = Sources/TransformOf.swift; sourceTree = ""; }; + 66F99F38D69DD00230B7D924890E476D /* Cancellable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancellable.swift; path = Sources/Moya/Cancellable.swift; sourceTree = ""; }; + 6A582E80B8CFA3E48F5B477F2BA2965E /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; + 6B0137EE1A0AE89FB1469D32BC789FB6 /* Moya-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Moya-dummy.m"; sourceTree = ""; }; + 6B9C23EDF36E7F2F816612823F05421D /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; + 6CA96ED72FD9B5B0EE24E2F9B56AD705 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Alamofire.modulemap; sourceTree = ""; }; 71940C1CEB7995DC34CFE54CAF1AEF88 /* Pods-Demo-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Demo-acknowledgements.markdown"; sourceTree = ""; }; - 71A192DA8427E760595C241A5AFFDF72 /* ObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableType.swift; path = RxSwift/ObservableType.swift; sourceTree = ""; }; - 721E0361F5BD3060CD61E41333AC4C8D /* Scan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scan.swift; path = RxSwift/Observables/Implementations/Scan.swift; sourceTree = ""; }; - 7355FD9C656F3B499FFED26503A24844 /* LockOwnerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LockOwnerType.swift; path = RxSwift/Concurrency/LockOwnerType.swift; sourceTree = ""; }; - 742EC56A479A268680F0A5C9DF61FB5B /* Lock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Lock.swift; path = RxSwift/Concurrency/Lock.swift; sourceTree = ""; }; - 7479AA1AE7EBE9F210DF7C06D08FA79E /* SchedulerType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SchedulerType.swift; path = RxSwift/SchedulerType.swift; sourceTree = ""; }; - 75AAB49A85742D83E67B38D30B60B1D3 /* Optional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Optional.swift; path = Sources/Optional.swift; sourceTree = ""; }; - 76432EFF66F0610C1FA74F991477EBE0 /* Range.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Range.swift; path = RxSwift/Observables/Implementations/Range.swift; sourceTree = ""; }; - 7697FC2B90D6509A8AC3659265DC0FB7 /* RxSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 76EBBC41CE9B11EAD62E0BCF95E85227 /* FromJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FromJSON.swift; path = Sources/FromJSON.swift; sourceTree = ""; }; - 78A4128EC1CBD80E45085664E5D7CF4B /* Moya-ObjectMapper.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Moya-ObjectMapper.xcconfig"; sourceTree = ""; }; - 78ED1ABA505DCC8516D0016B7499D512 /* Buffer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Buffer.swift; path = RxSwift/Observables/Implementations/Buffer.swift; sourceTree = ""; }; - 79433C83DBA7AF7AAF0E9931F79CDEFE /* Moya-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Moya-dummy.m"; sourceTree = ""; }; - 7AAB9F6E60E4EF7EC35044ABA59EE4A3 /* SynchronizedUnsubscribeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedUnsubscribeType.swift; path = RxSwift/Concurrency/SynchronizedUnsubscribeType.swift; sourceTree = ""; }; - 7B7651A3BECCAA054599F73243B3CB7F /* Producer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Producer.swift; path = RxSwift/Observables/Implementations/Producer.swift; sourceTree = ""; }; - 7C59839F18FF5FBE60CAFFB8EC168EBD /* Amb.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Amb.swift; path = RxSwift/Observables/Implementations/Amb.swift; sourceTree = ""; }; - 7D27ED3A89AA80187EF62E0412529A5C /* MainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MainScheduler.swift; path = RxSwift/Schedulers/MainScheduler.swift; sourceTree = ""; }; - 7D6E1BBEE6A3830A885E6B9927A75142 /* IntegerOperators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = IntegerOperators.swift; path = Sources/IntegerOperators.swift; sourceTree = ""; }; - 7DAA23E8CA642C818313760DEE872D76 /* Moya+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Moya+Alamofire.swift"; path = "Sources/Moya/Moya+Alamofire.swift"; sourceTree = ""; }; - 82FDCC01E20E2C5AAE034A49D1ED5163 /* Zip+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+arity.swift"; path = "RxSwift/Observables/Implementations/Zip+arity.swift"; sourceTree = ""; }; - 83002D71F6C2A538E2978182ADCAFFE8 /* Cancelable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancelable.swift; path = RxSwift/Cancelable.swift; sourceTree = ""; }; - 8334CB787F208F16FF132C8023FD6F9C /* SynchronizedDisposeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedDisposeType.swift; path = RxSwift/Concurrency/SynchronizedDisposeType.swift; sourceTree = ""; }; - 84D4210F88F6EF7B49E63115D1E62FB0 /* SubscribeOn.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscribeOn.swift; path = RxSwift/Observables/Implementations/SubscribeOn.swift; sourceTree = ""; }; - 84E72054705675D860541F5F6B329ACA /* Disposables.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposables.swift; path = RxSwift/Disposables/Disposables.swift; sourceTree = ""; }; - 852276A83C97D7B483AAD3516806EF85 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; - 86088A74332B80EF5B44E52CABB7BD0E /* Moya-ObjectMapper-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-ObjectMapper-prefix.pch"; sourceTree = ""; }; - 863C51FEA45A7EDE989AC2754CDD717C /* Reactive.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reactive.swift; path = RxSwift/Reactive.swift; sourceTree = ""; }; - 875489DE5BF92D2F4B1BBFCAC174EF6C /* Debounce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Debounce.swift; path = RxSwift/Observables/Implementations/Debounce.swift; sourceTree = ""; }; - 89273F92A2616EA7FA505C493114118A /* Multicast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Multicast.swift; path = RxSwift/Observables/Implementations/Multicast.swift; sourceTree = ""; }; - 89394607B9FE5C06608B8A97BC48ED42 /* Pods_Demo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Demo.framework; path = "Pods-Demo.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 8A4E045A2FEAE35414C860EE69E7BF86 /* Mappable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Mappable.swift; path = Sources/Mappable.swift; sourceTree = ""; }; - 8B706DBD4A5763AC4E4A8BD768FE1B57 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8C6FC130D59DFCF7457E87174231D525 /* TakeLast.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeLast.swift; path = RxSwift/Observables/Implementations/TakeLast.swift; sourceTree = ""; }; - 8EE4E3C424252CF8A16D59C05C3B8873 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8F03D4318F25F0CEB39500AE4E751CAD /* Response+ObjectMapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Response+ObjectMapper.swift"; sourceTree = ""; }; - 8FED2C3C7E03453020D34A902D0A17AD /* Skip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Skip.swift; path = RxSwift/Observables/Implementations/Skip.swift; sourceTree = ""; }; - 903F6654FD1FDACF86081CEF68EE96BB /* SignalProducer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SignalProducer.swift; path = Sources/SignalProducer.swift; sourceTree = ""; }; - 9169B63F6003C0F243F0388BF5958FF7 /* Lifetime.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Lifetime.swift; path = Sources/Lifetime.swift; sourceTree = ""; }; - 9237F94E8BAA36CA82EFBF39F965662F /* DisposeBag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBag.swift; path = RxSwift/Disposables/DisposeBag.swift; sourceTree = ""; }; - 935C00337EC7391ACE992E18BB6528EC /* SwitchIfEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwitchIfEmpty.swift; path = RxSwift/Observables/Implementations/SwitchIfEmpty.swift; sourceTree = ""; }; + 74FD38960945B76B11B050D52218B482 /* MoyaProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaProvider.swift; path = Sources/Moya/MoyaProvider.swift; sourceTree = ""; }; + 793B3E12C93A7177D3C191163E295BAA /* ObjectMapper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = ObjectMapper.framework; path = ObjectMapper.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 79D9882980381D4325EE1A76440897C0 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; + 7BB54D3FDFD46C1C70DF6BC561A5CF33 /* AccessTokenPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AccessTokenPlugin.swift; path = Sources/Moya/Plugins/AccessTokenPlugin.swift; sourceTree = ""; }; + 7F367FF78264EBBE5AA194B48F7D38AC /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7F9D70F3A964B95DDC2EB82BE6BAEBF9 /* Result.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Result.framework; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 88B49E4248E1EFE0B55CA03D2F6A4DF6 /* TransformOperators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TransformOperators.swift; path = Sources/TransformOperators.swift; sourceTree = ""; }; + 8D4BE3F4C4D08DA35C6C30306412F29B /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; + 90FEC72F7F380429E61EA2CD851315CC /* CredentialsPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CredentialsPlugin.swift; path = Sources/Moya/Plugins/CredentialsPlugin.swift; sourceTree = ""; }; + 92A77CADD4F761989C665109AD7BAB46 /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 941085FB48E505ED52FF2DFD9B570A8C /* Result.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 9427D33D9A21060CC4CC8E4507E7CFAD /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Result/Result.swift; sourceTree = ""; }; - 95093E2F9D63EA61DB4DAE904E414937 /* Switch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Switch.swift; path = RxSwift/Observables/Implementations/Switch.swift; sourceTree = ""; }; - 96C1E5A0EFA527E1432BBE96CDB023DA /* NopDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NopDisposable.swift; path = RxSwift/Disposables/NopDisposable.swift; sourceTree = ""; }; - 9801943BE07AE064B47351ADFD881292 /* BinaryDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BinaryDisposable.swift; path = RxSwift/Disposables/BinaryDisposable.swift; sourceTree = ""; }; - 98A388B968E9204926C346DCDF6062B0 /* Sample.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sample.swift; path = RxSwift/Observables/Implementations/Sample.swift; sourceTree = ""; }; - 99FE737E0F857E5191A1E4F1C1D81AC3 /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; - 9AF2389D69944D193711EBCE256D550F /* ObserverType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserverType.swift; path = RxSwift/ObserverType.swift; sourceTree = ""; }; - 9B00B9BA2EE7FD9C4875DE894CC6A0F3 /* DispatchQueue+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Extensions.swift"; path = "Platform/DispatchQueue+Extensions.swift"; sourceTree = ""; }; - 9B4D6B8F41F79C94313C986AA2C95518 /* ImmediateScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmediateScheduler.swift; path = RxSwift/Schedulers/ImmediateScheduler.swift; sourceTree = ""; }; - 9C4B16E320E5D74A88118C831CBBD69C /* Materialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Materialize.swift; path = RxSwift/Observables/Implementations/Materialize.swift; sourceTree = ""; }; - 9E382DB6FDB65DE94BABDD2844DAF6ED /* Event.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Event.swift; path = RxSwift/Event.swift; sourceTree = ""; }; - 9E6D5912B420A7B69CCF77E5A9BF85AF /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = RxSwift/Errors.swift; sourceTree = ""; }; - 9EA5E26F527616CA14BA1AD883FEA452 /* Result.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Result.framework; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A0EC4E2078B430FE9F8672536722200A /* Zip+Collection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Zip+Collection.swift"; path = "RxSwift/Observables/Implementations/Zip+Collection.swift"; sourceTree = ""; }; - A0ED537BF046646C2C53B5881878C455 /* Platform.Darwin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Darwin.swift; path = Platform/Platform.Darwin.swift; sourceTree = ""; }; - A1E2F6D667244D405AA74248C94355AA /* DelaySubscription.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DelaySubscription.swift; path = RxSwift/Observables/Implementations/DelaySubscription.swift; sourceTree = ""; }; - A241B2831F3DA9FCBD98DDB4EC3E0B1C /* Observable+Time.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Time.swift"; path = "RxSwift/Observables/Observable+Time.swift"; sourceTree = ""; }; - A7ED7D46DDE3DB9F34D961D4247C9E58 /* Delay.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Delay.swift; path = RxSwift/Observables/Implementations/Delay.swift; sourceTree = ""; }; - AC1CC8FE7C1707568F3CF44D87403355 /* Observable+Multiple.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Multiple.swift"; path = "RxSwift/Observables/Observable+Multiple.swift"; sourceTree = ""; }; - AC300EB7F7FA139928F6FFEEB3296AD1 /* Catch.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Catch.swift; path = RxSwift/Observables/Implementations/Catch.swift; sourceTree = ""; }; - AD92FA237FCFC2D9C81216D0EBACCAAF /* PriorityQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PriorityQueue.swift; path = Platform/DataStructures/PriorityQueue.swift; sourceTree = ""; }; - AD9B0A6DC72985BDA4754EA5E5CB07AA /* AnonymousObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousObservable.swift; path = RxSwift/Observables/Implementations/AnonymousObservable.swift; sourceTree = ""; }; - ADC3881DD934E863CFEA3B949E0D18C9 /* ToArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToArray.swift; path = RxSwift/Observables/Implementations/ToArray.swift; sourceTree = ""; }; - ADE5FB20FE5428FAA73D3437465495EC /* Repeat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Repeat.swift; path = RxSwift/Observables/Implementations/Repeat.swift; sourceTree = ""; }; - AE5D5AF2A28AC7AC8AA786C64A8B0D5D /* ObjectMapper-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ObjectMapper-umbrella.h"; sourceTree = ""; }; - AF523A051E4C232B87A58BFDCF30CA5B /* SkipUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkipUntil.swift; path = RxSwift/Observables/Implementations/SkipUntil.swift; sourceTree = ""; }; - AF615E8CA506C163CA765AA9770F3AA1 /* Image.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Image.swift; path = Sources/Moya/Image.swift; sourceTree = ""; }; - B16391692DB4F8314C30BC547232672C /* ConcurrentDispatchQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentDispatchQueueScheduler.swift; path = RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift; sourceTree = ""; }; - B18971046EE71972C2987A1B44C687D6 /* Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Error.swift; path = RxSwift/Observables/Implementations/Error.swift; sourceTree = ""; }; - B249B91CED2F27F5A58276241ADD4BB7 /* Platform.Linux.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Platform.Linux.swift; path = Platform/Platform.Linux.swift; sourceTree = ""; }; - B278163DD8869BD634FBC37A0A78314A /* Bag+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Bag+Rx.swift"; path = "RxSwift/Extensions/Bag+Rx.swift"; sourceTree = ""; }; - B320EE4339DB3EA8E88ED6E7B463000B /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; - B3978B3D1F18561B41C5412350F64F37 /* UnidirectionalBinding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = UnidirectionalBinding.swift; path = Sources/UnidirectionalBinding.swift; sourceTree = ""; }; - B40BE97A1246D8C49845492A55299637 /* CombineLatest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CombineLatest.swift; path = RxSwift/Observables/Implementations/CombineLatest.swift; sourceTree = ""; }; - B41B5597DB477AB7287337E1EE3C7756 /* Dematerialize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Dematerialize.swift; path = RxSwift/Observables/Implementations/Dematerialize.swift; sourceTree = ""; }; - B483550D0EABCD7A18A27ACC8CCB69DF /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; - B48C9F224CB97BCA0F526B6CE757E808 /* AccessTokenPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AccessTokenPlugin.swift; path = Sources/Moya/Plugins/AccessTokenPlugin.swift; sourceTree = ""; }; - B4A5B4C75C3181B16E43A4F7B73DE44A /* ScheduledItemType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ScheduledItemType.swift; path = RxSwift/Schedulers/Internal/ScheduledItemType.swift; sourceTree = ""; }; - B4C0B5AE187B86FDFAE2E9FAE10E7302 /* Observable+Debug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Debug.swift"; path = "RxSwift/Observables/Observable+Debug.swift"; sourceTree = ""; }; - B5CE459308136BFD7A23BAF2F50CE800 /* Result-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Result-umbrella.h"; sourceTree = ""; }; - B648F3AFC4C4633FA007EB713EA56506 /* Reactive.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reactive.swift; path = Sources/Reactive.swift; sourceTree = ""; }; - B66BA2DCA8B77DD590AFFE169CFF7ED6 /* FoundationExtensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FoundationExtensions.swift; path = Sources/FoundationExtensions.swift; sourceTree = ""; }; - B86A6A9B770A11A74DD461B27ED464E3 /* Moya-ObjectMapper.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Moya-ObjectMapper.modulemap"; sourceTree = ""; }; - BB1F0348FD4C424F19EFB9411323F3FA /* ReactiveSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = ReactiveSwift.framework; path = ReactiveSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BC64D2D57252E22F6FB7334A26BB9A40 /* Moya-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-umbrella.h"; sourceTree = ""; }; - BC7FAF6B11CB54F533401E158C245898 /* Reduce.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Reduce.swift; path = RxSwift/Observables/Implementations/Reduce.swift; sourceTree = ""; }; - BCFDB91280BF6D20EBD5B3A66B88AC8A /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - BD0ABD4914D2EE301F7AA43B4A12D682 /* Do.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Do.swift; path = RxSwift/Observables/Implementations/Do.swift; sourceTree = ""; }; - BE44D39AA5ECD4810DFE500D8E781CC3 /* ObservableType+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ObservableType+Extensions.swift"; path = "RxSwift/ObservableType+Extensions.swift"; sourceTree = ""; }; - BF7114008E9479B082AECBF1E4A5B940 /* CurrentThreadScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CurrentThreadScheduler.swift; path = RxSwift/Schedulers/CurrentThreadScheduler.swift; sourceTree = ""; }; - C117BF194A2FAB369D1E4E772735B1E4 /* AsMaybe.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsMaybe.swift; path = RxSwift/Observables/Implementations/AsMaybe.swift; sourceTree = ""; }; - C15B29D41B7D19D513E61510C17CBF58 /* Signal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Signal.swift; path = Sources/Signal.swift; sourceTree = ""; }; - C1F902FE19E3A7B35BE33971A520703F /* MultiTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultiTarget.swift; path = Sources/Moya/MultiTarget.swift; sourceTree = ""; }; - C241789ED7971C4DFA28779450E54AC2 /* SubscriptionDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubscriptionDisposable.swift; path = RxSwift/Disposables/SubscriptionDisposable.swift; sourceTree = ""; }; - C357B7A689BF299853AB4DBCA4066AD0 /* ShareReplay1WhileConnected.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareReplay1WhileConnected.swift; path = RxSwift/Observables/Implementations/ShareReplay1WhileConnected.swift; sourceTree = ""; }; - C371E36ECB06A5163E50660874EC28B5 /* Sink.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Sink.swift; path = RxSwift/Observables/Implementations/Sink.swift; sourceTree = ""; }; - C44E15F0C89F0E302C55DC4A79A1BC3D /* ObjectMapper-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ObjectMapper-dummy.m"; sourceTree = ""; }; + 93ED444A4B08B56B6ADF93D677BB4CB5 /* MoyaProvider+Internal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Internal.swift"; path = "Sources/Moya/MoyaProvider+Internal.swift"; sourceTree = ""; }; + A11222F9D813A8D7882AF69CA5EA991A /* Response+ObjectMapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Response+ObjectMapper.swift"; sourceTree = ""; }; + A343E96349DE4EA0B9DF6C29BA90A286 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A49EF6210F5179725AEEFA7FD12EA687 /* SessionManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionManager.swift; path = Source/SessionManager.swift; sourceTree = ""; }; + A7512D22039AAD5B6E55702CB8B6BB65 /* Moya.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Moya.xcconfig; sourceTree = ""; }; + A9746C71C483A1C4640718C9BBD7A590 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Result/Result.swift; sourceTree = ""; }; + AA5C4ADF070B443469DD9B817E2628B0 /* DateFormatterTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DateFormatterTransform.swift; path = Sources/DateFormatterTransform.swift; sourceTree = ""; }; + AFC5B404F6D3614DEEA42FBC64D95BED /* DataTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DataTransform.swift; path = Sources/DataTransform.swift; sourceTree = ""; }; + B4348DBC880EAF8CA8AD286B2CE8095F /* ImmutableMappable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmutableMappable.swift; path = Sources/ImmutableMappable.swift; sourceTree = ""; }; + B50AA2E66465C4068E964C7E4FA0CF43 /* ObjectMapper.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ObjectMapper.xcconfig; sourceTree = ""; }; + B5F442785A210EC56C3BD176B23B3F20 /* ObjectMapper-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ObjectMapper-dummy.m"; sourceTree = ""; }; + B6550E0325CFB935CFCB031648A7F8B7 /* Plugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Plugin.swift; path = Sources/Moya/Plugin.swift; sourceTree = ""; }; + B7AFB0CEAEBD66866383FD2E7844C8DD /* TargetType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TargetType.swift; path = Sources/Moya/TargetType.swift; sourceTree = ""; }; + B9EA007BE838FA2D8BCA6F81125AE3F9 /* Moya-ObjectMapper-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-ObjectMapper-prefix.pch"; sourceTree = ""; }; + BAFDC003EF1F886338ADA5E64D3C805F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + BC6098D94F54AD0D03E502C500DD4521 /* Mappable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Mappable.swift; path = Sources/Mappable.swift; sourceTree = ""; }; + BD93B509C71001515D4B6D6AF5C5C773 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + C1BDF7BB1D4FDC8F5E7304800098135C /* Moya-ObjectMapper-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Moya-ObjectMapper-dummy.m"; sourceTree = ""; }; C5BC86D40B890A7B0844F888209CA06F /* Pods-Demo-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Demo-dummy.m"; sourceTree = ""; }; - C9C496D6996BC8AFD85DE80CAC38D329 /* ObjectMapper.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ObjectMapper.xcconfig; sourceTree = ""; }; + C5D52BBE6D6374C9938AE58D8D3879B9 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Sources/Moya/Response.swift; sourceTree = ""; }; + C613490EC475967C38AC59993BEAAA5F /* NetworkActivityPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkActivityPlugin.swift; path = Sources/Moya/Plugins/NetworkActivityPlugin.swift; sourceTree = ""; }; CA19694C0AC41D598DE4ABFEB300E619 /* Pods-Demo-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Demo-acknowledgements.plist"; sourceTree = ""; }; - CA266CC66D3EC65E521FA4162D360F99 /* Observable+Aggregate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Aggregate.swift"; path = "RxSwift/Observables/Observable+Aggregate.swift"; sourceTree = ""; }; - CB5F2649EE2009363B0F09C8A6ADA83A /* SchedulerServices+Emulation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "SchedulerServices+Emulation.swift"; path = "RxSwift/Schedulers/SchedulerServices+Emulation.swift"; sourceTree = ""; }; - CBDB1E14A220EC920FC1FB4625810264 /* Merge.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Merge.swift; path = RxSwift/Observables/Implementations/Merge.swift; sourceTree = ""; }; + CA55B04A2F2C9EA141DF995EBBBBA916 /* ResultProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResultProtocol.swift; path = Result/ResultProtocol.swift; sourceTree = ""; }; + CA9A30146C65C03BDACA599000D7BB97 /* Result.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Result.framework; sourceTree = BUILT_PRODUCTS_DIR; }; CC6A59B0ADA6CB2F51DAE6508E437829 /* Pods-Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Demo.debug.xcconfig"; sourceTree = ""; }; - CD752EB8D371397CF0E0A452BFC6C66E /* Cancellable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancellable.swift; path = Sources/Moya/Cancellable.swift; sourceTree = ""; }; - CDCA1BEBEA42409A71611FD24B58954C /* Observable+Concurrency.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Concurrency.swift"; path = "RxSwift/Observables/Observable+Concurrency.swift"; sourceTree = ""; }; - CE3DB0BD2F238B2028C47A1E2311DB68 /* ObjectMapper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = ObjectMapper.framework; path = ObjectMapper.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - CEE4E537DE5502F9377401CE6CFC70E6 /* SynchronizedSubscribeType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedSubscribeType.swift; path = RxSwift/Concurrency/SynchronizedSubscribeType.swift; sourceTree = ""; }; - CF4FE7D225298AEC8CB75B60A9CFA19A /* TransformType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TransformType.swift; path = Sources/TransformType.swift; sourceTree = ""; }; - D08FF4003628C1CF0EABD27982F41D46 /* Disposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposable.swift; path = Sources/Disposable.swift; sourceTree = ""; }; - D0F089014191265414BFEE897D8AF3CC /* ImmutableMappable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImmutableMappable.swift; path = Sources/ImmutableMappable.swift; sourceTree = ""; }; - D1252E1B22A22F475C12151241EFCA4A /* HistoricalScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HistoricalScheduler.swift; path = RxSwift/Schedulers/HistoricalScheduler.swift; sourceTree = ""; }; - D1703CE57C3548B6E58DA6D64D29E55E /* ObservableConvertibleType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObservableConvertibleType.swift; path = RxSwift/ObservableConvertibleType.swift; sourceTree = ""; }; - D173C71BCA0EEB68789915CF5F191766 /* Observable+Creation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Creation.swift"; path = "RxSwift/Observables/Observable+Creation.swift"; sourceTree = ""; }; - D1BF1860830C7D6C6C4DCEA29B3B1A72 /* Result.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Result.modulemap; sourceTree = ""; }; - D25145D395665027FD536D8204F2A151 /* Optional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Optional.swift; path = RxSwift/Observables/Implementations/Optional.swift; sourceTree = ""; }; - D2B67F026BFB03CD5D152C213DEBF2BC /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; - D3891B24536C2EEB56439F4AE948F504 /* ReactiveSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ReactiveSwift-umbrella.h"; sourceTree = ""; }; - D443B303EF315755B19810A6928CC875 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D452F6F5AA184AAD5F2D67E79A3BD1E3 /* Bag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bag.swift; path = Platform/DataStructures/Bag.swift; sourceTree = ""; }; - D57C17E48D6B4C471E30BEBF78305148 /* ConnectableObservableType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectableObservableType.swift; path = RxSwift/ConnectableObservableType.swift; sourceTree = ""; }; - D5CFCA13C0BBA88AFC72A9C1CD73A031 /* TakeUntil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TakeUntil.swift; path = RxSwift/Observables/Implementations/TakeUntil.swift; sourceTree = ""; }; - D61C3FC49E8BFA92C986196BDFE8CAA7 /* Scheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Scheduler.swift; path = Sources/Scheduler.swift; sourceTree = ""; }; - D64B2CD1CD8D698E75A8D2074F3ACC4D /* ObserveOnSerialDispatchQueue.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObserveOnSerialDispatchQueue.swift; path = RxSwift/Observables/Implementations/ObserveOnSerialDispatchQueue.swift; sourceTree = ""; }; - D6C987F4B07105EE68202441F72978D2 /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = ""; }; - D713B360945685B908ADE8C9D5C1E900 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D714CB5781BB6873581A3DC0A79B9E85 /* Plugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Plugin.swift; path = Sources/Moya/Plugin.swift; sourceTree = ""; }; - D92F7DCD41D5266E43DFE3FAD66403EC /* CombineLatest+arity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CombineLatest+arity.swift"; path = "RxSwift/Observables/Implementations/CombineLatest+arity.swift"; sourceTree = ""; }; - D957E7D9F0804FBE080A56A0A7C32859 /* DistinctUntilChanged.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DistinctUntilChanged.swift; path = RxSwift/Observables/Implementations/DistinctUntilChanged.swift; sourceTree = ""; }; - D9B17B3054632B1067BBCA2C71A05333 /* MoyaProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaProvider.swift; path = Sources/Moya/MoyaProvider.swift; sourceTree = ""; }; - D9C57137B4028EDDFB13326F3B372094 /* Operators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Operators.swift; path = Sources/Operators.swift; sourceTree = ""; }; + CE2D5687C27DC946C3C1F3DC1842553D /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; + D10BA1D7EBE6C8BF508A17B3C0BE2936 /* Result-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Result-dummy.m"; sourceTree = ""; }; + D31B4AF8BA0DB7F777930FB26C31E747 /* FromJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FromJSON.swift; path = Sources/FromJSON.swift; sourceTree = ""; }; + D37097CE851EBEACC487F4B4714B1E9F /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = ""; }; + D759C20AC8BFFD6BBF9FC7CE2A680244 /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; + D791D7FED788B389D157EAB73E026A69 /* ObjectMapper-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ObjectMapper-prefix.pch"; sourceTree = ""; }; + D82946A0D295761EE37B4A43F43AB79E /* IntegerOperators.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = IntegerOperators.swift; path = Sources/IntegerOperators.swift; sourceTree = ""; }; + D909F3A8C6132959D6C320AAEA17F008 /* Moya-ObjectMapper.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Moya-ObjectMapper.modulemap"; sourceTree = ""; }; + D9344830916D9873DF00E10193EC83FB /* TaskDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TaskDelegate.swift; path = Source/TaskDelegate.swift; sourceTree = ""; }; DAB0701F8F25395B1ED46510ED4B9797 /* Pods-Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Demo.release.xcconfig"; sourceTree = ""; }; - DB39F4C98DB2DA3F40DE8A32E7558771 /* ElementAt.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ElementAt.swift; path = RxSwift/Observables/Implementations/ElementAt.swift; sourceTree = ""; }; - DB4181F0665DFDE3AF0C2A4274054C91 /* ShareReplay1.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareReplay1.swift; path = RxSwift/Observables/Implementations/ShareReplay1.swift; sourceTree = ""; }; - DC4CFA50086C81153480348C921E9D7E /* Take.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Take.swift; path = RxSwift/Observables/Implementations/Take.swift; sourceTree = ""; }; - DCC878974EE6DA072D98F52B51E84C1D /* VirtualTimeScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VirtualTimeScheduler.swift; path = RxSwift/Schedulers/VirtualTimeScheduler.swift; sourceTree = ""; }; - DD2732BF279345355DC7EAA129BD6F68 /* Moya-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-prefix.pch"; sourceTree = ""; }; - DDC14C03CD94BFBB95CEB5C52AE617A5 /* MoyaProvider+Defaults.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Defaults.swift"; path = "Sources/Moya/MoyaProvider+Defaults.swift"; sourceTree = ""; }; - DDF2E31623D1233F5258FF7BEED50577 /* RxSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "RxSwift-prefix.pch"; sourceTree = ""; }; - DEE360A15B39C568E762840D3A81CEEE /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = RxSwift/Observables/Implementations/Filter.swift; sourceTree = ""; }; - DF39CE1238BC9EF2D3214D7964EF396D /* BooleanDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BooleanDisposable.swift; path = RxSwift/Disposables/BooleanDisposable.swift; sourceTree = ""; }; - DF68A7F635878834BF11B3143131A980 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - DFA2975637898BE2E4745452FD2FA5B3 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; - DFE18FFE311C803F1501AFE9840B4850 /* SynchronizedOnType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SynchronizedOnType.swift; path = RxSwift/Concurrency/SynchronizedOnType.swift; sourceTree = ""; }; - E12B1ED1B4C0A93A3519BA3B7C28DA68 /* ReactiveSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ReactiveSwift-prefix.pch"; sourceTree = ""; }; - E22180E18B43026CD6CE1E8998EE15F6 /* OperationQueueScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = OperationQueueScheduler.swift; path = RxSwift/Schedulers/OperationQueueScheduler.swift; sourceTree = ""; }; - E26A4334B8438658855EF11644F7E622 /* ObjectMapper-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ObjectMapper-prefix.pch"; sourceTree = ""; }; - E27C09CC42C9E61A48D61D96E32C2224 /* PrimitiveSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PrimitiveSequence.swift; path = RxSwift/Traits/PrimitiveSequence.swift; sourceTree = ""; }; - E351E6D538BA2A6289C52171C44274CA /* InvocableScheduledItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = InvocableScheduledItem.swift; path = RxSwift/Schedulers/Internal/InvocableScheduledItem.swift; sourceTree = ""; }; - E352691A70D68412A4A0795C783344A3 /* Concat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Concat.swift; path = RxSwift/Observables/Implementations/Concat.swift; sourceTree = ""; }; - E4A41A1EFD287ADC8565B46439DFC266 /* Observable+ObjectMapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Observable+ObjectMapper.swift"; sourceTree = ""; }; - E518D6231CACDB520F43AB4E8F044F7A /* AsyncLock.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncLock.swift; path = RxSwift/Concurrency/AsyncLock.swift; sourceTree = ""; }; - E51B5D4BA11643CC13ABF956AE7470FD /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E59D4F322D6E7D3BA6C49B1AA610A934 /* Timeout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeout.swift; path = RxSwift/Observables/Implementations/Timeout.swift; sourceTree = ""; }; - E5B0E739E5861FFF5C38D5227A4A389F /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; - E67B7571F6467514AA83F281E9E22099 /* RxSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = RxSwift.modulemap; sourceTree = ""; }; + DAE850DBB38E8873D1850C9311BD9974 /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; + DFCEAD6C981D04D54601B24E716CFEB0 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E24BD600F5389DAA8DDD1D1CECC3F5C4 /* Moya.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Moya.framework; path = Moya.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E3387B663EB69B620C91F0E12EBCD182 /* Map.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Map.swift; path = Sources/Map.swift; sourceTree = ""; }; + E599388093916828E5D94CD3B257F434 /* Mapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Mapper.swift; path = Sources/Mapper.swift; sourceTree = ""; }; E68F8C86FB3267A3C87983DA9E269889 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E875A3259FA588A7BFA479448540897D /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; - E9B9231ACA143FEEA785BA2C77983B8C /* Moya.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Moya.modulemap; sourceTree = ""; }; - EAEEE030CE34EBFEF0FAD1318244A197 /* Observable+Binding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Observable+Binding.swift"; path = "RxSwift/Observables/Observable+Binding.swift"; sourceTree = ""; }; - EB3363BA24CD0B09109B7746F6285B98 /* CredentialsPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CredentialsPlugin.swift; path = Sources/Moya/Plugins/CredentialsPlugin.swift; sourceTree = ""; }; - ED4A697F546D5D36E10B1AD245C29F8D /* Moya_ObjectMapper.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Moya_ObjectMapper.framework; path = "Moya-ObjectMapper.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - ED7C53165F3F31D1A0C8C198AD696B9F /* Bag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Bag.swift; path = Sources/Bag.swift; sourceTree = ""; }; - EDE1A466A002C993A806512B2E7382C4 /* Flatten.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Flatten.swift; path = Sources/Flatten.swift; sourceTree = ""; }; - EE74BAF25E92CDB17782F9AB8F17B753 /* DisposeBase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DisposeBase.swift; path = RxSwift/Disposables/DisposeBase.swift; sourceTree = ""; }; - EEC6DAEDB2A4F64D0361DAC2A90CE887 /* Deferred.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Deferred.swift; path = RxSwift/Observables/Implementations/Deferred.swift; sourceTree = ""; }; - EF08EBF411883D53A25FF37FFA2CEC24 /* MapError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MapError.swift; path = Sources/MapError.swift; sourceTree = ""; }; - EF59E24C322B9D2F5CD6280927C40466 /* Deprecations+Removals.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Deprecations+Removals.swift"; path = "Sources/Deprecations+Removals.swift"; sourceTree = ""; }; - F09BF1757627FA226B630ABB73C959F9 /* Zip.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Zip.swift; path = RxSwift/Observables/Implementations/Zip.swift; sourceTree = ""; }; - F2B5C81978957E54CCFB28F7091AD5D3 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; - F2DEBF8CC407476366F482DC09F29DC2 /* ConnectableObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectableObservable.swift; path = RxSwift/Observables/Implementations/ConnectableObservable.swift; sourceTree = ""; }; - F38255D62E9D278E969DB4F061836F2F /* Timer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timer.swift; path = RxSwift/Observables/Implementations/Timer.swift; sourceTree = ""; }; - F39DB37E28CA0B59F6EAB8F9341535BE /* HexColorTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HexColorTransform.swift; path = Sources/HexColorTransform.swift; sourceTree = ""; }; - F3A65AF290BC5C0CE5D5AF1B2454E60A /* String+Rx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+Rx.swift"; path = "RxSwift/Extensions/String+Rx.swift"; sourceTree = ""; }; - F61330C472723B44F49FBA757C173823 /* Using.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Using.swift; path = RxSwift/Observables/Implementations/Using.swift; sourceTree = ""; }; - F76263CF98FEED7B4665B6B14CB9D4F8 /* BehaviorSubject.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BehaviorSubject.swift; path = RxSwift/Subjects/BehaviorSubject.swift; sourceTree = ""; }; - F7D4C2831C5B7EDF94A1DD0CC97B961B /* Disposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Disposable.swift; path = RxSwift/Disposable.swift; sourceTree = ""; }; - F87D4ED948A5076902CE684060F0CE21 /* Result.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Result.xcconfig; sourceTree = ""; }; - F8C18E8E928E48BDC1259CBBA11DB0F3 /* ToJSON.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToJSON.swift; path = Sources/ToJSON.swift; sourceTree = ""; }; - F9A5BACE751A31D7CCB9FD6E8C6E8DBC /* CompositeDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CompositeDisposable.swift; path = RxSwift/Disposables/CompositeDisposable.swift; sourceTree = ""; }; - F9B2274195EE237722674F6AEFFA5573 /* WithLatestFrom.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WithLatestFrom.swift; path = RxSwift/Observables/Implementations/WithLatestFrom.swift; sourceTree = ""; }; - F9FDA720EB4651BE9743F2A2025BA3C1 /* ConcurrentMainScheduler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConcurrentMainScheduler.swift; path = RxSwift/Schedulers/ConcurrentMainScheduler.swift; sourceTree = ""; }; - FAA435219FB8D98ACAC9E82F3073CBFB /* GroupedObservable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GroupedObservable.swift; path = RxSwift/GroupedObservable.swift; sourceTree = ""; }; - FAA9F221B24D7988307530A187CAD448 /* AnonymousDisposable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnonymousDisposable.swift; path = RxSwift/Disposables/AnonymousDisposable.swift; sourceTree = ""; }; - FD72A25BD3A7D287FED5F3837E2F099A /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; - FFC44176F598210ADBD3E383470714FB /* NetworkLoggerPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkLoggerPlugin.swift; path = Sources/Moya/Plugins/NetworkLoggerPlugin.swift; sourceTree = ""; }; + E729FE5E80F2E2AB50BCE24222FCFF8C /* Endpoint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Endpoint.swift; path = Sources/Moya/Endpoint.swift; sourceTree = ""; }; + E73F7216E01A4E9EE47563D1F12322A1 /* Pods_Demo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Demo.framework; path = "Pods-Demo.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + E875ECA95CA501A95C465767F13B4166 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + EAB5B056EFE98F6B6993B59FAA951A10 /* Result.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Result.modulemap; sourceTree = ""; }; + EC36512D95EECE880A9E926186132940 /* DateTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DateTransform.swift; path = Sources/DateTransform.swift; sourceTree = ""; }; + EF02FD893B4411DB960C342A433C446B /* TransformType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TransformType.swift; path = Sources/TransformType.swift; sourceTree = ""; }; + F10F466C5A9E0DEF633B68E41A46D930 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + F4121B29C69055D4024A52A1988F2404 /* EnumTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EnumTransform.swift; path = Sources/EnumTransform.swift; sourceTree = ""; }; + F8F4D55E0B456743933BF3C9FCC02DB5 /* ISO8601DateTransform.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ISO8601DateTransform.swift; path = Sources/ISO8601DateTransform.swift; sourceTree = ""; }; + F9B1A2DE58691388097422B9FD2C410C /* Image.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Image.swift; path = Sources/Moya/Image.swift; sourceTree = ""; }; + FA0E8B311390639742CBBDA672B7DC9B /* MultiTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultiTarget.swift; path = Sources/Moya/MultiTarget.swift; sourceTree = ""; }; + FD6BF40A2D5F8A9F4F7C0206DEB801D7 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 310BE1A845E60566CEB579691CC0577A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - E9674E861DAB4BD6475368C1E7F84098 /* Alamofire.framework in Frameworks */, - A6F45D447E5A8E9CEB5E8E5C0E84683C /* Foundation.framework in Frameworks */, - 000D350E67D30BCA2FBE7F2924993B84 /* Moya.framework in Frameworks */, - 2931270581FC1B6B83757EB3C3CEC760 /* ObjectMapper.framework in Frameworks */, - CE752C436ABC8898B95A66D78CB8191B /* Result.framework in Frameworks */, - 2BBA25B63470ECAF1D6608594313C917 /* RxSwift.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 57DAEC1F412B81BA3BAAEE802D25A74A /* Frameworks */ = { + 162D2D85F14F2AC0D05E12CB90A3E7DF /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - AD779D324F289B9D75A700F384DE93DC /* Foundation.framework in Frameworks */, + C67A1841438E37F75854C59135D12638 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 67973A52290871C78259EEE51D1F2353 /* Frameworks */ = { + 45BD623F9D3AFB8C55BEAFC817B81FC0 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - AE6E5B80B4BBB8EDF5C7515B9E8C0055 /* Foundation.framework in Frameworks */, + DD7659D3BD5BFBE56442531B651CD704 /* Alamofire.framework in Frameworks */, + EEC0711CD2D65D50545963611F2BC091 /* Foundation.framework in Frameworks */, + E101BB35F7C470411D1963A68D528593 /* Result.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 68DBCBEC97BE6A6FD2A426C4CBAF68F7 /* Frameworks */ = { + 68CDA6B2B3D47E438ACE06690483C97D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - E38B5D9E5AAD37ACD84F32C34FD4C98B /* Foundation.framework in Frameworks */, + DB0717B9962D0455AF413525BC929DE5 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7461D75CE31FF097019200761D02C39F /* Frameworks */ = { + 8940EA5400E966B099F0E6CADF2A53D9 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - CA4D15B078B3BD4B91C7849F16E040E1 /* Alamofire.framework in Frameworks */, - D2143DE4FC2628CC0E41EF58D263C20A /* Foundation.framework in Frameworks */, - 59AF979FCB40524EC2764D656321A30E /* Result.framework in Frameworks */, - 11523975ADA09CD9D08AE04D8DA8DD4D /* RxSwift.framework in Frameworks */, + 41B695C8BB20624433D2EEE9C7DB01BB /* Foundation.framework in Frameworks */, + DF8A32F7C63F3DFE57E209A2563EC490 /* Moya.framework in Frameworks */, + 4D0E6BE561959AF00C65003885C8A4BF /* ObjectMapper.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -768,530 +319,274 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - A397AB7EACC1CD58B601DC46D742CC25 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - DAF69EF73C887FA1D6BD8B789070DCFF /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A8C1D60D3ABBCFFCC097218325B728B3 /* Frameworks */ = { + A65A01FA2D297585C9BAECC3C71F4036 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - BF2052DE8D309C5BA7295921E6135DB9 /* Foundation.framework in Frameworks */, - 82243099E0A10AE0213AEE768956284E /* Result.framework in Frameworks */, + C86CA08AE851244279CA3F9B57ADAE96 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 085C81FEA3F1B78781776679E8F14B0F /* Moya */ = { + 100E68DAD2EE58F69E9B20BE1FE970E8 /* Moya-ObjectMapper */ = { isa = PBXGroup; children = ( - BCD215DA45F67E786C5A555F0DB273F7 /* Core */, - A47AC22BC83A4DB74586D91553663489 /* RxSwift */, - CCAD1ADCB14E6C0F0E2576EBB7E4FE9A /* Support Files */, + A90BE59C71A8120B322E625B6B67CF82 /* Core */, + 4EC26D74BD9FCA995D6ABC1533489055 /* Support Files */, ); - name = Moya; - path = Moya; + name = "Moya-ObjectMapper"; + path = ../..; sourceTree = ""; }; - 09B4A2AAF9F0ACD6329138D42CDB30C5 /* ObjectMapper */ = { + 2492A81FC507B4FD6C2159D218E0B1EF /* Pods */ = { isa = PBXGroup; children = ( - 2CAAA0D52FCA1C1DEC597260623EF2A5 /* CustomDateFormatTransform.swift */, - 60B30C90645517428578CA8F97388B23 /* DataTransform.swift */, - 64980335396398C7FBAB1BA3E239DF56 /* DateFormatterTransform.swift */, - 02195DED2D688E2BBFA361F58068011C /* DateTransform.swift */, - 5920B5993039870B306EC532F225E154 /* DictionaryTransform.swift */, - 374F5979FAFC0F8EDB295BC6AF726210 /* EnumOperators.swift */, - 02829F9EC43F515274FB1074481F8B84 /* EnumTransform.swift */, - 76EBBC41CE9B11EAD62E0BCF95E85227 /* FromJSON.swift */, - F39DB37E28CA0B59F6EAB8F9341535BE /* HexColorTransform.swift */, - D0F089014191265414BFEE897D8AF3CC /* ImmutableMappable.swift */, - 7D6E1BBEE6A3830A885E6B9927A75142 /* IntegerOperators.swift */, - 2686171BA16348F07095C4FE784112A0 /* ISO8601DateTransform.swift */, - 65EF88911B1EF37A8A6E08A5847C5CF0 /* Map.swift */, - EF08EBF411883D53A25FF37FFA2CEC24 /* MapError.swift */, - 8A4E045A2FEAE35414C860EE69E7BF86 /* Mappable.swift */, - 45839231A4901B0E5436EF73077831F0 /* Mapper.swift */, - 20AEF3C06A5DFD905B23CA9F2E2425FE /* NSDecimalNumberTransform.swift */, - D9C57137B4028EDDFB13326F3B372094 /* Operators.swift */, - F8C18E8E928E48BDC1259CBBA11DB0F3 /* ToJSON.swift */, - 4F74CF47C5DE7C590136CD81F9005DAE /* TransformOf.swift */, - 1A6D71F9BF566B4365BE46AB589E7461 /* TransformOperators.swift */, - CF4FE7D225298AEC8CB75B60A9CFA19A /* TransformType.swift */, - 228F82916F5D132DE5005BBAB76005B8 /* URLTransform.swift */, - 5C17C8B7589E302DE126B329CCB2DC62 /* Support Files */, + 63FEDA88ABB8A9130858D06FA98297DE /* Alamofire */, + C4DB48BE12A7C0023B80523AFC19BAD8 /* Moya */, + 8E85E81564D7B46295C6E8F57E9CB62F /* ObjectMapper */, + 72B3E1DAC2C4EC32A2B1FD22529B0633 /* Result */, ); - name = ObjectMapper; - path = ObjectMapper; + name = Pods; sourceTree = ""; }; - 0A556D8227996A7E51BD01E5DC421AE6 /* Support Files */ = { + 29624EBC72A9E4E752FD311F6C818FAD /* Support Files */ = { isa = PBXGroup; children = ( - E51B5D4BA11643CC13ABF956AE7470FD /* Info.plist */, - B86A6A9B770A11A74DD461B27ED464E3 /* Moya-ObjectMapper.modulemap */, - 78A4128EC1CBD80E45085664E5D7CF4B /* Moya-ObjectMapper.xcconfig */, - 41C6FA254A44FFC58952089BB7F468C9 /* Moya-ObjectMapper-dummy.m */, - 86088A74332B80EF5B44E52CABB7BD0E /* Moya-ObjectMapper-prefix.pch */, - 62384D07F2721B9F6F37280C5563A146 /* Moya-ObjectMapper-umbrella.h */, + BD93B509C71001515D4B6D6AF5C5C773 /* Info.plist */, + 3AB7BC23968BB64D2C4A640E56778C4F /* ObjectMapper.modulemap */, + B50AA2E66465C4068E964C7E4FA0CF43 /* ObjectMapper.xcconfig */, + B5F442785A210EC56C3BD176B23B3F20 /* ObjectMapper-dummy.m */, + D791D7FED788B389D157EAB73E026A69 /* ObjectMapper-prefix.pch */, + 0F10BE00775897D25E7A12F91969F4C9 /* ObjectMapper-umbrella.h */, ); name = "Support Files"; - path = "Sample/Pods/Target Support Files/Moya-ObjectMapper"; - sourceTree = ""; - }; - 0DB173081F30C6DAB1125FEC2ED97814 /* Source */ = { - isa = PBXGroup; - children = ( - 1995208C8B8C0486ECCBB40E7E39045E /* RxSwift */, - ); - name = Source; - path = Source; - sourceTree = ""; - }; - 0DF092FE17C2523F9C330CD528145673 /* iOS */ = { - isa = PBXGroup; - children = ( - CE7E58713F2C85532A6C716949958E82 /* Foundation.framework */, - ); - name = iOS; - sourceTree = ""; - }; - 1995208C8B8C0486ECCBB40E7E39045E /* RxSwift */ = { - isa = PBXGroup; - children = ( - E4A41A1EFD287ADC8565B46439DFC266 /* Observable+ObjectMapper.swift */, - ); - name = RxSwift; - path = RxSwift; + path = "../Target Support Files/ObjectMapper"; sourceTree = ""; }; - 1B69AE029462AB330D6C645E827BE555 /* Source */ = { + 42BAA1EA723430864029530B8CE7B26E /* Source */ = { isa = PBXGroup; children = ( - 8F03D4318F25F0CEB39500AE4E751CAD /* Response+ObjectMapper.swift */, + A11222F9D813A8D7882AF69CA5EA991A /* Response+ObjectMapper.swift */, ); name = Source; path = Source; sourceTree = ""; }; - 35B1193275AB3E48E99302585172BA47 /* Development Pods */ = { - isa = PBXGroup; - children = ( - E72A724B57ABE13EFA3E36D7F3E2C193 /* Moya-ObjectMapper */, - ); - name = "Development Pods"; - sourceTree = ""; - }; - 39FA737C2C652DEE3C6D861D0CD0BBFC /* Pods */ = { + 4EC26D74BD9FCA995D6ABC1533489055 /* Support Files */ = { isa = PBXGroup; children = ( - 3C175B7F56A1E8CBE691188A5B66217D /* Alamofire */, - 085C81FEA3F1B78781776679E8F14B0F /* Moya */, - 09B4A2AAF9F0ACD6329138D42CDB30C5 /* ObjectMapper */, - B5AE83A21A9312E806D59683AEBF2D6A /* ReactiveSwift */, - FDD1695A3B721B245397974BC61D715D /* Result */, - B2AC03BF63856F089A70B7F9B900ADFF /* RxSwift */, + 16793EEB2074C9CC3EE2B1F07EA49DF4 /* Info.plist */, + D909F3A8C6132959D6C320AAEA17F008 /* Moya-ObjectMapper.modulemap */, + 325BC9271672C4E29F980B567E8CA553 /* Moya-ObjectMapper.xcconfig */, + C1BDF7BB1D4FDC8F5E7304800098135C /* Moya-ObjectMapper-dummy.m */, + B9EA007BE838FA2D8BCA6F81125AE3F9 /* Moya-ObjectMapper-prefix.pch */, + 1B2C695B0BE5E7E396ED8A2E4C689838 /* Moya-ObjectMapper-umbrella.h */, ); - name = Pods; + name = "Support Files"; + path = "Sample/Pods/Target Support Files/Moya-ObjectMapper"; sourceTree = ""; }; - 3C175B7F56A1E8CBE691188A5B66217D /* Alamofire */ = { + 63FEDA88ABB8A9130858D06FA98297DE /* Alamofire */ = { isa = PBXGroup; children = ( - B483550D0EABCD7A18A27ACC8CCB69DF /* AFError.swift */, - F2B5C81978957E54CCFB28F7091AD5D3 /* Alamofire.swift */, - 597A28C19BCCC57C5FFF4BF262CCAAF4 /* DispatchQueue+Alamofire.swift */, - 70B98B88A29190DF1D9046B75313A6F5 /* MultipartFormData.swift */, - 4CA2A7E6BBAE7EF0D66E481D28618C44 /* NetworkReachabilityManager.swift */, - E5B0E739E5861FFF5C38D5227A4A389F /* Notifications.swift */, - E875A3259FA588A7BFA479448540897D /* ParameterEncoding.swift */, - B320EE4339DB3EA8E88ED6E7B463000B /* Request.swift */, - DFA2975637898BE2E4745452FD2FA5B3 /* Response.swift */, - 852276A83C97D7B483AAD3516806EF85 /* ResponseSerialization.swift */, - D6C987F4B07105EE68202441F72978D2 /* Result.swift */, - 1EE119E337ADA617EC124C5243D01215 /* ServerTrustPolicy.swift */, - 1C971A44E2F3D8336CF0FA86D1488C8C /* SessionDelegate.swift */, - 4AD834CFBDD48550EDAF21F31D167032 /* SessionManager.swift */, - 3E928AE794F4E1E19A5AD255A37D6752 /* TaskDelegate.swift */, - 42D894EA6C6A47B6CFDE3704A55204D7 /* Timeline.swift */, - FD72A25BD3A7D287FED5F3837E2F099A /* Validation.swift */, - 6B0CACB257F379379D9497DD4E986458 /* Support Files */, + DAE850DBB38E8873D1850C9311BD9974 /* AFError.swift */, + 514ACFF0A1456742CDBCD177D914BB41 /* Alamofire.swift */, + D759C20AC8BFFD6BBF9FC7CE2A680244 /* DispatchQueue+Alamofire.swift */, + FD6BF40A2D5F8A9F4F7C0206DEB801D7 /* MultipartFormData.swift */, + 6A582E80B8CFA3E48F5B477F2BA2965E /* NetworkReachabilityManager.swift */, + CE2D5687C27DC946C3C1F3DC1842553D /* Notifications.swift */, + 013C33A42B0DB5557FCBFBEAF1BCBE6B /* ParameterEncoding.swift */, + 61EAB337B1F7EA5E772864125CB1AB43 /* Request.swift */, + 334B41B0A52B782DE441532AA6A85CBC /* Response.swift */, + 79D9882980381D4325EE1A76440897C0 /* ResponseSerialization.swift */, + 6B9C23EDF36E7F2F816612823F05421D /* Result.swift */, + 5B98144400337259E98FCB5B184CD46E /* ServerTrustPolicy.swift */, + 4B5E0D743F446BF327DAC3D3D835FA54 /* SessionDelegate.swift */, + A49EF6210F5179725AEEFA7FD12EA687 /* SessionManager.swift */, + D9344830916D9873DF00E10193EC83FB /* TaskDelegate.swift */, + 92A77CADD4F761989C665109AD7BAB46 /* Timeline.swift */, + 4A0B3E5A1D43566CE9B79B921CF6E1B7 /* Validation.swift */, + B384487762D312719677406FA84D886F /* Support Files */, ); name = Alamofire; path = Alamofire; sourceTree = ""; }; - 439C1970038273E327AD68795DBC9575 /* Frameworks */ = { + 6AC4D650C8E6868580699011E23C3EE2 /* Frameworks */ = { isa = PBXGroup; children = ( - D443B303EF315755B19810A6928CC875 /* Alamofire.framework */, - 16A860D8F4BF07CDAABA319C5E5658A4 /* Moya.framework */, - 2B87CCF9A5173095B333FB06CA24E143 /* ObjectMapper.framework */, - 941085FB48E505ED52FF2DFD9B570A8C /* Result.framework */, - 7697FC2B90D6509A8AC3659265DC0FB7 /* RxSwift.framework */, - 0DF092FE17C2523F9C330CD528145673 /* iOS */, + A343E96349DE4EA0B9DF6C29BA90A286 /* Alamofire.framework */, + 20D9B9A9AA661504922DB840287D0F36 /* Moya.framework */, + 4AA4B6ED2D05BD3DA851DB3854CFBBF9 /* ObjectMapper.framework */, + CA9A30146C65C03BDACA599000D7BB97 /* Result.framework */, + 8615960CE20EBAA70EBF7FF86A0A6912 /* iOS */, ); name = Frameworks; sourceTree = ""; }; - 5C17C8B7589E302DE126B329CCB2DC62 /* Support Files */ = { + 6F2351C272926D3E0225FEFC2F9C5D1F /* Targets Support Files */ = { isa = PBXGroup; children = ( - 8EE4E3C424252CF8A16D59C05C3B8873 /* Info.plist */, - 5CB47DCB44972D5E0559F3BDACFD6BC7 /* ObjectMapper.modulemap */, - C9C496D6996BC8AFD85DE80CAC38D329 /* ObjectMapper.xcconfig */, - C44E15F0C89F0E302C55DC4A79A1BC3D /* ObjectMapper-dummy.m */, - E26A4334B8438658855EF11644F7E622 /* ObjectMapper-prefix.pch */, - AE5D5AF2A28AC7AC8AA786C64A8B0D5D /* ObjectMapper-umbrella.h */, + ECC58720C5754A079F9A150E40E2FCDD /* Pods-Demo */, ); - name = "Support Files"; - path = "../Target Support Files/ObjectMapper"; + name = "Targets Support Files"; sourceTree = ""; }; - 6B0CACB257F379379D9497DD4E986458 /* Support Files */ = { + 72B3E1DAC2C4EC32A2B1FD22529B0633 /* Result */ = { isa = PBXGroup; children = ( - 0F64DD81F831A11D65AE6504A27763B1 /* Alamofire.modulemap */, - D2B67F026BFB03CD5D152C213DEBF2BC /* Alamofire.xcconfig */, - 35E8D54A1971EB89FE89D4C8426891C5 /* Alamofire-dummy.m */, - 079F5BAE309C0CA01FCDB9DDDE38383F /* Alamofire-prefix.pch */, - 99FE737E0F857E5191A1E4F1C1D81AC3 /* Alamofire-umbrella.h */, - 8B706DBD4A5763AC4E4A8BD768FE1B57 /* Info.plist */, + A9746C71C483A1C4640718C9BBD7A590 /* Result.swift */, + CA55B04A2F2C9EA141DF995EBBBBA916 /* ResultProtocol.swift */, + F9160B3A47B014AC9F312D81A837FFCE /* Support Files */, ); - name = "Support Files"; - path = "../Target Support Files/Alamofire"; + name = Result; + path = Result; sourceTree = ""; }; - 6F2351C272926D3E0225FEFC2F9C5D1F /* Targets Support Files */ = { + 7B68911647BF916FE1A27F6C14768092 /* Support Files */ = { isa = PBXGroup; children = ( - ECC58720C5754A079F9A150E40E2FCDD /* Pods-Demo */, + DFCEAD6C981D04D54601B24E716CFEB0 /* Info.plist */, + 57E38BBA86E69241983C806A9032FC99 /* Moya.modulemap */, + A7512D22039AAD5B6E55702CB8B6BB65 /* Moya.xcconfig */, + 6B0137EE1A0AE89FB1469D32BC789FB6 /* Moya-dummy.m */, + 28E6F8F4F5102C758400F9A91C6931AA /* Moya-prefix.pch */, + 6469FC24D84BC9964D815C101A54129D /* Moya-umbrella.h */, ); - name = "Targets Support Files"; + name = "Support Files"; + path = "../Target Support Files/Moya"; sourceTree = ""; }; 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, - 35B1193275AB3E48E99302585172BA47 /* Development Pods */, - 439C1970038273E327AD68795DBC9575 /* Frameworks */, - 39FA737C2C652DEE3C6D861D0CD0BBFC /* Pods */, - EB8FC93A3843019CFC06E2F16CCE292B /* Products */, + B5B63FF454D975D597D57E0F06B1847D /* Development Pods */, + 6AC4D650C8E6868580699011E23C3EE2 /* Frameworks */, + 2492A81FC507B4FD6C2159D218E0B1EF /* Pods */, + 8C20CF5C288C86F5FB88225756A27221 /* Products */, 6F2351C272926D3E0225FEFC2F9C5D1F /* Targets Support Files */, ); sourceTree = ""; }; - 7FAA33E810429A0457651FC58663CCD5 /* Support Files */ = { + 8615960CE20EBAA70EBF7FF86A0A6912 /* iOS */ = { isa = PBXGroup; children = ( - 694E66730BC717CAADA8FA907A1A5D67 /* Info.plist */, - D1BF1860830C7D6C6C4DCEA29B3B1A72 /* Result.modulemap */, - F87D4ED948A5076902CE684060F0CE21 /* Result.xcconfig */, - 6A02D79B87B95AAC12858D2761EFA288 /* Result-dummy.m */, - 0987593EA2560AA5A3F092B2FBC00C33 /* Result-prefix.pch */, - B5CE459308136BFD7A23BAF2F50CE800 /* Result-umbrella.h */, + BAFDC003EF1F886338ADA5E64D3C805F /* Foundation.framework */, ); - name = "Support Files"; - path = "../Target Support Files/Result"; + name = iOS; sourceTree = ""; }; - 8E7DB3E7C72F1EEC778F39B5EE1ED7CE /* Support Files */ = { + 8C20CF5C288C86F5FB88225756A27221 /* Products */ = { isa = PBXGroup; children = ( - BCFDB91280BF6D20EBD5B3A66B88AC8A /* Info.plist */, - E67B7571F6467514AA83F281E9E22099 /* RxSwift.modulemap */, - 24FBE73466F8534532B774BBAC7F2BFB /* RxSwift.xcconfig */, - 6388C76E87715C20A6CC8DE03465171B /* RxSwift-dummy.m */, - DDF2E31623D1233F5258FF7BEED50577 /* RxSwift-prefix.pch */, - 2A2A274B029E7DBF68ECEBC41DB939D1 /* RxSwift-umbrella.h */, + E875ECA95CA501A95C465767F13B4166 /* Alamofire.framework */, + E24BD600F5389DAA8DDD1D1CECC3F5C4 /* Moya.framework */, + 1CC63217A3BA783AFEB9C34A57FB4641 /* Moya_ObjectMapper.framework */, + 793B3E12C93A7177D3C191163E295BAA /* ObjectMapper.framework */, + E73F7216E01A4E9EE47563D1F12322A1 /* Pods_Demo.framework */, + 7F9D70F3A964B95DDC2EB82BE6BAEBF9 /* Result.framework */, ); - name = "Support Files"; - path = "../Target Support Files/RxSwift"; + name = Products; sourceTree = ""; }; - 98A89FC49000D297EE97FC5183950416 /* RxSwift */ = { + 8E85E81564D7B46295C6E8F57E9CB62F /* ObjectMapper */ = { isa = PBXGroup; children = ( - 0DB173081F30C6DAB1125FEC2ED97814 /* Source */, + 40E053AB72ADDF93BA3E65854DD31DF7 /* CustomDateFormatTransform.swift */, + AFC5B404F6D3614DEEA42FBC64D95BED /* DataTransform.swift */, + AA5C4ADF070B443469DD9B817E2628B0 /* DateFormatterTransform.swift */, + EC36512D95EECE880A9E926186132940 /* DateTransform.swift */, + 42AD6850922BEBA0A7A8C82B7D577C3D /* DictionaryTransform.swift */, + 43CD2FC145E05708245FD9B91943A72D /* EnumOperators.swift */, + F4121B29C69055D4024A52A1988F2404 /* EnumTransform.swift */, + D31B4AF8BA0DB7F777930FB26C31E747 /* FromJSON.swift */, + 4969F96A4A144D7292FE42C3923AA3B8 /* HexColorTransform.swift */, + B4348DBC880EAF8CA8AD286B2CE8095F /* ImmutableMappable.swift */, + D82946A0D295761EE37B4A43F43AB79E /* IntegerOperators.swift */, + F8F4D55E0B456743933BF3C9FCC02DB5 /* ISO8601DateTransform.swift */, + E3387B663EB69B620C91F0E12EBCD182 /* Map.swift */, + 4FCAB8EB3E96133C136248D5576CF909 /* MapError.swift */, + BC6098D94F54AD0D03E502C500DD4521 /* Mappable.swift */, + E599388093916828E5D94CD3B257F434 /* Mapper.swift */, + 4F2078DCDEA30A414D2697107BC790EC /* NSDecimalNumberTransform.swift */, + 1865FCE7874B46A3920EA3DEC4AB1048 /* Operators.swift */, + 19923E37970DD593220E43FC7051C147 /* ToJSON.swift */, + 65AC7F7CCAFFD28A95E6ECC0E6C2A49F /* TransformOf.swift */, + 88B49E4248E1EFE0B55CA03D2F6A4DF6 /* TransformOperators.swift */, + EF02FD893B4411DB960C342A433C446B /* TransformType.swift */, + 61861F43A5B8F9D32CAD215C8DD6B884 /* URLTransform.swift */, + 29624EBC72A9E4E752FD311F6C818FAD /* Support Files */, ); - name = RxSwift; + name = ObjectMapper; + path = ObjectMapper; sourceTree = ""; }; - A47AC22BC83A4DB74586D91553663489 /* RxSwift */ = { + 9E932E20B770407A2C762DD11467FE58 /* Core */ = { isa = PBXGroup; children = ( - 29F88EE7273190FB76AA77203F0E09D9 /* Observable+Response.swift */, - 3E4EC7FEC4148FDD842B176028C55D7C /* RxMoyaProvider.swift */, + 7BB54D3FDFD46C1C70DF6BC561A5CF33 /* AccessTokenPlugin.swift */, + 66F99F38D69DD00230B7D924890E476D /* Cancellable.swift */, + 90FEC72F7F380429E61EA2CD851315CC /* CredentialsPlugin.swift */, + E729FE5E80F2E2AB50BCE24222FCFF8C /* Endpoint.swift */, + F9B1A2DE58691388097422B9FD2C410C /* Image.swift */, + 395804EB89C8420229ADDB1C3D667512 /* Moya+Alamofire.swift */, + 62726FB095063F9E353C02BE2C4F6F70 /* MoyaAvailability.swift */, + 2C0C12FB5B1160B1601B851FDB3F79ED /* MoyaError.swift */, + 74FD38960945B76B11B050D52218B482 /* MoyaProvider.swift */, + 2873431E75317CF2F957E7E65D90F25E /* MoyaProvider+Defaults.swift */, + 93ED444A4B08B56B6ADF93D677BB4CB5 /* MoyaProvider+Internal.swift */, + 3EACB6A2A4D2FF9431DC5B3D340B5F73 /* MultipartFormData.swift */, + FA0E8B311390639742CBBDA672B7DC9B /* MultiTarget.swift */, + C613490EC475967C38AC59993BEAAA5F /* NetworkActivityPlugin.swift */, + 4DA2DC0EAA1A8E61424964ED76F19FB6 /* NetworkLoggerPlugin.swift */, + B6550E0325CFB935CFCB031648A7F8B7 /* Plugin.swift */, + C5D52BBE6D6374C9938AE58D8D3879B9 /* Response.swift */, + B7AFB0CEAEBD66866383FD2E7844C8DD /* TargetType.swift */, ); - name = RxSwift; - sourceTree = ""; - }; - B2AC03BF63856F089A70B7F9B900ADFF /* RxSwift */ = { - isa = PBXGroup; - children = ( - 0955C8F4EEE352F4F3BB89BDD6435D23 /* AddRef.swift */, - 7C59839F18FF5FBE60CAFFB8EC168EBD /* Amb.swift */, - FAA9F221B24D7988307530A187CAD448 /* AnonymousDisposable.swift */, - 64C3B69219C8DAC02F5F39DD4B190606 /* AnonymousInvocable.swift */, - AD9B0A6DC72985BDA4754EA5E5CB07AA /* AnonymousObservable.swift */, - 10F5D71DF2264812C5731C22EE801A5A /* AnonymousObserver.swift */, - 5EE38E7FB91AA4AF88DBB6A67269E261 /* AnyObserver.swift */, - C117BF194A2FAB369D1E4E772735B1E4 /* AsMaybe.swift */, - 0323144B011FDDF6827A6B8DBA85B00B /* AsSingle.swift */, - E518D6231CACDB520F43AB4E8F044F7A /* AsyncLock.swift */, - 688D59A630A170299AE908873175B206 /* AsyncSubject.swift */, - D452F6F5AA184AAD5F2D67E79A3BD1E3 /* Bag.swift */, - B278163DD8869BD634FBC37A0A78314A /* Bag+Rx.swift */, - F76263CF98FEED7B4665B6B14CB9D4F8 /* BehaviorSubject.swift */, - 9801943BE07AE064B47351ADFD881292 /* BinaryDisposable.swift */, - DF39CE1238BC9EF2D3214D7964EF396D /* BooleanDisposable.swift */, - 78ED1ABA505DCC8516D0016B7499D512 /* Buffer.swift */, - 83002D71F6C2A538E2978182ADCAFFE8 /* Cancelable.swift */, - AC300EB7F7FA139928F6FFEEB3296AD1 /* Catch.swift */, - B40BE97A1246D8C49845492A55299637 /* CombineLatest.swift */, - D92F7DCD41D5266E43DFE3FAD66403EC /* CombineLatest+arity.swift */, - 27F4F2D54F853B9ABADEDC7188F43473 /* CombineLatest+Collection.swift */, - F9A5BACE751A31D7CCB9FD6E8C6E8DBC /* CompositeDisposable.swift */, - E352691A70D68412A4A0795C783344A3 /* Concat.swift */, - B16391692DB4F8314C30BC547232672C /* ConcurrentDispatchQueueScheduler.swift */, - F9FDA720EB4651BE9743F2A2025BA3C1 /* ConcurrentMainScheduler.swift */, - F2DEBF8CC407476366F482DC09F29DC2 /* ConnectableObservable.swift */, - D57C17E48D6B4C471E30BEBF78305148 /* ConnectableObservableType.swift */, - BF7114008E9479B082AECBF1E4A5B940 /* CurrentThreadScheduler.swift */, - 875489DE5BF92D2F4B1BBFCAC174EF6C /* Debounce.swift */, - 1FB6A4378F9D1425C55DF338352E66CA /* Debug.swift */, - 512139ACC7B2979F80FAC982F0DEA36D /* DefaultIfEmpty.swift */, - EEC6DAEDB2A4F64D0361DAC2A90CE887 /* Deferred.swift */, - A7ED7D46DDE3DB9F34D961D4247C9E58 /* Delay.swift */, - A1E2F6D667244D405AA74248C94355AA /* DelaySubscription.swift */, - B41B5597DB477AB7287337E1EE3C7756 /* Dematerialize.swift */, - 3907CB168DF78B3C72A05AEDC2EA319D /* Deprecated.swift */, - 9B00B9BA2EE7FD9C4875DE894CC6A0F3 /* DispatchQueue+Extensions.swift */, - 0D9789F67B20C11BE9288BBF80C538A2 /* DispatchQueueConfiguration.swift */, - F7D4C2831C5B7EDF94A1DD0CC97B961B /* Disposable.swift */, - 84E72054705675D860541F5F6B329ACA /* Disposables.swift */, - 9237F94E8BAA36CA82EFBF39F965662F /* DisposeBag.swift */, - EE74BAF25E92CDB17782F9AB8F17B753 /* DisposeBase.swift */, - D957E7D9F0804FBE080A56A0A7C32859 /* DistinctUntilChanged.swift */, - BD0ABD4914D2EE301F7AA43B4A12D682 /* Do.swift */, - DB39F4C98DB2DA3F40DE8A32E7558771 /* ElementAt.swift */, - 408788B1F07BDFF8D6682B7D0F390607 /* Empty.swift */, - B18971046EE71972C2987A1B44C687D6 /* Error.swift */, - 9E6D5912B420A7B69CCF77E5A9BF85AF /* Errors.swift */, - 9E382DB6FDB65DE94BABDD2844DAF6ED /* Event.swift */, - DEE360A15B39C568E762840D3A81CEEE /* Filter.swift */, - 26D6FB3D54BF5F3F7B355A811BABC5F6 /* Generate.swift */, - 3C0A8A53B1859DFABE02D98FD7DF7170 /* GroupBy.swift */, - FAA435219FB8D98ACAC9E82F3073CBFB /* GroupedObservable.swift */, - D1252E1B22A22F475C12151241EFCA4A /* HistoricalScheduler.swift */, - 23351BF9B507AE749916B9647001DB83 /* HistoricalSchedulerTimeConverter.swift */, - 9B4D6B8F41F79C94313C986AA2C95518 /* ImmediateScheduler.swift */, - 001EFFE7D56D6AB9A1B0174B1E4DCC82 /* ImmediateSchedulerType.swift */, - 3B323FC2F2AFFC1287FAEE9BF75E2A28 /* InfiniteSequence.swift */, - E351E6D538BA2A6289C52171C44274CA /* InvocableScheduledItem.swift */, - 6E72FDC1493E8F5625DF4379C9BA5C01 /* InvocableType.swift */, - 57C654F7468F90C4C3D24FED3C7F0D3E /* Just.swift */, - 742EC56A479A268680F0A5C9DF61FB5B /* Lock.swift */, - 7355FD9C656F3B499FFED26503A24844 /* LockOwnerType.swift */, - 7D27ED3A89AA80187EF62E0412529A5C /* MainScheduler.swift */, - 4F9CA1CA661AEDAD5A2067C8BDB787FC /* Map.swift */, - 9C4B16E320E5D74A88118C831CBBD69C /* Materialize.swift */, - CBDB1E14A220EC920FC1FB4625810264 /* Merge.swift */, - 89273F92A2616EA7FA505C493114118A /* Multicast.swift */, - 5344FF2D05FA74EC89EA389975D24554 /* Never.swift */, - 96C1E5A0EFA527E1432BBE96CDB023DA /* NopDisposable.swift */, - 04B07C2108E8AEAA49EC11D232391921 /* Observable.swift */, - CA266CC66D3EC65E521FA4162D360F99 /* Observable+Aggregate.swift */, - EAEEE030CE34EBFEF0FAD1318244A197 /* Observable+Binding.swift */, - CDCA1BEBEA42409A71611FD24B58954C /* Observable+Concurrency.swift */, - D173C71BCA0EEB68789915CF5F191766 /* Observable+Creation.swift */, - B4C0B5AE187B86FDFAE2E9FAE10E7302 /* Observable+Debug.swift */, - AC1CC8FE7C1707568F3CF44D87403355 /* Observable+Multiple.swift */, - 4A9E3FB60CB4A7D2085DAC4A5306B692 /* Observable+Single.swift */, - 06A276080DB9D3C2B9C7EEFD0570A670 /* Observable+StandardSequenceOperators.swift */, - A241B2831F3DA9FCBD98DDB4EC3E0B1C /* Observable+Time.swift */, - D1703CE57C3548B6E58DA6D64D29E55E /* ObservableConvertibleType.swift */, - 71A192DA8427E760595C241A5AFFDF72 /* ObservableType.swift */, - BE44D39AA5ECD4810DFE500D8E781CC3 /* ObservableType+Extensions.swift */, - 541F38739DEE9642687281F0AB4AFDAD /* ObserveOn.swift */, - D64B2CD1CD8D698E75A8D2074F3ACC4D /* ObserveOnSerialDispatchQueue.swift */, - 5969ECA4583F5C37DC5FBA6ACAA544EA /* ObserverBase.swift */, - 9AF2389D69944D193711EBCE256D550F /* ObserverType.swift */, - E22180E18B43026CD6CE1E8998EE15F6 /* OperationQueueScheduler.swift */, - D25145D395665027FD536D8204F2A151 /* Optional.swift */, - A0ED537BF046646C2C53B5881878C455 /* Platform.Darwin.swift */, - B249B91CED2F27F5A58276241ADD4BB7 /* Platform.Linux.swift */, - E27C09CC42C9E61A48D61D96E32C2224 /* PrimitiveSequence.swift */, - 4472D43DC36B93B0AD3D2324A022BD31 /* PrimitiveSequence+Zip+arity.swift */, - AD92FA237FCFC2D9C81216D0EBACCAAF /* PriorityQueue.swift */, - 7B7651A3BECCAA054599F73243B3CB7F /* Producer.swift */, - 4802F5EB9C4C88F88895D0E79CACB366 /* PublishSubject.swift */, - 533E4698572969FE535C01639240BD95 /* Queue.swift */, - 76432EFF66F0610C1FA74F991477EBE0 /* Range.swift */, - 863C51FEA45A7EDE989AC2754CDD717C /* Reactive.swift */, - 28297762695E3A606FF79D55CD44A1E8 /* RecursiveLock.swift */, - 16AC502307017147E0782DA0BE937992 /* RecursiveScheduler.swift */, - BC7FAF6B11CB54F533401E158C245898 /* Reduce.swift */, - 059700FB972CCDBE4E13C737B053F05C /* RefCount.swift */, - 6B1F9906C460EF3154ED146983F06918 /* RefCountDisposable.swift */, - ADE5FB20FE5428FAA73D3437465495EC /* Repeat.swift */, - 27C0B04261BDBBFD9B29D09D21BD1585 /* ReplaySubject.swift */, - 678D1077D40DA503F57304A63179B726 /* RetryWhen.swift */, - 21888844E9B22E9A361BF543DF18D25D /* Rx.swift */, - 57A565AA1BD6CD7E0C542B05BE4C9637 /* RxMutableBox.swift */, - 98A388B968E9204926C346DCDF6062B0 /* Sample.swift */, - 721E0361F5BD3060CD61E41333AC4C8D /* Scan.swift */, - 12F1244D10E55C3D0D44E5B32E114CC5 /* ScheduledDisposable.swift */, - 0EAD4354AECCA4CA0188E9ED5D4B7980 /* ScheduledItem.swift */, - B4A5B4C75C3181B16E43A4F7B73DE44A /* ScheduledItemType.swift */, - CB5F2649EE2009363B0F09C8A6ADA83A /* SchedulerServices+Emulation.swift */, - 7479AA1AE7EBE9F210DF7C06D08FA79E /* SchedulerType.swift */, - 1FD4883583337FBFDD03E78A3D2FB8B4 /* Sequence.swift */, - 3385E307C8C0628285FFAC438D4B6E7D /* SerialDispatchQueueScheduler.swift */, - 547E11C8EAF852818A6A4D608CE328A3 /* SerialDisposable.swift */, - DB4181F0665DFDE3AF0C2A4274054C91 /* ShareReplay1.swift */, - C357B7A689BF299853AB4DBCA4066AD0 /* ShareReplay1WhileConnected.swift */, - 08EC66818EEE7440780A0483FF548F6A /* SingleAssignmentDisposable.swift */, - 6F3FB9AB8D8CB0B217990A29076233B1 /* SingleAsync.swift */, - C371E36ECB06A5163E50660874EC28B5 /* Sink.swift */, - 8FED2C3C7E03453020D34A902D0A17AD /* Skip.swift */, - AF523A051E4C232B87A58BFDCF30CA5B /* SkipUntil.swift */, - 6804E8E2F017493A8ECEDBBCF0527D6F /* SkipWhile.swift */, - 2E03DD3956442CB4D8565AD68A91D369 /* StartWith.swift */, - F3A65AF290BC5C0CE5D5AF1B2454E60A /* String+Rx.swift */, - 2F11037BCF62A8272D103B2E0875AD7F /* SubjectType.swift */, - 84D4210F88F6EF7B49E63115D1E62FB0 /* SubscribeOn.swift */, - C241789ED7971C4DFA28779450E54AC2 /* SubscriptionDisposable.swift */, - 95093E2F9D63EA61DB4DAE904E414937 /* Switch.swift */, - 935C00337EC7391ACE992E18BB6528EC /* SwitchIfEmpty.swift */, - 8334CB787F208F16FF132C8023FD6F9C /* SynchronizedDisposeType.swift */, - DFE18FFE311C803F1501AFE9840B4850 /* SynchronizedOnType.swift */, - CEE4E537DE5502F9377401CE6CFC70E6 /* SynchronizedSubscribeType.swift */, - 7AAB9F6E60E4EF7EC35044ABA59EE4A3 /* SynchronizedUnsubscribeType.swift */, - 35D64D5D6EAE2F4029F0EE7D6856F4DB /* TailRecursiveSink.swift */, - DC4CFA50086C81153480348C921E9D7E /* Take.swift */, - 8C6FC130D59DFCF7457E87174231D525 /* TakeLast.swift */, - D5CFCA13C0BBA88AFC72A9C1CD73A031 /* TakeUntil.swift */, - 450BB2F541C923DB26C66811CB4E93F5 /* TakeWhile.swift */, - 33CBA7B0F508B12B0E6ABA92500E3EC2 /* Throttle.swift */, - E59D4F322D6E7D3BA6C49B1AA610A934 /* Timeout.swift */, - F38255D62E9D278E969DB4F061836F2F /* Timer.swift */, - ADC3881DD934E863CFEA3B949E0D18C9 /* ToArray.swift */, - F61330C472723B44F49FBA757C173823 /* Using.swift */, - 04314B6B8716BBC1C296C41E570D781D /* Variable.swift */, - 39E05E41EC88853ABC2E4FE509051C89 /* VirtualTimeConverterType.swift */, - DCC878974EE6DA072D98F52B51E84C1D /* VirtualTimeScheduler.swift */, - 21EC236CC3C0F46D0FE4C03207C993F2 /* Window.swift */, - F9B2274195EE237722674F6AEFFA5573 /* WithLatestFrom.swift */, - F09BF1757627FA226B630ABB73C959F9 /* Zip.swift */, - 82FDCC01E20E2C5AAE034A49D1ED5163 /* Zip+arity.swift */, - A0EC4E2078B430FE9F8672536722200A /* Zip+Collection.swift */, - 8E7DB3E7C72F1EEC778F39B5EE1ED7CE /* Support Files */, - ); - name = RxSwift; - path = RxSwift; - sourceTree = ""; - }; - B5AE83A21A9312E806D59683AEBF2D6A /* ReactiveSwift */ = { - isa = PBXGroup; - children = ( - 3B2E3A21F478613F90988F19F11E3569 /* Action.swift */, - 6705998374BDFFB7FECAF1532B835BE1 /* Atomic.swift */, - ED7C53165F3F31D1A0C8C198AD696B9F /* Bag.swift */, - EF59E24C322B9D2F5CD6280927C40466 /* Deprecations+Removals.swift */, - D08FF4003628C1CF0EABD27982F41D46 /* Disposable.swift */, - 4FA8811DC202DD7DDD832600E9FA64F1 /* Event.swift */, - 353118FBD87FF65111631E0E224F8A29 /* EventLogger.swift */, - EDE1A466A002C993A806512B2E7382C4 /* Flatten.swift */, - B66BA2DCA8B77DD590AFFE169CFF7ED6 /* FoundationExtensions.swift */, - 404D82726264603AD565560110967D32 /* InhabitableTypeGuards.swift */, - 9169B63F6003C0F243F0388BF5958FF7 /* Lifetime.swift */, - 09F220F40C48109371DD3B972BC8211F /* Observer.swift */, - 75AAB49A85742D83E67B38D30B60B1D3 /* Optional.swift */, - 4365A2AB5A0772687317C91D2948110A /* Property.swift */, - B648F3AFC4C4633FA007EB713EA56506 /* Reactive.swift */, - 069941314ECEE9FA8027A5F8A227FF94 /* ResultExtensions.swift */, - D61C3FC49E8BFA92C986196BDFE8CAA7 /* Scheduler.swift */, - C15B29D41B7D19D513E61510C17CBF58 /* Signal.swift */, - 903F6654FD1FDACF86081CEF68EE96BB /* SignalProducer.swift */, - B3978B3D1F18561B41C5412350F64F37 /* UnidirectionalBinding.swift */, - 42090A07F20122A0BC3455BFA86F79A1 /* ValidatingProperty.swift */, - F8989E7C0AA2A245A0B8F379B80FA8DC /* Support Files */, - ); - name = ReactiveSwift; - path = ReactiveSwift; + name = Core; sourceTree = ""; }; - BCD215DA45F67E786C5A555F0DB273F7 /* Core */ = { + A90BE59C71A8120B322E625B6B67CF82 /* Core */ = { isa = PBXGroup; children = ( - B48C9F224CB97BCA0F526B6CE757E808 /* AccessTokenPlugin.swift */, - CD752EB8D371397CF0E0A452BFC6C66E /* Cancellable.swift */, - EB3363BA24CD0B09109B7746F6285B98 /* CredentialsPlugin.swift */, - 1EBA89D983DA12F498C2325A2BE8F733 /* Endpoint.swift */, - AF615E8CA506C163CA765AA9770F3AA1 /* Image.swift */, - 7DAA23E8CA642C818313760DEE872D76 /* Moya+Alamofire.swift */, - 04EDFDD25786A3582B951724C7D2FB88 /* MoyaAvailability.swift */, - 61E8E292AC6AFF21D423EDF3ED36D010 /* MoyaError.swift */, - D9B17B3054632B1067BBCA2C71A05333 /* MoyaProvider.swift */, - DDC14C03CD94BFBB95CEB5C52AE617A5 /* MoyaProvider+Defaults.swift */, - 05788979F32B6C5DF30DD0FD687D5936 /* MoyaProvider+Internal.swift */, - 48E9530C6F3DCB9C366850CA3F47B7B7 /* MultipartFormData.swift */, - C1F902FE19E3A7B35BE33971A520703F /* MultiTarget.swift */, - 55F91E7D6B0D44079FA709F9FA6A475B /* NetworkActivityPlugin.swift */, - FFC44176F598210ADBD3E383470714FB /* NetworkLoggerPlugin.swift */, - D714CB5781BB6873581A3DC0A79B9E85 /* Plugin.swift */, - 0B94AD22D41BE0EAB831D4A1FEBD2635 /* Response.swift */, - 0865A76D93AA95B23295EE2BCF3BC18C /* TargetType.swift */, + 42BAA1EA723430864029530B8CE7B26E /* Source */, ); name = Core; sourceTree = ""; }; - CCAD1ADCB14E6C0F0E2576EBB7E4FE9A /* Support Files */ = { + B384487762D312719677406FA84D886F /* Support Files */ = { isa = PBXGroup; children = ( - 4D0593D7232D6CD71C5F0AF9668BF14D /* Info.plist */, - E9B9231ACA143FEEA785BA2C77983B8C /* Moya.modulemap */, - 0C7805AC2429FAFC54029B4782D5F6A7 /* Moya.xcconfig */, - 79433C83DBA7AF7AAF0E9931F79CDEFE /* Moya-dummy.m */, - DD2732BF279345355DC7EAA129BD6F68 /* Moya-prefix.pch */, - BC64D2D57252E22F6FB7334A26BB9A40 /* Moya-umbrella.h */, + 6CA96ED72FD9B5B0EE24E2F9B56AD705 /* Alamofire.modulemap */, + D37097CE851EBEACC487F4B4714B1E9F /* Alamofire.xcconfig */, + 21449410DC6A0D49ACE25200C84D04C3 /* Alamofire-dummy.m */, + 8D4BE3F4C4D08DA35C6C30306412F29B /* Alamofire-prefix.pch */, + 59503DDA43A5EF5587C9414186E5662C /* Alamofire-umbrella.h */, + 7F367FF78264EBBE5AA194B48F7D38AC /* Info.plist */, ); name = "Support Files"; - path = "../Target Support Files/Moya"; + path = "../Target Support Files/Alamofire"; sourceTree = ""; }; - E72A724B57ABE13EFA3E36D7F3E2C193 /* Moya-ObjectMapper */ = { + B5B63FF454D975D597D57E0F06B1847D /* Development Pods */ = { isa = PBXGroup; children = ( - F610F1E53D83CA0357103F3CB8C75AAC /* Core */, - 98A89FC49000D297EE97FC5183950416 /* RxSwift */, - 0A556D8227996A7E51BD01E5DC421AE6 /* Support Files */, + 100E68DAD2EE58F69E9B20BE1FE970E8 /* Moya-ObjectMapper */, ); - name = "Moya-ObjectMapper"; - path = ../..; + name = "Development Pods"; sourceTree = ""; }; - EB8FC93A3843019CFC06E2F16CCE292B /* Products */ = { + C4DB48BE12A7C0023B80523AFC19BAD8 /* Moya */ = { isa = PBXGroup; children = ( - DF68A7F635878834BF11B3143131A980 /* Alamofire.framework */, - 205BBF1AA90ABD220FCD3EC814B1E0D7 /* Moya.framework */, - ED4A697F546D5D36E10B1AD245C29F8D /* Moya_ObjectMapper.framework */, - CE3DB0BD2F238B2028C47A1E2311DB68 /* ObjectMapper.framework */, - 89394607B9FE5C06608B8A97BC48ED42 /* Pods_Demo.framework */, - BB1F0348FD4C424F19EFB9411323F3FA /* ReactiveSwift.framework */, - 9EA5E26F527616CA14BA1AD883FEA452 /* Result.framework */, - 403F223F4F7DD41EE472F87D183F1020 /* RxSwift.framework */, + 9E932E20B770407A2C762DD11467FE58 /* Core */, + 7B68911647BF916FE1A27F6C14768092 /* Support Files */, ); - name = Products; + name = Moya; + path = Moya; sourceTree = ""; }; ECC58720C5754A079F9A150E40E2FCDD /* Pods-Demo */ = { @@ -1312,166 +607,108 @@ path = "Target Support Files/Pods-Demo"; sourceTree = ""; }; - F610F1E53D83CA0357103F3CB8C75AAC /* Core */ = { - isa = PBXGroup; - children = ( - 1B69AE029462AB330D6C645E827BE555 /* Source */, - ); - name = Core; - sourceTree = ""; - }; - F8989E7C0AA2A245A0B8F379B80FA8DC /* Support Files */ = { + F9160B3A47B014AC9F312D81A837FFCE /* Support Files */ = { isa = PBXGroup; children = ( - D713B360945685B908ADE8C9D5C1E900 /* Info.plist */, - 5738BAEBE9590332CEC15173EF2E68E7 /* ReactiveSwift.modulemap */, - 0BECA3CFB229CD34026ABBD1E893ABD8 /* ReactiveSwift.xcconfig */, - 7134E6FE5CB1D5BBC04158D17EF07982 /* ReactiveSwift-dummy.m */, - E12B1ED1B4C0A93A3519BA3B7C28DA68 /* ReactiveSwift-prefix.pch */, - D3891B24536C2EEB56439F4AE948F504 /* ReactiveSwift-umbrella.h */, + F10F466C5A9E0DEF633B68E41A46D930 /* Info.plist */, + EAB5B056EFE98F6B6993B59FAA951A10 /* Result.modulemap */, + 35E19B5A44F377A7681B3DFB6DE350CA /* Result.xcconfig */, + D10BA1D7EBE6C8BF508A17B3C0BE2936 /* Result-dummy.m */, + 0BF0FE4A53B4C66F9C0E7CE83972F235 /* Result-prefix.pch */, + 4A7247C35642C6E18E1E0ECE44092142 /* Result-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/ReactiveSwift"; - sourceTree = ""; - }; - FDD1695A3B721B245397974BC61D715D /* Result */ = { - isa = PBXGroup; - children = ( - 9427D33D9A21060CC4CC8E4507E7CFAD /* Result.swift */, - 4F56CB1AD0A49EC42E54D6467761239E /* ResultProtocol.swift */, - 7FAA33E810429A0457651FC58663CCD5 /* Support Files */, - ); - name = Result; - path = Result; + path = "../Target Support Files/Result"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 0F840852823E46F2990D05F7A1871DEC /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 7269E1153109D9A90359F3B4CDFF9AC3 /* RxSwift-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 18A07B835FCA2D596DDA279B34C60713 /* Headers */ = { + 67D3C0A744575AAF1DFD1F64937B95E8 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - FC5075412755DDFAF3BBE70DACFAB357 /* Result-umbrella.h in Headers */, + E6AC3124324A09BCE9B7AADBDAF31F72 /* Moya-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 21B47F15F90EEBBC3CC8C10C71C90A8B /* Headers */ = { + 6C1BCAB3E72197DECEF10CEFA216C69E /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - A24DAB3DED238E00758C268E995B7E73 /* Moya-umbrella.h in Headers */, + 912AEB85DFD8A8F6C3ECBCA8739F6D3B /* Moya-ObjectMapper-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 5F93B701DD1956BB7B8E207C6B6440EA /* Headers */ = { + 823CBDB683DB4F6112BFF9396ABF1745 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 6645924370EB7C1E703FB3C2F96AEFF6 /* Pods-Demo-umbrella.h in Headers */, + 763CCB40A53380EED44F049AF772EA07 /* Pods-Demo-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 83A1DF9D7474CFB521E8C3036F7E31C0 /* Headers */ = { + B31D07A6FCAA5CADE1C50DC54230CF4D /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - C8647B547B0AA650F2FD380DB4E13D6D /* Moya-ObjectMapper-umbrella.h in Headers */, + 793D20AC0C4410895657E43E42FE4F48 /* Result-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 8D9E6122EE97FD52CD98930DD2F3471F /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 481E2BFCD8DDC1B26812081041152FDA /* ObjectMapper-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9285BDE0320C7663A2F34BF73CCB9B8A /* Headers */ = { + B4002B6E97835FDCCAA5963EFE09A3E0 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - E29E386B034313C62E76D5DFF609F830 /* ReactiveSwift-umbrella.h in Headers */, + 1B9EDEDC964E6B08F78920B4F4B9DB84 /* Alamofire-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - B4002B6E97835FDCCAA5963EFE09A3E0 /* Headers */ = { + D07F4CAC6E9B95D5BDD515513CFC3C65 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 1B9EDEDC964E6B08F78920B4F4B9DB84 /* Alamofire-umbrella.h in Headers */, + E454625842032CE9948636C13EF18692 /* ObjectMapper-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 2A6D0851BA24DD25864CB23A3A83B9CC /* Moya */ = { + 1215771836B84E9F9899950098D2FF80 /* Result */ = { isa = PBXNativeTarget; - buildConfigurationList = 55498414C06D636BD5A964403C0608F5 /* Build configuration list for PBXNativeTarget "Moya" */; + buildConfigurationList = 10D67BA71D2F140988D177C56F8D3D5B /* Build configuration list for PBXNativeTarget "Result" */; buildPhases = ( - 67467CBD1F09727991BB579C830B7EA6 /* Sources */, - 7461D75CE31FF097019200761D02C39F /* Frameworks */, - 21B47F15F90EEBBC3CC8C10C71C90A8B /* Headers */, + 8F189E1B0F1DBFA352AE290E0C8964BD /* Sources */, + 162D2D85F14F2AC0D05E12CB90A3E7DF /* Frameworks */, + B31D07A6FCAA5CADE1C50DC54230CF4D /* Headers */, ); buildRules = ( ); dependencies = ( - 304A51463AA62541C01678DE43BFA33F /* PBXTargetDependency */, - E66D42EB5428919F199BABB1E4C6F37C /* PBXTargetDependency */, - F0BB9F4D747704B79CF8A3BA2EE0569F /* PBXTargetDependency */, ); - name = Moya; - productName = Moya; - productReference = 205BBF1AA90ABD220FCD3EC814B1E0D7 /* Moya.framework */; - productType = "com.apple.product-type.framework"; - }; - 421F6BEF92744C4CA9E5F012EC4C5C8F /* ObjectMapper */ = { - isa = PBXNativeTarget; - buildConfigurationList = 87F2C5A63CCA45E4DAD04FD5F0F3B408 /* Build configuration list for PBXNativeTarget "ObjectMapper" */; - buildPhases = ( - 41CF8C636E06846C7404D2423D825020 /* Sources */, - 57DAEC1F412B81BA3BAAEE802D25A74A /* Frameworks */, - 8D9E6122EE97FD52CD98930DD2F3471F /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = ObjectMapper; - productName = ObjectMapper; - productReference = CE3DB0BD2F238B2028C47A1E2311DB68 /* ObjectMapper.framework */; + name = Result; + productName = Result; + productReference = 7F9D70F3A964B95DDC2EB82BE6BAEBF9 /* Result.framework */; productType = "com.apple.product-type.framework"; }; - 49C6564B2E2D0A1604946BAD65772E21 /* Moya-ObjectMapper */ = { + 52ACA0236F086E72B74F0A090A743D41 /* Moya */ = { isa = PBXNativeTarget; - buildConfigurationList = 04DCCDCD98BFA3F8C4E09C4D68686DEF /* Build configuration list for PBXNativeTarget "Moya-ObjectMapper" */; + buildConfigurationList = 06FAEB5F2DB2902622187A65FEB559F4 /* Build configuration list for PBXNativeTarget "Moya" */; buildPhases = ( - 7AB99F41614F9B803CDBCB2B2975D3C5 /* Sources */, - 310BE1A845E60566CEB579691CC0577A /* Frameworks */, - 83A1DF9D7474CFB521E8C3036F7E31C0 /* Headers */, + DC72DECFFAAA3F6F5136F5410E068ACE /* Sources */, + 45BD623F9D3AFB8C55BEAFC817B81FC0 /* Frameworks */, + 67D3C0A744575AAF1DFD1F64937B95E8 /* Headers */, ); buildRules = ( ); dependencies = ( - 63F4E4961A235E6097C1B4890BD80733 /* PBXTargetDependency */, - 60E025535DE828762DEF1025B460FC8A /* PBXTargetDependency */, - C46C0FBEB937D4E7BDA5BE25A905EA46 /* PBXTargetDependency */, - 3DB431781F676F74809E5FBE7D6CA3A0 /* PBXTargetDependency */, - E71B0B664B1ACD03021C58C78F19421B /* PBXTargetDependency */, + A63F11C6F72F732D6EA9AF30E887EAB1 /* PBXTargetDependency */, + 39E9A8D8FC6CB929806C2B992A1AAA34 /* PBXTargetDependency */, ); - name = "Moya-ObjectMapper"; - productName = "Moya-ObjectMapper"; - productReference = ED4A697F546D5D36E10B1AD245C29F8D /* Moya_ObjectMapper.framework */; + name = Moya; + productName = Moya; + productReference = E24BD600F5389DAA8DDD1D1CECC3F5C4 /* Moya.framework */; productType = "com.apple.product-type.framework"; }; 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */ = { @@ -1488,83 +725,65 @@ ); name = Alamofire; productName = Alamofire; - productReference = DF68A7F635878834BF11B3143131A980 /* Alamofire.framework */; + productReference = E875ECA95CA501A95C465767F13B4166 /* Alamofire.framework */; productType = "com.apple.product-type.framework"; }; - BEB7C81E62FD25739CA5BB7DD89CC19F /* Pods-Demo */ = { + B27F1F7B862582A90168D876BFA178C0 /* ObjectMapper */ = { isa = PBXNativeTarget; - buildConfigurationList = DCAEB9DC05E4B00969EEDA5239B5D1CE /* Build configuration list for PBXNativeTarget "Pods-Demo" */; + buildConfigurationList = 9E13B4787886630F90200DF250C128F9 /* Build configuration list for PBXNativeTarget "ObjectMapper" */; buildPhases = ( - 06E6E99B0490EF6B1838F6FA5EDDD90B /* Sources */, - 68DBCBEC97BE6A6FD2A426C4CBAF68F7 /* Frameworks */, - 5F93B701DD1956BB7B8E207C6B6440EA /* Headers */, + 66ACE76D9E25F47B11451AB54B9DE6F9 /* Sources */, + A65A01FA2D297585C9BAECC3C71F4036 /* Frameworks */, + D07F4CAC6E9B95D5BDD515513CFC3C65 /* Headers */, ); buildRules = ( ); dependencies = ( - 72707AFB3EBC1B8A7A4DEA3440058911 /* PBXTargetDependency */, - A7D5A143C8177B1DF392BF2179558685 /* PBXTargetDependency */, - 4B0E8D78D36E9B0E838DDA23E7E70EC6 /* PBXTargetDependency */, - BE1C6A30343ADD12B4C0A213B62072E8 /* PBXTargetDependency */, - 41311E25157250731EBEB5CE437C0ED0 /* PBXTargetDependency */, - 1C40F60B71AF0364B7E000EDE0779F4C /* PBXTargetDependency */, - 21664BF2E2BAF4ED27C03D6B5AA3EDFC /* PBXTargetDependency */, ); - name = "Pods-Demo"; - productName = "Pods-Demo"; - productReference = 89394607B9FE5C06608B8A97BC48ED42 /* Pods_Demo.framework */; - productType = "com.apple.product-type.framework"; - }; - C419A9BCC9AACDC44A26B80764B6B554 /* RxSwift */ = { - isa = PBXNativeTarget; - buildConfigurationList = 823C0DFC675B00046AAA3DB1E22E7778 /* Build configuration list for PBXNativeTarget "RxSwift" */; - buildPhases = ( - E219D2E531A74D2D3F7AD5F83E4CA41A /* Sources */, - 67973A52290871C78259EEE51D1F2353 /* Frameworks */, - 0F840852823E46F2990D05F7A1871DEC /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = RxSwift; - productName = RxSwift; - productReference = 403F223F4F7DD41EE472F87D183F1020 /* RxSwift.framework */; + name = ObjectMapper; + productName = ObjectMapper; + productReference = 793B3E12C93A7177D3C191163E295BAA /* ObjectMapper.framework */; productType = "com.apple.product-type.framework"; }; - EFDB85DF4827734B35E8A46720ACAEE0 /* Result */ = { + CF9F83025EEE1E89490800018F391A28 /* Moya-ObjectMapper */ = { isa = PBXNativeTarget; - buildConfigurationList = C01316BC6E3841F3B09491831731F213 /* Build configuration list for PBXNativeTarget "Result" */; + buildConfigurationList = 829DC697AD702340AE07C0899D9051BC /* Build configuration list for PBXNativeTarget "Moya-ObjectMapper" */; buildPhases = ( - CBCCE006462499F6127948ACF97EF490 /* Sources */, - A397AB7EACC1CD58B601DC46D742CC25 /* Frameworks */, - 18A07B835FCA2D596DDA279B34C60713 /* Headers */, + 44E07C3C74FD39AF46B30DB2950B4D98 /* Sources */, + 8940EA5400E966B099F0E6CADF2A53D9 /* Frameworks */, + 6C1BCAB3E72197DECEF10CEFA216C69E /* Headers */, ); buildRules = ( ); dependencies = ( + C3D682ADDEA35502181356C03485C1F9 /* PBXTargetDependency */, + 7D6D1D90805789BDD759BC864A23E8A1 /* PBXTargetDependency */, ); - name = Result; - productName = Result; - productReference = 9EA5E26F527616CA14BA1AD883FEA452 /* Result.framework */; + name = "Moya-ObjectMapper"; + productName = "Moya-ObjectMapper"; + productReference = 1CC63217A3BA783AFEB9C34A57FB4641 /* Moya_ObjectMapper.framework */; productType = "com.apple.product-type.framework"; }; - FDF0AE36CC489EF7ECB20E4E8C5EC6E5 /* ReactiveSwift */ = { + D75AC21F0C00338A292F046D87369F8F /* Pods-Demo */ = { isa = PBXNativeTarget; - buildConfigurationList = EF35564E0995115C18C0EF751687764B /* Build configuration list for PBXNativeTarget "ReactiveSwift" */; + buildConfigurationList = D45A22551EAC1349E2C49070F2BC3899 /* Build configuration list for PBXNativeTarget "Pods-Demo" */; buildPhases = ( - 2FEE51447579C8C24CDD62E671BA516C /* Sources */, - A8C1D60D3ABBCFFCC097218325B728B3 /* Frameworks */, - 9285BDE0320C7663A2F34BF73CCB9B8A /* Headers */, + 468E8E5D40B811E2F1395EC717739FE4 /* Sources */, + 68CDA6B2B3D47E438ACE06690483C97D /* Frameworks */, + 823CBDB683DB4F6112BFF9396ABF1745 /* Headers */, ); buildRules = ( ); dependencies = ( - 7CD6378E14F4CB903EA9F867812CB21D /* PBXTargetDependency */, + 6C376E7D2D820C0F579D9F6DCC489DD8 /* PBXTargetDependency */, + AAEC8463263E7556264940D9DDEF53E2 /* PBXTargetDependency */, + 65EA84B9F7ED237C567BC1529273233A /* PBXTargetDependency */, + 73D9B0DC78DCEC575D695E99E0FF08F0 /* PBXTargetDependency */, + EDD57AED7006026E3B04D7C4EEA5FFFB /* PBXTargetDependency */, ); - name = ReactiveSwift; - productName = ReactiveSwift; - productReference = BB1F0348FD4C424F19EFB9411323F3FA /* ReactiveSwift.framework */; + name = "Pods-Demo"; + productName = "Pods-Demo"; + productReference = E73F7216E01A4E9EE47563D1F12322A1 /* Pods_Demo.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -1584,60 +803,21 @@ en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = EB8FC93A3843019CFC06E2F16CCE292B /* Products */; + productRefGroup = 8C20CF5C288C86F5FB88225756A27221 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */, - 2A6D0851BA24DD25864CB23A3A83B9CC /* Moya */, - 49C6564B2E2D0A1604946BAD65772E21 /* Moya-ObjectMapper */, - 421F6BEF92744C4CA9E5F012EC4C5C8F /* ObjectMapper */, - BEB7C81E62FD25739CA5BB7DD89CC19F /* Pods-Demo */, - FDF0AE36CC489EF7ECB20E4E8C5EC6E5 /* ReactiveSwift */, - EFDB85DF4827734B35E8A46720ACAEE0 /* Result */, - C419A9BCC9AACDC44A26B80764B6B554 /* RxSwift */, + 52ACA0236F086E72B74F0A090A743D41 /* Moya */, + CF9F83025EEE1E89490800018F391A28 /* Moya-ObjectMapper */, + B27F1F7B862582A90168D876BFA178C0 /* ObjectMapper */, + D75AC21F0C00338A292F046D87369F8F /* Pods-Demo */, + 1215771836B84E9F9899950098D2FF80 /* Result */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - 06E6E99B0490EF6B1838F6FA5EDDD90B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - FF1B28B0E4069ADCCDDE21DCC00A09CE /* Pods-Demo-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 2FEE51447579C8C24CDD62E671BA516C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - E5362121A30FEA455E7E6654111D38E0 /* Action.swift in Sources */, - 60A8A8EE66C89410E4CF32DCF54B0104 /* Atomic.swift in Sources */, - 96BA1F0C033A1766271910B4E6AC82F7 /* Bag.swift in Sources */, - F7531BCE8855F7B136327F3415C9ED8C /* Deprecations+Removals.swift in Sources */, - 63BFEFECB9A2FFB46347AF8D7A6010C9 /* Disposable.swift in Sources */, - B3A17E35B391DA28195A889C979540A4 /* Event.swift in Sources */, - 7FF874C342E47D633982FB42AC3DC678 /* EventLogger.swift in Sources */, - 4F9AD7B1CCC4896B36B31A0E03003BB4 /* Flatten.swift in Sources */, - 60CA6E3F0423817E9812E85C863B3904 /* FoundationExtensions.swift in Sources */, - 42DABB15B8D979767E0F44C1F53AE17F /* InhabitableTypeGuards.swift in Sources */, - D2D6D73DA2F023FA2E7B143443642610 /* Lifetime.swift in Sources */, - B841A940A08AE08C411F778E85D6A5A2 /* Observer.swift in Sources */, - 765794766945F0DF2B0E0298F666ED25 /* Optional.swift in Sources */, - B5C6D4544EE71387786B09CAC6DDB126 /* Property.swift in Sources */, - 6495ECC6B3EB7CF17D20A4521995E8EE /* Reactive.swift in Sources */, - 0ECB1FCB4B9AFE4C0E9A80FC223BC787 /* ReactiveSwift-dummy.m in Sources */, - 8F9C9D2863DF04D1B82569FB74F92B76 /* ResultExtensions.swift in Sources */, - 8285A0E95F833AD6C8C0B6B4430C6EDC /* Scheduler.swift in Sources */, - 6C5A8FEF60C73A2EB3E76E377F9A9980 /* Signal.swift in Sources */, - 0BEE3A2E43CD635836111FD0AB701E16 /* SignalProducer.swift in Sources */, - 3176BBD94BCD96863313626D1F2389A6 /* UnidirectionalBinding.swift in Sources */, - 76776FFFB0888B0064B5D06F87C56F1C /* ValidatingProperty.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 32B9974868188C4803318E36329C87FE /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -1663,362 +843,160 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 41CF8C636E06846C7404D2423D825020 /* Sources */ = { + 44E07C3C74FD39AF46B30DB2950B4D98 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 09DB9B04AEECC7468A86685AD754BE5C /* CustomDateFormatTransform.swift in Sources */, - 739F7DBD923F4F358E72B105EB878680 /* DataTransform.swift in Sources */, - A9086E9CAEDB5F1144385BBFD8FCBF2F /* DateFormatterTransform.swift in Sources */, - 69BF30EE9140E7086BA82C4DB6938ABC /* DateTransform.swift in Sources */, - 0E1548980432E6CA13021CA74E639EA2 /* DictionaryTransform.swift in Sources */, - 57D4500DF5AC27397C1EC0D58D4D77A3 /* EnumOperators.swift in Sources */, - C4809B395ED9DA6B754944A80ADFD0AA /* EnumTransform.swift in Sources */, - 000CAA7B68BCC90DFFBD95BED8A2038D /* FromJSON.swift in Sources */, - B8AC7A8094077E16A17F340769E7D6DC /* HexColorTransform.swift in Sources */, - F5155D5C24499638C6C3124FC4FE4264 /* ImmutableMappable.swift in Sources */, - 4B5B309384D3880D2CE23CD3B5375DDB /* IntegerOperators.swift in Sources */, - 0AC4D4C16737845EB4BC47ED4C13E504 /* ISO8601DateTransform.swift in Sources */, - 1FC11BFA37680C9CA9F198E6A1881005 /* Map.swift in Sources */, - CED27CF9BC6DEADC4034354FFD243D0A /* MapError.swift in Sources */, - CA1BFF20FE43D75453B6F302BCD287DA /* Mappable.swift in Sources */, - 2FE4DAE5F7A4342DF8D3DC589B732685 /* Mapper.swift in Sources */, - 2D694447FB3438F52AEEB36230A387CA /* NSDecimalNumberTransform.swift in Sources */, - 84AEFE898ED7A873994E4BAE43079AA0 /* ObjectMapper-dummy.m in Sources */, - EF6A3C105AFA2332D931D70A5E8DE01E /* Operators.swift in Sources */, - 9E9354DCA18BE46AAAAC5338C88DDECD /* ToJSON.swift in Sources */, - EB11EC3B3706810D31F002F2D479975A /* TransformOf.swift in Sources */, - 0CB40B5FA8ED1D19D39A6E2E45B6F8D9 /* TransformOperators.swift in Sources */, - A9005AC4AC9220336B29D7B057D0EF7B /* TransformType.swift in Sources */, - F6EBAD7C469937AEDFC63FA87EBEA647 /* URLTransform.swift in Sources */, + FF77B0DF996E2D2DC5EE814B572FED64 /* Moya-ObjectMapper-dummy.m in Sources */, + E6D73C99746FF2CEBB61C53D0BA6BA41 /* Response+ObjectMapper.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 67467CBD1F09727991BB579C830B7EA6 /* Sources */ = { + 468E8E5D40B811E2F1395EC717739FE4 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - D11FDF5AA69D08B83E8718C717957AF0 /* AccessTokenPlugin.swift in Sources */, - E63D94CF23960E905978B3DAE95125D7 /* Cancellable.swift in Sources */, - EF16CC75D347186F4DD61A34DB325829 /* CredentialsPlugin.swift in Sources */, - 8B5A74BFA2A85B41F5C9100055B9C428 /* Endpoint.swift in Sources */, - 6A02A5C5446ECB184384F6904ECC6004 /* Image.swift in Sources */, - B801D52816DF0D0326D2A87867513367 /* Moya+Alamofire.swift in Sources */, - D3A1BD21F5AA4FA25B799B68B54063E5 /* Moya-dummy.m in Sources */, - BF6631BC5DAE90CD147EBEF561C4DB87 /* MoyaAvailability.swift in Sources */, - 98ECF94F6E7F84B56FB762B98FA919F3 /* MoyaError.swift in Sources */, - 7F7D7D024F022010916E550B7632E680 /* MoyaProvider+Defaults.swift in Sources */, - 7086C1435AE7A37F93956ECDE2F45AB2 /* MoyaProvider+Internal.swift in Sources */, - D3C6B770C7598E9C1C3B9854136893F3 /* MoyaProvider.swift in Sources */, - F2E82F7E4AADB73AD627E1558470034B /* MultipartFormData.swift in Sources */, - 7A1A37147E8BA262F5B3EFA0DBD6E531 /* MultiTarget.swift in Sources */, - 84BB5EBA0C08C28C5E83D6CA263A362B /* NetworkActivityPlugin.swift in Sources */, - ABB66F2AFFF577587F84A0FFDB8EF4D0 /* NetworkLoggerPlugin.swift in Sources */, - F3DF171DAA677F58667F4B082DEB57DB /* Observable+Response.swift in Sources */, - 2E28CD026DEB6B00E52C1A833343249B /* Plugin.swift in Sources */, - ED63927DE90D567408593796F02C51BE /* Response.swift in Sources */, - 3E56DB4136E625DCA0B4F278CE147D6B /* RxMoyaProvider.swift in Sources */, - 8C550DC81B578A597EA4E4E75E3C5997 /* TargetType.swift in Sources */, + 7A689CB0C0925A6E162FBAED469EF754 /* Pods-Demo-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7AB99F41614F9B803CDBCB2B2975D3C5 /* Sources */ = { + 66ACE76D9E25F47B11451AB54B9DE6F9 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 39346FCED48D5C12D52942507E916C90 /* Moya-ObjectMapper-dummy.m in Sources */, - 8AF174F050E51E32AF95469FD8910010 /* Observable+ObjectMapper.swift in Sources */, - 61B9FA99D3933D39E66F9FF40164623F /* Response+ObjectMapper.swift in Sources */, + 7877064BA276437D24E9E1C06AEB0441 /* CustomDateFormatTransform.swift in Sources */, + 1696B0E2B6A79368FDB8328CAAF86C05 /* DataTransform.swift in Sources */, + AD1996CB888174F24B80DF8F348E508F /* DateFormatterTransform.swift in Sources */, + 259AA2985037A91CFB5F1589C55F63CC /* DateTransform.swift in Sources */, + FB33014C77D6CDB8A9D8CA13F093C8F6 /* DictionaryTransform.swift in Sources */, + 50AADB03EEE03971420E193BE4F2A1F4 /* EnumOperators.swift in Sources */, + 349D10D78FEB4E9E72E2F63C8083D616 /* EnumTransform.swift in Sources */, + 108BEFE8654D69EE6E963A52E2EA91D6 /* FromJSON.swift in Sources */, + D9D10E109F26763E7F2B49024AC10D8B /* HexColorTransform.swift in Sources */, + 6BA9E5D773052DBCD13B1DB7527FBF86 /* ImmutableMappable.swift in Sources */, + C22CD02C8A69F8D6C5A6AC294DABC0B5 /* IntegerOperators.swift in Sources */, + 924479FFEAFF6111EDA3A90BA719D36A /* ISO8601DateTransform.swift in Sources */, + 08590DAF0E5ACBBB6350FC6FE372338E /* Map.swift in Sources */, + 31E2C47C2555D6199B14D3FCA82E6FA2 /* MapError.swift in Sources */, + 70878E4B770F3F62810ABE294EC5D016 /* Mappable.swift in Sources */, + 1E551D6261B9CA27BD3D6B763B9FBBC1 /* Mapper.swift in Sources */, + 016F5DCE78049592DA9F9A1066F666BB /* NSDecimalNumberTransform.swift in Sources */, + 0E5462C516F9BDD82F954825924B4ABE /* ObjectMapper-dummy.m in Sources */, + FA8536C94898E642793F533BC35DDD93 /* Operators.swift in Sources */, + 4FDA5B6636B138C43246AD98F971CA2B /* ToJSON.swift in Sources */, + FC7F2B1276ABF6A3D58546114F63F0CA /* TransformOf.swift in Sources */, + 368EE849358D9D60DFBA7BE2806C2D97 /* TransformOperators.swift in Sources */, + 792297F58B43A4A9F7C0AAECE33DE1A3 /* TransformType.swift in Sources */, + 2B851FE95CDFEE93B7DBCE96FB37A4F6 /* URLTransform.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - CBCCE006462499F6127948ACF97EF490 /* Sources */ = { + 8F189E1B0F1DBFA352AE290E0C8964BD /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 374051E6F49A7295C8F1112894850901 /* Result-dummy.m in Sources */, - 85CB137AADC3D775F639748E4A303415 /* Result.swift in Sources */, - 32D18A277CA084098022CBBDFC7D1C0F /* ResultProtocol.swift in Sources */, + 78FE9B53DF05C8CDD2A665F8579A314C /* Result-dummy.m in Sources */, + BECBD02FE80EE5891C2A5DB54C1E306D /* Result.swift in Sources */, + 5A7600D41031DA30BDB6FD7882792C46 /* ResultProtocol.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - E219D2E531A74D2D3F7AD5F83E4CA41A /* Sources */ = { + DC72DECFFAAA3F6F5136F5410E068ACE /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 8DD9818A5601E87E766E1A69042E27FE /* AddRef.swift in Sources */, - 7E441805C4C2593D54683EEA350766B4 /* Amb.swift in Sources */, - EE5B4C0476634A4E8A622D28FFF5FC06 /* AnonymousDisposable.swift in Sources */, - EBCE7DBA3620ABF1556DF63807C44A1C /* AnonymousInvocable.swift in Sources */, - 9BDBA2403372716AB15D531B33E0819D /* AnonymousObservable.swift in Sources */, - 4B4B6DDA48E2D8331209095ADECCBD53 /* AnonymousObserver.swift in Sources */, - B0A8E8D7320DC23AEEC2ED34439D884E /* AnyObserver.swift in Sources */, - F6BC0D049730D4315FF3469ECBE981FB /* AsMaybe.swift in Sources */, - 17F5144A575AFC3DB5BF1F3D469BC837 /* AsSingle.swift in Sources */, - 89E8BC1E18BB887B569C4F17CBF9BC21 /* AsyncLock.swift in Sources */, - 198DEE3F4FFE846BD52C01F6A53F754C /* AsyncSubject.swift in Sources */, - 641A5EE7D6614D73EB7C3E0F0DC0CDC2 /* Bag+Rx.swift in Sources */, - 43270940EB9B038B8D7024555D987E87 /* Bag.swift in Sources */, - F80AE7863D18839F34F60E5BCE111403 /* BehaviorSubject.swift in Sources */, - 53F91CBCDD0CB393C27AB39E8D1FE555 /* BinaryDisposable.swift in Sources */, - FCB654EDC72D1187C5573771EEFA3B7A /* BooleanDisposable.swift in Sources */, - B5982909C07F473AB5633DAB332EDF46 /* Buffer.swift in Sources */, - 9FF323881B6A787E163E7824EB03F288 /* Cancelable.swift in Sources */, - 9D0F4FAB1EF3FCD14CBD5A93D95B6207 /* Catch.swift in Sources */, - 20ED4F70F7F94FE9EC8D49995F11434B /* CombineLatest+arity.swift in Sources */, - D20A69E3E808AFD0AE167E03094268C1 /* CombineLatest+Collection.swift in Sources */, - 544E1DC2C392E0257338240259B5B483 /* CombineLatest.swift in Sources */, - 82BEE108931EA1A59D0DDDA358745523 /* CompositeDisposable.swift in Sources */, - 8BC16C1AB440F23DB46E6CEE43B9F271 /* Concat.swift in Sources */, - 0234CDBD103EB7AD5EB5A415C14D256C /* ConcurrentDispatchQueueScheduler.swift in Sources */, - 64B966220380DBFFE5D243FD78B2A3EB /* ConcurrentMainScheduler.swift in Sources */, - 3D61AF186EFD00BD31F145AF3241C759 /* ConnectableObservable.swift in Sources */, - 14A046FA24D0256F42644010C67328B5 /* ConnectableObservableType.swift in Sources */, - 9700A49E90B452387D2CBB9E23C7D786 /* CurrentThreadScheduler.swift in Sources */, - E73DE9471C81DC527F5DF25F886F10E1 /* Debounce.swift in Sources */, - 7824DCCF57694D70347315E949C60E39 /* Debug.swift in Sources */, - A1E2E36B7BF79D24C0AF5FE249172120 /* DefaultIfEmpty.swift in Sources */, - 07B3EC897842B37C329E7E84050BB001 /* Deferred.swift in Sources */, - 285C41FA5502F33262E4420A182D9AD8 /* Delay.swift in Sources */, - 1BA578A0C93C7603A772D319F809D5A1 /* DelaySubscription.swift in Sources */, - 950648597FCE2A584C3FCC8E409FF443 /* Dematerialize.swift in Sources */, - AD75968CA7B8D67F6BB9F3E7369240D0 /* Deprecated.swift in Sources */, - CA60949CFD90255D0C31785A8428B8CE /* DispatchQueue+Extensions.swift in Sources */, - E6BD8CBF87FB37DC18F8F9E4300FE530 /* DispatchQueueConfiguration.swift in Sources */, - 781A22F566FF70A34B360411A314C068 /* Disposable.swift in Sources */, - 66244D2DD0DF4E7D10C764AF18027E91 /* Disposables.swift in Sources */, - DE1072C02E1C53397773CEBCC52B7AF4 /* DisposeBag.swift in Sources */, - 12C2557A9EB8643C5418E197CD77AA70 /* DisposeBase.swift in Sources */, - 349B655C63E8173DBE9D7E6FA7DB3D36 /* DistinctUntilChanged.swift in Sources */, - ADB0D84CC07EECA99486F6F7C7A24CA5 /* Do.swift in Sources */, - EC408F9747A97C10C8FFF4CF8B637823 /* ElementAt.swift in Sources */, - 16576AA661FF85E4BA6D02FEFB402925 /* Empty.swift in Sources */, - 3E433D1D3D46D117F7DD7269FC35A26C /* Error.swift in Sources */, - 044D8F5D1B623F60FE19897EC2939280 /* Errors.swift in Sources */, - 6965544D8BB4ACDF4EC26910E486D181 /* Event.swift in Sources */, - E16230D6FC8EB44F8B697FFB5CD6A25E /* Filter.swift in Sources */, - 901887B139E41DD2D179ED2A23A4B70A /* Generate.swift in Sources */, - 554F838DE57AA41E909DECCAB3134C69 /* GroupBy.swift in Sources */, - 747383F70891AD4278847607EF19F9D9 /* GroupedObservable.swift in Sources */, - D85731A19947BC9DF5C852C55EF7CA1A /* HistoricalScheduler.swift in Sources */, - 4F315ABFC1D4D7B5AA03FC891645AE63 /* HistoricalSchedulerTimeConverter.swift in Sources */, - 4EB917C3384DF09068583326C9A1A35B /* ImmediateScheduler.swift in Sources */, - 4D9A631A76A3667DAB7E9FBA2BF9482B /* ImmediateSchedulerType.swift in Sources */, - FA455D54FB780C7DABD6EF04B119C852 /* InfiniteSequence.swift in Sources */, - E10656661A6108001A523F897126F2CD /* InvocableScheduledItem.swift in Sources */, - D4D36FE6280D716A7B2428DDD0795C2B /* InvocableType.swift in Sources */, - 0B6CE56C30B14BCE715607D5F9623255 /* Just.swift in Sources */, - 5165CA7792DBB1E987D6DD48C4122706 /* Lock.swift in Sources */, - FC7A8735A166AEA5D225647264380BBF /* LockOwnerType.swift in Sources */, - 5507CB083B137189C6FA790257EBCFC5 /* MainScheduler.swift in Sources */, - 925DC13DFA8AE78DE71BE11F5C62903C /* Map.swift in Sources */, - FEA2B1A5B25AD071CBD711AEF3B9EE4F /* Materialize.swift in Sources */, - 35B61F9CC18DE8CA76EA037A2A8712AA /* Merge.swift in Sources */, - 1C4BD460D1E1F4243C0925B92D8D8786 /* Multicast.swift in Sources */, - B64425F3EEED0CE5889881B5E9E2E625 /* Never.swift in Sources */, - 694595974AD7EAA7FA86C99E95177A8E /* NopDisposable.swift in Sources */, - 85EB3D734B4186FE763550CA83E6E858 /* Observable+Aggregate.swift in Sources */, - F05D5EC4A3A3DE4FFC782BF61EAD21FC /* Observable+Binding.swift in Sources */, - 9E809940ED4CD86D8A6D0D773B5B2A50 /* Observable+Concurrency.swift in Sources */, - 9A8D62DC7159E43B84095223BD3E5CDB /* Observable+Creation.swift in Sources */, - B5ACCF6D9EEA6074F66037D1396EE2B5 /* Observable+Debug.swift in Sources */, - D062E4840A006E91AB7E20D8843CD3EB /* Observable+Multiple.swift in Sources */, - 40F856F0358939707FF3647BBB99F952 /* Observable+Single.swift in Sources */, - A0964EB62F2DB350A969A8DC8CEF81D3 /* Observable+StandardSequenceOperators.swift in Sources */, - 5938575058EF82086F2CBC6BD6E4642D /* Observable+Time.swift in Sources */, - 60170BDDCDD037601717BA153C8B7701 /* Observable.swift in Sources */, - 4C28309F83E7306619CB7BF9552F4F17 /* ObservableConvertibleType.swift in Sources */, - 04CE8CD210227DC6588E994D44EC48D3 /* ObservableType+Extensions.swift in Sources */, - 9A7B85EAA2A51F64BCA29067F5DC7D8B /* ObservableType.swift in Sources */, - B2CBB9128902C1CDBD0B2A1C7DD17F59 /* ObserveOn.swift in Sources */, - 61A3B58787C3FDF6AC3A76128CD4C134 /* ObserveOnSerialDispatchQueue.swift in Sources */, - 8CFECB306B3011D0733ABA8DCC1015AD /* ObserverBase.swift in Sources */, - E180BA547AEDCE5786138D28AADA312C /* ObserverType.swift in Sources */, - A6F179C0FD478E08A4C50AF1160DF4D0 /* OperationQueueScheduler.swift in Sources */, - F11CB11BB3FA8065DDC719B339E3526E /* Optional.swift in Sources */, - AFE6CDA6AFDC813885E1640C037B532F /* Platform.Darwin.swift in Sources */, - 835B836C69E22C29965079C6D3535142 /* Platform.Linux.swift in Sources */, - 92845F50C684624D41FCD9FA8A732D93 /* PrimitiveSequence+Zip+arity.swift in Sources */, - 1CAEF92803A506A44E9E8EFBF587B5BE /* PrimitiveSequence.swift in Sources */, - DE496B92F346321146865A90D9ED4299 /* PriorityQueue.swift in Sources */, - 984BC87C7E893BAEBBF23CD760B84E1E /* Producer.swift in Sources */, - F435B7412E256D199E674C234792B85B /* PublishSubject.swift in Sources */, - 3FEAF6012706E5EF26CECD5DBE4449E2 /* Queue.swift in Sources */, - 824A4C07D443B2F647D7C50DD9564BF9 /* Range.swift in Sources */, - 8772CA6372E9CA1C2844E0DC2EB52CB2 /* Reactive.swift in Sources */, - 1A5E4B94ACF07CE3EDD80F144C65039D /* RecursiveLock.swift in Sources */, - 342F1D53C4E2AA0B324103A4553D668D /* RecursiveScheduler.swift in Sources */, - F78045F54417825F35CD7E0C5AD08677 /* Reduce.swift in Sources */, - 80B53F3C4D714E0F3CA73B7C094F4FE5 /* RefCount.swift in Sources */, - 17CA10FA4E82F2BFAF9643E4929A41FE /* RefCountDisposable.swift in Sources */, - 27009AF83A814DA8E88F6707164167B2 /* Repeat.swift in Sources */, - 49447E816B12F4DCA7008769F344C7BB /* ReplaySubject.swift in Sources */, - 621BEEF9B28AA223F02966B0C96860E0 /* RetryWhen.swift in Sources */, - 7C25E45B76A73FA09B4095D66F09976C /* Rx.swift in Sources */, - 2E50C0243F9BBCE7FF7F015FDA3EF6D5 /* RxMutableBox.swift in Sources */, - 1A2B98B68FA7555BE1A35DF42C96A4E7 /* RxSwift-dummy.m in Sources */, - 1B114BA2ACB4E6B22768B72A520F7692 /* Sample.swift in Sources */, - 8FFA00CAA7FA099C963C0F8CA617A367 /* Scan.swift in Sources */, - CF39A869F4EC7228313BDDF36D9565CB /* ScheduledDisposable.swift in Sources */, - CD9270ED0DB978A37BBAE1D7AF54C3F4 /* ScheduledItem.swift in Sources */, - 22CFA90FDBDA6D91E5377B5BEE7AEABE /* ScheduledItemType.swift in Sources */, - 160D2378A15056D039FEECF60F12F48D /* SchedulerServices+Emulation.swift in Sources */, - 19D382282D1BD1F7F3872A7C740D31CF /* SchedulerType.swift in Sources */, - 6355EBC9033044801712D035B3D8B4DE /* Sequence.swift in Sources */, - 0F7E7F866EB647B836183A429A087B34 /* SerialDispatchQueueScheduler.swift in Sources */, - 9D0CB68921548770D3E8C6D8426F2A48 /* SerialDisposable.swift in Sources */, - 4A01BDF81AB5B9467FA6FC6C6C0259BC /* ShareReplay1.swift in Sources */, - E01BE28B086995CDED5EB65D92691076 /* ShareReplay1WhileConnected.swift in Sources */, - 9EC63590781E69500F734CE9B454E9FE /* SingleAssignmentDisposable.swift in Sources */, - 1BFE36BD6F8696E7292CE75586D83AB4 /* SingleAsync.swift in Sources */, - 43642AA220763F271C5BA6F31702624A /* Sink.swift in Sources */, - 0007293B7C1233BC97E4ED5AF5A57C91 /* Skip.swift in Sources */, - A368F15C924F588996B3365876C7A88D /* SkipUntil.swift in Sources */, - 5A49DFF9B98FB7D602B3867E6B669EB1 /* SkipWhile.swift in Sources */, - 1FD6E1149F3EC3B0DD8F893B6762BBBC /* StartWith.swift in Sources */, - E19E15DFDAF63418F901DFE39DABA5CC /* String+Rx.swift in Sources */, - 6E19CF8A616A296AD4F1D128CAC2975F /* SubjectType.swift in Sources */, - 97BCD11B822E31AC7F4A4F048CA26052 /* SubscribeOn.swift in Sources */, - 641BF4376A1021F8E2D42DAEAF0A5D94 /* SubscriptionDisposable.swift in Sources */, - 8D1512733BA64A38509CA1F0A660FB3E /* Switch.swift in Sources */, - 48FF8AF8C61AD5164BBE6BC9AE9C7FAF /* SwitchIfEmpty.swift in Sources */, - 18772B6600510FC9AC2A2C07845EBBBE /* SynchronizedDisposeType.swift in Sources */, - CE23A14BF39E3B069ABBA2D78A042D7E /* SynchronizedOnType.swift in Sources */, - A0ECE61C5E902F165BE28B6D6DBFB11E /* SynchronizedSubscribeType.swift in Sources */, - 54B070EF386B029A9495EF4798EB3236 /* SynchronizedUnsubscribeType.swift in Sources */, - 1A171E7748485C86326FB3AC316A7E49 /* TailRecursiveSink.swift in Sources */, - FF61036330EB6DE42465B6D8BE2DD8A4 /* Take.swift in Sources */, - 2646370A1E8A0A940E95F11D50253580 /* TakeLast.swift in Sources */, - 2AB311218EFF549A0E9E481DB51603E5 /* TakeUntil.swift in Sources */, - CEF40EBDDFE583B854F7E9BCDF3EA797 /* TakeWhile.swift in Sources */, - 009E1D75E836C631CE8DA835A99DD90F /* Throttle.swift in Sources */, - 14A9AC8D888C262918189DCF10B1FC75 /* Timeout.swift in Sources */, - B9F44AD8EF027BE41B9CCF0A9AA579CD /* Timer.swift in Sources */, - 5099D1C9653B29E61B197404B9FA05E2 /* ToArray.swift in Sources */, - 4A8374CA5B8CAE6BA944B443C9661AC5 /* Using.swift in Sources */, - 87A6F6E1EFF2432FEF426AACCA7672BB /* Variable.swift in Sources */, - 31DA6D8BA73FFCA5C1BAE2FF42D58EA3 /* VirtualTimeConverterType.swift in Sources */, - 6AB6BE59334ADD093C1B8A16C98642A2 /* VirtualTimeScheduler.swift in Sources */, - 46A64B1499CD09CC2C645D7F06566D7C /* Window.swift in Sources */, - 9F16D35045DAC73C05BE99C220B7E498 /* WithLatestFrom.swift in Sources */, - 015ACB1F69FB7BF7DCAE4CE15F670AA7 /* Zip+arity.swift in Sources */, - 993A1E5EDCCB8C47CDDFA1687F931DE5 /* Zip+Collection.swift in Sources */, - 7F0667A1E159C84203C889EB30D74E62 /* Zip.swift in Sources */, + 0C6C2653EECAA533DD114CE29079640B /* AccessTokenPlugin.swift in Sources */, + CF6C7CEF81CB840D6ABC54F45FBA37C3 /* Cancellable.swift in Sources */, + 574D806991FD44BBA298169DF048A572 /* CredentialsPlugin.swift in Sources */, + 6E024E5D4101ED5C23ACFBDB1C4A1D70 /* Endpoint.swift in Sources */, + 8554FDD63A222310587233F10F1B2D85 /* Image.swift in Sources */, + BA4F44E8CD8ECF8E33AE951448BDA8E5 /* Moya+Alamofire.swift in Sources */, + 42352574494E4F44BF4D19F6A32D14BF /* Moya-dummy.m in Sources */, + D2096F894CEB71E86585445E1A6BB15E /* MoyaAvailability.swift in Sources */, + 4418C8657F31E73C66BF9578205DC3C7 /* MoyaError.swift in Sources */, + 362D09614DDFE12D6B1A169D07E34955 /* MoyaProvider+Defaults.swift in Sources */, + 7E6E34C212041337189F111719D26698 /* MoyaProvider+Internal.swift in Sources */, + 62A36077DDBB4D6A582AFEFFACC659CA /* MoyaProvider.swift in Sources */, + 74B6D1A8230C28C657193D9F30FB1ED5 /* MultipartFormData.swift in Sources */, + 19FAF6873559665BCBDABF0D516A64A4 /* MultiTarget.swift in Sources */, + EBC5840E357A651E7AA35FC19AB5C006 /* NetworkActivityPlugin.swift in Sources */, + 4FB1845AF74A773450E84C90E293CF2A /* NetworkLoggerPlugin.swift in Sources */, + BDD34D624EF75D4A8C599E234ABB425A /* Plugin.swift in Sources */, + F4DC51B4DACF9A6BD61201BC3A8529F8 /* Response.swift in Sources */, + 9A006942DB4789D53C45C8D1670E3054 /* TargetType.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 1C40F60B71AF0364B7E000EDE0779F4C /* PBXTargetDependency */ = { + 39E9A8D8FC6CB929806C2B992A1AAA34 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Result; - target = EFDB85DF4827734B35E8A46720ACAEE0 /* Result */; - targetProxy = 35B40C47871A2BFB66B1DF89719C2C43 /* PBXContainerItemProxy */; + target = 1215771836B84E9F9899950098D2FF80 /* Result */; + targetProxy = 4257252C3214AFC40F9F41A9ECBD1419 /* PBXContainerItemProxy */; }; - 21664BF2E2BAF4ED27C03D6B5AA3EDFC /* PBXTargetDependency */ = { + 65EA84B9F7ED237C567BC1529273233A /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = RxSwift; - target = C419A9BCC9AACDC44A26B80764B6B554 /* RxSwift */; - targetProxy = FA50F55E715BCB4DB08596E4D2F259BD /* PBXContainerItemProxy */; + name = "Moya-ObjectMapper"; + target = CF9F83025EEE1E89490800018F391A28 /* Moya-ObjectMapper */; + targetProxy = 47F3952E44EF6FD16AE37E54849B127E /* PBXContainerItemProxy */; }; - 304A51463AA62541C01678DE43BFA33F /* PBXTargetDependency */ = { + 6C376E7D2D820C0F579D9F6DCC489DD8 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Alamofire; target = 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */; - targetProxy = 448CBA2B5AAF3C314D4E4B32B447453F /* PBXContainerItemProxy */; - }; - 3DB431781F676F74809E5FBE7D6CA3A0 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Result; - target = EFDB85DF4827734B35E8A46720ACAEE0 /* Result */; - targetProxy = A1AF79BA4FFB31FAEFB631D90EA93418 /* PBXContainerItemProxy */; - }; - 41311E25157250731EBEB5CE437C0ED0 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = ReactiveSwift; - target = FDF0AE36CC489EF7ECB20E4E8C5EC6E5 /* ReactiveSwift */; - targetProxy = 799FA77BC02BC3B70E591F74839DDAE4 /* PBXContainerItemProxy */; - }; - 4B0E8D78D36E9B0E838DDA23E7E70EC6 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "Moya-ObjectMapper"; - target = 49C6564B2E2D0A1604946BAD65772E21 /* Moya-ObjectMapper */; - targetProxy = D34606F68216E7E7B0E351AA2C8ADF14 /* PBXContainerItemProxy */; + targetProxy = 2AEB141962859E6E03DA2FF7C69888F2 /* PBXContainerItemProxy */; }; - 60E025535DE828762DEF1025B460FC8A /* PBXTargetDependency */ = { + 73D9B0DC78DCEC575D695E99E0FF08F0 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = Moya; - target = 2A6D0851BA24DD25864CB23A3A83B9CC /* Moya */; - targetProxy = D7002BCB9BC9247E198B9809447F6EF6 /* PBXContainerItemProxy */; + name = ObjectMapper; + target = B27F1F7B862582A90168D876BFA178C0 /* ObjectMapper */; + targetProxy = 7D925F1D7B9FB97BEC1CA8B1BBC71DE2 /* PBXContainerItemProxy */; }; - 63F4E4961A235E6097C1B4890BD80733 /* PBXTargetDependency */ = { + 7D6D1D90805789BDD759BC864A23E8A1 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = Alamofire; - target = 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */; - targetProxy = 563430843E61782275D71EED528CBEFF /* PBXContainerItemProxy */; + name = ObjectMapper; + target = B27F1F7B862582A90168D876BFA178C0 /* ObjectMapper */; + targetProxy = 890A71BBBFCC5F1362BB1AD1CAD8CC84 /* PBXContainerItemProxy */; }; - 72707AFB3EBC1B8A7A4DEA3440058911 /* PBXTargetDependency */ = { + A63F11C6F72F732D6EA9AF30E887EAB1 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Alamofire; target = 88E9EC28B8B46C3631E6B242B50F4442 /* Alamofire */; - targetProxy = EEA2469DF649FCFD5814639A808C1C6A /* PBXContainerItemProxy */; - }; - 7CD6378E14F4CB903EA9F867812CB21D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Result; - target = EFDB85DF4827734B35E8A46720ACAEE0 /* Result */; - targetProxy = A3E49214DCAD05F7955595F8042E3AA2 /* PBXContainerItemProxy */; + targetProxy = 416E924213AF02AE6A6EC230EEEF18FF /* PBXContainerItemProxy */; }; - A7D5A143C8177B1DF392BF2179558685 /* PBXTargetDependency */ = { + AAEC8463263E7556264940D9DDEF53E2 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Moya; - target = 2A6D0851BA24DD25864CB23A3A83B9CC /* Moya */; - targetProxy = A3DE26FFB53C6E483B9E9E586F64C58E /* PBXContainerItemProxy */; + target = 52ACA0236F086E72B74F0A090A743D41 /* Moya */; + targetProxy = 5FFD80BEA33A9D9B35CFE6E85A8ACB05 /* PBXContainerItemProxy */; }; - BE1C6A30343ADD12B4C0A213B62072E8 /* PBXTargetDependency */ = { + C3D682ADDEA35502181356C03485C1F9 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = ObjectMapper; - target = 421F6BEF92744C4CA9E5F012EC4C5C8F /* ObjectMapper */; - targetProxy = CBB41F96F2BCDB97F851ED133FC81786 /* PBXContainerItemProxy */; - }; - C46C0FBEB937D4E7BDA5BE25A905EA46 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = ObjectMapper; - target = 421F6BEF92744C4CA9E5F012EC4C5C8F /* ObjectMapper */; - targetProxy = 6E912DC97156EABFDE2C4B6EF06784DF /* PBXContainerItemProxy */; + name = Moya; + target = 52ACA0236F086E72B74F0A090A743D41 /* Moya */; + targetProxy = 9C43B6F8E05C87B75135D31D6FBE93CB /* PBXContainerItemProxy */; }; - E66D42EB5428919F199BABB1E4C6F37C /* PBXTargetDependency */ = { + EDD57AED7006026E3B04D7C4EEA5FFFB /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Result; - target = EFDB85DF4827734B35E8A46720ACAEE0 /* Result */; - targetProxy = 5C018009CFFB83E9435346DF3A9FFD0D /* PBXContainerItemProxy */; - }; - E71B0B664B1ACD03021C58C78F19421B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RxSwift; - target = C419A9BCC9AACDC44A26B80764B6B554 /* RxSwift */; - targetProxy = E8E16664D5BFAA9326D20B666C748F50 /* PBXContainerItemProxy */; - }; - F0BB9F4D747704B79CF8A3BA2EE0569F /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = RxSwift; - target = C419A9BCC9AACDC44A26B80764B6B554 /* RxSwift */; - targetProxy = 8FAC931D00AB3A674FF42918D2F7109F /* PBXContainerItemProxy */; + target = 1215771836B84E9F9899950098D2FF80 /* Result */; + targetProxy = 58E2F4731F808540FC0434BAADAA5650 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 4497E56B2264E0931C8297A3CB1CCFB5 /* Release */ = { + 0277E4D474F1A8FAE3D144B2FF4AEDFE /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0C7805AC2429FAFC54029B4782D5F6A7 /* Moya.xcconfig */; + baseConfigurationReference = A7512D22039AAD5B6E55702CB8B6BB65 /* 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; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -2031,10 +1009,49 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/Moya/Moya.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; + MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_NAME = Moya; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 3906FE6FFC705EA5360354C7F7221F4E /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DAB0701F8F25395B1ED46510ED4B9797 /* Pods-Demo.release.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-Demo/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-Demo/Pods-Demo.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_Demo; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -2091,9 +1108,9 @@ }; name = Debug; }; - 70CC9B0A50824719A3CE6904E8C04621 /* Debug */ = { + 4E7CCC55DD854C2B463569FEC9A14D5E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 24FBE73466F8534532B774BBAC7F2BFB /* RxSwift.xcconfig */; + baseConfigurationReference = 325BC9271672C4E29F980B567E8CA553 /* Moya-ObjectMapper.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2107,14 +1124,14 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxSwift/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Moya-ObjectMapper/Moya-ObjectMapper-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Moya-ObjectMapper/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"; + MODULEMAP_FILE = "Target Support Files/Moya-ObjectMapper/Moya-ObjectMapper.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = RxSwift; + PRODUCT_NAME = Moya_ObjectMapper; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; @@ -2126,77 +1143,9 @@ }; name = Debug; }; - 7D072D0D174F12EAACC1862DA756E67A /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D2B67F026BFB03CD5D152C213DEBF2BC /* Alamofire.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/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"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Alamofire; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 828F7F4CEDE6FAA20950646139BF3C13 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 24FBE73466F8534532B774BBAC7F2BFB /* RxSwift.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/RxSwift/RxSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/RxSwift/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/RxSwift/RxSwift.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = RxSwift; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 9297A6E0B9ED86304C3FBD7DA208EBDE /* Debug */ = { + 4F6B4F665A9F358874A442E493265689 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 78A4128EC1CBD80E45085664E5D7CF4B /* Moya-ObjectMapper.xcconfig */; + baseConfigurationReference = 35E19B5A44F377A7681B3DFB6DE350CA /* Result.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2210,14 +1159,14 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Moya-ObjectMapper/Moya-ObjectMapper-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Moya-ObjectMapper/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Result/Result-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Result/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Moya-ObjectMapper/Moya-ObjectMapper.modulemap"; + MODULEMAP_FILE = "Target Support Files/Result/Result.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Moya_ObjectMapper; + PRODUCT_NAME = Result; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; @@ -2229,9 +1178,9 @@ }; name = Debug; }; - 9AC62FAC9BD7263A39A52519E97FF911 /* Release */ = { + 76DA8210B94CEE37FF5AB81BA54AD765 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 78A4128EC1CBD80E45085664E5D7CF4B /* Moya-ObjectMapper.xcconfig */; + baseConfigurationReference = 325BC9271672C4E29F980B567E8CA553 /* Moya-ObjectMapper.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2263,82 +1212,9 @@ }; name = Release; }; - 9CD8E4195A995ADAE1FAF22815A61B51 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DAB0701F8F25395B1ED46510ED4B9797 /* Pods-Demo.release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-Demo/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-Demo/Pods-Demo.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_Demo; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - AD58472A97F9820F8411E093CA83C192 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 0BECA3CFB229CD34026ABBD1E893ABD8 /* ReactiveSwift.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/ReactiveSwift/ReactiveSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/ReactiveSwift/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/ReactiveSwift/ReactiveSwift.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = ReactiveSwift; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - AD955452219BEA709ACE34C7410D8FC2 /* Release */ = { + 7D072D0D174F12EAACC1862DA756E67A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F87D4ED948A5076902CE684060F0CE21 /* Result.xcconfig */; + baseConfigurationReference = D37097CE851EBEACC487F4B4714B1E9F /* Alamofire.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2352,14 +1228,14 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Result/Result-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Result/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Alamofire/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"; + MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Result; + PRODUCT_NAME = Alamofire; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; @@ -2370,42 +1246,7 @@ }; name = Release; }; - B2ACBF5404E1D85CF618B51F9C3772E5 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 0C7805AC2429FAFC54029B4782D5F6A7 /* 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; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Moya/Moya-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/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"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Moya; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - B2C5CA79AABB9B1D6E081B7EBE7576BF /* Debug */ = { + 83DC11E61B6F37300799FB5517A2975F /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = CC6A59B0ADA6CB2F51DAE6508E437829 /* Pods-Demo.debug.xcconfig */; buildSettings = { @@ -2444,16 +1285,16 @@ }; name = Debug; }; - BC27256FF866F4C545DAC8ACC955DD2F /* Debug */ = { + 9132350426841E85D9539998694B4EA6 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C9C496D6996BC8AFD85DE80CAC38D329 /* ObjectMapper.xcconfig */; + baseConfigurationReference = B50AA2E66465C4068E964C7E4FA0CF43 /* ObjectMapper.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -2466,18 +1307,17 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/ObjectMapper/ObjectMapper.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = ObjectMapper; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; BDD0139D6EB93FA375F887ABD62DAB2E /* Release */ = { isa = XCBuildConfiguration; @@ -2523,9 +1363,9 @@ }; name = Release; }; - BF52078B09DAFA6019E725AC8FA9EFCE /* Release */ = { + C6D7A55A54919F434C6E7A95B7E86DBB /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C9C496D6996BC8AFD85DE80CAC38D329 /* ObjectMapper.xcconfig */; + baseConfigurationReference = A7512D22039AAD5B6E55702CB8B6BB65 /* Moya.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2539,14 +1379,14 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/ObjectMapper/ObjectMapper-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/ObjectMapper/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Moya/Moya-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/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/ObjectMapper/ObjectMapper.modulemap"; + MODULEMAP_FILE = "Target Support Files/Moya/Moya.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = ObjectMapper; + PRODUCT_NAME = Moya; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; @@ -2559,7 +1399,7 @@ }; C9660A42FEDD040185578ADA021EC8E0 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D2B67F026BFB03CD5D152C213DEBF2BC /* Alamofire.xcconfig */; + baseConfigurationReference = D37097CE851EBEACC487F4B4714B1E9F /* Alamofire.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2592,9 +1432,9 @@ }; name = Debug; }; - D09918F06224BC8D4DC1EE59F7A043E3 /* Debug */ = { + F8BC7B80F07D687C2B99B05B77D2ED5E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = F87D4ED948A5076902CE684060F0CE21 /* Result.xcconfig */; + baseConfigurationReference = B50AA2E66465C4068E964C7E4FA0CF43 /* ObjectMapper.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2608,14 +1448,14 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Result/Result-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Result/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/ObjectMapper/ObjectMapper-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/ObjectMapper/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"; + MODULEMAP_FILE = "Target Support Files/ObjectMapper/ObjectMapper.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Result; + PRODUCT_NAME = ObjectMapper; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; @@ -2627,9 +1467,9 @@ }; name = Debug; }; - FA43FC19FF4B7DF4ABFA6F3F4049B4EA /* Release */ = { + FCC8C491CD9D79CC7B673CA8E7C51609 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0BECA3CFB229CD34026ABBD1E893ABD8 /* ReactiveSwift.xcconfig */; + baseConfigurationReference = 35E19B5A44F377A7681B3DFB6DE350CA /* Result.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -2643,14 +1483,14 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/ReactiveSwift/ReactiveSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/ReactiveSwift/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Result/Result-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Result/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/ReactiveSwift/ReactiveSwift.modulemap"; + MODULEMAP_FILE = "Target Support Files/Result/Result.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = ReactiveSwift; + PRODUCT_NAME = Result; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; @@ -2664,83 +1504,65 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 04DCCDCD98BFA3F8C4E09C4D68686DEF /* Build configuration list for PBXNativeTarget "Moya-ObjectMapper" */ = { + 06FAEB5F2DB2902622187A65FEB559F4 /* Build configuration list for PBXNativeTarget "Moya" */ = { isa = XCConfigurationList; buildConfigurations = ( - 9297A6E0B9ED86304C3FBD7DA208EBDE /* Debug */, - 9AC62FAC9BD7263A39A52519E97FF911 /* Release */, + 0277E4D474F1A8FAE3D144B2FF4AEDFE /* Debug */, + C6D7A55A54919F434C6E7A95B7E86DBB /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + 10D67BA71D2F140988D177C56F8D3D5B /* Build configuration list for PBXNativeTarget "Result" */ = { isa = XCConfigurationList; buildConfigurations = ( - 4E487F173E6C9664F4E9E26B9635D23C /* Debug */, - BDD0139D6EB93FA375F887ABD62DAB2E /* Release */, + 4F6B4F665A9F358874A442E493265689 /* Debug */, + FCC8C491CD9D79CC7B673CA8E7C51609 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 419E5D95491847CD79841B971A8A3277 /* Build configuration list for PBXNativeTarget "Alamofire" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C9660A42FEDD040185578ADA021EC8E0 /* Debug */, - 7D072D0D174F12EAACC1862DA756E67A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 55498414C06D636BD5A964403C0608F5 /* Build configuration list for PBXNativeTarget "Moya" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B2ACBF5404E1D85CF618B51F9C3772E5 /* Debug */, - 4497E56B2264E0931C8297A3CB1CCFB5 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 823C0DFC675B00046AAA3DB1E22E7778 /* Build configuration list for PBXNativeTarget "RxSwift" */ = { + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 70CC9B0A50824719A3CE6904E8C04621 /* Debug */, - 828F7F4CEDE6FAA20950646139BF3C13 /* Release */, + 4E487F173E6C9664F4E9E26B9635D23C /* Debug */, + BDD0139D6EB93FA375F887ABD62DAB2E /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 87F2C5A63CCA45E4DAD04FD5F0F3B408 /* Build configuration list for PBXNativeTarget "ObjectMapper" */ = { + 419E5D95491847CD79841B971A8A3277 /* Build configuration list for PBXNativeTarget "Alamofire" */ = { isa = XCConfigurationList; buildConfigurations = ( - BC27256FF866F4C545DAC8ACC955DD2F /* Debug */, - BF52078B09DAFA6019E725AC8FA9EFCE /* Release */, + C9660A42FEDD040185578ADA021EC8E0 /* Debug */, + 7D072D0D174F12EAACC1862DA756E67A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - C01316BC6E3841F3B09491831731F213 /* Build configuration list for PBXNativeTarget "Result" */ = { + 829DC697AD702340AE07C0899D9051BC /* Build configuration list for PBXNativeTarget "Moya-ObjectMapper" */ = { isa = XCConfigurationList; buildConfigurations = ( - D09918F06224BC8D4DC1EE59F7A043E3 /* Debug */, - AD955452219BEA709ACE34C7410D8FC2 /* Release */, + 4E7CCC55DD854C2B463569FEC9A14D5E /* Debug */, + 76DA8210B94CEE37FF5AB81BA54AD765 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - DCAEB9DC05E4B00969EEDA5239B5D1CE /* Build configuration list for PBXNativeTarget "Pods-Demo" */ = { + 9E13B4787886630F90200DF250C128F9 /* Build configuration list for PBXNativeTarget "ObjectMapper" */ = { isa = XCConfigurationList; buildConfigurations = ( - B2C5CA79AABB9B1D6E081B7EBE7576BF /* Debug */, - 9CD8E4195A995ADAE1FAF22815A61B51 /* Release */, + F8BC7B80F07D687C2B99B05B77D2ED5E /* Debug */, + 9132350426841E85D9539998694B4EA6 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - EF35564E0995115C18C0EF751687764B /* Build configuration list for PBXNativeTarget "ReactiveSwift" */ = { + D45A22551EAC1349E2C49070F2BC3899 /* Build configuration list for PBXNativeTarget "Pods-Demo" */ = { isa = XCConfigurationList; buildConfigurations = ( - AD58472A97F9820F8411E093CA83C192 /* Debug */, - FA43FC19FF4B7DF4ABFA6F3F4049B4EA /* Release */, + 83DC11E61B6F37300799FB5517A2975F /* Debug */, + 3906FE6FFC705EA5360354C7F7221F4E /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Sample/Pods/ReactiveSwift/LICENSE.md b/Sample/Pods/ReactiveSwift/LICENSE.md deleted file mode 100644 index 49bc3746..00000000 --- a/Sample/Pods/ReactiveSwift/LICENSE.md +++ /dev/null @@ -1,19 +0,0 @@ -**Copyright (c) 2012 - 2016, GitHub, Inc.** -**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. diff --git a/Sample/Pods/ReactiveSwift/README.md b/Sample/Pods/ReactiveSwift/README.md deleted file mode 100644 index 6333090a..00000000 --- a/Sample/Pods/ReactiveSwift/README.md +++ /dev/null @@ -1,161 +0,0 @@ -

- ReactiveSwift

- Streams of values over time. Tailored for Swift.

- Latest ReactiveSwift Documentation Join the ReactiveSwift Slack community. -

-
- -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](#carthage) [![CocoaPods compatible](https://img.shields.io/cocoapods/v/ReactiveSwift.svg)](#cocoapods) [![SwiftPM compatible](https://img.shields.io/badge/SwiftPM-compatible-orange.svg)](#swift-package-manager) [![GitHub release](https://img.shields.io/github/release/ReactiveCocoa/ReactiveSwift.svg)](https://github.com/ReactiveCocoa/ReactiveSwift/releases) ![Swift 3.0.x](https://img.shields.io/badge/Swift-3.0.x-orange.svg) ![platforms](https://img.shields.io/badge/platform-iOS%20%7C%20macOS%20%7C%20tvOS%20%7C%20watchOS%20%7C%20Linux-lightgrey.svg) - -☕️ [Looking for Cocoa extensions?][ReactiveCocoa] -🎉 [Getting Started](#getting-started) - -🚄 [Release Roadmap](#release-roadmap) -## What is ReactiveSwift? -__ReactiveSwift__ offers composable, declarative and flexible primitives that are built around the grand concept of ___streams of values over time___. - -These primitives can be used to uniformly represent common Cocoa and generic programming patterns that are fundamentally an act of observation, e.g. delegate pattern, callback closures, notifications, control actions, responder chain events, [futures/promises](https://en.wikipedia.org/wiki/Futures_and_promises) and [key-value observing](https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/KeyValueObserving/KeyValueObserving.html) (KVO). - -Because all of these different mechanisms can be represented in the _same_ way, -it’s easy to declaratively compose them together, with less spaghetti -code and state to bridge the gap. - -## Getting Started - -1. **[Core Reactive Primitives][]** - - An overview of the semantics and example use cases of the ReactiveSwift primitives, including [`Signal`][], [`SignalProducer`][], [`Property`][] and [`Action`][]. - -1. **[Basic Operators][]** - - An overview of the operators provided to compose and transform streams of values. - -1. **[How does ReactiveSwift relate to RxSwift?][]** - - An overview of how ReactiveSwift differs from RxSwift for Swift idiomaticity. - -## Examples - -1. **Interactive Form UI** - - ReactiveSwift includes a [_UI Examples_ playground][], which demonstrates: - * how to build an interactive form UI with bindings, properties and `Action`s, with a live view in action. - * how to use reactive primitives to implement the Model-View-ViewModel architectural pattern, with the View Model being the source of truth for the View. - -1. **[Online Searching][]** - -## Advanced Topics - -1. **[ReactiveCocoa][]** - - Bindings and reactive extensions for Cocoa and Cocoa Touch frameworks are offered separately as ReactiveCocoa. - -1. **[API Reference][]** - -1. **[API Contracts][]** - - Contracts of the ReactiveSwift primitives, Best Practices with ReactiveSwift, and Guidelines on implementing custom operators. - -1. **[Debugging Techniques][]** - -## Installation - -ReactiveSwift supports macOS 10.9+, iOS 8.0+, watchOS 2.0+, tvOS 9.0+ and Linux. - -#### Carthage - -If you use [Carthage][] to manage your dependencies, simply add -ReactiveSwift to your `Cartfile`: - -``` -github "ReactiveCocoa/ReactiveSwift" ~> 2.0 -``` - -If you use Carthage to build your dependencies, make sure you have added `ReactiveSwift.framework`, and `Result.framework` to the "_Linked Frameworks and Libraries_" section of your target, and have included them in your Carthage framework copying build phase. - -#### CocoaPods - -If you use [CocoaPods][] to manage your dependencies, simply add -ReactiveSwift to your `Podfile`: - -``` -pod 'ReactiveSwift', '~> 2.0' -``` - -#### Swift Package Manager - -If you use Swift Package Manager, simply add ReactiveSwift as a dependency -of your package in `Package.swift`: - -``` -.Package(url: "https://github.com/ReactiveCocoa/ReactiveSwift.git", majorVersion: 2) -``` - -#### Git submodule - - 1. Add the ReactiveSwift repository as a [submodule][] of your - application’s repository. - 1. Run `git submodule update --init --recursive` from within the ReactiveCocoa folder. - 1. Drag and drop `ReactiveSwift.xcodeproj` and - `Carthage/Checkouts/Result/Result.xcodeproj` into your application’s Xcode - project or workspace. - 1. On the “General” tab of your application target’s settings, add - `ReactiveSwift.framework`, and `Result.framework` - to the “Embedded Binaries” section. - 1. If your application target does not contain Swift code at all, you should also - set the `EMBEDDED_CONTENT_CONTAINS_SWIFT` build setting to “Yes”. - -## Playground - -We also provide a great Playground, so you can get used to ReactiveCocoa's operators. In order to start using it: - - 1. Clone the ReactiveSwift repository. - 1. Retrieve the project dependencies using one of the following terminal commands from the ReactiveSwift project root directory: - - `git submodule update --init --recursive` **OR**, if you have [Carthage][] installed - - `carthage checkout` - 1. Open `ReactiveSwift.xcworkspace` - 1. Build `Result-Mac` scheme - 1. Build `ReactiveSwift-macOS` scheme - 1. Finally open the `ReactiveSwift.playground` - 1. Choose `View > Show Debug Area` - -## Have a question? -If you need any help, please visit our [GitHub issues][] or [Stack Overflow][]. Feel free to file an issue if you do not manage to find any solution from the archives. - -## Release Roadmap -**Current Stable Release:**
[![GitHub release](https://img.shields.io/github/release/ReactiveCocoa/ReactiveSwift.svg)](https://github.com/ReactiveCocoa/ReactiveSwift/releases) - -#### Swift 3.2 and Swift 4.0 compatibility -While the development would be Swift 3.2 and Swift 4.0 aware, ReactiveSwift 2.0 would not declare official support until Swift 3.2 and Swift 4.0 launch. - -The official release for Swift 3.2 and Swift 4.0 is expected to be a minor 2.x release with full API compatibility. - -### Plan of Record -#### ReactiveSwift 3.0 -ReactiveSwift 3.0 is expected to declare library ABI stability as it adopts generics features arriving in a later Swift 4 release, e.g. conditional conformance. There is no ETA for now. - -[Core Reactive Primitives]: Documentation/ReactivePrimitives.md -[Basic Operators]: Documentation/BasicOperators.md -[How does ReactiveSwift relate to RxSwift?]: Documentation/RxComparison.md -[API Contracts]: Documentation/APIContracts.md -[API Reference]: http://reactivecocoa.io/reactiveswift/docs/latest/ -[Debugging Techniques]: Documentation/DebuggingTechniques.md -[Online Searching]: Documentation/Example.OnlineSearch.md -[_UI Examples_ playground]: https://github.com/ReactiveCocoa/ReactiveSwift/blob/master/ReactiveSwift-UIExamples.playground/Pages/ValidatingProperty.xcplaygroundpage/Contents.swift - -[`Action`]: Documentation/ReactivePrimitives.md#action-a-serialized-worker-with-a-preset-action -[`SignalProducer`]: Documentation/ReactivePrimitives.md#signalproducer-deferred-work-that-creates-a-stream-of-values -[`Signal`]: Documentation/ReactivePrimitives.md#signal-a-unidirectional-stream-of-events -[`Property`]: Documentation/ReactivePrimitives.md#property-an-observable-box-that-always-holds-a-value - -[ReactiveCocoa]: https://github.com/ReactiveCocoa/ReactiveCocoa/#readme - -[Carthage]: https://github.com/Carthage/Carthage/#readme -[CocoaPods]: https://cocoapods.org/ -[submodule]: https://git-scm.com/docs/git-submodule - -[GitHub issues]: https://github.com/ReactiveCocoa/ReactiveSwift/issues?q=is%3Aissue+label%3Aquestion+ -[Stack Overflow]: http://stackoverflow.com/questions/tagged/reactive-cocoa - -[Looking for the Objective-C API?]: https://github.com/ReactiveCocoa/ReactiveObjC/#readme -[Still using Swift 2.x?]: https://github.com/ReactiveCocoa/ReactiveCocoa/tree/v4.0.0 diff --git a/Sample/Pods/ReactiveSwift/Sources/Action.swift b/Sample/Pods/ReactiveSwift/Sources/Action.swift deleted file mode 100644 index 9eecbbb9..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/Action.swift +++ /dev/null @@ -1,339 +0,0 @@ -import Dispatch -import Foundation -import Result - -/// `Action` represents a repeatable work like `SignalProducer`. But on top of the -/// isolation of produced `Signal`s from a `SignalProducer`, `Action` provides -/// higher-order features like availability and mutual exclusion. -/// -/// Similar to a produced `Signal` from a `SignalProducer`, each unit of the repreatable -/// work may output zero or more values, and terminate with or without an error at some -/// point. -/// -/// The core of `Action` is the `execute` closure it created with. For every execution -/// attempt with a varying input, if the `Action` is enabled, it would request from the -/// `execute` closure a customized unit of work — represented by a `SignalProducer`. -/// Specifically, the `execute` closure would be supplied with the latest state of -/// `Action` and the external input from `apply()`. -/// -/// `Action` enforces serial execution, and disables the `Action` during the execution. -public final class Action { - private struct ActionState { - var isEnabled: Bool { - return isUserEnabled && !isExecuting - } - - var isUserEnabled: Bool - var isExecuting: Bool - var value: Value - } - - private let execute: (Action, Input) -> SignalProducer> - private let eventsObserver: Signal.Event, NoError>.Observer - private let disabledErrorsObserver: Signal<(), NoError>.Observer - - private let deinitToken: Lifetime.Token - - /// The lifetime of the `Action`. - public let lifetime: Lifetime - - /// A signal of all events generated from all units of work of the `Action`. - /// - /// In other words, this sends every `Event` from every unit of work that the `Action` - /// executes. - public let events: Signal.Event, NoError> - - /// A signal of all values generated from all units of work of the `Action`. - /// - /// In other words, this sends every value from every unit of work that the `Action` - /// executes. - public let values: Signal - - /// A signal of all errors generated from all units of work of the `Action`. - /// - /// In other words, this sends every error from every unit of work that the `Action` - /// executes. - public let errors: Signal - - /// A signal of all failed attempts to start a unit of work of the `Action`. - public let disabledErrors: Signal<(), NoError> - - /// A signal of all completed events generated from applications of the action. - /// - /// In other words, this will send completed events from every signal generated - /// by each SignalProducer returned from apply(). - public let completed: Signal<(), NoError> - - /// Whether the action is currently executing. - public let isExecuting: Property - - /// Whether the action is currently enabled. - public let isEnabled: Property - - /// Initializes an `Action` that would be conditionally enabled depending on its - /// state. - /// - /// When the `Action` is asked to start the execution with an input value, a unit of - /// work — represented by a `SignalProducer` — would be created by invoking - /// `execute` with the latest state and the input value. - /// - /// - note: `Action` guarantees that changes to `state` are observed in a - /// thread-safe way. Thus, the value passed to `isEnabled` will - /// always be identical to the value passed to `execute`, for each - /// application of the action. - /// - /// - note: This initializer should only be used if you need to provide - /// custom input can also influence whether the action is enabled. - /// The various convenience initializers should cover most use cases. - /// - /// - parameters: - /// - state: A property to be the state of the `Action`. - /// - isEnabled: A predicate which determines the availability of the `Action`, - /// given the latest `Action` state. - /// - execute: A closure that produces a unit of work, as `SignalProducer`, to be - /// executed by the `Action`. - public init(state: State, enabledIf isEnabled: @escaping (State.Value) -> Bool, execute: @escaping (State.Value, Input) -> SignalProducer) { - let isUserEnabled = isEnabled - - deinitToken = Lifetime.Token() - lifetime = Lifetime(deinitToken) - - // `Action` retains its state property. - lifetime.observeEnded { _ = state } - - (events, eventsObserver) = Signal.Event, NoError>.pipe() - (disabledErrors, disabledErrorsObserver) = Signal<(), NoError>.pipe() - - values = events.filterMap { $0.value } - errors = events.filterMap { $0.error } - completed = events.filterMap { $0.isCompleted ? () : nil } - - let actionState = MutableProperty(ActionState(isUserEnabled: true, isExecuting: false, value: state.value)) - - // `isEnabled` and `isExecuting` have their own backing so that when the observers - // of these synchronously affects the action state, the signal of the action state - // does not deadlock due to the recursion. - let isExecuting = MutableProperty(false) - self.isExecuting = Property(capturing: isExecuting) - let isEnabled = MutableProperty(actionState.value.isEnabled) - self.isEnabled = Property(capturing: isEnabled) - - func modifyActionState(_ action: (inout ActionState) throws -> Result) rethrows -> Result { - return try actionState.begin { storage in - let oldState = storage.value - defer { - let newState = storage.value - if oldState.isEnabled != newState.isEnabled { - isEnabled.value = newState.isEnabled - } - if oldState.isExecuting != newState.isExecuting { - isExecuting.value = newState.isExecuting - } - } - return try storage.modify(action) - } - } - - let disposable = state.producer.startWithValues { value in - modifyActionState { state in - state.value = value - state.isUserEnabled = isUserEnabled(value) - } - } - - lifetime.observeEnded(disposable.dispose) - - self.execute = { action, input in - return SignalProducer { observer, lifetime in - let latestState: State.Value? = modifyActionState { state in - guard state.isEnabled else { - return nil - } - - state.isExecuting = true - return state.value - } - - guard let state = latestState else { - observer.send(error: .disabled) - action.disabledErrorsObserver.send(value: ()) - return - } - - let interruptHandle = execute(state, input).start { event in - observer.action(event.mapError(ActionError.producerFailed)) - action.eventsObserver.send(value: event) - } - - lifetime.observeEnded { - interruptHandle.dispose() - modifyActionState { $0.isExecuting = false } - } - } - } - } - - /// Initializes an `Action` that uses a property as its state. - /// - /// When the `Action` is asked to start the execution, a unit of work — represented by - /// a `SignalProducer` — would be created by invoking `execute` with the latest value - /// of the state. - /// - /// - parameters: - /// - state: A property to be the state of the `Action`. - /// - execute: A closure that produces a unit of work, as `SignalProducer`, to - /// be executed by the `Action`. - public convenience init(state: P, execute: @escaping (P.Value, Input) -> SignalProducer) { - self.init(state: state, enabledIf: { _ in true }, execute: execute) - } - - /// Initializes an `Action` that would be conditionally enabled. - /// - /// When the `Action` is asked to start the execution with an input value, a unit of - /// work — represented by a `SignalProducer` — would be created by invoking - /// `execute` with the input value. - /// - /// - parameters: - /// - isEnabled: A property which determines the availability of the `Action`. - /// - execute: A closure that produces a unit of work, as `SignalProducer`, to be - /// executed by the `Action`. - public convenience init(enabledIf isEnabled: P, execute: @escaping (Input) -> SignalProducer) where P.Value == Bool { - self.init(state: isEnabled, enabledIf: { $0 }) { _, input in - execute(input) - } - } - - /// Initializes an `Action` that uses a property of optional as its state. - /// - /// When the `Action` is asked to start executing, a unit of work (represented by - /// a `SignalProducer`) is created by invoking `execute` with the latest value - /// of the state and the `input` that was passed to `apply()`. - /// - /// If the property holds a `nil`, the `Action` would be disabled until it is not - /// `nil`. - /// - /// - parameters: - /// - state: A property of optional to be the state of the `Action`. - /// - execute: A closure that produces a unit of work, as `SignalProducer`, to - /// be executed by the `Action`. - public convenience init(unwrapping state: P, execute: @escaping (T, Input) -> SignalProducer) where P.Value == T? { - self.init(state: state, enabledIf: { $0 != nil }) { state, input in - execute(state!, input) - } - } - - /// Initializes an `Action` that would always be enabled. - /// - /// When the `Action` is asked to start the execution with an input value, a unit of - /// work — represented by a `SignalProducer` — would be created by invoking - /// `execute` with the input value. - /// - /// - parameters: - /// - execute: A closure that produces a unit of work, as `SignalProducer`, to be - /// executed by the `Action`. - public convenience init(execute: @escaping (Input) -> SignalProducer) { - self.init(enabledIf: Property(value: true), execute: execute) - } - - deinit { - eventsObserver.sendCompleted() - disabledErrorsObserver.sendCompleted() - } - - /// Create a `SignalProducer` that would attempt to create and start a unit of work of - /// the `Action`. The `SignalProducer` would forward only events generated by the unit - /// of work it created. - /// - /// If the execution attempt is failed, the producer would fail with - /// `ActionError.disabled`. - /// - /// - parameters: - /// - input: A value to be used to create the unit of work. - /// - /// - returns: A producer that forwards events generated by its started unit of work, - /// or emits `ActionError.disabled` if the execution attempt is failed. - public func apply(_ input: Input) -> SignalProducer> { - return execute(self, input) - } -} - -extension Action: BindingTargetProvider { - public var bindingTarget: BindingTarget { - return BindingTarget(lifetime: lifetime) { [weak self] in self?.apply($0).start() } - } -} - -extension Action where Input == Void { - /// Create a `SignalProducer` that would attempt to create and start a unit of work of - /// the `Action`. The `SignalProducer` would forward only events generated by the unit - /// of work it created. - /// - /// If the execution attempt is failed, the producer would fail with - /// `ActionError.disabled`. - /// - /// - returns: A producer that forwards events generated by its started unit of work, - /// or emits `ActionError.disabled` if the execution attempt is failed. - public func apply() -> SignalProducer> { - return apply(()) - } - - /// Initializes an `Action` that uses a property of optional as its state. - /// - /// When the `Action` is asked to start the execution, a unit of work — represented by - /// a `SignalProducer` — would be created by invoking `execute` with the latest value - /// of the state. - /// - /// If the property holds a `nil`, the `Action` would be disabled until it is not - /// `nil`. - /// - /// - parameters: - /// - state: A property of optional to be the state of the `Action`. - /// - execute: A closure that produces a unit of work, as `SignalProducer`, to - /// be executed by the `Action`. - public convenience init(unwrapping state: P, execute: @escaping (T) -> SignalProducer) where P.Value == T? { - self.init(unwrapping: state) { state, _ in - execute(state) - } - } - - /// Initializes an `Action` that uses a property as its state. - /// - /// When the `Action` is asked to start the execution, a unit of work — represented by - /// a `SignalProducer` — would be created by invoking `execute` with the latest value - /// of the state. - /// - /// - parameters: - /// - state: A property to be the state of the `Action`. - /// - execute: A closure that produces a unit of work, as `SignalProducer`, to - /// be executed by the `Action`. - public convenience init(state: P, execute: @escaping (T) -> SignalProducer) where P.Value == T { - self.init(state: state) { state, _ in - execute(state) - } - } -} - -/// `ActionError` represents the error that could be emitted by a unit of work of a -/// certain `Action`. -public enum ActionError: Swift.Error { - /// The execution attempt was failed, since the `Action` was disabled. - case disabled - - /// The unit of work emitted an error. - case producerFailed(Error) -} - -extension ActionError where Error: Equatable { - public static func == (lhs: ActionError, rhs: ActionError) -> Bool { - switch (lhs, rhs) { - case (.disabled, .disabled): - return true - - case let (.producerFailed(left), .producerFailed(right)): - return left == right - - default: - return false - } - } -} diff --git a/Sample/Pods/ReactiveSwift/Sources/Atomic.swift b/Sample/Pods/ReactiveSwift/Sources/Atomic.swift deleted file mode 100644 index 0f75d196..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/Atomic.swift +++ /dev/null @@ -1,289 +0,0 @@ -// -// Atomic.swift -// ReactiveSwift -// -// Created by Justin Spahr-Summers on 2014-06-10. -// Copyright (c) 2014 GitHub. All rights reserved. -// - -import Foundation -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) -import MachO -#endif - -/// A simple, generic lock-free finite state machine. -/// -/// - warning: `deinitialize` must be called to dispose of the consumed memory. -internal struct UnsafeAtomicState where State.RawValue == Int32 { - internal typealias Transition = (expected: State, next: State) -#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - private let value: UnsafeMutablePointer - - /// Create a finite state machine with the specified initial state. - /// - /// - parameters: - /// - initial: The desired initial state. - internal init(_ initial: State) { - value = UnsafeMutablePointer.allocate(capacity: 1) - value.initialize(to: initial.rawValue) - } - - /// Deinitialize the finite state machine. - internal func deinitialize() { - value.deinitialize() - value.deallocate(capacity: 1) - } - - /// Compare the current state with the specified state. - /// - /// - parameters: - /// - expected: The expected state. - /// - /// - returns: `true` if the current state matches the expected state. - /// `false` otherwise. - internal func `is`(_ expected: State) -> Bool { - return OSAtomicCompareAndSwap32Barrier(expected.rawValue, - expected.rawValue, - value) - } - - /// Try to transition from the expected current state to the specified next - /// state. - /// - /// - parameters: - /// - expected: The expected state. - /// - next: The state to transition to. - /// - /// - returns: `true` if the transition succeeds. `false` otherwise. - internal func tryTransition(from expected: State, to next: State) -> Bool { - return OSAtomicCompareAndSwap32Barrier(expected.rawValue, - next.rawValue, - value) - } -#else - private let value: Atomic - - /// Create a finite state machine with the specified initial state. - /// - /// - parameters: - /// - initial: The desired initial state. - internal init(_ initial: State) { - value = Atomic(initial.rawValue) - } - - /// Deinitialize the finite state machine. - internal func deinitialize() {} - - /// Compare the current state with the specified state. - /// - /// - parameters: - /// - expected: The expected state. - /// - /// - returns: `true` if the current state matches the expected state. - /// `false` otherwise. - internal func `is`(_ expected: State) -> Bool { - return value.modify { $0 == expected.rawValue } - } - - /// Try to transition from the expected current state to the specified next - /// state. - /// - /// - parameters: - /// - expected: The expected state. - /// - /// - returns: `true` if the transition succeeds. `false` otherwise. - internal func tryTransition(from expected: State, to next: State) -> Bool { - return value.modify { value in - if value == expected.rawValue { - value = next.rawValue - return true - } - return false - } - } -#endif -} - -/// `Lock` exposes `os_unfair_lock` on supported platforms, with pthread mutex as the -// fallback. -internal class Lock { - #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - @available(iOS 10.0, *) - @available(macOS 10.12, *) - @available(tvOS 10.0, *) - @available(watchOS 3.0, *) - internal final class UnfairLock: Lock { - private let _lock: os_unfair_lock_t - - override init() { - _lock = .allocate(capacity: 1) - _lock.initialize(to: os_unfair_lock()) - super.init() - } - - override func lock() { - os_unfair_lock_lock(_lock) - } - - override func unlock() { - os_unfair_lock_unlock(_lock) - } - - override func `try`() -> Bool { - return os_unfair_lock_trylock(_lock) - } - - deinit { - _lock.deinitialize() - _lock.deallocate(capacity: 1) - } - } - #endif - - internal final class PthreadLock: Lock { - private let _lock: UnsafeMutablePointer - - init(recursive: Bool = false) { - _lock = .allocate(capacity: 1) - _lock.initialize(to: pthread_mutex_t()) - - let attr = UnsafeMutablePointer.allocate(capacity: 1) - attr.initialize(to: pthread_mutexattr_t()) - pthread_mutexattr_init(attr) - - defer { - pthread_mutexattr_destroy(attr) - attr.deinitialize() - attr.deallocate(capacity: 1) - } - - #if DEBUG - pthread_mutexattr_settype(attr, Int32(recursive ? PTHREAD_MUTEX_RECURSIVE : PTHREAD_MUTEX_ERRORCHECK)) - #else - pthread_mutexattr_settype(attr, Int32(recursive ? PTHREAD_MUTEX_RECURSIVE : PTHREAD_MUTEX_NORMAL)) - #endif - - let status = pthread_mutex_init(_lock, attr) - assert(status == 0, "Unexpected pthread mutex error code: \(status)") - - super.init() - } - - override func lock() { - let status = pthread_mutex_lock(_lock) - assert(status == 0, "Unexpected pthread mutex error code: \(status)") - } - - override func unlock() { - let status = pthread_mutex_unlock(_lock) - assert(status == 0, "Unexpected pthread mutex error code: \(status)") - } - - override func `try`() -> Bool { - let status = pthread_mutex_trylock(_lock) - switch status { - case 0: - return true - case EBUSY: - return false - default: - assertionFailure("Unexpected pthread mutex error code: \(status)") - return false - } - } - - deinit { - let status = pthread_mutex_destroy(_lock) - assert(status == 0, "Unexpected pthread mutex error code: \(status)") - - _lock.deinitialize() - _lock.deallocate(capacity: 1) - } - } - - static func make() -> Lock { - #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - if #available(*, iOS 10.0, macOS 10.12, tvOS 10.0, watchOS 3.0) { - return UnfairLock() - } - #endif - - return PthreadLock() - } - - private init() {} - - func lock() { fatalError() } - func unlock() { fatalError() } - func `try`() -> Bool { fatalError() } -} - -/// An atomic variable. -public final class Atomic { - private let lock: Lock - private var _value: Value - - /// Atomically get or set the value of the variable. - public var value: Value { - get { - return withValue { $0 } - } - - set(newValue) { - swap(newValue) - } - } - - /// Initialize the variable with the given initial value. - /// - /// - parameters: - /// - value: Initial value for `self`. - public init(_ value: Value) { - _value = value - lock = Lock.make() - } - - /// Atomically modifies the variable. - /// - /// - parameters: - /// - action: A closure that takes the current value. - /// - /// - returns: The result of the action. - @discardableResult - public func modify(_ action: (inout Value) throws -> Result) rethrows -> Result { - lock.lock() - defer { lock.unlock() } - - return try action(&_value) - } - - /// Atomically perform an arbitrary action using the current value of the - /// variable. - /// - /// - parameters: - /// - action: A closure that takes the current value. - /// - /// - returns: The result of the action. - @discardableResult - public func withValue(_ action: (Value) throws -> Result) rethrows -> Result { - lock.lock() - defer { lock.unlock() } - - return try action(_value) - } - - /// Atomically replace the contents of the variable. - /// - /// - parameters: - /// - newValue: A new value for the variable. - /// - /// - returns: The old value. - @discardableResult - public func swap(_ newValue: Value) -> Value { - return modify { (value: inout Value) in - let oldValue = value - value = newValue - return oldValue - } - } -} diff --git a/Sample/Pods/ReactiveSwift/Sources/Bag.swift b/Sample/Pods/ReactiveSwift/Sources/Bag.swift deleted file mode 100644 index 882e2d04..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/Bag.swift +++ /dev/null @@ -1,102 +0,0 @@ -// -// Bag.swift -// ReactiveSwift -// -// Created by Justin Spahr-Summers on 2014-07-10. -// Copyright (c) 2014 GitHub. All rights reserved. -// - -/// An unordered, non-unique collection of values of type `Element`. -public struct Bag { - /// A uniquely identifying token for removing a value that was inserted into a - /// Bag. - public struct Token { - fileprivate let value: UInt64 - } - - fileprivate var elements: ContiguousArray = [] - fileprivate var tokens: ContiguousArray = [] - - private var nextToken: Token = Token(value: 0) - - public init() {} - - /// Insert the given value into `self`, and return a token that can - /// later be passed to `remove(using:)`. - /// - /// - parameters: - /// - value: A value that will be inserted. - @discardableResult - public mutating func insert(_ value: Element) -> Token { - let token = nextToken - - // Practically speaking, this would overflow only if we have 101% uptime and we - // manage to call `insert(_:)` every 1 ns for 500+ years non-stop. - nextToken = Token(value: token.value + 1) - - elements.append(value) - tokens.append(token.value) - - return token - } - - /// Remove a value, given the token returned from `insert()`. - /// - /// - note: If the value has already been removed, nothing happens. - /// - /// - parameters: - /// - token: A token returned from a call to `insert()`. - @discardableResult - public mutating func remove(using token: Token) -> Element? { - for i in (elements.startIndex ..< elements.endIndex).reversed() { - if tokens[i] == token.value { - tokens.remove(at: i) - return elements.remove(at: i) - } - } - - return nil - } -} - -extension Bag: RandomAccessCollection { - public var startIndex: Int { - return elements.startIndex - } - - public var endIndex: Int { - return elements.endIndex - } - - public subscript(index: Int) -> Element { - return elements[index] - } - - public func makeIterator() -> Iterator { - return Iterator(elements) - } - - /// An iterator of `Bag`. - public struct Iterator: IteratorProtocol { - private let base: ContiguousArray - private var nextIndex: Int - private let endIndex: Int - - fileprivate init(_ base: ContiguousArray) { - self.base = base - nextIndex = base.startIndex - endIndex = base.endIndex - } - - public mutating func next() -> Element? { - let currentIndex = nextIndex - - if currentIndex < endIndex { - nextIndex = currentIndex + 1 - return base[currentIndex] - } - - return nil - } - } -} diff --git a/Sample/Pods/ReactiveSwift/Sources/Deprecations+Removals.swift b/Sample/Pods/ReactiveSwift/Sources/Deprecations+Removals.swift deleted file mode 100644 index 51ca1c85..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/Deprecations+Removals.swift +++ /dev/null @@ -1,198 +0,0 @@ -import Foundation -import Dispatch -import Result - -// MARK: Unavailable methods in ReactiveSwift 2.0. -extension AnyDisposable { - @available(*, unavailable, renamed:"init(_:)") - public convenience init(action: @escaping () -> Void) { fatalError() } -} - -extension Signal { - @available(*, unavailable, renamed:"promoteError") - public func promoteErrors(_: F.Type) -> Signal { fatalError() } -} - -extension SignalProducer { - @available(*, unavailable, renamed:"promoteError") - public func promoteErrors(_: F.Type) -> SignalProducer { fatalError() } -} - -extension Lifetime { - @available(*, unavailable, renamed:"hasEnded") - public var isDisposed: Bool { fatalError() } - - @discardableResult - @available(*, unavailable, renamed:"observeEnded(_:)") - public func add(_ action: () -> Void) -> Disposable? { fatalError() } - - @discardableResult - @available(*, unavailable, message:"Use `observeEnded(_:)` instead.") - public static func += (left: Lifetime, right: () -> Void) -> Disposable? { fatalError() } - - @discardableResult - @available(*, deprecated, message:"Use `observeEnded(_:)` with a method reference to `dispose()` instead. This method is subject to removal in a future release.") - public func add(_ d: Disposable?) -> Disposable? { - return d.flatMap { observeEnded($0.dispose) } - } -} - -extension SignalProducer { - @available(*, unavailable, renamed:"init(_:)") - public static func attempt(_ operation: @escaping () -> Result) -> SignalProducer { fatalError() } -} - -extension SignalProducer where Error == AnyError { - @available(*, unavailable, renamed:"init(_:)") - public static func attempt(_ operation: @escaping () throws -> Value) -> SignalProducer { fatalError() } -} - -extension PropertyProtocol { - @available(*, unavailable, renamed:"flatMap(_:_:)") - public func flatMap(_ strategy: FlattenStrategy, transform: @escaping (Value) -> P) -> Property { fatalError() } -} - -extension Signal { - @available(*, unavailable, renamed:"flatMap(_:_:)") - public func flatMap(_ strategy: FlattenStrategy, transform: @escaping (Value) -> Inner) -> Signal where Error == Inner.Error { fatalError() } - - @available(*, unavailable, renamed:"flatMap(_:_:)") - public func flatMap(_ strategy: FlattenStrategy, transform: @escaping (Value) -> Inner) -> Signal where Inner.Error == NoError { fatalError() } -} - -extension Signal where Error == NoError { - @available(*, unavailable, renamed:"flatMap(_:_:)") - public func flatMap(_ strategy: FlattenStrategy, transform: @escaping (Value) -> Inner) -> Signal where Error == Inner.Error { fatalError() } - - @available(*, unavailable, renamed:"flatMap(_:_:)") - public func flatMap(_ strategy: FlattenStrategy, transform: @escaping (Value) -> Inner) -> Signal { fatalError() } -} - -extension SignalProducer { - @available(*, unavailable, renamed:"flatMap(_:_:)") - public func flatMap(_ strategy: FlattenStrategy, transform: @escaping (Value) -> Inner) -> SignalProducer where Error == Inner.Error { fatalError() } - - @available(*, unavailable, renamed:"flatMap(_:_:)") - public func flatMap(_ strategy: FlattenStrategy, transform: @escaping (Value) -> Inner) -> SignalProducer where Inner.Error == NoError { fatalError() } -} - -extension SignalProducer where Error == NoError { - @available(*, unavailable, renamed:"flatMap(_:_:)") - public func flatMap(_ strategy: FlattenStrategy, transform: @escaping (Value) -> Inner) -> SignalProducer where Error == Inner.Error { fatalError() } - - @available(*, unavailable, renamed:"flatMap(_:_:)") - public func flatMap(_ strategy: FlattenStrategy, transform: @escaping (Value) -> Inner) -> SignalProducer { fatalError() } -} - -extension ComposableMutablePropertyProtocol { - @available(*, unavailable, renamed:"withValue(_:)") - public func withValue(action: (Value) throws -> Result) rethrows -> Result { fatalError() } -} - -extension SignalProducer { - @available(*, unavailable, renamed:"attempt(_:)") - public func attempt(action: @escaping (Value) -> Result<(), Error>) -> SignalProducer { fatalError() } -} - -extension CompositeDisposable { - @available(*, unavailable, message:"Use `Disposable?` instead.") - public typealias DisposableHandle = Disposable? -} - -extension Optional where Wrapped == Disposable { - @available(*, unavailable, renamed:"dispose") - public func remove() { fatalError() } -} - -@available(*, unavailable, renamed:"SignalProducer.timer") -public func timer(interval: DispatchTimeInterval, on scheduler: DateScheduler) -> SignalProducer { fatalError() } - -@available(*, unavailable, renamed:"SignalProducer.timer") -public func timer(interval: DispatchTimeInterval, on scheduler: DateScheduler, leeway: DispatchTimeInterval) -> SignalProducer { fatalError() } - -// MARK: Obsolete types in ReactiveSwift 2.0. -@available(*, unavailable, renamed:"AnyDisposable") -public typealias SimpleDisposable = AnyDisposable - -@available(*, unavailable, renamed:"AnyDisposable") -public typealias ActionDisposable = AnyDisposable - -@available(*, unavailable, renamed:"Signal.Event") -public typealias Event = Signal.Event - -@available(*, unavailable, renamed:"Signal.Observer") -public typealias Observer = Signal.Observer - -extension Action { - @available(*, unavailable, renamed:"init(state:enabledIf:execute:)") - public convenience init(state property: State, enabledIf isEnabled: @escaping (State.Value) -> Bool, _ execute: @escaping (State.Value, Input) -> SignalProducer) { fatalError() } - - @available(*, unavailable, renamed:"init(enabledIf:execute:)") - public convenience init(enabledIf property: P, _ execute: @escaping (Input) -> SignalProducer) where P.Value == Bool { fatalError() } - - @available(*, unavailable, renamed:"init(execute:)") - public convenience init(_ execute: @escaping (Input) -> SignalProducer) { fatalError() } -} - -extension Action where Input == Void { - @available(*, unavailable, renamed:"init(unwrapping:execute:)") - public convenience init(state: P, _ execute: @escaping (T) -> SignalProducer) where P.Value == T? { fatalError() } - - @available(*, unavailable, renamed:"init(unwrapping:execute:)") - public convenience init(input: P, _ execute: @escaping (T) -> SignalProducer) where P.Value == T? { fatalError() } - - @available(*, unavailable, renamed:"init(state:execute:)") - public convenience init(input: P, _ execute: @escaping (T) -> SignalProducer) where P.Value == T { fatalError() } -} - -@available(*, unavailable, renamed:"Bag.Token") -public typealias RemovalToken = Bag.Token - -@available(*, unavailable, message: "This protocol has been removed. Constrain `Action` directly instead.") -public protocol ActionProtocol {} - -@available(*, unavailable, message: "The protocol has been removed. Constrain `Observer` directly instead.") -public protocol ObserverProtocol {} - -@available(*, unavailable, message:"The protocol has been replaced by `BindingTargetProvider`.") -public protocol BindingTargetProtocol {} - -@available(*, unavailable, message:"The protocol has been removed. Constrain `Atomic` directly instead.") -public protocol AtomicProtocol {} - -// MARK: Deprecated types in ReactiveSwift 1.x. -@available(*, unavailable, renamed:"ValidationProperty.Result") -public typealias ValidationResult = ValidatingProperty.Result - -@available(*, unavailable, renamed:"ValidationProperty.Decision") -public typealias ValidatorOutput = ValidatingProperty.Decision - -extension Signal where Value == Bool { - @available(*, unavailable, renamed: "negate()") - public var negated: Signal { - return negate() - } -} - -extension SignalProducer where Value == Bool { - @available(*, unavailable, renamed: "negate()") - public var negated: SignalProducer { - return negate() - } -} - -extension PropertyProtocol where Value == Bool { - @available(*, unavailable, renamed: "negate()") - public var negated: Property { - return negate() - } -} - -@available(*, unavailable, renamed:"Scheduler") -public typealias SchedulerProtocol = Scheduler - -@available(*, unavailable, renamed:"DateScheduler") -public typealias DateSchedulerProtocol = DateScheduler - -@available(*, unavailable, renamed:"BindingSource") -public typealias BindingSourceProtocol = BindingSource diff --git a/Sample/Pods/ReactiveSwift/Sources/Disposable.swift b/Sample/Pods/ReactiveSwift/Sources/Disposable.swift deleted file mode 100644 index 4b5c36e6..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/Disposable.swift +++ /dev/null @@ -1,364 +0,0 @@ -// -// Disposable.swift -// ReactiveSwift -// -// Created by Justin Spahr-Summers on 2014-06-02. -// Copyright (c) 2014 GitHub. All rights reserved. -// - -/// Represents something that can be “disposed”, usually associated with freeing -/// resources or canceling work. -public protocol Disposable: class { - /// Whether this disposable has been disposed already. - var isDisposed: Bool { get } - - /// Disposing of the resources represented by `self`. If `self` has already - /// been disposed of, it does nothing. - /// - /// - note: Implementations must issue a memory barrier. - func dispose() -} - -/// Represents the state of a disposable. -private enum DisposableState: Int32 { - /// The disposable is active. - case active - - /// The disposable has been disposed. - case disposed -} - -extension UnsafeAtomicState where State == DisposableState { - /// Try to transition from `active` to `disposed`. - /// - /// - returns: `true` if the transition succeeds. `false` otherwise. - @inline(__always) - fileprivate func tryDispose() -> Bool { - return tryTransition(from: .active, to: .disposed) - } -} - -/// A type-erased disposable that forwards operations to an underlying disposable. -public final class AnyDisposable: Disposable { - private final class ActionDisposable: Disposable { - let state: UnsafeAtomicState - var action: (() -> Void)? - - var isDisposed: Bool { - return state.is(.disposed) - } - - init(_ action: (() -> Void)?) { - self.state = UnsafeAtomicState(.active) - self.action = action - } - - deinit { - state.deinitialize() - } - - func dispose() { - if state.tryDispose() { - action?() - action = nil - } - } - } - - private let base: Disposable - - public var isDisposed: Bool { - return base.isDisposed - } - - /// Create a disposable which runs the given action upon disposal. - /// - /// - parameters: - /// - action: A closure to run when calling `dispose()`. - public init(_ action: @escaping () -> Void) { - base = ActionDisposable(action) - } - - /// Create a disposable. - public init() { - base = ActionDisposable(nil) - } - - /// Create a disposable which wraps the given disposable. - /// - /// - parameters: - /// - disposable: The disposable to be wrapped. - public init(_ disposable: Disposable) { - base = disposable - } - - public func dispose() { - base.dispose() - } -} - -/// A disposable that will dispose of any number of other disposables. -public final class CompositeDisposable: Disposable { - private let disposables: Atomic?> - private var state: UnsafeAtomicState - - public var isDisposed: Bool { - return state.is(.disposed) - } - - /// Initialize a `CompositeDisposable` containing the given sequence of - /// disposables. - /// - /// - parameters: - /// - disposables: A collection of objects conforming to the `Disposable` - /// protocol - public init(_ disposables: S) - where S.Iterator.Element == Disposable - { - var bag: Bag = Bag() - - for disposable in disposables { - bag.insert(disposable) - } - - self.disposables = Atomic(bag) - self.state = UnsafeAtomicState(DisposableState.active) - } - - /// Initialize a `CompositeDisposable` containing the given sequence of - /// disposables. - /// - /// - parameters: - /// - disposables: A collection of objects conforming to the `Disposable` - /// protocol - public convenience init(_ disposables: S) - where S.Iterator.Element == Disposable? - { - self.init(disposables.flatMap { $0 }) - } - - /// Initializes an empty `CompositeDisposable`. - public convenience init() { - self.init([Disposable]()) - } - - public func dispose() { - if state.tryDispose() { - if let ds = disposables.swap(nil) { - for d in ds { - d.dispose() - } - } - } - } - - /// Add the given disposable to the composite. - /// - /// - parameters: - /// - disposable: A disposable. - /// - /// - returns: A disposable to remove `disposable` from the composite. `nil` if the - /// composite has been disposed of, `disposable` has been disposed of, or - /// `disposable` is `nil`. - @discardableResult - public func add(_ disposable: Disposable?) -> Disposable? { - guard let d = disposable, !d.isDisposed, !isDisposed else { - disposable?.dispose() - return nil - } - - return disposables.modify { disposables in - guard disposables != nil else { return nil } - - let token = disposables!.insert(d) - return AnyDisposable { [weak self] in - self?.disposables.modify { - $0?.remove(using: token) - } - } - } - } - - /// Add the given action to the composite. - /// - /// - parameters: - /// - action: A closure to be invoked when the composite is disposed of. - /// - /// - returns: A disposable to remove `disposable` from the composite. `nil` if the - /// composite has been disposed of, `disposable` has been disposed of, or - /// `disposable` is `nil`. - @discardableResult - public func add(_ action: @escaping () -> Void) -> Disposable? { - return add(AnyDisposable(action)) - } - - deinit { - state.deinitialize() - } - - /// Adds the right-hand-side disposable to the left-hand-side - /// `CompositeDisposable`. - /// - /// ```` - /// disposable += producer - /// .filter { ... } - /// .map { ... } - /// .start(observer) - /// ```` - /// - /// - parameters: - /// - lhs: Disposable to add to. - /// - rhs: Disposable to add. - /// - /// - returns: An instance of `DisposableHandle` that can be used to opaquely - /// remove the disposable later (if desired). - @discardableResult - public static func +=(lhs: CompositeDisposable, rhs: Disposable?) -> Disposable? { - return lhs.add(rhs) - } - - /// Adds the right-hand-side `ActionDisposable` to the left-hand-side - /// `CompositeDisposable`. - /// - /// ```` - /// disposable += { ... } - /// ```` - /// - /// - parameters: - /// - lhs: Disposable to add to. - /// - rhs: Closure to add as a disposable. - /// - /// - returns: An instance of `DisposableHandle` that can be used to opaquely - /// remove the disposable later (if desired). - @discardableResult - public static func +=(lhs: CompositeDisposable, rhs: @escaping () -> ()) -> Disposable? { - return lhs.add(rhs) - } -} - -/// A disposable that, upon deinitialization, will automatically dispose of -/// its inner disposable. -public final class ScopedDisposable: Disposable { - /// The disposable which will be disposed when the ScopedDisposable - /// deinitializes. - public let inner: Inner - - public var isDisposed: Bool { - return inner.isDisposed - } - - /// Initialize the receiver to dispose of the argument upon - /// deinitialization. - /// - /// - parameters: - /// - disposable: A disposable to dispose of when deinitializing. - public init(_ disposable: Inner) { - inner = disposable - } - - deinit { - dispose() - } - - public func dispose() { - return inner.dispose() - } -} - -extension ScopedDisposable where Inner == AnyDisposable { - /// Initialize the receiver to dispose of the argument upon - /// deinitialization. - /// - /// - parameters: - /// - disposable: A disposable to dispose of when deinitializing, which - /// will be wrapped in an `AnyDisposable`. - public convenience init(_ disposable: Disposable) { - self.init(Inner(disposable)) - } -} - -extension ScopedDisposable where Inner == CompositeDisposable { - /// Adds the right-hand-side disposable to the left-hand-side - /// `ScopedDisposable`. - /// - /// ```` - /// disposable += { ... } - /// ```` - /// - /// - parameters: - /// - lhs: Disposable to add to. - /// - rhs: Disposable to add. - /// - /// - returns: An instance of `DisposableHandle` that can be used to opaquely - /// remove the disposable later (if desired). - @discardableResult - public static func +=(lhs: ScopedDisposable, rhs: Disposable?) -> Disposable? { - return lhs.inner.add(rhs) - } - - /// Adds the right-hand-side disposable to the left-hand-side - /// `ScopedDisposable`. - /// - /// ```` - /// disposable += { ... } - /// ```` - /// - /// - parameters: - /// - lhs: Disposable to add to. - /// - rhs: Closure to add as a disposable. - /// - /// - returns: An instance of `DisposableHandle` that can be used to opaquely - /// remove the disposable later (if desired). - @discardableResult - public static func +=(lhs: ScopedDisposable, rhs: @escaping () -> ()) -> Disposable? { - return lhs.inner.add(rhs) - } -} - -/// A disposable that disposes of its wrapped disposable, and allows its -/// wrapped disposable to be replaced. -public final class SerialDisposable: Disposable { - private let _inner: Atomic - private var state: UnsafeAtomicState - - public var isDisposed: Bool { - return state.is(.disposed) - } - - /// The current inner disposable to dispose of. - /// - /// Whenever this property is set (even to the same value!), the previous - /// disposable is automatically disposed. - public var inner: Disposable? { - get { - return _inner.value - } - - set(d) { - _inner.swap(d)?.dispose() - if let d = d, isDisposed { - d.dispose() - } - } - } - - /// Initializes the receiver to dispose of the argument when the - /// SerialDisposable is disposed. - /// - /// - parameters: - /// - disposable: Optional disposable. - public init(_ disposable: Disposable? = nil) { - self._inner = Atomic(disposable) - self.state = UnsafeAtomicState(DisposableState.active) - } - - public func dispose() { - if state.tryDispose() { - _inner.swap(nil)?.dispose() - } - } - - deinit { - state.deinitialize() - } -} diff --git a/Sample/Pods/ReactiveSwift/Sources/Event.swift b/Sample/Pods/ReactiveSwift/Sources/Event.swift deleted file mode 100644 index 32f604d4..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/Event.swift +++ /dev/null @@ -1,180 +0,0 @@ -// -// Event.swift -// ReactiveSwift -// -// Created by Justin Spahr-Summers on 2015-01-16. -// Copyright (c) 2015 GitHub. All rights reserved. -// - -extension Signal { - /// Represents a signal event. - /// - /// Signals must conform to the grammar: - /// `value* (failed | completed | interrupted)?` - public enum Event { - /// A value provided by the signal. - case value(Value) - - /// The signal terminated because of an error. No further events will be - /// received. - case failed(Error) - - /// The signal successfully terminated. No further events will be received. - case completed - - /// Event production on the signal has been interrupted. No further events - /// will be received. - /// - /// - important: This event does not signify the successful or failed - /// completion of the signal. - case interrupted - - /// Whether this event is a completed event. - public var isCompleted: Bool { - switch self { - case .completed: - return true - - case .value, .failed, .interrupted: - return false - } - } - - /// Whether this event indicates signal termination (i.e., that no further - /// events will be received). - public var isTerminating: Bool { - switch self { - case .value: - return false - - case .failed, .completed, .interrupted: - return true - } - } - - /// Lift the given closure over the event's value. - /// - /// - important: The closure is called only on `value` type events. - /// - /// - parameters: - /// - f: A closure that accepts a value and returns a new value - /// - /// - returns: An event with function applied to a value in case `self` is a - /// `value` type of event. - public func map(_ f: (Value) -> U) -> Signal.Event { - switch self { - case let .value(value): - return .value(f(value)) - - case let .failed(error): - return .failed(error) - - case .completed: - return .completed - - case .interrupted: - return .interrupted - } - } - - /// Lift the given closure over the event's error. - /// - /// - important: The closure is called only on failed type event. - /// - /// - parameters: - /// - f: A closure that accepts an error object and returns - /// a new error object - /// - /// - returns: An event with function applied to an error object in case - /// `self` is a `.Failed` type of event. - public func mapError(_ f: (Error) -> F) -> Signal.Event { - switch self { - case let .value(value): - return .value(value) - - case let .failed(error): - return .failed(f(error)) - - case .completed: - return .completed - - case .interrupted: - return .interrupted - } - } - - /// Unwrap the contained `value` value. - public var value: Value? { - if case let .value(value) = self { - return value - } else { - return nil - } - } - - /// Unwrap the contained `Error` value. - public var error: Error? { - if case let .failed(error) = self { - return error - } else { - return nil - } - } - } -} - -extension Signal.Event where Value: Equatable, Error: Equatable { - public static func == (lhs: Signal.Event, rhs: Signal.Event) -> Bool { - switch (lhs, rhs) { - case let (.value(left), .value(right)): - return left == right - - case let (.failed(left), .failed(right)): - return left == right - - case (.completed, .completed): - return true - - case (.interrupted, .interrupted): - return true - - default: - return false - } - } -} - -extension Signal.Event: CustomStringConvertible { - public var description: String { - switch self { - case let .value(value): - return "VALUE \(value)" - - case let .failed(error): - return "FAILED \(error)" - - case .completed: - return "COMPLETED" - - case .interrupted: - return "INTERRUPTED" - } - } -} - -/// Event protocol for constraining signal extensions -public protocol EventProtocol { - /// The value type of an event. - associatedtype Value - /// The error type of an event. If errors aren't possible then `NoError` can - /// be used. - associatedtype Error: Swift.Error - /// Extracts the event from the receiver. - var event: Signal.Event { get } -} - -extension Signal.Event: EventProtocol { - public var event: Signal.Event { - return self - } -} diff --git a/Sample/Pods/ReactiveSwift/Sources/EventLogger.swift b/Sample/Pods/ReactiveSwift/Sources/EventLogger.swift deleted file mode 100644 index 263101c1..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/EventLogger.swift +++ /dev/null @@ -1,139 +0,0 @@ -// -// EventLogger.swift -// ReactiveSwift -// -// Created by Rui Peres on 30/04/2016. -// Copyright © 2016 GitHub. All rights reserved. -// - -import Foundation - -/// A namespace for logging event types. -public enum LoggingEvent { - public enum Signal: String { - case value, completed, failed, terminated, disposed, interrupted - - public static let allEvents: Set = [ - .value, .completed, .failed, .terminated, .disposed, .interrupted, - ] - } - - public enum SignalProducer: String { - case starting, started, value, completed, failed, terminated, disposed, interrupted - - public static let allEvents: Set = [ - .starting, .started, .value, .completed, .failed, .terminated, .disposed, .interrupted, - ] - } -} - -public func defaultEventLog(identifier: String, event: String, fileName: String, functionName: String, lineNumber: Int) { - print("[\(identifier)] \(event) fileName: \(fileName), functionName: \(functionName), lineNumber: \(lineNumber)") -} - -/// A type that represents an event logging function. -/// Signature is: -/// - identifier -/// - event -/// - fileName -/// - functionName -/// - lineNumber -public typealias EventLogger = ( - _ identifier: String, - _ event: String, - _ fileName: String, - _ functionName: String, - _ lineNumber: Int -) -> Void - -extension Signal { - /// Logs all events that the receiver sends. By default, it will print to - /// the standard output. - /// - /// - parameters: - /// - identifier: a string to identify the Signal firing events. - /// - events: Types of events to log. - /// - fileName: Name of the file containing the code which fired the - /// event. - /// - functionName: Function where event was fired. - /// - lineNumber: Line number where event was fired. - /// - logger: Logger that logs the events. - /// - /// - returns: Signal that, when observed, logs the fired events. - public func logEvents(identifier: String = "", events: Set = LoggingEvent.Signal.allEvents, fileName: String = #file, functionName: String = #function, lineNumber: Int = #line, logger: @escaping EventLogger = defaultEventLog) -> Signal { - func log(_ event: LoggingEvent.Signal) -> ((T) -> Void)? { - return event.logIfNeeded(events: events) { event in - logger(identifier, event, fileName, functionName, lineNumber) - } - } - - return self.on( - failed: log(.failed), - completed: log(.completed) as ((()) -> Void)?, - interrupted: log(.interrupted) as ((()) -> Void)?, - terminated: log(.terminated) as ((()) -> Void)?, - disposed: log(.disposed) as ((()) -> Void)?, - value: log(.value) - ) - } -} - -extension SignalProducer { - /// Logs all events that the receiver sends. By default, it will print to - /// the standard output. - /// - /// - parameters: - /// - identifier: a string to identify the SignalProducer firing events. - /// - events: Types of events to log. - /// - fileName: Name of the file containing the code which fired the - /// event. - /// - functionName: Function where event was fired. - /// - lineNumber: Line number where event was fired. - /// - logger: Logger that logs the events. - /// - /// - returns: Signal producer that, when started, logs the fired events. - public func logEvents(identifier: String = "", - events: Set = LoggingEvent.SignalProducer.allEvents, - fileName: String = #file, - functionName: String = #function, - lineNumber: Int = #line, - logger: @escaping EventLogger = defaultEventLog - ) -> SignalProducer { - func log(_ event: LoggingEvent.SignalProducer) -> ((T) -> Void)? { - return event.logIfNeeded(events: events) { event in - logger(identifier, event, fileName, functionName, lineNumber) - } - } - - return self.on( - starting: log(.starting) as ((()) -> Void)?, - started: log(.started) as ((()) -> Void)?, - failed: log(.failed), - completed: log(.completed) as ((()) -> Void)?, - interrupted: log(.interrupted) as ((()) -> Void)?, - terminated: log(.terminated) as ((()) -> Void)?, - disposed: log(.disposed) as ((()) -> Void)?, - value: log(.value) - ) - } -} - -private protocol LoggingEventProtocol: Hashable, RawRepresentable {} -extension LoggingEvent.Signal: LoggingEventProtocol {} -extension LoggingEvent.SignalProducer: LoggingEventProtocol {} - -private extension LoggingEventProtocol { - func logIfNeeded(events: Set, logger: @escaping (String) -> Void) -> ((T) -> Void)? { - guard events.contains(self) else { - return nil - } - - return { value in - if value is Void { - logger("\(self.rawValue)") - } else { - logger("\(self.rawValue) \(value)") - } - } - } -} diff --git a/Sample/Pods/ReactiveSwift/Sources/Flatten.swift b/Sample/Pods/ReactiveSwift/Sources/Flatten.swift deleted file mode 100644 index bcf293d8..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/Flatten.swift +++ /dev/null @@ -1,952 +0,0 @@ -// -// Flatten.swift -// ReactiveSwift -// -// Created by Neil Pankey on 11/30/15. -// Copyright © 2015 GitHub. All rights reserved. -// - -import enum Result.NoError - -/// Describes how a stream of inner streams should be flattened into a stream of values. -public struct FlattenStrategy { - fileprivate enum Kind { - case concurrent(limit: UInt) - case latest - case race - } - - fileprivate let kind: Kind - - private init(kind: Kind) { - self.kind = kind - } - - /// The stream of streams is merged, so that any value sent by any of the inner - /// streams is forwarded immediately to the flattened stream of values. - /// - /// The flattened stream of values completes only when the stream of streams, and all - /// the inner streams it sent, have completed. - /// - /// Any interruption of inner streams is treated as completion, and does not interrupt - /// the flattened stream of values. - /// - /// Any failure from the inner streams is propagated immediately to the flattened - /// stream of values. - public static let merge = FlattenStrategy(kind: .concurrent(limit: .max)) - - /// The stream of streams is concatenated, so that only values from one inner stream - /// are forwarded at a time, in the order the inner streams are received. - /// - /// In other words, if an inner stream is received when a previous inner stream has - /// yet terminated, the received stream would be enqueued. - /// - /// The flattened stream of values completes only when the stream of streams, and all - /// the inner streams it sent, have completed. - /// - /// Any interruption of inner streams is treated as completion, and does not interrupt - /// the flattened stream of values. - /// - /// Any failure from the inner streams is propagated immediately to the flattened - /// stream of values. - public static let concat = FlattenStrategy(kind: .concurrent(limit: 1)) - - /// The stream of streams is merged with the given concurrency cap, so that any value - /// sent by any of the inner streams on the fly is forwarded immediately to the - /// flattened stream of values. - /// - /// In other words, if an inner stream is received when a previous inner stream has - /// yet terminated, the received stream would be enqueued. - /// - /// The flattened stream of values completes only when the stream of streams, and all - /// the inner streams it sent, have completed. - /// - /// Any interruption of inner streams is treated as completion, and does not interrupt - /// the flattened stream of values. - /// - /// Any failure from the inner streams is propagated immediately to the flattened - /// stream of values. - /// - /// - precondition: `limit > 0`. - public static func concurrent(limit: UInt) -> FlattenStrategy { - return FlattenStrategy(kind: .concurrent(limit: limit)) - } - - /// Forward only values from the latest inner stream sent by the stream of streams. - /// The active inner stream is disposed of as a new inner stream is received. - /// - /// The flattened stream of values completes only when the stream of streams, and all - /// the inner streams it sent, have completed. - /// - /// Any interruption of inner streams is treated as completion, and does not interrupt - /// the flattened stream of values. - /// - /// Any failure from the inner streams is propagated immediately to the flattened - /// stream of values. - public static let latest = FlattenStrategy(kind: .latest) - - /// Forward only events from the first inner stream that sends an event. Any other - /// in-flight inner streams is disposed of when the winning inner stream is - /// determined. - /// - /// The flattened stream of values completes only when the stream of streams, and the - /// winning inner stream, have completed. - /// - /// Any interruption of inner streams is propagated immediately to the flattened - /// stream of values. - /// - /// Any failure from the inner streams is propagated immediately to the flattened - /// stream of values. - public static let race = FlattenStrategy(kind: .race) -} - -extension Signal where Value: SignalProducerConvertible, Error == Value.Error { - /// Flattens the inner producers sent upon `signal` (into a single signal of - /// values), according to the semantics of the given strategy. - /// - /// - note: If `signal` or an active inner producer fails, the returned - /// signal will forward that failure immediately. - /// - /// - warning: `interrupted` events on inner producers will be treated like - /// `completed` events on inner producers. - /// - /// - parameters: - /// - strategy: Strategy used when flattening signals. - public func flatten(_ strategy: FlattenStrategy) -> Signal { - switch strategy.kind { - case .concurrent(let limit): - return self.concurrent(limit: limit) - - case .latest: - return self.switchToLatest() - - case .race: - return self.race() - } - } -} - -extension Signal where Value: SignalProducerConvertible, Error == NoError { - /// Flattens the inner producers sent upon `signal` (into a single signal of - /// values), according to the semantics of the given strategy. - /// - /// - note: If `signal` or an active inner producer fails, the returned - /// signal will forward that failure immediately. - /// - /// - warning: `interrupted` events on inner producers will be treated like - /// `completed` events on inner producers. - /// - /// - parameters: - /// - strategy: Strategy used when flattening signals. - public func flatten(_ strategy: FlattenStrategy) -> Signal { - return self - .promoteError(Value.Error.self) - .flatten(strategy) - } -} - -extension Signal where Value: SignalProducerConvertible, Error == NoError, Value.Error == NoError { - /// Flattens the inner producers sent upon `signal` (into a single signal of - /// values), according to the semantics of the given strategy. - /// - /// - warning: `interrupted` events on inner producers will be treated like - /// `completed` events on inner producers. - /// - /// - parameters: - /// - strategy: Strategy used when flattening signals. - public func flatten(_ strategy: FlattenStrategy) -> Signal { - switch strategy.kind { - case .concurrent(let limit): - return self.concurrent(limit: limit) - - case .latest: - return self.switchToLatest() - - case .race: - return self.race() - } - } -} - -extension Signal where Value: SignalProducerConvertible, Value.Error == NoError { - /// Flattens the inner producers sent upon `signal` (into a single signal of - /// values), according to the semantics of the given strategy. - /// - /// - note: If `signal` fails, the returned signal will forward that failure - /// immediately. - /// - /// - warning: `interrupted` events on inner producers will be treated like - /// `completed` events on inner producers. - /// - /// - parameters: - /// - strategy: Strategy used when flattening signals. - public func flatten(_ strategy: FlattenStrategy) -> Signal { - return self.flatMap(strategy) { $0.producer.promoteError(Error.self) } - } -} - -extension SignalProducer where Value: SignalProducerConvertible, Error == Value.Error { - /// Flattens the inner producers sent upon `producer` (into a single - /// producer of values), according to the semantics of the given strategy. - /// - /// - note: If `producer` or an active inner producer fails, the returned - /// producer will forward that failure immediately. - /// - /// - warning: `interrupted` events on inner producers will be treated like - /// `completed` events on inner producers. - /// - /// - parameters: - /// - strategy: Strategy used when flattening signals. - public func flatten(_ strategy: FlattenStrategy) -> SignalProducer { - switch strategy.kind { - case .concurrent(let limit): - return self.concurrent(limit: limit) - - case .latest: - return self.switchToLatest() - - case .race: - return self.race() - } - } -} - -extension SignalProducer where Value: SignalProducerConvertible, Error == NoError { - /// Flattens the inner producers sent upon `producer` (into a single - /// producer of values), according to the semantics of the given strategy. - /// - /// - note: If an active inner producer fails, the returned producer will - /// forward that failure immediately. - /// - /// - warning: `interrupted` events on inner producers will be treated like - /// `completed` events on inner producers. - /// - /// - parameters: - /// - strategy: Strategy used when flattening signals. - public func flatten(_ strategy: FlattenStrategy) -> SignalProducer { - return self - .promoteError(Value.Error.self) - .flatten(strategy) - } -} - -extension SignalProducer where Value: SignalProducerConvertible, Error == NoError, Value.Error == NoError { - /// Flattens the inner producers sent upon `producer` (into a single - /// producer of values), according to the semantics of the given strategy. - /// - /// - warning: `interrupted` events on inner producers will be treated like - /// `completed` events on inner producers. - /// - /// - parameters: - /// - strategy: Strategy used when flattening signals. - public func flatten(_ strategy: FlattenStrategy) -> SignalProducer { - switch strategy.kind { - case .concurrent(let limit): - return self.concurrent(limit: limit) - - case .latest: - return self.switchToLatest() - - case .race: - return self.race() - } - } -} - -extension SignalProducer where Value: SignalProducerConvertible, Value.Error == NoError { - /// Flattens the inner producers sent upon `signal` (into a single signal of - /// values), according to the semantics of the given strategy. - /// - /// - note: If `signal` fails, the returned signal will forward that failure - /// immediately. - /// - /// - warning: `interrupted` events on inner producers will be treated like - /// `completed` events on inner producers. - /// - /// - parameters: - /// - strategy: Strategy used when flattening signals. - public func flatten(_ strategy: FlattenStrategy) -> SignalProducer { - return self.flatMap(strategy) { $0.producer.promoteError(Error.self) } - } -} - -extension Signal where Value: Sequence { - /// Flattens the `sequence` value sent by `signal`. - public func flatten() -> Signal { - return self.flatMap(.merge, SignalProducer.init) - } -} - -extension SignalProducer where Value: Sequence { - /// Flattens the `sequence` value sent by `signal`. - public func flatten() -> SignalProducer { - return self.flatMap(.merge, SignalProducer.init) - } -} - -extension Signal where Value: SignalProducerConvertible, Error == Value.Error { - fileprivate func concurrent(limit: UInt) -> Signal { - precondition(limit > 0, "The concurrent limit must be greater than zero.") - - return Signal { relayObserver in - let disposable = CompositeDisposable() - let relayDisposable = CompositeDisposable() - - disposable += relayDisposable - disposable += self.observeConcurrent(relayObserver, limit, relayDisposable) - - return disposable - } - } - - fileprivate func observeConcurrent(_ observer: Signal.Observer, _ limit: UInt, _ disposable: CompositeDisposable) -> Disposable? { - let state = Atomic(ConcurrentFlattenState(limit: limit)) - - func startNextIfNeeded() { - while let producer = state.modify({ $0.dequeue() }) { - let producerState = UnsafeAtomicState(.starting) - let deinitializer = ScopedDisposable(AnyDisposable(producerState.deinitialize)) - - producer.startWithSignal { signal, inner in - let handle = disposable.add(inner) - - signal.observe { event in - switch event { - case .completed, .interrupted: - handle?.dispose() - - let shouldComplete: Bool = state.modify { state in - state.activeCount -= 1 - return state.shouldComplete - } - - withExtendedLifetime(deinitializer) { - if shouldComplete { - observer.sendCompleted() - } else if producerState.is(.started) { - startNextIfNeeded() - } - } - - case .value, .failed: - observer.action(event) - } - } - } - - withExtendedLifetime(deinitializer) { - producerState.setStarted() - } - } - } - - return observe { event in - switch event { - case let .value(value): - state.modify { $0.queue.append(value.producer) } - startNextIfNeeded() - - case let .failed(error): - observer.send(error: error) - - case .completed: - let shouldComplete: Bool = state.modify { state in - state.isOuterCompleted = true - return state.shouldComplete - } - - if shouldComplete { - observer.sendCompleted() - } - - case .interrupted: - observer.sendInterrupted() - } - } - } -} - -extension SignalProducer where Value: SignalProducerConvertible, Error == Value.Error { - fileprivate func concurrent(limit: UInt) -> SignalProducer { - precondition(limit > 0, "The concurrent limit must be greater than zero.") - - return SignalProducer { relayObserver, lifetime in - self.startWithSignal { signal, signalDisposable in - let disposables = CompositeDisposable() - lifetime.observeEnded(signalDisposable.dispose) - lifetime.observeEnded(disposables.dispose) - - _ = signal.observeConcurrent(relayObserver, limit, disposables) - } - } - } -} - -extension SignalProducer { - /// `concat`s `next` onto `self`. - /// - /// - parameters: - /// - next: A follow-up producer to concat `self` with. - /// - /// - returns: A producer that will start `self` and then on completion of - /// `self` - will start `next`. - public func concat(_ next: SignalProducer) -> SignalProducer { - return SignalProducer, Error>([ self.producer, next ]).flatten(.concat) - } - - /// `concat`s `value` onto `self`. - /// - /// - parameters: - /// - value: A value to concat onto `self`. - /// - /// - returns: A producer that, when started, will emit own values and on - /// completion will emit a `value`. - public func concat(value: Value) -> SignalProducer { - return self.concat(SignalProducer(value: value)) - } - - /// `concat`s `self` onto initial `previous`. - /// - /// - parameters: - /// - previous: A producer to start before `self`. - /// - /// - returns: A signal producer that, when started, first emits values from - /// `previous` producer and then from `self`. - public func prefix(_ previous: SignalProducer) -> SignalProducer { - return previous.concat(self) - } - - /// `concat`s `self` onto initial `value`. - /// - /// - parameters: - /// - value: A first value to emit. - /// - /// - returns: A producer that, when started, first emits `value`, then all - /// values emited by `self`. - public func prefix(value: Value) -> SignalProducer { - return self.prefix(SignalProducer(value: value)) - } -} - -private final class ConcurrentFlattenState { - typealias Producer = ReactiveSwift.SignalProducer - - /// The limit of active producers. - let limit: UInt - - /// The number of active producers. - var activeCount: UInt = 0 - - /// The producers waiting to be started. - var queue: [Producer] = [] - - /// Whether the outer producer has completed. - var isOuterCompleted = false - - /// Whether the flattened signal should complete. - var shouldComplete: Bool { - return isOuterCompleted && activeCount == 0 && queue.isEmpty - } - - init(limit: UInt) { - self.limit = limit - } - - /// Dequeue the next producer if one should be started. - /// - /// - returns: The `Producer` to start or `nil` if no producer should be - /// started. - func dequeue() -> Producer? { - if activeCount < limit, !queue.isEmpty { - activeCount += 1 - return queue.removeFirst() - } else { - return nil - } - } -} - -private enum ProducerState: Int32 { - case starting - case started -} - -extension UnsafeAtomicState where State == ProducerState { - fileprivate func setStarted() { - precondition(tryTransition(from: .starting, to: .started), "The transition is not supposed to fail.") - } -} - -extension Signal { - /// Merges the given signals into a single `Signal` that will emit all - /// values from each of them, and complete when all of them have completed. - /// - /// - parameters: - /// - signals: A sequence of signals to merge. - public static func merge(_ signals: Seq) -> Signal where Seq.Iterator.Element == Signal - { - return SignalProducer, Error>(signals) - .flatten(.merge) - .startAndRetrieveSignal() - } - - /// Merges the given signals into a single `Signal` that will emit all - /// values from each of them, and complete when all of them have completed. - /// - /// - parameters: - /// - signals: A list of signals to merge. - public static func merge(_ signals: Signal...) -> Signal { - return Signal.merge(signals) - } -} - -extension SignalProducer { - /// Merges the given producers into a single `SignalProducer` that will emit - /// all values from each of them, and complete when all of them have - /// completed. - /// - /// - parameters: - /// - producers: A sequence of producers to merge. - public static func merge(_ producers: Seq) -> SignalProducer where Seq.Iterator.Element == SignalProducer - { - return SignalProducer(producers).flatten(.merge) - } - - /// Merges the given producers into a single `SignalProducer` that will emit - /// all values from each of them, and complete when all of them have - /// completed. - /// - /// - parameters: - /// - producers: A sequence of producers to merge. - public static func merge(_ producers: SignalProducer...) -> SignalProducer { - return SignalProducer.merge(producers) - } -} - -extension Signal where Value: SignalProducerConvertible, Error == Value.Error { - /// Returns a signal that forwards values from the latest signal sent on - /// `signal`, ignoring values sent on previous inner signal. - /// - /// - warning: An error sent on `signal` or the latest inner signal will be - /// sent on the returned signal. - /// - /// - note: The returned signal completes when `signal` and the latest inner - /// signal have both completed. - fileprivate func switchToLatest() -> Signal { - return Signal { observer in - let composite = CompositeDisposable() - let serial = SerialDisposable() - - composite += serial - composite += self.observeSwitchToLatest(observer, serial) - - return composite - } - } - - fileprivate func observeSwitchToLatest(_ observer: Signal.Observer, _ latestInnerDisposable: SerialDisposable) -> Disposable? { - let state = Atomic(LatestState()) - - return self.observe { event in - switch event { - case let .value(p): - p.producer.startWithSignal { innerSignal, innerDisposable in - state.modify { - // When we replace the disposable below, this prevents - // the generated Interrupted event from doing any work. - $0.replacingInnerSignal = true - } - - latestInnerDisposable.inner = innerDisposable - - state.modify { - $0.replacingInnerSignal = false - $0.innerSignalComplete = false - } - - innerSignal.observe { event in - switch event { - case .interrupted: - // If interruption occurred as a result of a new - // producer arriving, we don't want to notify our - // observer. - let shouldComplete: Bool = state.modify { state in - if !state.replacingInnerSignal { - state.innerSignalComplete = true - } - return !state.replacingInnerSignal && state.outerSignalComplete - } - - if shouldComplete { - observer.sendCompleted() - } - - case .completed: - let shouldComplete: Bool = state.modify { - $0.innerSignalComplete = true - return $0.outerSignalComplete - } - - if shouldComplete { - observer.sendCompleted() - } - - case .value, .failed: - observer.action(event) - } - } - } - - case let .failed(error): - observer.send(error: error) - - case .completed: - let shouldComplete: Bool = state.modify { - $0.outerSignalComplete = true - return $0.innerSignalComplete - } - - if shouldComplete { - observer.sendCompleted() - } - - case .interrupted: - observer.sendInterrupted() - } - } - } -} - -extension SignalProducer where Value: SignalProducerConvertible, Error == Value.Error { - /// - warning: An error sent on `signal` or the latest inner signal will be - /// sent on the returned signal. - /// - /// - note: The returned signal completes when `signal` and the latest inner - /// signal have both completed. - /// - /// - returns: A signal that forwards values from the latest signal sent on - /// `signal`, ignoring values sent on previous inner signal. - fileprivate func switchToLatest() -> SignalProducer { - return SignalProducer { observer, lifetime in - let latestInnerDisposable = SerialDisposable() - lifetime.observeEnded(latestInnerDisposable.dispose) - - self.startWithSignal { signal, signalDisposable in - lifetime.observeEnded(signalDisposable.dispose) - - if let disposable = signal.observeSwitchToLatest(observer, latestInnerDisposable) { - lifetime.observeEnded(disposable.dispose) - } - } - } - } -} - -private struct LatestState { - var outerSignalComplete: Bool = false - var innerSignalComplete: Bool = true - - var replacingInnerSignal: Bool = false -} - -extension Signal where Value: SignalProducerConvertible, Error == Value.Error { - /// Returns a signal that forwards values from the "first input signal to send an event" - /// (winning signal) that is sent on `self`, ignoring values sent from other inner signals. - /// - /// An error sent on `self` or the winning inner signal will be sent on the - /// returned signal. - /// - /// The returned signal completes when `self` and the winning inner signal have both completed. - fileprivate func race() -> Signal { - return Signal { observer in - let composite = CompositeDisposable() - let relayDisposable = CompositeDisposable() - - composite += relayDisposable - composite += self.observeRace(observer, relayDisposable) - - return composite - } - } - - fileprivate func observeRace(_ observer: Signal.Observer, _ relayDisposable: CompositeDisposable) -> Disposable? { - let state = Atomic(RaceState()) - - return self.observe { event in - switch event { - case let .value(innerProducer): - // Ignore consecutive `innerProducer`s if any `innerSignal` already sent an event. - guard !relayDisposable.isDisposed else { - return - } - - innerProducer.producer.startWithSignal { innerSignal, innerDisposable in - state.modify { - $0.innerSignalComplete = false - } - - let disposableHandle = relayDisposable.add(innerDisposable) - var isWinningSignal = false - - innerSignal.observe { event in - if !isWinningSignal { - isWinningSignal = state.modify { state in - guard !state.isActivated else { - return false - } - - state.isActivated = true - return true - } - - // Ignore non-winning signals. - guard isWinningSignal else { return } - - // The disposals would be run exactly once immediately after - // the winning signal flips `state.isActivated`. - disposableHandle?.dispose() - relayDisposable.dispose() - } - - switch event { - case .completed: - let shouldComplete: Bool = state.modify { state in - state.innerSignalComplete = true - return state.outerSignalComplete - } - - if shouldComplete { - observer.sendCompleted() - } - - case .value, .failed, .interrupted: - observer.action(event) - } - } - } - - case let .failed(error): - observer.send(error: error) - - case .completed: - let shouldComplete: Bool = state.modify { state in - state.outerSignalComplete = true - return state.innerSignalComplete - } - - if shouldComplete { - observer.sendCompleted() - } - - case .interrupted: - observer.sendInterrupted() - } - } - } -} - -extension SignalProducer where Value: SignalProducerConvertible, Error == Value.Error { - /// Returns a producer that forwards values from the "first input producer to send an event" - /// (winning producer) that is sent on `self`, ignoring values sent from other inner producers. - /// - /// An error sent on `self` or the winning inner producer will be sent on the - /// returned producer. - /// - /// The returned producer completes when `self` and the winning inner producer have both completed. - fileprivate func race() -> SignalProducer { - return SignalProducer { observer, lifetime in - let relayDisposable = CompositeDisposable() - lifetime.observeEnded(relayDisposable.dispose) - - self.startWithSignal { signal, signalDisposable in - lifetime.observeEnded(signalDisposable.dispose) - - if let disposable = signal.observeRace(observer, relayDisposable) { - lifetime.observeEnded(disposable.dispose) - } - } - } - } -} - -private struct RaceState { - var outerSignalComplete = false - var innerSignalComplete = true - var isActivated = false -} - -extension Signal { - /// Maps each event from `signal` to a new signal, then flattens the - /// resulting producers (into a signal of values), according to the - /// semantics of the given strategy. - /// - /// - warning: If `signal` or any of the created producers fail, the - /// returned signal will forward that failure immediately. - /// - /// - parameters: - /// - strategy: Strategy used when flattening signals. - /// - transform: A closure that takes a value emitted by `self` and - /// returns a signal producer with transformed value. - public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> Signal where Inner.Error == Error { - return map(transform).flatten(strategy) - } - - /// Maps each event from `signal` to a new signal, then flattens the - /// resulting producers (into a signal of values), according to the - /// semantics of the given strategy. - /// - /// - warning: If `signal` fails, the returned signal will forward that - /// failure immediately. - /// - /// - parameters: - /// - strategy: Strategy used when flattening signals. - /// - transform: A closure that takes a value emitted by `self` and - /// returns a signal producer with transformed value. - public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> Signal where Inner.Error == NoError { - return map(transform).flatten(strategy) - } -} - -extension Signal where Error == NoError { - /// Maps each event from `signal` to a new signal, then flattens the - /// resulting signals (into a signal of values), according to the - /// semantics of the given strategy. - /// - /// - warning: If any of the created signals emit an error, the returned - /// signal will forward that error immediately. - /// - /// - parameters: - /// - strategy: Strategy used when flattening signals. - /// - transform: A closure that takes a value emitted by `self` and - /// returns a signal producer with transformed value. - public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> Signal { - return map(transform).flatten(strategy) - } - - /// Maps each event from `signal` to a new signal, then flattens the - /// resulting signals (into a signal of values), according to the - /// semantics of the given strategy. - /// - /// - parameters: - /// - strategy: Strategy used when flattening signals. - /// - transform: A closure that takes a value emitted by `self` and - /// returns a signal producer with transformed value. - public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> Signal where Inner.Error == NoError { - return map(transform).flatten(strategy) - } -} - -extension SignalProducer { - /// Maps each event from `self` to a new producer, then flattens the - /// resulting producers (into a producer of values), according to the - /// semantics of the given strategy. - /// - /// - warning: If `self` or any of the created producers fail, the returned - /// producer will forward that failure immediately. - /// - /// - parameters: - /// - strategy: Strategy used when flattening signals. - /// - transform: A closure that takes a value emitted by `self` and - /// returns a signal producer with transformed value. - public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> SignalProducer where Inner.Error == Error { - return map(transform).flatten(strategy) - } - - /// Maps each event from `self` to a new producer, then flattens the - /// resulting producers (into a producer of values), according to the - /// semantics of the given strategy. - /// - /// - warning: If `self` fails, the returned producer will forward that - /// failure immediately. - /// - /// - parameters: - /// - strategy: Strategy used when flattening signals. - /// - transform: A closure that takes a value emitted by `self` and - /// returns a signal producer with transformed value. - public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> SignalProducer where Inner.Error == NoError { - return map(transform).flatten(strategy) - } -} - -extension SignalProducer where Error == NoError { - /// Maps each event from `self` to a new producer, then flattens the - /// resulting producers (into a producer of values), according to the - /// semantics of the given strategy. - /// - /// - parameters: - /// - strategy: Strategy used when flattening signals. - /// - transform: A closure that takes a value emitted by `self` and - /// returns a signal producer with transformed value. - public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> SignalProducer where Inner.Error == Error { - return map(transform).flatten(strategy) - } - - /// Maps each event from `self` to a new producer, then flattens the - /// resulting producers (into a producer of values), according to the - /// semantics of the given strategy. - /// - /// - warning: If any of the created producers fail, the returned producer - /// will forward that failure immediately. - /// - /// - parameters: - /// - strategy: Strategy used when flattening signals. - /// - transform: A closure that takes a value emitted by `self` and - /// returns a signal producer with transformed value. - public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> SignalProducer { - return map(transform).flatten(strategy) - } -} - - -extension Signal { - /// Catches any failure that may occur on the input signal, mapping to a new - /// producer that starts in its place. - /// - /// - parameters: - /// - transform: A closure that accepts emitted error and returns a signal - /// producer with a different type of error. - public func flatMapError(_ transform: @escaping (Error) -> SignalProducer) -> Signal { - return Signal { observer in - self.observeFlatMapError(transform, observer, SerialDisposable()) - } - } - - fileprivate func observeFlatMapError(_ handler: @escaping (Error) -> SignalProducer, _ observer: Signal.Observer, _ serialDisposable: SerialDisposable) -> Disposable? { - return self.observe { event in - switch event { - case let .value(value): - observer.send(value: value) - case let .failed(error): - handler(error).startWithSignal { signal, disposable in - serialDisposable.inner = disposable - signal.observe(observer) - } - case .completed: - observer.sendCompleted() - case .interrupted: - observer.sendInterrupted() - } - } - } -} - -extension SignalProducer { - /// Catches any failure that may occur on the input producer, mapping to a - /// new producer that starts in its place. - /// - /// - parameters: - /// - transform: A closure that accepts emitted error and returns a signal - /// producer with a different type of error. - public func flatMapError(_ transform: @escaping (Error) -> SignalProducer) -> SignalProducer { - return SignalProducer { observer, lifetime in - let serialDisposable = SerialDisposable() - lifetime.observeEnded(serialDisposable.dispose) - - self.startWithSignal { signal, signalDisposable in - serialDisposable.inner = signalDisposable - - _ = signal.observeFlatMapError(transform, observer, serialDisposable) - } - } - } -} diff --git a/Sample/Pods/ReactiveSwift/Sources/FoundationExtensions.swift b/Sample/Pods/ReactiveSwift/Sources/FoundationExtensions.swift deleted file mode 100644 index 5524b3b6..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/FoundationExtensions.swift +++ /dev/null @@ -1,168 +0,0 @@ -// -// FoundationExtensions.swift -// ReactiveSwift -// -// Created by Justin Spahr-Summers on 2014-10-19. -// Copyright (c) 2014 GitHub. All rights reserved. -// - -import Foundation -import Dispatch -import enum Result.NoError -import struct Result.AnyError - -#if os(Linux) - import let CDispatch.NSEC_PER_USEC - import let CDispatch.NSEC_PER_SEC -#endif - -extension NotificationCenter: ReactiveExtensionsProvider {} - -extension Reactive where Base: NotificationCenter { - /// Returns a Signal to observe posting of the specified notification. - /// - /// - parameters: - /// - name: name of the notification to observe - /// - object: an instance which sends the notifications - /// - /// - returns: A Signal of notifications posted that match the given criteria. - /// - /// - note: The signal does not terminate naturally. Observers must be - /// explicitly disposed to avoid leaks. - public func notifications(forName name: Notification.Name?, object: AnyObject? = nil) -> Signal { - return Signal { [base = self.base] observer in - let notificationObserver = base.addObserver(forName: name, object: object, queue: nil) { notification in - observer.send(value: notification) - } - - return AnyDisposable { - base.removeObserver(notificationObserver) - } - } - } -} - -private let defaultSessionError = NSError(domain: "org.reactivecocoa.ReactiveSwift.Reactivity.URLSession.dataWithRequest", - code: 1, - userInfo: nil) - -extension URLSession: ReactiveExtensionsProvider {} - -extension Reactive where Base: URLSession { - /// Returns a SignalProducer which performs the work associated with an - /// `NSURLSession` - /// - /// - parameters: - /// - request: A request that will be performed when the producer is - /// started - /// - /// - returns: A producer that will execute the given request once for each - /// invocation of `start()`. - /// - /// - note: This method will not send an error event in the case of a server - /// side error (i.e. when a response with status code other than - /// 200...299 is received). - public func data(with request: URLRequest) -> SignalProducer<(Data, URLResponse), AnyError> { - return SignalProducer { [base = self.base] observer, lifetime in - let task = base.dataTask(with: request) { data, response, error in - if let data = data, let response = response { - observer.send(value: (data, response)) - observer.sendCompleted() - } else { - observer.send(error: AnyError(error ?? defaultSessionError)) - } - } - - lifetime.observeEnded(task.cancel) - task.resume() - } - } -} - -extension Date { - internal func addingTimeInterval(_ interval: DispatchTimeInterval) -> Date { - return addingTimeInterval(interval.timeInterval) - } -} - -extension DispatchTimeInterval { - internal var timeInterval: TimeInterval { - #if swift(>=3.2) && !os(Linux) - switch self { - case let .seconds(s): - return TimeInterval(s) - case let .milliseconds(ms): - return TimeInterval(TimeInterval(ms) / 1000.0) - case let .microseconds(us): - return TimeInterval(Int64(us) * Int64(NSEC_PER_USEC)) / TimeInterval(NSEC_PER_SEC) - case let .nanoseconds(ns): - return TimeInterval(ns) / TimeInterval(NSEC_PER_SEC) - case .never: - return .infinity - } - #else - switch self { - case let .seconds(s): - return TimeInterval(s) - case let .milliseconds(ms): - return TimeInterval(TimeInterval(ms) / 1000.0) - case let .microseconds(us): - return TimeInterval(Int64(us) * Int64(NSEC_PER_USEC)) / TimeInterval(NSEC_PER_SEC) - case let .nanoseconds(ns): - return TimeInterval(ns) / TimeInterval(NSEC_PER_SEC) - } - #endif - } - - // This was added purely so that our test scheduler to "go backwards" in - // time. See `TestScheduler.rewind(by interval: DispatchTimeInterval)`. - internal static prefix func -(lhs: DispatchTimeInterval) -> DispatchTimeInterval { - #if swift(>=3.2) && !os(Linux) - switch lhs { - case let .seconds(s): - return .seconds(-s) - case let .milliseconds(ms): - return .milliseconds(-ms) - case let .microseconds(us): - return .microseconds(-us) - case let .nanoseconds(ns): - return .nanoseconds(-ns) - case .never: - return .never - } - #else - switch lhs { - case let .seconds(s): - return .seconds(-s) - case let .milliseconds(ms): - return .milliseconds(-ms) - case let .microseconds(us): - return .microseconds(-us) - case let .nanoseconds(ns): - return .nanoseconds(-ns) - } - #endif - } - - /// Scales a time interval by the given scalar specified in `rhs`. - /// - /// - note: This method is only used internally to "scale down" a time - /// interval. Specifically it's used only to scale intervals to 10% - /// of their original value for the default `leeway` parameter in - /// `Scheduler.schedule(after:action:)` schedule and similar - /// other methods. - /// - /// If seconds is over 200,000, 10% is ~2,000, and hence we end up - /// with a value of ~2,000,000,000. Not quite overflowing a signed - /// integer on 32-bit platforms, but close. - /// - /// Even still, 200,000 seconds should be a rarely (if ever) - /// specified interval for our APIs. And even then, folks should be - /// smart and specify their own `leeway` parameter. - /// - /// - returns: Scaled interval in microseconds - internal static func *(lhs: DispatchTimeInterval, rhs: Double) -> DispatchTimeInterval { - let seconds = lhs.timeInterval * rhs - return .microseconds(Int(seconds * 1000 * 1000)) - } -} diff --git a/Sample/Pods/ReactiveSwift/Sources/InhabitableTypeGuards.swift b/Sample/Pods/ReactiveSwift/Sources/InhabitableTypeGuards.swift deleted file mode 100644 index 5c5d44a4..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/InhabitableTypeGuards.swift +++ /dev/null @@ -1,132 +0,0 @@ -import Result - -// Observation -extension SignalProducer where Value == Never { - @discardableResult - @available(*, deprecated, message:"`Result.success` is never delivered - `Value` is inhabitable (Instantiation at runtime would trap)") - public func startWithResult(_ action: @escaping (Result) -> Void) -> Disposable { observingInhabitableTypeError() } - - @discardableResult - @available(*, deprecated, message:"Observer is never called - `Value` is inhabitable (Instantiation at runtime would trap)") - public func startWithValues(_ action: @escaping (Value) -> Void) -> Disposable { observingInhabitableTypeError() } -} - -extension SignalProducer where Value == Never, Error == NoError { - @discardableResult - @available(*, deprecated, message:"Observer is never called - `Value` and `Error` are inhabitable (Instantiation at runtime would trap)") - public func startWithResult(_ action: @escaping (Result) -> Void) -> Disposable { observingInhabitableTypeError() } -} - -extension SignalProducer where Error == NoError { - @discardableResult - @available(*, deprecated, message:"`Error` is inhabitable so the observer is never called (Instantiation at runtime would trap)") - public func startWithFailed(_ action: @escaping (Error) -> Void) -> Disposable { observingInhabitableTypeError() } -} - -extension Signal where Value == Never { - @discardableResult - @available(*, deprecated, message:"`Result.success` is never delivered - `Value` is inhabitable (Instantiation at runtime would trap)") - public func observeResult(_ action: @escaping (Result) -> Void) -> Disposable? { observingInhabitableTypeError() } - - @discardableResult - @available(*, deprecated, message:"Observer is never called - `Value` is inhabitable (Instantiation at runtime would trap)") - public func observeValues(_ action: @escaping (Value) -> Void) -> Disposable? { observingInhabitableTypeError() } -} - -extension Signal where Value == Never, Error == NoError { - @discardableResult - @available(*, deprecated, message:"Observer is never called - `Value` and `Error` are inhabitable (Instantiation at runtime would trap)") - public func observeResult(_ action: @escaping (Result) -> Void) -> Disposable? { observingInhabitableTypeError() } -} - -extension Signal where Error == NoError { - @discardableResult - @available(*, deprecated, message:"Observer is never invoked - `Error` is inhabitable (Instantiation at runtime would trap)") - public func observeFailed(_ action: @escaping (Error) -> Void) -> Disposable? { observingInhabitableTypeError() } -} - -// flatMap -extension SignalProducer where Value == Never { - @discardableResult - @available(*, deprecated, message:"Use `promoteValue` instead - `Value` is inhabitable (Instantiation at runtime would trap)") - public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> SignalProducer where Inner.Error == Error { observingInhabitableTypeError() } - - @discardableResult - @available(*, deprecated, message:"Use `promoteValue` instead - `Value` is inhabitable (Instantiation at runtime would trap)") - public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> SignalProducer where Inner.Error == NoError { observingInhabitableTypeError() } -} - -extension SignalProducer where Value == Never, Error == NoError { - @discardableResult - @available(*, deprecated, message:"Use `promoteValue` instead - `Value` and `Error` are inhabitable (Instantiation at runtime would trap)") - public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> SignalProducer { observingInhabitableTypeError() } - - @discardableResult - @available(*, deprecated, message:"Use `promoteValue` instead - `Value` and `Error` are inhabitable (Instantiation at runtime would trap)") - public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> SignalProducer where Inner.Error == Error { observingInhabitableTypeError() } -} - -extension SignalProducer where Error == NoError { - @discardableResult - @available(*, deprecated, message:"Use `promoteError` instead - `Error` is inhabitable (Instantiation at runtime would trap)") - public func flatMapError(_ transform: @escaping (Error) -> SignalProducer) -> SignalProducer { observingInhabitableTypeError() } -} - -extension Signal where Value == Never { - @discardableResult - @available(*, deprecated, message:"Use `promoteValue` instead - `Value` is inhabitable (Instantiation at runtime would trap)") - public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> Signal where Inner.Error == Error { observingInhabitableTypeError() } - - @discardableResult - @available(*, deprecated, message:"Use `promoteValue` instead - `Value` is inhabitable (Instantiation at runtime would trap)") - public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> Signal where Inner.Error == NoError { observingInhabitableTypeError() } - -} - -extension Signal where Value == Never, Error == NoError { - @discardableResult - @available(*, deprecated, message:"Use `promoteValue` instead - `Value` and `Error` are inhabitable (Instantiation at runtime would trap)") - public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> Signal { observingInhabitableTypeError() } - - @discardableResult - @available(*, deprecated, message:"Use `promoteValue` instead - `Value` and `Error` are inhabitable (Instantiation at runtime would trap)") - public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> Inner) -> Signal where Inner.Error == Error { observingInhabitableTypeError() } -} - -extension Signal where Error == NoError { - @discardableResult - @available(*, deprecated, message:"Use `promoteError` instead - `Error` is inhabitable (Instantiation at runtime would trap)") - public func flatMapError(_ transform: @escaping (Error) -> SignalProducer) -> Signal { observingInhabitableTypeError() } -} - -@inline(never) -private func observingInhabitableTypeError() -> Never { - fatalError("Detected an attempt to instantiate a `Signal` or `SignalProducer` that observes an inhabitable type, e.g. `Never` or `NoError`. This is considered a logical error, and appropriate operators should be used instead. Please refer to the warnings raised by the compiler.") -} - -/* -func test() { - SignalProducer.never.startWithResult { _ in } - SignalProducer.never.startWithResult { _ in } - SignalProducer.never.startWithFailed { _ in } - SignalProducer.never.startWithFailed { _ in } - Signal.never.observeResult { _ in } - Signal.never.observeResult { _ in } - Signal.never.observeFailed { _ in } - Signal.never.observeFailed { _ in } - - SignalProducer.never.flatMap(.latest) { _ in SignalProducer.empty } - SignalProducer.never.flatMap(.latest) { _ in SignalProducer.empty } - SignalProducer.never.flatMap(.latest) { _ in SignalProducer.empty } - SignalProducer.never.flatMap(.latest) { _ in SignalProducer.empty } - SignalProducer.never.flatMapError { _ in SignalProducer.empty } - SignalProducer.never.flatMapError { _ in SignalProducer.empty } - - Signal.never.flatMap(.latest) { _ in SignalProducer.empty } - Signal.never.flatMap(.latest) { _ in SignalProducer.empty } - Signal.never.flatMap(.latest) { _ in SignalProducer.empty } - Signal.never.flatMap(.latest) { _ in SignalProducer.empty } - Signal.never.flatMapError { _ in SignalProducer.empty } - Signal.never.flatMapError { _ in SignalProducer.empty } -} -*/ diff --git a/Sample/Pods/ReactiveSwift/Sources/Lifetime.swift b/Sample/Pods/ReactiveSwift/Sources/Lifetime.swift deleted file mode 100644 index 08bcc1c1..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/Lifetime.swift +++ /dev/null @@ -1,110 +0,0 @@ -import Foundation -import enum Result.NoError - -/// Represents the lifetime of an object, and provides a hook to observe when -/// the object deinitializes. -public final class Lifetime { - private let disposables: CompositeDisposable - - /// A signal that sends a `completed` event when the lifetime ends. - /// - /// - note: Consider using `Lifetime.observeEnded` if only a closure observer - /// is to be attached. - public var ended: Signal { - return Signal { observer in - return disposables += observer.sendCompleted - } - } - - /// A flag indicating whether the lifetime has ended. - public var hasEnded: Bool { - return disposables.isDisposed - } - - /// Initialize a `Lifetime` object with the supplied composite disposable. - /// - /// - parameters: - /// - signal: The composite disposable. - internal init(_ disposables: CompositeDisposable) { - self.disposables = disposables - } - - /// Initialize a `Lifetime` from a lifetime token, which is expected to be - /// associated with an object. - /// - /// - important: The resulting lifetime object does not retain the lifetime - /// token. - /// - /// - parameters: - /// - token: A lifetime token for detecting the deinitialization of the - /// associated object. - public convenience init(_ token: Token) { - self.init(token.disposables) - } - - /// Observe the termination of `self`. - /// - /// - parameters: - /// - action: The action to be invoked when `self` ends. - /// - /// - returns: A disposable that detaches `action` from the lifetime, or `nil` - /// if `lifetime` has already ended. - @discardableResult - public func observeEnded(_ action: @escaping () -> Void) -> Disposable? { - return disposables += action - } - - /// Add the given disposable as an observer of `self`. - /// - /// - parameters: - /// - disposable: The disposable to be disposed of when `self` ends. - /// - /// - returns: A disposable that detaches `disposable` from the lifetime, or `nil` - /// if `lifetime` has already ended. - @discardableResult - public static func += (lifetime: Lifetime, disposable: Disposable?) -> Disposable? { - return (disposable?.dispose).flatMap(lifetime.observeEnded) - } -} - -extension Lifetime { - /// Factory method for creating a `Lifetime` and its associated `Token`. - /// - /// - returns: A `(lifetime, token)` tuple. - public static func make() -> (lifetime: Lifetime, token: Token) { - let token = Token() - return (Lifetime(token), token) - } - - /// A `Lifetime` that has already ended. - public static let empty: Lifetime = { - let disposables = CompositeDisposable() - disposables.dispose() - return Lifetime(disposables) - }() -} - -extension Lifetime { - /// A token object which completes its signal when it deinitializes. - /// - /// It is generally used in conjuncion with `Lifetime` as a private - /// deinitialization trigger. - /// - /// ``` - /// class MyController { - /// private let (lifetime, token) = Lifetime.make() - /// } - /// ``` - public final class Token { - /// A signal that sends a Completed event when the lifetime ends. - fileprivate let disposables: CompositeDisposable - - public init() { - disposables = CompositeDisposable() - } - - deinit { - disposables.dispose() - } - } -} diff --git a/Sample/Pods/ReactiveSwift/Sources/Observer.swift b/Sample/Pods/ReactiveSwift/Sources/Observer.swift deleted file mode 100644 index 41cace94..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/Observer.swift +++ /dev/null @@ -1,122 +0,0 @@ -// -// Observer.swift -// ReactiveSwift -// -// Created by Andy Matuschak on 10/2/15. -// Copyright © 2015 GitHub. All rights reserved. -// - -extension Signal { - /// An Observer is a simple wrapper around a function which can receive Events - /// (typically from a Signal). - public final class Observer { - public typealias Action = (Event) -> Void - - /// An action that will be performed upon arrival of the event. - public let action: Action - - /// Whether the observer should send an `interrupted` event as it deinitializes. - private let interruptsOnDeinit: Bool - - /// An initializer that accepts a closure accepting an event for the - /// observer. - /// - /// - parameters: - /// - action: A closure to lift over received event. - /// - interruptsOnDeinit: `true` if the observer should send an `interrupted` - /// event as it deinitializes. `false` otherwise. - internal init(action: @escaping Action, interruptsOnDeinit: Bool) { - self.action = action - self.interruptsOnDeinit = interruptsOnDeinit - } - - /// An initializer that accepts a closure accepting an event for the - /// observer. - /// - /// - parameters: - /// - action: A closure to lift over received event. - public init(_ action: @escaping Action) { - self.action = action - self.interruptsOnDeinit = false - } - - /// An initializer that accepts closures for different event types. - /// - /// - parameters: - /// - value: Optional closure executed when a `value` event is observed. - /// - failed: Optional closure that accepts an `Error` parameter when a - /// failed event is observed. - /// - completed: Optional closure executed when a `completed` event is - /// observed. - /// - interruped: Optional closure executed when an `interrupted` event is - /// observed. - public convenience init( - value: ((Value) -> Void)? = nil, - failed: ((Error) -> Void)? = nil, - completed: (() -> Void)? = nil, - interrupted: (() -> Void)? = nil - ) { - self.init { event in - switch event { - case let .value(v): - value?(v) - - case let .failed(error): - failed?(error) - - case .completed: - completed?() - - case .interrupted: - interrupted?() - } - } - } - - internal convenience init(mappingInterruptedToCompleted observer: Signal.Observer) { - self.init { event in - switch event { - case .value, .completed, .failed: - observer.action(event) - case .interrupted: - observer.sendCompleted() - } - } - } - - deinit { - if interruptsOnDeinit { - // Since `Signal` would ensure that only one terminal event would ever be - // sent for any given `Signal`, we do not need to assert any condition - // here. - action(.interrupted) - } - } - - /// Puts a `value` event into `self`. - /// - /// - parameters: - /// - value: A value sent with the `value` event. - public func send(value: Value) { - action(.value(value)) - } - - /// Puts a failed event into `self`. - /// - /// - parameters: - /// - error: An error object sent with failed event. - public func send(error: Error) { - action(.failed(error)) - } - - /// Puts a `completed` event into `self`. - public func sendCompleted() { - action(.completed) - } - - /// Puts an `interrupted` event into `self`. - public func sendInterrupted() { - action(.interrupted) - } - } -} diff --git a/Sample/Pods/ReactiveSwift/Sources/Optional.swift b/Sample/Pods/ReactiveSwift/Sources/Optional.swift deleted file mode 100644 index 1e8584c8..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/Optional.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// Optional.swift -// ReactiveSwift -// -// Created by Neil Pankey on 6/24/15. -// Copyright (c) 2015 GitHub. All rights reserved. -// - -/// An optional protocol for use in type constraints. -public protocol OptionalProtocol { - /// The type contained in the otpional. - associatedtype Wrapped - - init(reconstructing value: Wrapped?) - - /// Extracts an optional from the receiver. - var optional: Wrapped? { get } -} - -extension Optional: OptionalProtocol { - public var optional: Wrapped? { - return self - } - - public init(reconstructing value: Wrapped?) { - self = value - } -} - -extension Signal { - /// Turns each value into an Optional. - internal func optionalize() -> Signal { - return map(Optional.init) - } -} - -extension SignalProducer { - /// Turns each value into an Optional. - internal func optionalize() -> SignalProducer { - return lift { $0.optionalize() } - } -} diff --git a/Sample/Pods/ReactiveSwift/Sources/Property.swift b/Sample/Pods/ReactiveSwift/Sources/Property.swift deleted file mode 100644 index 4262f04f..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/Property.swift +++ /dev/null @@ -1,771 +0,0 @@ -#if os(iOS) || os(macOS) || os(tvOS) || os(watchOS) -import Darwin.POSIX.pthread -#else -import Glibc -#endif -import enum Result.NoError - -/// Represents a property that allows observation of its changes. -/// -/// Only classes can conform to this protocol, because having a signal -/// for changes over time implies the origin must have a unique identity. -public protocol PropertyProtocol: class, BindingSource { - associatedtype Value - - /// The current value of the property. - var value: Value { get } - - /// The values producer of the property. - /// - /// It produces a signal that sends the property's current value, - /// followed by all changes over time. It completes when the property - /// has deinitialized, or has no further change. - /// - /// - note: If `self` is a composed property, the producer would be - /// bound to the lifetime of its sources. - var producer: SignalProducer { get } - - /// A signal that will send the property's changes over time. It - /// completes when the property has deinitialized, or has no further - /// change. - /// - /// - note: If `self` is a composed property, the signal would be - /// bound to the lifetime of its sources. - var signal: Signal { get } -} - -/// Represents an observable property that can be mutated directly. -public protocol MutablePropertyProtocol: PropertyProtocol, BindingTargetProvider { - /// The current value of the property. - var value: Value { get set } - - /// The lifetime of the property. - var lifetime: Lifetime { get } -} - -/// Default implementation of `BindingTargetProvider` for mutable properties. -extension MutablePropertyProtocol { - public var bindingTarget: BindingTarget { - return BindingTarget(lifetime: lifetime) { [weak self] in self?.value = $0 } - } -} - -/// Represents a mutable property that can be safety composed by exposing its -/// synchronization mechanic through the defined closure-based interface. -public protocol ComposableMutablePropertyProtocol: MutablePropertyProtocol { - /// Atomically performs an arbitrary action using the current value of the - /// variable. - /// - /// - parameters: - /// - action: A closure that accepts current property value. - /// - /// - returns: the result of the action. - func withValue(_ action: (Value) throws -> Result) rethrows -> Result - - /// Atomically modifies the variable. - /// - /// - parameters: - /// - action: A closure that accepts old property value and returns a new - /// property value. - /// - /// - returns: The result of the action. - func modify(_ action: (inout Value) throws -> Result) rethrows -> Result -} - -// Property operators. -// -// A composed property is a transformed view of its sources, and does not -// own its lifetime. Its producer and signal are bound to the lifetime of -// its sources. - -extension PropertyProtocol { - /// Lifts a unary SignalProducer operator to operate upon PropertyProtocol instead. - fileprivate func lift(_ transform: @escaping (SignalProducer) -> SignalProducer) -> Property { - return Property(unsafeProducer: transform(producer)) - } - - /// Lifts a binary SignalProducer operator to operate upon PropertyProtocol instead. - fileprivate func lift(_ transform: @escaping (SignalProducer) -> (SignalProducer) -> SignalProducer) -> (P) -> Property { - return { other in - return Property(unsafeProducer: transform(self.producer)(other.producer)) - } - } - - /// Maps the current value and all subsequent values to a new property. - /// - /// - parameters: - /// - transform: A closure that will map the current `value` of this - /// `Property` to a new value. - /// - /// - returns: A property that holds a mapped value from `self`. - public func map(_ transform: @escaping (Value) -> U) -> Property { - return lift { $0.map(transform) } - } - -#if swift(>=3.2) - /// Maps the current value and all subsequent values to a new property - /// by applying a key path. - /// - /// - parameters: - /// - keyPath: A key path relative to the property's `Value` type. - /// - /// - returns: A property that holds a mapped value from `self`. - public func map(_ keyPath: KeyPath) -> Property { - return lift { $0.map(keyPath) } - } -#endif - - /// Combines the current value and the subsequent values of two `Property`s in - /// the manner described by `Signal.combineLatest(with:)`. - /// - /// - parameters: - /// - other: A property to combine `self`'s value with. - /// - /// - returns: A property that holds a tuple containing values of `self` and - /// the given property. - public func combineLatest(with other: P) -> Property<(Value, P.Value)> { - return Property.combineLatest(self, other) - } - - /// Zips the current value and the subsequent values of two `Property`s in - /// the manner described by `Signal.zipWith`. - /// - /// - parameters: - /// - other: A property to zip `self`'s value with. - /// - /// - returns: A property that holds a tuple containing values of `self` and - /// the given property. - public func zip(with other: P) -> Property<(Value, P.Value)> { - return Property.zip(self, other) - } - - /// Forward events from `self` with history: values of the returned property - /// are a tuple whose first member is the previous value and whose second - /// member is the current value. `initial` is supplied as the first member - /// when `self` sends its first value. - /// - /// - parameters: - /// - initial: A value that will be combined with the first value sent by - /// `self`. - /// - /// - returns: A property that holds tuples that contain previous and - /// current values of `self`. - public func combinePrevious(_ initial: Value) -> Property<(Value, Value)> { - return lift { $0.combinePrevious(initial) } - } - - /// Forward only values from `self` that are not considered equivalent to its - /// consecutive predecessor. - /// - /// - note: The first value is always forwarded. - /// - /// - parameters: - /// - isEquivalent: A closure to determine whether two values are equivalent. - /// - /// - returns: A property which conditionally forwards values from `self`. - public func skipRepeats(_ isEquivalent: @escaping (Value, Value) -> Bool) -> Property { - return lift { $0.skipRepeats(isEquivalent) } - } -} - -extension PropertyProtocol where Value: Equatable { - /// Forward only values from `self` that are not equal to its consecutive predecessor. - /// - /// - note: The first value is always forwarded. - /// - /// - returns: A property which conditionally forwards values from `self`. - public func skipRepeats() -> Property { - return lift { $0.skipRepeats() } - } -} - -extension PropertyProtocol where Value: PropertyProtocol { - /// Flattens the inner property held by `self` (into a single property of - /// values), according to the semantics of the given strategy. - /// - /// - parameters: - /// - strategy: The preferred flatten strategy. - /// - /// - returns: A property that sends the values of its inner properties. - public func flatten(_ strategy: FlattenStrategy) -> Property { - return lift { $0.flatMap(strategy) { $0.producer } } - } -} - -extension PropertyProtocol { - /// Maps each property from `self` to a new property, then flattens the - /// resulting properties (into a single property), according to the - /// semantics of the given strategy. - /// - /// - parameters: - /// - strategy: The preferred flatten strategy. - /// - transform: The transform to be applied on `self` before flattening. - /// - /// - returns: A property that sends the values of its inner properties. - public func flatMap(_ strategy: FlattenStrategy, _ transform: @escaping (Value) -> P) -> Property { - return lift { $0.flatMap(strategy) { transform($0).producer } } - } - - /// Forward only those values from `self` that have unique identities across - /// the set of all values that have been held. - /// - /// - note: This causes the identities to be retained to check for - /// uniqueness. - /// - /// - parameters: - /// - transform: A closure that accepts a value and returns identity - /// value. - /// - /// - returns: A property that sends unique values during its lifetime. - public func uniqueValues(_ transform: @escaping (Value) -> Identity) -> Property { - return lift { $0.uniqueValues(transform) } - } -} - -extension PropertyProtocol where Value: Hashable { - /// Forwards only those values from `self` that are unique across the set of - /// all values that have been seen. - /// - /// - note: This causes the identities to be retained to check for uniqueness. - /// Providing a function that returns a unique value for each sent - /// value can help you reduce the memory footprint. - /// - /// - returns: A property that sends unique values during its lifetime. - public func uniqueValues() -> Property { - return lift { $0.uniqueValues() } - } -} - -extension PropertyProtocol { - /// Combines the values of all the given properties, in the manner described - /// by `combineLatest(with:)`. - public static func combineLatest(_ a: A, _ b: B) -> Property<(A.Value, B.Value)> where Value == A.Value { - return a.lift { SignalProducer.combineLatest($0, b.producer) } - } - - /// Combines the values of all the given properties, in the manner described - /// by `combineLatest(with:)`. - public static func combineLatest(_ a: A, _ b: B, _ c: C) -> Property<(A.Value, B.Value, C.Value)> where Value == A.Value { - return a.lift { SignalProducer.combineLatest($0, b.producer, c.producer) } - } - - /// Combines the values of all the given properties, in the manner described - /// by `combineLatest(with:)`. - public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D) -> Property<(A.Value, B.Value, C.Value, D.Value)> where Value == A.Value { - return a.lift { SignalProducer.combineLatest($0, b.producer, c.producer, d.producer) } - } - - /// Combines the values of all the given properties, in the manner described - /// by `combineLatest(with:)`. - public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value)> where Value == A.Value { - return a.lift { SignalProducer.combineLatest($0, b.producer, c.producer, d.producer, e.producer) } - } - - /// Combines the values of all the given properties, in the manner described - /// by `combineLatest(with:)`. - public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value)> where Value == A.Value { - return a.lift { SignalProducer.combineLatest($0, b.producer, c.producer, d.producer, e.producer, f.producer) } - } - - /// Combines the values of all the given properties, in the manner described - /// by `combineLatest(with:)`. - public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value)> where Value == A.Value { - return a.lift { SignalProducer.combineLatest($0, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer) } - } - - /// Combines the values of all the given properties, in the manner described - /// by `combineLatest(with:)`. - public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value)> where Value == A.Value { - return a.lift { SignalProducer.combineLatest($0, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer) } - } - - /// Combines the values of all the given properties, in the manner described - /// by `combineLatest(with:)`. - public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value, I.Value)> where Value == A.Value { - return a.lift { SignalProducer.combineLatest($0, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer, i.producer) } - } - - /// Combines the values of all the given properties, in the manner described - /// by `combineLatest(with:)`. - public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I, _ j: J) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value, I.Value, J.Value)> where Value == A.Value { - return a.lift { SignalProducer.combineLatest($0, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer, i.producer, j.producer) } - } - - /// Combines the values of all the given producers, in the manner described by - /// `combineLatest(with:)`. Returns nil if the sequence is empty. - public static func combineLatest(_ properties: S) -> Property<[S.Iterator.Element.Value]>? where S.Iterator.Element: PropertyProtocol { - let producers = properties.map { $0.producer } - guard !producers.isEmpty else { - return nil - } - - return Property(unsafeProducer: SignalProducer.combineLatest(producers)) - } - - /// Zips the values of all the given properties, in the manner described by - /// `zip(with:)`. - public static func zip(_ a: A, _ b: B) -> Property<(A.Value, B.Value)> where Value == A.Value { - return a.lift { SignalProducer.zip($0, b.producer) } - } - - /// Zips the values of all the given properties, in the manner described by - /// `zip(with:)`. - public static func zip(_ a: A, _ b: B, _ c: C) -> Property<(A.Value, B.Value, C.Value)> where Value == A.Value { - return a.lift { SignalProducer.zip($0, b.producer, c.producer) } - } - - /// Zips the values of all the given properties, in the manner described by - /// `zip(with:)`. - public static func zip(_ a: A, _ b: B, _ c: C, _ d: D) -> Property<(A.Value, B.Value, C.Value, D.Value)> where Value == A.Value { - return a.lift { SignalProducer.zip($0, b.producer, c.producer, d.producer) } - } - - /// Zips the values of all the given properties, in the manner described by - /// `zip(with:)`. - public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value)> where Value == A.Value { - return a.lift { SignalProducer.zip($0, b.producer, c.producer, d.producer, e.producer) } - } - - /// Zips the values of all the given properties, in the manner described by - /// `zip(with:)`. - public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value)> where Value == A.Value { - return a.lift { SignalProducer.zip($0, b.producer, c.producer, d.producer, e.producer, f.producer) } - } - - /// Zips the values of all the given properties, in the manner described by - /// `zip(with:)`. - public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value)> where Value == A.Value { - return a.lift { SignalProducer.zip($0, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer) } - } - - /// Zips the values of all the given properties, in the manner described by - /// `zip(with:)`. - public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value)> where Value == A.Value { - return a.lift { SignalProducer.zip($0, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer) } - } - - /// Zips the values of all the given properties, in the manner described by - /// `zip(with:)`. - public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value, I.Value)> where Value == A.Value { - return a.lift { SignalProducer.zip($0, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer, i.producer) } - } - - /// Zips the values of all the given properties, in the manner described by - /// `zip(with:)`. - public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I, _ j: J) -> Property<(A.Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value, I.Value, J.Value)> where Value == A.Value { - return a.lift { SignalProducer.zip($0, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer, i.producer, j.producer) } - } - - /// Zips the values of all the given properties, in the manner described by - /// `zip(with:)`. Returns nil if the sequence is empty. - public static func zip(_ properties: S) -> Property<[S.Iterator.Element.Value]>? where S.Iterator.Element: PropertyProtocol { - let producers = properties.map { $0.producer } - guard !producers.isEmpty else { - return nil - } - - return Property(unsafeProducer: SignalProducer.zip(producers)) - } -} - -extension PropertyProtocol where Value == Bool { - /// Create a property that computes a logical NOT in the latest values of `self`. - /// - /// - returns: A property that contains the logial NOT results. - public func negate() -> Property { - return self.lift { $0.negate() } - } - - /// Create a property that computes a logical AND between the latest values of `self` - /// and `property`. - /// - /// - parameters: - /// - property: Property to be combined with `self`. - /// - /// - returns: A property that contains the logial AND results. - public func and(_ property: P) -> Property where P.Value == Value { - return self.lift(SignalProducer.and)(property) - } - - /// Create a property that computes a logical OR between the latest values of `self` - /// and `property`. - /// - /// - parameters: - /// - property: Property to be combined with `self`. - /// - /// - returns: A property that contains the logial OR results. - public func or(_ property: P) -> Property where P.Value == Value { - return self.lift(SignalProducer.or)(property) - } -} - -/// A read-only property that can be observed for its changes over time. There -/// are three categories of read-only properties: -/// -/// # Constant property -/// Created by `Property(value:)`, the producer and signal of a constant -/// property would complete immediately when it is initialized. -/// -/// # Existential property -/// Created by `Property(capturing:)`, it wraps any arbitrary `PropertyProtocol` -/// types, and passes through the behavior. Note that it would retain the -/// wrapped property. -/// -/// Existential property would be deprecated when generalized existential -/// eventually lands in Swift. -/// -/// # Composed property -/// A composed property presents a composed view of its sources, which can be -/// one or more properties, a producer, or a signal. It can be created using -/// property composition operators, `Property(_:)` or `Property(initial:then:)`. -/// -/// It does not own its lifetime, and its producer and signal are bound to the -/// lifetime of its sources. It also does not have an influence on its sources, -/// so retaining a composed property would not prevent its sources from -/// deinitializing. -/// -/// Note that composed properties do not retain any of its sources. -public final class Property: PropertyProtocol { - private let _value: () -> Value - - /// The current value of the property. - public var value: Value { - return _value() - } - - /// A producer for Signals that will send the property's current - /// value, followed by all changes over time, then complete when the - /// property has deinitialized or has no further changes. - /// - /// - note: If `self` is a composed property, the producer would be - /// bound to the lifetime of its sources. - public let producer: SignalProducer - - /// A signal that will send the property's changes over time, then - /// complete when the property has deinitialized or has no further changes. - /// - /// - note: If `self` is a composed property, the signal would be - /// bound to the lifetime of its sources. - public let signal: Signal - - /// Initializes a constant property. - /// - /// - parameters: - /// - property: A value of the constant property. - public init(value: Value) { - _value = { value } - producer = SignalProducer(value: value) - signal = Signal.empty - } - - /// Initializes an existential property which wraps the given property. - /// - /// - note: The resulting property retains the given property. - /// - /// - parameters: - /// - property: A property to be wrapped. - public init(capturing property: P) where P.Value == Value { - _value = { property.value } - producer = property.producer - signal = property.signal - } - - /// Initializes a composed property which reflects the given property. - /// - /// - note: The resulting property does not retain the given property. - /// - /// - parameters: - /// - property: A property to be wrapped. - public convenience init(_ property: P) where P.Value == Value { - self.init(unsafeProducer: property.producer) - } - - /// Initializes a composed property that first takes on `initial`, then each - /// value sent on a signal created by `producer`. - /// - /// - parameters: - /// - initial: Starting value for the property. - /// - values: A producer that will start immediately and send values to - /// the property. - public convenience init(initial: Value, then values: SignalProducer) { - self.init(unsafeProducer: SignalProducer { observer, lifetime in - observer.send(value: initial) - let disposable = values.start(Signal.Observer(mappingInterruptedToCompleted: observer)) - lifetime.observeEnded(disposable.dispose) - }) - } - - /// Initialize a composed property that first takes on `initial`, then each - /// value sent on `signal`. - /// - /// - parameters: - /// - initialValue: Starting value for the property. - /// - values: A signal that will send values to the property. - public convenience init(initial: Value, then values: Signal) { - self.init(initial: initial, then: SignalProducer(values)) - } - - /// Initialize a composed property from a producer that promises to send - /// at least one value synchronously in its start handler before sending any - /// subsequent event. - /// - /// - important: The producer and the signal of the created property would - /// complete only when the `unsafeProducer` completes. - /// - /// - warning: If the producer fails its promise, a fatal error would be - /// raised. - /// - /// - warning: `unsafeProducer` should not emit any `interrupted` event unless it is - /// a result of being interrupted by the downstream. - /// - /// - parameters: - /// - unsafeProducer: The composed producer for creating the property. - fileprivate init( - unsafeProducer: SignalProducer, - transform: ((Signal.Observer) -> Signal.Observer)? = nil - ) { - // The ownership graph: - // - // ------------ weak ----------- strong ------------------ - // | Upstream | ~~~~~~~~> | Box | <======== | SignalProducer | <=== strong - // ------------ ----------- // ------------------ \\ - // \\ // \\ - // \\ ------------ weak ----------- <== ------------ - // ==> | Observer | ~~~~> | Relay | <=========================== | Property | - // strong ------------ ----------- strong ------------ - - let box = PropertyBox(nil) - var relay: Signal! - - unsafeProducer.startWithSignal { upstream, interruptHandle in - // A composed property tracks its active consumers through its relay signal, and - // interrupts `unsafeProducer` if the relay signal terminates. - let (signal, _observer) = Signal.pipe(disposable: interruptHandle) - let observer = transform?(_observer) ?? _observer - relay = signal - - // `observer` receives `interrupted` only as a result of the termination of - // `signal`, and would not be delivered anyway. So transforming - // `interrupted` to `completed` is unnecessary here. - upstream.observe { [weak box] event in - guard let box = box else { - // Just forward the event, since no one owns the box or IOW no demand - // for a cached latest value. - return observer.action(event) - } - - box.begin { storage in - storage.modify { value in - if let newValue = event.value { - value = newValue - } - } - observer.action(event) - } - } - } - - // Verify that an initial is sent. This is friendlier than deadlocking - // in the event that one isn't. - guard box.value != nil else { - fatalError("The producer promised to send at least one value. Received none.") - } - - _value = { box.value! } - signal = relay - - producer = SignalProducer { [box, signal = relay!] observer, lifetime in - box.withValue { value in - observer.send(value: value!) - lifetime += signal.observe(Signal.Observer(mappingInterruptedToCompleted: observer)) - } - } - } -} - -extension Property where Value: OptionalProtocol { - /// Initializes a composed property that first takes on `initial`, then each - /// value sent on a signal created by `producer`. - /// - /// - parameters: - /// - initial: Starting value for the property. - /// - values: A producer that will start immediately and send values to - /// the property. - public convenience init(initial: Value, then values: SignalProducer) { - self.init(initial: initial, then: values.map(Value.init(reconstructing:))) - } - - /// Initialize a composed property that first takes on `initial`, then each - /// value sent on `signal`. - /// - /// - parameters: - /// - initialValue: Starting value for the property. - /// - values: A signal that will send values to the property. - public convenience init(initial: Value, then values: Signal) { - self.init(initial: initial, then: SignalProducer(values)) - } -} - -/// A mutable property of type `Value` that allows observation of its changes. -/// -/// Instances of this class are thread-safe. -public final class MutableProperty: ComposableMutablePropertyProtocol { - private let token: Lifetime.Token - private let observer: Signal.Observer - private let box: PropertyBox - - /// The current value of the property. - /// - /// Setting this to a new value will notify all observers of `signal`, or - /// signals created using `producer`. - public var value: Value { - get { return box.value } - set { modify { $0 = newValue } } - } - - /// The lifetime of the property. - public let lifetime: Lifetime - - /// A signal that will send the property's changes over time, - /// then complete when the property has deinitialized. - public let signal: Signal - - /// A producer for Signals that will send the property's current value, - /// followed by all changes over time, then complete when the property has - /// deinitialized. - public var producer: SignalProducer { - return SignalProducer { [box, signal] observer, lifetime in - box.withValue { value in - observer.send(value: value) - if let d = signal.observe(Signal.Observer(mappingInterruptedToCompleted: observer)) { - lifetime.observeEnded(d.dispose) - } - } - } - } - - /// Initializes a mutable property that first takes on `initialValue` - /// - /// - parameters: - /// - initialValue: Starting value for the mutable property. - public init(_ initialValue: Value) { - (signal, observer) = Signal.pipe() - token = Lifetime.Token() - lifetime = Lifetime(token) - - /// Need a recursive lock around `value` to allow recursive access to - /// `value`. Note that recursive sets will still deadlock because the - /// underlying producer prevents sending recursive events. - box = PropertyBox(initialValue) - } - - /// Atomically replaces the contents of the variable. - /// - /// - parameters: - /// - newValue: New property value. - /// - /// - returns: The previous property value. - @discardableResult - public func swap(_ newValue: Value) -> Value { - return modify { value in - defer { value = newValue } - return value - } - } - - /// Atomically modifies the variable. - /// - /// - parameters: - /// - action: A closure that accepts an inout reference to the value. - /// - /// - returns: The result of the action. - @discardableResult - public func modify(_ action: (inout Value) throws -> Result) rethrows -> Result { - return try box.begin { storage in - defer { observer.send(value: storage.value) } - return try storage.modify(action) - } - } - - /// Atomically modifies the variable. - /// - /// - warning: The reference should not be escaped. - /// - /// - parameters: - /// - action: A closure that accepts a reference to the property storage. - /// - /// - returns: The result of the action. - @discardableResult - internal func begin(_ action: (PropertyStorage) throws -> Result) rethrows -> Result { - return try box.begin(action) - } - - /// Atomically performs an arbitrary action using the current value of the - /// variable. - /// - /// - parameters: - /// - action: A closure that accepts current property value. - /// - /// - returns: the result of the action. - @discardableResult - public func withValue(_ action: (Value) throws -> Result) rethrows -> Result { - return try box.withValue { try action($0) } - } - - deinit { - observer.sendCompleted() - } -} - -internal struct PropertyStorage { - private unowned let box: PropertyBox - - var value: Value { - return box._value - } - - func modify(_ action: (inout Value) throws -> Result) rethrows -> Result { - guard !box.isModifying else { fatalError("Nested modifications violate exclusivity of access.") } - box.isModifying = true - defer { box.isModifying = false } - return try action(&box._value) - } - - fileprivate init(_ box: PropertyBox) { - self.box = box - } -} - -/// A reference counted box which holds a recursive lock and a value storage. -/// -/// The requirement of a `Value?` storage from composed properties prevents further -/// implementation sharing with `MutableProperty`. -private final class PropertyBox { - - private let lock: Lock.PthreadLock - fileprivate var _value: Value - fileprivate var isModifying = false - - internal var value: Value { - lock.lock() - defer { lock.unlock() } - return _value - } - - init(_ value: Value) { - _value = value - lock = Lock.PthreadLock(recursive: true) - } - - func withValue(_ action: (Value) throws -> Result) rethrows -> Result { - lock.lock() - defer { lock.unlock() } - return try action(_value) - } - - func begin(_ action: (PropertyStorage) throws -> Result) rethrows -> Result { - lock.lock() - defer { lock.unlock() } - return try action(PropertyStorage(self)) - } -} diff --git a/Sample/Pods/ReactiveSwift/Sources/Reactive.swift b/Sample/Pods/ReactiveSwift/Sources/Reactive.swift deleted file mode 100644 index e48c02b4..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/Reactive.swift +++ /dev/null @@ -1,33 +0,0 @@ -/// Describes a provider of reactive extensions. -/// -/// - note: `ReactiveExtensionsProvider` does not indicate whether a type is -/// reactive. It is intended for extensions to types that are not owned -/// by the module in order to avoid name collisions and return type -/// ambiguities. -public protocol ReactiveExtensionsProvider: class {} - -extension ReactiveExtensionsProvider { - /// A proxy which hosts reactive extensions for `self`. - public var reactive: Reactive { - return Reactive(self) - } - - /// A proxy which hosts static reactive extensions for the type of `self`. - public static var reactive: Reactive.Type { - return Reactive.self - } -} - -/// A proxy which hosts reactive extensions of `Base`. -public struct Reactive { - /// The `Base` instance the extensions would be invoked with. - public let base: Base - - /// Construct a proxy - /// - /// - parameters: - /// - base: The object to be proxied. - fileprivate init(_ base: Base) { - self.base = base - } -} diff --git a/Sample/Pods/ReactiveSwift/Sources/ResultExtensions.swift b/Sample/Pods/ReactiveSwift/Sources/ResultExtensions.swift deleted file mode 100644 index c0f71433..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/ResultExtensions.swift +++ /dev/null @@ -1,13 +0,0 @@ -import Result - -/// Private alias of the free `materialize()` from `Result`. -/// -/// This exists because within a `Signal` or `SignalProducer` operator, -/// `materialize()` refers to the operator with that name. -/// Namespacing as `Result.materialize()` doesn't work either, -/// because it tries to resolve a static member on the _type_ -/// `Result`, rather than the free function in the _module_ -/// of the same name. -internal func materialize(_ f: () throws -> T) -> Result { - return materialize(try f()) -} diff --git a/Sample/Pods/ReactiveSwift/Sources/Scheduler.swift b/Sample/Pods/ReactiveSwift/Sources/Scheduler.swift deleted file mode 100644 index f8a26c5f..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/Scheduler.swift +++ /dev/null @@ -1,563 +0,0 @@ -// -// Scheduler.swift -// ReactiveSwift -// -// Created by Justin Spahr-Summers on 2014-06-02. -// Copyright (c) 2014 GitHub. All rights reserved. -// - -import Dispatch -import Foundation - -#if os(Linux) - import let CDispatch.NSEC_PER_SEC -#endif - -/// Represents a serial queue of work items. -public protocol Scheduler: class { - /// Enqueues an action on the scheduler. - /// - /// When the work is executed depends on the scheduler in use. - /// - /// - parameters: - /// - action: The action to be scheduled. - /// - /// - returns: Optional `Disposable` that can be used to cancel the work - /// before it begins. - @discardableResult - func schedule(_ action: @escaping () -> Void) -> Disposable? -} - -/// A particular kind of scheduler that supports enqueuing actions at future -/// dates. -public protocol DateScheduler: Scheduler { - /// The current date, as determined by this scheduler. - /// - /// This can be implemented to deterministically return a known date (e.g., - /// for testing purposes). - var currentDate: Date { get } - - /// Schedules an action for execution at or after the given date. - /// - /// - parameters: - /// - date: The start date. - /// - action: A closure of the action to be performed. - /// - /// - returns: Optional `Disposable` that can be used to cancel the work - /// before it begins. - @discardableResult - func schedule(after date: Date, action: @escaping () -> Void) -> Disposable? - - /// Schedules a recurring action at the given interval, beginning at the - /// given date. - /// - /// - parameters: - /// - date: The start date. - /// - interval: A repetition interval. - /// - leeway: Some delta for repetition. - /// - action: A closure of the action to be performed. - /// - /// - note: If you plan to specify an `interval` value greater than 200,000 - /// seconds, use `schedule(after:interval:leeway:action)` instead - /// and specify your own `leeway` value to avoid potential overflow. - /// - /// - returns: Optional `Disposable` that can be used to cancel the work - /// before it begins. - @discardableResult - func schedule(after date: Date, interval: DispatchTimeInterval, leeway: DispatchTimeInterval, action: @escaping () -> Void) -> Disposable? -} - -/// A scheduler that performs all work synchronously. -public final class ImmediateScheduler: Scheduler { - public init() {} - - /// Immediately calls passed in `action`. - /// - /// - parameters: - /// - action: A closure of the action to be performed. - /// - /// - returns: `nil`. - @discardableResult - public func schedule(_ action: @escaping () -> Void) -> Disposable? { - action() - return nil - } -} - -/// A scheduler that performs all work on the main queue, as soon as possible. -/// -/// If the caller is already running on the main queue when an action is -/// scheduled, it may be run synchronously. However, ordering between actions -/// will always be preserved. -public final class UIScheduler: Scheduler { - private static let dispatchSpecificKey = DispatchSpecificKey() - private static let dispatchSpecificValue = UInt8.max - private static var __once: () = { - DispatchQueue.main.setSpecific(key: UIScheduler.dispatchSpecificKey, - value: dispatchSpecificValue) - }() - - #if os(Linux) - private var queueLength: Atomic = Atomic(0) - #else - // `inout` references do not guarantee atomicity. Use `UnsafeMutablePointer` - // instead. - // - // https://lists.swift.org/pipermail/swift-users/Week-of-Mon-20161205/004147.html - private let queueLength: UnsafeMutablePointer = { - let memory = UnsafeMutablePointer.allocate(capacity: 1) - memory.initialize(to: 0) - return memory - }() - - deinit { - queueLength.deinitialize() - queueLength.deallocate(capacity: 1) - } - #endif - - /// Initializes `UIScheduler` - public init() { - /// This call is to ensure the main queue has been setup appropriately - /// for `UIScheduler`. It is only called once during the application - /// lifetime, since Swift has a `dispatch_once` like mechanism to - /// lazily initialize global variables and static variables. - _ = UIScheduler.__once - } - - /// Queues an action to be performed on main queue. If the action is called - /// on the main thread and no work is queued, no scheduling takes place and - /// the action is called instantly. - /// - /// - parameters: - /// - action: A closure of the action to be performed on the main thread. - /// - /// - returns: `Disposable` that can be used to cancel the work before it - /// begins. - @discardableResult - public func schedule(_ action: @escaping () -> Void) -> Disposable? { - let positionInQueue = enqueue() - - // If we're already running on the main queue, and there isn't work - // already enqueued, we can skip scheduling and just execute directly. - if positionInQueue == 1 && DispatchQueue.getSpecific(key: UIScheduler.dispatchSpecificKey) == UIScheduler.dispatchSpecificValue { - action() - dequeue() - return nil - } else { - let disposable = AnyDisposable() - - DispatchQueue.main.async { - defer { self.dequeue() } - guard !disposable.isDisposed else { return } - action() - } - - return disposable - } - } - - private func dequeue() { - #if os(Linux) - queueLength.modify { $0 -= 1 } - #else - OSAtomicDecrement32(queueLength) - #endif - } - - private func enqueue() -> Int32 { - #if os(Linux) - return queueLength.modify { value -> Int32 in - value += 1 - return value - } - #else - return OSAtomicIncrement32(queueLength) - #endif - } -} - -/// A scheduler backed by a serial GCD queue. -public final class QueueScheduler: DateScheduler { - /// A singleton `QueueScheduler` that always targets the main thread's GCD - /// queue. - /// - /// - note: Unlike `UIScheduler`, this scheduler supports scheduling for a - /// future date, and will always schedule asynchronously (even if - /// already running on the main thread). - public static let main = QueueScheduler(internalQueue: DispatchQueue.main) - - public var currentDate: Date { - return Date() - } - - public let queue: DispatchQueue - - internal init(internalQueue: DispatchQueue) { - queue = internalQueue - } - - /// Initializes a scheduler that will target the given queue with its - /// work. - /// - /// - note: Even if the queue is concurrent, all work items enqueued with - /// the `QueueScheduler` will be serial with respect to each other. - /// - /// - warning: Obsoleted in OS X 10.11 - @available(OSX, deprecated:10.10, obsoleted:10.11, message:"Use init(qos:name:targeting:) instead") - @available(iOS, deprecated:8.0, obsoleted:9.0, message:"Use init(qos:name:targeting:) instead.") - public convenience init(queue: DispatchQueue, name: String = "org.reactivecocoa.ReactiveSwift.QueueScheduler") { - self.init(internalQueue: DispatchQueue(label: name, target: queue)) - } - - /// Initializes a scheduler that creates a new serial queue with the - /// given quality of service class. - /// - /// - parameters: - /// - qos: Dispatch queue's QoS value. - /// - name: A name for the queue in the form of reverse domain. - /// - targeting: (Optional) The queue on which this scheduler's work is - /// targeted - @available(OSX 10.10, *) - public convenience init( - qos: DispatchQoS = .default, - name: String = "org.reactivecocoa.ReactiveSwift.QueueScheduler", - targeting targetQueue: DispatchQueue? = nil - ) { - self.init(internalQueue: DispatchQueue( - label: name, - qos: qos, - target: targetQueue - )) - } - - /// Schedules action for dispatch on internal queue - /// - /// - parameters: - /// - action: A closure of the action to be scheduled. - /// - /// - returns: `Disposable` that can be used to cancel the work before it - /// begins. - @discardableResult - public func schedule(_ action: @escaping () -> Void) -> Disposable? { - let d = AnyDisposable() - - queue.async { - if !d.isDisposed { - action() - } - } - - return d - } - - private func wallTime(with date: Date) -> DispatchWallTime { - let (seconds, frac) = modf(date.timeIntervalSince1970) - - let nsec: Double = frac * Double(NSEC_PER_SEC) - let walltime = timespec(tv_sec: Int(seconds), tv_nsec: Int(nsec)) - - return DispatchWallTime(timespec: walltime) - } - - /// Schedules an action for execution at or after the given date. - /// - /// - parameters: - /// - date: The start date. - /// - action: A closure of the action to be performed. - /// - /// - returns: Optional `Disposable` that can be used to cancel the work - /// before it begins. - @discardableResult - public func schedule(after date: Date, action: @escaping () -> Void) -> Disposable? { - let d = AnyDisposable() - - queue.asyncAfter(wallDeadline: wallTime(with: date)) { - if !d.isDisposed { - action() - } - } - - return d - } - - /// Schedules a recurring action at the given interval and beginning at the - /// given start date. A reasonable default timer interval leeway is - /// provided. - /// - /// - parameters: - /// - date: A date to schedule the first action for. - /// - interval: A repetition interval. - /// - action: Closure of the action to repeat. - /// - /// - note: If you plan to specify an `interval` value greater than 200,000 - /// seconds, use `schedule(after:interval:leeway:action)` instead - /// and specify your own `leeway` value to avoid potential overflow. - /// - /// - returns: Optional disposable that can be used to cancel the work - /// before it begins. - @discardableResult - public func schedule(after date: Date, interval: DispatchTimeInterval, action: @escaping () -> Void) -> Disposable? { - // Apple's "Power Efficiency Guide for Mac Apps" recommends a leeway of - // at least 10% of the timer interval. - return schedule(after: date, interval: interval, leeway: interval * 0.1, action: action) - } - - /// Schedules a recurring action at the given interval with provided leeway, - /// beginning at the given start time. - /// - /// - precondition: `interval` must be non-negative number. - /// - precondition: `leeway` must be non-negative number. - /// - /// - parameters: - /// - date: A date to schedule the first action for. - /// - interval: A repetition interval. - /// - leeway: Some delta for repetition interval. - /// - action: A closure of the action to repeat. - /// - /// - returns: Optional `Disposable` that can be used to cancel the work - /// before it begins. - @discardableResult - public func schedule(after date: Date, interval: DispatchTimeInterval, leeway: DispatchTimeInterval, action: @escaping () -> Void) -> Disposable? { - precondition(interval.timeInterval >= 0) - precondition(leeway.timeInterval >= 0) - - let timer = DispatchSource.makeTimerSource( - flags: DispatchSource.TimerFlags(rawValue: UInt(0)), - queue: queue - ) - timer.scheduleRepeating(wallDeadline: wallTime(with: date), - interval: interval, - leeway: leeway) - timer.setEventHandler(handler: action) - timer.resume() - - return AnyDisposable { - timer.cancel() - } - } -} - -/// A scheduler that implements virtualized time, for use in testing. -public final class TestScheduler: DateScheduler { - private final class ScheduledAction { - let date: Date - let action: () -> Void - - init(date: Date, action: @escaping () -> Void) { - self.date = date - self.action = action - } - - func less(_ rhs: ScheduledAction) -> Bool { - return date.compare(rhs.date) == .orderedAscending - } - } - - private let lock = NSRecursiveLock() - private var _currentDate: Date - - /// The virtual date that the scheduler is currently at. - public var currentDate: Date { - let d: Date - - lock.lock() - d = _currentDate - lock.unlock() - - return d - } - - private var scheduledActions: [ScheduledAction] = [] - - /// Initializes a TestScheduler with the given start date. - /// - /// - parameters: - /// - startDate: The start date of the scheduler. - public init(startDate: Date = Date(timeIntervalSinceReferenceDate: 0)) { - lock.name = "org.reactivecocoa.ReactiveSwift.TestScheduler" - _currentDate = startDate - } - - private func schedule(_ action: ScheduledAction) -> Disposable { - lock.lock() - scheduledActions.append(action) - scheduledActions.sort { $0.less($1) } - lock.unlock() - - return AnyDisposable { - self.lock.lock() - self.scheduledActions = self.scheduledActions.filter { $0 !== action } - self.lock.unlock() - } - } - - /// Enqueues an action on the scheduler. - /// - /// - note: The work is executed on `currentDate` as it is understood by the - /// scheduler. - /// - /// - parameters: - /// - action: An action that will be performed on scheduler's - /// `currentDate`. - /// - /// - returns: Optional `Disposable` that can be used to cancel the work - /// before it begins. - @discardableResult - public func schedule(_ action: @escaping () -> Void) -> Disposable? { - return schedule(ScheduledAction(date: currentDate, action: action)) - } - - /// Schedules an action for execution after some delay. - /// - /// - parameters: - /// - delay: A delay for execution. - /// - action: A closure of the action to perform. - /// - /// - returns: Optional disposable that can be used to cancel the work - /// before it begins. - @discardableResult - public func schedule(after delay: DispatchTimeInterval, action: @escaping () -> Void) -> Disposable? { - return schedule(after: currentDate.addingTimeInterval(delay), action: action) - } - - /// Schedules an action for execution at or after the given date. - /// - /// - parameters: - /// - date: A starting date. - /// - action: A closure of the action to perform. - /// - /// - returns: Optional disposable that can be used to cancel the work - /// before it begins. - @discardableResult - public func schedule(after date: Date, action: @escaping () -> Void) -> Disposable? { - return schedule(ScheduledAction(date: date, action: action)) - } - - /// Schedules a recurring action at the given interval, beginning at the - /// given start date. - /// - /// - precondition: `interval` must be non-negative. - /// - /// - parameters: - /// - date: A date to schedule the first action for. - /// - interval: A repetition interval. - /// - disposable: A disposable. - /// - action: A closure of the action to repeat. - /// - /// - note: If you plan to specify an `interval` value greater than 200,000 - /// seconds, use `schedule(after:interval:leeway:action)` instead - /// and specify your own `leeway` value to avoid potential overflow. - /// - /// - returns: Optional `Disposable` that can be used to cancel the work - /// before it begins. - private func schedule(after date: Date, interval: DispatchTimeInterval, disposable: SerialDisposable, action: @escaping () -> Void) { - precondition(interval.timeInterval >= 0) - - disposable.inner = schedule(after: date) { [unowned self] in - action() - self.schedule(after: date.addingTimeInterval(interval), interval: interval, disposable: disposable, action: action) - } - } - - /// Schedules a recurring action after given delay repeated at the given, - /// interval, beginning at the given interval counted from `currentDate`. - /// - /// - parameters: - /// - delay: A delay for action's dispatch. - /// - interval: A repetition interval. - /// - leeway: Some delta for repetition interval. - /// - action: A closure of the action to repeat. - /// - /// - returns: Optional `Disposable` that can be used to cancel the work - /// before it begins. - @discardableResult - public func schedule(after delay: DispatchTimeInterval, interval: DispatchTimeInterval, leeway: DispatchTimeInterval = .seconds(0), action: @escaping () -> Void) -> Disposable? { - return schedule(after: currentDate.addingTimeInterval(delay), interval: interval, leeway: leeway, action: action) - } - - /// Schedules a recurring action at the given interval with - /// provided leeway, beginning at the given start date. - /// - /// - parameters: - /// - date: A date to schedule the first action for. - /// - interval: A repetition interval. - /// - leeway: Some delta for repetition interval. - /// - action: A closure of the action to repeat. - /// - /// - returns: Optional `Disposable` that can be used to cancel the work - /// before it begins. - public func schedule(after date: Date, interval: DispatchTimeInterval, leeway: DispatchTimeInterval = .seconds(0), action: @escaping () -> Void) -> Disposable? { - let disposable = SerialDisposable() - schedule(after: date, interval: interval, disposable: disposable, action: action) - return disposable - } - - /// Advances the virtualized clock by an extremely tiny interval, dequeuing - /// and executing any actions along the way. - /// - /// This is intended to be used as a way to execute actions that have been - /// scheduled to run as soon as possible. - public func advance() { - advance(by: .nanoseconds(1)) - } - - /// Advances the virtualized clock by the given interval, dequeuing and - /// executing any actions along the way. - /// - /// - parameters: - /// - interval: Interval by which the current date will be advanced. - public func advance(by interval: DispatchTimeInterval) { - lock.lock() - advance(to: currentDate.addingTimeInterval(interval)) - lock.unlock() - } - - /// Advances the virtualized clock to the given future date, dequeuing and - /// executing any actions up until that point. - /// - /// - parameters: - /// - newDate: Future date to which the virtual clock will be advanced. - public func advance(to newDate: Date) { - lock.lock() - - assert(currentDate.compare(newDate) != .orderedDescending) - - while scheduledActions.count > 0 { - if newDate.compare(scheduledActions[0].date) == .orderedAscending { - break - } - - _currentDate = scheduledActions[0].date - - let scheduledAction = scheduledActions.remove(at: 0) - scheduledAction.action() - } - - _currentDate = newDate - - lock.unlock() - } - - /// Dequeues and executes all scheduled actions, leaving the scheduler's - /// date at `Date.distantFuture()`. - public func run() { - advance(to: Date.distantFuture) - } - - /// Rewinds the virtualized clock by the given interval. - /// This simulates that user changes device date. - /// - /// - parameters: - /// - interval: An interval by which the current date will be retreated. - public func rewind(by interval: DispatchTimeInterval) { - lock.lock() - - let newDate = currentDate.addingTimeInterval(-interval) - assert(currentDate.compare(newDate) != .orderedAscending) - _currentDate = newDate - - lock.unlock() - - } -} diff --git a/Sample/Pods/ReactiveSwift/Sources/Signal.swift b/Sample/Pods/ReactiveSwift/Sources/Signal.swift deleted file mode 100644 index 739bdb8e..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/Signal.swift +++ /dev/null @@ -1,2655 +0,0 @@ -import Foundation -import Result - -/// A push-driven stream that sends Events over time, parameterized by the type -/// of values being sent (`Value`) and the type of failure that can occur -/// (`Error`). If no failures should be possible, NoError can be specified for -/// `Error`. -/// -/// An observer of a Signal will see the exact same sequence of events as all -/// other observers. In other words, events will be sent to all observers at the -/// same time. -/// -/// Signals are generally used to represent event streams that are already “in -/// progress,” like notifications, user input, etc. To represent streams that -/// must first be _started_, see the SignalProducer type. -/// -/// A Signal is kept alive until either of the following happens: -/// 1. its input observer receives a terminating event; or -/// 2. it has no active observers, and is not being retained. -public final class Signal { - /// The `Signal` core which manages the event stream. - /// - /// A `Signal` is the externally retained shell of the `Signal` core. The separation - /// enables an explicit metric for the `Signal` self-disposal in case of having no - /// observer and no external retain. - /// - /// `Signal` ownership graph from the perspective of an operator. - /// Note that there is no circular strong reference in the graph. - /// ``` - /// ------------ -------------- -------- - /// | | | endObserve | | | - /// | | <~~ weak ~~~ | disposable | <== strong === | | - /// | | -------------- | | ... downstream(s) - /// | Upstream | ------------ | | - /// | Core | === strong ==> | Observer | === strong ==> | Core | - /// ------------ ===\\ ------------ -------- ===\\ - /// \\ ------------------ ^^ \\ - /// \\ | Signal (shell) | === strong ==// \\ - /// \\ ------------------ \\ - /// || strong || strong - /// vv vv - /// ------------------- ------------------- - /// | Other observers | | Other observers | - /// ------------------- ------------------- - /// ``` - private let core: Core - - private final class Core { - /// The disposable associated with the signal. - /// - /// Disposing of `disposable` is assumed to remove the generator - /// observer from its attached `Signal`, so that the generator observer - /// as the last +1 retain of the `Signal` core may deinitialize. - private let disposable: SerialDisposable - - /// The state of the signal. - private var state: State - - /// Used to ensure that all state accesses are serialized. - private let stateLock: Lock - - /// Used to ensure that events are serialized during delivery to observers. - private let sendLock: Lock - - fileprivate init(_ generator: (Observer) -> Disposable?) { - state = .alive(Bag(), hasDeinitialized: false) - - stateLock = Lock.make() - sendLock = Lock.make() - disposable = SerialDisposable() - - // The generator observer retains the `Signal` core. - disposable.inner = generator(Observer(action: self.send, interruptsOnDeinit: true)) - } - - private func send(_ event: Event) { - if event.isTerminating { - // Recursive events are disallowed for `value` events, but are permitted - // for termination events. Specifically: - // - // - `interrupted` - // It can inadvertently be sent by downstream consumers as part of the - // `SignalProducer` mechanics. - // - // - `completed` - // If a downstream consumer weakly references an object, invocation of - // such consumer may cause a race condition with its weak retain against - // the last strong release of the object. If the `Lifetime` of the - // object is being referenced by an upstream `take(during:)`, a - // signal recursion might occur. - // - // So we would treat termination events specially. If it happens to - // occur while the `sendLock` is acquired, the observer call-out and - // the disposal would be delegated to the current sender, or - // occasionally one of the senders waiting on `sendLock`. - - self.stateLock.lock() - - if case let .alive(observers, _) = state { - self.state = .terminating(observers, .init(event)) - self.stateLock.unlock() - } else { - self.stateLock.unlock() - } - - tryToCommitTermination() - } else { - self.sendLock.lock() - self.stateLock.lock() - - if case let .alive(observers, _) = self.state { - self.stateLock.unlock() - - for observer in observers { - observer.action(event) - } - } else { - self.stateLock.unlock() - } - - self.sendLock.unlock() - - // Check if the status has been bumped to `terminating` due to a - // terminal event being sent concurrently or recursively. - // - // The check is deliberately made outside of the `sendLock` so that it - // covers also any potential concurrent terminal event in one shot. - // - // Related PR: - // https://github.com/ReactiveCocoa/ReactiveSwift/pull/112 - // - // While calling `tryToCommitTermination` is sufficient, this is a fast - // path for the recurring value delivery. - // - // Note that this cannot be `try` since any concurrent observer bag - // manipulation might then cause the terminating state being missed. - stateLock.lock() - if case .terminating = state { - stateLock.unlock() - tryToCommitTermination() - } else { - stateLock.unlock() - } - } - } - - /// Observe the Signal by sending any future events to the given observer. - /// - /// - parameters: - /// - observer: An observer to forward the events to. - /// - /// - returns: A `Disposable` which can be used to disconnect the observer, - /// or `nil` if the signal has already terminated. - fileprivate func observe(_ observer: Observer) -> Disposable? { - var token: Bag.Token? - - stateLock.lock() - - if case let .alive(observers, hasDeinitialized) = state { - var newObservers = observers - token = newObservers.insert(observer) - self.state = .alive(newObservers, hasDeinitialized: hasDeinitialized) - } - - stateLock.unlock() - - if let token = token { - return AnyDisposable { [weak self] in - self?.removeObserver(with: token) - } - } else { - observer.sendInterrupted() - return nil - } - } - - /// Remove the observer associated with the given token. - /// - /// - parameters: - /// - token: The token of the observer to remove. - private func removeObserver(with token: Bag.Token) { - stateLock.lock() - - if case let .alive(observers, hasDeinitialized) = state { - var newObservers = observers - let observer = newObservers.remove(using: token) - self.state = .alive(newObservers, hasDeinitialized: hasDeinitialized) - - // Ensure `observer` is deallocated after `stateLock` is - // released to avoid deadlocks. - withExtendedLifetime(observer) { - // Start the disposal of the `Signal` core if the `Signal` has - // deinitialized and there is no active observer. - tryToDisposeSilentlyIfQualified(unlocking: stateLock) - } - } else { - stateLock.unlock() - } - } - - /// Try to commit the termination, or in other words transition the signal from a - /// terminating state to a terminated state. - /// - /// It fails gracefully if the signal is alive or has terminated. Calling this - /// method as a result of a false positive `terminating` check is permitted. - /// - /// - precondition: `stateLock` must not be acquired by the caller. - private func tryToCommitTermination() { - // Acquire `stateLock`. If the termination has still not yet been - // handled, take it over and bump the status to `terminated`. - stateLock.lock() - - if case let .terminating(observers, terminationKind) = state { - // Try to acquire the `sendLock`, and fail gracefully since the current - // lock holder would attempt to commit after it is done anyway. - if sendLock.try() { - state = .terminated - stateLock.unlock() - - if let event = terminationKind.materialize() { - for observer in observers { - observer.action(event) - } - } - - sendLock.unlock() - disposable.dispose() - return - } - } - - stateLock.unlock() - } - - /// Try to dispose of the signal silently if the `Signal` has deinitialized and - /// has no observer. - /// - /// It fails gracefully if the signal is terminating or terminated, has one or - /// more observers, or has not deinitialized. - /// - /// - precondition: `stateLock` must have been acquired by the caller. - /// - /// - parameters: - /// - stateLock: The `stateLock` acquired by the caller. - private func tryToDisposeSilentlyIfQualified(unlocking stateLock: Lock) { - assert(!stateLock.try(), "Calling `unconditionallyTerminate` without acquiring `stateLock`.") - - if case let .alive(observers, true) = state, observers.isEmpty { - // Transition to `terminated` directly only if there is no event delivery - // on going. - if sendLock.try() { - self.state = .terminated - stateLock.unlock() - sendLock.unlock() - - disposable.dispose() - return - } - - self.state = .terminating(Bag(), .silent) - stateLock.unlock() - - tryToCommitTermination() - return - } - - stateLock.unlock() - } - - /// Acknowledge the deinitialization of the `Signal`. - fileprivate func signalDidDeinitialize() { - stateLock.lock() - - // Mark the `Signal` has now deinitialized. - if case let .alive(observers, false) = state { - state = .alive(observers, hasDeinitialized: true) - } - - // Attempt to start the disposal of the signal if it has no active observer. - tryToDisposeSilentlyIfQualified(unlocking: stateLock) - } - - deinit { - disposable.dispose() - } - } - - /// Initialize a Signal that will immediately invoke the given generator, - /// then forward events sent to the given observer. - /// - /// - note: The disposable returned from the closure will be automatically - /// disposed if a terminating event is sent to the observer. The - /// Signal itself will remain alive until the observer is released. - /// - /// - parameters: - /// - generator: A closure that accepts an implicitly created observer - /// that will act as an event emitter for the signal. - public init(_ generator: (Observer) -> Disposable?) { - core = Core(generator) - } - - /// Observe the Signal by sending any future events to the given observer. - /// - /// - note: If the Signal has already terminated, the observer will - /// immediately receive an `interrupted` event. - /// - /// - parameters: - /// - observer: An observer to forward the events to. - /// - /// - returns: A `Disposable` which can be used to disconnect the observer, - /// or `nil` if the signal has already terminated. - @discardableResult - public func observe(_ observer: Observer) -> Disposable? { - return core.observe(observer) - } - - deinit { - core.signalDidDeinitialize() - } - - /// The state of a `Signal`. - /// - /// `SignalState` is guaranteed to be laid out as a tagged pointer by the Swift - /// compiler in the support targets of the Swift 3.0.1 ABI. - /// - /// The Swift compiler has also an optimization for enums with payloads that are - /// all reference counted, and at most one no-payload case. - private enum State { - // `TerminationKind` is constantly pointer-size large to keep `Signal.Core` - // allocation size independent of the actual `Value` and `Error` types. - enum TerminationKind { - case completed - case interrupted - case failed(Swift.Error) - case silent - - init(_ event: Event) { - switch event { - case .value: - fatalError() - case .interrupted: - self = .interrupted - case let .failed(error): - self = .failed(error) - case .completed: - self = .completed - } - } - - func materialize() -> Event? { - switch self { - case .completed: - return .completed - case .interrupted: - return .interrupted - case let .failed(error): - return .failed(error as! Error) - case .silent: - return nil - } - } - } - - /// The `Signal` is alive. - case alive(Bag, hasDeinitialized: Bool) - - /// The `Signal` has received a termination event, and is about to be - /// terminated. - case terminating(Bag, TerminationKind) - - /// The `Signal` has terminated. - case terminated - } -} - -extension Signal { - /// A Signal that never sends any events to its observers. - public static var never: Signal { - return self.init { observer in - // If `observer` deinitializes, the `Signal` would interrupt which is - // undesirable for `Signal.never`. - return AnyDisposable { _ = observer } - } - } - - /// A Signal that completes immediately without emitting any value. - public static var empty: Signal { - return self.init { observer in - observer.sendCompleted() - return nil - } - } - - /// Create a `Signal` that will be controlled by sending events to an - /// input observer. - /// - /// - note: The `Signal` will remain alive until a terminating event is sent - /// to the input observer, or until it has no observers and there - /// are no strong references to it. - /// - /// - parameters: - /// - disposable: An optional disposable to associate with the signal, and - /// to be disposed of when the signal terminates. - /// - /// - returns: A tuple of `output: Signal`, the output end of the pipe, - /// and `input: Observer`, the input end of the pipe. - public static func pipe(disposable: Disposable? = nil) -> (output: Signal, input: Observer) { - var observer: Observer! - let signal = self.init { innerObserver in - observer = innerObserver - return disposable - } - - return (signal, observer) - } -} - -public protocol SignalProtocol: class { - /// The type of values being sent by `self`. - associatedtype Value - - /// The type of error that can occur on `self`. - associatedtype Error: Swift.Error - - /// The materialized `self`. - var signal: Signal { get } -} - -extension Signal: SignalProtocol { - public var signal: Signal { - return self - } -} - -extension Signal: SignalProducerConvertible { - public var producer: SignalProducer { - return SignalProducer(self) - } -} - -extension Signal { - /// Observe `self` for all events being emitted. - /// - /// - note: If `self` has terminated, the closure would be invoked with an - /// `interrupted` event immediately. - /// - /// - parameters: - /// - action: A closure to be invoked with every event from `self`. - /// - /// - returns: A disposable to detach `action` from `self`. `nil` if `self` has - /// terminated. - @discardableResult - public func observe(_ action: @escaping Signal.Observer.Action) -> Disposable? { - return observe(Observer(action)) - } - - /// Observe `self` for all values being emitted, and if any, the failure. - /// - /// - parameters: - /// - action: A closure to be invoked with values from `self`, or the propagated - /// error should any `failed` event is emitted. - /// - /// - returns: A disposable to detach `action` from `self`. `nil` if `self` has - /// terminated. - @discardableResult - public func observeResult(_ action: @escaping (Result) -> Void) -> Disposable? { - return observe( - Observer( - value: { action(.success($0)) }, - failed: { action(.failure($0)) } - ) - ) - } - - /// Observe `self` for its completion. - /// - /// - parameters: - /// - action: A closure to be invoked when a `completed` event is emitted. - /// - /// - returns: A disposable to detach `action` from `self`. `nil` if `self` has - /// terminated. - @discardableResult - public func observeCompleted(_ action: @escaping () -> Void) -> Disposable? { - return observe(Observer(completed: action)) - } - - /// Observe `self` for its failure. - /// - /// - parameters: - /// - action: A closure to be invoked with the propagated error, should any - /// `failed` event is emitted. - /// - /// - returns: A disposable to detach `action` from `self`. `nil` if `self` has - /// terminated. - @discardableResult - public func observeFailed(_ action: @escaping (Error) -> Void) -> Disposable? { - return observe(Observer(failed: action)) - } - - /// Observe `self` for its interruption. - /// - /// - note: If `self` has terminated, the closure would be invoked immediately. - /// - /// - parameters: - /// - action: A closure to be invoked when an `interrupted` event is emitted. - /// - /// - returns: A disposable to detach `action` from `self`. `nil` if `self` has - /// terminated. - @discardableResult - public func observeInterrupted(_ action: @escaping () -> Void) -> Disposable? { - return observe(Observer(interrupted: action)) - } -} - -extension Signal where Error == NoError { - /// Observe `self` for all values being emitted. - /// - /// - parameters: - /// - action: A closure to be invoked with values from `self`. - /// - /// - returns: A disposable to detach `action` from `self`. `nil` if `self` has - /// terminated. - @discardableResult - public func observeValues(_ action: @escaping (Value) -> Void) -> Disposable? { - return observe(Observer(value: action)) - } -} - -extension Signal { - /// Map each value in the signal to a new value. - /// - /// - parameters: - /// - transform: A closure that accepts a value from the `value` event and - /// returns a new value. - /// - /// - returns: A signal that will send new values. - public func map(_ transform: @escaping (Value) -> U) -> Signal { - return Signal { observer in - return self.observe { event in - observer.action(event.map(transform)) - } - } - } - -#if swift(>=3.2) - /// Map each value in the signal to a new value by applying a key path. - /// - /// - parameters: - /// - keyPath: A key path relative to the signal's `Value` type. - /// - /// - returns: A signal that will send new values. - public func map(_ keyPath: KeyPath) -> Signal { - return map { $0[keyPath: keyPath] } - } -#endif - - /// Map errors in the signal to a new error. - /// - /// - parameters: - /// - transform: A closure that accepts current error object and returns - /// a new type of error object. - /// - /// - returns: A signal that will send new type of errors. - public func mapError(_ transform: @escaping (Error) -> F) -> Signal { - return Signal { observer in - return self.observe { event in - observer.action(event.mapError(transform)) - } - } - } - - /// Maps each value in the signal to a new value, lazily evaluating the - /// supplied transformation on the specified scheduler. - /// - /// - important: Unlike `map`, there is not a 1-1 mapping between incoming - /// values, and values sent on the returned signal. If - /// `scheduler` has not yet scheduled `transform` for - /// execution, then each new value will replace the last one as - /// the parameter to `transform` once it is finally executed. - /// - /// - parameters: - /// - transform: The closure used to obtain the returned value from this - /// signal's underlying value. - /// - /// - returns: A signal that sends values obtained using `transform` as this - /// signal sends values. - public func lazyMap(on scheduler: Scheduler, transform: @escaping (Value) -> U) -> Signal { - return flatMap(.latest) { value in - return SignalProducer({ transform(value) }) - .start(on: scheduler) - } - } - - /// Preserve only values which pass the given closure. - /// - /// - parameters: - /// - isIncluded: A closure to determine whether a value from `self` should be - /// included in the returned `Signal`. - /// - /// - returns: A signal that forwards the values passing the given closure. - public func filter(_ isIncluded: @escaping (Value) -> Bool) -> Signal { - return Signal { observer in - return self.observe { (event: Event) -> Void in - guard let value = event.value else { - observer.action(event) - return - } - - if isIncluded(value) { - observer.send(value: value) - } - } - } - } - - /// Applies `transform` to values from `signal` and forwards values with non `nil` results unwrapped. - /// - parameters: - /// - transform: A closure that accepts a value from the `value` event and - /// returns a new optional value. - /// - /// - returns: A signal that will send new values, that are non `nil` after the transformation. - public func filterMap(_ transform: @escaping (Value) -> U?) -> Signal { - return Signal { observer in - return self.observe { (event: Event) -> Void in - switch event { - case let .value(value): - if let mapped = transform(value) { - observer.send(value: mapped) - } - case let .failed(error): - observer.send(error: error) - case .completed: - observer.sendCompleted() - case .interrupted: - observer.sendInterrupted() - } - } - } - } -} - -extension Signal where Value: OptionalProtocol { - /// Unwrap non-`nil` values and forward them on the returned signal, `nil` - /// values are dropped. - /// - /// - returns: A signal that sends only non-nil values. - public func skipNil() -> Signal { - return filterMap { $0.optional } - } -} - -extension Signal { - /// Take up to `n` values from the signal and then complete. - /// - /// - precondition: `count` must be non-negative number. - /// - /// - parameters: - /// - count: A number of values to take from the signal. - /// - /// - returns: A signal that will yield the first `count` values from `self` - public func take(first count: Int) -> Signal { - precondition(count >= 0) - - return Signal { observer in - if count == 0 { - observer.sendCompleted() - return nil - } - - var taken = 0 - - return self.observe { event in - guard let value = event.value else { - observer.action(event) - return - } - - if taken < count { - taken += 1 - observer.send(value: value) - } - - if taken == count { - observer.sendCompleted() - } - } - } - } -} - -/// A reference type which wraps an array to auxiliate the collection of values -/// for `collect` operator. -private final class CollectState { - var values: [Value] = [] - - /// Collects a new value. - func append(_ value: Value) { - values.append(value) - } - - /// Check if there are any items remaining. - /// - /// - note: This method also checks if there weren't collected any values - /// and, in that case, it means an empty array should be sent as the - /// result of collect. - var isEmpty: Bool { - /// We use capacity being zero to determine if we haven't collected any - /// value since we're keeping the capacity of the array to avoid - /// unnecessary and expensive allocations). This also guarantees - /// retro-compatibility around the original `collect()` operator. - return values.isEmpty && values.capacity > 0 - } - - /// Removes all values previously collected if any. - func flush() { - // Minor optimization to avoid consecutive allocations. Can - // be useful for sequences of regular or similar size and to - // track if any value was ever collected. - values.removeAll(keepingCapacity: true) - } -} - -extension Signal { - /// Collect all values sent by the signal then forward them as a single - /// array and complete. - /// - /// - note: When `self` completes without collecting any value, it will send - /// an empty array of values. - /// - /// - returns: A signal that will yield an array of values when `self` - /// completes. - public func collect() -> Signal<[Value], Error> { - return collect { _,_ in false } - } - - /// Collect at most `count` values from `self`, forward them as a single - /// array and complete. - /// - /// - note: When the count is reached the array is sent and the signal - /// starts over yielding a new array of values. - /// - /// - note: When `self` completes any remaining values will be sent, the - /// last array may not have `count` values. Alternatively, if were - /// not collected any values will sent an empty array of values. - /// - /// - precondition: `count` should be greater than zero. - /// - public func collect(count: Int) -> Signal<[Value], Error> { - precondition(count > 0) - return collect { values in values.count == count } - } - - /// Collect values from `self`, and emit them if the predicate passes. - /// - /// When `self` completes any remaining values will be sent, regardless of the - /// collected values matching `shouldEmit` or not. - /// - /// If `self` completes without having emitted any value, an empty array would be - /// emitted, followed by the completion of the returned `Signal`. - /// - /// ```` - /// let (signal, observer) = Signal.pipe() - /// - /// signal - /// .collect { values in values.reduce(0, combine: +) == 8 } - /// .observeValues { print($0) } - /// - /// observer.send(value: 1) - /// observer.send(value: 3) - /// observer.send(value: 4) - /// observer.send(value: 7) - /// observer.send(value: 1) - /// observer.send(value: 5) - /// observer.send(value: 6) - /// observer.sendCompleted() - /// - /// // Output: - /// // [1, 3, 4] - /// // [7, 1] - /// // [5, 6] - /// ```` - /// - /// - parameters: - /// - shouldEmit: A closure to determine, when every time a new value is received, - /// whether the collected values should be emitted. The new value - /// is included in the collected values. - /// - /// - returns: A signal of arrays of values, as instructed by the `shouldEmit` - /// closure. - public func collect(_ shouldEmit: @escaping (_ collectedValues: [Value]) -> Bool) -> Signal<[Value], Error> { - return Signal<[Value], Error> { observer in - let state = CollectState() - - return self.observe { event in - switch event { - case let .value(value): - state.append(value) - if shouldEmit(state.values) { - observer.send(value: state.values) - state.flush() - } - case .completed: - if !state.isEmpty { - observer.send(value: state.values) - } - observer.sendCompleted() - case let .failed(error): - observer.send(error: error) - case .interrupted: - observer.sendInterrupted() - } - } - } - } - - /// Collect values from `self`, and emit them if the predicate passes. - /// - /// When `self` completes any remaining values will be sent, regardless of the - /// collected values matching `shouldEmit` or not. - /// - /// If `self` completes without having emitted any value, an empty array would be - /// emitted, followed by the completion of the returned `Signal`. - /// - /// ```` - /// let (signal, observer) = Signal.pipe() - /// - /// signal - /// .collect { values, value in value == 7 } - /// .observeValues { print($0) } - /// - /// observer.send(value: 1) - /// observer.send(value: 1) - /// observer.send(value: 7) - /// observer.send(value: 7) - /// observer.send(value: 5) - /// observer.send(value: 6) - /// observer.sendCompleted() - /// - /// // Output: - /// // [1, 1] - /// // [7] - /// // [7, 5, 6] - /// ```` - /// - /// - parameters: - /// - shouldEmit: A closure to determine, when every time a new value is received, - /// whether the collected values should be emitted. The new value - /// is **not** included in the collected values, and is included when - /// the next value is received. - /// - /// - returns: A signal of arrays of values, as instructed by the `shouldEmit` - /// closure. - public func collect(_ shouldEmit: @escaping (_ collected: [Value], _ latest: Value) -> Bool) -> Signal<[Value], Error> { - return Signal<[Value], Error> { observer in - let state = CollectState() - - return self.observe { event in - switch event { - case let .value(value): - if shouldEmit(state.values, value) { - observer.send(value: state.values) - state.flush() - } - state.append(value) - case .completed: - if !state.isEmpty { - observer.send(value: state.values) - } - observer.sendCompleted() - case let .failed(error): - observer.send(error: error) - case .interrupted: - observer.sendInterrupted() - } - } - } - } - - /// Forward all events onto the given scheduler, instead of whichever - /// scheduler they originally arrived upon. - /// - /// - parameters: - /// - scheduler: A scheduler to deliver events on. - /// - /// - returns: A signal that will yield `self` values on provided scheduler. - public func observe(on scheduler: Scheduler) -> Signal { - return Signal { observer in - return self.observe { event in - scheduler.schedule { - observer.action(event) - } - } - } - } -} - -extension Signal { - /// Combine the latest value of the receiver with the latest value from the - /// given signal. - /// - /// - note: The returned signal will not send a value until both inputs have - /// sent at least one value each. - /// - /// - note: If either signal is interrupted, the returned signal will also - /// be interrupted. - /// - /// - note: The returned signal will not complete until both inputs - /// complete. - /// - /// - parameters: - /// - otherSignal: A signal to combine `self`'s value with. - /// - /// - returns: A signal that will yield a tuple containing values of `self` - /// and given signal. - public func combineLatest(with other: Signal) -> Signal<(Value, U), Error> { - return Signal.combineLatest(self, other) - } - - /// Delay `value` and `completed` events by the given interval, forwarding - /// them on the given scheduler. - /// - /// - note: failed and `interrupted` events are always scheduled - /// immediately. - /// - /// - precondition: `interval` must be non-negative number. - /// - /// - parameters: - /// - interval: Interval to delay `value` and `completed` events by. - /// - scheduler: A scheduler to deliver delayed events on. - /// - /// - returns: A signal that will delay `value` and `completed` events and - /// will yield them on given scheduler. - public func delay(_ interval: TimeInterval, on scheduler: DateScheduler) -> Signal { - precondition(interval >= 0) - - return Signal { observer in - return self.observe { event in - switch event { - case .failed, .interrupted: - scheduler.schedule { - observer.action(event) - } - - case .value, .completed: - let date = scheduler.currentDate.addingTimeInterval(interval) - scheduler.schedule(after: date) { - observer.action(event) - } - } - } - } - } - - /// Skip first `count` number of values then act as usual. - /// - /// - precondition: `count` must be non-negative number. - /// - /// - parameters: - /// - count: A number of values to skip. - /// - /// - returns: A signal that will skip the first `count` values, then - /// forward everything afterward. - public func skip(first count: Int) -> Signal { - precondition(count >= 0) - - if count == 0 { - return self - } - - return Signal { observer in - var skipped = 0 - - return self.observe { event in - if case .value = event, skipped < count { - skipped += 1 - } else { - observer.action(event) - } - } - } - } - - /// Treat all Events from `self` as plain values, allowing them to be - /// manipulated just like any other value. - /// - /// In other words, this brings Events “into the monad”. - /// - /// - note: When a Completed or Failed event is received, the resulting - /// signal will send the Event itself and then complete. When an - /// Interrupted event is received, the resulting signal will send - /// the Event itself and then interrupt. - /// - /// - returns: A signal that sends events as its values. - public func materialize() -> Signal { - return Signal { observer in - return self.observe { event in - observer.send(value: event) - - switch event { - case .interrupted: - observer.sendInterrupted() - - case .completed, .failed: - observer.sendCompleted() - - case .value: - break - } - } - } - } -} - -extension Signal where Value: EventProtocol, Error == NoError { - /// Translate a signal of `Event` _values_ into a signal of those events - /// themselves. - /// - /// - returns: A signal that sends values carried by `self` events. - public func dematerialize() -> Signal { - return Signal { observer in - return self.observe { event in - switch event { - case let .value(innerEvent): - observer.action(innerEvent.event) - - case .failed: - fatalError("NoError is impossible to construct") - - case .completed: - observer.sendCompleted() - - case .interrupted: - observer.sendInterrupted() - } - } - } - } -} - -extension Signal { - /// Inject side effects to be performed upon the specified signal events. - /// - /// - parameters: - /// - event: A closure that accepts an event and is invoked on every - /// received event. - /// - failed: A closure that accepts error object and is invoked for - /// failed event. - /// - completed: A closure that is invoked for `completed` event. - /// - interrupted: A closure that is invoked for `interrupted` event. - /// - terminated: A closure that is invoked for any terminating event. - /// - disposed: A closure added as disposable when signal completes. - /// - value: A closure that accepts a value from `value` event. - /// - /// - returns: A signal with attached side-effects for given event cases. - public func on( - event: ((Event) -> Void)? = nil, - failed: ((Error) -> Void)? = nil, - completed: (() -> Void)? = nil, - interrupted: (() -> Void)? = nil, - terminated: (() -> Void)? = nil, - disposed: (() -> Void)? = nil, - value: ((Value) -> Void)? = nil - ) -> Signal { - return Signal { observer in - let disposable = CompositeDisposable() - - if let action = disposed { - disposable.add(action) - } - - disposable += self.observe { receivedEvent in - event?(receivedEvent) - - switch receivedEvent { - case let .value(v): - value?(v) - - case let .failed(error): - failed?(error) - - case .completed: - completed?() - - case .interrupted: - interrupted?() - } - - if receivedEvent.isTerminating { - terminated?() - } - - observer.action(receivedEvent) - } - - return disposable - } - } -} - -private struct SampleState { - var latestValue: Value? = nil - var isSignalCompleted: Bool = false - var isSamplerCompleted: Bool = false -} - -extension Signal { - /// Forward the latest value from `self` with the value from `sampler` as a - /// tuple, only when`sampler` sends a `value` event. - /// - /// - note: If `sampler` fires before a value has been observed on `self`, - /// nothing happens. - /// - /// - parameters: - /// - sampler: A signal that will trigger the delivery of `value` event - /// from `self`. - /// - /// - returns: A signal that will send values from `self` and `sampler`, - /// sampled (possibly multiple times) by `sampler`, then complete - /// once both input signals have completed, or interrupt if - /// either input signal is interrupted. - public func sample(with sampler: Signal) -> Signal<(Value, T), Error> { - return Signal<(Value, T), Error> { observer in - let state = Atomic(SampleState()) - let disposable = CompositeDisposable() - - disposable += self.observe { event in - switch event { - case let .value(value): - state.modify { - $0.latestValue = value - } - - case let .failed(error): - observer.send(error: error) - - case .completed: - let shouldComplete: Bool = state.modify { - $0.isSignalCompleted = true - return $0.isSamplerCompleted - } - - if shouldComplete { - observer.sendCompleted() - } - - case .interrupted: - observer.sendInterrupted() - } - } - - disposable += sampler.observe { event in - switch event { - case .value(let samplerValue): - if let value = state.value.latestValue { - observer.send(value: (value, samplerValue)) - } - - case .completed: - let shouldComplete: Bool = state.modify { - $0.isSamplerCompleted = true - return $0.isSignalCompleted - } - - if shouldComplete { - observer.sendCompleted() - } - - case .interrupted: - observer.sendInterrupted() - - case .failed: - break - } - } - - return disposable - } - } - - /// Forward the latest value from `self` whenever `sampler` sends a `value` - /// event. - /// - /// - note: If `sampler` fires before a value has been observed on `self`, - /// nothing happens. - /// - /// - parameters: - /// - sampler: A signal that will trigger the delivery of `value` event - /// from `self`. - /// - /// - returns: A signal that will send values from `self`, sampled (possibly - /// multiple times) by `sampler`, then complete once both input - /// signals have completed, or interrupt if either input signal - /// is interrupted. - public func sample(on sampler: Signal<(), NoError>) -> Signal { - return sample(with: sampler) - .map { $0.0 } - } - - /// Forward the latest value from `samplee` with the value from `self` as a - /// tuple, only when `self` sends a `value` event. - /// This is like a flipped version of `sample(with:)`, but `samplee`'s - /// terminal events are completely ignored. - /// - /// - note: If `self` fires before a value has been observed on `samplee`, - /// nothing happens. - /// - /// - parameters: - /// - samplee: A signal whose latest value is sampled by `self`. - /// - /// - returns: A signal that will send values from `self` and `samplee`, - /// sampled (possibly multiple times) by `self`, then terminate - /// once `self` has terminated. **`samplee`'s terminated events - /// are ignored**. - public func withLatest(from samplee: Signal) -> Signal<(Value, U), Error> { - return Signal<(Value, U), Error> { observer in - let state = Atomic(nil) - let disposable = CompositeDisposable() - - disposable += samplee.observeValues { value in - state.value = value - } - - disposable += self.observe { event in - switch event { - case let .value(value): - if let value2 = state.value { - observer.send(value: (value, value2)) - } - case .completed: - observer.sendCompleted() - case let .failed(error): - observer.send(error: error) - case .interrupted: - observer.sendInterrupted() - } - } - - return disposable - } - } - - /// Forward the latest value from `samplee` with the value from `self` as a - /// tuple, only when `self` sends a `value` event. - /// This is like a flipped version of `sample(with:)`, but `samplee`'s - /// terminal events are completely ignored. - /// - /// - note: If `self` fires before a value has been observed on `samplee`, - /// nothing happens. - /// - /// - parameters: - /// - samplee: A producer whose latest value is sampled by `self`. - /// - /// - returns: A signal that will send values from `self` and `samplee`, - /// sampled (possibly multiple times) by `self`, then terminate - /// once `self` has terminated. **`samplee`'s terminated events - /// are ignored**. - public func withLatest(from samplee: SignalProducer) -> Signal<(Value, U), Error> { - return Signal<(Value, U), Error> { observer in - let d = CompositeDisposable() - samplee.startWithSignal { signal, disposable in - d += disposable - d += self.withLatest(from: signal).observe(observer) - } - return d - } - } -} - -extension Signal { - /// Forwards events from `self` until `lifetime` ends, at which point the - /// returned signal will complete. - /// - /// - parameters: - /// - lifetime: A lifetime whose `ended` signal will cause the returned - /// signal to complete. - /// - /// - returns: A signal that will deliver events until `lifetime` ends. - public func take(during lifetime: Lifetime) -> Signal { - return Signal { observer in - let disposable = CompositeDisposable() - disposable += self.observe(observer) - disposable += lifetime.observeEnded(observer.sendCompleted) - return disposable - } - } - - /// Forward events from `self` until `trigger` sends a `value` or - /// `completed` event, at which point the returned signal will complete. - /// - /// - parameters: - /// - trigger: A signal whose `value` or `completed` events will stop the - /// delivery of `value` events from `self`. - /// - /// - returns: A signal that will deliver events until `trigger` sends - /// `value` or `completed` events. - public func take(until trigger: Signal<(), NoError>) -> Signal { - return Signal { observer in - let disposable = CompositeDisposable() - disposable += self.observe(observer) - - disposable += trigger.observe { event in - switch event { - case .value, .completed: - observer.sendCompleted() - - case .failed, .interrupted: - break - } - } - - return disposable - } - } - - /// Do not forward any values from `self` until `trigger` sends a `value` or - /// `completed` event, at which point the returned signal behaves exactly - /// like `signal`. - /// - /// - parameters: - /// - trigger: A signal whose `value` or `completed` events will start the - /// deliver of events on `self`. - /// - /// - returns: A signal that will deliver events once the `trigger` sends - /// `value` or `completed` events. - public func skip(until trigger: Signal<(), NoError>) -> Signal { - return Signal { observer in - let disposable = SerialDisposable() - - disposable.inner = trigger.observe { event in - switch event { - case .value, .completed: - disposable.inner = self.observe(observer) - - case .failed, .interrupted: - break - } - } - - return disposable - } - } - - /// Forward events from `self` with history: values of the returned signal - /// are a tuples whose first member is the previous value and whose second member - /// is the current value. `initial` is supplied as the first member when `self` - /// sends its first value. - /// - /// - parameters: - /// - initial: A value that will be combined with the first value sent by - /// `self`. - /// - /// - returns: A signal that sends tuples that contain previous and current - /// sent values of `self`. - public func combinePrevious(_ initial: Value) -> Signal<(Value, Value), Error> { - return combinePrevious(initial: initial) - } - - /// Forward events from `self` with history: values of the returned signal - /// are a tuples whose first member is the previous value and whose second member - /// is the current value. - /// - /// The returned `Signal` would not emit any tuple until it has received at least two - /// values. - /// - /// - returns: A signal that sends tuples that contain previous and current - /// sent values of `self`. - public func combinePrevious() -> Signal<(Value, Value), Error> { - return combinePrevious(initial: nil) - } - - /// Implementation detail of `combinePrevious`. A default argument of a `nil` initial - /// is deliberately avoided, since in the case of `Value` being an optional, the - /// `nil` literal would be materialized as `Optional.none` instead of `Value`, - /// thus changing the semantic. - private func combinePrevious(initial: Value?) -> Signal<(Value, Value), Error> { - return Signal<(Value, Value), Error> { observer in - var previous = initial - - return self.observe { event in - switch event { - case let .value(value): - if let previous = previous { - observer.send(value: (previous, value)) - } - previous = value - case .completed: - observer.sendCompleted() - case let .failed(error): - observer.send(error: error) - case .interrupted: - observer.sendInterrupted() - } - } - } - } - - /// Combine all values from `self`, and forward only the final accumuated result. - /// - /// See `scan(_:_:)` if the resulting producer needs to forward also the partial - /// results. - /// - /// - parameters: - /// - initialResult: The value to use as the initial accumulating value. - /// - nextPartialResult: A closure that combines the accumulating value and the - /// latest value from `self`. The result would be used in the - /// next call of `nextPartialResult`, or emit to the returned - /// `Signal` when `self` completes. - /// - /// - returns: A signal that sends the final result as `self` completes. - public func reduce(_ initialResult: U, _ nextPartialResult: @escaping (U, Value) -> U) -> Signal { - return self.reduce(into: initialResult) { accumulator, value in - accumulator = nextPartialResult(accumulator, value) - } - } - - /// Combine all values from `self`, and forward only the final accumuated result. - /// - /// See `scan(into:_:)` if the resulting producer needs to forward also the partial - /// results. - /// - /// - parameters: - /// - initialResult: The value to use as the initial accumulating value. - /// - nextPartialResult: A closure that combines the accumulating value and the - /// latest value from `self`. The result would be used in the - /// next call of `nextPartialResult`, or emit to the returned - /// `Signal` when `self` completes. - /// - /// - returns: A signal that sends the final result as `self` completes. - public func reduce(into initialResult: U, _ nextPartialResult: @escaping (inout U, Value) -> Void) -> Signal { - // We need to handle the special case in which `signal` sends no values. - // We'll do that by sending `initial` on the output signal (before - // taking the last value). - let (scannedSignalWithInitialValue, outputSignalObserver) = Signal.pipe() - let outputSignal = scannedSignalWithInitialValue.take(last: 1) - - // Now that we've got takeLast() listening to the piped signal, send - - // that initial value. - outputSignalObserver.send(value: initialResult) - - // Pipe the scanned input signal into the output signal. - self.scan(into: initialResult, nextPartialResult) - .observe(outputSignalObserver) - - return outputSignal - } - - /// Combine all values from `self`, and forward the partial results and the final - /// result. - /// - /// See `reduce(_:_:)` if the resulting producer needs to forward only the final - /// result. - /// - /// - parameters: - /// - initialResult: The value to use as the initial accumulating value. - /// - nextPartialResult: A closure that combines the accumulating value and the - /// latest value from `self`. The result would be forwarded, - /// and would be used in the next call of `nextPartialResult`. - /// - /// - returns: A signal that sends the partial results of the accumuation, and the - /// final result as `self` completes. - public func scan(_ initialResult: U, _ nextPartialResult: @escaping (U, Value) -> U) -> Signal { - return self.scan(into: initialResult) { accumulator, value in - accumulator = nextPartialResult(accumulator, value) - } - } - - /// Combine all values from `self`, and forward the partial results and the final - /// result. - /// - /// See `reduce(into:_:)` if the resulting producer needs to forward only the final - /// result. - /// - /// - parameters: - /// - initialResult: The value to use as the initial accumulating value. - /// - nextPartialResult: A closure that combines the accumulating value and the - /// latest value from `self`. The result would be forwarded, - /// and would be used in the next call of `nextPartialResult`. - /// - /// - returns: A signal that sends the partial results of the accumuation, and the - /// final result as `self` completes. - public func scan(into initialResult: U, _ nextPartialResult: @escaping (inout U, Value) -> Void) -> Signal { - return Signal { observer in - var accumulator = initialResult - - return self.observe { event in - observer.action(event.map { value in - nextPartialResult(&accumulator, value) - return accumulator - }) - } - } - } -} - -extension Signal where Value: Equatable { - /// Forward only values from `self` that are not equal to its immediately preceding - /// value. - /// - /// - note: The first value is always forwarded. - /// - /// - returns: A signal which conditionally forwards values from `self`. - public func skipRepeats() -> Signal { - return skipRepeats(==) - } -} - -extension Signal { - /// Forward only values from `self` that are not considered equivalent to its - /// immediately preceding value. - /// - /// - note: The first value is always forwarded. - /// - /// - parameters: - /// - isEquivalent: A closure to determine whether two values are equivalent. - /// - /// - returns: A signal which conditionally forwards values from `self`. - public func skipRepeats(_ isEquivalent: @escaping (Value, Value) -> Bool) -> Signal { - return self - .scan((nil, false)) { (accumulated: (Value?, Bool), next: Value) -> (value: Value?, repeated: Bool) in - switch accumulated.0 { - case nil: - return (next, false) - case let prev? where isEquivalent(prev, next): - return (prev, true) - case _?: - return (Optional(next), false) - } - } - .filter { !$0.repeated } - .filterMap { $0.value } - } - - /// Do not forward any value from `self` until `shouldContinue` returns `false`, at - /// which point the returned signal starts to forward values from `self`, including - /// the one leading to the toggling. - /// - /// - parameters: - /// - shouldContinue: A closure to determine whether the skipping should continue. - /// - /// - returns: A signal which conditionally forwards values from `self`. - public func skip(while shouldContinue: @escaping (Value) -> Bool) -> Signal { - return Signal { observer in - var isSkipping = true - - return self.observe { event in - switch event { - case let .value(value): - isSkipping = isSkipping && shouldContinue(value) - if !isSkipping { - fallthrough - } - - case .failed, .completed, .interrupted: - observer.action(event) - } - } - } - } - - /// Forward events from `self` until `replacement` begins sending events. - /// - /// - parameters: - /// - replacement: A signal to wait to wait for values from and start - /// sending them as a replacement to `self`'s values. - /// - /// - returns: A signal which passes through `value`, failed, and - /// `interrupted` events from `self` until `replacement` sends - /// an event, at which point the returned signal will send that - /// event and switch to passing through events from `replacement` - /// instead, regardless of whether `self` has sent events - /// already. - public func take(untilReplacement signal: Signal) -> Signal { - return Signal { observer in - let disposable = CompositeDisposable() - - let signalDisposable = self.observe { event in - switch event { - case .completed: - break - - case .value, .failed, .interrupted: - observer.action(event) - } - } - - disposable += signalDisposable - disposable += signal.observe { event in - signalDisposable?.dispose() - observer.action(event) - } - - return disposable - } - } - - /// Wait until `self` completes and then forward the final `count` values - /// on the returned signal. - /// - /// - parameters: - /// - count: Number of last events to send after `self` completes. - /// - /// - returns: A signal that receives up to `count` values from `self` - /// after `self` completes. - public func take(last count: Int) -> Signal { - return Signal { observer in - var buffer: [Value] = [] - buffer.reserveCapacity(count) - - return self.observe { event in - switch event { - case let .value(value): - // To avoid exceeding the reserved capacity of the buffer, - // we remove then add. Remove elements until we have room to - // add one more. - while (buffer.count + 1) > count { - buffer.remove(at: 0) - } - - buffer.append(value) - case let .failed(error): - observer.send(error: error) - case .completed: - buffer.forEach(observer.send(value:)) - - observer.sendCompleted() - case .interrupted: - observer.sendInterrupted() - } - } - } - } - - /// Forward any values from `self` until `shouldContinue` returns `false`, at which - /// point the returned signal would complete. - /// - /// - parameters: - /// - shouldContinue: A closure to determine whether the forwarding of values should - /// continue. - /// - /// - returns: A signal which conditionally forwards values from `self`. - public func take(while shouldContinue: @escaping (Value) -> Bool) -> Signal { - return Signal { observer in - return self.observe { event in - if let value = event.value, !shouldContinue(value) { - observer.sendCompleted() - } else { - observer.action(event) - } - } - } - } -} - -extension Signal { - /// Zip elements of two signals into pairs. The elements of any Nth pair - /// are the Nth elements of the two input signals. - /// - /// - parameters: - /// - otherSignal: A signal to zip values with. - /// - /// - returns: A signal that sends tuples of `self` and `otherSignal`. - public func zip(with other: Signal) -> Signal<(Value, U), Error> { - return Signal.zip(self, other) - } - - /// Forward the latest value on `scheduler` after at least `interval` - /// seconds have passed since *the returned signal* last sent a value. - /// - /// If `self` always sends values more frequently than `interval` seconds, - /// then the returned signal will send a value every `interval` seconds. - /// - /// To measure from when `self` last sent a value, see `debounce`. - /// - /// - seealso: `debounce` - /// - /// - note: If multiple values are received before the interval has elapsed, - /// the latest value is the one that will be passed on. - /// - /// - note: If `self` terminates while a value is being throttled, that - /// value will be discarded and the returned signal will terminate - /// immediately. - /// - /// - note: If the device time changed backwards before previous date while - /// a value is being throttled, and if there is a new value sent, - /// the new value will be passed anyway. - /// - /// - precondition: `interval` must be non-negative number. - /// - /// - parameters: - /// - interval: Number of seconds to wait between sent values. - /// - scheduler: A scheduler to deliver events on. - /// - /// - returns: A signal that sends values at least `interval` seconds - /// appart on a given scheduler. - public func throttle(_ interval: TimeInterval, on scheduler: DateScheduler) -> Signal { - precondition(interval >= 0) - - return Signal { observer in - let state: Atomic> = Atomic(ThrottleState()) - let schedulerDisposable = SerialDisposable() - - let disposable = CompositeDisposable() - disposable += schedulerDisposable - - disposable += self.observe { event in - guard let value = event.value else { - schedulerDisposable.inner = scheduler.schedule { - observer.action(event) - } - return - } - - var scheduleDate: Date! - state.modify { - $0.pendingValue = value - - let proposedScheduleDate: Date - if let previousDate = $0.previousDate, previousDate.compare(scheduler.currentDate) != .orderedDescending { - proposedScheduleDate = previousDate.addingTimeInterval(interval) - } else { - proposedScheduleDate = scheduler.currentDate - } - - switch proposedScheduleDate.compare(scheduler.currentDate) { - case .orderedAscending: - scheduleDate = scheduler.currentDate - - case .orderedSame: fallthrough - case .orderedDescending: - scheduleDate = proposedScheduleDate - } - } - - schedulerDisposable.inner = scheduler.schedule(after: scheduleDate) { - let pendingValue: Value? = state.modify { state in - defer { - if state.pendingValue != nil { - state.pendingValue = nil - state.previousDate = scheduleDate - } - } - return state.pendingValue - } - - if let pendingValue = pendingValue { - observer.send(value: pendingValue) - } - } - } - - return disposable - } - } - - /// Conditionally throttles values sent on the receiver whenever - /// `shouldThrottle` is true, forwarding values on the given scheduler. - /// - /// - note: While `shouldThrottle` remains false, values are forwarded on the - /// given scheduler. If multiple values are received while - /// `shouldThrottle` is true, the latest value is the one that will - /// be passed on. - /// - /// - note: If the input signal terminates while a value is being throttled, - /// that value will be discarded and the returned signal will - /// terminate immediately. - /// - /// - note: If `shouldThrottle` completes before the receiver, and its last - /// value is `true`, the returned signal will remain in the throttled - /// state, emitting no further values until it terminates. - /// - /// - parameters: - /// - shouldThrottle: A boolean property that controls whether values - /// should be throttled. - /// - scheduler: A scheduler to deliver events on. - /// - /// - returns: A signal that sends values only while `shouldThrottle` is false. - public func throttle(while shouldThrottle: P, on scheduler: Scheduler) -> Signal - where P.Value == Bool - { - return Signal { observer in - let initial: ThrottleWhileState = .resumed - let state = Atomic(initial) - let schedulerDisposable = SerialDisposable() - - let disposable = CompositeDisposable() - disposable += schedulerDisposable - - disposable += shouldThrottle.producer - .skipRepeats() - .startWithValues { shouldThrottle in - let valueToSend = state.modify { state -> Value? in - guard !state.isTerminated else { return nil } - - if shouldThrottle { - state = .throttled(nil) - } else { - defer { state = .resumed } - - if case let .throttled(value?) = state { - return value - } - } - - return nil - } - - if let value = valueToSend { - schedulerDisposable.inner = scheduler.schedule { - observer.send(value: value) - } - } - } - - disposable += self.observe { event in - let eventToSend = state.modify { state -> Event? in - switch event { - case let .value(value): - switch state { - case .throttled: - state = .throttled(value) - return nil - case .resumed: - return event - case .terminated: - return nil - } - - case .completed, .interrupted, .failed: - state = .terminated - return event - } - } - - if let event = eventToSend { - schedulerDisposable.inner = scheduler.schedule { - observer.action(event) - } - } - } - - return disposable - } - } - - /// Forward the latest value on `scheduler` after at least `interval` - /// seconds have passed since `self` last sent a value. - /// - /// If `self` always sends values more frequently than `interval` seconds, - /// then the returned signal will never send any values. - /// - /// To measure from when the *returned signal* last sent a value, see - /// `throttle`. - /// - /// - seealso: `throttle` - /// - /// - note: If multiple values are received before the interval has elapsed, - /// the latest value is the one that will be passed on. - /// - /// - note: If the input signal terminates while a value is being debounced, - /// that value will be discarded and the returned signal will - /// terminate immediately. - /// - /// - precondition: `interval` must be non-negative number. - /// - /// - parameters: - /// - interval: A number of seconds to wait before sending a value. - /// - scheduler: A scheduler to send values on. - /// - /// - returns: A signal that sends values that are sent from `self` at least - /// `interval` seconds apart. - public func debounce(_ interval: TimeInterval, on scheduler: DateScheduler) -> Signal { - precondition(interval >= 0) - - let d = SerialDisposable() - - return Signal { observer in - return self.observe { event in - switch event { - case let .value(value): - let date = scheduler.currentDate.addingTimeInterval(interval) - d.inner = scheduler.schedule(after: date) { - observer.send(value: value) - } - - case .completed, .failed, .interrupted: - d.inner = scheduler.schedule { - observer.action(event) - } - } - } - } - } -} - -extension Signal { - /// Forward only those values from `self` that have unique identities across - /// the set of all values that have been seen. - /// - /// - note: This causes the identities to be retained to check for - /// uniqueness. - /// - /// - parameters: - /// - transform: A closure that accepts a value and returns identity - /// value. - /// - /// - returns: A signal that sends unique values during its lifetime. - public func uniqueValues(_ transform: @escaping (Value) -> Identity) -> Signal { - return Signal { observer in - var seenValues: Set = [] - - return self - .observe { event in - switch event { - case let .value(value): - let identity = transform(value) - let (inserted, _) = seenValues.insert(identity) - if inserted { - fallthrough - } - - case .failed, .completed, .interrupted: - observer.action(event) - } - } - } - } -} - -extension Signal where Value: Hashable { - /// Forward only those values from `self` that are unique across the set of - /// all values that have been seen. - /// - /// - note: This causes the values to be retained to check for uniqueness. - /// Providing a function that returns a unique value for each sent - /// value can help you reduce the memory footprint. - /// - /// - returns: A signal that sends unique values during its lifetime. - public func uniqueValues() -> Signal { - return uniqueValues { $0 } - } -} - -private struct ThrottleState { - var previousDate: Date? = nil - var pendingValue: Value? = nil -} - -private enum ThrottleWhileState { - case resumed - case throttled(Value?) - case terminated - - var isTerminated: Bool { - switch self { - case .terminated: - return true - case .resumed, .throttled: - return false - } - } -} - -private protocol SignalAggregateStrategy: class { - /// Update the latest value of the signal at `position` to be `value`. - /// - /// - parameters: - /// - value: The latest value emitted by the signal at `position`. - /// - position: The position of the signal. - func update(_ value: Any, at position: Int) - - /// Record the completion of the signal at `position`. - /// - /// - parameters: - /// - position: The position of the signal. - func complete(at position: Int) - - init(count: Int, action: @escaping (AggregateStrategyEvent) -> Void) -} - -private enum AggregateStrategyEvent { - case value(ContiguousArray) - case completed -} - -extension Signal { - // Threading of `CombineLatestStrategy` and `ZipStrategy`. - // - // The threading models of these strategies mirror that of `Signal.Core` to allow - // recursive termial event from the upstreams that is triggered by the combined - // values. - // - // The strategies do not unique the delivery of `completed`, since `Signal` already - // guarantees that no event would ever be delivered after a terminal event. - - private final class CombineLatestStrategy: SignalAggregateStrategy { - private enum Placeholder { - case none - } - - var values: ContiguousArray - - private var _haveAllSentInitial: Bool - private var haveAllSentInitial: Bool { - get { - if _haveAllSentInitial { - return true - } - - _haveAllSentInitial = values.reduce(true) { $0 && !($1 is Placeholder) } - return _haveAllSentInitial - } - } - - private let count: Int - private let lock: Lock - - private let completion: Atomic - private let action: (AggregateStrategyEvent) -> Void - - func update(_ value: Any, at position: Int) { - lock.lock() - values[position] = value - - if haveAllSentInitial { - action(.value(values)) - } - - lock.unlock() - - if completion.value == self.count, lock.try() { - action(.completed) - lock.unlock() - } - } - - func complete(at position: Int) { - let count: Int = completion.modify { count in - count += 1 - return count - } - - if count == self.count, lock.try() { - action(.completed) - lock.unlock() - } - } - - init(count: Int, action: @escaping (AggregateStrategyEvent) -> Void) { - self.count = count - self.lock = Lock.make() - self.values = ContiguousArray(repeating: Placeholder.none, count: count) - self._haveAllSentInitial = false - self.completion = Atomic(0) - self.action = action - } - } - - private final class ZipStrategy: SignalAggregateStrategy { - private let stateLock: Lock - private let sendLock: Lock - - private var values: ContiguousArray<[Any]> - private var canEmit: Bool { - return values.reduce(true) { $0 && !$1.isEmpty } - } - - private var hasConcurrentlyCompleted: Bool - private var isCompleted: ContiguousArray - - private var hasCompletedAndEmptiedSignal: Bool { - return Swift.zip(values, isCompleted).contains(where: { $0.0.isEmpty && $0.1 }) - } - - private var areAllCompleted: Bool { - return isCompleted.reduce(true) { $0 && $1 } - } - - private let action: (AggregateStrategyEvent) -> Void - - func update(_ value: Any, at position: Int) { - stateLock.lock() - values[position].append(value) - - if canEmit { - var buffer = ContiguousArray() - buffer.reserveCapacity(values.count) - - for index in values.startIndex ..< values.endIndex { - buffer.append(values[index].removeFirst()) - } - - let shouldComplete = areAllCompleted || hasCompletedAndEmptiedSignal - sendLock.lock() - stateLock.unlock() - - action(.value(buffer)) - - if shouldComplete { - action(.completed) - } - - sendLock.unlock() - - stateLock.lock() - - if hasConcurrentlyCompleted { - sendLock.lock() - action(.completed) - sendLock.unlock() - } - } - - stateLock.unlock() - } - - func complete(at position: Int) { - stateLock.lock() - isCompleted[position] = true - - if hasConcurrentlyCompleted || areAllCompleted || hasCompletedAndEmptiedSignal { - if sendLock.try() { - stateLock.unlock() - - action(.completed) - sendLock.unlock() - return - } - - hasConcurrentlyCompleted = true - } - - stateLock.unlock() - } - - init(count: Int, action: @escaping (AggregateStrategyEvent) -> Void) { - self.values = ContiguousArray(repeating: [], count: count) - self.hasConcurrentlyCompleted = false - self.isCompleted = ContiguousArray(repeating: false, count: count) - self.action = action - self.sendLock = Lock.make() - self.stateLock = Lock.make() - } - } - - private final class AggregateBuilder { - fileprivate var startHandlers: [(_ index: Int, _ strategy: Strategy, _ action: @escaping (Signal.Event) -> Void) -> Disposable?] - - init() { - self.startHandlers = [] - } - - @discardableResult - func add(_ signal: Signal) -> Self { - startHandlers.append { index, strategy, action in - return signal.observe { event in - switch event { - case let .value(value): - strategy.update(value, at: index) - - case .completed: - strategy.complete(at: index) - - case .interrupted: - action(.interrupted) - - case let .failed(error): - action(.failed(error)) - } - } - } - - return self - } - } - - private convenience init(_ builder: AggregateBuilder, _ transform: @escaping (ContiguousArray) -> Value) { - self.init { observer in - let disposables = CompositeDisposable() - let strategy = Strategy(count: builder.startHandlers.count) { event in - switch event { - case let .value(value): - observer.send(value: transform(value)) - case .completed: - observer.sendCompleted() - } - } - - for (index, action) in builder.startHandlers.enumerated() where !disposables.isDisposed { - disposables += action(index, strategy) { observer.action($0.map { _ in fatalError() }) } - } - - return disposables - } - } - - private convenience init(_ strategy: Strategy.Type, _ signals: S) where Value == [U], S.Iterator.Element == Signal { - self.init(signals.reduce(AggregateBuilder()) { $0.add($1) }) { $0.map { $0 as! U } } - } - - private convenience init(_ strategy: Strategy.Type, _ a: Signal, _ b: Signal) where Value == (A, B) { - self.init(AggregateBuilder().add(a).add(b)) { - return ($0[0] as! A, $0[1] as! B) - } - } - - private convenience init(_ strategy: Strategy.Type, _ a: Signal, _ b: Signal, _ c: Signal) where Value == (A, B, C) { - self.init(AggregateBuilder().add(a).add(b).add(c)) { - return ($0[0] as! A, $0[1] as! B, $0[2] as! C) - } - } - - private convenience init(_ strategy: Strategy.Type, _ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal) where Value == (A, B, C, D) { - self.init(AggregateBuilder().add(a).add(b).add(c).add(d)) { - return ($0[0] as! A, $0[1] as! B, $0[2] as! C, $0[3] as! D) - } - } - - private convenience init(_ strategy: Strategy.Type, _ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal) where Value == (A, B, C, D, E) { - self.init(AggregateBuilder().add(a).add(b).add(c).add(d).add(e)) { - return ($0[0] as! A, $0[1] as! B, $0[2] as! C, $0[3] as! D, $0[4] as! E) - } - } - - private convenience init(_ strategy: Strategy.Type, _ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal) where Value == (A, B, C, D, E, F) { - self.init(AggregateBuilder().add(a).add(b).add(c).add(d).add(e).add(f)) { - return ($0[0] as! A, $0[1] as! B, $0[2] as! C, $0[3] as! D, $0[4] as! E, $0[5] as! F) - } - } - - private convenience init(_ strategy: Strategy.Type, _ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal) where Value == (A, B, C, D, E, F, G) { - self.init(AggregateBuilder().add(a).add(b).add(c).add(d).add(e).add(f).add(g)) { - return ($0[0] as! A, $0[1] as! B, $0[2] as! C, $0[3] as! D, $0[4] as! E, $0[5] as! F, $0[6] as! G) - } - } - - private convenience init(_ strategy: Strategy.Type, _ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal, _ h: Signal) where Value == (A, B, C, D, E, F, G, H) { - self.init(AggregateBuilder().add(a).add(b).add(c).add(d).add(e).add(f).add(g).add(h)) { - return ($0[0] as! A, $0[1] as! B, $0[2] as! C, $0[3] as! D, $0[4] as! E, $0[5] as! F, $0[6] as! G, $0[7] as! H) - } - } - - private convenience init(_ strategy: Strategy.Type, _ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal, _ h: Signal, _ i: Signal) where Value == (A, B, C, D, E, F, G, H, I) { - self.init(AggregateBuilder().add(a).add(b).add(c).add(d).add(e).add(f).add(g).add(h).add(i)) { - return ($0[0] as! A, $0[1] as! B, $0[2] as! C, $0[3] as! D, $0[4] as! E, $0[5] as! F, $0[6] as! G, $0[7] as! H, $0[8] as! I) - } - } - - private convenience init(_ strategy: Strategy.Type, _ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal, _ h: Signal, _ i: Signal, _ j: Signal) where Value == (A, B, C, D, E, F, G, H, I, J) { - self.init(AggregateBuilder().add(a).add(b).add(c).add(d).add(e).add(f).add(g).add(h).add(i).add(j)) { - return ($0[0] as! A, $0[1] as! B, $0[2] as! C, $0[3] as! D, $0[4] as! E, $0[5] as! F, $0[6] as! G, $0[7] as! H, $0[8] as! I, $0[9] as! J) - } - } - - /// Combines the values of all the given signals, in the manner described by - /// `combineLatest(with:)`. - public static func combineLatest(_ a: Signal, _ b: Signal) -> Signal<(Value, B), Error> { - return .init(CombineLatestStrategy.self, a, b) - } - - /// Combines the values of all the given signals, in the manner described by - /// `combineLatest(with:)`. - public static func combineLatest(_ a: Signal, _ b: Signal, _ c: Signal) -> Signal<(Value, B, C), Error> { - return .init(CombineLatestStrategy.self, a, b, c) - } - - /// Combines the values of all the given signals, in the manner described by - /// `combineLatest(with:)`. - public static func combineLatest(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal) -> Signal<(Value, B, C, D), Error> { - return .init(CombineLatestStrategy.self, a, b, c, d) - } - - /// Combines the values of all the given signals, in the manner described by - /// `combineLatest(with:)`. - public static func combineLatest(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal) -> Signal<(Value, B, C, D, E), Error> { - return .init(CombineLatestStrategy.self, a, b, c, d, e) - } - - /// Combines the values of all the given signals, in the manner described by - /// `combineLatest(with:)`. - public static func combineLatest(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal) -> Signal<(Value, B, C, D, E, F), Error> { - return .init(CombineLatestStrategy.self, a, b, c, d, e, f) - } - - /// Combines the values of all the given signals, in the manner described by - /// `combineLatest(with:)`. - public static func combineLatest(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal) -> Signal<(Value, B, C, D, E, F, G), Error> { - return .init(CombineLatestStrategy.self, a, b, c, d, e, f, g) - } - - /// Combines the values of all the given signals, in the manner described by - /// `combineLatest(with:)`. - public static func combineLatest(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal, _ h: Signal) -> Signal<(Value, B, C, D, E, F, G, H), Error> { - return .init(CombineLatestStrategy.self, a, b, c, d, e, f, g, h) - } - - /// Combines the values of all the given signals, in the manner described by - /// `combineLatest(with:)`. - public static func combineLatest(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal, _ h: Signal, _ i: Signal) -> Signal<(Value, B, C, D, E, F, G, H, I), Error> { - return .init(CombineLatestStrategy.self, a, b, c, d, e, f, g, h, i) - } - - /// Combines the values of all the given signals, in the manner described by - /// `combineLatest(with:)`. - public static func combineLatest(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal, _ h: Signal, _ i: Signal, _ j: Signal) -> Signal<(Value, B, C, D, E, F, G, H, I, J), Error> { - return .init(CombineLatestStrategy.self, a, b, c, d, e, f, g, h, i, j) - } - - /// Combines the values of all the given signals, in the manner described by - /// `combineLatest(with:)`. No events will be sent if the sequence is empty. - public static func combineLatest(_ signals: S) -> Signal<[Value], Error> where S.Iterator.Element == Signal { - return .init(CombineLatestStrategy.self, signals) - } - - /// Zip the values of all the given signals, in the manner described by `zip(with:)`. - public static func zip(_ a: Signal, _ b: Signal) -> Signal<(Value, B), Error> { - return .init(ZipStrategy.self, a, b) - } - - /// Zip the values of all the given signals, in the manner described by `zip(with:)`. - public static func zip(_ a: Signal, _ b: Signal, _ c: Signal) -> Signal<(Value, B, C), Error> { - return .init(ZipStrategy.self, a, b, c) - } - - /// Zip the values of all the given signals, in the manner described by `zip(with:)`. - public static func zip(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal) -> Signal<(Value, B, C, D), Error> { - return .init(ZipStrategy.self, a, b, c, d) - } - - /// Zip the values of all the given signals, in the manner described by `zip(with:)`. - public static func zip(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal) -> Signal<(Value, B, C, D, E), Error> { - return .init(ZipStrategy.self, a, b, c, d, e) - } - - /// Zip the values of all the given signals, in the manner described by `zip(with:)`. - public static func zip(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal) -> Signal<(Value, B, C, D, E, F), Error> { - return .init(ZipStrategy.self, a, b, c, d, e, f) - } - - /// Zip the values of all the given signals, in the manner described by `zip(with:)`. - public static func zip(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal) -> Signal<(Value, B, C, D, E, F, G), Error> { - return .init(ZipStrategy.self, a, b, c, d, e, f, g) - } - - /// Zip the values of all the given signals, in the manner described by `zip(with:)`. - public static func zip(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal, _ h: Signal) -> Signal<(Value, B, C, D, E, F, G, H), Error> { - return .init(ZipStrategy.self, a, b, c, d, e, f, g, h) - } - - /// Zip the values of all the given signals, in the manner described by `zip(with:)`. - public static func zip(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal, _ h: Signal, _ i: Signal) -> Signal<(Value, B, C, D, E, F, G, H, I), Error> { - return .init(ZipStrategy.self, a, b, c, d, e, f, g, h, i) - } - - /// Zip the values of all the given signals, in the manner described by `zip(with:)`. - public static func zip(_ a: Signal, _ b: Signal, _ c: Signal, _ d: Signal, _ e: Signal, _ f: Signal, _ g: Signal, _ h: Signal, _ i: Signal, _ j: Signal) -> Signal<(Value, B, C, D, E, F, G, H, I, J), Error> { - return .init(ZipStrategy.self, a, b, c, d, e, f, g, h, i, j) - } - - /// Zips the values of all the given signals, in the manner described by - /// `zip(with:)`. No events will be sent if the sequence is empty. - public static func zip(_ signals: S) -> Signal<[Value], Error> where S.Iterator.Element == Signal { - return .init(ZipStrategy.self, signals) - } -} - -extension Signal { - /// Forward events from `self` until `interval`. Then if signal isn't - /// completed yet, fails with `error` on `scheduler`. - /// - /// - note: If the interval is 0, the timeout will be scheduled immediately. - /// The signal must complete synchronously (or on a faster - /// scheduler) to avoid the timeout. - /// - /// - precondition: `interval` must be non-negative number. - /// - /// - parameters: - /// - error: Error to send with failed event if `self` is not completed - /// when `interval` passes. - /// - interval: Number of seconds to wait for `self` to complete. - /// - scheudler: A scheduler to deliver error on. - /// - /// - returns: A signal that sends events for at most `interval` seconds, - /// then, if not `completed` - sends `error` with failed event - /// on `scheduler`. - public func timeout(after interval: TimeInterval, raising error: Error, on scheduler: DateScheduler) -> Signal { - precondition(interval >= 0) - - return Signal { observer in - let disposable = CompositeDisposable() - let date = scheduler.currentDate.addingTimeInterval(interval) - - disposable += scheduler.schedule(after: date) { - observer.send(error: error) - } - - disposable += self.observe(observer) - return disposable - } - } -} - -extension Signal where Error == NoError { - /// Promote a signal that does not generate failures into one that can. - /// - /// - note: This does not actually cause failures to be generated for the - /// given signal, but makes it easier to combine with other signals - /// that may fail; for example, with operators like - /// `combineLatestWith`, `zipWith`, `flatten`, etc. - /// - /// - parameters: - /// - _ An `ErrorType`. - /// - /// - returns: A signal that has an instantiatable `ErrorType`. - public func promoteError(_: F.Type = F.self) -> Signal { - return Signal { observer in - return self.observe { event in - switch event { - case let .value(value): - observer.send(value: value) - case .failed: - fatalError("NoError is impossible to construct") - case .completed: - observer.sendCompleted() - case .interrupted: - observer.sendInterrupted() - } - } - } - } - - /// Promote a signal that does not generate failures into one that can. - /// - /// - note: This does not actually cause failures to be generated for the - /// given signal, but makes it easier to combine with other signals - /// that may fail; for example, with operators like - /// `combineLatestWith`, `zipWith`, `flatten`, etc. - /// - /// - parameters: - /// - _ An `ErrorType`. - /// - /// - returns: A signal that has an instantiatable `ErrorType`. - public func promoteError(_: Error.Type = Error.self) -> Signal { - return self - } - - /// Forward events from `self` until `interval`. Then if signal isn't - /// completed yet, fails with `error` on `scheduler`. - /// - /// - note: If the interval is 0, the timeout will be scheduled immediately. - /// The signal must complete synchronously (or on a faster - /// scheduler) to avoid the timeout. - /// - /// - parameters: - /// - interval: Number of seconds to wait for `self` to complete. - /// - error: Error to send with `failed` event if `self` is not completed - /// when `interval` passes. - /// - scheudler: A scheduler to deliver error on. - /// - /// - returns: A signal that sends events for at most `interval` seconds, - /// then, if not `completed` - sends `error` with `failed` event - /// on `scheduler`. - public func timeout( - after interval: TimeInterval, - raising error: NewError, - on scheduler: DateScheduler - ) -> Signal { - return self - .promoteError(NewError.self) - .timeout(after: interval, raising: error, on: scheduler) - } -} - -extension Signal where Value == Never { - /// Promote a signal that does not generate values, as indicated by `Never`, to be - /// a signal of the given type of value. - /// - /// - note: The promotion does not result in any value being generated. - /// - /// - parameters: - /// - _ The type of value to promote to. - /// - /// - returns: A signal that forwards all terminal events from `self`. - public func promoteValue(_: U.Type = U.self) -> Signal { - return Signal { observer in - return self.observe { event in - switch event { - case .value: - fatalError("Never is impossible to construct") - case let .failed(error): - observer.send(error: error) - case .completed: - observer.sendCompleted() - case .interrupted: - observer.sendInterrupted() - } - } - } - } - - /// Promote a signal that does not generate values, as indicated by `Never`, to be - /// a signal of the given type of value. - /// - /// - note: The promotion does not result in any value being generated. - /// - /// - parameters: - /// - _ The type of value to promote to. - /// - /// - returns: A signal that forwards all terminal events from `self`. - public func promoteValue(_: Value.Type = Value.self) -> Signal { - return self - } -} - -extension Signal where Value == Bool { - /// Create a signal that computes a logical NOT in the latest values of `self`. - /// - /// - returns: A signal that emits the logical NOT results. - public func negate() -> Signal { - return self.map(!) - } - - /// Create a signal that computes a logical AND between the latest values of `self` - /// and `signal`. - /// - /// - parameters: - /// - signal: Signal to be combined with `self`. - /// - /// - returns: A signal that emits the logical AND results. - public func and(_ signal: Signal) -> Signal { - return self.combineLatest(with: signal).map { $0.0 && $0.1 } - } - - /// Create a signal that computes a logical OR between the latest values of `self` - /// and `signal`. - /// - /// - parameters: - /// - signal: Signal to be combined with `self`. - /// - /// - returns: A signal that emits the logical OR results. - public func or(_ signal: Signal) -> Signal { - return self.combineLatest(with: signal).map { $0.0 || $0.1 } - } -} - -extension Signal { - /// Apply an action to every value from `self`, and forward the value if the action - /// succeeds. If the action fails with an error, the returned `Signal` would propagate - /// the failure and terminate. - /// - /// - parameters: - /// - action: An action which yields a `Result`. - /// - /// - returns: A signal which forwards the values from `self` until the given action - /// fails. - public func attempt(_ action: @escaping (Value) -> Result<(), Error>) -> Signal { - return attemptMap { value -> Result in - return action(value).map { _ -> Value in - return value - } - } - } - - /// Apply a transform to every value from `self`, and forward the transformed value - /// if the action succeeds. If the action fails with an error, the returned `Signal` - /// would propagate the failure and terminate. - /// - /// - parameters: - /// - action: A transform which yields a `Result` of the transformed value or the - /// error. - /// - /// - returns: A signal which forwards the transformed values. - public func attemptMap(_ transform: @escaping (Value) -> Result) -> Signal { - return Signal { observer in - self.observe { event in - switch event { - case let .value(value): - transform(value).analysis( - ifSuccess: observer.send(value:), - ifFailure: observer.send(error:) - ) - case let .failed(error): - observer.send(error: error) - case .completed: - observer.sendCompleted() - case .interrupted: - observer.sendInterrupted() - } - } - } - } -} - -extension Signal where Error == NoError { - /// Apply a throwable action to every value from `self`, and forward the values - /// if the action succeeds. If the action throws an error, the returned `Signal` - /// would propagate the failure and terminate. - /// - /// - parameters: - /// - action: A throwable closure to perform an arbitrary action on the value. - /// - /// - returns: A signal which forwards the successful values of the given action. - public func attempt(_ action: @escaping (Value) throws -> Void) -> Signal { - return self - .promoteError(AnyError.self) - .attempt(action) - } - - /// Apply a throwable transform to every value from `self`, and forward the results - /// if the action succeeds. If the transform throws an error, the returned `Signal` - /// would propagate the failure and terminate. - /// - /// - parameters: - /// - transform: A throwable transform. - /// - /// - returns: A signal which forwards the successfully transformed values. - public func attemptMap(_ transform: @escaping (Value) throws -> U) -> Signal { - return self - .promoteError(AnyError.self) - .attemptMap(transform) - } -} - -extension Signal where Error == AnyError { - /// Apply a throwable action to every value from `self`, and forward the values - /// if the action succeeds. If the action throws an error, the returned `Signal` - /// would propagate the failure and terminate. - /// - /// - parameters: - /// - action: A throwable closure to perform an arbitrary action on the value. - /// - /// - returns: A signal which forwards the successful values of the given action. - public func attempt(_ action: @escaping (Value) throws -> Void) -> Signal { - return attemptMap { value in - try action(value) - return value - } - } - - /// Apply a throwable transform to every value from `self`, and forward the results - /// if the action succeeds. If the transform throws an error, the returned `Signal` - /// would propagate the failure and terminate. - /// - /// - parameters: - /// - transform: A throwable transform. - /// - /// - returns: A signal which forwards the successfully transformed values. - public func attemptMap(_ transform: @escaping (Value) throws -> U) -> Signal { - return attemptMap { value in - ReactiveSwift.materialize { - try transform(value) - } - } - } -} diff --git a/Sample/Pods/ReactiveSwift/Sources/SignalProducer.swift b/Sample/Pods/ReactiveSwift/Sources/SignalProducer.swift deleted file mode 100644 index 377a8e32..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/SignalProducer.swift +++ /dev/null @@ -1,2301 +0,0 @@ -import Dispatch -import Foundation -import Result - -/// A SignalProducer creates Signals that can produce values of type `Value` -/// and/or fail with errors of type `Error`. If no failure should be possible, -/// `NoError` can be specified for `Error`. -/// -/// SignalProducers can be used to represent operations or tasks, like network -/// requests, where each invocation of `start()` will create a new underlying -/// operation. This ensures that consumers will receive the results, versus a -/// plain Signal, where the results might be sent before any observers are -/// attached. -/// -/// Because of the behavior of `start()`, different Signals created from the -/// producer may see a different version of Events. The Events may arrive in a -/// different order between Signals, or the stream might be completely -/// different! -public struct SignalProducer { - public typealias ProducedSignal = Signal - - /// Wraps a closure which, when invoked, produces a new instance of `Signal`, a - /// customized `observerDidSetup` post-creation side effect for the `Signal` and a - /// disposable to interrupt the produced `Signal`. - /// - /// Unlike the safe `startWithSignal(_:)` API, `builder` shifts the responsibility of - /// invoking the post-creation side effect to the caller, while it takes from the - /// caller the responsibility of the `Signal` creation. - /// - /// The design allows producer lifting to be as efficient as native `Signal` - /// operators, by eliminating the unnecessary relay `Signal` imposed by the old - /// `startWithSignal(_:)`, regardless of the fact that lifted operators can rely on - /// the upstreams for producer interruption. - /// - /// `observerDidSetup` must be invoked before any other post-creation side effect. - fileprivate struct Instance { - let producedSignal: Signal - let observerDidSetup: () -> Void - let interruptHandle: Disposable - } - - fileprivate let builder: () -> Instance - - /// Convert an entity into its equivalent representation as `SignalProducer`. - /// - /// - parameters: - /// - base: The entity to convert from. - public init(_ base: T) where T.Value == Value, T.Error == Error { - self = base.producer - } - - /// Initializes a `SignalProducer` that will emit the same events as the - /// given signal. - /// - /// If the Disposable returned from `start()` is disposed or a terminating - /// event is sent to the observer, the given signal will be disposed. - /// - /// - parameters: - /// - signal: A signal to observe after starting the producer. - public init(_ signal: Signal) { - self.init { observer, lifetime in - lifetime += signal.observe(observer) - } - } - - /// Initializes a SignalProducer that will invoke the given closure once for - /// each invocation of `start()`. - /// - /// The events that the closure puts into the given observer will become - /// the events sent by the started `Signal` to its observers. - /// - /// - note: If the `Disposable` returned from `start()` is disposed or a - /// terminating event is sent to the observer, the given - /// `CompositeDisposable` will be disposed, at which point work - /// should be interrupted and any temporary resources cleaned up. - /// - /// - parameters: - /// - startHandler: A closure that accepts observer and a disposable. - public init(_ startHandler: @escaping (Signal.Observer, Lifetime) -> Void) { - self.init { () -> Instance in - let disposable = CompositeDisposable() - let (signal, observer) = Signal.pipe(disposable: disposable) - let observerDidSetup = { startHandler(observer, Lifetime(disposable)) } - let interruptHandle = AnyDisposable(observer.sendInterrupted) - - return Instance(producedSignal: signal, observerDidSetup: observerDidSetup, interruptHandle: interruptHandle) - } - } - - /// Create a SignalProducer that will invoke the given factory once for each - /// invocation of `start()`. - /// - /// - parameters: - /// - builder: A builder that is used by `startWithSignal` to create new `Signal`s. - fileprivate init(_ builder: @escaping () -> Instance) { - self.builder = builder - } - - /// Creates a producer for a `Signal` that will immediately send one value - /// then complete. - /// - /// - parameters: - /// - value: A value that should be sent by the `Signal` in a `value` - /// event. - public init(value: Value) { - self.init { observer, lifetime in - observer.send(value: value) - observer.sendCompleted() - } - } - - /// Creates a producer for a `Signal` that immediately sends one value, then - /// completes. - /// - /// This initializer differs from `init(value:)` in that its sole `value` - /// event is constructed lazily by invoking the supplied `action` when - /// the `SignalProducer` is started. - /// - /// - parameters: - /// - action: A action that yields a value to be sent by the `Signal` as - /// a `value` event. - public init(_ action: @escaping () -> Value) { - self.init { observer, lifetime in - observer.send(value: action()) - observer.sendCompleted() - } - } - - /// Create a `SignalProducer` that will attempt the given operation once for - /// each invocation of `start()`. - /// - /// Upon success, the started signal will send the resulting value then - /// complete. Upon failure, the started signal will fail with the error that - /// occurred. - /// - /// - parameters: - /// - action: A closure that returns instance of `Result`. - public init(_ action: @escaping () -> Result) { - self.init { observer, disposable in - action().analysis(ifSuccess: { value in - observer.send(value: value) - observer.sendCompleted() - }, ifFailure: { error in - observer.send(error: error) - }) - } - } - - /// Creates a producer for a `Signal` that will immediately fail with the - /// given error. - /// - /// - parameters: - /// - error: An error that should be sent by the `Signal` in a `failed` - /// event. - public init(error: Error) { - self.init { observer, lifetime in - observer.send(error: error) - } - } - - /// Creates a producer for a Signal that will immediately send one value - /// then complete, or immediately fail, depending on the given Result. - /// - /// - parameters: - /// - result: A `Result` instance that will send either `value` event if - /// `result` is `success`ful or `failed` event if `result` is a - /// `failure`. - public init(result: Result) { - switch result { - case let .success(value): - self.init(value: value) - - case let .failure(error): - self.init(error: error) - } - } - - /// Creates a producer for a Signal that will immediately send the values - /// from the given sequence, then complete. - /// - /// - parameters: - /// - values: A sequence of values that a `Signal` will send as separate - /// `value` events and then complete. - public init(_ values: S) where S.Iterator.Element == Value { - self.init { observer, lifetime in - for value in values { - observer.send(value: value) - - if lifetime.hasEnded { - break - } - } - - observer.sendCompleted() - } - } - - /// Creates a producer for a Signal that will immediately send the values - /// from the given sequence, then complete. - /// - /// - parameters: - /// - first: First value for the `Signal` to send. - /// - second: Second value for the `Signal` to send. - /// - tail: Rest of the values to be sent by the `Signal`. - public init(values first: Value, _ second: Value, _ tail: Value...) { - self.init([ first, second ] + tail) - } - - /// A producer for a Signal that will immediately complete without sending - /// any values. - public static var empty: SignalProducer { - return self.init { observer, lifetime in - observer.sendCompleted() - } - } - - /// A producer for a Signal that never sends any events to its observers. - public static var never: SignalProducer { - return self.init { observer, lifetime in - lifetime.observeEnded { _ = observer } - } - } - - /// Create a `Signal` from `self`, pass it into the given closure, and start the - /// associated work on the produced `Signal` as the closure returns. - /// - /// - parameters: - /// - setup: A closure to be invoked before the work associated with the produced - /// `Signal` commences. Both the produced `Signal` and an interrupt handle - /// of the signal would be passed to the closure. - public func startWithSignal(_ setup: (_ signal: Signal, _ interruptHandle: Disposable) -> Void) { - let instance = builder() - setup(instance.producedSignal, instance.interruptHandle) - guard !instance.interruptHandle.isDisposed else { return } - instance.observerDidSetup() - } -} - -extension SignalProducer where Error == AnyError { - /// Create a `SignalProducer` that will attempt the given failable operation once for - /// each invocation of `start()`. - /// - /// Upon success, the started producer will send the resulting value then - /// complete. Upon failure, the started signal will fail with the error that - /// occurred. - /// - /// - parameters: - /// - operation: A failable closure. - public init(_ action: @escaping () throws -> Value) { - self.init { - return ReactiveSwift.materialize { - return try action() - } - } - } -} - -/// Represents reactive primitives that can be represented by `SignalProducer`. -public protocol SignalProducerConvertible { - /// The type of values being sent by `self`. - associatedtype Value - - /// The type of error that can occur on `self`. - associatedtype Error: Swift.Error - - /// The `SignalProducer` representation of `self`. - var producer: SignalProducer { get } -} - -/// A protocol for constraining associated types to `SignalProducer`. -public protocol SignalProducerProtocol { - /// The type of values being sent by `self`. - associatedtype Value - - /// The type of error that can occur on `self`. - associatedtype Error: Swift.Error - - /// The materialized `self`. - var producer: SignalProducer { get } -} - -extension SignalProducer: SignalProducerConvertible, SignalProducerProtocol { - public var producer: SignalProducer { - return self - } -} - -extension SignalProducer { - /// Create a `Signal` from `self`, and observe it with the given observer. - /// - /// - parameters: - /// - observer: An observer to attach to the produced `Signal`. - /// - /// - returns: A disposable to interrupt the produced `Signal`. - @discardableResult - public func start(_ observer: Signal.Observer = .init()) -> Disposable { - var disposable: Disposable! - - startWithSignal { signal, innerDisposable in - signal.observe(observer) - disposable = innerDisposable - } - - return disposable - } - - /// Create a `Signal` from `self`, and observe the `Signal` for all events - /// being emitted. - /// - /// - parameters: - /// - action: A closure to be invoked with every event from `self`. - /// - /// - returns: A disposable to interrupt the produced `Signal`. - @discardableResult - public func start(_ action: @escaping Signal.Observer.Action) -> Disposable { - return start(Signal.Observer(action)) - } - - /// Create a `Signal` from `self`, and observe the `Signal` for all values being - /// emitted, and if any, its failure. - /// - /// - parameters: - /// - action: A closure to be invoked with values from `self`, or the propagated - /// error should any `failed` event is emitted. - /// - /// - returns: A disposable to interrupt the produced `Signal`. - @discardableResult - public func startWithResult(_ action: @escaping (Result) -> Void) -> Disposable { - return start( - Signal.Observer( - value: { action(.success($0)) }, - failed: { action(.failure($0)) } - ) - ) - } - - /// Create a `Signal` from `self`, and observe its completion. - /// - /// - parameters: - /// - action: A closure to be invoked when a `completed` event is emitted. - /// - /// - returns: A disposable to interrupt the produced `Signal`. - @discardableResult - public func startWithCompleted(_ action: @escaping () -> Void) -> Disposable { - return start(Signal.Observer(completed: action)) - } - - /// Create a `Signal` from `self`, and observe its failure. - /// - /// - parameters: - /// - action: A closure to be invoked with the propagated error, should any - /// `failed` event is emitted. - /// - /// - returns: A disposable to interrupt the produced `Signal`. - @discardableResult - public func startWithFailed(_ action: @escaping (Error) -> Void) -> Disposable { - return start(Signal.Observer(failed: action)) - } - - /// Create a `Signal` from `self`, and observe its interruption. - /// - /// - parameters: - /// - action: A closure to be invoked when an `interrupted` event is emitted. - /// - /// - returns: A disposable to interrupt the produced `Signal`. - @discardableResult - public func startWithInterrupted(_ action: @escaping () -> Void) -> Disposable { - return start(Signal.Observer(interrupted: action)) - } - - /// Creates a `Signal` from the producer. - /// - /// This is equivalent to `SignalProducer.startWithSignal`, but it has - /// the downside that any values emitted synchronously upon starting will - /// be missed by the observer, because it won't be able to subscribe in time. - /// That's why we don't want this method to be exposed as `public`, - /// but it's useful internally. - internal func startAndRetrieveSignal() -> Signal { - var result: Signal! - self.startWithSignal { signal, _ in - result = signal - } - - return result - } - - /// Create a `Signal` from `self` in the manner described by `startWithSignal`, and - /// put the interrupt handle into the given `CompositeDisposable`. - /// - /// - parameters: - /// - lifetime: The `Lifetime` the interrupt handle to be added to. - /// - setup: A closure that accepts the produced `Signal`. - fileprivate func startWithSignal(during lifetime: Lifetime, setup: (Signal) -> Void) { - startWithSignal { signal, interruptHandle in - lifetime += interruptHandle - setup(signal) - } - } -} - -extension SignalProducer where Error == NoError { - /// Create a `Signal` from `self`, and observe the `Signal` for all values being - /// emitted. - /// - /// - parameters: - /// - action: A closure to be invoked with values from the produced `Signal`. - /// - /// - returns: A disposable to interrupt the produced `Signal`. - @discardableResult - public func startWithValues(_ action: @escaping (Value) -> Void) -> Disposable { - return start(Signal.Observer(value: action)) - } -} - -extension SignalProducer { - /// Lift an unary Signal operator to operate upon SignalProducers instead. - /// - /// In other words, this will create a new `SignalProducer` which will apply - /// the given `Signal` operator to _every_ created `Signal`, just as if the - /// operator had been applied to each `Signal` yielded from `start()`. - /// - /// - parameters: - /// - transform: An unary operator to lift. - /// - /// - returns: A signal producer that applies signal's operator to every - /// created signal. - public func lift(_ transform: @escaping (Signal) -> Signal) -> SignalProducer { - return SignalProducer { () -> SignalProducer.Instance in - // Transform the `Signal`, and pass through the `didCreate` side effect and - // the interruptHandle. - let instance = self.producer.builder() - return SignalProducer.Instance(producedSignal: transform(instance.producedSignal), - observerDidSetup: instance.observerDidSetup, - interruptHandle: instance.interruptHandle) - } - } - - /// Lift a binary Signal operator to operate upon SignalProducers. - /// - /// The left producer would first be started. When both producers are synchronous this - /// order can be important depending on the operator to generate correct results. - /// - /// - returns: A factory that creates a SignalProducer with the given operator - /// applied. `self` would be the LHS, and the factory input would - /// be the RHS. - fileprivate func liftLeft(_ transform: @escaping (Signal) -> (Signal) -> Signal) -> (SignalProducer) -> SignalProducer { - return lift(leftFirst: true, transform) - } - - /// Lift a binary Signal operator to operate upon SignalProducers. - /// - /// The right producer would first be started. When both producers are synchronous - /// this order can be important depending on the operator to generate correct results. - /// - /// - returns: A factory that creates a SignalProducer with the given operator - /// applied. `self` would be the LHS, and the factory input would - /// be the RHS. - fileprivate func liftRight(_ transform: @escaping (Signal) -> (Signal) -> Signal) -> (SignalProducer) -> SignalProducer { - return lift(leftFirst: false, transform) - } - - private func lift(leftFirst: Bool, _ transform: @escaping (Signal) -> (Signal) -> Signal) -> (SignalProducer) -> SignalProducer { - return { otherProducer in - return SignalProducer { () -> SignalProducer.Instance in - let left = self.producer.builder() - let right = otherProducer.builder() - - return .init(producedSignal: transform(left.producedSignal)(right.producedSignal), - observerDidSetup: { - if leftFirst { - left.observerDidSetup() - right.observerDidSetup() - } else { - right.observerDidSetup() - left.observerDidSetup() - }}, - interruptHandle: CompositeDisposable([left.interruptHandle, right.interruptHandle])) - } - } - } - - /// Lift a binary Signal operator to operate upon SignalProducers instead. - /// - /// In other words, this will create a new `SignalProducer` which will apply - /// the given `Signal` operator to _every_ `Signal` created from the two - /// producers, just as if the operator had been applied to each `Signal` - /// yielded from `start()`. - /// - /// - note: starting the returned producer will start the receiver of the - /// operator, which may not be adviseable for some operators. - /// - /// - parameters: - /// - transform: A binary operator to lift. - /// - /// - returns: A binary operator that operates on two signal producers. - public func lift(_ transform: @escaping (Signal) -> (Signal) -> Signal) -> (SignalProducer) -> SignalProducer { - return liftRight(transform) - } -} - -/// Start the producers in the argument order. -/// -/// - parameters: -/// - disposable: The `CompositeDisposable` to collect the interrupt handles of all -/// produced `Signal`s. -/// - setup: The closure to accept all produced `Signal`s at once. -private func flattenStart(_ lifetime: Lifetime, _ a: SignalProducer, _ b: SignalProducer, _ setup: (Signal, Signal) -> Void) { - b.startWithSignal(during: lifetime) { b in - a.startWithSignal(during: lifetime) { setup($0, b) } - } -} - -/// Start the producers in the argument order. -/// -/// - parameters: -/// - disposable: The `CompositeDisposable` to collect the interrupt handles of all -/// produced `Signal`s. -/// - setup: The closure to accept all produced `Signal`s at once. -private func flattenStart(_ lifetime: Lifetime, _ a: SignalProducer, _ b: SignalProducer, _ c: SignalProducer, _ setup: (Signal, Signal, Signal) -> Void) { - c.startWithSignal(during: lifetime) { c in - flattenStart(lifetime, a, b) { setup($0, $1, c) } - } -} - -/// Start the producers in the argument order. -/// -/// - parameters: -/// - disposable: The `CompositeDisposable` to collect the interrupt handles of all -/// produced `Signal`s. -/// - setup: The closure to accept all produced `Signal`s at once. -private func flattenStart(_ lifetime: Lifetime, _ a: SignalProducer, _ b: SignalProducer, _ c: SignalProducer, _ d: SignalProducer, _ setup: (Signal, Signal, Signal, Signal) -> Void) { - d.startWithSignal(during: lifetime) { d in - flattenStart(lifetime, a, b, c) { setup($0, $1, $2, d) } - } -} - -/// Start the producers in the argument order. -/// -/// - parameters: -/// - disposable: The `CompositeDisposable` to collect the interrupt handles of all -/// produced `Signal`s. -/// - setup: The closure to accept all produced `Signal`s at once. -private func flattenStart(_ lifetime: Lifetime, _ a: SignalProducer, _ b: SignalProducer, _ c: SignalProducer, _ d: SignalProducer, _ e: SignalProducer, _ setup: (Signal, Signal, Signal, Signal, Signal) -> Void) { - e.startWithSignal(during: lifetime) { e in - flattenStart(lifetime, a, b, c, d) { setup($0, $1, $2, $3, e) } - } -} - -/// Start the producers in the argument order. -/// -/// - parameters: -/// - disposable: The `CompositeDisposable` to collect the interrupt handles of all -/// produced `Signal`s. -/// - setup: The closure to accept all produced `Signal`s at once. -private func flattenStart(_ lifetime: Lifetime, _ a: SignalProducer, _ b: SignalProducer, _ c: SignalProducer, _ d: SignalProducer, _ e: SignalProducer, _ f: SignalProducer, _ setup: (Signal, Signal, Signal, Signal, Signal, Signal) -> Void) { - f.startWithSignal(during: lifetime) { f in - flattenStart(lifetime, a, b, c, d, e) { setup($0, $1, $2, $3, $4, f) } - } -} - -/// Start the producers in the argument order. -/// -/// - parameters: -/// - disposable: The `CompositeDisposable` to collect the interrupt handles of all -/// produced `Signal`s. -/// - setup: The closure to accept all produced `Signal`s at once. -private func flattenStart(_ lifetime: Lifetime, _ a: SignalProducer, _ b: SignalProducer, _ c: SignalProducer, _ d: SignalProducer, _ e: SignalProducer, _ f: SignalProducer, _ g: SignalProducer, _ setup: (Signal, Signal, Signal, Signal, Signal, Signal, Signal) -> Void) { - g.startWithSignal(during: lifetime) { g in - flattenStart(lifetime, a, b, c, d, e, f) { setup($0, $1, $2, $3, $4, $5, g) } - } -} - -/// Start the producers in the argument order. -/// -/// - parameters: -/// - disposable: The `CompositeDisposable` to collect the interrupt handles of all -/// produced `Signal`s. -/// - setup: The closure to accept all produced `Signal`s at once. -private func flattenStart(_ lifetime: Lifetime, _ a: SignalProducer, _ b: SignalProducer, _ c: SignalProducer, _ d: SignalProducer, _ e: SignalProducer, _ f: SignalProducer, _ g: SignalProducer, _ h: SignalProducer, _ setup: (Signal, Signal, Signal, Signal, Signal, Signal, Signal, Signal) -> Void) { - h.startWithSignal(during: lifetime) { h in - flattenStart(lifetime, a, b, c, d, e, f, g) { setup($0, $1, $2, $3, $4, $5, $6, h) } - } -} - -/// Start the producers in the argument order. -/// -/// - parameters: -/// - disposable: The `CompositeDisposable` to collect the interrupt handles of all -/// produced `Signal`s. -/// - setup: The closure to accept all produced `Signal`s at once. -private func flattenStart(_ lifetime: Lifetime, _ a: SignalProducer, _ b: SignalProducer, _ c: SignalProducer, _ d: SignalProducer, _ e: SignalProducer, _ f: SignalProducer, _ g: SignalProducer, _ h: SignalProducer, _ i: SignalProducer, _ setup: (Signal, Signal, Signal, Signal, Signal, Signal, Signal, Signal, Signal) -> Void) { - i.startWithSignal(during: lifetime) { i in - flattenStart(lifetime, a, b, c, d, e, f, g, h) { setup($0, $1, $2, $3, $4, $5, $6, $7, i) } - } -} - -/// Start the producers in the argument order. -/// -/// - parameters: -/// - disposable: The `CompositeDisposable` to collect the interrupt handles of all -/// produced `Signal`s. -/// - setup: The closure to accept all produced `Signal`s at once. -private func flattenStart(_ lifetime: Lifetime, _ a: SignalProducer, _ b: SignalProducer, _ c: SignalProducer, _ d: SignalProducer, _ e: SignalProducer, _ f: SignalProducer, _ g: SignalProducer, _ h: SignalProducer, _ i: SignalProducer, _ j: SignalProducer, _ setup: (Signal, Signal, Signal, Signal, Signal, Signal, Signal, Signal, Signal, Signal) -> Void) { - j.startWithSignal(during: lifetime) { j in - flattenStart(lifetime, a, b, c, d, e, f, g, h, i) { setup($0, $1, $2, $3, $4, $5, $6, $7, $8, j) } - } -} - -extension SignalProducer { - /// Map each value in the producer to a new value. - /// - /// - parameters: - /// - transform: A closure that accepts a value and returns a different - /// value. - /// - /// - returns: A signal producer that, when started, will send a mapped - /// value of `self.` - public func map(_ transform: @escaping (Value) -> U) -> SignalProducer { - return lift { $0.map(transform) } - } - -#if swift(>=3.2) - /// Map each value in the producer to a new value by applying a key path. - /// - /// - parameters: - /// - keyPath: A key path relative to the producer's `Value` type. - /// - /// - returns: A producer that will send new values. - public func map(_ keyPath: KeyPath) -> SignalProducer { - return lift { $0.map(keyPath) } - } -#endif - - /// Map errors in the producer to a new error. - /// - /// - parameters: - /// - transform: A closure that accepts an error object and returns a - /// different error. - /// - /// - returns: A producer that emits errors of new type. - public func mapError(_ transform: @escaping (Error) -> F) -> SignalProducer { - return lift { $0.mapError(transform) } - } - - /// Maps each value in the producer to a new value, lazily evaluating the - /// supplied transformation on the specified scheduler. - /// - /// - important: Unlike `map`, there is not a 1-1 mapping between incoming - /// values, and values sent on the returned producer. If - /// `scheduler` has not yet scheduled `transform` for - /// execution, then each new value will replace the last one as - /// the parameter to `transform` once it is finally executed. - /// - /// - parameters: - /// - transform: The closure used to obtain the returned value from this - /// producer's underlying value. - /// - /// - returns: A producer that, when started, sends values obtained using - /// `transform` as this producer sends values. - public func lazyMap(on scheduler: Scheduler, transform: @escaping (Value) -> U) -> SignalProducer { - return lift { $0.lazyMap(on: scheduler, transform: transform) } - } - - /// Preserve only values which pass the given closure. - /// - /// - parameters: - /// - isIncluded: A closure to determine whether a value from `self` should be - /// included in the produced `Signal`. - /// - /// - returns: A producer that, when started, forwards the values passing the given - /// closure. - public func filter(_ isIncluded: @escaping (Value) -> Bool) -> SignalProducer { - return lift { $0.filter(isIncluded) } - } - - /// Applies `transform` to values from the producer and forwards values with non `nil` results unwrapped. - /// - parameters: - /// - transform: A closure that accepts a value from the `value` event and - /// returns a new optional value. - /// - /// - returns: A producer that will send new values, that are non `nil` after the transformation. - public func filterMap(_ transform: @escaping (Value) -> U?) -> SignalProducer { - return lift { $0.filterMap(transform) } - } - - /// Yield the first `count` values from the input producer. - /// - /// - precondition: `count` must be non-negative number. - /// - /// - parameters: - /// - count: A number of values to take from the signal. - /// - /// - returns: A producer that, when started, will yield the first `count` - /// values from `self`. - public func take(first count: Int) -> SignalProducer { - return lift { $0.take(first: count) } - } - - /// Yield an array of values when `self` completes. - /// - /// - note: When `self` completes without collecting any value, it will send - /// an empty array of values. - /// - /// - returns: A producer that, when started, will yield an array of values - /// when `self` completes. - public func collect() -> SignalProducer<[Value], Error> { - return lift { $0.collect() } - } - - /// Yield an array of values until it reaches a certain count. - /// - /// - precondition: `count` must be greater than zero. - /// - /// - note: When the count is reached the array is sent and the signal - /// starts over yielding a new array of values. - /// - /// - note: When `self` completes any remaining values will be sent, the - /// last array may not have `count` values. Alternatively, if were - /// not collected any values will sent an empty array of values. - /// - /// - returns: A producer that, when started, collects at most `count` - /// values from `self`, forwards them as a single array and - /// completes. - public func collect(count: Int) -> SignalProducer<[Value], Error> { - precondition(count > 0) - return lift { $0.collect(count: count) } - } - - /// Collect values from `self`, and emit them if the predicate passes. - /// - /// When `self` completes any remaining values will be sent, regardless of the - /// collected values matching `shouldEmit` or not. - /// - /// If `self` completes without having emitted any value, an empty array would be - /// emitted, followed by the completion of the produced `Signal`. - /// - /// ```` - /// let (producer, observer) = SignalProducer.buffer(1) - /// - /// producer - /// .collect { values in values.reduce(0, combine: +) == 8 } - /// .startWithValues { print($0) } - /// - /// observer.send(value: 1) - /// observer.send(value: 3) - /// observer.send(value: 4) - /// observer.send(value: 7) - /// observer.send(value: 1) - /// observer.send(value: 5) - /// observer.send(value: 6) - /// observer.sendCompleted() - /// - /// // Output: - /// // [1, 3, 4] - /// // [7, 1] - /// // [5, 6] - /// ```` - /// - /// - parameters: - /// - shouldEmit: A closure to determine, when every time a new value is received, - /// whether the collected values should be emitted. - /// - /// - returns: A signal of arrays of values, as instructed by the `shouldEmit` - /// closure. - public func collect(_ shouldEmit: @escaping (_ values: [Value]) -> Bool) -> SignalProducer<[Value], Error> { - return lift { $0.collect(shouldEmit) } - } - - /// Collect values from `self`, and emit them if the predicate passes. - /// - /// When `self` completes any remaining values will be sent, regardless of the - /// collected values matching `shouldEmit` or not. - /// - /// If `self` completes without having emitted any value, an empty array would be - /// emitted, followed by the completion of the produced `Signal`. - /// - /// ```` - /// let (producer, observer) = SignalProducer.buffer(1) - /// - /// producer - /// .collect { values, value in value == 7 } - /// .startWithValues { print($0) } - /// - /// observer.send(value: 1) - /// observer.send(value: 1) - /// observer.send(value: 7) - /// observer.send(value: 7) - /// observer.send(value: 5) - /// observer.send(value: 6) - /// observer.sendCompleted() - /// - /// // Output: - /// // [1, 1] - /// // [7] - /// // [7, 5, 6] - /// ```` - /// - /// - parameters: - /// - shouldEmit: A closure to determine, when every time a new value is received, - /// whether the collected values should be emitted. The new value - /// is **not** included in the collected values, and is included when - /// the next value is received. - /// - /// - returns: A producer of arrays of values, as instructed by the `shouldEmit` - /// closure. - public func collect(_ shouldEmit: @escaping (_ collected: [Value], _ latest: Value) -> Bool) -> SignalProducer<[Value], Error> { - return lift { $0.collect(shouldEmit) } - } - - /// Forward all events onto the given scheduler, instead of whichever - /// scheduler they originally arrived upon. - /// - /// - parameters: - /// - scheduler: A scheduler to deliver events on. - /// - /// - returns: A producer that, when started, will yield `self` values on - /// provided scheduler. - public func observe(on scheduler: Scheduler) -> SignalProducer { - return lift { $0.observe(on: scheduler) } - } - - /// Combine the latest value of the receiver with the latest value from the - /// given producer. - /// - /// - note: The returned producer will not send a value until both inputs - /// have sent at least one value each. - /// - /// - note: If either producer is interrupted, the returned producer will - /// also be interrupted. - /// - /// - note: The returned producer will not complete until both inputs - /// complete. - /// - /// - parameters: - /// - other: A producer to combine `self`'s value with. - /// - /// - returns: A producer that, when started, will yield a tuple containing - /// values of `self` and given producer. - public func combineLatest(with other: Other) -> SignalProducer<(Value, Other.Value), Error> where Other.Error == Error { - return SignalProducer.combineLatest(self, other) - } - - /// Delay `value` and `completed` events by the given interval, forwarding - /// them on the given scheduler. - /// - /// - note: `failed` and `interrupted` events are always scheduled - /// immediately. - /// - /// - parameters: - /// - interval: Interval to delay `value` and `completed` events by. - /// - scheduler: A scheduler to deliver delayed events on. - /// - /// - returns: A producer that, when started, will delay `value` and - /// `completed` events and will yield them on given scheduler. - public func delay(_ interval: TimeInterval, on scheduler: DateScheduler) -> SignalProducer { - return lift { $0.delay(interval, on: scheduler) } - } - - /// Skip the first `count` values, then forward everything afterward. - /// - /// - parameters: - /// - count: A number of values to skip. - /// - /// - returns: A producer that, when started, will skip the first `count` - /// values, then forward everything afterward. - public func skip(first count: Int) -> SignalProducer { - return lift { $0.skip(first: count) } - } - - /// Treats all Events from the input producer as plain values, allowing them - /// to be manipulated just like any other value. - /// - /// In other words, this brings Events “into the monad.” - /// - /// - note: When a Completed or Failed event is received, the resulting - /// producer will send the Event itself and then complete. When an - /// `interrupted` event is received, the resulting producer will - /// send the `Event` itself and then interrupt. - /// - /// - returns: A producer that sends events as its values. - public func materialize() -> SignalProducer { - return lift { $0.materialize() } - } - - /// Forward the latest value from `self` with the value from `sampler` as a - /// tuple, only when `sampler` sends a `value` event. - /// - /// - note: If `sampler` fires before a value has been observed on `self`, - /// nothing happens. - /// - /// - parameters: - /// - sampler: A producer that will trigger the delivery of `value` event - /// from `self`. - /// - /// - returns: A producer that will send values from `self` and `sampler`, - /// sampled (possibly multiple times) by `sampler`, then complete - /// once both input producers have completed, or interrupt if - /// either input producer is interrupted. - public func sample(with sampler: Sampler) -> SignalProducer<(Value, Sampler.Value), Error> where Sampler.Error == NoError { - return liftLeft(Signal.sample(with:))(sampler.producer) - } - - /// Forward the latest value from `self` whenever `sampler` sends a `value` - /// event. - /// - /// - note: If `sampler` fires before a value has been observed on `self`, - /// nothing happens. - /// - /// - parameters: - /// - sampler: A producer that will trigger the delivery of `value` event - /// from `self`. - /// - /// - returns: A producer that, when started, will send values from `self`, - /// sampled (possibly multiple times) by `sampler`, then complete - /// once both input producers have completed, or interrupt if - /// either input producer is interrupted. - public func sample(on sampler: Sampler) -> SignalProducer where Sampler.Value == (), Sampler.Error == NoError { - return liftLeft(Signal.sample(on:))(sampler.producer) - } - - /// Forward the latest value from `samplee` with the value from `self` as a - /// tuple, only when `self` sends a `value` event. - /// This is like a flipped version of `sample(with:)`, but `samplee`'s - /// terminal events are completely ignored. - /// - /// - note: If `self` fires before a value has been observed on `samplee`, - /// nothing happens. - /// - /// - parameters: - /// - samplee: A producer whose latest value is sampled by `self`. - /// - /// - returns: A signal that will send values from `self` and `samplee`, - /// sampled (possibly multiple times) by `self`, then terminate - /// once `self` has terminated. **`samplee`'s terminated events - /// are ignored**. - public func withLatest(from samplee: Samplee) -> SignalProducer<(Value, Samplee.Value), Error> where Samplee.Error == NoError { - return liftRight(Signal.withLatest)(samplee.producer) - } - - /// Forwards events from `self` until `lifetime` ends, at which point the - /// returned producer will complete. - /// - /// - parameters: - /// - lifetime: A lifetime whose `ended` signal will cause the returned - /// producer to complete. - /// - /// - returns: A producer that will deliver events until `lifetime` ends. - public func take(during lifetime: Lifetime) -> SignalProducer { - return lift { $0.take(during: lifetime) } - } - - /// Forward events from `self` until `trigger` sends a `value` or `completed` - /// event, at which point the returned producer will complete. - /// - /// - parameters: - /// - trigger: A producer whose `value` or `completed` events will stop the - /// delivery of `value` events from `self`. - /// - /// - returns: A producer that will deliver events until `trigger` sends - /// `value` or `completed` events. - public func take(until trigger: Trigger) -> SignalProducer where Trigger.Value == (), Trigger.Error == NoError { - return liftRight(Signal.take(until:))(trigger.producer) - } - - /// Do not forward any values from `self` until `trigger` sends a `value` - /// or `completed`, at which point the returned producer behaves exactly - /// like `producer`. - /// - /// - parameters: - /// - trigger: A producer whose `value` or `completed` events will start - /// the deliver of events on `self`. - /// - /// - returns: A producer that will deliver events once the `trigger` sends - /// `value` or `completed` events. - public func skip(until trigger: Trigger) -> SignalProducer where Trigger.Value == (), Trigger.Error == NoError { - return liftRight(Signal.skip(until:))(trigger.producer) - } - - /// Forward events from `self` with history: values of the returned signal - /// are a tuples whose first member is the previous value and whose second member - /// is the current value. `initial` is supplied as the first member when `self` - /// sends its first value. - /// - /// - parameters: - /// - initial: A value that will be combined with the first value sent by - /// `self`. - /// - /// - returns: A signal that sends tuples that contain previous and current - /// sent values of `self`. - public func combinePrevious(_ initial: Value) -> SignalProducer<(Value, Value), Error> { - return lift { $0.combinePrevious(initial) } - } - - /// Forward events from `self` with history: values of the produced signal - /// are a tuples whose first member is the previous value and whose second member - /// is the current value. - /// - /// The produced `Signal` would not emit any tuple until it has received at least two - /// values. - /// - /// - returns: A producer that sends tuples that contain previous and current - /// sent values of `self`. - public func combinePrevious() -> SignalProducer<(Value, Value), Error> { - return lift { $0.combinePrevious() } - } - - /// Combine all values from `self`, and forward the final result. - /// - /// See `scan(_:_:)` if the resulting producer needs to forward also the partial - /// results. - /// - /// - parameters: - /// - initialResult: The value to use as the initial accumulating value. - /// - nextPartialResult: A closure that combines the accumulating value and the - /// latest value from `self`. The result would be used in the - /// next call of `nextPartialResult`, or emit to the returned - /// `Signal` when `self` completes. - /// - /// - returns: A producer that sends the final result as `self` completes. - public func reduce(_ initialResult: U, _ nextPartialResult: @escaping (U, Value) -> U) -> SignalProducer { - return lift { $0.reduce(initialResult, nextPartialResult) } - } - - /// Combine all values from `self`, and forward the final result. - /// - /// See `scan(into:_:)` if the resulting producer needs to forward also the partial - /// results. - /// - /// - parameters: - /// - initialResult: The value to use as the initial accumulating value. - /// - nextPartialResult: A closure that combines the accumulating value and the - /// latest value from `self`. The result would be used in the - /// next call of `nextPartialResult`, or emit to the returned - /// `Signal` when `self` completes. - /// - /// - returns: A producer that sends the final value as `self` completes. - public func reduce(into initialResult: U, _ nextPartialResult: @escaping (inout U, Value) -> Void) -> SignalProducer { - return lift { $0.reduce(into: initialResult, nextPartialResult) } - } - - /// Combine all values from `self`, and forward the partial results and the final - /// result. - /// - /// See `reduce(_:_:)` if the resulting producer needs to forward only the final - /// result. - /// - /// - parameters: - /// - initialResult: The value to use as the initial accumulating value. - /// - nextPartialResult: A closure that combines the accumulating value and the - /// latest value from `self`. The result would be forwarded, - /// and would be used in the next call of `nextPartialResult`. - /// - /// - returns: A producer that sends the partial results of the accumuation, and the - /// final result as `self` completes. - public func scan(_ initialResult: U, _ nextPartialResult: @escaping (U, Value) -> U) -> SignalProducer { - return lift { $0.scan(initialResult, nextPartialResult) } - } - - /// Combine all values from `self`, and forward the partial results and the final - /// result. - /// - /// See `reduce(into:_:)` if the resulting producer needs to forward only the final - /// result. - /// - /// - parameters: - /// - initialResult: The value to use as the initial accumulating value. - /// - nextPartialResult: A closure that combines the accumulating value and the - /// latest value from `self`. The result would be forwarded, - /// and would be used in the next call of `nextPartialResult`. - /// - /// - returns: A producer that sends the partial results of the accumuation, and the - /// final result as `self` completes. - public func scan(into initialResult: U, _ nextPartialResult: @escaping (inout U, Value) -> Void) -> SignalProducer { - return lift { $0.scan(into: initialResult, nextPartialResult) } - } - - /// Forward only values from `self` that are not considered equivalent to its - /// immediately preceding value. - /// - /// - note: The first value is always forwarded. - /// - /// - parameters: - /// - isEquivalent: A closure to determine whether two values are equivalent. - /// - /// - returns: A producer which conditionally forwards values from `self` - public func skipRepeats(_ isEquivalent: @escaping (Value, Value) -> Bool) -> SignalProducer { - return lift { $0.skipRepeats(isEquivalent) } - } - - /// Do not forward any value from `self` until `shouldContinue` returns `false`, at - /// which point the returned signal starts to forward values from `self`, including - /// the one leading to the toggling. - /// - /// - parameters: - /// - shouldContinue: A closure to determine whether the skipping should continue. - /// - /// - returns: A producer which conditionally forwards values from `self`. - public func skip(while shouldContinue: @escaping (Value) -> Bool) -> SignalProducer { - return lift { $0.skip(while: shouldContinue) } - } - - /// Forwards events from `self` until `replacement` begins sending events. - /// - /// - parameters: - /// - replacement: A producer to wait to wait for values from and start - /// sending them as a replacement to `self`'s values. - /// - /// - returns: A producer which passes through `value`, `failed`, and - /// `interrupted` events from `self` until `replacement` sends an - /// event, at which point the returned producer will send that - /// event and switch to passing through events from `replacement` - /// instead, regardless of whether `self` has sent events - /// already. - public func take(untilReplacement replacement: Replacement) -> SignalProducer where Replacement.Value == Value, Replacement.Error == Error { - return liftRight(Signal.take(untilReplacement:))(replacement.producer) - } - - /// Wait until `self` completes and then forward the final `count` values - /// on the returned producer. - /// - /// - parameters: - /// - count: Number of last events to send after `self` completes. - /// - /// - returns: A producer that receives up to `count` values from `self` - /// after `self` completes. - public func take(last count: Int) -> SignalProducer { - return lift { $0.take(last: count) } - } - - /// Forward any values from `self` until `shouldContinue` returns `false`, at which - /// point the produced `Signal` would complete. - /// - /// - parameters: - /// - shouldContinue: A closure to determine whether the forwarding of values should - /// continue. - /// - /// - returns: A producer which conditionally forwards values from `self`. - public func take(while shouldContinue: @escaping (Value) -> Bool) -> SignalProducer { - return lift { $0.take(while: shouldContinue) } - } - - /// Zip elements of two producers into pairs. The elements of any Nth pair - /// are the Nth elements of the two input producers. - /// - /// - parameters: - /// - other: A producer to zip values with. - /// - /// - returns: A producer that sends tuples of `self` and `otherProducer`. - public func zip(with other: Other) -> SignalProducer<(Value, Other.Value), Error> where Other.Error == Error { - return SignalProducer.zip(self, other) - } - - /// Apply an action to every value from `self`, and forward the value if the action - /// succeeds. If the action fails with an error, the produced `Signal` would propagate - /// the failure and terminate. - /// - /// - parameters: - /// - action: An action which yields a `Result`. - /// - /// - returns: A producer which forwards the values from `self` until the given action - /// fails. - public func attempt(_ action: @escaping (Value) -> Result<(), Error>) -> SignalProducer { - return lift { $0.attempt(action) } - } - - /// Apply a transform to every value from `self`, and forward the transformed value - /// if the action succeeds. If the action fails with an error, the produced `Signal` - /// would propagate the failure and terminate. - /// - /// - parameters: - /// - action: A transform which yields a `Result` of the transformed value or the - /// error. - /// - /// - returns: A producer which forwards the transformed values. - public func attemptMap(_ action: @escaping (Value) -> Result) -> SignalProducer { - return lift { $0.attemptMap(action) } - } - - /// Forward the latest value on `scheduler` after at least `interval` - /// seconds have passed since *the returned signal* last sent a value. - /// - /// If `self` always sends values more frequently than `interval` seconds, - /// then the returned signal will send a value every `interval` seconds. - /// - /// To measure from when `self` last sent a value, see `debounce`. - /// - /// - seealso: `debounce` - /// - /// - note: If multiple values are received before the interval has elapsed, - /// the latest value is the one that will be passed on. - /// - /// - note: If `self` terminates while a value is being throttled, that - /// value will be discarded and the returned producer will terminate - /// immediately. - /// - /// - note: If the device time changed backwards before previous date while - /// a value is being throttled, and if there is a new value sent, - /// the new value will be passed anyway. - /// - /// - parameters: - /// - interval: Number of seconds to wait between sent values. - /// - scheduler: A scheduler to deliver events on. - /// - /// - returns: A producer that sends values at least `interval` seconds - /// appart on a given scheduler. - public func throttle(_ interval: TimeInterval, on scheduler: DateScheduler) -> SignalProducer { - return lift { $0.throttle(interval, on: scheduler) } - } - - /// Conditionally throttles values sent on the receiver whenever - /// `shouldThrottle` is true, forwarding values on the given scheduler. - /// - /// - note: While `shouldThrottle` remains false, values are forwarded on the - /// given scheduler. If multiple values are received while - /// `shouldThrottle` is true, the latest value is the one that will - /// be passed on. - /// - /// - note: If the input signal terminates while a value is being throttled, - /// that value will be discarded and the returned signal will - /// terminate immediately. - /// - /// - note: If `shouldThrottle` completes before the receiver, and its last - /// value is `true`, the returned signal will remain in the throttled - /// state, emitting no further values until it terminates. - /// - /// - parameters: - /// - shouldThrottle: A boolean property that controls whether values - /// should be throttled. - /// - scheduler: A scheduler to deliver events on. - /// - /// - returns: A producer that sends values only while `shouldThrottle` is false. - public func throttle(while shouldThrottle: P, on scheduler: Scheduler) -> SignalProducer - where P.Value == Bool - { - // Using `Property.init(_:)` avoids capturing a strong reference - // to `shouldThrottle`, so that we don't extend its lifetime. - let shouldThrottle = Property(shouldThrottle) - - return lift { $0.throttle(while: shouldThrottle, on: scheduler) } - } - - /// Forward the latest value on `scheduler` after at least `interval` - /// seconds have passed since `self` last sent a value. - /// - /// If `self` always sends values more frequently than `interval` seconds, - /// then the returned signal will never send any values. - /// - /// To measure from when the *returned signal* last sent a value, see - /// `throttle`. - /// - /// - seealso: `throttle` - /// - /// - note: If multiple values are received before the interval has elapsed, - /// the latest value is the one that will be passed on. - /// - /// - note: If `self` terminates while a value is being debounced, - /// that value will be discarded and the returned producer will - /// terminate immediately. - /// - /// - parameters: - /// - interval: A number of seconds to wait before sending a value. - /// - scheduler: A scheduler to send values on. - /// - /// - returns: A producer that sends values that are sent from `self` at - /// least `interval` seconds apart. - public func debounce(_ interval: TimeInterval, on scheduler: DateScheduler) -> SignalProducer { - return lift { $0.debounce(interval, on: scheduler) } - } - - /// Forward events from `self` until `interval`. Then if producer isn't - /// completed yet, fails with `error` on `scheduler`. - /// - /// - note: If the interval is 0, the timeout will be scheduled immediately. - /// The producer must complete synchronously (or on a faster - /// scheduler) to avoid the timeout. - /// - /// - parameters: - /// - interval: Number of seconds to wait for `self` to complete. - /// - error: Error to send with `failed` event if `self` is not completed - /// when `interval` passes. - /// - scheduler: A scheduler to deliver error on. - /// - /// - returns: A producer that sends events for at most `interval` seconds, - /// then, if not `completed` - sends `error` with `failed` event - /// on `scheduler`. - public func timeout(after interval: TimeInterval, raising error: Error, on scheduler: DateScheduler) -> SignalProducer { - return lift { $0.timeout(after: interval, raising: error, on: scheduler) } - } -} - -extension SignalProducer where Value: OptionalProtocol { - /// Unwraps non-`nil` values and forwards them on the returned signal, `nil` - /// values are dropped. - /// - /// - returns: A producer that sends only non-nil values. - public func skipNil() -> SignalProducer { - return lift { $0.skipNil() } - } -} - -extension SignalProducer where Value: EventProtocol, Error == NoError { - /// The inverse of materialize(), this will translate a producer of `Event` - /// _values_ into a producer of those events themselves. - /// - /// - returns: A producer that sends values carried by `self` events. - public func dematerialize() -> SignalProducer { - return lift { $0.dematerialize() } - } -} - -extension SignalProducer where Error == NoError { - /// Promote a producer that does not generate failures into one that can. - /// - /// - note: This does not actually cause failers to be generated for the - /// given producer, but makes it easier to combine with other - /// producers that may fail; for example, with operators like - /// `combineLatestWith`, `zipWith`, `flatten`, etc. - /// - /// - parameters: - /// - _ An `ErrorType`. - /// - /// - returns: A producer that has an instantiatable `ErrorType`. - public func promoteError(_: F.Type = F.self) -> SignalProducer { - return lift { $0.promoteError(F.self) } - } - - /// Promote a producer that does not generate failures into one that can. - /// - /// - note: This does not actually cause failers to be generated for the - /// given producer, but makes it easier to combine with other - /// producers that may fail; for example, with operators like - /// `combineLatestWith`, `zipWith`, `flatten`, etc. - /// - /// - parameters: - /// - _ An `ErrorType`. - /// - /// - returns: A producer that has an instantiatable `ErrorType`. - public func promoteError(_: Error.Type = Error.self) -> SignalProducer { - return self - } - - /// Forward events from `self` until `interval`. Then if producer isn't - /// completed yet, fails with `error` on `scheduler`. - /// - /// - note: If the interval is 0, the timeout will be scheduled immediately. - /// The producer must complete synchronously (or on a faster - /// scheduler) to avoid the timeout. - /// - /// - parameters: - /// - interval: Number of seconds to wait for `self` to complete. - /// - error: Error to send with `failed` event if `self` is not completed - /// when `interval` passes. - /// - scheudler: A scheduler to deliver error on. - /// - /// - returns: A producer that sends events for at most `interval` seconds, - /// then, if not `completed` - sends `error` with `failed` event - /// on `scheduler`. - public func timeout( - after interval: TimeInterval, - raising error: NewError, - on scheduler: DateScheduler - ) -> SignalProducer { - return lift { $0.timeout(after: interval, raising: error, on: scheduler) } - } - - /// Apply a throwable action to every value from `self`, and forward the values - /// if the action succeeds. If the action throws an error, the produced `Signal` - /// would propagate the failure and terminate. - /// - /// - parameters: - /// - action: A throwable closure to perform an arbitrary action on the value. - /// - /// - returns: A producer which forwards the successful values of the given action. - public func attempt(_ action: @escaping (Value) throws -> Void) -> SignalProducer { - return lift { $0.attempt(action) } - } - - /// Apply a throwable action to every value from `self`, and forward the results - /// if the action succeeds. If the action throws an error, the produced `Signal` - /// would propagate the failure and terminate. - /// - /// - parameters: - /// - action: A throwable closure to perform an arbitrary action on the value, and - /// yield a result. - /// - /// - returns: A producer which forwards the successful results of the given action. - public func attemptMap(_ action: @escaping (Value) throws -> U) -> SignalProducer { - return lift { $0.attemptMap(action) } - } -} - -extension SignalProducer where Error == AnyError { - /// Apply a throwable action to every value from `self`, and forward the values - /// if the action succeeds. If the action throws an error, the produced `Signal` - /// would propagate the failure and terminate. - /// - /// - parameters: - /// - action: A throwable closure to perform an arbitrary action on the value. - /// - /// - returns: A producer which forwards the successful values of the given action. - public func attempt(_ action: @escaping (Value) throws -> Void) -> SignalProducer { - return lift { $0.attempt(action) } - } - - /// Apply a throwable transform to every value from `self`, and forward the results - /// if the action succeeds. If the transform throws an error, the produced `Signal` - /// would propagate the failure and terminate. - /// - /// - parameters: - /// - transform: A throwable transform. - /// - /// - returns: A producer which forwards the successfully transformed values. - public func attemptMap(_ transform: @escaping (Value) throws -> U) -> SignalProducer { - return lift { $0.attemptMap(transform) } - } -} - -extension SignalProducer where Value == Never { - /// Promote a signal that does not generate values, as indicated by `Never`, to be - /// a signal of the given type of value. - /// - /// - note: The promotion does not result in any value being generated. - /// - /// - parameters: - /// - _ The type of value to promote to. - /// - /// - returns: A signal that forwards all terminal events from `self`. - public func promoteValue(_: U.Type = U.self) -> SignalProducer { - return lift { $0.promoteValue(U.self) } - } - - /// Promote a signal that does not generate values, as indicated by `Never`, to be - /// a signal of the given type of value. - /// - /// - note: The promotion does not result in any value being generated. - /// - /// - parameters: - /// - _ The type of value to promote to. - /// - /// - returns: A signal that forwards all terminal events from `self`. - public func promoteValue(_: Value.Type = Value.self) -> SignalProducer { - return self - } -} - -extension SignalProducer where Value: Equatable { - /// Forward only values from `self` that are not equal to its immediately preceding - /// value. - /// - /// - note: The first value is always forwarded. - /// - /// - returns: A property which conditionally forwards values from `self`. - public func skipRepeats() -> SignalProducer { - return lift { $0.skipRepeats() } - } -} - -extension SignalProducer { - /// Forward only those values from `self` that have unique identities across - /// the set of all values that have been seen. - /// - /// - note: This causes the identities to be retained to check for - /// uniqueness. - /// - /// - parameters: - /// - transform: A closure that accepts a value and returns identity - /// value. - /// - /// - returns: A producer that sends unique values during its lifetime. - public func uniqueValues(_ transform: @escaping (Value) -> Identity) -> SignalProducer { - return lift { $0.uniqueValues(transform) } - } -} - -extension SignalProducer where Value: Hashable { - /// Forward only those values from `self` that are unique across the set of - /// all values that have been seen. - /// - /// - note: This causes the values to be retained to check for uniqueness. - /// Providing a function that returns a unique value for each sent - /// value can help you reduce the memory footprint. - /// - /// - returns: A producer that sends unique values during its lifetime. - public func uniqueValues() -> SignalProducer { - return lift { $0.uniqueValues() } - } -} - -extension SignalProducer { - /// Injects side effects to be performed upon the specified producer events. - /// - /// - note: In a composed producer, `starting` is invoked in the reverse - /// direction of the flow of events. - /// - /// - parameters: - /// - starting: A closure that is invoked before the producer is started. - /// - started: A closure that is invoked after the producer is started. - /// - event: A closure that accepts an event and is invoked on every - /// received event. - /// - failed: A closure that accepts error object and is invoked for - /// `failed` event. - /// - completed: A closure that is invoked for `completed` event. - /// - interrupted: A closure that is invoked for `interrupted` event. - /// - terminated: A closure that is invoked for any terminating event. - /// - disposed: A closure added as disposable when signal completes. - /// - value: A closure that accepts a value from `value` event. - /// - /// - returns: A producer with attached side-effects for given event cases. - public func on( - starting: (() -> Void)? = nil, - started: (() -> Void)? = nil, - event: ((ProducedSignal.Event) -> Void)? = nil, - failed: ((Error) -> Void)? = nil, - completed: (() -> Void)? = nil, - interrupted: (() -> Void)? = nil, - terminated: (() -> Void)? = nil, - disposed: (() -> Void)? = nil, - value: ((Value) -> Void)? = nil - ) -> SignalProducer { - return SignalProducer { () -> Instance in - let instance = self.producer.builder() - let signal = instance.producedSignal.on(event: event, - failed: failed, - completed: completed, - interrupted: interrupted, - terminated: terminated, - disposed: disposed, - value: value) - - return Instance(producedSignal: signal, - observerDidSetup: { starting?(); instance.observerDidSetup(); started?() }, - interruptHandle: instance.interruptHandle) - } - } - - /// Start the returned producer on the given `Scheduler`. - /// - /// - note: This implies that any side effects embedded in the producer will - /// be performed on the given scheduler as well. - /// - /// - note: Events may still be sent upon other schedulers — this merely - /// affects where the `start()` method is run. - /// - /// - parameters: - /// - scheduler: A scheduler to deliver events on. - /// - /// - returns: A producer that will deliver events on given `scheduler` when - /// started. - public func start(on scheduler: Scheduler) -> SignalProducer { - return SignalProducer { observer, lifetime in - lifetime += scheduler.schedule { - self.startWithSignal { signal, signalDisposable in - lifetime.observeEnded(signalDisposable.dispose) - signal.observe(observer) - } - } - } - } -} - -extension SignalProducer { - /// Combines the values of all the given producers, in the manner described by - /// `combineLatest(with:)`. - public static func combineLatest(_ a: A, _ b: B) -> SignalProducer<(Value, B.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error { - return .init { observer, lifetime in - flattenStart(lifetime, a.producer, b.producer) { Signal.combineLatest($0, $1).observe(observer) } - } - } - - /// Combines the values of all the given producers, in the manner described by - /// `combineLatest(with:)`. - public static func combineLatest(_ a: A, _ b: B, _ c: C) -> SignalProducer<(Value, B.Value, C.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error { - return .init { observer, lifetime in - flattenStart(lifetime, a.producer, b.producer, c.producer) { Signal.combineLatest($0, $1, $2).observe(observer) } - } - } - - /// Combines the values of all the given producers, in the manner described by - /// `combineLatest(with:)`. - public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D) -> SignalProducer<(Value, B.Value, C.Value, D.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error { - return .init { observer, lifetime in - flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer) { Signal.combineLatest($0, $1, $2, $3).observe(observer) } - } - } - - /// Combines the values of all the given producers, in the manner described by - /// `combineLatest(with:)`. - public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value), Error> where A.Value == Value, A.Error == Error , B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error { - return .init { observer, lifetime in - flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer) { Signal.combineLatest($0, $1, $2, $3, $4).observe(observer) } - } - } - - /// Combines the values of all the given producers, in the manner described by - /// `combineLatest(with:)`. - public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error { - return .init { observer, lifetime in - flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer) { Signal.combineLatest($0, $1, $2, $3, $4, $5).observe(observer) } - } - } - - /// Combines the values of all the given producers, in the manner described by - /// `combineLatest(with:)`. - public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error, G.Error == Error { - return .init { observer, lifetime in - flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer) { Signal.combineLatest($0, $1, $2, $3, $4, $5, $6).observe(observer) } - } - } - - /// Combines the values of all the given producers, in the manner described by - /// `combineLatest(with:)`. - public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error, G.Error == Error, H.Error == Error { - return .init { observer, lifetime in - flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer) { Signal.combineLatest($0, $1, $2, $3, $4, $5, $6, $7).observe(observer) } - } - } - - /// Combines the values of all the given producers, in the manner described by - /// `combineLatest(with:)`. - public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value, I.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error, G.Error == Error, H.Error == Error, I.Error == Error { - return .init { observer, lifetime in - flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer, i.producer) { Signal.combineLatest($0, $1, $2, $3, $4, $5, $6, $7, $8).observe(observer) } - } - } - - /// Combines the values of all the given producers, in the manner described by - /// `combineLatest(with:)`. - public static func combineLatest(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I, _ j: J) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value, I.Value, J.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error, G.Error == Error, H.Error == Error, I.Error == Error, J.Error == Error { - return .init { observer, lifetime in - flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer, i.producer, j.producer) { Signal.combineLatest($0, $1, $2, $3, $4, $5, $6, $7, $8, $9).observe(observer) } - } - } - - /// Combines the values of all the given producers, in the manner described by - /// `combineLatest(with:)`. Will return an empty `SignalProducer` if the sequence is empty. - public static func combineLatest(_ producers: S) -> SignalProducer<[Value], Error> where S.Iterator.Element: SignalProducerConvertible, S.Iterator.Element.Value == Value, S.Iterator.Element.Error == Error { - return start(producers, Signal.combineLatest) - } - - /// Zips the values of all the given producers, in the manner described by - /// `zip(with:)`. - public static func zip(_ a: A, _ b: B) -> SignalProducer<(Value, B.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error { - return .init { observer, lifetime in - flattenStart(lifetime, a.producer, b.producer) { Signal.zip($0, $1).observe(observer) } - } - } - - /// Zips the values of all the given producers, in the manner described by - /// `zip(with:)`. - public static func zip(_ a: A, _ b: B, _ c: C) -> SignalProducer<(Value, B.Value, C.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error { - return .init { observer, lifetime in - flattenStart(lifetime, a.producer, b.producer, c.producer) { Signal.zip($0, $1, $2).observe(observer) } - } - } - - /// Zips the values of all the given producers, in the manner described by - /// `zip(with:)`. - public static func zip(_ a: A, _ b: B, _ c: C, _ d: D) -> SignalProducer<(Value, B.Value, C.Value, D.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error { - return .init { observer, lifetime in - flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer) { Signal.zip($0, $1, $2, $3).observe(observer) } - } - } - - /// Zips the values of all the given producers, in the manner described by - /// `zip(with:)`. - public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error { - return .init { observer, lifetime in - flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer) { Signal.zip($0, $1, $2, $3, $4).observe(observer) } - } - } - - /// Zips the values of all the given producers, in the manner described by - /// `zip(with:)`. - public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error { - return .init { observer, lifetime in - flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer) { Signal.zip($0, $1, $2, $3, $4, $5).observe(observer) } - } - } - - /// Zips the values of all the given producers, in the manner described by - /// `zip(with:)`. - public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error, G.Error == Error { - return .init { observer, lifetime in - flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer) { Signal.zip($0, $1, $2, $3, $4, $5, $6).observe(observer) } - } - } - - /// Zips the values of all the given producers, in the manner described by - /// `zip(with:)`. - public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error, G.Error == Error, H.Error == Error { - return .init { observer, lifetime in - flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer) { Signal.zip($0, $1, $2, $3, $4, $5, $6, $7).observe(observer) } - } - } - - /// Zips the values of all the given producers, in the manner described by - /// `zip(with:)`. - public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value, I.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error, G.Error == Error, H.Error == Error, I.Error == Error { - return .init { observer, lifetime in - flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer, i.producer) { Signal.zip($0, $1, $2, $3, $4, $5, $6, $7, $8).observe(observer) } - } - } - - /// Zips the values of all the given producers, in the manner described by - /// `zip(with:)`. - public static func zip(_ a: A, _ b: B, _ c: C, _ d: D, _ e: E, _ f: F, _ g: G, _ h: H, _ i: I, _ j: J) -> SignalProducer<(Value, B.Value, C.Value, D.Value, E.Value, F.Value, G.Value, H.Value, I.Value, J.Value), Error> where A.Value == Value, A.Error == Error, B.Error == Error, C.Error == Error, D.Error == Error, E.Error == Error, F.Error == Error, G.Error == Error, H.Error == Error, I.Error == Error, J.Error == Error { - return .init { observer, lifetime in - flattenStart(lifetime, a.producer, b.producer, c.producer, d.producer, e.producer, f.producer, g.producer, h.producer, i.producer, j.producer) { Signal.zip($0, $1, $2, $3, $4, $5, $6, $7, $8, $9).observe(observer) } - } - } - - /// Zips the values of all the given producers, in the manner described by - /// `zipWith`. Will return an empty `SignalProducer` if the sequence is empty. - public static func zip(_ producers: S) -> SignalProducer<[Value], Error> where S.Iterator.Element: SignalProducerConvertible, S.Iterator.Element.Value == Value, S.Iterator.Element.Error == Error { - return start(producers, Signal.zip) - } - - private static func start(_ producers: S, _ transform: @escaping (ReversedRandomAccessCollection<[Signal]>) -> Signal<[Value], Error>) -> SignalProducer<[Value], Error> where S.Iterator.Element: SignalProducerConvertible, S.Iterator.Element.Value == Value, S.Iterator.Element.Error == Error { - return SignalProducer<[Value], Error> { observer, lifetime in - var producers = Array(producers) - var signals: [Signal] = [] - - guard !producers.isEmpty else { - observer.sendCompleted() - return - } - - func start() { - guard !producers.isEmpty else { - transform(signals.reversed()).observe(observer) - return - } - - producers.removeLast().producer.startWithSignal { signal, interruptHandle in - lifetime.observeEnded(interruptHandle.dispose) - signals.append(signal) - - start() - } - } - - start() - } - } -} - -extension SignalProducer { - /// Repeat `self` a total of `count` times. In other words, start producer - /// `count` number of times, each one after previously started producer - /// completes. - /// - /// - note: Repeating `1` time results in an equivalent signal producer. - /// - /// - note: Repeating `0` times results in a producer that instantly - /// completes. - /// - /// - precondition: `count` must be non-negative integer. - /// - /// - parameters: - /// - count: Number of repetitions. - /// - /// - returns: A signal producer start sequentially starts `self` after - /// previously started producer completes. - public func `repeat`(_ count: Int) -> SignalProducer { - precondition(count >= 0) - - if count == 0 { - return .empty - } else if count == 1 { - return producer - } - - return SignalProducer { observer, lifetime in - let serialDisposable = SerialDisposable() - lifetime += serialDisposable - - func iterate(_ current: Int) { - self.startWithSignal { signal, signalDisposable in - serialDisposable.inner = signalDisposable - - signal.observe { event in - if case .completed = event { - let remainingTimes = current - 1 - if remainingTimes > 0 { - iterate(remainingTimes) - } else { - observer.sendCompleted() - } - } else { - observer.action(event) - } - } - } - } - - iterate(count) - } - } - - /// Ignore failures up to `count` times. - /// - /// - precondition: `count` must be non-negative integer. - /// - /// - parameters: - /// - count: Number of retries. - /// - /// - returns: A signal producer that restarts up to `count` times. - public func retry(upTo count: Int) -> SignalProducer { - precondition(count >= 0) - - if count == 0 { - return producer - } else { - return flatMapError { _ in - self.retry(upTo: count - 1) - } - } - } - - /// Wait for completion of `self`, *then* forward all events from - /// `replacement`. Any failure or interruption sent from `self` is - /// forwarded immediately, in which case `replacement` will not be started, - /// and none of its events will be be forwarded. - /// - /// - note: All values sent from `self` are ignored. - /// - /// - parameters: - /// - replacement: A producer to start when `self` completes. - /// - /// - returns: A producer that sends events from `self` and then from - /// `replacement` when `self` completes. - public func then(_ replacement: SignalProducer) -> SignalProducer { - return _then(replacement.promoteError(Error.self)) - } - - /// Wait for completion of `self`, *then* forward all events from - /// `replacement`. Any failure or interruption sent from `self` is - /// forwarded immediately, in which case `replacement` will not be started, - /// and none of its events will be be forwarded. - /// - /// - note: All values sent from `self` are ignored. - /// - /// - parameters: - /// - replacement: A producer to start when `self` completes. - /// - /// - returns: A producer that sends events from `self` and then from - /// `replacement` when `self` completes. - public func then(_ replacement: SignalProducer) -> SignalProducer { - return _then(replacement) - } - - // NOTE: The overload below is added to disambiguate compile-time selection of - // `then(_:)`. - - /// Wait for completion of `self`, *then* forward all events from - /// `replacement`. Any failure or interruption sent from `self` is - /// forwarded immediately, in which case `replacement` will not be started, - /// and none of its events will be be forwarded. - /// - /// - note: All values sent from `self` are ignored. - /// - /// - parameters: - /// - replacement: A producer to start when `self` completes. - /// - /// - returns: A producer that sends events from `self` and then from - /// `replacement` when `self` completes. - public func then(_ replacement: SignalProducer) -> SignalProducer { - return _then(replacement) - } - - // NOTE: The method below is the shared implementation of `then(_:)`. The underscore - // prefix is added to avoid self referencing in `then(_:)` overloads with - // regard to the most specific rule of overload selection in Swift. - - internal func _then(_ replacement: SignalProducer) -> SignalProducer { - return SignalProducer { observer, lifetime in - self.startWithSignal { signal, signalDisposable in - lifetime += signalDisposable - - signal.observe { event in - switch event { - case let .failed(error): - observer.send(error: error) - case .completed: - lifetime += replacement.start(observer) - case .interrupted: - observer.sendInterrupted() - case .value: - break - } - } - } - } - } -} - -extension SignalProducer where Error == NoError { - /// Wait for completion of `self`, *then* forward all events from - /// `replacement`. - /// - /// - note: All values sent from `self` are ignored. - /// - /// - parameters: - /// - replacement: A producer to start when `self` completes. - /// - /// - returns: A producer that sends events from `self` and then from - /// `replacement` when `self` completes. - public func then(_ replacement: SignalProducer) -> SignalProducer { - return promoteError(NewError.self)._then(replacement) - } - - // NOTE: The overload below is added to disambiguate compile-time selection of - // `then(_:)`. - - /// Wait for completion of `self`, *then* forward all events from - /// `replacement`. - /// - /// - note: All values sent from `self` are ignored. - /// - /// - parameters: - /// - replacement: A producer to start when `self` completes. - /// - /// - returns: A producer that sends events from `self` and then from - /// `replacement` when `self` completes. - public func then(_ replacement: SignalProducer) -> SignalProducer { - return _then(replacement) - } -} - -extension SignalProducer { - /// Start the producer, then block, waiting for the first value. - /// - /// When a single value or error is sent, the returned `Result` will - /// represent those cases. However, when no values are sent, `nil` will be - /// returned. - /// - /// - returns: Result when single `value` or `failed` event is received. - /// `nil` when no events are received. - public func first() -> Result? { - return take(first: 1).single() - } - - /// Start the producer, then block, waiting for events: `value` and - /// `completed`. - /// - /// When a single value or error is sent, the returned `Result` will - /// represent those cases. However, when no values are sent, or when more - /// than one value is sent, `nil` will be returned. - /// - /// - returns: Result when single `value` or `failed` event is received. - /// `nil` when 0 or more than 1 events are received. - public func single() -> Result? { - let semaphore = DispatchSemaphore(value: 0) - var result: Result? - - take(first: 2).start { event in - switch event { - case let .value(value): - if result != nil { - // Move into failure state after recieving another value. - result = nil - return - } - result = .success(value) - case let .failed(error): - result = .failure(error) - semaphore.signal() - case .completed, .interrupted: - semaphore.signal() - } - } - - semaphore.wait() - return result - } - - /// Start the producer, then block, waiting for the last value. - /// - /// When a single value or error is sent, the returned `Result` will - /// represent those cases. However, when no values are sent, `nil` will be - /// returned. - /// - /// - returns: Result when single `value` or `failed` event is received. - /// `nil` when no events are received. - public func last() -> Result? { - return take(last: 1).single() - } - - /// Starts the producer, then blocks, waiting for completion. - /// - /// When a completion or error is sent, the returned `Result` will represent - /// those cases. - /// - /// - returns: Result when single `completion` or `failed` event is - /// received. - public func wait() -> Result<(), Error> { - return then(SignalProducer<(), Error>(value: ())).last() ?? .success(()) - } - - /// Creates a new `SignalProducer` that will multicast values emitted by - /// the underlying producer, up to `capacity`. - /// This means that all clients of this `SignalProducer` will see the same - /// version of the emitted values/errors. - /// - /// The underlying `SignalProducer` will not be started until `self` is - /// started for the first time. When subscribing to this producer, all - /// previous values (up to `capacity`) will be emitted, followed by any new - /// values. - /// - /// If you find yourself needing *the current value* (the last buffered - /// value) you should consider using `PropertyType` instead, which, unlike - /// this operator, will guarantee at compile time that there's always a - /// buffered value. This operator is not recommended in most cases, as it - /// will introduce an implicit relationship between the original client and - /// the rest, so consider alternatives like `PropertyType`, or representing - /// your stream using a `Signal` instead. - /// - /// This operator is only recommended when you absolutely need to introduce - /// a layer of caching in front of another `SignalProducer`. - /// - /// - precondition: `capacity` must be non-negative integer. - /// - /// - parameters: - /// - capacity: Number of values to hold. - /// - /// - returns: A caching producer that will hold up to last `capacity` - /// values. - public func replayLazily(upTo capacity: Int) -> SignalProducer { - precondition(capacity >= 0, "Invalid capacity: \(capacity)") - - // This will go "out of scope" when the returned `SignalProducer` goes - // out of scope. This lets us know when we're supposed to dispose the - // underlying producer. This is necessary because `struct`s don't have - // `deinit`. - let lifetimeToken = Lifetime.Token() - let lifetime = Lifetime(lifetimeToken) - - let state = Atomic(ReplayState(upTo: capacity)) - - let start: Atomic<(() -> Void)?> = Atomic { - // Start the underlying producer. - self - .take(during: lifetime) - .start { event in - let observers: Bag.Observer>? = state.modify { state in - defer { state.enqueue(event) } - return state.observers - } - observers?.forEach { $0.action(event) } - } - } - - return SignalProducer { observer, lifetime in - // Don't dispose of the original producer until all observers - // have terminated. - lifetime.observeEnded { _ = lifetimeToken } - - while true { - var result: Result.Observer>.Token?, ReplayError>! - state.modify { - result = $0.observe(observer) - } - - switch result! { - case let .success(token): - if let token = token { - lifetime.observeEnded { - state.modify { - $0.removeObserver(using: token) - } - } - } - - // Start the underlying producer if it has never been started. - start.swap(nil)?() - - // Terminate the replay loop. - return - - case let .failure(error): - error.values.forEach(observer.send(value:)) - } - } - } - } -} - -extension SignalProducer where Value == Bool { - /// Create a producer that computes a logical NOT in the latest values of `self`. - /// - /// - returns: A producer that emits the logical NOT results. - public func negate() -> SignalProducer { - return self.lift { $0.negate() } - } - - /// Create a producer that computes a logical AND between the latest values of `self` - /// and `producer`. - /// - /// - parameters: - /// - booleans: A producer of booleans to be combined with `self`. - /// - /// - returns: A producer that emits the logical AND results. - public func and(_ booleans: Booleans) -> SignalProducer where Booleans.Value == Value, Booleans.Error == Error { - return self.liftLeft(Signal.and)(booleans.producer) - } - - /// Create a producer that computes a logical OR between the latest values of `self` - /// and `producer`. - /// - /// - parameters: - /// - booleans: A producer of booleans to be combined with `self`. - /// - /// - returns: A producer that emits the logical OR results. - public func or(_ booleans: Booleans) -> SignalProducer where Booleans.Value == Value, Booleans.Error == Error { - return self.liftLeft(Signal.or)(booleans.producer) - } -} - -/// Represents a recoverable error of an observer not being ready for an -/// attachment to a `ReplayState`, and the observer should replay the supplied -/// values before attempting to observe again. -private struct ReplayError: Error { - /// The values that should be replayed by the observer. - let values: [Value] -} - -private struct ReplayState { - let capacity: Int - - /// All cached values. - var values: [Value] = [] - - /// A termination event emitted by the underlying producer. - /// - /// This will be nil if termination has not occurred. - var terminationEvent: Signal.Event? - - /// The observers currently attached to the caching producer, or `nil` if the - /// caching producer was terminated. - var observers: Bag.Observer>? = Bag() - - /// The set of in-flight replay buffers. - var replayBuffers: [ObjectIdentifier: [Value]] = [:] - - /// Initialize the replay state. - /// - /// - parameters: - /// - capacity: The maximum amount of values which can be cached by the - /// replay state. - init(upTo capacity: Int) { - self.capacity = capacity - } - - /// Attempt to observe the replay state. - /// - /// - warning: Repeatedly observing the replay state with the same observer - /// should be avoided. - /// - /// - parameters: - /// - observer: The observer to be registered. - /// - /// - returns: If the observer is successfully attached, a `Result.success` - /// with the corresponding removal token would be returned. - /// Otherwise, a `Result.failure` with a `ReplayError` would be - /// returned. - mutating func observe(_ observer: Signal.Observer) -> Result.Observer>.Token?, ReplayError> { - // Since the only use case is `replayLazily`, which always creates a unique - // `Observer` for every produced signal, we can use the ObjectIdentifier of - // the `Observer` to track them directly. - let id = ObjectIdentifier(observer) - - switch replayBuffers[id] { - case .none where !values.isEmpty: - // No in-flight replay buffers was found, but the `ReplayState` has one or - // more cached values in the `ReplayState`. The observer should replay - // them before attempting to observe again. - replayBuffers[id] = [] - return .failure(ReplayError(values: values)) - - case let .some(buffer) where !buffer.isEmpty: - // An in-flight replay buffer was found with one or more buffered values. - // The observer should replay them before attempting to observe again. - defer { replayBuffers[id] = [] } - return .failure(ReplayError(values: buffer)) - - case let .some(buffer) where buffer.isEmpty: - // Since an in-flight but empty replay buffer was found, the observer is - // ready to be attached to the `ReplayState`. - replayBuffers.removeValue(forKey: id) - - default: - // No values has to be replayed. The observer is ready to be attached to - // the `ReplayState`. - break - } - - if let event = terminationEvent { - observer.action(event) - } - - return .success(observers?.insert(observer)) - } - - /// Enqueue the supplied event to the replay state. - /// - /// - parameter: - /// - event: The event to be cached. - mutating func enqueue(_ event: Signal.Event) { - switch event { - case let .value(value): - for key in replayBuffers.keys { - replayBuffers[key]!.append(value) - } - - switch capacity { - case 0: - // With a capacity of zero, `state.values` can never be filled. - break - - case 1: - values = [value] - - default: - values.append(value) - - let overflow = values.count - capacity - if overflow > 0 { - values.removeFirst(overflow) - } - } - - case .completed, .failed, .interrupted: - // Disconnect all observers and prevent future attachments. - terminationEvent = event - observers = nil - } - } - - /// Remove the observer represented by the supplied token. - /// - /// - parameters: - /// - token: The token of the observer to be removed. - mutating func removeObserver(using token: Bag.Observer>.Token) { - observers?.remove(using: token) - } -} - -extension SignalProducer where Value == Date, Error == NoError { - /// Create a repeating timer of the given interval, with a reasonable default - /// leeway, sending updates on the given scheduler. - /// - /// - note: This timer will never complete naturally, so all invocations of - /// `start()` must be disposed to avoid leaks. - /// - /// - precondition: `interval` must be non-negative number. - /// - /// - note: If you plan to specify an `interval` value greater than 200,000 - /// seconds, use `timer(interval:on:leeway:)` instead - /// and specify your own `leeway` value to avoid potential overflow. - /// - /// - parameters: - /// - interval: An interval between invocations. - /// - scheduler: A scheduler to deliver events on. - /// - /// - returns: A producer that sends `NSDate` values every `interval` seconds. - public static func timer(interval: DispatchTimeInterval, on scheduler: DateScheduler) -> SignalProducer { - // Apple's "Power Efficiency Guide for Mac Apps" recommends a leeway of - // at least 10% of the timer interval. - return timer(interval: interval, on: scheduler, leeway: interval * 0.1) - } - - /// Creates a repeating timer of the given interval, sending updates on the - /// given scheduler. - /// - /// - note: This timer will never complete naturally, so all invocations of - /// `start()` must be disposed to avoid leaks. - /// - /// - precondition: `interval` must be non-negative number. - /// - /// - precondition: `leeway` must be non-negative number. - /// - /// - parameters: - /// - interval: An interval between invocations. - /// - scheduler: A scheduler to deliver events on. - /// - leeway: Interval leeway. Apple's "Power Efficiency Guide for Mac Apps" - /// recommends a leeway of at least 10% of the timer interval. - /// - /// - returns: A producer that sends `NSDate` values every `interval` seconds. - public static func timer(interval: DispatchTimeInterval, on scheduler: DateScheduler, leeway: DispatchTimeInterval) -> SignalProducer { - precondition(interval.timeInterval >= 0) - precondition(leeway.timeInterval >= 0) - - return SignalProducer { observer, lifetime in - let disposable = scheduler.schedule(after: scheduler.currentDate.addingTimeInterval(interval), - interval: interval, - leeway: leeway, - action: { observer.send(value: scheduler.currentDate) }) - if let d = disposable { lifetime.observeEnded(d.dispose)} - } - } -} diff --git a/Sample/Pods/ReactiveSwift/Sources/UnidirectionalBinding.swift b/Sample/Pods/ReactiveSwift/Sources/UnidirectionalBinding.swift deleted file mode 100644 index 5c811b03..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/UnidirectionalBinding.swift +++ /dev/null @@ -1,165 +0,0 @@ -import Foundation -import Dispatch -import enum Result.NoError - -precedencegroup BindingPrecedence { - associativity: right - - // Binds tighter than assignment but looser than everything else - higherThan: AssignmentPrecedence -} - -infix operator <~ : BindingPrecedence - -// FIXME: Swift 4 - associated type arbitrary requirements -// public protocol BindingSource: SignalProducerConvertible where Error == NoError {} - -/// Describes a source which can be bound. -public protocol BindingSource: SignalProducerConvertible { - // FIXME: Swift 4 compiler regression. - // All requirements are replicated to workaround the type checker issue. - // https://bugs.swift.org/browse/SR-5090 - - associatedtype Value - associatedtype Error - - var producer: SignalProducer { get } -} -extension Signal: BindingSource {} -extension SignalProducer: BindingSource {} - -/// Describes an entity which be bond towards. -public protocol BindingTargetProvider { - associatedtype Value - - var bindingTarget: BindingTarget { get } -} - -extension BindingTargetProvider { - /// Binds a source to a target, updating the target's value to the latest - /// value sent by the source. - /// - /// - note: The binding will automatically terminate when the target is - /// deinitialized, or when the source sends a `completed` event. - /// - /// ```` - /// let property = MutableProperty(0) - /// let signal = Signal({ /* do some work after some time */ }) - /// property <~ signal - /// ```` - /// - /// ```` - /// let property = MutableProperty(0) - /// let signal = Signal({ /* do some work after some time */ }) - /// let disposable = property <~ signal - /// ... - /// // Terminates binding before property dealloc or signal's - /// // `completed` event. - /// disposable.dispose() - /// ```` - /// - /// - parameters: - /// - target: A target to be bond to. - /// - source: A source to bind. - /// - /// - returns: A disposable that can be used to terminate binding before the - /// deinitialization of the target or the source's `completed` - /// event. - @discardableResult - public static func <~ - - (provider: Self, source: Source) -> Disposable? - where Source.Value == Value, Source.Error == NoError - { - return source.producer - .take(during: provider.bindingTarget.lifetime) - .startWithValues(provider.bindingTarget.action) - } - - /// Binds a source to a target, updating the target's value to the latest - /// value sent by the source. - /// - /// - note: The binding will automatically terminate when the target is - /// deinitialized, or when the source sends a `completed` event. - /// - /// ```` - /// let property = MutableProperty(0) - /// let signal = Signal({ /* do some work after some time */ }) - /// property <~ signal - /// ```` - /// - /// ```` - /// let property = MutableProperty(0) - /// let signal = Signal({ /* do some work after some time */ }) - /// let disposable = property <~ signal - /// ... - /// // Terminates binding before property dealloc or signal's - /// // `completed` event. - /// disposable.dispose() - /// ```` - /// - /// - parameters: - /// - target: A target to be bond to. - /// - source: A source to bind. - /// - /// - returns: A disposable that can be used to terminate binding before the - /// deinitialization of the target or the source's `completed` - /// event. - @discardableResult - public static func <~ - - (provider: Self, source: Source) -> Disposable? - where Value == Source.Value?, Source.Error == NoError - { - return provider <~ source.producer.optionalize() - } -} - -/// A binding target that can be used with the `<~` operator. -public struct BindingTarget: BindingTargetProvider { - public let lifetime: Lifetime - public let action: (Value) -> Void - - public var bindingTarget: BindingTarget { - return self - } - - /// Creates a binding target which consumes values on the specified scheduler. - /// - /// If no scheduler is specified, the binding target would consume the value - /// immediately. - /// - /// - parameters: - /// - scheduler: The scheduler on which the `action` consumes the values. - /// - lifetime: The expected lifetime of any bindings towards `self`. - /// - action: The action to consume values. - public init(on scheduler: Scheduler = ImmediateScheduler(), lifetime: Lifetime, action: @escaping (Value) -> Void) { - self.lifetime = lifetime - - if scheduler is ImmediateScheduler { - self.action = action - } else { - self.action = { value in - scheduler.schedule { - action(value) - } - } - } - } - - #if swift(>=3.2) - /// Creates a binding target which consumes values on the specified scheduler. - /// - /// If no scheduler is specified, the binding target would consume the value - /// immediately. - /// - /// - parameters: - /// - scheduler: The scheduler on which the key path consumes the values. - /// - lifetime: The expected lifetime of any bindings towards `self`. - /// - object: The object to consume values. - /// - keyPath: The key path of the object that consumes values. - public init(on scheduler: Scheduler = ImmediateScheduler(), lifetime: Lifetime, object: Object, keyPath: WritableKeyPath) { - self.init(on: scheduler, lifetime: lifetime) { [weak object] in object?[keyPath: keyPath] = $0 } - } - #endif -} diff --git a/Sample/Pods/ReactiveSwift/Sources/ValidatingProperty.swift b/Sample/Pods/ReactiveSwift/Sources/ValidatingProperty.swift deleted file mode 100644 index 086d15f0..00000000 --- a/Sample/Pods/ReactiveSwift/Sources/ValidatingProperty.swift +++ /dev/null @@ -1,327 +0,0 @@ -import Result - -/// A mutable property that validates mutations before committing them. -/// -/// If the property wraps an arbitrary mutable property, changes originated from -/// the inner property are monitored, and would be automatically validated. -/// Note that these would still appear as committed values even if they fail the -/// validation. -/// -/// ``` -/// let root = MutableProperty("Valid") -/// let outer = ValidatingProperty(root) { -/// $0 == "Valid" ? .valid : .invalid(.outerInvalid) -/// } -/// -/// outer.result.value // `.valid("Valid") -/// -/// root.value = "🎃" -/// outer.result.value // `.invalid("🎃", .outerInvalid)` -/// ``` -public final class ValidatingProperty: MutablePropertyProtocol { - private let getter: () -> Value - private let setter: (Value) -> Void - - /// The result of the last attempted edit of the root property. - public let result: Property - - /// The current value of the property. - /// - /// The value could have failed the validation. Refer to `result` for the - /// latest validation result. - public var value: Value { - get { return getter() } - set { setter(newValue) } - } - - /// A producer for Signals that will send the property's current value, - /// followed by all changes over time, then complete when the property has - /// deinitialized. - public let producer: SignalProducer - - /// A signal that will send the property's changes over time, - /// then complete when the property has deinitialized. - public let signal: Signal - - /// The lifetime of the property. - public let lifetime: Lifetime - - /// Create a `ValidatingProperty` that presents a mutable validating - /// view for an inner mutable property. - /// - /// The proposed value is only committed when `valid` is returned by the - /// `validator` closure. - /// - /// - note: `inner` is retained by the created property. - /// - /// - parameters: - /// - inner: The inner property which validated values are committed to. - /// - validator: The closure to invoke for any proposed value to `self`. - public init( - _ inner: Inner, - _ validator: @escaping (Value) -> Decision - ) where Inner.Value == Value { - getter = { inner.value } - producer = inner.producer - signal = inner.signal - lifetime = inner.lifetime - - // This flag temporarily suspends the monitoring on the inner property for - // writebacks that are triggered by successful validations. - var isSettingInnerValue = false - - (result, setter) = inner.withValue { initial in - let mutableResult = MutableProperty(Result(initial, validator(initial))) - - mutableResult <~ inner.signal - .filter { _ in !isSettingInnerValue } - .map { Result($0, validator($0)) } - - return (Property(capturing: mutableResult), { input in - // Acquire the lock of `inner` to ensure no modification happens until - // the validation logic here completes. - inner.withValue { _ in - let writebackValue: Value? = mutableResult.modify { result in - result = Result(input, validator(input)) - return result.value - } - - if let value = writebackValue { - isSettingInnerValue = true - inner.value = value - isSettingInnerValue = false - } - } - }) - } - } - - /// Create a `ValidatingProperty` that validates mutations before - /// committing them. - /// - /// The proposed value is only committed when `valid` is returned by the - /// `validator` closure. - /// - /// - parameters: - /// - initial: The initial value of the property. It is not required to - /// pass the validation as specified by `validator`. - /// - validator: The closure to invoke for any proposed value to `self`. - public convenience init( - _ initial: Value, - _ validator: @escaping (Value) -> Decision - ) { - self.init(MutableProperty(initial), validator) - } - - /// Create a `ValidatingProperty` that presents a mutable validating - /// view for an inner mutable property. - /// - /// The proposed value is only committed when `valid` is returned by the - /// `validator` closure. - /// - /// - note: `inner` is retained by the created property. - /// - /// - parameters: - /// - inner: The inner property which validated values are committed to. - /// - other: The property that `validator` depends on. - /// - validator: The closure to invoke for any proposed value to `self`. - public convenience init( - _ inner: MutableProperty, - with other: Other, - _ validator: @escaping (Value, Other.Value) -> Decision - ) { - // Capture a copy that reflects `other` without influencing the lifetime of - // `other`. - let other = Property(other) - - self.init(inner) { input in - return validator(input, other.value) - } - - // When `other` pushes out a new value, the resulting property would react - // by revalidating itself with its last attempted value, regardless of - // success or failure. - other.signal - .take(during: lifetime) - .observeValues { [weak self] _ in - guard let s = self else { return } - - switch s.result.value { - case let .invalid(value, _): - s.value = value - - case let .coerced(_, value, _): - s.value = value - - case let .valid(value): - s.value = value - } - } - } - - /// Create a `ValidatingProperty` that validates mutations before - /// committing them. - /// - /// The proposed value is only committed when `valid` is returned by the - /// `validator` closure. - /// - /// - parameters: - /// - initial: The initial value of the property. It is not required to - /// pass the validation as specified by `validator`. - /// - other: The property that `validator` depends on. - /// - validator: The closure to invoke for any proposed value to `self`. - public convenience init( - _ initial: Value, - with other: Other, - _ validator: @escaping (Value, Other.Value) -> Decision - ) { - self.init(MutableProperty(initial), with: other, validator) - } - - /// Create a `ValidatingProperty` that presents a mutable validating - /// view for an inner mutable property. - /// - /// The proposed value is only committed when `valid` is returned by the - /// `validator` closure. - /// - /// - note: `inner` is retained by the created property. - /// - /// - parameters: - /// - inner: The inner property which validated values are committed to. - /// - other: The property that `validator` depends on. - /// - validator: The closure to invoke for any proposed value to `self`. - public convenience init( - _ inner: MutableProperty, - with other: ValidatingProperty, - _ validator: @escaping (Value, U) -> Decision - ) { - self.init(inner, with: other, validator) - } - - /// Create a `ValidatingProperty` that validates mutations before - /// committing them. - /// - /// The proposed value is only committed when `valid` is returned by the - /// `validator` closure. - /// - /// - parameters: - /// - initial: The initial value of the property. It is not required to - /// pass the validation as specified by `validator`. - /// - other: The property that `validator` depends on. - /// - validator: The closure to invoke for any proposed value to `self`. - public convenience init( - _ initial: Value, - with other: ValidatingProperty, - _ validator: @escaping (Value, U) -> Decision - ) { - // Capture only `other.result` but not `other`. - let otherValidations = other.result - - self.init(initial) { input in - let otherValue: U - - switch otherValidations.value { - case let .valid(value): - otherValue = value - - case let .coerced(_, value, _): - otherValue = value - - case let .invalid(value, _): - otherValue = value - } - - return validator(input, otherValue) - } - - // When `other` pushes out a new validation result, the resulting property - // would react by revalidating itself with its last attempted value, - // regardless of success or failure. - otherValidations.signal - .take(during: lifetime) - .observeValues { [weak self] _ in - guard let s = self else { return } - - switch s.result.value { - case let .invalid(value, _): - s.value = value - - case let .coerced(_, value, _): - s.value = value - - case let .valid(value): - s.value = value - } - } - } - - /// Represents a decision of a validator of a validating property made on a - /// proposed value. - public enum Decision { - /// The proposed value is valid. - case valid - - /// The proposed value is invalid, but the validator coerces it into a - /// replacement which it deems valid. - case coerced(Value, ValidationError?) - - /// The proposed value is invalid. - case invalid(ValidationError) - } - - /// Represents the result of the validation performed by a validating property. - public enum Result { - /// The proposed value is valid. - case valid(Value) - - /// The proposed value is invalid, but the validator was able to coerce it - /// into a replacement which it deemed valid. - case coerced(replacement: Value, proposed: Value, error: ValidationError?) - - /// The proposed value is invalid. - case invalid(Value, ValidationError) - - /// Whether the value is invalid. - public var isInvalid: Bool { - if case .invalid = self { - return true - } else { - return false - } - } - - /// Extract the valid value, or `nil` if the value is invalid. - public var value: Value? { - switch self { - case let .valid(value): - return value - case let .coerced(value, _, _): - return value - case .invalid: - return nil - } - } - - /// Extract the error if the value is invalid. - public var error: ValidationError? { - if case let .invalid(_, error) = self { - return error - } else { - return nil - } - } - - fileprivate init(_ value: Value, _ decision: Decision) { - switch decision { - case .valid: - self = .valid(value) - - case let .coerced(replacement, error): - self = .coerced(replacement: replacement, proposed: value, error: error) - - case let .invalid(error): - self = .invalid(value, error) - } - } - } -} diff --git a/Sample/Pods/Result/Result/Result.swift b/Sample/Pods/Result/Result/Result.swift index b08ea8e0..158e11e2 100644 --- a/Sample/Pods/Result/Result/Result.swift +++ b/Sample/Pods/Result/Result/Result.swift @@ -31,7 +31,10 @@ public enum Result: ResultProtocol, CustomStringConvertib public init(attempt f: () throws -> T) { do { self = .success(try f()) - } catch { + } catch var error { + if Error.self == AnyError.self { + error = AnyError(error) + } self = .failure(error as! Error) } } @@ -171,9 +174,9 @@ public func `try`(_ function: String = #function, file: String = #file, line: In #endif -// MARK: - ErrorProtocolConvertible conformance +// MARK: - ErrorConvertible conformance -extension NSError: ErrorProtocolConvertible { +extension NSError: ErrorConvertible { public static func error(from error: Swift.Error) -> Self { func cast(_ error: Swift.Error) -> T { return error as! T @@ -211,7 +214,7 @@ public struct AnyError: Swift.Error { } } -extension AnyError: ErrorProtocolConvertible { +extension AnyError: ErrorConvertible { public static func error(from error: Error) -> AnyError { return AnyError(error) } diff --git a/Sample/Pods/Result/Result/ResultProtocol.swift b/Sample/Pods/Result/Result/ResultProtocol.swift index 165567a5..678f294b 100644 --- a/Sample/Pods/Result/Result/ResultProtocol.swift +++ b/Sample/Pods/Result/Result/ResultProtocol.swift @@ -98,11 +98,11 @@ public extension ResultProtocol { } /// Protocol used to constrain `tryMap` to `Result`s with compatible `Error`s. -public protocol ErrorProtocolConvertible: Swift.Error { +public protocol ErrorConvertible: Swift.Error { static func error(from error: Swift.Error) -> Self } -public extension ResultProtocol where Error: ErrorProtocolConvertible { +public extension ResultProtocol where Error: ErrorConvertible { /// Returns the result of applying `transform` to `Success`es’ values, or wrapping thrown errors. public func tryMap(_ transform: (Value) throws -> U) -> Result { @@ -182,8 +182,11 @@ public typealias ResultType = ResultProtocol @available(*, unavailable, renamed: "Error") public typealias ResultErrorType = Swift.Error -@available(*, unavailable, renamed: "ErrorProtocolConvertible") -public typealias ErrorTypeConvertible = ErrorProtocolConvertible +@available(*, unavailable, renamed: "ErrorConvertible") +public typealias ErrorTypeConvertible = ErrorConvertible + +@available(*, deprecated, renamed: "ErrorConvertible") +public protocol ErrorProtocolConvertible: ErrorConvertible {} extension ResultProtocol { @available(*, unavailable, renamed: "recover(with:)") @@ -192,7 +195,7 @@ extension ResultProtocol { } } -extension ErrorProtocolConvertible { +extension ErrorConvertible { @available(*, unavailable, renamed: "error(from:)") public static func errorFromErrorType(_ error: Swift.Error) -> Self { fatalError() diff --git a/Sample/Pods/RxSwift/LICENSE.md b/Sample/Pods/RxSwift/LICENSE.md deleted file mode 100644 index d6765d9c..00000000 --- a/Sample/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/Sample/Pods/RxSwift/Platform/DataStructures/Bag.swift b/Sample/Pods/RxSwift/Platform/DataStructures/Bag.swift deleted file mode 100644 index 897cdadf..00000000 --- a/Sample/Pods/RxSwift/Platform/DataStructures/Bag.swift +++ /dev/null @@ -1,187 +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 an deletion is O(n). - -It is suitable for storing small number of elements. -*/ -struct Bag : CustomDebugStringConvertible { - /// Type of identifier for inserted elements. - typealias KeyType = BagKey - - typealias Entry = (key: BagKey, value: T) - - fileprivate var _nextKey: BagKey = BagKey(rawValue: 0) - - // data - - // first fill inline variables - var _key0: BagKey? = nil - var _value0: T? = nil - - // then fill "array dictionary" - var _pairs = ContiguousArray() - - // last is sparse dictionary - var _dictionary: [BagKey : T]? = nil - - var _onlyFastPath = true - - /// Creates new empty `Bag`. - init() { - } - - /** - Inserts `value` into bag. - - - parameter element: Element to insert. - - returns: Key that can be used to remove element from bag. - */ - mutating func insert(_ element: T) -> BagKey { - let key = _nextKey - - _nextKey = BagKey(rawValue: _nextKey.rawValue &+ 1) - - if _key0 == nil { - _key0 = key - _value0 = element - return key - } - - _onlyFastPath = false - - if _dictionary != nil { - _dictionary![key] = element - return key - } - - if _pairs.count < arrayDictionaryMaxSize { - _pairs.append(key: key, value: element) - return key - } - - if _dictionary == nil { - _dictionary = [:] - } - - _dictionary![key] = element - - return key - } - - /// - returns: Number of elements in bag. - var count: Int { - let dictionaryCount: Int = _dictionary?.count ?? 0 - return (_value0 != nil ? 1 : 0) + _pairs.count + dictionaryCount - } - - /// Removes all elements from bag and clears capacity. - mutating func removeAll() { - _key0 = nil - _value0 = nil - - _pairs.removeAll(keepingCapacity: false) - _dictionary?.removeAll(keepingCapacity: false) - } - - /** - Removes element with a specific `key` from bag. - - - parameter key: Key that identifies element to remove from bag. - - returns: Element that bag contained, or nil in case element was already removed. - */ - mutating func removeKey(_ key: BagKey) -> T? { - if _key0 == key { - _key0 = nil - let value = _value0! - _value0 = nil - return value - } - - if let existingObject = _dictionary?.removeValue(forKey: key) { - return existingObject - } - - for i in 0 ..< _pairs.count { - if _pairs[i].key == key { - let value = _pairs[i].value - _pairs.remove(at: i) - return value - } - } - - return nil - } -} - -extension Bag { - /// A textual representation of `self`, suitable for debugging. - var debugDescription : String { - return "\(self.count) elements in Bag" - } -} - -extension Bag { - /// Enumerates elements inside the bag. - /// - /// - parameter action: Enumeration closure. - func forEach(_ action: (T) -> Void) { - if _onlyFastPath { - if let value0 = _value0 { - action(value0) - } - return - } - - let value0 = _value0 - let dictionary = _dictionary - - if let value0 = value0 { - action(value0) - } - - for i in 0 ..< _pairs.count { - action(_pairs[i].value) - } - - if dictionary?.count ?? 0 > 0 { - for element in dictionary!.values { - action(element) - } - } - } -} - -extension BagKey: Hashable { - var hashValue: Int { - return rawValue.hashValue - } -} - -func ==(lhs: BagKey, rhs: BagKey) -> Bool { - return lhs.rawValue == rhs.rawValue -} diff --git a/Sample/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift b/Sample/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift deleted file mode 100644 index 5a573a0d..00000000 --- a/Sample/Pods/RxSwift/Platform/DataStructures/InfiniteSequence.swift +++ /dev/null @@ -1,26 +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 Element = E - typealias Iterator = AnyIterator - - private let _repeatedValue: E - - init(repeatedValue: E) { - _repeatedValue = repeatedValue - } - - func makeIterator() -> Iterator { - let repeatedValue = _repeatedValue - return AnyIterator { - return repeatedValue - } - } -} diff --git a/Sample/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift b/Sample/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift deleted file mode 100644 index fae70a05..00000000 --- a/Sample/Pods/RxSwift/Platform/DataStructures/PriorityQueue.swift +++ /dev/null @@ -1,112 +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 { - swap(&_elements[index], &_elements[_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 } - - swap(&_elements[unbalancedIndex], &_elements[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 } - - swap(&_elements[highestPriorityIndex], &_elements[unbalancedIndex]) - unbalancedIndex = highestPriorityIndex - } - } -} - -extension PriorityQueue : CustomDebugStringConvertible { - var debugDescription: String { - return _elements.debugDescription - } -} diff --git a/Sample/Pods/RxSwift/Platform/DataStructures/Queue.swift b/Sample/Pods/RxSwift/Platform/DataStructures/Queue.swift deleted file mode 100644 index d05726c7..00000000 --- a/Sample/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/Sample/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift b/Sample/Pods/RxSwift/Platform/DispatchQueue+Extensions.swift deleted file mode 100644 index 552314a1..00000000 --- a/Sample/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/Sample/Pods/RxSwift/Platform/Platform.Darwin.swift b/Sample/Pods/RxSwift/Platform/Platform.Darwin.swift deleted file mode 100644 index d9e744fe..00000000 --- a/Sample/Pods/RxSwift/Platform/Platform.Darwin.swift +++ /dev/null @@ -1,66 +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 func Foundation.OSAtomicCompareAndSwap32Barrier - import func Foundation.OSAtomicIncrement32Barrier - import func Foundation.OSAtomicDecrement32Barrier - import protocol Foundation.NSCopying - - typealias AtomicInt = Int32 - - fileprivate func castToUInt32Pointer(_ pointer: UnsafeMutablePointer) -> UnsafeMutablePointer { - let raw = UnsafeMutableRawPointer(pointer) - return raw.assumingMemoryBound(to: UInt32.self) - } - - let AtomicCompareAndSwap = OSAtomicCompareAndSwap32Barrier - let AtomicIncrement = OSAtomicIncrement32Barrier - let AtomicDecrement = OSAtomicDecrement32Barrier - func AtomicOr(_ mask: UInt32, _ theValue : UnsafeMutablePointer) -> Int32 { - return OSAtomicOr32OrigBarrier(mask, castToUInt32Pointer(theValue)) - } - func AtomicFlagSet(_ mask: UInt32, _ theValue : UnsafeMutablePointer) -> Bool { - // just used to create a barrier - OSAtomicXor32OrigBarrier(0, castToUInt32Pointer(theValue)) - return (theValue.pointee & Int32(mask)) != 0 - } - - 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 - } - } - - extension AtomicInt { - func valueSnapshot() -> Int32 { - return self - } - } - -#endif diff --git a/Sample/Pods/RxSwift/Platform/Platform.Linux.swift b/Sample/Pods/RxSwift/Platform/Platform.Linux.swift deleted file mode 100644 index 5cd07e2c..00000000 --- a/Sample/Pods/RxSwift/Platform/Platform.Linux.swift +++ /dev/null @@ -1,105 +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 XCTest - import Glibc - import SwiftShims - import class Foundation.Thread - - final class AtomicInt { - typealias IntegerLiteralType = Int - fileprivate var value: Int32 = 0 - fileprivate var _lock = RecursiveLock() - - func lock() { - _lock.lock() - } - func unlock() { - _lock.unlock() - } - - func valueSnapshot() -> Int32 { - return value - } - } - - extension AtomicInt: ExpressibleByIntegerLiteral { - convenience init(integerLiteral value: Int) { - self.init() - self.value = Int32(value) - } - } - - func >(lhs: AtomicInt, rhs: Int32) -> Bool { - return lhs.value > rhs - } - func ==(lhs: AtomicInt, rhs: Int32) -> Bool { - return lhs.value == rhs - } - - func AtomicFlagSet(_ mask: UInt32, _ atomic: inout AtomicInt) -> Bool { - atomic.lock(); defer { atomic.unlock() } - return (atomic.value & Int32(mask)) != 0 - } - - func AtomicOr(_ mask: UInt32, _ atomic: inout AtomicInt) -> Int32 { - atomic.lock(); defer { atomic.unlock() } - let value = atomic.value - atomic.value |= Int32(mask) - return value - } - - func AtomicIncrement(_ atomic: inout AtomicInt) -> Int32 { - atomic.lock(); defer { atomic.unlock() } - atomic.value += 1 - return atomic.value - } - - func AtomicDecrement(_ atomic: inout AtomicInt) -> Int32 { - atomic.lock(); defer { atomic.unlock() } - atomic.value -= 1 - return atomic.value - } - - func AtomicCompareAndSwap(_ l: Int32, _ r: Int32, _ atomic: inout AtomicInt) -> Bool { - atomic.lock(); defer { atomic.unlock() } - if atomic.value == l { - atomic.value = r - return true - } - - return false - } - - extension Thread { - - static func setThreadLocalStorageValue(_ value: T?, forKey key: String) { - let currentThread = Thread.current - var threadDictionary = currentThread.threadDictionary - - if let newValue = value { - threadDictionary[key] = newValue - } - else { - threadDictionary[key] = nil - } - - currentThread.threadDictionary = threadDictionary - } - - static func getThreadLocalStorageValueForKey(_ key: String) -> T? { - let currentThread = Thread.current - let threadDictionary = currentThread.threadDictionary - - return threadDictionary[key] as? T - } - } - -#endif diff --git a/Sample/Pods/RxSwift/Platform/RecursiveLock.swift b/Sample/Pods/RxSwift/Platform/RecursiveLock.swift deleted file mode 100644 index 10b9bbb0..00000000 --- a/Sample/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 Foundation - -#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/Sample/Pods/RxSwift/README.md b/Sample/Pods/RxSwift/README.md deleted file mode 100644 index 463aefa8..00000000 --- a/Sample/Pods/RxSwift/README.md +++ /dev/null @@ -1,207 +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) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager) - -## About Rx - -**:warning: This readme describes RxSwift 3.0 version that requires Swift 3.0.** - -**:warning: If you are looking for Swift 2.3 compatible version, please take a look at RxSwift ~> 2.0 versions and [swift-2.3](https://github.com/ReactiveX/RxSwift/tree/rxswift-2.0) branch.** - -Rx is a [generic abstraction of computation](https://youtu.be/looJcaeboBY) expressed through `Observable` interface. - -This is a Swift version of [Rx](https://github.com/Reactive-Extensions/Rx.NET). - -It tries to port as many concepts from the original version as possible, but some concepts were adapted for more pleasant and performant integration with iOS/macOS environment. - -Cross platform documentation can be found on [ReactiveX.io](http://reactivex.io/). - -Like the original Rx, its intention is to enable easy composition of asynchronous operations and event/data streams. - -KVO observing, async operations and streams are all unified under [abstraction of sequence](Documentation/GettingStarted.md#observables-aka-sequences). This is the reason why Rx is so simple, elegant and powerful. - -## I came here because I want to ... - -###### ... understand - -* [why use rx?](Documentation/Why.md) -* [the basics, getting started with RxSwift](Documentation/GettingStarted.md) -* [traits](Documentation/Traits.md) - what are `Single`, `Completable`, `Maybe`, `Driver`, `ControlProperty`, and `Variable` ... and why do they exist? -* [testing](Documentation/UnitTests.md) -* [tips and common errors](Documentation/Tips.md) -* [debugging](Documentation/GettingStarted.md#debugging) -* [the math behind Rx](Documentation/MathBehindRx.md) -* [what are hot and cold observable sequences?](Documentation/HotAndColdObservables.md) - -###### ... install - -* Integrate RxSwift/RxCocoa with my app. [Installation Guide](#installation) - -###### ... hack around - -* with the example app. [Running Example App](Documentation/ExampleApp.md) -* with operators in playgrounds. [Playgrounds](Documentation/Playgrounds.md) - -###### ... interact - -* All of this is great, but it would be nice to talk with other people using RxSwift and exchange experiences.
[![Slack channel](http://rxswift-slack.herokuapp.com/badge.svg)](http://rxswift-slack.herokuapp.com/) [Join Slack Channel](http://rxswift-slack.herokuapp.com) -* 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) - - -###### ... compare - -* [with other libraries](Documentation/ComparisonWithOtherLibraries.md). - - -###### ... find compatible - -* libraries from [RxSwiftCommunity](https://github.com/RxSwiftCommunity). -* [Pods using RxSwift](https://cocoapods.org/?q=uses%3Arxswift). - -###### ... see the broader vision - -* Does this exist for Android? [RxJava](https://github.com/ReactiveX/RxJava) -* Where is all of this going, what is the future, what about reactive architectures, how do you design entire apps this way? [Cycle.js](https://github.com/cyclejs/cycle-core) - this is javascript, but [RxJS](https://github.com/Reactive-Extensions/RxJS) is javascript version of Rx. - -## Usage - - - - - - - - - - - - - - - - - - - -
Here's an exampleIn Action
Define search for GitHub repositories ...
-let searchResults = searchBar.rx.text.orEmpty
-    .throttle(0.3, scheduler: MainScheduler.instance)
-    .distinctUntilChanged()
-    .flatMapLatest { query -> Observable<[Repository]> in
-        if query.isEmpty {
-            return .just([])
-        }
-        return searchGitHub(query)
-            .catchErrorJustReturn([])
-    }
-    .observeOn(MainScheduler.instance)
... then bind the results to your tableview
-searchResults
-    .bind(to: tableView.rx.items(cellIdentifier: "Cell")) {
-        (index, repository: Repository, cell) in
-        cell.textLabel?.text = repository.name
-        cell.detailTextLabel?.text = repository.url
-    }
-    .disposed(by: disposeBag)
- - -## Requirements - -* Xcode 8.0 -* Swift 3.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) - -**Tested with `pod --version`: `1.1.1`** - -```ruby -# Podfile -use_frameworks! - -target 'YOUR_TARGET_NAME' do - pod 'RxSwift', '~> 3.0' - pod 'RxCocoa', '~> 3.0' -end - -# RxTests and RxBlocking make the most sense in the context of unit/integration tests -target 'YOUR_TESTING_TARGET' do - pod 'RxBlocking', '~> 3.0' - pod 'RxTest', '~> 3.0' -end -``` - -Replace `YOUR_TARGET_NAME` and then, in the `Podfile` directory, type: - -```bash -$ pod install -``` - -### [Carthage](https://github.com/Carthage/Carthage) - -**Tested with `carthage version`: `0.18.1`** - -Add this to `Cartfile` - -``` -github "ReactiveX/RxSwift" ~> 3.0 -``` - -```bash -$ carthage update -``` - -### [Swift Package Manager](https://github.com/apple/swift-package-manager) - -**Tested with `swift build --version`: `3.0.0 (swiftpm-19)`** - -Create a `Package.swift` file. - -```swift -import PackageDescription - -let package = Package( - name: "RxTestProject", - targets: [], - dependencies: [ - .Package(url: "https://github.com/ReactiveX/RxSwift.git", majorVersion: 3) - ] -) -``` - -```bash -$ swift build -``` - -### 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) -* [Erik Meijer (Wikipedia)](http://en.wikipedia.org/wiki/Erik_Meijer_%28computer_scientist%29) -* [Expert to Expert: Brian Beckman and Erik Meijer - Inside the .NET Reactive Framework (Rx) (video)](https://youtu.be/looJcaeboBY) -* [Reactive Programming Overview (Jafar Husain from Netflix)](https://www.youtube.com/watch?v=dwP1TNXE6fc) -* [Subject/Observer is Dual to Iterator (paper)](http://csl.stanford.edu/~christos/pldi2010.fit/meijer.duality.pdf) -* [Rx standard sequence operators visualized (visualization tool)](http://rxmarbles.com/) -* [Haskell](https://www.haskell.org/) diff --git a/Sample/Pods/RxSwift/RxSwift/AnyObserver.swift b/Sample/Pods/RxSwift/RxSwift/AnyObserver.swift deleted file mode 100644 index dd4f9c40..00000000 --- a/Sample/Pods/RxSwift/RxSwift/AnyObserver.swift +++ /dev/null @@ -1,72 +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 { - /// The type of elements in sequence that observer can observe. - public typealias E = Element - - /// 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: O) where O.E == 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) -> ()> -} - -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 (R) throws -> E) -> AnyObserver { - return AnyObserver { e in - self.on(e.map(transform)) - } - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Cancelable.swift b/Sample/Pods/RxSwift/RxSwift/Cancelable.swift deleted file mode 100644 index 1fa7a677..00000000 --- a/Sample/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/Sample/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift b/Sample/Pods/RxSwift/RxSwift/Concurrency/AsyncLock.swift deleted file mode 100644 index 25970781..00000000 --- a/Sample/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() { - _lock.lock() - } - - func unlock() { - _lock.unlock() - } - // } - - private func enqueue(_ action: I) -> I? { - _lock.lock(); defer { _lock.unlock() } // { - if _hasFaulted { - return nil - } - - if _isExecuting { - _queue.enqueue(action) - return nil - } - - _isExecuting = true - - return action - // } - } - - private func dequeue() -> I? { - _lock.lock(); defer { _lock.unlock() } // { - if _queue.count > 0 { - return _queue.dequeue() - } - else { - _isExecuting = false - return nil - } - // } - } - - func invoke(_ action: I) { - let firstEnqueuedAction = enqueue(action) - - if let firstEnqueuedAction = firstEnqueuedAction { - firstEnqueuedAction.invoke() - } - else { - // action is enqueued, it's somebody else's concern now - return - } - - while true { - let nextAction = dequeue() - - if let nextAction = nextAction { - nextAction.invoke() - } - else { - return - } - } - } - - func dispose() { - synchronizedDispose() - } - - func _synchronized_dispose() { - _queue = Queue(capacity: 0) - _hasFaulted = true - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Concurrency/Lock.swift b/Sample/Pods/RxSwift/RxSwift/Concurrency/Lock.swift deleted file mode 100644 index 52afc1cb..00000000 --- a/Sample/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) { - lock(); defer { unlock() } - action() - } - - @inline(__always) - final func calculateLocked(_ action: () -> T) -> T { - lock(); defer { unlock() } - return action() - } - - @inline(__always) - final func calculateLockedOrFail(_ action: () throws -> T) throws -> T { - lock(); defer { unlock() } - let result = try action() - return result - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift b/Sample/Pods/RxSwift/RxSwift/Concurrency/LockOwnerType.swift deleted file mode 100644 index eca8d8e1..00000000 --- a/Sample/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() { - _lock.lock() - } - - func unlock() { - _lock.unlock() - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift b/Sample/Pods/RxSwift/RxSwift/Concurrency/SynchronizedDisposeType.swift deleted file mode 100644 index af9548f6..00000000 --- a/Sample/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() { - lock(); defer { unlock() } - _synchronized_dispose() - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift b/Sample/Pods/RxSwift/RxSwift/Concurrency/SynchronizedOnType.swift deleted file mode 100644 index 8dfc5568..00000000 --- a/Sample/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) { - lock(); defer { unlock() } - _synchronized_on(event) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Concurrency/SynchronizedSubscribeType.swift b/Sample/Pods/RxSwift/RxSwift/Concurrency/SynchronizedSubscribeType.swift deleted file mode 100644 index e6f1d73e..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Concurrency/SynchronizedSubscribeType.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// SynchronizedSubscribeType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -protocol SynchronizedSubscribeType : class, ObservableType, Lock { - func _synchronized_subscribe(_ observer: O) -> Disposable where O.E == E -} - -extension SynchronizedSubscribeType { - func synchronizedSubscribe(_ observer: O) -> Disposable where O.E == E { - lock(); defer { unlock() } - return _synchronized_subscribe(observer) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift b/Sample/Pods/RxSwift/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift deleted file mode 100644 index bb1aa7e4..00000000 --- a/Sample/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/Sample/Pods/RxSwift/RxSwift/ConnectableObservableType.swift b/Sample/Pods/RxSwift/RxSwift/ConnectableObservableType.swift deleted file mode 100644 index 52bf93c5..00000000 --- a/Sample/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/Sample/Pods/RxSwift/RxSwift/Deprecated.swift b/Sample/Pods/RxSwift/RxSwift/Deprecated.swift deleted file mode 100644 index bd3f2f9c..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Deprecated.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// Deprecated.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/5/17. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -extension Observable { - /** - Converts a optional to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - parameter optional: Optional element in the resulting observable sequence. - - returns: An observable sequence containing the wrapped value or not from given optional. - */ - @available(*, deprecated, message: "Implicit conversions from any type to optional type are allowed and that is causing issues with `from` operator overloading.", renamed: "from(optional:)") - public static func from(_ optional: E?) -> Observable { - return 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 to send the optional element on. - - returns: An observable sequence containing the wrapped value or not from given optional. - */ - @available(*, deprecated, message: "Implicit conversions from any type to optional type are allowed and that is causing issues with `from` operator overloading.", renamed: "from(optional:scheduler:)") - public static func from(_ optional: E?, scheduler: ImmediateSchedulerType) -> Observable { - return ObservableOptionalScheduled(optional: optional, scheduler: scheduler) - } -} - -extension Disposable { - /// Deprecated in favor of `disposed(by:)` - /// - /// **@available(\*, deprecated, message="use disposed(by:) instead")** - /// - /// Adds `self` to `bag`. - /// - /// - parameter bag: `DisposeBag` to add `self` to. - public func addDisposableTo(_ bag: DisposeBag) { - disposed(by: bag) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Disposable.swift b/Sample/Pods/RxSwift/RxSwift/Disposable.swift deleted file mode 100644 index 0ff067cf..00000000 --- a/Sample/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. -// - -/// Respresents a disposable resource. -public protocol Disposable { - /// Dispose resource. - func dispose() -} diff --git a/Sample/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift b/Sample/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift deleted file mode 100644 index e54532b9..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Disposables/AnonymousDisposable.swift +++ /dev/null @@ -1,61 +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 var _isDisposed: AtomicInt = 0 - private var _disposeAction: DisposeAction? - - /// - returns: Was resource disposed. - public var isDisposed: Bool { - return _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) { - _disposeAction = disposeAction - super.init() - } - - // Non-deprecated version of the constructor, used by `Disposables.create(with:)` - fileprivate init(disposeAction: @escaping DisposeAction) { - _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 AtomicCompareAndSwap(0, 1, &_isDisposed) { - assert(_isDisposed == 1) - - if let action = _disposeAction { - _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 () -> ()) -> Cancelable { - return AnonymousDisposable(disposeAction: dispose) - } - -} diff --git a/Sample/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift b/Sample/Pods/RxSwift/RxSwift/Disposables/BinaryDisposable.swift deleted file mode 100644 index 8a518f00..00000000 --- a/Sample/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 var _isDisposed: AtomicInt = 0 - - // state - private var _disposable1: Disposable? - private var _disposable2: Disposable? - - /// - returns: Was resource disposed. - var isDisposed: Bool { - return _isDisposed > 0 - } - - /// Constructs new binary disposable from two disposables. - /// - /// - parameter disposable1: First disposable - /// - parameter disposable2: Second disposable - init(_ disposable1: Disposable, _ disposable2: Disposable) { - _disposable1 = disposable1 - _disposable2 = disposable2 - super.init() - } - - /// Calls the disposal action if and only if the current instance hasn't been disposed yet. - /// - /// After invoking disposal action, disposal action will be dereferenced. - func dispose() { - if AtomicCompareAndSwap(0, 1, &_isDisposed) { - _disposable1?.dispose() - _disposable2?.dispose() - _disposable1 = nil - _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/Sample/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift b/Sample/Pods/RxSwift/RxSwift/Disposables/BooleanDisposable.swift deleted file mode 100644 index 8c59242a..00000000 --- a/Sample/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 : Disposable, 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 _isDisposed - } - - /// Sets the status to disposed, which can be observer through the `isDisposed` property. - public func dispose() { - _isDisposed = true - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift b/Sample/Pods/RxSwift/RxSwift/Disposables/CompositeDisposable.swift deleted file mode 100644 index d0e3b3dc..00000000 --- a/Sample/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, Disposable, 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 { - _lock.lock(); defer { _lock.unlock() } - return _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. - let _ = _disposables!.insert(disposable1) - let _ = _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. - let _ = _disposables!.insert(disposable1) - let _ = _disposables!.insert(disposable2) - let _ = _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. - let _ = _disposables!.insert(disposable1) - let _ = _disposables!.insert(disposable2) - let _ = _disposables!.insert(disposable3) - let _ = _disposables!.insert(disposable4) - - for disposable in disposables { - let _ = _disposables!.insert(disposable) - } - } - - /// Initializes a new instance of composite disposable with the specified number of disposables. - public init(disposables: [Disposable]) { - for disposable in disposables { - let _ = _disposables!.insert(disposable) - } - } - - /** - Adds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed. - - - parameter disposable: Disposable to add. - - returns: Key that can be used to remove disposable from composite disposable. In case dispose bag was already - disposed `nil` will be returned. - */ - public func insert(_ disposable: Disposable) -> DisposeKey? { - let key = _insert(disposable) - - if key == nil { - disposable.dispose() - } - - return key - } - - private func _insert(_ disposable: Disposable) -> DisposeKey? { - _lock.lock(); defer { _lock.unlock() } - - let bagKey = _disposables?.insert(disposable) - return bagKey.map(DisposeKey.init) - } - - /// - returns: Gets the number of disposables contained in the `CompositeDisposable`. - public var count: Int { - _lock.lock(); defer { _lock.unlock() } - return _disposables?.count ?? 0 - } - - /// Removes and disposes the disposable identified by `disposeKey` from the CompositeDisposable. - /// - /// - parameter disposeKey: Key used to identify disposable to be removed. - public func remove(for disposeKey: DisposeKey) { - _remove(for: disposeKey)?.dispose() - } - - private func _remove(for disposeKey: DisposeKey) -> Disposable? { - _lock.lock(); defer { _lock.unlock() } - return _disposables?.removeKey(disposeKey.key) - } - - /// Disposes all disposables in the group and removes them from the group. - public func dispose() { - if let disposables = _dispose() { - disposeAll(in: disposables) - } - } - - private func _dispose() -> Bag? { - _lock.lock(); defer { _lock.unlock() } - - let disposeBag = _disposables - _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/Sample/Pods/RxSwift/RxSwift/Disposables/Disposables.swift b/Sample/Pods/RxSwift/RxSwift/Disposables/Disposables.swift deleted file mode 100644 index 8cd6e28c..00000000 --- a/Sample/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/Sample/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift b/Sample/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift deleted file mode 100644 index d5e3b029..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Disposables/DisposeBag.swift +++ /dev/null @@ -1,84 +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 - private var _disposables = [Disposable]() - private 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) { - _insert(disposable)?.dispose() - } - - private func _insert(_ disposable: Disposable) -> Disposable? { - _lock.lock(); defer { _lock.unlock() } - if _isDisposed { - return disposable - } - - _disposables.append(disposable) - - return nil - } - - /// This is internal on purpose, take a look at `CompositeDisposable` instead. - private func dispose() { - let oldDisposables = _dispose() - - for disposable in oldDisposables { - disposable.dispose() - } - } - - private func _dispose() -> [Disposable] { - _lock.lock(); defer { _lock.unlock() } - - let disposables = _disposables - - _disposables.removeAll(keepingCapacity: false) - _isDisposed = true - - return disposables - } - - deinit { - dispose() - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift b/Sample/Pods/RxSwift/RxSwift/Disposables/DisposeBase.swift deleted file mode 100644 index 8c6a44f0..00000000 --- a/Sample/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 - let _ = Resources.incrementTotal() -#endif - } - - deinit { -#if TRACE_RESOURCES - let _ = Resources.decrementTotal() -#endif - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift b/Sample/Pods/RxSwift/RxSwift/Disposables/NopDisposable.swift deleted file mode 100644 index 149f8664..00000000 --- a/Sample/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/Sample/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift b/Sample/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift deleted file mode 100644 index a21662ab..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Disposables/RefCountDisposable.swift +++ /dev/null @@ -1,117 +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 { - _lock.lock(); defer { _lock.unlock() } - return _disposable == nil - } - - /// Initializes a new instance of the `RefCountDisposable`. - public init(disposable: Disposable) { - _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 _lock.calculateLocked { - if let _ = _disposable { - - do { - let _ = try incrementChecked(&_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? = _lock.calculateLocked { - if let oldDisposable = _disposable, !_primaryDisposed - { - _primaryDisposed = true - - if (_count == 0) - { - _disposable = nil - return oldDisposable - } - } - - return nil - } - - if let disposable = oldDisposable { - disposable.dispose() - } - } - - fileprivate func release() { - let oldDisposable: Disposable? = _lock.calculateLocked { - if let oldDisposable = _disposable { - do { - let _ = try decrementChecked(&_count) - } catch (_) { - rxFatalError("RefCountDisposable decrement on release failed") - } - - guard _count >= 0 else { - rxFatalError("RefCountDisposable counter is lower than 0") - } - - if _primaryDisposed && _count == 0 { - _disposable = nil - return oldDisposable - } - } - - return nil - } - - if let disposable = oldDisposable { - disposable.dispose() - } - } -} - -internal final class RefCountInnerDisposable: DisposeBase, Disposable -{ - private let _parent: RefCountDisposable - private var _isDisposed: AtomicInt = 0 - - init(_ parent: RefCountDisposable) - { - _parent = parent - super.init() - } - - internal func dispose() - { - if AtomicCompareAndSwap(0, 1, &_isDisposed) { - _parent.release() - } - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift b/Sample/Pods/RxSwift/RxSwift/Disposables/ScheduledDisposable.swift deleted file mode 100644 index 92c220df..00000000 --- a/Sample/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 var _isDisposed: AtomicInt = 0 - - // state - private var _disposable: Disposable? - - /// - returns: Was resource disposed. - public var isDisposed: Bool { - return _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 - _disposable = disposable - } - - /// Disposes the wrapped disposable on the provided scheduler. - public func dispose() { - let _ = scheduler.schedule(self, action: disposeScheduledDisposable) - } - - func disposeInner() { - if AtomicCompareAndSwap(0, 1, &_isDisposed) { - _disposable!.dispose() - _disposable = nil - } - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift b/Sample/Pods/RxSwift/RxSwift/Disposables/SerialDisposable.swift deleted file mode 100644 index 4f34bdbe..00000000 --- a/Sample/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 _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 _lock.calculateLocked { - return self.disposable - } - } - set (newDisposable) { - let disposable: Disposable? = _lock.calculateLocked { - if _isDisposed { - return newDisposable - } - else { - let toDispose = _current - _current = newDisposable - return toDispose - } - } - - if let disposable = disposable { - disposable.dispose() - } - } - } - - /// Disposes the underlying disposable as well as all future replacements. - public func dispose() { - _dispose()?.dispose() - } - - private func _dispose() -> Disposable? { - _lock.lock(); defer { _lock.unlock() } - if _isDisposed { - return nil - } - else { - _isDisposed = true - let current = _current - _current = nil - return current - } - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift b/Sample/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift deleted file mode 100644 index cf6d5b12..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Disposables/SingleAssignmentDisposable.swift +++ /dev/null @@ -1,76 +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, Disposable, Cancelable { - - fileprivate enum DisposeState: UInt32 { - case disposed = 1 - case disposableSet = 2 - } - - // Jeej, swift API consistency rules - fileprivate enum DisposeStateInt32: Int32 { - case disposed = 1 - case disposableSet = 2 - } - - // state - private var _state: AtomicInt = 0 - private var _disposable = nil as Disposable? - - /// - returns: A value that indicates whether the object is disposed. - public var isDisposed: Bool { - return AtomicFlagSet(DisposeState.disposed.rawValue, &_state) - } - - /// 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) { - _disposable = disposable - - let previousState = AtomicOr(DisposeState.disposableSet.rawValue, &_state) - - if (previousState & DisposeStateInt32.disposableSet.rawValue) != 0 { - rxFatalError("oldState.disposable != nil") - } - - if (previousState & DisposeStateInt32.disposed.rawValue) != 0 { - disposable.dispose() - _disposable = nil - } - } - - /// Disposes the underlying disposable. - public func dispose() { - let previousState = AtomicOr(DisposeState.disposed.rawValue, &_state) - - if (previousState & DisposeStateInt32.disposed.rawValue) != 0 { - return - } - - if (previousState & DisposeStateInt32.disposableSet.rawValue) != 0 { - guard let disposable = _disposable else { - rxFatalError("Disposable not set") - } - disposable.dispose() - _disposable = nil - } - } - -} diff --git a/Sample/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift b/Sample/Pods/RxSwift/RxSwift/Disposables/SubscriptionDisposable.swift deleted file mode 100644 index 3ae138a8..00000000 --- a/Sample/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) { - _owner = owner - _key = key - } - - func dispose() { - _owner?.synchronizedUnsubscribe(_key) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Errors.swift b/Sample/Pods/RxSwift/RxSwift/Errors.swift deleted file mode 100644 index a00a3dea..00000000 --- a/Sample/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 occured. - 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 occured." - case .disposed(let object): - return "Object `\(object)` was already disposed." - case .overflow: - return "Arithmetic overflow occured." - 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/Sample/Pods/RxSwift/RxSwift/Event.swift b/Sample/Pods/RxSwift/RxSwift/Event.swift deleted file mode 100644 index 377877b6..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Event.swift +++ /dev/null @@ -1,106 +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 { - /// - returns: 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 ElementType - - /// Event representation of this instance - var event: Event { get } -} - -extension Event : EventConvertible { - /// Event representation of this instance - public var event: Event { - return self - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift b/Sample/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift deleted file mode 100644 index 895333cd..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Extensions/Bag+Rx.swift +++ /dev/null @@ -1,62 +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) -> ()>, _ event: Event) { - if bag._onlyFastPath { - bag._value0?(event) - return - } - - let value0 = bag._value0 - let dictionary = bag._dictionary - - if let value0 = value0 { - value0(event) - } - - let pairs = bag._pairs - for i in 0 ..< pairs.count { - pairs[i].value(event) - } - - if let dictionary = dictionary { - for element in dictionary.values { - element(event) - } - } -} - -/// Dispatches `dispose` to all disposables contained inside bag. -func disposeAll(in bag: Bag) { - if bag._onlyFastPath { - bag._value0?.dispose() - return - } - - let value0 = bag._value0 - let dictionary = bag._dictionary - - if let value0 = value0 { - value0.dispose() - } - - let pairs = bag._pairs - for i in 0 ..< pairs.count { - pairs[i].value.dispose() - } - - if let dictionary = dictionary { - for element in dictionary.values { - element.dispose() - } - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift b/Sample/Pods/RxSwift/RxSwift/Extensions/String+Rx.swift deleted file mode 100644 index 42ef636c..00000000 --- a/Sample/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 = endIndex - while index > startIndex { - index = self.index(before: index) - if self[index] == character { - return index - } - } - - return nil - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/GroupedObservable.swift b/Sample/Pods/RxSwift/RxSwift/GroupedObservable.swift deleted file mode 100644 index d87e0bad..00000000 --- a/Sample/Pods/RxSwift/RxSwift/GroupedObservable.swift +++ /dev/null @@ -1,37 +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 { - public typealias E = Element - - /// Gets the common key. - public let key: Key - - private let source: Observable - - /// Initializes grouped observable sequence with key and source observable sequence. - /// - /// - parameter key: Grouped observable sequence key - /// - parameter source: Observable sequence that represents sequence of elements for the key - /// - returns: Grouped observable sequence of elements for the specific key - public init(key: Key, source: Observable) { - self.key = key - self.source = source - } - - /// Subscribes `observer` to receive events for this sequence. - public func subscribe(_ observer: O) -> Disposable where O.E == E { - return self.source.subscribe(observer) - } - - /// Converts `self` to `Observable` sequence. - public func asObservable() -> Observable { - return source - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift b/Sample/Pods/RxSwift/RxSwift/ImmediateSchedulerType.swift deleted file mode 100644 index 0c5418f5..00000000 --- a/Sample/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 immediatelly. - - - 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) -> ()) -> ()) -> Disposable { - let recursiveScheduler = RecursiveImmediateScheduler(action: action, scheduler: self) - - recursiveScheduler.schedule(state) - - return Disposables.create(with: recursiveScheduler.dispose) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observable.swift b/Sample/Pods/RxSwift/RxSwift/Observable.swift deleted file mode 100644 index 44aa1deb..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observable.swift +++ /dev/null @@ -1,44 +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 { - /// Type of elements in sequence. - public typealias E = Element - - init() { -#if TRACE_RESOURCES - let _ = Resources.incrementTotal() -#endif - } - - public func subscribe(_ observer: O) -> Disposable where O.E == E { - rxAbstractMethod() - } - - public func asObservable() -> Observable { - return self - } - - deinit { -#if TRACE_RESOURCES - let _ = Resources.decrementTotal() -#endif - } - - // this is kind of ugly I know :( - // Swift compiler reports "Not supported yet" when trying to override protocol extensions, so ¯\_(ツ)_/¯ - - /// Optimizations for map operator - internal func composeMap(_ selector: @escaping (Element) throws -> R) -> Observable { - return Map(source: self, transform: selector) - } -} - diff --git a/Sample/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift b/Sample/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift deleted file mode 100644 index 72cfb1ac..00000000 --- a/Sample/Pods/RxSwift/RxSwift/ObservableConvertibleType.swift +++ /dev/null @@ -1,18 +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 (`Observer`). -public protocol ObservableConvertibleType { - /// Type of elements in sequence. - associatedtype E - - /// Converts `self` to `Observable` sequence. - /// - /// - returns: Observable sequence that represents `self`. - func asObservable() -> Observable -} diff --git a/Sample/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift b/Sample/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift deleted file mode 100644 index 1603d39a..00000000 --- a/Sample/Pods/RxSwift/RxSwift/ObservableType+Extensions.swift +++ /dev/null @@ -1,117 +0,0 @@ -// -// ObservableType+Extensions.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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.subscribeSafe(observer) - } - - #if DEBUG - /** - Subscribes an element handler, an error handler, a completion handler and disposed handler to an observable sequence. - - - parameter onNext: Action to invoke for each element in the observable sequence. - - parameter onError: Action to invoke upon errored termination of the observable sequence. - - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. - - parameter onDisposed: Action to invoke upon any type of termination of sequence (if the sequence has - gracefully completed, errored, or if the generation is cancelled by disposing subscription). - - returns: Subscription object used to unsubscribe from the observable sequence. - */ - public func subscribe(file: String = #file, line: UInt = #line, function: String = #function, onNext: ((E) -> Void)? = nil, onError: ((Swift.Error) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onDisposed: (() -> Void)? = nil) - -> Disposable { - - let disposable: Disposable - - if let disposed = onDisposed { - disposable = Disposables.create(with: disposed) - } - else { - disposable = Disposables.create() - } - - let observer = AnonymousObserver { e in - switch e { - case .next(let value): - onNext?(value) - case .error(let e): - if let onError = onError { - onError(e) - } - else { - print("Received unhandled error: \(file):\(line):\(function) -> \(e)") - } - disposable.dispose() - case .completed: - onCompleted?() - disposable.dispose() - } - } - return Disposables.create( - self.subscribeSafe(observer), - disposable - ) - } - #else - /** - Subscribes an element handler, an error handler, a completion handler and disposed handler to an observable sequence. - - - parameter onNext: Action to invoke for each element in the observable sequence. - - parameter onError: Action to invoke upon errored termination of the observable sequence. - - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. - - parameter onDisposed: Action to invoke upon any type of termination of sequence (if the sequence has - gracefully completed, errored, or if the generation is cancelled by disposing subscription). - - returns: Subscription object used to unsubscribe from the observable sequence. - */ - public func subscribe(onNext: ((E) -> Void)? = nil, onError: ((Swift.Error) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onDisposed: (() -> Void)? = nil) - -> Disposable { - - let disposable: Disposable - - if let disposed = onDisposed { - disposable = Disposables.create(with: disposed) - } - else { - disposable = Disposables.create() - } - - let observer = AnonymousObserver { e in - switch e { - case .next(let value): - onNext?(value) - case .error(let e): - onError?(e) - disposable.dispose() - case .completed: - onCompleted?() - disposable.dispose() - } - } - return Disposables.create( - self.subscribeSafe(observer), - disposable - ) - } - #endif -} - -extension ObservableType { - /// All internal subscribe calls go through this method. - fileprivate func subscribeSafe(_ observer: O) -> Disposable where O.E == E { - return self.asObservable().subscribe(observer) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/ObservableType.swift b/Sample/Pods/RxSwift/RxSwift/ObservableType.swift deleted file mode 100644 index 6331dc87..00000000 --- a/Sample/Pods/RxSwift/RxSwift/ObservableType.swift +++ /dev/null @@ -1,50 +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 { - /// Type of elements in sequence. - associatedtype E - - /** - 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 immediatelly, 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: O) -> Disposable where O.E == E -} - -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/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/AddRef.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/AddRef.swift deleted file mode 100644 index b782c13f..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/AddRef.swift +++ /dev/null @@ -1,45 +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 = O.E - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(_): - forwardOn(event) - case .completed, .error(_): - forwardOn(event) - dispose() - } - } -} - -final class AddRef : Producer { - typealias EventHandler = (Event) throws -> Void - - private let _source: Observable - private let _refCount: RefCountDisposable - - init(source: Observable, refCount: RefCountDisposable) { - _source = source - _refCount = refCount - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let releaseDisposable = _refCount.retain() - let sink = AddRefSink(observer: observer, cancel: cancel) - let subscription = Disposables.create(releaseDisposable, _source.subscribe(sink)) - - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Amb.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Amb.swift deleted file mode 100644 index 040d8c8e..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Amb.swift +++ /dev/null @@ -1,124 +0,0 @@ -// -// Amb.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -enum AmbState { - case neither - case left - case right -} - -final class AmbObserver : ObserverType { - typealias Element = O.E - 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 - let _ = Resources.incrementTotal() -#endif - - _parent = parent - _sink = sink - _cancel = cancel - } - - func on(_ event: Event) { - _sink(self, event) - if event.isStopEvent { - _cancel.dispose() - } - } - - deinit { -#if TRACE_RESOURCES - let _ = Resources.decrementTotal() -#endif - } -} - -final class AmbSink : Sink { - typealias ElementType = O.E - typealias Parent = Amb - typealias AmbObserverType = AmbObserver - - private let _parent: Parent - - private let _lock = RecursiveLock() - // state - private var _choice = AmbState.neither - - init(parent: Parent, observer: O, cancel: Cancelable) { - _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(_parent._left.subscribe(sink1)) - subscription2.setDisposable(_parent._right.subscribe(sink2)) - - return disposeAll - } -} - -final class Amb: Producer { - fileprivate let _left: Observable - fileprivate let _right: Observable - - init(left: Observable, right: Observable) { - _left = left - _right = right - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = AmbSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/AnonymousObservable.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/AnonymousObservable.swift deleted file mode 100644 index c1b9a80d..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/AnonymousObservable.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// AnonymousObservable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class AnonymousObservableSink : Sink, ObserverType { - typealias E = O.E - typealias Parent = AnonymousObservable - - // state - private var _isStopped: AtomicInt = 0 - - #if DEBUG - fileprivate var _numberOfConcurrentCalls: AtomicInt = 0 - #endif - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - #if DEBUG - if AtomicIncrement(&_numberOfConcurrentCalls) > 1 { - rxFatalError("Warning: Recursive call or synchronization error!") - } - - defer { - _ = AtomicDecrement(&_numberOfConcurrentCalls) - } - #endif - switch event { - case .next: - if _isStopped == 1 { - return - } - forwardOn(event) - case .error, .completed: - if AtomicCompareAndSwap(0, 1, &_isStopped) { - forwardOn(event) - dispose() - } - } - } - - func run(_ parent: Parent) -> Disposable { - return parent._subscribeHandler(AnyObserver(self)) - } -} - -final class AnonymousObservable : Producer { - typealias SubscribeHandler = (AnyObserver) -> Disposable - - let _subscribeHandler: SubscribeHandler - - init(_ subscribeHandler: @escaping SubscribeHandler) { - _subscribeHandler = subscribeHandler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = AnonymousObservableSink(observer: observer, cancel: cancel) - let subscription = sink.run(self) - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/AsMaybe.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/AsMaybe.swift deleted file mode 100644 index 36fa685f..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/AsMaybe.swift +++ /dev/null @@ -1,49 +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 ElementType = O.E - typealias E = ElementType - - private var _element: Event? = nil - - func on(_ event: Event) { - switch event { - case .next: - if _element != nil { - forwardOn(.error(RxError.moreThanOneElement)) - dispose() - } - - _element = event - case .error: - forwardOn(event) - dispose() - case .completed: - if let element = _element { - forwardOn(element) - } - forwardOn(.completed) - dispose() - } - } -} - -final class AsMaybe: Producer { - fileprivate let _source: Observable - - init(source: Observable) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = AsMaybeSink(observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/AsSingle.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/AsSingle.swift deleted file mode 100644 index 080aa8e1..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/AsSingle.swift +++ /dev/null @@ -1,52 +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 ElementType = O.E - typealias E = ElementType - - private var _element: Event? = nil - - func on(_ event: Event) { - switch event { - case .next: - if _element != nil { - forwardOn(.error(RxError.moreThanOneElement)) - dispose() - } - - _element = event - case .error: - forwardOn(event) - dispose() - case .completed: - if let element = _element { - forwardOn(element) - forwardOn(.completed) - } - else { - forwardOn(.error(RxError.noElements)) - } - dispose() - } - } -} - -final class AsSingle: Producer { - fileprivate let _source: Observable - - init(source: Observable) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = AsSingleSink(observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Buffer.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Buffer.swift deleted file mode 100644 index 7c6c5235..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Buffer.swift +++ /dev/null @@ -1,119 +0,0 @@ -// -// Buffer.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/13/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final 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) { - _source = source - _timeSpan = timeSpan - _count = count - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == [Element] { - let sink = BufferTimeCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -final class BufferTimeCountSink - : Sink - , LockOwnerType - , ObserverType - , SynchronizedOnType where O.E == [Element] { - typealias Parent = BufferTimeCount - typealias E = Element - - private let _parent: Parent - - let _lock = RecursiveLock() - - // state - private let _timerD = SerialDisposable() - private var _buffer = [Element]() - private var _windowID = 0 - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - createTimer(_windowID) - return Disposables.create(_timerD, _parent._source.subscribe(self)) - } - - func startNewWindowAndSendCurrentOne() { - _windowID = _windowID &+ 1 - let windowID = _windowID - - let buffer = _buffer - _buffer = [] - forwardOn(.next(buffer)) - - createTimer(windowID) - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): - _buffer.append(element) - - if _buffer.count == _parent._count { - startNewWindowAndSendCurrentOne() - } - - case .error(let error): - _buffer = [] - forwardOn(.error(error)) - dispose() - case .completed: - forwardOn(.next(_buffer)) - forwardOn(.completed) - dispose() - } - } - - func createTimer(_ windowID: Int) { - if _timerD.isDisposed { - return - } - - if _windowID != windowID { - return - } - - let nextTimer = SingleAssignmentDisposable() - - _timerD.disposable = nextTimer - - let disposable = _parent._scheduler.scheduleRelative(windowID, dueTime: _parent._timeSpan) { previousWindowID in - self._lock.performLocked { - if previousWindowID != self._windowID { - return - } - - self.startNewWindowAndSendCurrentOne() - } - - return Disposables.create() - } - - nextTimer.setDisposable(disposable) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Catch.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Catch.swift deleted file mode 100644 index 3a7484bd..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Catch.swift +++ /dev/null @@ -1,160 +0,0 @@ -// -// Catch.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/19/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -// catch with callback - -final class CatchSinkProxy : ObserverType { - typealias E = O.E - typealias Parent = CatchSink - - private let _parent: Parent - - init(parent: Parent) { - _parent = parent - } - - func on(_ event: Event) { - _parent.forwardOn(event) - - switch event { - case .next: - break - case .error, .completed: - _parent.dispose() - } - } -} - -final class CatchSink : Sink, ObserverType { - typealias E = O.E - typealias Parent = Catch - - private let _parent: Parent - private let _subscription = SerialDisposable() - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let d1 = SingleAssignmentDisposable() - _subscription.disposable = d1 - d1.setDisposable(_parent._source.subscribe(self)) - - return _subscription - } - - func on(_ event: Event) { - switch event { - case .next: - forwardOn(event) - case .completed: - forwardOn(event) - dispose() - case .error(let error): - do { - let catchSequence = try _parent._handler(error) - - let observer = CatchSinkProxy(parent: self) - - _subscription.disposable = catchSequence.subscribe(observer) - } - catch let e { - forwardOn(.error(e)) - dispose() - } - } - } -} - -final class Catch : Producer { - typealias Handler = (Swift.Error) throws -> Observable - - fileprivate let _source: Observable - fileprivate let _handler: Handler - - init(source: Observable, handler: @escaping Handler) { - _source = source - _handler = handler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = CatchSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -// catch enumerable - -final class CatchSequenceSink - : TailRecursiveSink - , ObserverType where S.Iterator.Element : ObservableConvertibleType, S.Iterator.Element.E == O.E { - typealias Element = O.E - typealias Parent = CatchSequence - - private var _lastError: Swift.Error? - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next: - forwardOn(event) - case .error(let error): - _lastError = error - schedule(.moveNext) - case .completed: - forwardOn(event) - dispose() - } - } - - override func subscribeToNext(_ source: Observable) -> Disposable { - return source.subscribe(self) - } - - override func done() { - if let lastError = _lastError { - forwardOn(.error(lastError)) - } - else { - 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 class CatchSequence : Producer where S.Iterator.Element : ObservableConvertibleType { - typealias Element = S.Iterator.Element.E - - let sources: S - - init(sources: S) { - self.sources = sources - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = CatchSequenceSink(observer: observer, cancel: cancel) - let subscription = sink.run((self.sources.makeIterator(), nil)) - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+Collection.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+Collection.swift deleted file mode 100644 index 35873090..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+Collection.swift +++ /dev/null @@ -1,126 +0,0 @@ -// -// CombineLatest+Collection.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/29/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class CombineLatestCollectionTypeSink - : Sink where C.Iterator.Element : ObservableConvertibleType { - typealias R = O.E - typealias Parent = CombineLatestCollectionType - typealias SourceElement = C.Iterator.Element.E - - let _parent: Parent - - let _lock = RecursiveLock() - - // state - var _numberOfValues = 0 - var _values: [SourceElement?] - var _isDone: [Bool] - var _numberOfDone = 0 - var _subscriptions: [SingleAssignmentDisposable] - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _values = [SourceElement?](repeating: nil, count: parent._count) - _isDone = [Bool](repeating: false, count: parent._count) - _subscriptions = Array() - _subscriptions.reserveCapacity(parent._count) - - for _ in 0 ..< parent._count { - _subscriptions.append(SingleAssignmentDisposable()) - } - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event, atIndex: Int) { - _lock.lock(); defer { _lock.unlock() } // { - switch event { - case .next(let element): - if _values[atIndex] == nil { - _numberOfValues += 1 - } - - _values[atIndex] = element - - if _numberOfValues < _parent._count { - let numberOfOthersThatAreDone = self._numberOfDone - (_isDone[atIndex] ? 1 : 0) - if numberOfOthersThatAreDone == self._parent._count - 1 { - forwardOn(.completed) - dispose() - } - return - } - - do { - let result = try _parent._resultSelector(_values.map { $0! }) - forwardOn(.next(result)) - } - catch let error { - forwardOn(.error(error)) - dispose() - } - - case .error(let error): - forwardOn(.error(error)) - dispose() - case .completed: - if _isDone[atIndex] { - return - } - - _isDone[atIndex] = true - _numberOfDone += 1 - - if _numberOfDone == self._parent._count { - forwardOn(.completed) - dispose() - } - else { - _subscriptions[atIndex].dispose() - } - } - // } - } - - func run() -> Disposable { - var j = 0 - for i in _parent._sources { - let index = j - let source = i.asObservable() - let disposable = source.subscribe(AnyObserver { event in - self.on(event, atIndex: index) - }) - - _subscriptions[j].setDisposable(disposable) - - j += 1 - } - - return Disposables.create(_subscriptions) - } -} - -final class CombineLatestCollectionType : Producer where C.Iterator.Element : ObservableConvertibleType { - typealias ResultSelector = ([C.Iterator.Element.E]) throws -> R - - let _sources: C - let _resultSelector: ResultSelector - let _count: Int - - init(sources: C, resultSelector: @escaping ResultSelector) { - _sources = sources - _resultSelector = resultSelector - _count = Int(self._sources.count.toIntMax()) - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestCollectionTypeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+arity.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest+arity.swift deleted file mode 100644 index 86da43a5..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/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 Observable { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, resultSelector: @escaping (O1.E, O2.E) throws -> E) - -> Observable { - return CombineLatest2( - source1: source1.asObservable(), source2: source2.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2) - -> Observable<(O1.E, O2.E)> { - return CombineLatest2( - source1: source1.asObservable(), source2: source2.asObservable(), - resultSelector: { ($0, $1) } - ) - } -} - -final class CombineLatestSink2_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest2 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 2, observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - - let observer1 = CombineLatestObserver(lock: _lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: _lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - - subscription1.setDisposable(_parent._source1.subscribe(observer1)) - subscription2.setDisposable(_parent._source2.subscribe(observer2)) - - return Disposables.create([ - subscription1, - subscription2 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_latestElement1, _latestElement2) - } -} - -final class CombineLatest2 : Producer { - typealias ResultSelector = (E1, E2) throws -> R - - let _source1: Observable - let _source2: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, resultSelector: @escaping ResultSelector) { - _source1 = source1 - _source2 = source2 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink2_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 3 - -extension Observable { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, resultSelector: @escaping (O1.E, O2.E, O3.E) throws -> E) - -> Observable { - return CombineLatest3( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3) - -> Observable<(O1.E, O2.E, O3.E)> { - return CombineLatest3( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), - resultSelector: { ($0, $1, $2) } - ) - } -} - -final class CombineLatestSink3_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest3 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - - init(parent: Parent, observer: O, cancel: Cancelable) { - _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: _lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: _lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: _lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - - subscription1.setDisposable(_parent._source1.subscribe(observer1)) - subscription2.setDisposable(_parent._source2.subscribe(observer2)) - subscription3.setDisposable(_parent._source3.subscribe(observer3)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_latestElement1, _latestElement2, _latestElement3) - } -} - -final class CombineLatest3 : Producer { - typealias ResultSelector = (E1, E2, E3) throws -> R - - let _source1: Observable - let _source2: Observable - let _source3: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, source3: Observable, resultSelector: @escaping ResultSelector) { - _source1 = source1 - _source2 = source2 - _source3 = source3 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink3_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 4 - -extension Observable { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E) throws -> E) - -> Observable { - return CombineLatest4( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4) - -> Observable<(O1.E, O2.E, O3.E, O4.E)> { - return CombineLatest4( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), - resultSelector: { ($0, $1, $2, $3) } - ) - } -} - -final class CombineLatestSink4_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest4 - - let _parent: Parent - - var _latestElement1: E1! = nil - var _latestElement2: E2! = nil - var _latestElement3: E3! = nil - var _latestElement4: E4! = nil - - init(parent: Parent, observer: O, cancel: Cancelable) { - _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: _lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: _lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: _lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: _lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - - subscription1.setDisposable(_parent._source1.subscribe(observer1)) - subscription2.setDisposable(_parent._source2.subscribe(observer2)) - subscription3.setDisposable(_parent._source3.subscribe(observer3)) - subscription4.setDisposable(_parent._source4.subscribe(observer4)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_latestElement1, _latestElement2, _latestElement3, _latestElement4) - } -} - -final class CombineLatest4 : Producer { - typealias ResultSelector = (E1, E2, E3, E4) throws -> R - - 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) { - _source1 = source1 - _source2 = source2 - _source3 = source3 - _source4 = source4 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink4_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 5 - -extension Observable { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E) - -> Observable { - return CombineLatest5( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E)> { - return CombineLatest5( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4) } - ) - } -} - -final class CombineLatestSink5_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest5 - - 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: O, cancel: Cancelable) { - _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: _lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: _lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: _lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: _lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - let observer5 = CombineLatestObserver(lock: _lock, parent: self, index: 4, setLatestValue: { (e: E5) -> Void in self._latestElement5 = e }, this: subscription5) - - subscription1.setDisposable(_parent._source1.subscribe(observer1)) - subscription2.setDisposable(_parent._source2.subscribe(observer2)) - subscription3.setDisposable(_parent._source3.subscribe(observer3)) - subscription4.setDisposable(_parent._source4.subscribe(observer4)) - subscription5.setDisposable(_parent._source5.subscribe(observer5)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_latestElement1, _latestElement2, _latestElement3, _latestElement4, _latestElement5) - } -} - -final class CombineLatest5 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5) throws -> R - - 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) { - _source1 = source1 - _source2 = source2 - _source3 = source3 - _source4 = source4 - _source5 = source5 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink5_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 6 - -extension Observable { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E) throws -> E) - -> Observable { - 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 E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E)> { - return CombineLatest6( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4, $5) } - ) - } -} - -final class CombineLatestSink6_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest6 - - 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: O, cancel: Cancelable) { - _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: _lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: _lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: _lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: _lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - let observer5 = CombineLatestObserver(lock: _lock, parent: self, index: 4, setLatestValue: { (e: E5) -> Void in self._latestElement5 = e }, this: subscription5) - let observer6 = CombineLatestObserver(lock: _lock, parent: self, index: 5, setLatestValue: { (e: E6) -> Void in self._latestElement6 = e }, this: subscription6) - - subscription1.setDisposable(_parent._source1.subscribe(observer1)) - subscription2.setDisposable(_parent._source2.subscribe(observer2)) - subscription3.setDisposable(_parent._source3.subscribe(observer3)) - subscription4.setDisposable(_parent._source4.subscribe(observer4)) - subscription5.setDisposable(_parent._source5.subscribe(observer5)) - subscription6.setDisposable(_parent._source6.subscribe(observer6)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_latestElement1, _latestElement2, _latestElement3, _latestElement4, _latestElement5, _latestElement6) - } -} - -final class CombineLatest6 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6) throws -> R - - 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) { - _source1 = source1 - _source2 = source2 - _source3 = source3 - _source4 = source4 - _source5 = source5 - _source6 = source6 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink6_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 7 - -extension Observable { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E) throws -> E) - -> Observable { - 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 E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E)> { - return CombineLatest7( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4, $5, $6) } - ) - } -} - -final class CombineLatestSink7_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest7 - - 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: O, cancel: Cancelable) { - _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: _lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: _lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: _lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: _lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - let observer5 = CombineLatestObserver(lock: _lock, parent: self, index: 4, setLatestValue: { (e: E5) -> Void in self._latestElement5 = e }, this: subscription5) - let observer6 = CombineLatestObserver(lock: _lock, parent: self, index: 5, setLatestValue: { (e: E6) -> Void in self._latestElement6 = e }, this: subscription6) - let observer7 = CombineLatestObserver(lock: _lock, parent: self, index: 6, setLatestValue: { (e: E7) -> Void in self._latestElement7 = e }, this: subscription7) - - subscription1.setDisposable(_parent._source1.subscribe(observer1)) - subscription2.setDisposable(_parent._source2.subscribe(observer2)) - subscription3.setDisposable(_parent._source3.subscribe(observer3)) - subscription4.setDisposable(_parent._source4.subscribe(observer4)) - subscription5.setDisposable(_parent._source5.subscribe(observer5)) - subscription6.setDisposable(_parent._source6.subscribe(observer6)) - subscription7.setDisposable(_parent._source7.subscribe(observer7)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6, - subscription7 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_latestElement1, _latestElement2, _latestElement3, _latestElement4, _latestElement5, _latestElement6, _latestElement7) - } -} - -final class CombineLatest7 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7) throws -> R - - 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) { - _source1 = source1 - _source2 = source2 - _source3 = source3 - _source4 = source4 - _source5 = source5 - _source6 = source6 - _source7 = source7 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink7_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 8 - -extension Observable { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E) throws -> E) - -> Observable { - 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 E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever any of the observable sequences produces an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - returns: An observable sequence containing the result of combining elements of the sources 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) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E)> { - return CombineLatest8( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), source8: source8.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4, $5, $6, $7) } - ) - } -} - -final class CombineLatestSink8_ : CombineLatestSink { - typealias R = O.E - typealias Parent = CombineLatest8 - - 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: O, cancel: Cancelable) { - _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: _lock, parent: self, index: 0, setLatestValue: { (e: E1) -> Void in self._latestElement1 = e }, this: subscription1) - let observer2 = CombineLatestObserver(lock: _lock, parent: self, index: 1, setLatestValue: { (e: E2) -> Void in self._latestElement2 = e }, this: subscription2) - let observer3 = CombineLatestObserver(lock: _lock, parent: self, index: 2, setLatestValue: { (e: E3) -> Void in self._latestElement3 = e }, this: subscription3) - let observer4 = CombineLatestObserver(lock: _lock, parent: self, index: 3, setLatestValue: { (e: E4) -> Void in self._latestElement4 = e }, this: subscription4) - let observer5 = CombineLatestObserver(lock: _lock, parent: self, index: 4, setLatestValue: { (e: E5) -> Void in self._latestElement5 = e }, this: subscription5) - let observer6 = CombineLatestObserver(lock: _lock, parent: self, index: 5, setLatestValue: { (e: E6) -> Void in self._latestElement6 = e }, this: subscription6) - let observer7 = CombineLatestObserver(lock: _lock, parent: self, index: 6, setLatestValue: { (e: E7) -> Void in self._latestElement7 = e }, this: subscription7) - let observer8 = CombineLatestObserver(lock: _lock, parent: self, index: 7, setLatestValue: { (e: E8) -> Void in self._latestElement8 = e }, this: subscription8) - - subscription1.setDisposable(_parent._source1.subscribe(observer1)) - subscription2.setDisposable(_parent._source2.subscribe(observer2)) - subscription3.setDisposable(_parent._source3.subscribe(observer3)) - subscription4.setDisposable(_parent._source4.subscribe(observer4)) - subscription5.setDisposable(_parent._source5.subscribe(observer5)) - subscription6.setDisposable(_parent._source6.subscribe(observer6)) - subscription7.setDisposable(_parent._source7.subscribe(observer7)) - subscription8.setDisposable(_parent._source8.subscribe(observer8)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6, - subscription7, - subscription8 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_latestElement1, _latestElement2, _latestElement3, _latestElement4, _latestElement5, _latestElement6, _latestElement7, _latestElement8) - } -} - -final class CombineLatest8 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7, E8) throws -> R - - 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) { - _source1 = source1 - _source2 = source2 - _source3 = source3 - _source4 = source4 - _source5 = source5 - _source6 = source6 - _source7 = source7 - _source8 = source8 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = CombineLatestSink8_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest.swift deleted file mode 100644 index 8c03e8c3..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/CombineLatest.swift +++ /dev/null @@ -1,132 +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 = O.E - - 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: O, cancel: Cancelable) { - _arity = arity - _hasValue = [Bool](repeating: false, count: arity) - _isDone = [Bool](repeating: false, count: arity) - - super.init(observer: observer, cancel: cancel) - } - - func getResult() throws -> Element { - rxAbstractMethod() - } - - func next(_ index: Int) { - if !_hasValue[index] { - _hasValue[index] = true - _numberOfValues += 1 - } - - if _numberOfValues == _arity { - do { - let result = try getResult() - forwardOn(.next(result)) - } - catch let e { - forwardOn(.error(e)) - dispose() - } - } - else { - var allOthersDone = true - - for i in 0 ..< _arity { - if i != index && !_isDone[i] { - allOthersDone = false - break - } - } - - if allOthersDone { - forwardOn(.completed) - dispose() - } - } - } - - func fail(_ error: Swift.Error) { - forwardOn(.error(error)) - dispose() - } - - func done(_ index: Int) { - if _isDone[index] { - return - } - - _isDone[index] = true - _numberOfDone += 1 - - if _numberOfDone == _arity { - forwardOn(.completed) - dispose() - } - } -} - -final class CombineLatestObserver - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = ElementType - 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) { - _lock = lock - _parent = parent - _index = index - _this = this - _setLatestValue = setLatestValue - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let value): - _setLatestValue(value) - _parent.next(_index) - case .error(let error): - _this.dispose() - _parent.fail(error) - case .completed: - _this.dispose() - _parent.done(_index) - } - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Concat.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Concat.swift deleted file mode 100644 index 527a68a6..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Concat.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// Concat.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - - -final class ConcatSink - : TailRecursiveSink - , ObserverType where S.Iterator.Element : ObservableConvertibleType, S.Iterator.Element.E == O.E { - typealias Element = O.E - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event){ - switch event { - case .next: - forwardOn(event) - case .error: - forwardOn(event) - dispose() - case .completed: - schedule(.moveNext) - } - } - - override func subscribeToNext(_ source: Observable) -> Disposable { - return source.subscribe(self) - } - - override func extract(_ observable: Observable) -> SequenceGenerator? { - if let source = observable as? Concat { - return (source._sources.makeIterator(), source._count) - } - else { - return nil - } - } -} - -final class Concat : Producer where S.Iterator.Element : ObservableConvertibleType { - typealias Element = S.Iterator.Element.E - - fileprivate let _sources: S - fileprivate let _count: IntMax? - - init(sources: S, count: IntMax?) { - _sources = sources - _count = count - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = ConcatSink(observer: observer, cancel: cancel) - let subscription = sink.run((_sources.makeIterator(), _count)) - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ConnectableObservable.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ConnectableObservable.swift deleted file mode 100644 index 5557a897..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ConnectableObservable.swift +++ /dev/null @@ -1,108 +0,0 @@ -// -// ConnectableObservable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/1/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() - } -} - -final class Connection : ObserverType, Disposable { - typealias E = S.SubjectObserverType.E - - private var _lock: RecursiveLock - // state - private var _parent: ConnectableObservableAdapter? - private var _subscription : Disposable? - private var _subjectObserver: S.SubjectObserverType - - private var _disposed: Bool = false - - init(parent: ConnectableObservableAdapter, subjectObserver: S.SubjectObserverType, lock: RecursiveLock, subscription: Disposable) { - _parent = parent - _subscription = subscription - _lock = lock - _subjectObserver = subjectObserver - } - - func on(_ event: Event) { - if _disposed { - return - } - _subjectObserver.on(event) - if event.isStopEvent { - self.dispose() - } - } - - func dispose() { - _lock.lock(); defer { _lock.unlock() } // { - _disposed = true - guard let parent = _parent else { - return - } - - if parent._connection === self { - parent._connection = nil - } - _parent = nil - - _subscription?.dispose() - _subscription = nil - // } - } -} - -final class ConnectableObservableAdapter - : ConnectableObservable { - typealias ConnectionType = Connection - - fileprivate let _subject: S - fileprivate let _source: Observable - - fileprivate let _lock = RecursiveLock() - - // state - fileprivate var _connection: ConnectionType? - - init(source: Observable, subject: S) { - _source = source - _subject = subject - _connection = nil - } - - override func connect() -> Disposable { - return _lock.calculateLocked { - if let connection = _connection { - return connection - } - - let singleAssignmentDisposable = SingleAssignmentDisposable() - let connection = Connection(parent: self, subjectObserver: _subject.asObserver(), lock: _lock, subscription: singleAssignmentDisposable) - _connection = connection - let subscription = _source.subscribe(connection) - singleAssignmentDisposable.setDisposable(subscription) - return connection - } - } - - override func subscribe(_ observer: O) -> Disposable where O.E == S.E { - return _subject.subscribe(observer) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Debounce.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Debounce.swift deleted file mode 100644 index 0a8d7cc9..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Debounce.swift +++ /dev/null @@ -1,102 +0,0 @@ -// -// Debounce.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/11/16. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -final class DebounceSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = O.E - typealias ParentType = Debounce - - private let _parent: ParentType - - let _lock = RecursiveLock() - - // state - private var _id = 0 as UInt64 - private var _value: Element? = nil - - let cancellable = SerialDisposable() - - init(parent: ParentType, observer: O, cancel: Cancelable) { - _parent = parent - - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription = _parent._source.subscribe(self) - - return Disposables.create(subscription, cancellable) - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): - _id = _id &+ 1 - let currentId = _id - _value = element - - - let scheduler = _parent._scheduler - let dueTime = _parent._dueTime - - let d = SingleAssignmentDisposable() - self.cancellable.disposable = d - d.setDisposable(scheduler.scheduleRelative(currentId, dueTime: dueTime, action: self.propagate)) - case .error: - _value = nil - forwardOn(event) - dispose() - case .completed: - if let value = _value { - _value = nil - forwardOn(.next(value)) - } - forwardOn(.completed) - dispose() - } - } - - func propagate(_ currentId: UInt64) -> Disposable { - _lock.lock(); defer { _lock.unlock() } // { - let originalValue = _value - - if let value = originalValue, _id == currentId { - _value = nil - forwardOn(.next(value)) - } - // } - return Disposables.create() - } -} - -final class Debounce : Producer { - - fileprivate let _source: Observable - fileprivate let _dueTime: RxTimeInterval - fileprivate let _scheduler: SchedulerType - - init(source: Observable, dueTime: RxTimeInterval, scheduler: SchedulerType) { - _source = source - _dueTime = dueTime - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = DebounceSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } - -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Debug.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Debug.swift deleted file mode 100644 index a90962ee..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Debug.swift +++ /dev/null @@ -1,86 +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 - -let dateFormat = "yyyy-MM-dd HH:mm:ss.SSS" - -func logEvent(_ identifier: String, dateFormat: DateFormatter, content: String) { - print("\(dateFormat.string(from: Date())): \(identifier) -> \(content)") -} - -final class DebugSink : Sink, ObserverType where O.E == Source.E { - typealias Element = O.E - typealias Parent = Debug - - private let _parent: Parent - private let _timestampFormatter = DateFormatter() - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _timestampFormatter.dateFormat = dateFormat - - logEvent(_parent._identifier, dateFormat: _timestampFormatter, content: "subscribed") - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - let maxEventTextLength = 40 - let eventText = "\(event)" - - let eventNormalized = (eventText.characters.count > maxEventTextLength) && _parent._trimOutput - ? String(eventText.characters.prefix(maxEventTextLength / 2)) + "..." + String(eventText.characters.suffix(maxEventTextLength / 2)) - : eventText - - logEvent(_parent._identifier, dateFormat: _timestampFormatter, content: "Event \(eventNormalized)") - - forwardOn(event) - if event.isStopEvent { - dispose() - } - } - - override func dispose() { - if !self.disposed { - logEvent(_parent._identifier, dateFormat: _timestampFormatter, content: "isDisposed") - } - super.dispose() - } -} - -final 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) { - _trimOutput = trimOutput - if let identifier = identifier { - _identifier = identifier - } - else { - let trimmedFile: String - if let lastIndex = file.lastIndexOf("/") { - trimmedFile = file[file.index(after: lastIndex) ..< file.endIndex] - } - else { - trimmedFile = file - } - _identifier = "\(trimmedFile):\(line) (\(function))" - } - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Source.E { - let sink = DebugSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/DefaultIfEmpty.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/DefaultIfEmpty.swift deleted file mode 100644 index ea967b4e..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/DefaultIfEmpty.swift +++ /dev/null @@ -1,51 +0,0 @@ -// -// DefaultIfEmpty.swift -// RxSwift -// -// Created by sergdort on 23/12/2016. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -final class DefaultIfEmptySink: Sink, ObserverType { - typealias E = O.E - private let _default: E - private var _isEmpty = true - - init(default: E, observer: O, cancel: Cancelable) { - _default = `default` - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(_): - _isEmpty = false - forwardOn(event) - case .error(_): - forwardOn(event) - dispose() - case .completed: - if _isEmpty { - forwardOn(.next(_default)) - } - forwardOn(.completed) - dispose() - } - } -} - -final class DefaultIfEmpty: Producer { - private let _source: Observable - private let _default: SourceType - - init(source: Observable, `default`: SourceType) { - _source = source - _default = `default` - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceType { - let sink = DefaultIfEmptySink(default: _default, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Deferred.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Deferred.swift deleted file mode 100644 index 15d6695e..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Deferred.swift +++ /dev/null @@ -1,59 +0,0 @@ -// -// Deferred.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/19/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class DeferredSink : Sink, ObserverType where S.E == O.E { - typealias E = O.E - - private let _observableFactory: () throws -> S - - init(observableFactory: @escaping () throws -> S, observer: O, cancel: Cancelable) { - _observableFactory = observableFactory - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - do { - let result = try _observableFactory() - return result.subscribe(self) - } - catch let e { - forwardOn(.error(e)) - dispose() - return Disposables.create() - } - } - - func on(_ event: Event) { - forwardOn(event) - - switch event { - case .next: - break - case .error: - dispose() - case .completed: - dispose() - } - } -} - -final class Deferred : Producer { - typealias Factory = () throws -> S - - private let _observableFactory : Factory - - init(observableFactory: @escaping Factory) { - _observableFactory = observableFactory - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { - let sink = DeferredSink(observableFactory: _observableFactory, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Delay.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Delay.swift deleted file mode 100644 index c5c04b49..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Delay.swift +++ /dev/null @@ -1,164 +0,0 @@ -// -// Delay.swift -// RxSwift -// -// Created by tarunon on 2016/02/09. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date - -final class DelaySink - : Sink - , ObserverType { - typealias E = O.E - 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? = nil - - // state - private var _queue = Queue<(eventTime: RxTime, event: Event)>(capacity: 0) - private var _disposed = false - - init(observer: O, dueTime: RxTimeInterval, scheduler: SchedulerType, cancel: Cancelable) { - _dueTime = dueTime - _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 immediatelly. Error can bepotentially 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<()>) { - - _lock.lock() // { - let hasFailed = _errorEvent != nil - if !hasFailed { - _running = true - } - _lock.unlock() // } - - if hasFailed { - return - } - - var ranAtLeastOnce = false - - while true { - _lock.lock() // { - let errorEvent = _errorEvent - - let eventToForwardImmediatelly = ranAtLeastOnce ? nil : _queue.dequeue()?.event - let nextEventToScheduleOriginalTime: Date? = ranAtLeastOnce && !_queue.isEmpty ? _queue.peek().eventTime : nil - - if let _ = errorEvent { - } - else { - if let _ = eventToForwardImmediatelly { - } - else if let _ = nextEventToScheduleOriginalTime { - _running = false - } - else { - _running = false - _active = false - } - } - _lock.unlock() // { - - if let errorEvent = errorEvent { - self.forwardOn(errorEvent) - self.dispose() - return - } - else { - if let eventToForwardImmediatelly = eventToForwardImmediatelly { - ranAtLeastOnce = true - self.forwardOn(eventToForwardImmediatelly) - if case .completed = eventToForwardImmediatelly { - self.dispose() - return - } - } - else if let nextEventToScheduleOriginalTime = nextEventToScheduleOriginalTime { - let elapsedTime = _scheduler.now.timeIntervalSince(nextEventToScheduleOriginalTime) - let interval = _dueTime - elapsedTime - let normalizedInterval = interval < 0.0 ? 0.0 : interval - scheduler.schedule((), dueTime: normalizedInterval) - return - } - else { - return - } - } - } - } - - func on(_ event: Event) { - if event.isStopEvent { - _sourceSubscription.dispose() - } - - switch event { - case .error(_): - _lock.lock() // { - let shouldSendImmediatelly = !_running - _queue = Queue(capacity: 0) - _errorEvent = event - _lock.unlock() // } - - if shouldSendImmediatelly { - forwardOn(event) - dispose() - } - default: - _lock.lock() // { - let shouldSchedule = !_active - _active = true - _queue.enqueue((_scheduler.now, event)) - _lock.unlock() // } - - if shouldSchedule { - _cancelable.disposable = _scheduler.scheduleRecursive((), dueTime: _dueTime, action: self.drainQueue) - } - } - } - - func run(source: Observable) -> Disposable { - _sourceSubscription.setDisposable(source.subscribe(self)) - return Disposables.create(_sourceSubscription, _cancelable) - } -} - -final class Delay: Producer { - private let _source: Observable - private let _dueTime: RxTimeInterval - private let _scheduler: SchedulerType - - init(source: Observable, dueTime: RxTimeInterval, scheduler: SchedulerType) { - _source = source - _dueTime = dueTime - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = DelaySink(observer: observer, dueTime: _dueTime, scheduler: _scheduler, cancel: cancel) - let subscription = sink.run(source: _source) - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/DelaySubscription.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/DelaySubscription.swift deleted file mode 100644 index d4e8c659..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/DelaySubscription.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// DelaySubscription.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class DelaySubscriptionSink - : Sink, ObserverType { - typealias E = O.E - typealias Parent = DelaySubscription - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - forwardOn(event) - if event.isStopEvent { - dispose() - } - } - -} - -final class DelaySubscription: Producer { - private let _source: Observable - private let _dueTime: RxTimeInterval - private let _scheduler: SchedulerType - - init(source: Observable, dueTime: RxTimeInterval, scheduler: SchedulerType) { - _source = source - _dueTime = dueTime - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = DelaySubscriptionSink(parent: self, observer: observer, cancel: cancel) - let subscription = _scheduler.scheduleRelative((), dueTime: _dueTime) { _ in - return self._source.subscribe(sink) - } - - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Dematerialize.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Dematerialize.swift deleted file mode 100644 index 086f7d1b..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Dematerialize.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// Dematerialize.swift -// RxSwift -// -// Created by Jamie Pinkham on 3/13/17. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -fileprivate final class DematerializeSink: Sink, ObserverType where O.E == Element.ElementType { - fileprivate func on(_ event: Event) { - switch event { - case .next(let element): - forwardOn(element.event) - if element.event.isStopEvent { - dispose() - } - case .completed: - forwardOn(.completed) - dispose() - case .error(let error): - forwardOn(.error(error)) - dispose() - } - } -} - -final class Dematerialize: Producer { - private let _source: Observable - - init(source: Observable) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element.ElementType { - let sink = DematerializeSink(observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/DistinctUntilChanged.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/DistinctUntilChanged.swift deleted file mode 100644 index a9a482a2..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/DistinctUntilChanged.swift +++ /dev/null @@ -1,68 +0,0 @@ -// -// DistinctUntilChanged.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class DistinctUntilChangedSink: Sink, ObserverType { - typealias E = O.E - - private let _parent: DistinctUntilChanged - private var _currentKey: Key? = nil - - init(parent: DistinctUntilChanged, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - let key = try _parent._selector(value) - var areEqual = false - if let currentKey = _currentKey { - areEqual = try _parent._comparer(currentKey, key) - } - - if areEqual { - return - } - - _currentKey = key - - forwardOn(event) - } - catch let error { - forwardOn(.error(error)) - dispose() - } - case .error, .completed: - forwardOn(event) - dispose() - } - } -} - -final class DistinctUntilChanged: Producer { - typealias KeySelector = (Element) throws -> Key - typealias EqualityComparer = (Key, Key) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _selector: KeySelector - fileprivate let _comparer: EqualityComparer - - init(source: Observable, selector: @escaping KeySelector, comparer: @escaping EqualityComparer) { - _source = source - _selector = selector - _comparer = comparer - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = DistinctUntilChangedSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Do.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Do.swift deleted file mode 100644 index db33ebaa..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Do.swift +++ /dev/null @@ -1,64 +0,0 @@ -// -// Do.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class DoSink : Sink, ObserverType { - typealias Element = O.E - typealias Parent = Do - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - do { - try _parent._eventHandler(event) - forwardOn(event) - if event.isStopEvent { - dispose() - } - } - catch let error { - forwardOn(.error(error)) - dispose() - } - } -} - -final class Do : Producer { - typealias EventHandler = (Event) throws -> Void - - fileprivate let _source: Observable - fileprivate let _eventHandler: EventHandler - fileprivate let _onSubscribe: (() -> ())? - fileprivate let _onSubscribed: (() -> ())? - fileprivate let _onDispose: (() -> ())? - - init(source: Observable, eventHandler: @escaping EventHandler, onSubscribe: (() -> ())?, onSubscribed: (() -> ())?, onDispose: (() -> ())?) { - _source = source - _eventHandler = eventHandler - _onSubscribe = onSubscribe - _onSubscribed = onSubscribed - _onDispose = onDispose - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - _onSubscribe?() - let sink = DoSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - _onSubscribed?() - let onDispose = _onDispose - let allSubscriptions = Disposables.create { - subscription.dispose() - onDispose?() - } - return (sink: sink, subscription: allSubscriptions) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ElementAt.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ElementAt.swift deleted file mode 100644 index 0d774e3c..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ElementAt.swift +++ /dev/null @@ -1,78 +0,0 @@ -// -// ElementAt.swift -// RxSwift -// -// Created by Junior B. on 21/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - - -final class ElementAtSink : Sink, ObserverType { - typealias SourceType = O.E - typealias Parent = ElementAt - - let _parent: Parent - var _i: Int - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _i = parent._index - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(_): - - if (_i == 0) { - forwardOn(event) - forwardOn(.completed) - self.dispose() - } - - do { - let _ = try decrementChecked(&_i) - } catch(let e) { - forwardOn(.error(e)) - dispose() - return - } - - case .error(let e): - forwardOn(.error(e)) - self.dispose() - case .completed: - if (_parent._throwOnEmpty) { - forwardOn(.error(RxError.argumentOutOfRange)) - } else { - forwardOn(.completed) - } - - self.dispose() - } - } -} - -final 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: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == SourceType { - let sink = ElementAtSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Empty.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Empty.swift deleted file mode 100644 index 366adec0..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Empty.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// Empty.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class EmptyProducer : Producer { - override func subscribe(_ observer: O) -> Disposable where O.E == Element { - observer.on(.completed) - return Disposables.create() - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Error.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Error.swift deleted file mode 100644 index 6ef7be7f..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Error.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Error.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class ErrorProducer : Producer { - private let _error: Swift.Error - - init(error: Swift.Error) { - _error = error - } - - override func subscribe(_ observer: O) -> Disposable where O.E == Element { - observer.on(.error(_error)) - return Disposables.create() - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Filter.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Filter.swift deleted file mode 100644 index c9ef2d3c..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Filter.swift +++ /dev/null @@ -1,56 +0,0 @@ -// -// Filter.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/17/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class FilterSink: Sink, ObserverType { - typealias Predicate = (Element) throws -> Bool - typealias Element = O.E - - private let _predicate: Predicate - - init(predicate: @escaping Predicate, observer: O, cancel: Cancelable) { - _predicate = predicate - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - let satisfies = try _predicate(value) - if satisfies { - forwardOn(.next(value)) - } - } - catch let e { - forwardOn(.error(e)) - dispose() - } - case .completed, .error: - forwardOn(event) - dispose() - } - } -} - -final class Filter : Producer { - typealias Predicate = (Element) throws -> Bool - - private let _source: Observable - private let _predicate: Predicate - - init(source: Observable, predicate: @escaping Predicate) { - _source = source - _predicate = predicate - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = FilterSink(predicate: _predicate, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Generate.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Generate.swift deleted file mode 100644 index a58b37aa..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Generate.swift +++ /dev/null @@ -1,69 +0,0 @@ -// -// Generate.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/2/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class GenerateSink : Sink { - typealias Parent = Generate - - private let _parent: Parent - - private var _state: S - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _state = parent._initialState - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return _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 class Generate : Producer { - fileprivate let _initialState: S - fileprivate let _condition: (S) throws -> Bool - fileprivate let _iterate: (S) throws -> S - fileprivate let _resultSelector: (S) throws -> E - fileprivate let _scheduler: ImmediateSchedulerType - - init(initialState: S, condition: @escaping (S) throws -> Bool, iterate: @escaping (S) throws -> S, resultSelector: @escaping (S) throws -> E, scheduler: ImmediateSchedulerType) { - _initialState = initialState - _condition = condition - _iterate = iterate - _resultSelector = resultSelector - _scheduler = scheduler - super.init() - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = GenerateSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/GroupBy.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/GroupBy.swift deleted file mode 100644 index fe7a4c05..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/GroupBy.swift +++ /dev/null @@ -1,119 +0,0 @@ -// -// GroupBy.swift -// RxSwift -// -// Created by Tomi Koskinen on 01/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class GroupedObservableImpl : Observable { - private var _subject: PublishSubject - private var _refCount: RefCountDisposable - - init(key: Key, subject: PublishSubject, refCount: RefCountDisposable) { - _subject = subject - _refCount = refCount - } - - override public func subscribe(_ observer: O) -> Disposable where O.E == E { - let release = _refCount.retain() - let subscription = _subject.subscribe(observer) - return Disposables.create(release, subscription) - } -} - - -final class GroupBySink - : Sink - , ObserverType where O.E == GroupedObservable { - typealias E = Element - typealias ResultType = O.E - typealias Parent = GroupBy - - private let _parent: Parent - private let _subscription = SingleAssignmentDisposable() - private var _refCountDisposable: RefCountDisposable! - private var _groupedSubjectTable: [Key: PublishSubject] - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _groupedSubjectTable = [Key: PublishSubject]() - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - _refCountDisposable = RefCountDisposable(disposable: _subscription) - - _subscription.setDisposable(_parent._source.subscribe(self)) - - return _refCountDisposable - } - - private func onGroupEvent(key: Key, value: Element) { - if let writer = _groupedSubjectTable[key] { - writer.on(.next(value)) - } else { - let writer = PublishSubject() - _groupedSubjectTable[key] = writer - - let group = GroupedObservable( - key: key, - source: GroupedObservableImpl(key: key, subject: writer, refCount: _refCountDisposable) - ) - - forwardOn(.next(group)) - writer.on(.next(value)) - } - } - - final func on(_ event: Event) { - switch event { - case let .next(value): - do { - let groupKey = try _parent._selector(value) - onGroupEvent(key: groupKey, value: value) - } - catch let e { - error(e) - return - } - case let .error(e): - error(e) - case .completed: - forwardOnGroups(event: .completed) - forwardOn(.completed) - _subscription.dispose() - dispose() - } - } - - final func error(_ error: Swift.Error) { - forwardOnGroups(event: .error(error)) - forwardOn(.error(error)) - _subscription.dispose() - dispose() - } - - final func forwardOnGroups(event: Event) { - for writer in _groupedSubjectTable.values { - writer.on(event) - } - } -} - -final class GroupBy: Producer> { - typealias KeySelector = (Element) throws -> Key - - fileprivate let _source: Observable - fileprivate let _selector: KeySelector - - init(source: Observable, selector: @escaping KeySelector) { - _source = source - _selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == GroupedObservable { - let sink = GroupBySink(parent: self, observer: observer, cancel: cancel) - return (sink: sink, subscription: sink.run()) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Just.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Just.swift deleted file mode 100644 index 98f0ada2..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Just.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// Just.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class JustScheduledSink : Sink { - typealias Parent = JustScheduled - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let scheduler = _parent._scheduler - return scheduler.schedule(_parent._element) { element in - self.forwardOn(.next(element)) - return scheduler.schedule(()) { _ in - self.forwardOn(.completed) - self.dispose() - return Disposables.create() - } - } - } -} - -final class JustScheduled : Producer { - fileprivate let _scheduler: ImmediateSchedulerType - fileprivate let _element: Element - - init(element: Element, scheduler: ImmediateSchedulerType) { - _scheduler = scheduler - _element = element - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = JustScheduledSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -final class Just : Producer { - private let _element: Element - - init(element: Element) { - _element = element - } - - override func subscribe(_ observer: O) -> Disposable where O.E == Element { - observer.on(.next(_element)) - observer.on(.completed) - return Disposables.create() - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Map.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Map.swift deleted file mode 100644 index b4e23001..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Map.swift +++ /dev/null @@ -1,143 +0,0 @@ -// -// Map.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class MapSink : Sink, ObserverType { - typealias Transform = (SourceType) throws -> ResultType - - typealias ResultType = O.E - typealias Element = SourceType - - private let _transform: Transform - - init(transform: @escaping Transform, observer: O, cancel: Cancelable) { - _transform = transform - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let element): - do { - let mappedElement = try _transform(element) - forwardOn(.next(mappedElement)) - } - catch let e { - forwardOn(.error(e)) - dispose() - } - case .error(let error): - forwardOn(.error(error)) - dispose() - case .completed: - forwardOn(.completed) - dispose() - } - } -} - -final class MapWithIndexSink : Sink, ObserverType { - typealias Selector = (SourceType, Int) throws -> ResultType - - typealias ResultType = O.E - typealias Element = SourceType - typealias Parent = MapWithIndex - - private let _selector: Selector - - private var _index = 0 - - init(selector: @escaping Selector, observer: O, cancel: Cancelable) { - _selector = selector - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let element): - do { - let mappedElement = try _selector(element, try incrementChecked(&_index)) - forwardOn(.next(mappedElement)) - } - catch let e { - forwardOn(.error(e)) - dispose() - } - case .error(let error): - forwardOn(.error(error)) - dispose() - case .completed: - forwardOn(.completed) - dispose() - } - } -} - -final class MapWithIndex : Producer { - typealias Selector = (SourceType, Int) throws -> ResultType - - private let _source: Observable - - private let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - _source = source - _selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == ResultType { - let sink = MapWithIndexSink(selector: _selector, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} - -#if TRACE_RESOURCES - var _numberOfMapOperators: AtomicInt = 0 - extension Resources { - public static var numberOfMapOperators: Int32 { - return _numberOfMapOperators.valueSnapshot() - } - } -#endif - -final class Map: Producer { - typealias Transform = (SourceType) throws -> ResultType - - private let _source: Observable - - private let _transform: Transform - - init(source: Observable, transform: @escaping Transform) { - _source = source - _transform = transform - -#if TRACE_RESOURCES - let _ = AtomicIncrement(&_numberOfMapOperators) -#endif - } - - override func composeMap(_ selector: @escaping (ResultType) throws -> R) -> Observable { - let originalSelector = _transform - return Map(source: _source, transform: { (s: SourceType) throws -> R in - let r: ResultType = try originalSelector(s) - return try selector(r) - }) - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == ResultType { - let sink = MapSink(transform: _transform, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - - #if TRACE_RESOURCES - deinit { - let _ = AtomicDecrement(&_numberOfMapOperators) - } - #endif -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Materialize.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Materialize.swift deleted file mode 100644 index ac15015b..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Materialize.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// Materialize.swift -// RxSwift -// -// Created by sergdort on 08/03/2017. -// Copyright © 2017 Krunoslav Zaher. All rights reserved. -// - -fileprivate final class MaterializeSink: Sink, ObserverType where O.E == Event { - - func on(_ event: Event) { - forwardOn(.next(event)) - if event.isStopEvent { - forwardOn(.completed) - dispose() - } - } -} - -final class Materialize: Producer> { - private let _source: Observable - - init(source: Observable) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = MaterializeSink(observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Merge.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Merge.swift deleted file mode 100644 index 186a58e7..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Merge.swift +++ /dev/null @@ -1,437 +0,0 @@ -// -// Merge.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/28/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -// MARK: Limited concurrency version - -fileprivate final class MergeLimitedSinkIter - : ObserverType - , LockOwnerType - , SynchronizedOnType where S.E == O.E { - typealias E = O.E - typealias DisposeKey = CompositeDisposable.DisposeKey - typealias Parent = MergeLimitedSink - - private let _parent: Parent - private let _disposeKey: DisposeKey - - var _lock: RecursiveLock { - return _parent._lock - } - - init(parent: Parent, disposeKey: DisposeKey) { - _parent = parent - _disposeKey = disposeKey - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - _parent.forwardOn(event) - case .error: - _parent.forwardOn(event) - _parent.dispose() - case .completed: - _parent._group.remove(for: _disposeKey) - if let next = _parent._queue.dequeue() { - _parent.subscribe(next, group: _parent._group) - } - else { - _parent._activeCount = _parent._activeCount - 1 - - if _parent._stopped && _parent._activeCount == 0 { - _parent.forwardOn(.completed) - _parent.dispose() - } - } - } - } -} - -fileprivate final class MergeLimitedSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType where S.E == O.E { - typealias E = S - 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: O, cancel: Cancelable) { - _maxConcurrent = maxConcurrent - - let _ = _group.insert(_sourceSubscription) - super.init(observer: observer, cancel: cancel) - } - - func run(_ source: Observable) -> Disposable { - let _ = _group.insert(_sourceSubscription) - - let disposable = source.subscribe(self) - _sourceSubscription.setDisposable(disposable) - return _group - } - - func subscribe(_ innerSource: E, group: CompositeDisposable) { - let subscription = SingleAssignmentDisposable() - - let key = group.insert(subscription) - - if let key = key { - let observer = MergeLimitedSinkIter(parent: self, disposeKey: key) - - let disposable = innerSource.asObservable().subscribe(observer) - subscription.setDisposable(disposable) - } - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let value): - let subscribe: Bool - if _activeCount < _maxConcurrent { - _activeCount += 1 - subscribe = true - } - else { - _queue.enqueue(value) - subscribe = false - } - - if subscribe { - self.subscribe(value, group: _group) - } - case .error(let error): - forwardOn(.error(error)) - dispose() - case .completed: - if _activeCount == 0 { - forwardOn(.completed) - dispose() - } - else { - _sourceSubscription.dispose() - } - - _stopped = true - } - } -} - -final class MergeLimited : Producer { - private let _source: Observable - private let _maxConcurrent: Int - - init(source: Observable, maxConcurrent: Int) { - _source = source - _maxConcurrent = maxConcurrent - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { - let sink = MergeLimitedSink(maxConcurrent: _maxConcurrent, observer: observer, cancel: cancel) - let subscription = sink.run(_source) - return (sink: sink, subscription: subscription) - } -} - -// MARK: Merge - -fileprivate final class MergeBasicSink : MergeSink where O.E == S.E { - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: S) throws -> S { - return element - } -} - -// MARK: flatMap - -fileprivate final class FlatMapSink : MergeSink where O.E == S.E { - typealias Selector = (SourceType) throws -> S - - private let _selector: Selector - - init(selector: @escaping Selector, observer: O, cancel: Cancelable) { - _selector = selector - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceType) throws -> S { - return try _selector(element) - } -} - -fileprivate final class FlatMapWithIndexSink : MergeSink where O.E == S.E { - typealias Selector = (SourceType, Int) throws -> S - - private var _index = 0 - private let _selector: Selector - - init(selector: @escaping Selector, observer: O, cancel: Cancelable) { - _selector = selector - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceType) throws -> S { - return try _selector(element, try incrementChecked(&_index)) - } -} - -// MARK: FlatMapFirst - -fileprivate final class FlatMapFirstSink : MergeSink where O.E == S.E { - typealias Selector = (SourceType) throws -> S - - private let _selector: Selector - - override var subscribeNext: Bool { - return _activeCount == 0 - } - - init(selector: @escaping Selector, observer: O, cancel: Cancelable) { - _selector = selector - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceType) throws -> S { - return try _selector(element) - } -} - -fileprivate final class MergeSinkIter : ObserverType where O.E == S.E { - typealias Parent = MergeSink - typealias DisposeKey = CompositeDisposable.DisposeKey - typealias E = O.E - - private let _parent: Parent - private let _disposeKey: DisposeKey - - init(parent: Parent, disposeKey: DisposeKey) { - _parent = parent - _disposeKey = disposeKey - } - - func on(_ event: Event) { - _parent._lock.lock(); defer { _parent._lock.unlock() } // lock { - switch event { - case .next(let value): - _parent.forwardOn(.next(value)) - case .error(let error): - _parent.forwardOn(.error(error)) - _parent.dispose() - case .completed: - _parent._group.remove(for: _disposeKey) - _parent._activeCount -= 1 - _parent.checkCompleted() - } - // } - } -} - - -fileprivate class MergeSink - : Sink - , ObserverType where O.E == S.E { - typealias ResultType = O.E - typealias Element = SourceType - - let _lock = RecursiveLock() - - var subscribeNext: Bool { - return true - } - - // state - let _group = CompositeDisposable() - let _sourceSubscription = SingleAssignmentDisposable() - - var _activeCount = 0 - var _stopped = false - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func performMap(_ element: SourceType) throws -> S { - rxAbstractMethod() - } - - func on(_ event: Event) { - _lock.lock(); defer { _lock.unlock() } // lock { - switch event { - case .next(let element): - if !subscribeNext { - return - } - do { - let value = try performMap(element) - subscribeInner(value.asObservable()) - } - catch let e { - forwardOn(.error(e)) - dispose() - } - case .error(let error): - forwardOn(.error(error)) - dispose() - case .completed: - _stopped = true - _sourceSubscription.dispose() - checkCompleted() - } - //} - } - - func subscribeInner(_ source: Observable) { - let iterDisposable = SingleAssignmentDisposable() - if let disposeKey = _group.insert(iterDisposable) { - _activeCount += 1 - let iter = MergeSinkIter(parent: self, disposeKey: disposeKey) - let subscription = source.subscribe(iter) - iterDisposable.setDisposable(subscription) - } - } - - func run(_ sources: [SourceType]) -> Disposable { - let _ = _group.insert(_sourceSubscription) - _stopped = true - - for source in sources { - self.on(.next(source)) - } - - checkCompleted() - - return _group - } - - @inline(__always) - func checkCompleted() { - if _stopped && _activeCount == 0 { - self.forwardOn(.completed) - self.dispose() - } - } - - func run(_ source: Observable) -> Disposable { - let _ = _group.insert(_sourceSubscription) - - let subscription = source.subscribe(self) - _sourceSubscription.setDisposable(subscription) - - return _group - } -} - -// MARK: Producers - -final class FlatMap: Producer { - typealias Selector = (SourceType) throws -> S - - private let _source: Observable - - private let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - _source = source - _selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { - let sink = FlatMapSink(selector: _selector, observer: observer, cancel: cancel) - let subscription = sink.run(_source) - return (sink: sink, subscription: subscription) - } -} - -final class FlatMapWithIndex: Producer { - typealias Selector = (SourceType, Int) throws -> S - - private let _source: Observable - - private let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - _source = source - _selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { - let sink = FlatMapWithIndexSink(selector: _selector, observer: observer, cancel: cancel) - let subscription = sink.run(_source) - return (sink: sink, subscription: subscription) - } - -} - -final class FlatMapFirst: Producer { - typealias Selector = (SourceType) throws -> S - - private let _source: Observable - - private let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - _source = source - _selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { - let sink = FlatMapFirstSink(selector: _selector, observer: observer, cancel: cancel) - let subscription = sink.run(_source) - return (sink: sink, subscription: subscription) - } -} - -final class Merge : Producer { - private let _source: Observable - - init(source: Observable) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { - let sink = MergeBasicSink(observer: observer, cancel: cancel) - let subscription = sink.run(_source) - return (sink: sink, subscription: subscription) - } -} - -final class MergeArray : Producer { - private let _sources: [Observable] - - init(sources: [Observable]) { - _sources = sources - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = MergeBasicSink, O>(observer: observer, cancel: cancel) - let subscription = sink.run(_sources) - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Multicast.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Multicast.swift deleted file mode 100644 index 51e36890..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Multicast.swift +++ /dev/null @@ -1,69 +0,0 @@ -// -// Multicast.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/27/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class MulticastSink: Sink, ObserverType { - typealias Element = O.E - typealias ResultType = Element - typealias MutlicastType = Multicast - - private let _parent: MutlicastType - - init(parent: MutlicastType, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - do { - let subject = try _parent._subjectSelector() - let connectable = ConnectableObservableAdapter(source: _parent._source, subject: subject) - - let observable = try _parent._selector(connectable) - - let subscription = observable.subscribe(self) - let connection = connectable.connect() - - return Disposables.create(subscription, connection) - } - catch let e { - forwardOn(.error(e)) - dispose() - return Disposables.create() - } - } - - func on(_ event: Event) { - forwardOn(event) - switch event { - case .next: break - case .error, .completed: - dispose() - } - } -} - -final class Multicast: Producer { - typealias SubjectSelectorType = () throws -> S - typealias SelectorType = (Observable) throws -> Observable - - fileprivate let _source: Observable - fileprivate let _subjectSelector: SubjectSelectorType - fileprivate let _selector: SelectorType - - init(source: Observable, subjectSelector: @escaping SubjectSelectorType, selector: @escaping SelectorType) { - _source = source - _subjectSelector = subjectSelector - _selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = MulticastSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Never.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Never.swift deleted file mode 100644 index 309d35b5..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Never.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// Never.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class NeverProducer : Producer { - override func subscribe(_ observer: O) -> Disposable where O.E == Element { - return Disposables.create() - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOn.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOn.swift deleted file mode 100644 index a5b901df..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOn.swift +++ /dev/null @@ -1,127 +0,0 @@ -// -// ObserveOn.swift -// RxSwift -// -// Created by Krunoslav Zaher on 7/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class ObserveOn : Producer { - let scheduler: ImmediateSchedulerType - let source: Observable - - init(source: Observable, scheduler: ImmediateSchedulerType) { - self.scheduler = scheduler - self.source = source - -#if TRACE_RESOURCES - let _ = Resources.incrementTotal() -#endif - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = ObserveOnSink(scheduler: scheduler, observer: observer, cancel: cancel) - let subscription = source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - -#if TRACE_RESOURCES - deinit { - let _ = Resources.decrementTotal() - } -#endif -} - -enum ObserveOnState : Int32 { - // pump is not running - case stopped = 0 - // pump is running - case running = 1 -} - -final class ObserveOnSink : ObserverBase { - typealias E = O.E - - let _scheduler: ImmediateSchedulerType - - var _lock = SpinLock() - let _observer: O - - // state - var _state = ObserveOnState.stopped - var _queue = Queue>(capacity: 10) - - let _scheduleDisposable = SerialDisposable() - let _cancel: Cancelable - - init(scheduler: ImmediateSchedulerType, observer: O, cancel: Cancelable) { - _scheduler = scheduler - _observer = observer - _cancel = cancel - } - - override func onCore(_ event: Event) { - let shouldStart = _lock.calculateLocked { () -> Bool in - self._queue.enqueue(event) - - switch self._state { - case .stopped: - self._state = .running - return true - case .running: - return false - } - } - - if shouldStart { - _scheduleDisposable.disposable = self._scheduler.scheduleRecursive((), action: self.run) - } - } - - func run(_ state: Void, recurse: (Void) -> Void) { - let (nextEvent, observer) = self._lock.calculateLocked { () -> (Event?, O) in - if self._queue.count > 0 { - return (self._queue.dequeue(), self._observer) - } - else { - self._state = .stopped - return (nil, self._observer) - } - } - - if let nextEvent = nextEvent, !_cancel.isDisposed { - observer.on(nextEvent) - if nextEvent.isStopEvent { - dispose() - } - } - else { - return - } - - let shouldContinue = _shouldContinue_synchronized() - - if shouldContinue { - recurse() - } - } - - func _shouldContinue_synchronized() -> Bool { - _lock.lock(); defer { _lock.unlock() } // { - if self._queue.count > 0 { - return true - } - else { - self._state = .stopped - return false - } - // } - } - - override func dispose() { - super.dispose() - - _cancel.dispose() - _scheduleDisposable.dispose() - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOnSerialDispatchQueue.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOnSerialDispatchQueue.swift deleted file mode 100644 index 252a0e26..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ObserveOnSerialDispatchQueue.swift +++ /dev/null @@ -1,85 +0,0 @@ -// -// ObserveOnSerialDispatchQueue.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/31/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -#if TRACE_RESOURCES - fileprivate var _numberOfSerialDispatchQueueObservables: AtomicInt = 0 - extension Resources { - /** - Counts number of `SerialDispatchQueueObservables`. - - Purposed for unit tests. - */ - public static var numberOfSerialDispatchQueueObservables: Int32 { - return _numberOfSerialDispatchQueueObservables.valueSnapshot() - } - } -#endif - -final class ObserveOnSerialDispatchQueueSink : ObserverBase { - let scheduler: SerialDispatchQueueScheduler - let observer: O - - let cancel: Cancelable - - var cachedScheduleLambda: ((ObserveOnSerialDispatchQueueSink, Event) -> Disposable)! - - init(scheduler: SerialDispatchQueueScheduler, observer: O, cancel: Cancelable) { - self.scheduler = scheduler - self.observer = observer - self.cancel = cancel - super.init() - - cachedScheduleLambda = { sink, event in - sink.observer.on(event) - - if event.isStopEvent { - sink.dispose() - } - - return Disposables.create() - } - } - - override func onCore(_ event: Event) { - let _ = self.scheduler.schedule((self, event), action: cachedScheduleLambda) - } - - override func dispose() { - super.dispose() - - cancel.dispose() - } -} - -final class ObserveOnSerialDispatchQueue : Producer { - let scheduler: SerialDispatchQueueScheduler - let source: Observable - - init(source: Observable, scheduler: SerialDispatchQueueScheduler) { - self.scheduler = scheduler - self.source = source - -#if TRACE_RESOURCES - let _ = Resources.incrementTotal() - let _ = AtomicIncrement(&_numberOfSerialDispatchQueueObservables) -#endif - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = ObserveOnSerialDispatchQueueSink(scheduler: scheduler, observer: observer, cancel: cancel) - let subscription = source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - -#if TRACE_RESOURCES - deinit { - let _ = Resources.decrementTotal() - let _ = AtomicDecrement(&_numberOfSerialDispatchQueueObservables) - } -#endif -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Optional.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Optional.swift deleted file mode 100644 index 534e2791..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Optional.swift +++ /dev/null @@ -1,68 +0,0 @@ -// -// Optional.swift -// RxSwift -// -// Created by tarunon on 2016/12/13. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -final class ObservableOptionalScheduledSink : Sink { - typealias E = O.E - typealias Parent = ObservableOptionalScheduled - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return _parent._scheduler.schedule(_parent._optional) { (optional: E?) -> Disposable in - if let next = optional { - self.forwardOn(.next(next)) - return self._parent._scheduler.schedule(()) { _ in - self.forwardOn(.completed) - self.dispose() - return Disposables.create() - } - } else { - self.forwardOn(.completed) - self.dispose() - return Disposables.create() - } - } - } -} - -final class ObservableOptionalScheduled : Producer { - fileprivate let _optional: E? - fileprivate let _scheduler: ImmediateSchedulerType - - init(optional: E?, scheduler: ImmediateSchedulerType) { - _optional = optional - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = ObservableOptionalScheduledSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -final class ObservableOptional: Producer { - private let _optional: E? - - init(optional: E?) { - _optional = optional - } - - override func subscribe(_ observer: O) -> Disposable where O.E == E { - if let element = _optional { - observer.on(.next(element)) - } - observer.on(.completed) - return Disposables.create() - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Producer.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Producer.swift deleted file mode 100644 index 996b0110..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Producer.swift +++ /dev/null @@ -1,98 +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: O) -> Disposable where O.E == Element { - if !CurrentThreadScheduler.isScheduleRequired { - // The returned disposable needs to release all references once it was disposed. - let disposer = SinkDisposer() - let sinkAndSubscription = 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: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - rxAbstractMethod() - } -} - -fileprivate final class SinkDisposer: Cancelable { - fileprivate enum DisposeState: UInt32 { - case disposed = 1 - case sinkAndSubscriptionSet = 2 - } - - // Jeej, swift API consistency rules - fileprivate enum DisposeStateInt32: Int32 { - case disposed = 1 - case sinkAndSubscriptionSet = 2 - } - - private var _state: AtomicInt = 0 - private var _sink: Disposable? = nil - private var _subscription: Disposable? = nil - - var isDisposed: Bool { - return AtomicFlagSet(DisposeState.disposed.rawValue, &_state) - } - - func setSinkAndSubscription(sink: Disposable, subscription: Disposable) { - _sink = sink - _subscription = subscription - - let previousState = AtomicOr(DisposeState.sinkAndSubscriptionSet.rawValue, &_state) - if (previousState & DisposeStateInt32.sinkAndSubscriptionSet.rawValue) != 0 { - rxFatalError("Sink and subscription were already set") - } - - if (previousState & DisposeStateInt32.disposed.rawValue) != 0 { - sink.dispose() - subscription.dispose() - _sink = nil - _subscription = nil - } - } - - func dispose() { - let previousState = AtomicOr(DisposeState.disposed.rawValue, &_state) - - if (previousState & DisposeStateInt32.disposed.rawValue) != 0 { - return - } - - if (previousState & DisposeStateInt32.sinkAndSubscriptionSet.rawValue) != 0 { - guard let sink = _sink else { - rxFatalError("Sink not set") - } - guard let subscription = _subscription else { - rxFatalError("Subscription not set") - } - - sink.dispose() - subscription.dispose() - - _sink = nil - _subscription = nil - } - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Range.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Range.swift deleted file mode 100644 index c302dd21..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Range.swift +++ /dev/null @@ -1,57 +0,0 @@ -// -// Range.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/13/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class RangeProducer : Producer { - fileprivate let _start: E - fileprivate let _count: E - fileprivate let _scheduler: ImmediateSchedulerType - - init(start: E, count: E, scheduler: ImmediateSchedulerType) { - if count < 0 { - rxFatalError("count can't be negative") - } - - if start &+ (count - 1) < start { - rxFatalError("overflow of count") - } - - _start = start - _count = count - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = RangeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - -final class RangeSink : Sink where O.E: SignedInteger { - typealias Parent = RangeProducer - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return _parent._scheduler.scheduleRecursive(0 as O.E) { 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/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Reduce.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Reduce.swift deleted file mode 100644 index 17d241f5..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Reduce.swift +++ /dev/null @@ -1,72 +0,0 @@ -// -// Reduce.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/1/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class ReduceSink : Sink, ObserverType { - typealias ResultType = O.E - typealias Parent = Reduce - - private let _parent: Parent - private var _accumulation: AccumulateType - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _accumulation = parent._seed - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - _accumulation = try _parent._accumulator(_accumulation, value) - } - catch let e { - forwardOn(.error(e)) - dispose() - } - case .error(let e): - forwardOn(.error(e)) - dispose() - case .completed: - do { - let result = try _parent._mapResult(_accumulation) - forwardOn(.next(result)) - forwardOn(.completed) - dispose() - } - catch let e { - forwardOn(.error(e)) - dispose() - } - } - } -} - -final 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) { - _source = source - _seed = seed - _accumulator = accumulator - _mapResult = mapResult - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == ResultType { - let sink = ReduceSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/RefCount.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/RefCount.swift deleted file mode 100644 index 7b3de82e..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/RefCount.swift +++ /dev/null @@ -1,86 +0,0 @@ -// -// RefCount.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/5/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class RefCountSink - : Sink - , ObserverType where CO.E == O.E { - typealias Element = O.E - typealias Parent = RefCount - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription = _parent._source.subscribe(self) - - _parent._lock.lock(); defer { _parent._lock.unlock() } // { - if _parent._count == 0 { - _parent._count = 1 - _parent._connectableSubscription = _parent._source.connect() - } - else { - _parent._count = _parent._count + 1 - } - // } - - return Disposables.create { - subscription.dispose() - self._parent._lock.lock(); defer { self._parent._lock.unlock() } // { - if self._parent._count == 1 { - self._parent._count = 0 - guard let connectableSubscription = self._parent._connectableSubscription else { - return - } - - connectableSubscription.dispose() - self._parent._connectableSubscription = nil - } - else if self._parent._count > 1 { - self._parent._count = self._parent._count - 1 - } - else { - rxFatalError("Something went wrong with RefCount disposing mechanism") - } - // } - } - } - - func on(_ event: Event) { - switch event { - case .next: - forwardOn(event) - case .error, .completed: - forwardOn(event) - dispose() - } - } -} - -final class RefCount: Producer { - fileprivate let _lock = RecursiveLock() - - // state - fileprivate var _count = 0 - fileprivate var _connectableSubscription = nil as Disposable? - - fileprivate let _source: CO - - init(source: CO) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == CO.E { - let sink = RefCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Repeat.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Repeat.swift deleted file mode 100644 index d4749f6b..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Repeat.swift +++ /dev/null @@ -1,42 +0,0 @@ -// -// Repeat.swift -// RxSwift -// -// Created by Krunoslav Zaher on 9/13/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class RepeatElement : Producer { - fileprivate let _element: Element - fileprivate let _scheduler: ImmediateSchedulerType - - init(element: Element, scheduler: ImmediateSchedulerType) { - _element = element - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = RepeatElementSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - - return (sink: sink, subscription: subscription) - } -} - -final class RepeatElementSink : Sink { - typealias Parent = RepeatElement - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return _parent._scheduler.scheduleRecursive(_parent._element) { e, recurse in - self.forwardOn(.next(e)) - recurse(e) - } - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/RetryWhen.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/RetryWhen.swift deleted file mode 100644 index b836eb6f..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/RetryWhen.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// RetryWhen.swift -// RxSwift -// -// Created by Junior B. on 06/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class RetryTriggerSink - : ObserverType where S.Iterator.Element : ObservableType, S.Iterator.Element.E == O.E { - typealias E = TriggerObservable.E - - typealias Parent = RetryWhenSequenceSinkIter - - fileprivate let _parent: Parent - - init(parent: Parent) { - _parent = parent - } - - func on(_ event: Event) { - switch event { - case .next: - _parent._parent._lastError = nil - _parent._parent.schedule(.moveNext) - case .error(let e): - _parent._parent.forwardOn(.error(e)) - _parent._parent.dispose() - case .completed: - _parent._parent.forwardOn(.completed) - _parent._parent.dispose() - } - } -} - -final class RetryWhenSequenceSinkIter - : ObserverType - , Disposable where S.Iterator.Element : ObservableType, S.Iterator.Element.E == O.E { - typealias E = O.E - typealias Parent = RetryWhenSequenceSink - - fileprivate let _parent: Parent - fileprivate let _errorHandlerSubscription = SingleAssignmentDisposable() - fileprivate let _subscription: Disposable - - init(parent: Parent, subscription: Disposable) { - _parent = parent - _subscription = subscription - } - - func on(_ event: Event) { - switch event { - case .next: - _parent.forwardOn(event) - case .error(let error): - _parent._lastError = error - - if let failedWith = error as? Error { - // dispose current subscription - _subscription.dispose() - - let errorHandlerSubscription = _parent._notifier.subscribe(RetryTriggerSink(parent: self)) - _errorHandlerSubscription.setDisposable(errorHandlerSubscription) - _parent._errorSubject.on(.next(failedWith)) - } - else { - _parent.forwardOn(.error(error)) - _parent.dispose() - } - case .completed: - _parent.forwardOn(event) - _parent.dispose() - } - } - - final func dispose() { - _subscription.dispose() - _errorHandlerSubscription.dispose() - } -} - -final class RetryWhenSequenceSink - : TailRecursiveSink where S.Iterator.Element : ObservableType, S.Iterator.Element.E == O.E { - typealias Element = O.E - 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: O, cancel: Cancelable) { - _parent = parent - _handler = parent._notificationHandler(_errorSubject).asObservable() - super.init(observer: observer, cancel: cancel) - } - - override func done() { - if let lastError = _lastError { - forwardOn(.error(lastError)) - _lastError = nil - } - else { - forwardOn(.completed) - } - - 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 = _handler.subscribe(_notifier.asObserver()) - let superSubscription = super.run(sources) - return Disposables.create(superSubscription, triggerSubscription) - } -} - -final class RetryWhenSequence : Producer where S.Iterator.Element : ObservableType { - typealias Element = S.Iterator.Element.E - - fileprivate let _sources: S - fileprivate let _notificationHandler: (Observable) -> TriggerObservable - - init(sources: S, notificationHandler: @escaping (Observable) -> TriggerObservable) { - _sources = sources - _notificationHandler = notificationHandler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == 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/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Sample.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Sample.swift deleted file mode 100644 index 88916779..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Sample.swift +++ /dev/null @@ -1,122 +0,0 @@ -// -// Sample.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/1/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class SamplerSink - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias E = SampleType - - typealias Parent = SampleSequenceSink - - fileprivate let _parent: Parent - - var _lock: RecursiveLock { - return _parent._lock - } - - init(parent: Parent) { - _parent = parent - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - if let element = _parent._element { - _parent._element = nil - _parent.forwardOn(.next(element)) - } - - if _parent._atEnd { - _parent.forwardOn(.completed) - _parent.dispose() - } - case .error(let e): - _parent.forwardOn(.error(e)) - _parent.dispose() - case .completed: - if let element = _parent._element { - _parent._element = nil - _parent.forwardOn(.next(element)) - } - if _parent._atEnd { - _parent.forwardOn(.completed) - _parent.dispose() - } - } - } -} - -final class SampleSequenceSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = O.E - 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: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - _sourceSubscription.setDisposable(_parent._source.subscribe(self)) - let samplerSubscription = _parent._sampler.subscribe(SamplerSink(parent: self)) - - return Disposables.create(_sourceSubscription, samplerSubscription) - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): - _element = element - case .error: - forwardOn(event) - dispose() - case .completed: - _atEnd = true - _sourceSubscription.dispose() - } - } - -} - -final class Sample : Producer { - fileprivate let _source: Observable - fileprivate let _sampler: Observable - - init(source: Observable, sampler: Observable) { - _source = source - _sampler = sampler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SampleSequenceSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Scan.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Scan.swift deleted file mode 100644 index c84385ac..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Scan.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// Scan.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class ScanSink : Sink, ObserverType { - typealias Accumulate = O.E - typealias Parent = Scan - typealias E = ElementType - - fileprivate let _parent: Parent - fileprivate var _accumulate: Accumulate - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _accumulate = parent._seed - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let element): - do { - _accumulate = try _parent._accumulator(_accumulate, element) - forwardOn(.next(_accumulate)) - } - catch let error { - forwardOn(.error(error)) - dispose() - } - case .error(let error): - forwardOn(.error(error)) - dispose() - case .completed: - forwardOn(.completed) - dispose() - } - } - -} - -final class Scan: Producer { - typealias Accumulator = (Accumulate, Element) throws -> Accumulate - - fileprivate let _source: Observable - fileprivate let _seed: Accumulate - fileprivate let _accumulator: Accumulator - - init(source: Observable, seed: Accumulate, accumulator: @escaping Accumulator) { - _source = source - _seed = seed - _accumulator = accumulator - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Accumulate { - let sink = ScanSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Sequence.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Sequence.swift deleted file mode 100644 index e25825a4..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Sequence.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// Sequence.swift -// RxSwift -// -// Created by Krunoslav Zaher on 11/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class ObservableSequenceSink : Sink where S.Iterator.Element == O.E { - typealias Parent = ObservableSequence - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return _parent._scheduler.scheduleRecursive((_parent._elements.makeIterator(), _parent._elements)) { (iterator, recurse) in - var mutableIterator = iterator - if let next = mutableIterator.0.next() { - self.forwardOn(.next(next)) - recurse(mutableIterator) - } - else { - self.forwardOn(.completed) - self.dispose() - } - } - } -} - -final class ObservableSequence : Producer { - fileprivate let _elements: S - fileprivate let _scheduler: ImmediateSchedulerType - - init(elements: S, scheduler: ImmediateSchedulerType) { - _elements = elements - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = ObservableSequenceSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1.swift deleted file mode 100644 index c874708d..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1.swift +++ /dev/null @@ -1,104 +0,0 @@ -// -// ShareReplay1.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -// optimized version of share replay for most common case -final class ShareReplay1 - : Observable - , ObserverType - , SynchronizedUnsubscribeType { - - typealias Observers = AnyObserver.s - typealias DisposeKey = Observers.KeyType - - private let _source: Observable - - private let _lock = RecursiveLock() - - private var _connection: SingleAssignmentDisposable? - private var _element: Element? - private var _stopped = false - private var _stopEvent = nil as Event? - private var _observers = Observers() - - init(source: Observable) { - self._source = source - } - - override func subscribe(_ observer: O) -> Disposable where O.E == E { - _lock.lock() - let result = _synchronized_subscribe(observer) - _lock.unlock() - return result - } - - func _synchronized_subscribe(_ observer: O) -> Disposable where O.E == E { - if let element = self._element { - observer.on(.next(element)) - } - - if let stopEvent = self._stopEvent { - observer.on(stopEvent) - return Disposables.create() - } - - let initialCount = self._observers.count - - let disposeKey = self._observers.insert(observer.on) - - if initialCount == 0 { - let connection = SingleAssignmentDisposable() - _connection = connection - - connection.setDisposable(self._source.subscribe(self)) - } - - return SubscriptionDisposable(owner: self, key: disposeKey) - } - - func synchronizedUnsubscribe(_ disposeKey: DisposeKey) { - _lock.lock() - _synchronized_unsubscribe(disposeKey) - _lock.unlock() - } - - func _synchronized_unsubscribe(_ disposeKey: DisposeKey) { - // if already unsubscribed, just return - if self._observers.removeKey(disposeKey) == nil { - return - } - - if _observers.count == 0 { - _connection?.dispose() - _connection = nil - } - } - - func on(_ event: Event) { - dispatch(_synchronized_on(event), event) - } - - func _synchronized_on(_ event: Event) -> Observers { - _lock.lock(); defer { _lock.unlock() } - if _stopped { - return Observers() - } - - switch event { - case .next(let element): - _element = element - case .error, .completed: - _stopEvent = event - _stopped = true - _connection?.dispose() - _connection = nil - } - - return _observers - } - -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1WhileConnected.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1WhileConnected.swift deleted file mode 100644 index bd8d026c..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ShareReplay1WhileConnected.swift +++ /dev/null @@ -1,155 +0,0 @@ -// -// ShareReplay1WhileConnected.swift -// RxSwift -// -// Created by Krunoslav Zaher on 12/6/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -fileprivate final class ShareReplay1WhileConnectedConnection - : ObserverType - , SynchronizedUnsubscribeType { - typealias E = Element - typealias Observers = AnyObserver.s - typealias DisposeKey = Observers.KeyType - - typealias Parent = ShareReplay1WhileConnected - private let _parent: Parent - private let _subscription = SingleAssignmentDisposable() - - private let _lock: RecursiveLock - private var _disposed: Bool = false - fileprivate var _observers = Observers() - fileprivate var _element: Element? - - init(parent: Parent, lock: RecursiveLock) { - _parent = parent - _lock = lock - - #if TRACE_RESOURCES - _ = Resources.incrementTotal() - #endif - } - - final func on(_ event: Event) { - _lock.lock() - let observers = _synchronized_on(event) - _lock.unlock() - dispatch(observers, event) - } - - final private func _synchronized_on(_ event: Event) -> Observers { - if _disposed { - return Observers() - } - - switch event { - case .next(let element): - _element = element - return _observers - case .error, .completed: - let observers = _observers - self._synchronized_dispose() - return observers - } - } - - final func connect() { - _subscription.setDisposable(_parent._source.subscribe(self)) - } - - final func _synchronized_subscribe(_ observer: O) -> Disposable where O.E == Element { - _lock.lock(); defer { _lock.unlock() } - if let element = _element { - observer.on(.next(element)) - } - - let disposeKey = _observers.insert(observer.on) - - return SubscriptionDisposable(owner: self, key: disposeKey) - } - - final private func _synchronized_dispose() { - _disposed = true - if _parent._connection === self { - _parent._connection = nil - } - _observers = Observers() - _subscription.dispose() - } - - final func synchronizedUnsubscribe(_ disposeKey: DisposeKey) { - _lock.lock() - _synchronized_unsubscribe(disposeKey) - _lock.unlock() - } - - @inline(__always) - final private func _synchronized_unsubscribe(_ disposeKey: DisposeKey) { - // if already unsubscribed, just return - if self._observers.removeKey(disposeKey) == nil { - return - } - - if _observers.count == 0 { - _synchronized_dispose() - } - } - - #if TRACE_RESOURCES - deinit { - _ = Resources.decrementTotal() - } - #endif -} - -// optimized version of share replay for most common case -final class ShareReplay1WhileConnected - : Observable { - - fileprivate typealias Connection = ShareReplay1WhileConnectedConnection - - fileprivate let _source: Observable - - fileprivate let _lock = RecursiveLock() - - fileprivate var _connection: Connection? - - init(source: Observable) { - self._source = source - } - - override func subscribe(_ observer: O) -> Disposable where O.E == E { - _lock.lock() - - let connection = _synchronized_subscribe(observer) - let count = connection._observers.count - - let disposable = connection._synchronized_subscribe(observer) - - if count == 0 { - connection.connect() - } - - _lock.unlock() - - return disposable - } - - @inline(__always) - private func _synchronized_subscribe(_ observer: O) -> Connection where O.E == E { - let connection: Connection - - if let existingConnection = _connection { - connection = existingConnection - } - else { - connection = ShareReplay1WhileConnectedConnection( - parent: self, - lock: _lock) - _connection = connection - } - - return connection - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SingleAsync.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SingleAsync.swift deleted file mode 100644 index 8ccd310c..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SingleAsync.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// SingleAsync.swift -// RxSwift -// -// Created by Junior B. on 09/11/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -fileprivate final class SingleAsyncSink : Sink, ObserverType { - typealias ElementType = O.E - typealias Parent = SingleAsync - typealias E = ElementType - - private let _parent: Parent - private var _seenValue: Bool = false - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - do { - let forward = try _parent._predicate?(value) ?? true - if !forward { - return - } - } - catch let error { - forwardOn(.error(error as Swift.Error)) - dispose() - return - } - - if _seenValue { - forwardOn(.error(RxError.moreThanOneElement)) - dispose() - return - } - - _seenValue = true - forwardOn(.next(value)) - case .error: - forwardOn(event) - dispose() - case .completed: - if (_seenValue) { - forwardOn(.completed) - } else { - forwardOn(.error(RxError.noElements)) - } - dispose() - } - } -} - -final class SingleAsync: Producer { - typealias Predicate = (Element) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate? - - init(source: Observable, predicate: Predicate? = nil) { - _source = source - _predicate = predicate - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SingleAsyncSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Sink.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Sink.swift deleted file mode 100644 index bd65cc93..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Sink.swift +++ /dev/null @@ -1,81 +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: O - fileprivate let _cancel: Cancelable - fileprivate var _disposed: Bool - - #if DEBUG - fileprivate var _numberOfConcurrentCalls: AtomicInt = 0 - #endif - - init(observer: O, cancel: Cancelable) { -#if TRACE_RESOURCES - let _ = Resources.incrementTotal() -#endif - _observer = observer - _cancel = cancel - _disposed = false - } - - final func forwardOn(_ event: Event) { - #if DEBUG - if AtomicIncrement(&_numberOfConcurrentCalls) > 1 { - rxFatalError("Warning: Recursive call or synchronization error!") - } - - defer { - _ = AtomicDecrement(&_numberOfConcurrentCalls) - } - #endif - if _disposed { - return - } - _observer.on(event) - } - - final func forwarder() -> SinkForward { - return SinkForward(forward: self) - } - - final var disposed: Bool { - return _disposed - } - - func dispose() { - _disposed = true - _cancel.dispose() - } - - deinit { -#if TRACE_RESOURCES - let _ = Resources.decrementTotal() -#endif - } -} - -final class SinkForward: ObserverType { - typealias E = O.E - - private let _forward: Sink - - init(forward: Sink) { - _forward = forward - } - - final func on(_ event: Event) { - switch event { - case .next: - _forward._observer.on(event) - case .error, .completed: - _forward._observer.on(event) - _forward._cancel.dispose() - } - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Skip.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Skip.swift deleted file mode 100644 index df062d1f..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Skip.swift +++ /dev/null @@ -1,126 +0,0 @@ -// -// Skip.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/25/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -// count version - -final class SkipCountSink : Sink, ObserverType { - typealias Element = O.E - typealias Parent = SkipCount - - let parent: Parent - - var remaining: Int - - init(parent: Parent, observer: O, 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 remaining <= 0 { - forwardOn(.next(value)) - } - else { - remaining -= 1 - } - case .error: - forwardOn(event) - self.dispose() - case .completed: - forwardOn(event) - self.dispose() - } - } - -} - -final class SkipCount: Producer { - let source: Observable - let count: Int - - init(source: Observable, count: Int) { - self.source = source - self.count = count - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SkipCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = source.subscribe(sink) - - return (sink: sink, subscription: subscription) - } -} - -// time version - -final class SkipTimeSink : Sink, ObserverType where O.E == ElementType { - typealias Parent = SkipTime - typealias Element = ElementType - - let parent: Parent - - // state - var open = false - - init(parent: Parent, observer: O, cancel: Cancelable) { - self.parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if open { - forwardOn(.next(value)) - } - case .error: - forwardOn(event) - self.dispose() - case .completed: - forwardOn(event) - self.dispose() - } - } - - func tick() { - open = true - } - - func run() -> Disposable { - let disposeTimer = parent.scheduler.scheduleRelative((), dueTime: self.parent.duration) { - self.tick() - return Disposables.create() - } - - let disposeSubscription = parent.source.subscribe(self) - - return Disposables.create(disposeTimer, disposeSubscription) - } -} - -final 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: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SkipTimeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SkipUntil.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SkipUntil.swift deleted file mode 100644 index 0e77c94d..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SkipUntil.swift +++ /dev/null @@ -1,123 +0,0 @@ -// -// SkipUntil.swift -// RxSwift -// -// Created by Yury Korolev on 10/3/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class SkipUntilSinkOther - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Parent = SkipUntilSink - typealias E = Other - - fileprivate let _parent: Parent - - var _lock: RecursiveLock { - return _parent._lock - } - - let _subscription = SingleAssignmentDisposable() - - init(parent: Parent) { - _parent = parent - #if TRACE_RESOURCES - let _ = Resources.incrementTotal() - #endif - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - _parent._forwardElements = true - _subscription.dispose() - case .error(let e): - _parent.forwardOn(.error(e)) - _parent.dispose() - case .completed: - _subscription.dispose() - } - } - - #if TRACE_RESOURCES - deinit { - let _ = Resources.decrementTotal() - } - #endif - -} - - -final class SkipUntilSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias E = O.E - typealias Parent = SkipUntil - - let _lock = RecursiveLock() - fileprivate let _parent: Parent - fileprivate var _forwardElements = false - - fileprivate let _sourceSubscription = SingleAssignmentDisposable() - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - if _forwardElements { - forwardOn(event) - } - case .error: - forwardOn(event) - self.dispose() - case .completed: - if _forwardElements { - forwardOn(event) - } - self.dispose() - } - } - - func run() -> Disposable { - let sourceSubscription = _parent._source.subscribe(self) - let otherObserver = SkipUntilSinkOther(parent: self) - let otherSubscription = _parent._other.subscribe(otherObserver) - _sourceSubscription.setDisposable(sourceSubscription) - otherObserver._subscription.setDisposable(otherSubscription) - - return Disposables.create(_sourceSubscription, otherObserver._subscription) - } -} - -final class SkipUntil: Producer { - - fileprivate let _source: Observable - fileprivate let _other: Observable - - init(source: Observable, other: Observable) { - _source = source - _other = other - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SkipUntilSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SkipWhile.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SkipWhile.swift deleted file mode 100644 index 0d984239..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SkipWhile.swift +++ /dev/null @@ -1,115 +0,0 @@ -// -// SkipWhile.swift -// RxSwift -// -// Created by Yury Korolev on 10/9/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class SkipWhileSink : Sink, ObserverType { - - typealias Element = O.E - typealias Parent = SkipWhile - - fileprivate let _parent: Parent - fileprivate var _running = false - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if !_running { - do { - _running = try !_parent._predicate(value) - } catch let e { - forwardOn(.error(e)) - dispose() - return - } - } - - if _running { - forwardOn(.next(value)) - } - case .error, .completed: - forwardOn(event) - dispose() - } - } -} - -final class SkipWhileSinkWithIndex : Sink, ObserverType { - - typealias Element = O.E - typealias Parent = SkipWhile - - fileprivate let _parent: Parent - fileprivate var _index = 0 - fileprivate var _running = false - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if !_running { - do { - _running = try !_parent._predicateWithIndex(value, _index) - let _ = try incrementChecked(&_index) - } catch let e { - forwardOn(.error(e)) - dispose() - return - } - } - - if _running { - forwardOn(.next(value)) - } - case .error, .completed: - forwardOn(event) - dispose() - } - } -} - -final class SkipWhile: Producer { - typealias Predicate = (Element) throws -> Bool - typealias PredicateWithIndex = (Element, Int) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate! - fileprivate let _predicateWithIndex: PredicateWithIndex! - - init(source: Observable, predicate: @escaping Predicate) { - _source = source - _predicate = predicate - _predicateWithIndex = nil - } - - init(source: Observable, predicate: @escaping PredicateWithIndex) { - _source = source - _predicate = nil - _predicateWithIndex = predicate - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - if let _ = _predicate { - let sink = SkipWhileSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - else { - let sink = SkipWhileSinkWithIndex(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/StartWith.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/StartWith.swift deleted file mode 100644 index 24bd16e2..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/StartWith.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// StartWith.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/6/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final 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: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - for e in elements { - observer.on(.next(e)) - } - - return (sink: Disposables.create(), subscription: source.subscribe(observer)) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SubscribeOn.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SubscribeOn.swift deleted file mode 100644 index e2998568..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SubscribeOn.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// SubscribeOn.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class SubscribeOnSink : Sink, ObserverType where Ob.E == O.E { - typealias Element = O.E - typealias Parent = SubscribeOn - - let parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - self.parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - forwardOn(event) - - if event.isStopEvent { - self.dispose() - } - } - - func run() -> Disposable { - let disposeEverything = SerialDisposable() - let cancelSchedule = SingleAssignmentDisposable() - - disposeEverything.disposable = cancelSchedule - - let disposeSchedule = 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 class SubscribeOn : Producer { - let source: Ob - let scheduler: ImmediateSchedulerType - - init(source: Ob, scheduler: ImmediateSchedulerType) { - self.source = source - self.scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Ob.E { - let sink = SubscribeOnSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Switch.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Switch.swift deleted file mode 100644 index af1ccadf..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Switch.swift +++ /dev/null @@ -1,191 +0,0 @@ -// -// Switch.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -class SwitchSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType where S.E == O.E { - typealias E = 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: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func run(_ source: Observable) -> Disposable { - let subscription = source.subscribe(self) - _subscriptions.setDisposable(subscription) - return Disposables.create(_subscriptions, _innerSubscription) - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func performMap(_ element: SourceType) throws -> S { - rxAbstractMethod() - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): - do { - let observable = try performMap(element).asObservable() - _hasLatest = true - _latest = _latest &+ 1 - let latest = _latest - - let d = SingleAssignmentDisposable() - _innerSubscription.disposable = d - - let observer = SwitchSinkIter(parent: self, id: latest, _self: d) - let disposable = observable.subscribe(observer) - d.setDisposable(disposable) - } - catch let error { - forwardOn(.error(error)) - dispose() - } - case .error(let error): - forwardOn(.error(error)) - dispose() - case .completed: - _stopped = true - - _subscriptions.dispose() - - if !_hasLatest { - forwardOn(.completed) - dispose() - } - } - } -} - -final class SwitchSinkIter - : ObserverType - , LockOwnerType - , SynchronizedOnType where S.E == O.E { - typealias E = S.E - typealias Parent = SwitchSink - - fileprivate let _parent: Parent - fileprivate let _id: Int - fileprivate let _self: Disposable - - var _lock: RecursiveLock { - return _parent._lock - } - - init(parent: Parent, id: Int, _self: Disposable) { - _parent = parent - _id = id - self._self = _self - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: break - case .error, .completed: - _self.dispose() - } - - if _parent._latest != _id { - return - } - - switch event { - case .next: - _parent.forwardOn(event) - case .error: - _parent.forwardOn(event) - _parent.dispose() - case .completed: - _parent._hasLatest = false - if _parent._stopped { - _parent.forwardOn(event) - _parent.dispose() - } - } - } -} - -// MARK: Specializations - -final class SwitchIdentitySink : SwitchSink where O.E == S.E { - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: S) throws -> S { - return element - } -} - -final class MapSwitchSink : SwitchSink where O.E == S.E { - typealias Selector = (SourceType) throws -> S - - fileprivate let _selector: Selector - - init(selector: @escaping Selector, observer: O, cancel: Cancelable) { - _selector = selector - super.init(observer: observer, cancel: cancel) - } - - override func performMap(_ element: SourceType) throws -> S { - return try _selector(element) - } -} - -// MARK: Producers - -final class Switch : Producer { - fileprivate let _source: Observable - - init(source: Observable) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { - let sink = SwitchIdentitySink(observer: observer, cancel: cancel) - let subscription = sink.run(_source) - return (sink: sink, subscription: subscription) - } -} - -final class FlatMapLatest : Producer { - typealias Selector = (SourceType) throws -> S - - fileprivate let _source: Observable - fileprivate let _selector: Selector - - init(source: Observable, selector: @escaping Selector) { - _source = source - _selector = selector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == S.E { - let sink = MapSwitchSink(selector: _selector, observer: observer, cancel: cancel) - let subscription = sink.run(_source) - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SwitchIfEmpty.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SwitchIfEmpty.swift deleted file mode 100644 index d447d315..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/SwitchIfEmpty.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// SwitchIfEmpty.swift -// RxSwift -// -// Created by sergdort on 23/12/2016. -// Copyright © 2016 Krunoslav Zaher. All rights reserved. -// - -final class SwitchIfEmpty: Producer { - - private let _source: Observable - private let _ifEmpty: Observable - - init(source: Observable, ifEmpty: Observable) { - _source = source - _ifEmpty = ifEmpty - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = SwitchIfEmptySink(ifEmpty: _ifEmpty, - observer: observer, - cancel: cancel) - let subscription = sink.run(_source.asObservable()) - - return (sink: sink, subscription: subscription) - } -} - -final class SwitchIfEmptySink: Sink - , ObserverType { - typealias E = O.E - - private let _ifEmpty: Observable - private var _isEmpty = true - private let _ifEmptySubscription = SingleAssignmentDisposable() - - init(ifEmpty: Observable, observer: O, cancel: Cancelable) { - _ifEmpty = ifEmpty - super.init(observer: observer, cancel: cancel) - } - - func run(_ source: Observable) -> Disposable { - let subscription = source.subscribe(self) - return Disposables.create(subscription, _ifEmptySubscription) - } - - func on(_ event: Event) { - switch event { - case .next: - _isEmpty = false - forwardOn(event) - case .error: - forwardOn(event) - dispose() - case .completed: - guard _isEmpty else { - forwardOn(.completed) - dispose() - return - } - let ifEmptySink = SwitchIfEmptySinkIter(parent: self) - _ifEmptySubscription.setDisposable(_ifEmpty.subscribe(ifEmptySink)) - } - } -} - -final class SwitchIfEmptySinkIter - : ObserverType { - typealias E = O.E - typealias Parent = SwitchIfEmptySink - - private let _parent: Parent - - init(parent: Parent) { - _parent = parent - } - - func on(_ event: Event) { - switch event { - case .next: - _parent.forwardOn(event) - case .error: - _parent.forwardOn(event) - _parent.dispose() - case .completed: - _parent.forwardOn(event) - _parent.dispose() - } - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Take.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Take.swift deleted file mode 100644 index f6726387..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Take.swift +++ /dev/null @@ -1,142 +0,0 @@ -// -// Take.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -// count version - -final class TakeCountSink : Sink, ObserverType { - typealias E = O.E - typealias Parent = TakeCount - - private let _parent: Parent - - private var _remaining: Int - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _remaining = parent._count - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - - if _remaining > 0 { - _remaining -= 1 - - forwardOn(.next(value)) - - if _remaining == 0 { - forwardOn(.completed) - dispose() - } - } - case .error: - forwardOn(event) - dispose() - case .completed: - forwardOn(event) - dispose() - } - } - -} - -final 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") - } - _source = source - _count = count - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = TakeCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} - -// time version - -final class TakeTimeSink - : Sink - , LockOwnerType - , ObserverType - , SynchronizedOnType where O.E == ElementType { - typealias Parent = TakeTime - typealias E = ElementType - - fileprivate let _parent: Parent - - let _lock = RecursiveLock() - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let value): - forwardOn(.next(value)) - case .error: - forwardOn(event) - dispose() - case .completed: - forwardOn(event) - dispose() - } - } - - func tick() { - _lock.lock(); defer { _lock.unlock() } - - forwardOn(.completed) - dispose() - } - - func run() -> Disposable { - let disposeTimer = _parent._scheduler.scheduleRelative((), dueTime: _parent._duration) { - self.tick() - return Disposables.create() - } - - let disposeSubscription = _parent._source.subscribe(self) - - return Disposables.create(disposeTimer, disposeSubscription) - } -} - -final 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) { - _source = source - _scheduler = scheduler - _duration = duration - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = TakeTimeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/TakeLast.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/TakeLast.swift deleted file mode 100644 index b3778c0c..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/TakeLast.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// TakeLast.swift -// RxSwift -// -// Created by Tomi Koskinen on 25/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class TakeLastSink : Sink, ObserverType { - typealias E = O.E - typealias Parent = TakeLast - - private let _parent: Parent - - private var _elements: Queue - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - _elements = Queue(capacity: parent._count + 1) - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - _elements.enqueue(value) - if _elements.count > self._parent._count { - let _ = _elements.dequeue() - } - case .error: - forwardOn(event) - dispose() - case .completed: - for e in _elements { - forwardOn(.next(e)) - } - forwardOn(.completed) - dispose() - } - } -} - -final 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") - } - _source = source - _count = count - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = TakeLastSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/TakeUntil.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/TakeUntil.swift deleted file mode 100644 index c31fb327..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/TakeUntil.swift +++ /dev/null @@ -1,115 +0,0 @@ -// -// TakeUntil.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final fileprivate class TakeUntilSinkOther - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Parent = TakeUntilSink - typealias E = Other - - fileprivate let _parent: Parent - - var _lock: RecursiveLock { - return _parent._lock - } - - fileprivate let _subscription = SingleAssignmentDisposable() - - init(parent: Parent) { - _parent = parent -#if TRACE_RESOURCES - let _ = Resources.incrementTotal() -#endif - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - _parent.forwardOn(.completed) - _parent.dispose() - case .error(let e): - _parent.forwardOn(.error(e)) - _parent.dispose() - case .completed: - _subscription.dispose() - } - } - -#if TRACE_RESOURCES - deinit { - let _ = Resources.decrementTotal() - } -#endif -} - -final class TakeUntilSink - : Sink - , LockOwnerType - , ObserverType - , SynchronizedOnType { - typealias E = O.E - typealias Parent = TakeUntil - - fileprivate let _parent: Parent - - let _lock = RecursiveLock() - - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next: - forwardOn(event) - case .error: - forwardOn(event) - dispose() - case .completed: - forwardOn(event) - dispose() - } - } - - func run() -> Disposable { - let otherObserver = TakeUntilSinkOther(parent: self) - let otherSubscription = _parent._other.subscribe(otherObserver) - otherObserver._subscription.setDisposable(otherSubscription) - let sourceSubscription = _parent._source.subscribe(self) - - return Disposables.create(sourceSubscription, otherObserver._subscription) - } -} - -final class TakeUntil: Producer { - - fileprivate let _source: Observable - fileprivate let _other: Observable - - init(source: Observable, other: Observable) { - _source = source - _other = other - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = TakeUntilSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/TakeWhile.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/TakeWhile.swift deleted file mode 100644 index 249914b9..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/TakeWhile.swift +++ /dev/null @@ -1,130 +0,0 @@ -// -// TakeWhile.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class TakeWhileSink - : Sink - , ObserverType { - typealias Element = O.E - typealias Parent = TakeWhile - - fileprivate let _parent: Parent - - fileprivate var _running = true - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if !_running { - return - } - - do { - _running = try _parent._predicate(value) - } catch let e { - forwardOn(.error(e)) - dispose() - return - } - - if _running { - forwardOn(.next(value)) - } else { - forwardOn(.completed) - dispose() - } - case .error, .completed: - forwardOn(event) - dispose() - } - } - -} - -final class TakeWhileSinkWithIndex - : Sink - , ObserverType { - typealias Element = O.E - typealias Parent = TakeWhile - - fileprivate let _parent: Parent - - fileprivate var _running = true - fileprivate var _index = 0 - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - if !_running { - return - } - - do { - _running = try _parent._predicateWithIndex(value, _index) - let _ = try incrementChecked(&_index) - } catch let e { - forwardOn(.error(e)) - dispose() - return - } - - if _running { - forwardOn(.next(value)) - } else { - forwardOn(.completed) - dispose() - } - case .error, .completed: - forwardOn(event) - dispose() - } - } - -} - -final class TakeWhile: Producer { - typealias Predicate = (Element) throws -> Bool - typealias PredicateWithIndex = (Element, Int) throws -> Bool - - fileprivate let _source: Observable - fileprivate let _predicate: Predicate! - fileprivate let _predicateWithIndex: PredicateWithIndex! - - init(source: Observable, predicate: @escaping Predicate) { - _source = source - _predicate = predicate - _predicateWithIndex = nil - } - - init(source: Observable, predicate: @escaping PredicateWithIndex) { - _source = source - _predicate = nil - _predicateWithIndex = predicate - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - if let _ = _predicate { - let sink = TakeWhileSink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } else { - let sink = TakeWhileSinkWithIndex(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Throttle.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Throttle.swift deleted file mode 100644 index 4274016e..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Throttle.swift +++ /dev/null @@ -1,143 +0,0 @@ -// -// Throttle.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/22/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import struct Foundation.Date - -final class ThrottleSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias Element = O.E - typealias ParentType = Throttle - - private let _parent: ParentType - - let _lock = RecursiveLock() - - // state - private var _lastUnsentElement: Element? = nil - private var _lastSentTime: Date? = nil - private var _completed: Bool = false - - let cancellable = SerialDisposable() - - init(parent: ParentType, observer: O, cancel: Cancelable) { - _parent = parent - - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let subscription = _parent._source.subscribe(self) - - return Disposables.create(subscription, cancellable) - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case .next(let element): - let now = _parent._scheduler.now - - let timeIntervalSinceLast: RxTimeInterval - - if let lastSendingTime = _lastSentTime { - timeIntervalSinceLast = now.timeIntervalSince(lastSendingTime) - } - else { - timeIntervalSinceLast = _parent._dueTime - } - - let couldSendNow = timeIntervalSinceLast >= _parent._dueTime - - if couldSendNow { - self.sendNow(element: element) - return - } - - if !_parent._latest { - return - } - - let isThereAlreadyInFlightRequest = _lastUnsentElement != nil - - _lastUnsentElement = element - - if isThereAlreadyInFlightRequest { - return - } - - let scheduler = _parent._scheduler - let dueTime = _parent._dueTime - - let d = SingleAssignmentDisposable() - self.cancellable.disposable = d - - d.setDisposable(scheduler.scheduleRelative(0, dueTime: dueTime - timeIntervalSinceLast, action: self.propagate)) - case .error: - _lastUnsentElement = nil - forwardOn(event) - dispose() - case .completed: - if let _ = _lastUnsentElement { - _completed = true - } - else { - forwardOn(.completed) - dispose() - } - } - } - - private func sendNow(element: Element) { - _lastUnsentElement = nil - self.forwardOn(.next(element)) - // in case element processing takes a while, this should give some more room - _lastSentTime = _parent._scheduler.now - } - - func propagate(_: Int) -> Disposable { - _lock.lock(); defer { _lock.unlock() } // { - if let lastUnsentElement = _lastUnsentElement { - sendNow(element: lastUnsentElement) - } - - if _completed { - forwardOn(.completed) - dispose() - } - // } - return Disposables.create() - } -} - -final 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) { - _source = source - _dueTime = dueTime - _latest = latest - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = ThrottleSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } - -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Timeout.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Timeout.swift deleted file mode 100644 index b0e79212..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Timeout.swift +++ /dev/null @@ -1,120 +0,0 @@ -// -// Timeout.swift -// RxSwift -// -// Created by Tomi Koskinen on 13/11/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class TimeoutSink: Sink, LockOwnerType, ObserverType { - typealias E = O.E - 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: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let original = SingleAssignmentDisposable() - _subscription.disposable = original - - _createTimeoutTimer() - - original.setDisposable(_parent._source.subscribe(self)) - - return Disposables.create(_subscription, _timerD) - } - - func on(_ event: Event) { - switch event { - case .next: - var onNextWins = false - - _lock.performLocked() { - onNextWins = !self._switched - if onNextWins { - self._id = self._id &+ 1 - } - } - - if onNextWins { - forwardOn(event) - self._createTimeoutTimer() - } - case .error, .completed: - var onEventWins = false - - _lock.performLocked() { - onEventWins = !self._switched - if onEventWins { - self._id = self._id &+ 1 - } - } - - if onEventWins { - forwardOn(event) - self.dispose() - } - } - } - - private func _createTimeoutTimer() { - if _timerD.isDisposed { - return - } - - let nextTimer = SingleAssignmentDisposable() - _timerD.disposable = nextTimer - - let disposeSchedule = _parent._scheduler.scheduleRelative(_id, dueTime: _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 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) { - _source = source - _dueTime = dueTime - _other = other - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Element { - let sink = TimeoutSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Timer.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Timer.swift deleted file mode 100644 index 15ef01d7..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Timer.swift +++ /dev/null @@ -1,71 +0,0 @@ -// -// Timer.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class TimerSink : Sink where O.E : SignedInteger { - typealias Parent = Timer - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return _parent._scheduler.schedulePeriodic(0 as O.E, startAfter: _parent._dueTime, period: _parent._period!) { state in - self.forwardOn(.next(state)) - return state &+ 1 - } - } -} - -final class TimerOneOffSink : Sink where O.E : SignedInteger { - typealias Parent = Timer - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - return _parent._scheduler.scheduleRelative(self, dueTime: _parent._dueTime) { (`self`) -> Disposable in - self.forwardOn(.next(0)) - self.forwardOn(.completed) - self.dispose() - - return Disposables.create() - } - } -} - -final class Timer: Producer { - fileprivate let _scheduler: SchedulerType - fileprivate let _dueTime: RxTimeInterval - fileprivate let _period: RxTimeInterval? - - init(dueTime: RxTimeInterval, period: RxTimeInterval?, scheduler: SchedulerType) { - _scheduler = scheduler - _dueTime = dueTime - _period = period - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - if let _ = _period { - let sink = TimerSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } - else { - let sink = TimerOneOffSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ToArray.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ToArray.swift deleted file mode 100644 index 59fc9127..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/ToArray.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// ToArray.swift -// RxSwift -// -// Created by Junior B. on 20/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class ToArraySink : Sink, ObserverType where O.E == [SourceType] { - typealias Parent = ToArray - - let _parent: Parent - var _list = Array() - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event) { - switch event { - case .next(let value): - self._list.append(value) - case .error(let e): - forwardOn(.error(e)) - self.dispose() - case .completed: - forwardOn(.next(_list)) - forwardOn(.completed) - self.dispose() - } - } -} - -final class ToArray : Producer<[SourceType]> { - let _source: Observable - - init(source: Observable) { - _source = source - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == [SourceType] { - let sink = ToArraySink(parent: self, observer: observer, cancel: cancel) - let subscription = _source.subscribe(sink) - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Using.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Using.swift deleted file mode 100644 index 2df8dc28..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Using.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// Using.swift -// RxSwift -// -// Created by Yury Korolev on 10/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class UsingSink : Sink, ObserverType { - typealias SourceType = O.E - typealias Parent = Using - - private let _parent: Parent - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - var disposable = Disposables.create() - - do { - let resource = try _parent._resourceFactory() - disposable = resource - let source = try _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): - forwardOn(.next(value)) - case let .error(error): - forwardOn(.error(error)) - dispose() - case .completed: - forwardOn(.completed) - dispose() - } - } -} - -class Using: Producer { - - typealias E = 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) { - _resourceFactory = resourceFactory - _observableFactory = observableFactory - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { - let sink = UsingSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Window.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Window.swift deleted file mode 100644 index d2eeb8bb..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Window.swift +++ /dev/null @@ -1,152 +0,0 @@ -// -// Window.swift -// RxSwift -// -// Created by Junior B. on 29/10/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class WindowTimeCountSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType where O.E == Observable { - typealias Parent = WindowTimeCount - typealias E = Element - - 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: O, cancel: Cancelable) { - _parent = parent - - let _ = _groupDisposable.insert(_timerD) - - _refCountDisposable = RefCountDisposable(disposable: _groupDisposable) - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - - forwardOn(.next(AddRef(source: _subject, refCount: _refCountDisposable).asObservable())) - createTimer(_windowId) - - let _ = _groupDisposable.insert(_parent._source.subscribe(self)) - return _refCountDisposable - } - - func startNewWindowAndCompleteCurrentOne() { - _subject.on(.completed) - _subject = PublishSubject() - - forwardOn(.next(AddRef(source: _subject, refCount: _refCountDisposable).asObservable())) - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - var newWindow = false - var newId = 0 - - switch event { - case .next(let element): - _subject.on(.next(element)) - - do { - let _ = try incrementChecked(&_count) - } catch (let e) { - _subject.on(.error(e as Swift.Error)) - dispose() - } - - if (_count == _parent._count) { - newWindow = true - _count = 0 - _windowId += 1 - newId = _windowId - self.startNewWindowAndCompleteCurrentOne() - } - - case .error(let error): - _subject.on(.error(error)) - forwardOn(.error(error)) - dispose() - case .completed: - _subject.on(.completed) - forwardOn(.completed) - dispose() - } - - if newWindow { - createTimer(newId) - } - } - - func createTimer(_ windowId: Int) { - if _timerD.isDisposed { - return - } - - if _windowId != windowId { - return - } - - let nextTimer = SingleAssignmentDisposable() - - _timerD.disposable = nextTimer - - let scheduledRelative = _parent._scheduler.scheduleRelative(windowId, dueTime: _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 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) { - _source = source - _timeSpan = timeSpan - _count = count - _scheduler = scheduler - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == Observable { - let sink = WindowTimeCountSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/WithLatestFrom.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/WithLatestFrom.swift deleted file mode 100644 index 2ed17b1e..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/WithLatestFrom.swift +++ /dev/null @@ -1,121 +0,0 @@ -// -// WithLatestFrom.swift -// RxSwift -// -// Created by Yury Korolev on 10/19/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final class WithLatestFromSink - : Sink - , ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias ResultType = O.E - typealias Parent = WithLatestFrom - typealias E = FirstType - - fileprivate let _parent: Parent - - var _lock = RecursiveLock() - fileprivate var _latest: SecondType? - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - - super.init(observer: observer, cancel: cancel) - } - - func run() -> Disposable { - let sndSubscription = SingleAssignmentDisposable() - let sndO = WithLatestFromSecond(parent: self, disposable: sndSubscription) - - sndSubscription.setDisposable(_parent._second.subscribe(sndO)) - let fstSubscription = _parent._first.subscribe(self) - - return Disposables.create(fstSubscription, sndSubscription) - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case let .next(value): - guard let latest = _latest else { return } - do { - let res = try _parent._resultSelector(value, latest) - - forwardOn(.next(res)) - } catch let e { - forwardOn(.error(e)) - dispose() - } - case .completed: - forwardOn(.completed) - dispose() - case let .error(error): - forwardOn(.error(error)) - dispose() - } - } -} - -final class WithLatestFromSecond - : ObserverType - , LockOwnerType - , SynchronizedOnType { - - typealias ResultType = O.E - typealias Parent = WithLatestFromSink - typealias E = SecondType - - private let _parent: Parent - private let _disposable: Disposable - - var _lock: RecursiveLock { - return _parent._lock - } - - init(parent: Parent, disposable: Disposable) { - _parent = parent - _disposable = disposable - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - switch event { - case let .next(value): - _parent._latest = value - case .completed: - _disposable.dispose() - case let .error(error): - _parent.forwardOn(.error(error)) - _parent.dispose() - } - } -} - -final 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) { - _first = first - _second = second - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == ResultType { - let sink = WithLatestFromSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+Collection.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+Collection.swift deleted file mode 100644 index bbf2d234..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+Collection.swift +++ /dev/null @@ -1,137 +0,0 @@ -// -// Zip+Collection.swift -// RxSwift -// -// Created by Krunoslav Zaher on 8/30/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -final fileprivate class ZipCollectionTypeSink - : Sink where C.Iterator.Element : ObservableConvertibleType { - typealias R = O.E - typealias Parent = ZipCollectionType - typealias SourceElement = C.Iterator.Element.E - - private let _parent: Parent - - private let _lock = 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: O, cancel: Cancelable) { - _parent = parent - _values = [Queue](repeating: Queue(capacity: 4), count: parent.count) - _isDone = [Bool](repeating: false, count: parent.count) - _subscriptions = Array() - _subscriptions.reserveCapacity(parent.count) - - for _ in 0 ..< parent.count { - _subscriptions.append(SingleAssignmentDisposable()) - } - - super.init(observer: observer, cancel: cancel) - } - - func on(_ event: Event, atIndex: Int) { - _lock.lock(); defer { _lock.unlock() } // { - switch event { - case .next(let element): - _values[atIndex].enqueue(element) - - if _values[atIndex].count == 1 { - _numberOfValues += 1 - } - - if _numberOfValues < _parent.count { - if _numberOfDone == _parent.count - 1 { - self.forwardOn(.completed) - self.dispose() - } - return - } - - do { - var arguments = [SourceElement]() - arguments.reserveCapacity(_parent.count) - - // recalculate number of values - _numberOfValues = 0 - - for i in 0 ..< _values.count { - arguments.append(_values[i].dequeue()!) - if _values[i].count > 0 { - _numberOfValues += 1 - } - } - - let result = try _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 _isDone[atIndex] { - return - } - - _isDone[atIndex] = true - _numberOfDone += 1 - - if _numberOfDone == _parent.count { - self.forwardOn(.completed) - self.dispose() - } - else { - _subscriptions[atIndex].dispose() - } - } - // } - } - - func run() -> Disposable { - var j = 0 - for i in _parent.sources { - let index = j - let source = i.asObservable() - - let disposable = source.subscribe(AnyObserver { event in - self.on(event, atIndex: index) - }) - _subscriptions[j].setDisposable(disposable) - j += 1 - } - - return Disposables.create(_subscriptions) - } -} - -final class ZipCollectionType : Producer where C.Iterator.Element : ObservableConvertibleType { - typealias ResultSelector = ([C.Iterator.Element.E]) throws -> R - - let sources: C - let resultSelector: ResultSelector - let count: Int - - init(sources: C, resultSelector: @escaping ResultSelector) { - self.sources = sources - self.resultSelector = resultSelector - self.count = Int(self.sources.count.toIntMax()) - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipCollectionTypeSink(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+arity.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+arity.swift deleted file mode 100644 index 4f8aaf11..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Zip+arity.swift +++ /dev/null @@ -1,948 +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 Observable { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, resultSelector: @escaping (O1.E, O2.E) throws -> E) - -> Observable { - return Zip2( - source1: source1.asObservable(), source2: source2.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2) - -> Observable<(O1.E, O2.E)> { - return Zip2( - source1: source1.asObservable(), source2: source2.asObservable(), - resultSelector: { ($0, $1) } - ) - } -} - -final class ZipSink2_ : ZipSink { - typealias R = O.E - typealias Parent = Zip2 - - let _parent: Parent - - var _values1: Queue = Queue(capacity: 2) - var _values2: Queue = Queue(capacity: 2) - - init(parent: Parent, observer: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 2, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - - default: - rxFatalError("Unhandled case (Function)") - } - - return false - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: _lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: _lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - - subscription1.setDisposable(_parent.source1.subscribe(observer1)) - subscription2.setDisposable(_parent.source2.subscribe(observer2)) - - return Disposables.create([ - subscription1, - subscription2 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_values1.dequeue()!, _values2.dequeue()!) - } -} - -final class Zip2 : Producer { - typealias ResultSelector = (E1, E2) throws -> R - - let source1: Observable - let source2: Observable - - let _resultSelector: ResultSelector - - init(source1: Observable, source2: Observable, resultSelector: @escaping ResultSelector) { - self.source1 = source1 - self.source2 = source2 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink2_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 3 - -extension Observable { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, resultSelector: @escaping (O1.E, O2.E, O3.E) throws -> E) - -> Observable { - return Zip3( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3) - -> Observable<(O1.E, O2.E, O3.E)> { - return Zip3( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), - resultSelector: { ($0, $1, $2) } - ) - } -} - -final class ZipSink3_ : ZipSink { - typealias R = O.E - typealias Parent = Zip3 - - 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: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 3, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - case 2: return _values3.count > 0 - - default: - rxFatalError("Unhandled case (Function)") - } - - return false - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: _lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: _lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: _lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - - subscription1.setDisposable(_parent.source1.subscribe(observer1)) - subscription2.setDisposable(_parent.source2.subscribe(observer2)) - subscription3.setDisposable(_parent.source3.subscribe(observer3)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_values1.dequeue()!, _values2.dequeue()!, _values3.dequeue()!) - } -} - -final class Zip3 : Producer { - typealias ResultSelector = (E1, E2, E3) throws -> R - - 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 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink3_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 4 - -extension Observable { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E) throws -> E) - -> Observable { - return Zip4( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4) - -> Observable<(O1.E, O2.E, O3.E, O4.E)> { - return Zip4( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), - resultSelector: { ($0, $1, $2, $3) } - ) - } -} - -final class ZipSink4_ : ZipSink { - typealias R = O.E - typealias Parent = Zip4 - - 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: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 4, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - case 2: return _values3.count > 0 - case 3: return _values4.count > 0 - - default: - rxFatalError("Unhandled case (Function)") - } - - return false - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: _lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: _lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: _lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: _lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - - subscription1.setDisposable(_parent.source1.subscribe(observer1)) - subscription2.setDisposable(_parent.source2.subscribe(observer2)) - subscription3.setDisposable(_parent.source3.subscribe(observer3)) - subscription4.setDisposable(_parent.source4.subscribe(observer4)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_values1.dequeue()!, _values2.dequeue()!, _values3.dequeue()!, _values4.dequeue()!) - } -} - -final class Zip4 : Producer { - typealias ResultSelector = (E1, E2, E3, E4) throws -> R - - 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 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink4_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 5 - -extension Observable { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E) throws -> E) - -> Observable { - return Zip5( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), - resultSelector: resultSelector - ) - } -} - -extension ObservableType where E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E)> { - return Zip5( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4) } - ) - } -} - -final class ZipSink5_ : ZipSink { - typealias R = O.E - typealias Parent = Zip5 - - 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: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 5, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - case 2: return _values3.count > 0 - case 3: return _values4.count > 0 - case 4: return _values5.count > 0 - - default: - rxFatalError("Unhandled case (Function)") - } - - return false - } - - func run() -> Disposable { - let subscription1 = SingleAssignmentDisposable() - let subscription2 = SingleAssignmentDisposable() - let subscription3 = SingleAssignmentDisposable() - let subscription4 = SingleAssignmentDisposable() - let subscription5 = SingleAssignmentDisposable() - - let observer1 = ZipObserver(lock: _lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: _lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: _lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: _lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - let observer5 = ZipObserver(lock: _lock, parent: self, index: 4, setNextValue: { self._values5.enqueue($0) }, this: subscription5) - - subscription1.setDisposable(_parent.source1.subscribe(observer1)) - subscription2.setDisposable(_parent.source2.subscribe(observer2)) - subscription3.setDisposable(_parent.source3.subscribe(observer3)) - subscription4.setDisposable(_parent.source4.subscribe(observer4)) - subscription5.setDisposable(_parent.source5.subscribe(observer5)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_values1.dequeue()!, _values2.dequeue()!, _values3.dequeue()!, _values4.dequeue()!, _values5.dequeue()!) - } -} - -final class Zip5 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5) throws -> R - - 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 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink5_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 6 - -extension Observable { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E) throws -> E) - -> Observable { - 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 E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E)> { - return Zip6( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4, $5) } - ) - } -} - -final class ZipSink6_ : ZipSink { - typealias R = O.E - typealias Parent = Zip6 - - 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: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 6, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - case 2: return _values3.count > 0 - case 3: return _values4.count > 0 - case 4: return _values5.count > 0 - case 5: return _values6.count > 0 - - default: - rxFatalError("Unhandled case (Function)") - } - - return false - } - - 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: _lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: _lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: _lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: _lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - let observer5 = ZipObserver(lock: _lock, parent: self, index: 4, setNextValue: { self._values5.enqueue($0) }, this: subscription5) - let observer6 = ZipObserver(lock: _lock, parent: self, index: 5, setNextValue: { self._values6.enqueue($0) }, this: subscription6) - - subscription1.setDisposable(_parent.source1.subscribe(observer1)) - subscription2.setDisposable(_parent.source2.subscribe(observer2)) - subscription3.setDisposable(_parent.source3.subscribe(observer3)) - subscription4.setDisposable(_parent.source4.subscribe(observer4)) - subscription5.setDisposable(_parent.source5.subscribe(observer5)) - subscription6.setDisposable(_parent.source6.subscribe(observer6)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_values1.dequeue()!, _values2.dequeue()!, _values3.dequeue()!, _values4.dequeue()!, _values5.dequeue()!, _values6.dequeue()!) - } -} - -final class Zip6 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6) throws -> R - - 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 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink6_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 7 - -extension Observable { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E) throws -> E) - -> Observable { - 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 E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E)> { - return Zip7( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4, $5, $6) } - ) - } -} - -final class ZipSink7_ : ZipSink { - typealias R = O.E - typealias Parent = Zip7 - - 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: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 7, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - case 2: return _values3.count > 0 - case 3: return _values4.count > 0 - case 4: return _values5.count > 0 - case 5: return _values6.count > 0 - case 6: return _values7.count > 0 - - default: - rxFatalError("Unhandled case (Function)") - } - - return false - } - - 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: _lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: _lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: _lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: _lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - let observer5 = ZipObserver(lock: _lock, parent: self, index: 4, setNextValue: { self._values5.enqueue($0) }, this: subscription5) - let observer6 = ZipObserver(lock: _lock, parent: self, index: 5, setNextValue: { self._values6.enqueue($0) }, this: subscription6) - let observer7 = ZipObserver(lock: _lock, parent: self, index: 6, setNextValue: { self._values7.enqueue($0) }, this: subscription7) - - subscription1.setDisposable(_parent.source1.subscribe(observer1)) - subscription2.setDisposable(_parent.source2.subscribe(observer2)) - subscription3.setDisposable(_parent.source3.subscribe(observer3)) - subscription4.setDisposable(_parent.source4.subscribe(observer4)) - subscription5.setDisposable(_parent.source5.subscribe(observer5)) - subscription6.setDisposable(_parent.source6.subscribe(observer6)) - subscription7.setDisposable(_parent.source7.subscribe(observer7)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6, - subscription7 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_values1.dequeue()!, _values2.dequeue()!, _values3.dequeue()!, _values4.dequeue()!, _values5.dequeue()!, _values6.dequeue()!, _values7.dequeue()!) - } -} - -final class Zip7 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7) throws -> R - - 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 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink7_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - - -// 8 - -extension Observable { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip - (_ source1: O1, _ source2: O2, _ source3: O3, _ source4: O4, _ source5: O5, _ source6: O6, _ source7: O7, _ source8: O8, resultSelector: @escaping (O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E) throws -> E) - -> Observable { - 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 E == Any { - /** - Merges the specified observable sequences into one observable sequence of tuples whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - returns: An observable sequence containing the result of combining elements of the sources 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) - -> Observable<(O1.E, O2.E, O3.E, O4.E, O5.E, O6.E, O7.E, O8.E)> { - return Zip8( - source1: source1.asObservable(), source2: source2.asObservable(), source3: source3.asObservable(), source4: source4.asObservable(), source5: source5.asObservable(), source6: source6.asObservable(), source7: source7.asObservable(), source8: source8.asObservable(), - resultSelector: { ($0, $1, $2, $3, $4, $5, $6, $7) } - ) - } -} - -final class ZipSink8_ : ZipSink { - typealias R = O.E - typealias Parent = Zip8 - - 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: O, cancel: Cancelable) { - _parent = parent - super.init(arity: 8, observer: observer, cancel: cancel) - } - - override func hasElements(_ index: Int) -> Bool { - switch (index) { - case 0: return _values1.count > 0 - case 1: return _values2.count > 0 - case 2: return _values3.count > 0 - case 3: return _values4.count > 0 - case 4: return _values5.count > 0 - case 5: return _values6.count > 0 - case 6: return _values7.count > 0 - case 7: return _values8.count > 0 - - default: - rxFatalError("Unhandled case (Function)") - } - - return false - } - - 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: _lock, parent: self, index: 0, setNextValue: { self._values1.enqueue($0) }, this: subscription1) - let observer2 = ZipObserver(lock: _lock, parent: self, index: 1, setNextValue: { self._values2.enqueue($0) }, this: subscription2) - let observer3 = ZipObserver(lock: _lock, parent: self, index: 2, setNextValue: { self._values3.enqueue($0) }, this: subscription3) - let observer4 = ZipObserver(lock: _lock, parent: self, index: 3, setNextValue: { self._values4.enqueue($0) }, this: subscription4) - let observer5 = ZipObserver(lock: _lock, parent: self, index: 4, setNextValue: { self._values5.enqueue($0) }, this: subscription5) - let observer6 = ZipObserver(lock: _lock, parent: self, index: 5, setNextValue: { self._values6.enqueue($0) }, this: subscription6) - let observer7 = ZipObserver(lock: _lock, parent: self, index: 6, setNextValue: { self._values7.enqueue($0) }, this: subscription7) - let observer8 = ZipObserver(lock: _lock, parent: self, index: 7, setNextValue: { self._values8.enqueue($0) }, this: subscription8) - - subscription1.setDisposable(_parent.source1.subscribe(observer1)) - subscription2.setDisposable(_parent.source2.subscribe(observer2)) - subscription3.setDisposable(_parent.source3.subscribe(observer3)) - subscription4.setDisposable(_parent.source4.subscribe(observer4)) - subscription5.setDisposable(_parent.source5.subscribe(observer5)) - subscription6.setDisposable(_parent.source6.subscribe(observer6)) - subscription7.setDisposable(_parent.source7.subscribe(observer7)) - subscription8.setDisposable(_parent.source8.subscribe(observer8)) - - return Disposables.create([ - subscription1, - subscription2, - subscription3, - subscription4, - subscription5, - subscription6, - subscription7, - subscription8 - ]) - } - - override func getResult() throws -> R { - return try _parent._resultSelector(_values1.dequeue()!, _values2.dequeue()!, _values3.dequeue()!, _values4.dequeue()!, _values5.dequeue()!, _values6.dequeue()!, _values7.dequeue()!, _values8.dequeue()!) - } -} - -final class Zip8 : Producer { - typealias ResultSelector = (E1, E2, E3, E4, E5, E6, E7, E8) throws -> R - - 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 - - _resultSelector = resultSelector - } - - override func run(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == R { - let sink = ZipSink8_(parent: self, observer: observer, cancel: cancel) - let subscription = sink.run() - return (sink: sink, subscription: subscription) - } -} - - diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Zip.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Zip.swift deleted file mode 100644 index a283bf2b..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Implementations/Zip.swift +++ /dev/null @@ -1,155 +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 = O.E - - let _arity: Int - - let _lock = RecursiveLock() - - // state - private var _isDone: [Bool] - - init(arity: Int, observer: O, cancel: Cancelable) { - _isDone = [Bool](repeating: false, count: arity) - _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 ..< _arity { - if !hasElements(i) { - hasValueAll = false - break - } - } - - if hasValueAll { - do { - let result = try getResult() - self.forwardOn(.next(result)) - } - catch let e { - self.forwardOn(.error(e)) - dispose() - } - } - else { - var allOthersDone = true - - let arity = _isDone.count - for i in 0 ..< arity { - if i != index && !_isDone[i] { - allOthersDone = false - break - } - } - - if allOthersDone { - forwardOn(.completed) - self.dispose() - } - } - } - - func fail(_ error: Swift.Error) { - forwardOn(.error(error)) - dispose() - } - - func done(_ index: Int) { - _isDone[index] = true - - var allDone = true - - for done in _isDone { - if !done { - allDone = false - break - } - } - - if allDone { - forwardOn(.completed) - dispose() - } - } -} - -final class ZipObserver - : ObserverType - , LockOwnerType - , SynchronizedOnType { - typealias E = ElementType - typealias ValueSetter = (ElementType) -> () - - 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) { - _lock = lock - _parent = parent - _index = index - _this = this - _setNextValue = setNextValue - } - - func on(_ event: Event) { - synchronizedOn(event) - } - - func _synchronized_on(_ event: Event) { - if let _ = _parent { - switch event { - case .next(_): - break - case .error(_): - _this.dispose() - case .completed: - _this.dispose() - } - } - - if let parent = _parent { - switch event { - case .next(let value): - _setNextValue(value) - parent.next(_index) - case .error(let error): - parent.fail(error) - case .completed: - parent.done(_index) - } - } - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Aggregate.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Aggregate.swift deleted file mode 100644 index a25aa090..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Aggregate.swift +++ /dev/null @@ -1,59 +0,0 @@ -// -// Observable+Aggregate.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/22/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -// MARK: reduce - -extension ObservableType { - - /** - Applies an `accumulator` function over an observable sequence, returning the result of the aggregation as a single element in the result sequence. The specified `seed` value is used as the initial accumulator value. - - For aggregation behavior with incremental intermediate results, see `scan`. - - - seealso: [reduce operator on reactivex.io](http://reactivex.io/documentation/operators/reduce.html) - - - parameter seed: The initial accumulator value. - - parameter accumulator: A accumulator function to be invoked on each element. - - parameter mapResult: A function to transform the final accumulator value into the result value. - - returns: An observable sequence containing a single element with the final accumulator value. - */ - public func reduce(_ seed: A, accumulator: @escaping (A, E) throws -> A, mapResult: @escaping (A) throws -> R) - -> Observable { - return Reduce(source: self.asObservable(), seed: seed, accumulator: accumulator, mapResult: mapResult) - } - - /** - Applies an `accumulator` function over an observable sequence, returning the result of the aggregation as a single element in the result sequence. The specified `seed` value is used as the initial accumulator value. - - For aggregation behavior with incremental intermediate results, see `scan`. - - - seealso: [reduce operator on reactivex.io](http://reactivex.io/documentation/operators/reduce.html) - - - parameter seed: The initial accumulator value. - - parameter accumulator: A accumulator function to be invoked on each element. - - returns: An observable sequence containing a single element with the final accumulator value. - */ - public func reduce(_ seed: A, accumulator: @escaping (A, E) throws -> A) - -> Observable { - return Reduce(source: self.asObservable(), seed: seed, accumulator: accumulator, mapResult: { $0 }) - } - - /** - Converts an Observable into another Observable that emits the whole sequence as a single array and then terminates. - - For aggregation behavior see `reduce`. - - - seealso: [toArray operator on reactivex.io](http://reactivex.io/documentation/operators/to.html) - - - returns: An observable sequence containing all the emitted elements as array. - */ - public func toArray() - -> Observable<[E]> { - return ToArray(source: self.asObservable()) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Binding.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Binding.swift deleted file mode 100644 index 05d6b4df..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Binding.swift +++ /dev/null @@ -1,179 +0,0 @@ -// -// Observable+Binding.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/1/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -// MARK: multicast - -extension ObservableType { - - /** - Multicasts the source sequence notifications through the specified subject to the resulting connectable observable. - - Upon connection of the connectable observable, the subject is subscribed to the source exactly one, and messages are forwarded to the observers registered with the connectable observable. - - For specializations with fixed subject types, see `publish` and `replay`. - - - seealso: [multicast operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html) - - - parameter subject: Subject to push source elements into. - - returns: A connectable observable sequence that upon connection causes the source sequence to push results into the specified subject. - */ - public func multicast(_ subject: S) - -> ConnectableObservable where S.SubjectObserverType.E == E { - return ConnectableObservableAdapter(source: self.asObservable(), subject: subject) - } - - /** - Multicasts the source sequence notifications through an instantiated subject into all uses of the sequence within a selector function. - - Each subscription to the resulting sequence causes a separate multicast invocation, exposing the sequence resulting from the selector function's invocation. - - For specializations with fixed subject types, see `publish` and `replay`. - - - seealso: [multicast operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html) - - - parameter subjectSelector: Factory function to create an intermediate subject through which the source sequence's elements will be multicast to the selector function. - - parameter selector: Selector function which can use the multicasted source sequence subject to the policies enforced by the created subject. - - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. - */ - public func multicast(_ subjectSelector: @escaping () throws -> S, selector: @escaping (Observable) throws -> Observable) - -> Observable where S.SubjectObserverType.E == E { - return Multicast( - source: self.asObservable(), - subjectSelector: subjectSelector, - selector: selector - ) - } -} - -// MARK: publish - -extension ObservableType { - - /** - Returns a connectable observable sequence that shares a single subscription to the underlying sequence. - - This operator is a specialization of `multicast` using a `PublishSubject`. - - - seealso: [publish operator on reactivex.io](http://reactivex.io/documentation/operators/publish.html) - - - returns: A connectable observable sequence that shares a single subscription to the underlying sequence. - */ - public func publish() -> ConnectableObservable { - return self.multicast(PublishSubject()) - } -} - -// MARK: replay - -extension ObservableType { - - /** - Returns a connectable observable sequence that shares a single subscription to the underlying sequence replaying bufferSize elements. - - This operator is a specialization of `multicast` using a `ReplaySubject`. - - - seealso: [replay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) - - - parameter bufferSize: Maximum element count of the replay buffer. - - returns: A connectable observable sequence that shares a single subscription to the underlying sequence. - */ - 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()) - } -} - -// MARK: refcount - -extension ConnectableObservableType { - - /** - Returns an observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence. - - - seealso: [refCount operator on reactivex.io](http://reactivex.io/documentation/operators/refCount.html) - - - returns: An observable sequence that stays connected to the source as long as there is at least one subscription to the observable sequence. - */ - public func refCount() -> Observable { - return RefCount(source: self) - } -} - -// MARK: share - -extension ObservableType { - - /** - Returns an observable sequence that shares a single subscription to the underlying sequence. - - This operator is a specialization of publish which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. - - - seealso: [share operator on reactivex.io](http://reactivex.io/documentation/operators/refcount.html) - - - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. - */ - public func share() -> Observable { - return self.publish().refCount() - } -} - -// MARK: shareReplay - -extension ObservableType { - - /** - Returns an observable sequence that shares a single subscription to the underlying sequence, and immediately upon subscription replays maximum number of elements in buffer. - - This operator is a specialization of replay which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. - - - seealso: [shareReplay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) - - - parameter bufferSize: Maximum element count of the replay buffer. - - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. - */ - public func shareReplay(_ bufferSize: Int) - -> Observable { - if bufferSize == 1 { - return ShareReplay1(source: self.asObservable()) - } - else { - return self.replay(bufferSize).refCount() - } - } - - /** - Returns an observable sequence that shares a single subscription to the underlying sequence, and immediately upon subscription replays latest element in buffer. - - This operator is a specialization of replay which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. - - Unlike `shareReplay(bufferSize: Int)`, this operator will clear latest element from replay buffer in case number of subscribers drops from one to zero. In case sequence - completes or errors out replay buffer is also cleared. - - - seealso: [shareReplay operator on reactivex.io](http://reactivex.io/documentation/operators/replay.html) - - - returns: An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. - */ - public func shareReplayLatestWhileConnected() - -> Observable { - return ShareReplay1WhileConnected(source: self.asObservable()) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Concurrency.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Concurrency.swift deleted file mode 100644 index 1dbab633..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Concurrency.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// Observable+Concurrency.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -// MARK: observeOn - -extension ObservableType { - - /** - Wraps the source sequence in order to run its observer callbacks on the specified scheduler. - - This only invokes observer callbacks on a `scheduler`. In case the subscription and/or unsubscription - actions have side-effects that require to be run on a scheduler, use `subscribeOn`. - - - seealso: [observeOn operator on reactivex.io](http://reactivex.io/documentation/operators/observeon.html) - - - parameter scheduler: Scheduler to notify observers on. - - returns: The source sequence whose observations happen on the specified scheduler. - */ - public func observeOn(_ scheduler: ImmediateSchedulerType) - -> Observable { - if let scheduler = scheduler as? SerialDispatchQueueScheduler { - return ObserveOnSerialDispatchQueue(source: self.asObservable(), scheduler: scheduler) - } - else { - return ObserveOn(source: self.asObservable(), scheduler: scheduler) - } - } -} - -// MARK: subscribeOn - -extension ObservableType { - - /** - Wraps the source sequence in order to run its subscription and unsubscription logic on the specified - scheduler. - - This operation is not commonly used. - - This only performs the side-effects of subscription and unsubscription on the specified scheduler. - - In order to invoke observer callbacks on a `scheduler`, use `observeOn`. - - - seealso: [subscribeOn operator on reactivex.io](http://reactivex.io/documentation/operators/subscribeon.html) - - - parameter scheduler: Scheduler to perform subscription and unsubscription actions on. - - returns: The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler. - */ - public func subscribeOn(_ scheduler: ImmediateSchedulerType) - -> Observable { - return SubscribeOn(source: self, scheduler: scheduler) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Creation.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Creation.swift deleted file mode 100644 index b45a44e1..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Creation.swift +++ /dev/null @@ -1,226 +0,0 @@ -// -// Observable+Creation.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/21/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -extension Observable { - // MARK: create - - /** - Creates an observable sequence from a specified subscribe method implementation. - - - seealso: [create operator on reactivex.io](http://reactivex.io/documentation/operators/create.html) - - - parameter subscribe: Implementation of the resulting observable sequence's `subscribe` method. - - returns: The observable sequence with the specified implementation for the `subscribe` method. - */ - public static func create(_ subscribe: @escaping (AnyObserver) -> Disposable) -> Observable { - return AnonymousObservable(subscribe) - } - - // MARK: empty - - /** - Returns an empty observable sequence, using the specified scheduler to send out the single `Completed` message. - - - seealso: [empty operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html) - - - returns: An observable sequence with no elements. - */ - public static func empty() -> Observable { - return EmptyProducer() - } - - // MARK: never - - /** - Returns a non-terminating observable sequence, which can be used to denote an infinite duration. - - - seealso: [never operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html) - - - returns: An observable sequence whose observers will never get called. - */ - public static func never() -> Observable { - return NeverProducer() - } - - // MARK: just - - /** - Returns an observable sequence that contains a single element. - - - seealso: [just operator on reactivex.io](http://reactivex.io/documentation/operators/just.html) - - - parameter element: Single element in the resulting observable sequence. - - returns: An observable sequence containing the single specified element. - */ - public static func just(_ element: E) -> Observable { - return Just(element: element) - } - - /** - Returns an observable sequence that contains a single element. - - - seealso: [just operator on reactivex.io](http://reactivex.io/documentation/operators/just.html) - - - parameter element: Single element in the resulting observable sequence. - - parameter: Scheduler to send the single element on. - - returns: An observable sequence containing the single specified element. - */ - public static func just(_ element: E, scheduler: ImmediateSchedulerType) -> Observable { - return JustScheduled(element: element, scheduler: scheduler) - } - - // MARK: fail - - /** - Returns an observable sequence that terminates with an `error`. - - - seealso: [throw operator on reactivex.io](http://reactivex.io/documentation/operators/empty-never-throw.html) - - - returns: The observable sequence that terminates with specified error. - */ - public static func error(_ error: Swift.Error) -> Observable { - return ErrorProducer(error: error) - } - - // MARK: of - - /** - This method creates a new Observable instance with a variable number of elements. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - parameter elements: Elements to generate. - - parameter scheduler: Scheduler to send elements on. If `nil`, elements are sent immediatelly on subscription. - - returns: The observable sequence whose elements are pulled from the given arguments. - */ - public static func of(_ elements: E ..., scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return ObservableSequence(elements: elements, scheduler: scheduler) - } - - // MARK: defer - - /** - Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes. - - - seealso: [defer operator on reactivex.io](http://reactivex.io/documentation/operators/defer.html) - - - parameter observableFactory: Observable factory function to invoke for each observer that subscribes to the resulting sequence. - - returns: An observable sequence whose observers trigger an invocation of the given observable factory function. - */ - public static func deferred(_ observableFactory: @escaping () throws -> Observable) - -> Observable { - return Deferred(observableFactory: observableFactory) - } - - /** - Generates an observable sequence by running a state-driven loop producing the sequence's elements, using the specified scheduler - to run the loop send out observer messages. - - - seealso: [create operator on reactivex.io](http://reactivex.io/documentation/operators/create.html) - - - parameter initialState: Initial state. - - parameter condition: Condition to terminate generation (upon returning `false`). - - parameter iterate: Iteration step function. - - parameter scheduler: Scheduler on which to run the generator loop. - - returns: The generated sequence. - */ - public static func generate(initialState: E, condition: @escaping (E) throws -> Bool, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance, iterate: @escaping (E) throws -> E) -> Observable { - return Generate(initialState: initialState, condition: condition, iterate: iterate, resultSelector: { $0 }, scheduler: scheduler) - } - - /** - Generates an observable sequence that repeats the given element infinitely, using the specified scheduler to send out observer messages. - - - seealso: [repeat operator on reactivex.io](http://reactivex.io/documentation/operators/repeat.html) - - - parameter element: Element to repeat. - - parameter scheduler: Scheduler to run the producer loop on. - - returns: An observable sequence that repeats the given element infinitely. - */ - public static func repeatElement(_ element: E, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return RepeatElement(element: element, scheduler: scheduler) - } - - /** - Constructs an observable sequence that depends on a resource object, whose lifetime is tied to the resulting observable sequence's lifetime. - - - seealso: [using operator on reactivex.io](http://reactivex.io/documentation/operators/using.html) - - - parameter resourceFactory: Factory function to obtain a resource object. - - parameter observableFactory: Factory function to obtain an observable sequence that depends on the obtained resource. - - returns: An observable sequence whose lifetime controls the lifetime of the dependent resource object. - */ - public static func using(_ resourceFactory: @escaping () throws -> R, observableFactory: @escaping (R) throws -> Observable) -> Observable { - return Using(resourceFactory: resourceFactory, observableFactory: observableFactory) - } -} - -extension Observable where Element : SignedInteger { - /** - Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to generate and send out observer messages. - - - seealso: [range operator on reactivex.io](http://reactivex.io/documentation/operators/range.html) - - - parameter start: The value of the first integer in the sequence. - - parameter count: The number of sequential integers to generate. - - parameter scheduler: Scheduler to run the generator loop on. - - returns: An observable sequence that contains a range of sequential integral numbers. - */ - public static func range(start: E, count: E, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return RangeProducer(start: start, count: count, scheduler: scheduler) - } -} - -extension Observable { - /** - Converts an array to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - returns: The observable sequence whose elements are pulled from the given enumerable sequence. - */ - public static func from(_ array: [E], scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable { - return ObservableSequence(elements: array, scheduler: scheduler) - } - - /** - Converts a sequence to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - returns: The observable sequence whose elements are pulled from the given enumerable sequence. - */ - public static func from(_ sequence: S, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable where S.Iterator.Element == E { - return ObservableSequence(elements: sequence, scheduler: scheduler) - } - - /** - Converts a optional to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - parameter optional: Optional element in the resulting observable sequence. - - returns: An observable sequence containing the wrapped value or not from given optional. - */ - public static func from(optional: E?) -> Observable { - return ObservableOptional(optional: optional) - } - - /** - Converts a optional to an observable sequence. - - - seealso: [from operator on reactivex.io](http://reactivex.io/documentation/operators/from.html) - - - parameter optional: Optional element in the resulting observable sequence. - - parameter: Scheduler to send the optional element on. - - returns: An observable sequence containing the wrapped value or not from given optional. - */ - public static func from(optional: E?, scheduler: ImmediateSchedulerType) -> Observable { - return ObservableOptionalScheduled(optional: optional, scheduler: scheduler) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Debug.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Debug.swift deleted file mode 100644 index 8b3cc414..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Debug.swift +++ /dev/null @@ -1,26 +0,0 @@ -// -// Observable+Debug.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/2/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -// MARK: debug - -extension ObservableType { - - /** - Prints received events for all observers on standard output. - - - seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html) - - - parameter identifier: Identifier that is printed together with event description to standard output. - - 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) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Multiple.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Multiple.swift deleted file mode 100644 index 7c30641e..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Multiple.swift +++ /dev/null @@ -1,402 +0,0 @@ -// -// Observable+Multiple.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/12/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -// MARK: combineLatest - -extension Observable { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element. - - - seealso: [combinelatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter resultSelector: Function to invoke whenever any of the sources produces an element. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func combineLatest(_ collection: C, _ resultSelector: @escaping ([C.Iterator.Element.E]) throws -> Element) -> Observable - where C.Iterator.Element: ObservableType { - return CombineLatestCollectionType(sources: collection, resultSelector: resultSelector) - } - - /** - 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 using the specified result selector function. - */ - public static func combineLatest(_ collection: C) -> Observable<[Element]> - where C.Iterator.Element: ObservableType, C.Iterator.Element.E == Element { - return CombineLatestCollectionType(sources: collection, resultSelector: { $0 }) - } -} - -// MARK: zip - -extension Observable { - /** - Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. - - - seealso: [zip operator on reactivex.io](http://reactivex.io/documentation/operators/zip.html) - - - parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources. - - returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function. - */ - public static func zip(_ collection: C, _ resultSelector: @escaping ([C.Iterator.Element.E]) throws -> Element) -> Observable - where C.Iterator.Element: ObservableType { - return ZipCollectionType(sources: collection, resultSelector: resultSelector) - } - - /** - 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 using the specified result selector function. - */ - public static func zip(_ collection: C) -> Observable<[Element]> - where C.Iterator.Element: ObservableType, C.Iterator.Element.E == Element { - return ZipCollectionType(sources: collection, resultSelector: { $0 }) - } - -} - -// MARK: switch - -extension ObservableType where E : ObservableConvertibleType { - - /** - Transforms an observable sequence of observable sequences into an observable sequence - producing values only from the most recent observable sequence. - - Each time a new inner observable sequence is received, unsubscribe from the - previous inner observable sequence. - - - seealso: [switch operator on reactivex.io](http://reactivex.io/documentation/operators/switch.html) - - - returns: The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received. - */ - public func switchLatest() -> Observable { - return Switch(source: asObservable()) - } -} - -// switchIfEmpty - -extension ObservableType { - /** - Returns the elements of the specified sequence or `switchTo` sequence if the sequence is empty. - - - seealso: [DefaultIfEmpty operator on reactivex.io](http://reactivex.io/documentation/operators/defaultifempty.html) - - - parameter switchTo: Observable sequence being returned when source sequence is empty. - - returns: Observable sequence that contains elements from switchTo sequence if source is empty, otherwise returns source sequence elements. - */ - public func ifEmpty(switchTo other: Observable) -> Observable { - return SwitchIfEmpty(source: asObservable(), ifEmpty: other) - } -} - -// MARK: concat - -extension ObservableType { - - /** - Concatenates the second observable sequence to `self` upon successful termination of `self`. - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - parameter second: Second observable sequence. - - returns: An observable sequence that contains the elements of `self`, followed by those of the second sequence. - */ - public func concat(_ second: O) -> Observable where O.E == E { - return Observable.concat([self.asObservable(), second.asObservable()]) - } -} - -extension Observable { - /** - Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully. - - This operator has tail recursive optimizations that will prevent stack overflow. - - Optimizations will be performed in cases equivalent to following: - - [1, [2, [3, .....].concat()].concat].concat() - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - returns: An observable sequence that contains the elements of each given sequence, in sequential order. - */ - public static func concat(_ sequence: S) -> Observable - where S.Iterator.Element == Observable { - return Concat(sources: sequence, count: nil) - } - - /** - Concatenates all observable sequences in the given collection, as long as the previous observable sequence terminated successfully. - - This operator has tail recursive optimizations that will prevent stack overflow. - - Optimizations will be performed in cases equivalent to following: - - [1, [2, [3, .....].concat()].concat].concat() - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - returns: An observable sequence that contains the elements of each given sequence, in sequential order. - */ - public static func concat(_ collection: S) -> Observable - where S.Iterator.Element == Observable { - return Concat(sources: collection, count: collection.count.toIntMax()) - } - - /** - 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: sources.count.toIntMax()) - } -} - -extension ObservableType where E : ObservableConvertibleType { - - /** - Concatenates all inner observable sequences, as long as the previous observable sequence terminated successfully. - - - seealso: [concat operator on reactivex.io](http://reactivex.io/documentation/operators/concat.html) - - - returns: An observable sequence that contains the elements of each observed inner sequence, in sequential order. - */ - public func concat() -> Observable { - return merge(maxConcurrent: 1) - } -} - -// MARK: merge - -extension Observable { - /** - Merges elements from all observable sequences from collection into a single observable sequence. - - - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) - - - parameter sources: Collection of observable sequences to merge. - - returns: The observable sequence that merges the elements of the observable sequences. - */ - public static func merge(_ sources: C) -> Observable where C.Iterator.Element == Observable { - return MergeArray(sources: Array(sources)) - } - - /** - Merges elements from all observable sequences from array into a single observable sequence. - - - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) - - - parameter sources: Array of observable sequences to merge. - - returns: The observable sequence that merges the elements of the observable sequences. - */ - public static func merge(_ sources: [Observable]) -> Observable { - return MergeArray(sources: sources) - } - - /** - Merges elements from all observable sequences into a single observable sequence. - - - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) - - - parameter sources: Collection of observable sequences to merge. - - returns: The observable sequence that merges the elements of the observable sequences. - */ - public static func merge(_ sources: Observable...) -> Observable { - return MergeArray(sources: sources) - } -} - -extension ObservableType where E : ObservableConvertibleType { - - /** - Merges elements from all observable sequences in the given enumerable sequence into a single observable sequence. - - - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) - - - returns: The observable sequence that merges the elements of the observable sequences. - */ - public func merge() -> Observable { - return Merge(source: asObservable()) - } - - /** - Merges elements from all inner observable sequences into a single observable sequence, limiting the number of concurrent subscriptions to inner sequences. - - - seealso: [merge operator on reactivex.io](http://reactivex.io/documentation/operators/merge.html) - - - parameter maxConcurrent: Maximum number of inner observable sequences being subscribed to concurrently. - - returns: The observable sequence that merges the elements of the inner sequences. - */ - public func merge(maxConcurrent: Int) - -> Observable { - return MergeLimited(source: asObservable(), maxConcurrent: maxConcurrent) - } -} - -// MARK: catch - -extension ObservableType { - - /** - Continues an observable sequence that is terminated by an error with the observable sequence produced by the handler. - - - seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html) - - - parameter handler: Error handler function, producing another observable sequence. - - returns: An observable sequence containing the source sequence's elements, followed by the elements produced by the handler's resulting observable sequence in case an error occurred. - */ - public func catchError(_ handler: @escaping (Swift.Error) throws -> Observable) - -> Observable { - return Catch(source: asObservable(), handler: handler) - } - - /** - Continues an observable sequence that is terminated by an error with a single element. - - - seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html) - - - parameter element: Last element in an observable sequence in case error occurs. - - returns: An observable sequence containing the source sequence's elements, followed by the `element` in case an error occurred. - */ - public func catchErrorJustReturn(_ element: E) - -> Observable { - return Catch(source: asObservable(), handler: { _ in Observable.just(element) }) - } - -} - -extension Observable { - /** - Continues an observable sequence that is terminated by an error with the next observable sequence. - - - seealso: [catch operator on reactivex.io](http://reactivex.io/documentation/operators/catch.html) - - - returns: An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully. - */ - public static func catchError(_ sequence: S) -> Observable - where S.Iterator.Element == Observable { - return CatchSequence(sources: sequence) - } -} - -// MARK: takeUntil - -extension ObservableType { - - /** - Returns the elements from the source observable sequence until the other observable sequence produces an element. - - - seealso: [takeUntil operator on reactivex.io](http://reactivex.io/documentation/operators/takeuntil.html) - - - parameter other: Observable sequence that terminates propagation of elements of the source sequence. - - returns: An observable sequence containing the elements of the source sequence up to the point the other sequence interrupted further propagation. - */ - public func takeUntil(_ other: O) - -> Observable { - return TakeUntil(source: asObservable(), other: other.asObservable()) - } -} - -// MARK: skipUntil - -extension ObservableType { - - /** - Returns the elements from the source observable sequence that are emitted after the other observable sequence produces an element. - - - seealso: [skipUntil operator on reactivex.io](http://reactivex.io/documentation/operators/skipuntil.html) - - - parameter other: Observable sequence that starts propagation of elements of the source sequence. - - returns: An observable sequence containing the elements of the source sequence that are emitted after the other sequence emits an item. - */ - public func skipUntil(_ other: O) - -> Observable { - return SkipUntil(source: asObservable(), other: other.asObservable()) - } -} - -// MARK: amb - -extension ObservableType { - - /** - Propagates the observable sequence that reacts first. - - - seealso: [amb operator on reactivex.io](http://reactivex.io/documentation/operators/amb.html) - - - parameter right: Second observable sequence. - - returns: An observable sequence that surfaces either of the given sequences, whichever reacted first. - */ - public func amb - (_ right: O2) - -> Observable where O2.E == E { - return Amb(left: asObservable(), right: right.asObservable()) - } -} - -extension Observable { - /** - Propagates the observable sequence that reacts first. - - - seealso: [amb operator on reactivex.io](http://reactivex.io/documentation/operators/amb.html) - - - returns: An observable sequence that surfaces any of the given sequences, whichever reacted first. - */ - public static func amb(_ sequence: S) -> Observable - where S.Iterator.Element == Observable { - return sequence.reduce(Observable.never()) { a, o in - return a.amb(o.asObservable()) - } - } -} - -// withLatestFrom - -extension ObservableType { - - /** - Merges two observable sequences into one observable sequence by combining each element from self with the latest element from the second source, if any. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter second: Second observable source. - - parameter resultSelector: Function to invoke for each element from the self combined with the latest element from the second source, if any. - - returns: An observable sequence containing the result of combining each element of the self with the latest element from the second source, if any, using the specified result selector function. - */ - public func withLatestFrom(_ second: SecondO, resultSelector: @escaping (E, SecondO.E) throws -> ResultType) -> Observable { - return WithLatestFrom(first: asObservable(), second: second.asObservable(), resultSelector: resultSelector) - } - - /** - Merges two observable sequences into one observable sequence by using latest element from the second sequence every time when `self` emitts an element. - - - seealso: [combineLatest operator on reactivex.io](http://reactivex.io/documentation/operators/combinelatest.html) - - - parameter second: Second observable source. - - returns: An observable sequence containing the result of combining each element of the self with the latest element from the second source, if any, using the specified result selector function. - */ - public func withLatestFrom(_ second: SecondO) -> Observable { - return WithLatestFrom(first: asObservable(), second: second.asObservable(), resultSelector: { $1 }) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Single.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Single.swift deleted file mode 100644 index 6a34ea6d..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Single.swift +++ /dev/null @@ -1,256 +0,0 @@ -// -// Observable+Single.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -// MARK: distinct until changed - -extension ObservableType where E: Equatable { - - /** - Returns an observable sequence that contains only distinct contiguous elements according to equality operator. - - - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) - - - returns: An observable sequence only containing the distinct contiguous elements, based on equality operator, from the source sequence. - */ - public func distinctUntilChanged() - -> Observable { - return self.distinctUntilChanged({ $0 }, comparer: { ($0 == $1) }) - } -} - -extension ObservableType { - /** - Returns an observable sequence that contains only distinct contiguous elements according to the `keySelector`. - - - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) - - - parameter keySelector: A function to compute the comparison key for each element. - - returns: An observable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence. - */ - public func distinctUntilChanged(_ keySelector: @escaping (E) throws -> K) - -> Observable { - return self.distinctUntilChanged(keySelector, comparer: { $0 == $1 }) - } - - /** - Returns an observable sequence that contains only distinct contiguous elements according to the `comparer`. - - - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) - - - parameter comparer: Equality comparer for computed key values. - - returns: An observable sequence only containing the distinct contiguous elements, based on `comparer`, from the source sequence. - */ - public func distinctUntilChanged(_ comparer: @escaping (E, E) throws -> Bool) - -> Observable { - return self.distinctUntilChanged({ $0 }, comparer: comparer) - } - - /** - Returns an observable sequence that contains only distinct contiguous elements according to the keySelector and the comparer. - - - seealso: [distinct operator on reactivex.io](http://reactivex.io/documentation/operators/distinct.html) - - - parameter keySelector: A function to compute the comparison key for each element. - - parameter comparer: Equality comparer for computed key values. - - returns: An observable sequence only containing the distinct contiguous elements, based on a computed key value and the comparer, from the source sequence. - */ - public func distinctUntilChanged(_ keySelector: @escaping (E) throws -> K, comparer: @escaping (K, K) throws -> Bool) - -> Observable { - return DistinctUntilChanged(source: self.asObservable(), selector: keySelector, comparer: comparer) - } -} - -// MARK: doOn - -extension ObservableType { - /** - Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence. - - - seealso: [do operator on reactivex.io](http://reactivex.io/documentation/operators/do.html) - - - parameter onNext: Action to invoke for each element in the observable sequence. - - parameter onError: Action to invoke upon errored termination of the observable sequence. - - parameter onCompleted: Action to invoke upon graceful termination of the observable sequence. - - parameter onSubscribe: Action to invoke before subscribing to source observable sequence. - - parameter onSubscribed: Action to invoke after subscribing to source observable sequence. - - parameter onDispose: Action to invoke after subscription to source observable has been disposed for any reason. It can be either because sequence terminates for some reason or observer subscription being disposed. - - returns: The source sequence with the side-effecting behavior applied. - */ - public func `do`(onNext: ((E) throws -> Void)? = nil, onError: ((Swift.Error) throws -> Void)? = nil, onCompleted: (() throws -> Void)? = nil, onSubscribe: (() -> ())? = nil, onSubscribed: (() -> ())? = nil, onDispose: (() -> ())? = nil) - -> Observable { - return Do(source: self.asObservable(), eventHandler: { e in - switch e { - case .next(let element): - try onNext?(element) - case .error(let e): - try onError?(e) - case .completed: - try onCompleted?() - } - }, onSubscribe: onSubscribe, onSubscribed: onSubscribed, onDispose: onDispose) - } -} - -// MARK: startWith - -extension ObservableType { - - /** - Prepends a sequence of values to an observable sequence. - - - seealso: [startWith operator on reactivex.io](http://reactivex.io/documentation/operators/startwith.html) - - - parameter elements: Elements to prepend to the specified sequence. - - returns: The source sequence prepended with the specified values. - */ - public func startWith(_ elements: E ...) - -> Observable { - return StartWith(source: self.asObservable(), elements: elements) - } -} - -// MARK: retry - -extension ObservableType { - - /** - Repeats the source observable sequence until it successfully terminates. - - **This could potentially create an infinite sequence.** - - - seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html) - - - returns: Observable sequence to repeat until it successfully terminates. - */ - 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: repeatElement(self.asObservable(), count: maxAttemptCount)) - } - - /** - Repeats the source observable sequence on error when the notifier emits a next value. - If the source observable errors and the notifier completes, it will complete the source sequence. - - - seealso: [retry operator on reactivex.io](http://reactivex.io/documentation/operators/retry.html) - - - parameter notificationHandler: A handler that is passed an observable sequence of errors raised by the source observable and returns and observable that either continues, completes or errors. This behavior is then applied to the source observable. - - returns: An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully or is notified to error or complete. - */ - 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) - } -} - -// MARK: scan - -extension ObservableType { - - /** - Applies an accumulator function over an observable sequence and returns each intermediate result. The specified seed value is used as the initial accumulator value. - - For aggregation behavior with no intermediate results, see `reduce`. - - - seealso: [scan operator on reactivex.io](http://reactivex.io/documentation/operators/scan.html) - - - parameter seed: The initial accumulator value. - - parameter accumulator: An accumulator function to be invoked on each element. - - returns: An observable sequence containing the accumulated values. - */ - public func scan(_ seed: A, accumulator: @escaping (A, E) throws -> A) - -> Observable { - return Scan(source: self.asObservable(), seed: seed, accumulator: accumulator) - } -} - -// MARK: defaultIfEmpty - -extension ObservableType { - - /** - Emits elements from the source observable sequence, or a default element if the source observable sequence is empty. - - - seealso: [DefaultIfEmpty operator on reactivex.io](http://reactivex.io/documentation/operators/defaultifempty.html) - - - parameter default: Default element to be sent if the source does not emit any elements - - returns: An observable sequence which emits default element end completes in case the original sequence is empty - */ - public func ifEmpty(default: E) -> Observable { - return DefaultIfEmpty(source: self.asObservable(), default: `default`) - } -} - -extension ObservableType { - - /** - Skips elements and completes (or errors) when the receiver completes (or errors). Equivalent to filter that always returns false. - - - seealso: [ignoreElements operator on reactivex.io](http://reactivex.io/documentation/operators/ignoreelements.html) - - - returns: An observable sequence that skips all elements of the source sequence. - */ - public func ignoreElements() - -> Observable { - return filter { _ -> Bool in - return false - } - } -} - -// MARK: materialize - -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()) - } -} - -extension ObservableType where E: EventConvertible { - /** - Convert any previously materialized Observable into it's original form. - - seealso: [materialize operator on reactivex.io](http://reactivex.io/documentation/operators/materialize-dematerialize.html) - - returns: The dematerialized observable sequence. - */ - public func dematerialize() -> Observable { - return Dematerialize(source: self.asObservable()) - } - -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Observable+StandardSequenceOperators.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Observable+StandardSequenceOperators.swift deleted file mode 100644 index 49e9cd43..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Observable+StandardSequenceOperators.swift +++ /dev/null @@ -1,320 +0,0 @@ -// -// Observable+StandardSequenceOperators.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/17/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -// MARK: filter aka where - -extension ObservableType { - - /** - Filters the elements of an observable sequence based on a predicate. - - - seealso: [filter operator on reactivex.io](http://reactivex.io/documentation/operators/filter.html) - - - parameter predicate: A function to test each source element for a condition. - - returns: An observable sequence that contains elements from the input sequence that satisfy the condition. - */ - public func filter(_ predicate: @escaping (E) throws -> Bool) - -> Observable { - return Filter(source: asObservable(), predicate: predicate) - } -} - -// MARK: takeWhile - -extension ObservableType { - - /** - Returns elements from an observable sequence as long as a specified condition is true. - - - seealso: [takeWhile operator on reactivex.io](http://reactivex.io/documentation/operators/takewhile.html) - - - parameter predicate: A function to test each element for a condition. - - returns: An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. - */ - public func takeWhile(_ predicate: @escaping (E) throws -> Bool) - -> Observable { - return TakeWhile(source: asObservable(), predicate: predicate) - } - - /** - Returns elements from an observable sequence as long as a specified condition is true. - - The element's index is used in the logic of the predicate function. - - - seealso: [takeWhile operator on reactivex.io](http://reactivex.io/documentation/operators/takewhile.html) - - - parameter predicate: A function to test each element for a condition; the second parameter of the function represents the index of the source element. - - returns: An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. - */ - public func takeWhileWithIndex(_ predicate: @escaping (E, Int) throws -> Bool) - -> Observable { - return TakeWhile(source: asObservable(), predicate: predicate) - } -} - -// MARK: take - -extension ObservableType { - - /** - Returns a specified number of contiguous elements from the start of an observable sequence. - - - seealso: [take operator on reactivex.io](http://reactivex.io/documentation/operators/take.html) - - - parameter count: The number of elements to return. - - returns: An observable sequence that contains the specified number of elements from the start of the input sequence. - */ - public func take(_ count: Int) - -> Observable { - if count == 0 { - return Observable.empty() - } - else { - return TakeCount(source: asObservable(), count: count) - } - } -} - -// MARK: takeLast - -extension ObservableType { - - /** - Returns a specified number of contiguous elements from the end of an observable sequence. - - This operator accumulates a buffer with a length enough to store elements count elements. Upon completion of the source sequence, this buffer is drained on the result sequence. This causes the elements to be delayed. - - - seealso: [takeLast operator on reactivex.io](http://reactivex.io/documentation/operators/takelast.html) - - - parameter count: Number of elements to take from the end of the source sequence. - - returns: An observable sequence containing the specified number of elements from the end of the source sequence. - */ - public func takeLast(_ count: Int) - -> Observable { - return TakeLast(source: asObservable(), count: count) - } -} - - -// MARK: skip - -extension ObservableType { - - /** - Bypasses a specified number of elements in an observable sequence and then returns the remaining elements. - - - seealso: [skip operator on reactivex.io](http://reactivex.io/documentation/operators/skip.html) - - - parameter count: The number of elements to skip before returning the remaining elements. - - returns: An observable sequence that contains the elements that occur after the specified index in the input sequence. - */ - public func skip(_ count: Int) - -> Observable { - return SkipCount(source: asObservable(), count: count) - } -} - -// MARK: SkipWhile - -extension ObservableType { - - /** - Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. - - - seealso: [skipWhile operator on reactivex.io](http://reactivex.io/documentation/operators/skipwhile.html) - - - parameter predicate: A function to test each element for a condition. - - returns: An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. - */ - public func skipWhile(_ predicate: @escaping (E) throws -> Bool) -> Observable { - return SkipWhile(source: asObservable(), predicate: predicate) - } - - /** - Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. - The element's index is used in the logic of the predicate function. - - - seealso: [skipWhile operator on reactivex.io](http://reactivex.io/documentation/operators/skipwhile.html) - - - parameter predicate: A function to test each element for a condition; the second parameter of the function represents the index of the source element. - - returns: An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. - */ - public func skipWhileWithIndex(_ predicate: @escaping (E, Int) throws -> Bool) -> Observable { - return SkipWhile(source: asObservable(), predicate: predicate) - } -} - -// MARK: map aka select - -extension ObservableType { - - /** - Projects each element of an observable sequence into a new form. - - - seealso: [map operator on reactivex.io](http://reactivex.io/documentation/operators/map.html) - - - parameter transform: A transform function to apply to each source element. - - returns: An observable sequence whose elements are the result of invoking the transform function on each element of source. - - */ - public func map(_ transform: @escaping (E) throws -> R) - -> Observable { - return self.asObservable().composeMap(transform) - } - - /** - 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. - */ - public func mapWithIndex(_ selector: @escaping (E, Int) throws -> R) - -> Observable { - return MapWithIndex(source: asObservable(), selector: selector) - } -} - -// MARK: flatMap - -extension ObservableType { - - /** - Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. - - - seealso: [flatMap operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) - - - parameter selector: A transform function to apply to each element. - - returns: An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence. - */ - public func flatMap(_ selector: @escaping (E) throws -> O) - -> Observable { - return FlatMap(source: asObservable(), selector: selector) - } - - /** - Projects each element of an observable sequence to an observable sequence by incorporating the element's index and merges the resulting observable sequences into one observable sequence. - - - seealso: [flatMap operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) - - - parameter selector: A transform function to apply to each element; the second parameter of the function represents the index of the source element. - - returns: An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence. - */ - public func flatMapWithIndex(_ selector: @escaping (E, Int) throws -> O) - -> Observable { - return FlatMapWithIndex(source: asObservable(), selector: selector) - } -} - -// MARK: flatMapFirst - -extension ObservableType { - - /** - Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. - If element is received while there is some projected observable sequence being merged it will simply be ignored. - - - seealso: [flatMapFirst operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) - - - parameter selector: A transform function to apply to element that was observed while no observable is executing in parallel. - - returns: An observable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence that was received while no other sequence was being calculated. - */ - public func flatMapFirst(_ selector: @escaping (E) throws -> O) - -> Observable { - return FlatMapFirst(source: asObservable(), selector: selector) - } -} - -// MARK: flatMapLatest - -extension ObservableType { - /** - Projects each element of an observable sequence into a new sequence of observable sequences and then - transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. - - It is a combination of `map` + `switchLatest` operator - - - seealso: [flatMapLatest operator on reactivex.io](http://reactivex.io/documentation/operators/flatmap.html) - - - parameter selector: A transform function to apply to each element. - - returns: An observable sequence whose elements are the result of invoking the transform function on each element of source producing an - Observable of Observable sequences and that at any point in time produces the elements of the most recent inner observable sequence that has been received. - */ - public func flatMapLatest(_ selector: @escaping (E) throws -> O) - -> Observable { - return FlatMapLatest(source: asObservable(), selector: selector) - } -} - -// MARK: elementAt - -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: asObservable(), index: index, throwOnEmpty: true) - } -} - -// MARK: single - -extension ObservableType { - - /** - The single operator is similar to first, but throws a `RxError.noElements` or `RxError.moreThanOneElement` - if the source Observable does not emit exactly one element before successfully completing. - - - seealso: [single operator on reactivex.io](http://reactivex.io/documentation/operators/first.html) - - - returns: An observable sequence that emits a single element or throws an exception if more (or none) of them are emitted. - */ - public func single() - -> Observable { - return SingleAsync(source: asObservable()) - } - - /** - The single operator is similar to first, but throws a `RxError.NoElements` or `RxError.MoreThanOneElement` - if the source Observable does not emit exactly one element before successfully completing. - - - seealso: [single operator on reactivex.io](http://reactivex.io/documentation/operators/first.html) - - - parameter predicate: A function to test each source element for a condition. - - returns: An observable sequence that emits a single element or throws an exception if more (or none) of them are emitted. - */ - public func single(_ predicate: @escaping (E) throws -> Bool) - -> Observable { - return SingleAsync(source: asObservable(), predicate: predicate) - } -} - -// MARK: groupBy - -extension ObservableType { - /* - Groups the elements of an observable sequence according to a specified key selector function. - - - seealso: [groupBy operator on reactivex.io](http://reactivex.io/documentation/operators/groupby.html) - - - parameter keySelector: A function to extract the key for each element. - - returns: A sequence of observable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. - */ - public func groupBy(keySelector: @escaping (E) throws -> K) - -> Observable> { - return GroupBy(source: self.asObservable(), selector: keySelector) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Time.swift b/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Time.swift deleted file mode 100644 index d157d3ec..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observables/Observable+Time.swift +++ /dev/null @@ -1,258 +0,0 @@ -// -// Observable+Time.swift -// RxSwift -// -// Created by Krunoslav Zaher on 3/22/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -// MARK: throttle -extension ObservableType { - - /** - Returns an Observable that emits the first and the latest item emitted by the source Observable during sequential time windows of a specified duration. - - This operator makes sure that no two elements are emitted in less then dueTime. - - - seealso: [debounce operator on reactivex.io](http://reactivex.io/documentation/operators/debounce.html) - - - parameter dueTime: Throttling duration for each element. - - parameter latest: Should latest element received in a dueTime wide time window since last element emission be emitted. - - parameter scheduler: Scheduler to run the throttle timers 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) - } - - /** - 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) - } -} - -// MARK: sample - -extension ObservableType { - - /** - Samples the source observable sequence using a sampler observable sequence producing sampling ticks. - - Upon each sampling tick, the latest element (if any) in the source sequence during the last sampling interval is sent to the resulting sequence. - - **In case there were no new elements between sampler ticks, no element is sent to the resulting sequence.** - - - seealso: [sample operator on reactivex.io](http://reactivex.io/documentation/operators/sample.html) - - - parameter sampler: Sampling tick sequence. - - returns: Sampled observable sequence. - */ - public func sample(_ sampler: O) - -> Observable { - return Sample(source: self.asObservable(), sampler: sampler.asObservable()) - } -} - -extension Observable where Element : SignedInteger { - /** - Returns an observable sequence that produces a value after each period, using the specified scheduler to run timers and to send out observer messages. - - - seealso: [interval operator on reactivex.io](http://reactivex.io/documentation/operators/interval.html) - - - parameter period: Period for producing the values in the resulting sequence. - - parameter scheduler: Scheduler to run the timer on. - - returns: An observable sequence that produces a value after each period. - */ - public static func interval(_ period: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return Timer(dueTime: period, - period: period, - scheduler: scheduler - ) - } -} - -// MARK: timer - -extension Observable where Element: SignedInteger { - /** - Returns an observable sequence that periodically produces a value after the specified initial relative due time has elapsed, using the specified scheduler to run timers. - - - seealso: [timer operator on reactivex.io](http://reactivex.io/documentation/operators/timer.html) - - - parameter dueTime: Relative time at which to produce the first value. - - parameter period: Period to produce subsequent values. - - parameter scheduler: Scheduler to run timers on. - - returns: An observable sequence that produces a value after due time has elapsed and then each period. - */ - public static func timer(_ dueTime: RxTimeInterval, period: RxTimeInterval? = nil, scheduler: SchedulerType) - -> Observable { - return Timer( - dueTime: dueTime, - period: period, - scheduler: scheduler - ) - } -} - -// MARK: take - -extension ObservableType { - - /** - Takes elements for the specified duration from the start of the observable source sequence, using the specified scheduler to run timers. - - - seealso: [take operator on reactivex.io](http://reactivex.io/documentation/operators/take.html) - - - parameter duration: Duration for taking elements from the start of the sequence. - - parameter scheduler: Scheduler to run the timer on. - - returns: An observable sequence with the elements taken during the specified duration from the start of the source sequence. - */ - public func take(_ duration: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return TakeTime(source: self.asObservable(), duration: duration, scheduler: scheduler) - } -} - -// MARK: skip - -extension ObservableType { - - /** - Skips elements for the specified duration from the start of the observable source sequence, using the specified scheduler to run timers. - - - seealso: [skip operator on reactivex.io](http://reactivex.io/documentation/operators/skip.html) - - - parameter duration: Duration for skipping elements from the start of the sequence. - - parameter scheduler: Scheduler to run the timer on. - - returns: An observable sequence with the elements skipped during the specified duration from the start of the source sequence. - */ - public func skip(_ duration: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return SkipTime(source: self.asObservable(), duration: duration, scheduler: scheduler) - } -} - -// MARK: delaySubscription - -extension ObservableType { - - /** - Time shifts the observable sequence by delaying the subscription with the specified relative time duration, using the specified scheduler to run timers. - - - seealso: [delay operator on reactivex.io](http://reactivex.io/documentation/operators/delay.html) - - - parameter dueTime: Relative time shift of the subscription. - - parameter scheduler: Scheduler to run the subscription delay timer on. - - returns: Time-shifted sequence. - */ - public func delaySubscription(_ dueTime: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return DelaySubscription(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) - } -} - -// MARK: buffer - -extension ObservableType { - - /** - Projects each element of an observable sequence into a buffer that's sent out when either it's full or a given amount of time has elapsed, using the specified scheduler to run timers. - - A useful real-world analogy of this overload is the behavior of a ferry leaving the dock when all seats are taken, or at the scheduled time of departure, whichever event occurs first. - - - seealso: [buffer operator on reactivex.io](http://reactivex.io/documentation/operators/buffer.html) - - - parameter timeSpan: Maximum time length of a buffer. - - parameter count: Maximum element count of a buffer. - - parameter scheduler: Scheduler to run buffering timers on. - - returns: An observable sequence of buffers. - */ - public func buffer(timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) - -> Observable<[E]> { - return BufferTimeCount(source: self.asObservable(), timeSpan: timeSpan, count: count, scheduler: scheduler) - } -} - -// MARK: window - -extension ObservableType { - - /** - Projects each element of an observable sequence into a window that is completed when either it’s full or a given amount of time has elapsed. - - - seealso: [window operator on reactivex.io](http://reactivex.io/documentation/operators/window.html) - - - parameter timeSpan: Maximum time length of a window. - - parameter count: Maximum element count of a window. - - parameter scheduler: Scheduler to run windowing timers on. - - returns: An observable sequence of windows (instances of `Observable`). - */ - public func window(timeSpan: RxTimeInterval, count: Int, scheduler: SchedulerType) - -> Observable> { - return WindowTimeCount(source: self.asObservable(), timeSpan: timeSpan, count: count, scheduler: scheduler) - } -} - -// MARK: timeout - -extension ObservableType { - - /** - Applies a timeout policy for each element in the observable sequence. If the next element isn't received within the specified timeout duration starting from its predecessor, a TimeoutError is propagated to the observer. - - - seealso: [timeout operator on reactivex.io](http://reactivex.io/documentation/operators/timeout.html) - - - parameter dueTime: Maximum duration between values before a timeout occurs. - - parameter scheduler: Scheduler to run the timeout timer on. - - returns: An observable sequence with a `RxError.timeout` in case of a timeout. - */ - public func timeout(_ dueTime: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return Timeout(source: self.asObservable(), dueTime: dueTime, other: Observable.error(RxError.timeout), scheduler: scheduler) - } - - /** - Applies a timeout policy for each element in the observable sequence, using the specified scheduler to run timeout timers. If the next element isn't received within the specified timeout duration starting from its predecessor, the other observable sequence is used to produce future messages from that point on. - - - seealso: [timeout operator on reactivex.io](http://reactivex.io/documentation/operators/timeout.html) - - - parameter dueTime: Maximum duration between values before a timeout occurs. - - parameter other: Sequence to return in case of a timeout. - - parameter scheduler: Scheduler to run the timeout timer on. - - returns: The source sequence switching to the other sequence in case of a timeout. - */ - public func timeout(_ dueTime: RxTimeInterval, other: O, scheduler: SchedulerType) - -> Observable where E == O.E { - return Timeout(source: self.asObservable(), dueTime: dueTime, other: other.asObservable(), scheduler: scheduler) - } -} - -// MARK: delay - -extension ObservableType { - - /** - Returns an observable sequence by the source observable sequence shifted forward in time by a specified delay. Error events from the source observable sequence are not delayed. - - - seealso: [delay operator on reactivex.io](http://reactivex.io/documentation/operators/delay.html) - - - parameter dueTime: Relative time shift of the source by. - - parameter scheduler: Scheduler to run the subscription delay timer on. - - returns: the source Observable shifted in time by the specified delay. - */ - public func delay(_ dueTime: RxTimeInterval, scheduler: SchedulerType) - -> Observable { - return Delay(source: self.asObservable(), dueTime: dueTime, scheduler: scheduler) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/ObserverType.swift b/Sample/Pods/RxSwift/RxSwift/ObserverType.swift deleted file mode 100644 index b024b0fb..00000000 --- a/Sample/Pods/RxSwift/RxSwift/ObserverType.swift +++ /dev/null @@ -1,40 +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 E - - /// Notify observer about sequence event. - /// - /// - parameter event: Event that occured. - func on(_ event: Event) -} - -/// Convenience API extensions to provide alternate next, error, completed events -extension ObserverType { - - /// Convenience method equivalent to `on(.next(element: E))` - /// - /// - parameter element: Next element to send to observer(s) - public final func onNext(_ element: E) { - on(.next(element)) - } - - /// Convenience method equivalent to `on(.completed)` - public final func onCompleted() { - on(.completed) - } - - /// Convenience method equivalent to `on(.error(Swift.Error))` - /// - parameter error: Swift.Error to send to observer(s) - public final func onError(_ error: Swift.Error) { - on(.error(error)) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift b/Sample/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift deleted file mode 100644 index 54e83f54..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observers/AnonymousObserver.swift +++ /dev/null @@ -1,32 +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 Element = ElementType - - typealias EventHandler = (Event) -> Void - - private let _eventHandler : EventHandler - - init(_ eventHandler: @escaping EventHandler) { -#if TRACE_RESOURCES - let _ = Resources.incrementTotal() -#endif - _eventHandler = eventHandler - } - - override func onCore(_ event: Event) { - return _eventHandler(event) - } - -#if TRACE_RESOURCES - deinit { - let _ = Resources.decrementTotal() - } -#endif -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift b/Sample/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift deleted file mode 100644 index 38115652..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observers/ObserverBase.swift +++ /dev/null @@ -1,34 +0,0 @@ -// -// ObserverBase.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/15/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -class ObserverBase : Disposable, ObserverType { - typealias E = ElementType - - private var _isStopped: AtomicInt = 0 - - func on(_ event: Event) { - switch event { - case .next: - if _isStopped == 0 { - onCore(event) - } - case .error, .completed: - if AtomicCompareAndSwap(0, 1, &_isStopped) { - onCore(event) - } - } - } - - func onCore(_ event: Event) { - rxAbstractMethod() - } - - func dispose() { - _ = AtomicCompareAndSwap(0, 1, &_isStopped) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift b/Sample/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift deleted file mode 100644 index 332e6d2e..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Observers/TailRecursiveSink.swift +++ /dev/null @@ -1,150 +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 S.Iterator.Element: ObservableConvertibleType, S.Iterator.Element.E == O.E { - typealias Value = TailRecursiveSinkCommand - typealias E = O.E - typealias SequenceGenerator = (generator: S.Iterator, remaining: IntMax?) - - var _generators: [SequenceGenerator] = [] - var _isDisposed = false - var _subscription = SerialDisposable() - - // this is thread safe object - var _gate = AsyncLock>>() - - override init(observer: O, cancel: Cancelable) { - super.init(observer: observer, cancel: cancel) - } - - func run(_ sources: SequenceGenerator) -> Disposable { - _generators.append(sources) - - schedule(.moveNext) - - return _subscription - } - - func invoke(_ command: TailRecursiveSinkCommand) { - switch command { - case .dispose: - disposeCommand() - case .moveNext: - moveNextCommand() - } - } - - // simple implementation for now - func schedule(_ command: TailRecursiveSinkCommand) { - _gate.invoke(InvocableScheduledItem(invocable: self, state: command)) - } - - func done() { - forwardOn(.completed) - dispose() - } - - func extract(_ observable: Observable) -> SequenceGenerator? { - rxAbstractMethod() - } - - // should be done on gate locked - - private func moveNextCommand() { - var next: Observable? = nil - - repeat { - guard let (g, left) = _generators.last else { - break - } - - if _isDisposed { - return - } - - _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 { - _generators.append((e, knownOriginalLeft - 1)) - } - } - else { - _generators.append((e, nil)) - } - - let nextGenerator = extract(nextCandidate) - - if let nextGenerator = nextGenerator { - _generators.append(nextGenerator) - #if DEBUG || TRACE_RESOURCES - if maxTailRecursiveSinkStackSize < _generators.count { - maxTailRecursiveSinkStackSize = _generators.count - } - #endif - } - else { - next = nextCandidate - } - } while next == nil - - guard let existingNext = next else { - done() - return - } - - let disposable = SingleAssignmentDisposable() - _subscription.disposable = disposable - disposable.setDisposable(subscribeToNext(existingNext)) - } - - func subscribeToNext(_ source: Observable) -> Disposable { - rxAbstractMethod() - } - - func disposeCommand() { - _isDisposed = true - _generators.removeAll(keepingCapacity: false) - } - - override func dispose() { - super.dispose() - - _subscription.dispose() - - schedule(.dispose) - } -} - diff --git a/Sample/Pods/RxSwift/RxSwift/Reactive.swift b/Sample/Pods/RxSwift/RxSwift/Reactive.swift deleted file mode 100644 index b8739966..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Reactive.swift +++ /dev/null @@ -1,74 +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 CompatibleType - - /// 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/Sample/Pods/RxSwift/RxSwift/Rx.swift b/Sample/Pods/RxSwift/RxSwift/Rx.swift deleted file mode 100644 index 93b066e7..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Rx.swift +++ /dev/null @@ -1,67 +0,0 @@ -// -// Rx.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/14/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -#if TRACE_RESOURCES - fileprivate var resourceCount: AtomicInt = 0 - - /// Resource utilization information - public struct Resources { - /// Counts internal Rx resource allocations (Observables, Observers, Disposables, etc.). This provides a simple way to detect leaks during development. - public static var total: Int32 { - return resourceCount.valueSnapshot() - } - - /// Increments `Resources.total` resource count. - /// - /// - returns: New resource count - public static func incrementTotal() -> Int32 { - return AtomicIncrement(&resourceCount) - } - - /// Decrements `Resources.total` resource count - /// - /// - returns: New resource count - public static func decrementTotal() -> Int32 { - return AtomicDecrement(&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 { - // The temptation to comment this line is great, but please don't, it's for your own good. The choice is yours. - 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 -} diff --git a/Sample/Pods/RxSwift/RxSwift/RxMutableBox.swift b/Sample/Pods/RxSwift/RxSwift/RxMutableBox.swift deleted file mode 100644 index 7f3c333b..00000000 --- a/Sample/Pods/RxSwift/RxSwift/RxMutableBox.swift +++ /dev/null @@ -1,27 +0,0 @@ -// -// RxMutableBox.swift -// RxSwift -// -// Created by Krunoslav Zaher on 5/22/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// 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))" - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/SchedulerType.swift b/Sample/Pods/RxSwift/RxSwift/SchedulerType.swift deleted file mode 100644 index bdfcf8b0..00000000 --- a/Sample/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 struct Foundation.TimeInterval -import struct Foundation.Date - -// Type that represents time interval in the context of RxSwift. -public typealias RxTimeInterval = TimeInterval - -/// 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) -> ()) -> Disposable { - let scheduler = AnyRecursiveScheduler(scheduler: self, action: action) - - scheduler.schedule(state, dueTime: dueTime) - - return Disposables.create(with: scheduler.dispose) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift b/Sample/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift deleted file mode 100644 index d7ec3d88..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift +++ /dev/null @@ -1,82 +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. - public init(queue: DispatchQueue, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { - configuration = DispatchQueueConfiguration(queue: queue, leeway: leeway) - } - - /// Convenience init for scheduler that wraps one of the global concurrent dispatch queues. - /// - /// - parameter qos: Target global dispatch queue, by quality of service class. - @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 immediatelly. - - - 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: Foundation.TimeInterval, 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: TimeInterval, period: TimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - return self.configuration.schedulePeriodic(state, startAfter: startAfter, period: period, action: action) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift b/Sample/Pods/RxSwift/RxSwift/Schedulers/ConcurrentMainScheduler.swift deleted file mode 100644 index 92028b17..00000000 --- a/Sample/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 _mainScheduler.now as Date - } - - private init(mainScheduler: MainScheduler) { - _mainQueue = DispatchQueue.main - _mainScheduler = mainScheduler - } - - /// Singleton instance of `ConcurrentMainScheduler` - public static let instance = ConcurrentMainScheduler(mainScheduler: MainScheduler.instance) - - /** - Schedules an action to be executed immediatelly. - - - 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() - - _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: Foundation.TimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - return _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: TimeInterval, period: TimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - return _mainScheduler.schedulePeriodic(state, startAfter: startAfter, period: period, action: action) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift b/Sample/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift deleted file mode 100644 index cbdb98d9..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Schedulers/CurrentThreadScheduler.swift +++ /dev/null @@ -1,136 +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 - fileprivate 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) - if pthread_key_create(key, nil) != 0 { - 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/Sample/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift b/Sample/Pods/RxSwift/RxSwift/Schedulers/HistoricalScheduler.swift deleted file mode 100644 index 11af238a..00000000 --- a/Sample/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/Sample/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift b/Sample/Pods/RxSwift/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift deleted file mode 100644 index 3602d2d0..00000000 --- a/Sample/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 struct Foundation.Date - -/// Converts historial 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 = RxTimeInterval - - /// 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) -> RxTimeInterval { - 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: RxTimeInterval) -> 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/Sample/Pods/RxSwift/RxSwift/Schedulers/ImmediateScheduler.swift b/Sample/Pods/RxSwift/RxSwift/Schedulers/ImmediateScheduler.swift deleted file mode 100644 index d411dac7..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Schedulers/ImmediateScheduler.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// ImmediateScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 10/17/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// Represents an object that schedules units of work to run immediately on the current thread. -private final class ImmediateScheduler : ImmediateSchedulerType { - - private let _asyncLock = AsyncLock() - - /** - Schedules an action to be executed immediatelly. - - In case `schedule` is called recursively from inside of `action` callback, scheduled `action` will be enqueued - and executed after current `action`. (`AsyncLock` behavior) - - - parameter state: State passed to the action to be executed. - - parameter action: Action to be executed. - - returns: The disposable object used to cancel the scheduled action (best effort). - */ - func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - let disposable = SingleAssignmentDisposable() - _asyncLock.invoke(AnonymousInvocable { - if disposable.isDisposed { - return - } - disposable.setDisposable(action(state)) - }) - - return disposable - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/AnonymousInvocable.swift b/Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/AnonymousInvocable.swift deleted file mode 100644 index 8d1d965b..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/AnonymousInvocable.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// AnonymousInvocable.swift -// RxSwift -// -// Created by Krunoslav Zaher on 11/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -struct AnonymousInvocable : InvocableType { - private let _action: () -> () - - init(_ action: @escaping () -> ()) { - _action = action - } - - func invoke() { - _action() - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift b/Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift deleted file mode 100644 index dc191b15..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift +++ /dev/null @@ -1,104 +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 -} - -private func dispatchInterval(_ interval: Foundation.TimeInterval) -> DispatchTimeInterval { - precondition(interval >= 0.0) - // TODO: Replace 1000 with something that actually works - // NSEC_PER_MSEC returns 1000000 - return DispatchTimeInterval.milliseconds(Int(interval * 1000.0)) -} - -extension DispatchQueueConfiguration { - func schedule(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - let cancel = SingleAssignmentDisposable() - - queue.async { - if cancel.isDisposed { - return - } - - - cancel.setDisposable(action(state)) - } - - return cancel - } - - func scheduleRelative(_ state: StateType, dueTime: Foundation.TimeInterval, action: @escaping (StateType) -> Disposable) -> Disposable { - let deadline = DispatchTime.now() + dispatchInterval(dueTime) - - let compositeDisposable = CompositeDisposable() - - let timer = DispatchSource.makeTimerSource(queue: queue) - timer.scheduleOneshot(deadline: deadline) - - // 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: TimeInterval, period: TimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - let initial = DispatchTime.now() + dispatchInterval(startAfter) - - var timerState = state - - let timer = DispatchSource.makeTimerSource(queue: queue) - timer.scheduleRepeating(deadline: initial, interval: dispatchInterval(period), leeway: leeway) - - // TODO: - // This looks horrible, and yes, it is. - // It looks like Apple has made a conceputal change here, and I'm unsure why. - // 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/Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift b/Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift deleted file mode 100644 index 90445f8d..00000000 --- a/Sample/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) { - _invocable = invocable - _state = state - } - - func invoke() { - _invocable.invoke(_state) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift b/Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/InvocableType.swift deleted file mode 100644 index 0dba4336..00000000 --- a/Sample/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/Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift b/Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItem.swift deleted file mode 100644 index 454fb34b..00000000 --- a/Sample/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 _disposable.isDisposed - } - - init(action: @escaping Action, state: T) { - _action = action - _state = state - } - - func invoke() { - _disposable.setDisposable(_action(_state)) - } - - func dispose() { - _disposable.dispose() - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift b/Sample/Pods/RxSwift/RxSwift/Schedulers/Internal/ScheduledItemType.swift deleted file mode 100644 index d2b16cab..00000000 --- a/Sample/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/Sample/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift b/Sample/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift deleted file mode 100644 index 7d2ac218..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Schedulers/MainScheduler.swift +++ /dev/null @@ -1,68 +0,0 @@ -// -// MainScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 2/8/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -import Dispatch - -/** -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 - - var numberEnqueued: AtomicInt = 0 - - /// Initializes new instance of `MainScheduler`. - public init() { - _mainQueue = DispatchQueue.main - super.init(serialQueue: _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 backgound thread. Please use `MainScheduler.instance.schedule` to schedule work on main thread.") - } - } - - override func scheduleInternal(_ state: StateType, action: @escaping (StateType) -> Disposable) -> Disposable { - let currentNumberEnqueued = AtomicIncrement(&numberEnqueued) - - if DispatchQueue.isMain && currentNumberEnqueued == 1 { - let disposable = action(state) - _ = AtomicDecrement(&numberEnqueued) - return disposable - } - - let cancel = SingleAssignmentDisposable() - - _mainQueue.async { - if !cancel.isDisposed { - _ = action(state) - } - - _ = AtomicDecrement(&self.numberEnqueued) - } - - return cancel - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift b/Sample/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift deleted file mode 100644 index 82d30fbc..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Schedulers/OperationQueueScheduler.swift +++ /dev/null @@ -1,50 +0,0 @@ -// -// OperationQueueScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 4/4/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -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 - - /// Constructs new instance of `OperationQueueScheduler` that performs work on `operationQueue`. - /// - /// - parameter operationQueue: Operation queue targeted to perform work on. - public init(operationQueue: OperationQueue) { - self.operationQueue = operationQueue - } - - /** - 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)) - } - - self.operationQueue.addOperation(operation) - - return cancel - } - -} diff --git a/Sample/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift b/Sample/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift deleted file mode 100644 index 24d19cc6..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Schedulers/RecursiveScheduler.swift +++ /dev/null @@ -1,226 +0,0 @@ -// -// RecursiveScheduler.swift -// RxSwift -// -// Created by Krunoslav Zaher on 6/7/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -fileprivate 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) { - _action = action - _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 = _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() - } - - _lock.performLocked { - switch scheduleState { - case .added: - rxFatalError("Invalid state") - break - case .initial: - if let removeKey = _group.insert(d) { - scheduleState = .added(removeKey) - } - else { - scheduleState = .done - } - break - case .done: - break - } - } - } - - /// Schedules an action to be executed recursively. - /// - /// - parameter state: State passed to the action to be executed. - func schedule(_ state: State) { - var scheduleState: ScheduleState = .initial - - let d = _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() - } - - _lock.performLocked { - switch scheduleState { - case .added: - rxFatalError("Invalid state") - break - case .initial: - if let removeKey = _group.insert(d) { - scheduleState = .added(removeKey) - } - else { - scheduleState = .done - } - break - case .done: - break - } - } - } - - func dispose() { - _lock.performLocked { - _action = nil - } - _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) { - _action = action - _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 = _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() - } - - _lock.performLocked { - switch scheduleState { - case .added: - rxFatalError("Invalid state") - break - case .initial: - if let removeKey = _group.insert(d) { - scheduleState = .added(removeKey) - } - else { - scheduleState = .done - } - break - case .done: - break - } - } - } - - func dispose() { - _lock.performLocked { - _action = nil - } - _group.dispose() - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift b/Sample/Pods/RxSwift/RxSwift/Schedulers/SchedulerServices+Emulation.swift deleted file mode 100644 index 1d224775..00000000 --- a/Sample/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 var _pendingTickCount: AtomicInt = 0 - - init(scheduler: SchedulerType, startAfter: RxTimeInterval, period: RxTimeInterval, action: @escaping RecursiveAction, state: State) { - _scheduler = scheduler - _startAfter = startAfter - _period = period - _action = action - _state = state - } - - func start() -> Disposable { - return _scheduler.scheduleRecursive(SchedulePeriodicRecursiveCommand.tick, dueTime: _startAfter, action: self.tick) - } - - func tick(_ command: SchedulePeriodicRecursiveCommand, scheduler: RecursiveScheduler) -> Void { - // 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: _period) - - // The idea is that if on tick there wasn't any item enqueued, schedule to perform work immediatelly. - // Else work will be scheduled after previous enqueued work completes. - if AtomicIncrement(&_pendingTickCount) == 1 { - self.tick(.dispatchStart, scheduler: scheduler) - } - - case .dispatchStart: - _state = _action(_state) - // Start work and schedule check is this last batch of work - if AtomicDecrement(&_pendingTickCount) > 0 { - // This gives priority to scheduler emulation, it's not perfect, but helps - scheduler.schedule(SchedulePeriodicRecursiveCommand.dispatchStart) - } - } - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift b/Sample/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift deleted file mode 100644 index a163406c..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift +++ /dev/null @@ -1,123 +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 - - init(serialQueue: DispatchQueue, leeway: DispatchTimeInterval = DispatchTimeInterval.nanoseconds(0)) { - 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. - */ - 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. - */ - 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. - */ - @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 immediatelly. - - - 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: Foundation.TimeInterval, 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: TimeInterval, period: TimeInterval, action: @escaping (StateType) -> StateType) -> Disposable { - return self.configuration.schedulePeriodic(state, startAfter: startAfter, period: period, action: action) - } -} diff --git a/Sample/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift b/Sample/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift deleted file mode 100644 index b207836e..00000000 --- a/Sample/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeConverterType.swift +++ /dev/null @@ -1,95 +0,0 @@ -// -// VirtualTimeConverterType.swift -// RxSwift -// -// Created by Krunoslav Zaher on 12/23/15. -// Copyright © 2015 Krunoslav Zaher. All rights reserved. -// - -/// 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) -> RxTimeInterval - - /** - Converts from virtual time interval to `NSTimeInterval`. - - - parameter timeInterval: `NSTimeInterval` to convert to virtual time interval. - - returns: Virtual time interval corresponding to time interval. - */ - func convertToVirtualTimeInterval(_ timeInterval: RxTimeInterval) -> 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 aditional 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 aditional 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/Sample/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift b/Sample/Pods/RxSwift/RxSwift/Schedulers/VirtualTimeScheduler.swift deleted file mode 100644 index 0e650c60..00000000 --- a/Sample/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 _converter.convertFromVirtualTime(clock) - } - - /// - returns: Scheduler's absolute time clock value. - public var clock: VirtualTime { - return _clock - } - - /// Creates a new virtual time scheduler. - /// - /// - parameter initialClock: Initial value for the clock. - public init(initialClock: VirtualTime, converter: Converter) { - _clock = initialClock - _running = false - _converter = converter - _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 - let _ = Resources.incrementTotal() - #endif - } - - /** - Schedules an action to be executed immediatelly. - - - 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: 0.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.addingTimeInterval(dueTime) - let absoluteTime = _converter.convertToVirtualTime(time) - let adjustedTime = self.adjustScheduledTime(absoluteTime) - return 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 = _converter.offsetVirtualTime(self.clock, offset: dueTime) - return 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: _nextId) - - _nextId += 1 - - _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 _running { - return - } - - _running = true - repeat { - guard let next = findNext() else { - break - } - - if _converter.compareVirtualTime(next.time, self.clock).greaterThan { - _clock = next.time - } - - next.invoke() - _schedulerQueue.remove(next) - } while _running - - _running = false - } - - func findNext() -> VirtualSchedulerItem? { - while let front = _schedulerQueue.peek() { - if front.isDisposed { - _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 _running { - fatalError("Scheduler is already running") - } - - _running = true - repeat { - guard let next = findNext() else { - break - } - - if _converter.compareVirtualTime(next.time, virtualTime).greaterThan { - break - } - - if _converter.compareVirtualTime(next.time, self.clock).greaterThan { - _clock = next.time - } - - next.invoke() - _schedulerQueue.remove(next) - } while _running - - _clock = virtualTime - _running = false - } - - /// Advances the scheduler's clock by the specified relative time. - public func sleep(_ virtualInterval: VirtualTimeInterval) { - MainScheduler.ensureExecutingOnScheduler() - - let sleepTo = _converter.offsetVirtualTime(clock, offset: virtualInterval) - if _converter.compareVirtualTime(sleepTo, clock).lessThen { - fatalError("Can't sleep to past.") - } - - _clock = sleepTo - } - - /// Stops the virtual time scheduler. - public func stop() { - MainScheduler.ensureExecutingOnScheduler() - - _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
- - FooterText - **Copyright (c) 2012 - 2016, GitHub, Inc.** -**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. - - License - MIT - Title - ReactiveSwift - Type - PSGroupSpecifier - FooterText The MIT License (MIT) @@ -181,24 +152,6 @@ SOFTWARE. Type PSGroupSpecifier - - FooterText - **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. - License - MIT - Title - RxSwift - Type - PSGroupSpecifier - FooterText Generated by CocoaPods - https://cocoapods.org diff --git a/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-frameworks.sh b/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-frameworks.sh index 79744d9a..cfc13749 100755 --- a/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-frameworks.sh +++ b/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo-frameworks.sh @@ -93,18 +93,14 @@ if [[ "$CONFIGURATION" == "Debug" ]]; then install_framework "$BUILT_PRODUCTS_DIR/Moya/Moya.framework" install_framework "$BUILT_PRODUCTS_DIR/Moya-ObjectMapper/Moya_ObjectMapper.framework" install_framework "$BUILT_PRODUCTS_DIR/ObjectMapper/ObjectMapper.framework" - install_framework "$BUILT_PRODUCTS_DIR/ReactiveSwift/ReactiveSwift.framework" install_framework "$BUILT_PRODUCTS_DIR/Result/Result.framework" - install_framework "$BUILT_PRODUCTS_DIR/RxSwift/RxSwift.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then install_framework "$BUILT_PRODUCTS_DIR/Alamofire/Alamofire.framework" install_framework "$BUILT_PRODUCTS_DIR/Moya/Moya.framework" install_framework "$BUILT_PRODUCTS_DIR/Moya-ObjectMapper/Moya_ObjectMapper.framework" install_framework "$BUILT_PRODUCTS_DIR/ObjectMapper/ObjectMapper.framework" - install_framework "$BUILT_PRODUCTS_DIR/ReactiveSwift/ReactiveSwift.framework" install_framework "$BUILT_PRODUCTS_DIR/Result/Result.framework" - install_framework "$BUILT_PRODUCTS_DIR/RxSwift/RxSwift.framework" fi if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then wait diff --git a/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig b/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig index 5768e44a..dd1d9c23 100644 --- a/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig +++ b/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo.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/Moya" "$PODS_CONFIGURATION_BUILD_DIR/Moya-ObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/ReactiveSwift" "$PODS_CONFIGURATION_BUILD_DIR/Result" "$PODS_CONFIGURATION_BUILD_DIR/RxSwift" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Moya" "$PODS_CONFIGURATION_BUILD_DIR/Moya-ObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/Result" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Moya-ObjectMapper/Moya_ObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Moya/Moya.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper/ObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ReactiveSwift/ReactiveSwift.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Result/Result.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RxSwift/RxSwift.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Moya" -framework "Moya_ObjectMapper" -framework "ObjectMapper" -framework "ReactiveSwift" -framework "Result" -framework "RxSwift" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Moya-ObjectMapper/Moya_ObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Moya/Moya.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper/ObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Result/Result.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Moya" -framework "Moya_ObjectMapper" -framework "ObjectMapper" -framework "Result" 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/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo.release.xcconfig b/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo.release.xcconfig index 5768e44a..dd1d9c23 100644 --- a/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo.release.xcconfig +++ b/Sample/Pods/Target Support Files/Pods-Demo/Pods-Demo.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/Moya" "$PODS_CONFIGURATION_BUILD_DIR/Moya-ObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/ReactiveSwift" "$PODS_CONFIGURATION_BUILD_DIR/Result" "$PODS_CONFIGURATION_BUILD_DIR/RxSwift" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Moya" "$PODS_CONFIGURATION_BUILD_DIR/Moya-ObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper" "$PODS_CONFIGURATION_BUILD_DIR/Result" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Moya-ObjectMapper/Moya_ObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Moya/Moya.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper/ObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ReactiveSwift/ReactiveSwift.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Result/Result.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RxSwift/RxSwift.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Moya" -framework "Moya_ObjectMapper" -framework "ObjectMapper" -framework "ReactiveSwift" -framework "Result" -framework "RxSwift" +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Moya-ObjectMapper/Moya_ObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Moya/Moya.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ObjectMapper/ObjectMapper.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Result/Result.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "Moya" -framework "Moya_ObjectMapper" -framework "ObjectMapper" -framework "Result" 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/Sample/Pods/Target Support Files/ReactiveSwift/Info.plist b/Sample/Pods/Target Support Files/ReactiveSwift/Info.plist deleted file mode 100644 index 0a12077e..00000000 --- a/Sample/Pods/Target Support Files/ReactiveSwift/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 - 2.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-dummy.m b/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-dummy.m deleted file mode 100644 index 2f7b75cf..00000000 --- a/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_ReactiveSwift : NSObject -@end -@implementation PodsDummy_ReactiveSwift -@end diff --git a/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-prefix.pch b/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-prefix.pch deleted file mode 100644 index beb2a244..00000000 --- a/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-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/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-umbrella.h b/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-umbrella.h deleted file mode 100644 index 20aed9e4..00000000 --- a/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift-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 ReactiveSwiftVersionNumber; -FOUNDATION_EXPORT const unsigned char ReactiveSwiftVersionString[]; - diff --git a/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift.modulemap b/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift.modulemap deleted file mode 100644 index 0e321871..00000000 --- a/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module ReactiveSwift { - umbrella header "ReactiveSwift-umbrella.h" - - export * - module * { export * } -} diff --git a/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift.xcconfig b/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift.xcconfig deleted file mode 100644 index b960e9cb..00000000 --- a/Sample/Pods/Target Support Files/ReactiveSwift/ReactiveSwift.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/ReactiveSwift -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Result" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -OTHER_SWIFT_FLAGS[config=Release] = -suppress-warnings -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/ReactiveSwift -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/Sample/Pods/Target Support Files/Result/Info.plist b/Sample/Pods/Target Support Files/Result/Info.plist index 42c9fae4..806ba0d4 100644 --- a/Sample/Pods/Target Support Files/Result/Info.plist +++ b/Sample/Pods/Target Support Files/Result/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.2.1 + 3.2.3 CFBundleSignature ???? CFBundleVersion diff --git a/Sample/Pods/Target Support Files/RxSwift/Info.plist b/Sample/Pods/Target Support Files/RxSwift/Info.plist deleted file mode 100644 index ebdce251..00000000 --- a/Sample/Pods/Target Support Files/RxSwift/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 - 3.4.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Sample/Pods/Target Support Files/RxSwift/RxSwift 2.xcconfig b/Sample/Pods/Target Support Files/RxSwift/RxSwift 2.xcconfig deleted file mode 100644 index 8b032edd..00000000 --- a/Sample/Pods/Target Support Files/RxSwift/RxSwift 2.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/RxSwift -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" -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}/RxSwift -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/Sample/Pods/Target Support Files/RxSwift/RxSwift-dummy.m b/Sample/Pods/Target Support Files/RxSwift/RxSwift-dummy.m deleted file mode 100644 index 3783f72c..00000000 --- a/Sample/Pods/Target Support Files/RxSwift/RxSwift-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_RxSwift : NSObject -@end -@implementation PodsDummy_RxSwift -@end diff --git a/Sample/Pods/Target Support Files/RxSwift/RxSwift-prefix.pch b/Sample/Pods/Target Support Files/RxSwift/RxSwift-prefix.pch deleted file mode 100644 index beb2a244..00000000 --- a/Sample/Pods/Target Support Files/RxSwift/RxSwift-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/Sample/Pods/Target Support Files/RxSwift/RxSwift-umbrella.h b/Sample/Pods/Target Support Files/RxSwift/RxSwift-umbrella.h deleted file mode 100644 index 9a272119..00000000 --- a/Sample/Pods/Target Support Files/RxSwift/RxSwift-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 RxSwiftVersionNumber; -FOUNDATION_EXPORT const unsigned char RxSwiftVersionString[]; - diff --git a/Sample/Pods/Target Support Files/RxSwift/RxSwift.modulemap b/Sample/Pods/Target Support Files/RxSwift/RxSwift.modulemap deleted file mode 100644 index eae3d1c4..00000000 --- a/Sample/Pods/Target Support Files/RxSwift/RxSwift.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module RxSwift { - umbrella header "RxSwift-umbrella.h" - - export * - module * { export * } -} diff --git a/Sample/Pods/Target Support Files/RxSwift/RxSwift.xcconfig b/Sample/Pods/Target Support Files/RxSwift/RxSwift.xcconfig deleted file mode 100644 index 8b032edd..00000000 --- a/Sample/Pods/Target Support Files/RxSwift/RxSwift.xcconfig +++ /dev/null @@ -1,10 +0,0 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/RxSwift -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" -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}/RxSwift -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES From d2c71b66ca341d68eab06a96a7944a6a9cbaa702 Mon Sep 17 00:00:00 2001 From: Alberto Salas Date: Sun, 27 Aug 2017 21:13:43 +0200 Subject: [PATCH 6/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 460ddbe5..70dde70b 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Moya-ObjectMapper [ObjectMapper](https://github.com/Hearst-DD/ObjectMapper) bindings for [Moya](https://github.com/Moya/Moya) for easier JSON serialization. -Includes [RxSwift](https://github.com/ReactiveX/RxSwift/) bindings as well. +Includes [RxSwift](https://github.com/ReactiveX/RxSwift/) and [ReactiveSwift](https://github.com/ReactiveCocoa/ReactiveSwift/) bindings as well. # Installation