├── .gitignore ├── AlamofireReactive.podspec ├── Cartfile ├── LICENSE ├── Playground.playground ├── Contents.swift └── contents.xcplayground ├── README.md ├── ReactiveAlamofire.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ ├── ReactiveAlamofire-iOS.xcscheme │ ├── ReactiveAlamofire-macOS.xcscheme │ ├── ReactiveAlamofire-tvOS.xcscheme │ └── ReactiveAlamofire-watchOS.xcscheme ├── ReactiveAlamofire.xcworkspace └── contents.xcworkspacedata ├── ReactiveAlamofire ├── Info.plist └── ReactiveAlamofire.h └── Sources └── Request.swift /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata 19 | .DS_Store 20 | 21 | ## Other 22 | *.xccheckout 23 | *.moved-aside 24 | *.xcuserstate 25 | *.xcscmblueprint 26 | 27 | ## Obj-C/Swift specific 28 | *.hmap 29 | *.ipa 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | .build/ 40 | 41 | # CocoaPods 42 | # 43 | # We recommend against adding the Pods directory to your .gitignore. However 44 | # you should judge for yourself, the pros and cons are mentioned at: 45 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 46 | # 47 | # Pods/ 48 | 49 | # Carthage 50 | # 51 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 52 | # Carthage/Checkouts 53 | 54 | Carthage/Build 55 | 56 | # fastlane 57 | # 58 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 59 | # screenshots whenever they are needed. 60 | # For more information about the recommended setup visit: 61 | # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md 62 | 63 | fastlane/report.xml 64 | fastlane/screenshots 65 | -------------------------------------------------------------------------------- /AlamofireReactive.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "AlamofireReactive" 3 | s.version = "2.0.0" 4 | s.summary = "Reactive extensions for Alamofire framework." 5 | s.homepage = "https://github.com/ReactiveKit/ReactiveAlamofire" 6 | s.license = 'MIT' 7 | s.author = { "Srdan Rasic" => "srdan.rasic@gmail.com" } 8 | s.source = { :git => "https://github.com/ReactiveKit/ReactiveAlamofire.git", :tag => "v2.0.0" } 9 | s.module_name = 'ReactiveAlamofire' 10 | 11 | s.ios.deployment_target = '9.0' 12 | s.osx.deployment_target = '10.11' 13 | s.watchos.deployment_target = '2.0' 14 | s.tvos.deployment_target = '9.0' 15 | 16 | s.source_files = 'Sources/*.swift', 'ReactiveAlamofire/*.h' 17 | s.requires_arc = true 18 | 19 | s.dependency 'ReactiveKit', '~> 3.1' 20 | s.dependency 'Alamofire', '4.2' 21 | end 22 | -------------------------------------------------------------------------------- /Cartfile: -------------------------------------------------------------------------------- 1 | github "ReactiveKit/ReactiveKit" ~> 3.1 2 | github "Alamofire/Alamofire" ~> 4.2 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 ReactiveKit 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Playground.playground/Contents.swift: -------------------------------------------------------------------------------- 1 | //: Playground - noun: a place where people can play 2 | 3 | import Alamofire 4 | import ReactiveKit 5 | import ReactiveAlamofire 6 | import PlaygroundSupport 7 | 8 | PlaygroundPage.current.needsIndefiniteExecution = true 9 | 10 | let request = Alamofire.request("https://httpbin.org/get", withMethod: .get, parameters: ["foo": "bar"]) 11 | 12 | request.toJSONSignal().observeNext { json in 13 | print(json) 14 | } 15 | 16 | 17 | let streamRequest = Alamofire.request("http://httpbin.org/stream/3", withMethod: .get) 18 | 19 | streamRequest.toJSONStreamingSignal().observeNext { json in 20 | print("stream part: \(json)") 21 | } 22 | -------------------------------------------------------------------------------- /Playground.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ReactiveAlamofire 2 | Reactive extensions for Alamofire framework 3 | 4 | # Extensions 5 | 6 | ```swift 7 | extension Request { 8 | 9 | // General 10 | 11 | public func toSignal() -> Signal<(URLRequest?, HTTPURLResponse?, Data?), NSError> 12 | 13 | public func toSignal(_ responseSerializer: S) -> Signal 14 | 15 | public func toDataSignal() -> Signal 16 | 17 | public func toStringSignal(encoding encoding: String.Encoding? = nil) -> Signal 18 | 19 | public func toJSONSignal(options options: JSONSerialization.ReadingOptions = .allowFragments) -> Signal 20 | 21 | public func toPropertyListSignal(options options: PropertyListSerialization.ReadOptions = PropertyListSerialization.ReadOptions()) -> Signal 22 | 23 | // Streaming 24 | 25 | public func toStreamingSignal() -> Signal 26 | 27 | public func toStringStreamingSignal(elimiter: String, encoding: String.Encoding = .utf8) -> Signal 28 | 29 | public func toJSONStreamingSignal(delimiter: String = "\n", encoding: String.Encoding = .utf8, options: JSONSerialization.ReadingOptions = .allowFragments) -> Signal 30 | } 31 | ``` 32 | 33 | ## Installation 34 | 35 | ### CocoaPods 36 | 37 | ``` 38 | pod 'AlamofireReactive', '~> 2.0' 39 | ``` 40 | 41 | > Although framework is named ReactiveAlamofire, such name is already occupied on CocoaPods so we use alternative. You still import `ReactiveAlamofire` in your code. 42 | 43 | ### Carthage 44 | 45 | ``` 46 | github "ReactiveKit/ReactiveAlamofire" ~> 2.0 47 | ``` 48 | 49 | ## License 50 | 51 | The MIT License (MIT) 52 | 53 | Copyright (c) 2015-2016 Srdan Rasic (@srdanrasic) 54 | 55 | Permission is hereby granted, free of charge, to any person obtaining a copy 56 | of this software and associated documentation files (the "Software"), to deal 57 | in the Software without restriction, including without limitation the rights 58 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 59 | copies of the Software, and to permit persons to whom the Software is 60 | furnished to do so, subject to the following conditions: 61 | 62 | The above copyright notice and this permission notice shall be included in 63 | all copies or substantial portions of the Software. 64 | 65 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 66 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 67 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 68 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 69 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 70 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 71 | THE SOFTWARE. 72 | -------------------------------------------------------------------------------- /ReactiveAlamofire.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 168FF0DB1D742BEC000997A3 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFFFA8C1CCBBF050044D30A /* Request.swift */; }; 11 | 168FF0DC1D742BEE000997A3 /* ReactiveAlamofire.h in Headers */ = {isa = PBXBuildFile; fileRef = ECFFFA4B1CCB985D0044D30A /* ReactiveAlamofire.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | ECFFFA4C1CCB985D0044D30A /* ReactiveAlamofire.h in Headers */ = {isa = PBXBuildFile; fileRef = ECFFFA4B1CCB985D0044D30A /* ReactiveAlamofire.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | ECFFFA881CCBBE880044D30A /* ReactiveAlamofire.h in Headers */ = {isa = PBXBuildFile; fileRef = ECFFFA4B1CCB985D0044D30A /* ReactiveAlamofire.h */; settings = {ATTRIBUTES = (Public, ); }; }; 14 | ECFFFA891CCBBE880044D30A /* ReactiveAlamofire.h in Headers */ = {isa = PBXBuildFile; fileRef = ECFFFA4B1CCB985D0044D30A /* ReactiveAlamofire.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15 | ECFFFA8D1CCBBF050044D30A /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFFFA8C1CCBBF050044D30A /* Request.swift */; }; 16 | ECFFFA8E1CCBBF050044D30A /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFFFA8C1CCBBF050044D30A /* Request.swift */; }; 17 | ECFFFA8F1CCBBF050044D30A /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFFFA8C1CCBBF050044D30A /* Request.swift */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXFileReference section */ 21 | 168FF0D31D742B99000997A3 /* ReactiveAlamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ReactiveAlamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | ECFFFA481CCB985D0044D30A /* ReactiveAlamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ReactiveAlamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | ECFFFA4B1CCB985D0044D30A /* ReactiveAlamofire.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ReactiveAlamofire.h; sourceTree = ""; }; 24 | ECFFFA4D1CCB985D0044D30A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 25 | ECFFFA5B1CCBBBD10044D30A /* ReactiveAlamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ReactiveAlamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 26 | ECFFFA691CCBBC730044D30A /* ReactiveAlamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ReactiveAlamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 27 | ECFFFA7E1CCBBD6C0044D30A /* Cartfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Cartfile; sourceTree = ""; }; 28 | ECFFFA8C1CCBBF050044D30A /* Request.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Request.swift; sourceTree = ""; }; 29 | ECFFFA911CCBC55E0044D30A /* AlamofireReactive.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = AlamofireReactive.podspec; sourceTree = ""; }; 30 | /* End PBXFileReference section */ 31 | 32 | /* Begin PBXFrameworksBuildPhase section */ 33 | 168FF0CF1D742B99000997A3 /* Frameworks */ = { 34 | isa = PBXFrameworksBuildPhase; 35 | buildActionMask = 2147483647; 36 | files = ( 37 | ); 38 | runOnlyForDeploymentPostprocessing = 0; 39 | }; 40 | ECFFFA441CCB985D0044D30A /* Frameworks */ = { 41 | isa = PBXFrameworksBuildPhase; 42 | buildActionMask = 2147483647; 43 | files = ( 44 | ); 45 | runOnlyForDeploymentPostprocessing = 0; 46 | }; 47 | ECFFFA571CCBBBD10044D30A /* Frameworks */ = { 48 | isa = PBXFrameworksBuildPhase; 49 | buildActionMask = 2147483647; 50 | files = ( 51 | ); 52 | runOnlyForDeploymentPostprocessing = 0; 53 | }; 54 | ECFFFA651CCBBC730044D30A /* Frameworks */ = { 55 | isa = PBXFrameworksBuildPhase; 56 | buildActionMask = 2147483647; 57 | files = ( 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXFrameworksBuildPhase section */ 62 | 63 | /* Begin PBXGroup section */ 64 | ECFFFA3E1CCB985D0044D30A = { 65 | isa = PBXGroup; 66 | children = ( 67 | ECFFFA7E1CCBBD6C0044D30A /* Cartfile */, 68 | ECFFFA911CCBC55E0044D30A /* AlamofireReactive.podspec */, 69 | ECFFFA4A1CCB985D0044D30A /* ReactiveAlamofire */, 70 | ECFFFA8B1CCBBF050044D30A /* Sources */, 71 | ECFFFA491CCB985D0044D30A /* Products */, 72 | ); 73 | sourceTree = ""; 74 | }; 75 | ECFFFA491CCB985D0044D30A /* Products */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | ECFFFA481CCB985D0044D30A /* ReactiveAlamofire.framework */, 79 | ECFFFA5B1CCBBBD10044D30A /* ReactiveAlamofire.framework */, 80 | ECFFFA691CCBBC730044D30A /* ReactiveAlamofire.framework */, 81 | 168FF0D31D742B99000997A3 /* ReactiveAlamofire.framework */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | ECFFFA4A1CCB985D0044D30A /* ReactiveAlamofire */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | ECFFFA4D1CCB985D0044D30A /* Info.plist */, 90 | ECFFFA4B1CCB985D0044D30A /* ReactiveAlamofire.h */, 91 | ); 92 | path = ReactiveAlamofire; 93 | sourceTree = ""; 94 | }; 95 | ECFFFA8B1CCBBF050044D30A /* Sources */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | ECFFFA8C1CCBBF050044D30A /* Request.swift */, 99 | ); 100 | path = Sources; 101 | sourceTree = ""; 102 | }; 103 | /* End PBXGroup section */ 104 | 105 | /* Begin PBXHeadersBuildPhase section */ 106 | 168FF0D01D742B99000997A3 /* Headers */ = { 107 | isa = PBXHeadersBuildPhase; 108 | buildActionMask = 2147483647; 109 | files = ( 110 | 168FF0DC1D742BEE000997A3 /* ReactiveAlamofire.h in Headers */, 111 | ); 112 | runOnlyForDeploymentPostprocessing = 0; 113 | }; 114 | ECFFFA451CCB985D0044D30A /* Headers */ = { 115 | isa = PBXHeadersBuildPhase; 116 | buildActionMask = 2147483647; 117 | files = ( 118 | ECFFFA4C1CCB985D0044D30A /* ReactiveAlamofire.h in Headers */, 119 | ); 120 | runOnlyForDeploymentPostprocessing = 0; 121 | }; 122 | ECFFFA581CCBBBD10044D30A /* Headers */ = { 123 | isa = PBXHeadersBuildPhase; 124 | buildActionMask = 2147483647; 125 | files = ( 126 | ECFFFA881CCBBE880044D30A /* ReactiveAlamofire.h in Headers */, 127 | ); 128 | runOnlyForDeploymentPostprocessing = 0; 129 | }; 130 | ECFFFA661CCBBC730044D30A /* Headers */ = { 131 | isa = PBXHeadersBuildPhase; 132 | buildActionMask = 2147483647; 133 | files = ( 134 | ECFFFA891CCBBE880044D30A /* ReactiveAlamofire.h in Headers */, 135 | ); 136 | runOnlyForDeploymentPostprocessing = 0; 137 | }; 138 | /* End PBXHeadersBuildPhase section */ 139 | 140 | /* Begin PBXNativeTarget section */ 141 | 168FF0D21D742B99000997A3 /* ReactiveAlamofire-macOS */ = { 142 | isa = PBXNativeTarget; 143 | buildConfigurationList = 168FF0D81D742B99000997A3 /* Build configuration list for PBXNativeTarget "ReactiveAlamofire-macOS" */; 144 | buildPhases = ( 145 | 168FF0CE1D742B99000997A3 /* Sources */, 146 | 168FF0CF1D742B99000997A3 /* Frameworks */, 147 | 168FF0D01D742B99000997A3 /* Headers */, 148 | 168FF0D11D742B99000997A3 /* Resources */, 149 | ); 150 | buildRules = ( 151 | ); 152 | dependencies = ( 153 | ); 154 | name = "ReactiveAlamofire-macOS"; 155 | productName = "ReactiveAlamofire-macOS"; 156 | productReference = 168FF0D31D742B99000997A3 /* ReactiveAlamofire.framework */; 157 | productType = "com.apple.product-type.framework"; 158 | }; 159 | ECFFFA471CCB985D0044D30A /* ReactiveAlamofire-iOS */ = { 160 | isa = PBXNativeTarget; 161 | buildConfigurationList = ECFFFA501CCB985D0044D30A /* Build configuration list for PBXNativeTarget "ReactiveAlamofire-iOS" */; 162 | buildPhases = ( 163 | ECFFFA431CCB985D0044D30A /* Sources */, 164 | ECFFFA441CCB985D0044D30A /* Frameworks */, 165 | ECFFFA451CCB985D0044D30A /* Headers */, 166 | ECFFFA461CCB985D0044D30A /* Resources */, 167 | ); 168 | buildRules = ( 169 | ); 170 | dependencies = ( 171 | ); 172 | name = "ReactiveAlamofire-iOS"; 173 | productName = ReactiveAlamofire; 174 | productReference = ECFFFA481CCB985D0044D30A /* ReactiveAlamofire.framework */; 175 | productType = "com.apple.product-type.framework"; 176 | }; 177 | ECFFFA5A1CCBBBD10044D30A /* ReactiveAlamofire-tvOS */ = { 178 | isa = PBXNativeTarget; 179 | buildConfigurationList = ECFFFA601CCBBBD10044D30A /* Build configuration list for PBXNativeTarget "ReactiveAlamofire-tvOS" */; 180 | buildPhases = ( 181 | ECFFFA561CCBBBD10044D30A /* Sources */, 182 | ECFFFA571CCBBBD10044D30A /* Frameworks */, 183 | ECFFFA581CCBBBD10044D30A /* Headers */, 184 | ECFFFA591CCBBBD10044D30A /* Resources */, 185 | ); 186 | buildRules = ( 187 | ); 188 | dependencies = ( 189 | ); 190 | name = "ReactiveAlamofire-tvOS"; 191 | productName = ReactiveAlamofire; 192 | productReference = ECFFFA5B1CCBBBD10044D30A /* ReactiveAlamofire.framework */; 193 | productType = "com.apple.product-type.framework"; 194 | }; 195 | ECFFFA681CCBBC730044D30A /* ReactiveAlamofire-watchOS */ = { 196 | isa = PBXNativeTarget; 197 | buildConfigurationList = ECFFFA6E1CCBBC740044D30A /* Build configuration list for PBXNativeTarget "ReactiveAlamofire-watchOS" */; 198 | buildPhases = ( 199 | ECFFFA641CCBBC730044D30A /* Sources */, 200 | ECFFFA651CCBBC730044D30A /* Frameworks */, 201 | ECFFFA661CCBBC730044D30A /* Headers */, 202 | ECFFFA671CCBBC730044D30A /* Resources */, 203 | ); 204 | buildRules = ( 205 | ); 206 | dependencies = ( 207 | ); 208 | name = "ReactiveAlamofire-watchOS"; 209 | productName = ReactiveAlamofire; 210 | productReference = ECFFFA691CCBBC730044D30A /* ReactiveAlamofire.framework */; 211 | productType = "com.apple.product-type.framework"; 212 | }; 213 | /* End PBXNativeTarget section */ 214 | 215 | /* Begin PBXProject section */ 216 | ECFFFA3F1CCB985D0044D30A /* Project object */ = { 217 | isa = PBXProject; 218 | attributes = { 219 | LastUpgradeCheck = 0730; 220 | ORGANIZATIONNAME = ReactiveKit; 221 | TargetAttributes = { 222 | 168FF0D21D742B99000997A3 = { 223 | CreatedOnToolsVersion = 8.0; 224 | ProvisioningStyle = Automatic; 225 | }; 226 | ECFFFA471CCB985D0044D30A = { 227 | CreatedOnToolsVersion = 7.3; 228 | LastSwiftMigration = 0800; 229 | }; 230 | ECFFFA5A1CCBBBD10044D30A = { 231 | CreatedOnToolsVersion = 7.3; 232 | }; 233 | ECFFFA681CCBBC730044D30A = { 234 | CreatedOnToolsVersion = 7.3; 235 | }; 236 | }; 237 | }; 238 | buildConfigurationList = ECFFFA421CCB985D0044D30A /* Build configuration list for PBXProject "ReactiveAlamofire" */; 239 | compatibilityVersion = "Xcode 3.2"; 240 | developmentRegion = English; 241 | hasScannedForEncodings = 0; 242 | knownRegions = ( 243 | en, 244 | ); 245 | mainGroup = ECFFFA3E1CCB985D0044D30A; 246 | productRefGroup = ECFFFA491CCB985D0044D30A /* Products */; 247 | projectDirPath = ""; 248 | projectRoot = ""; 249 | targets = ( 250 | ECFFFA471CCB985D0044D30A /* ReactiveAlamofire-iOS */, 251 | ECFFFA5A1CCBBBD10044D30A /* ReactiveAlamofire-tvOS */, 252 | ECFFFA681CCBBC730044D30A /* ReactiveAlamofire-watchOS */, 253 | 168FF0D21D742B99000997A3 /* ReactiveAlamofire-macOS */, 254 | ); 255 | }; 256 | /* End PBXProject section */ 257 | 258 | /* Begin PBXResourcesBuildPhase section */ 259 | 168FF0D11D742B99000997A3 /* Resources */ = { 260 | isa = PBXResourcesBuildPhase; 261 | buildActionMask = 2147483647; 262 | files = ( 263 | ); 264 | runOnlyForDeploymentPostprocessing = 0; 265 | }; 266 | ECFFFA461CCB985D0044D30A /* Resources */ = { 267 | isa = PBXResourcesBuildPhase; 268 | buildActionMask = 2147483647; 269 | files = ( 270 | ); 271 | runOnlyForDeploymentPostprocessing = 0; 272 | }; 273 | ECFFFA591CCBBBD10044D30A /* Resources */ = { 274 | isa = PBXResourcesBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | ); 278 | runOnlyForDeploymentPostprocessing = 0; 279 | }; 280 | ECFFFA671CCBBC730044D30A /* Resources */ = { 281 | isa = PBXResourcesBuildPhase; 282 | buildActionMask = 2147483647; 283 | files = ( 284 | ); 285 | runOnlyForDeploymentPostprocessing = 0; 286 | }; 287 | /* End PBXResourcesBuildPhase section */ 288 | 289 | /* Begin PBXSourcesBuildPhase section */ 290 | 168FF0CE1D742B99000997A3 /* Sources */ = { 291 | isa = PBXSourcesBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | 168FF0DB1D742BEC000997A3 /* Request.swift in Sources */, 295 | ); 296 | runOnlyForDeploymentPostprocessing = 0; 297 | }; 298 | ECFFFA431CCB985D0044D30A /* Sources */ = { 299 | isa = PBXSourcesBuildPhase; 300 | buildActionMask = 2147483647; 301 | files = ( 302 | ECFFFA8D1CCBBF050044D30A /* Request.swift in Sources */, 303 | ); 304 | runOnlyForDeploymentPostprocessing = 0; 305 | }; 306 | ECFFFA561CCBBBD10044D30A /* Sources */ = { 307 | isa = PBXSourcesBuildPhase; 308 | buildActionMask = 2147483647; 309 | files = ( 310 | ECFFFA8E1CCBBF050044D30A /* Request.swift in Sources */, 311 | ); 312 | runOnlyForDeploymentPostprocessing = 0; 313 | }; 314 | ECFFFA641CCBBC730044D30A /* Sources */ = { 315 | isa = PBXSourcesBuildPhase; 316 | buildActionMask = 2147483647; 317 | files = ( 318 | ECFFFA8F1CCBBF050044D30A /* Request.swift in Sources */, 319 | ); 320 | runOnlyForDeploymentPostprocessing = 0; 321 | }; 322 | /* End PBXSourcesBuildPhase section */ 323 | 324 | /* Begin XCBuildConfiguration section */ 325 | 168FF0D91D742B99000997A3 /* Debug */ = { 326 | isa = XCBuildConfiguration; 327 | buildSettings = { 328 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 329 | CLANG_WARN_INFINITE_RECURSION = YES; 330 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 331 | CODE_SIGN_IDENTITY = "-"; 332 | COMBINE_HIDPI_IMAGES = YES; 333 | DEFINES_MODULE = YES; 334 | DYLIB_COMPATIBILITY_VERSION = 1; 335 | DYLIB_CURRENT_VERSION = 1; 336 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 337 | FRAMEWORK_VERSION = A; 338 | INFOPLIST_FILE = ReactiveAlamofire/Info.plist; 339 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 340 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 341 | MACOSX_DEPLOYMENT_TARGET = 10.11; 342 | PRODUCT_BUNDLE_IDENTIFIER = ReactiveKit.ReactiveAlamofire; 343 | PRODUCT_NAME = ReactiveAlamofire; 344 | SDKROOT = macosx; 345 | SKIP_INSTALL = YES; 346 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 347 | SWIFT_VERSION = 3.0; 348 | }; 349 | name = Debug; 350 | }; 351 | 168FF0DA1D742B99000997A3 /* Release */ = { 352 | isa = XCBuildConfiguration; 353 | buildSettings = { 354 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 355 | CLANG_WARN_INFINITE_RECURSION = YES; 356 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 357 | CODE_SIGN_IDENTITY = "-"; 358 | COMBINE_HIDPI_IMAGES = YES; 359 | DEFINES_MODULE = YES; 360 | DYLIB_COMPATIBILITY_VERSION = 1; 361 | DYLIB_CURRENT_VERSION = 1; 362 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 363 | FRAMEWORK_VERSION = A; 364 | INFOPLIST_FILE = ReactiveAlamofire/Info.plist; 365 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 366 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 367 | MACOSX_DEPLOYMENT_TARGET = 10.11; 368 | PRODUCT_BUNDLE_IDENTIFIER = ReactiveKit.ReactiveAlamofire; 369 | PRODUCT_NAME = ReactiveAlamofire; 370 | SDKROOT = macosx; 371 | SKIP_INSTALL = YES; 372 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 373 | SWIFT_VERSION = 3.0; 374 | }; 375 | name = Release; 376 | }; 377 | ECFFFA4E1CCB985D0044D30A /* Debug */ = { 378 | isa = XCBuildConfiguration; 379 | buildSettings = { 380 | ALWAYS_SEARCH_USER_PATHS = NO; 381 | CLANG_ANALYZER_NONNULL = YES; 382 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 383 | CLANG_CXX_LIBRARY = "libc++"; 384 | CLANG_ENABLE_MODULES = YES; 385 | CLANG_ENABLE_OBJC_ARC = YES; 386 | CLANG_WARN_BOOL_CONVERSION = YES; 387 | CLANG_WARN_CONSTANT_CONVERSION = YES; 388 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 389 | CLANG_WARN_EMPTY_BODY = YES; 390 | CLANG_WARN_ENUM_CONVERSION = YES; 391 | CLANG_WARN_INT_CONVERSION = YES; 392 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 393 | CLANG_WARN_UNREACHABLE_CODE = YES; 394 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 395 | COPY_PHASE_STRIP = NO; 396 | CURRENT_PROJECT_VERSION = 1; 397 | DEBUG_INFORMATION_FORMAT = dwarf; 398 | ENABLE_STRICT_OBJC_MSGSEND = YES; 399 | ENABLE_TESTABILITY = YES; 400 | GCC_C_LANGUAGE_STANDARD = gnu99; 401 | GCC_DYNAMIC_NO_PIC = NO; 402 | GCC_NO_COMMON_BLOCKS = YES; 403 | GCC_OPTIMIZATION_LEVEL = 0; 404 | GCC_PREPROCESSOR_DEFINITIONS = ( 405 | "DEBUG=1", 406 | "$(inherited)", 407 | ); 408 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 409 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 410 | GCC_WARN_UNDECLARED_SELECTOR = YES; 411 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 412 | GCC_WARN_UNUSED_FUNCTION = YES; 413 | GCC_WARN_UNUSED_VARIABLE = YES; 414 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 415 | MACOSX_DEPLOYMENT_TARGET = 10.11; 416 | MTL_ENABLE_DEBUG_INFO = YES; 417 | ONLY_ACTIVE_ARCH = YES; 418 | SDKROOT = iphoneos; 419 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 420 | TARGETED_DEVICE_FAMILY = "1,2"; 421 | VERSIONING_SYSTEM = "apple-generic"; 422 | VERSION_INFO_PREFIX = ""; 423 | }; 424 | name = Debug; 425 | }; 426 | ECFFFA4F1CCB985D0044D30A /* Release */ = { 427 | isa = XCBuildConfiguration; 428 | buildSettings = { 429 | ALWAYS_SEARCH_USER_PATHS = NO; 430 | CLANG_ANALYZER_NONNULL = YES; 431 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 432 | CLANG_CXX_LIBRARY = "libc++"; 433 | CLANG_ENABLE_MODULES = YES; 434 | CLANG_ENABLE_OBJC_ARC = YES; 435 | CLANG_WARN_BOOL_CONVERSION = YES; 436 | CLANG_WARN_CONSTANT_CONVERSION = YES; 437 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 438 | CLANG_WARN_EMPTY_BODY = YES; 439 | CLANG_WARN_ENUM_CONVERSION = YES; 440 | CLANG_WARN_INT_CONVERSION = YES; 441 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 442 | CLANG_WARN_UNREACHABLE_CODE = YES; 443 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 444 | COPY_PHASE_STRIP = NO; 445 | CURRENT_PROJECT_VERSION = 1; 446 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 447 | ENABLE_NS_ASSERTIONS = NO; 448 | ENABLE_STRICT_OBJC_MSGSEND = YES; 449 | GCC_C_LANGUAGE_STANDARD = gnu99; 450 | GCC_NO_COMMON_BLOCKS = YES; 451 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 452 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 453 | GCC_WARN_UNDECLARED_SELECTOR = YES; 454 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 455 | GCC_WARN_UNUSED_FUNCTION = YES; 456 | GCC_WARN_UNUSED_VARIABLE = YES; 457 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 458 | MACOSX_DEPLOYMENT_TARGET = 10.11; 459 | MTL_ENABLE_DEBUG_INFO = NO; 460 | SDKROOT = iphoneos; 461 | TARGETED_DEVICE_FAMILY = "1,2"; 462 | VALIDATE_PRODUCT = YES; 463 | VERSIONING_SYSTEM = "apple-generic"; 464 | VERSION_INFO_PREFIX = ""; 465 | }; 466 | name = Release; 467 | }; 468 | ECFFFA511CCB985D0044D30A /* Debug */ = { 469 | isa = XCBuildConfiguration; 470 | buildSettings = { 471 | CLANG_ENABLE_MODULES = YES; 472 | CODE_SIGN_IDENTITY = "iPhone Developer"; 473 | DEFINES_MODULE = YES; 474 | DYLIB_COMPATIBILITY_VERSION = 1; 475 | DYLIB_CURRENT_VERSION = 1; 476 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 477 | FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/Carthage/Build/iOS"; 478 | INFOPLIST_FILE = ReactiveAlamofire/Info.plist; 479 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 480 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 481 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 482 | PRODUCT_BUNDLE_IDENTIFIER = ReactiveKit.ReactiveAlamofire; 483 | PRODUCT_NAME = ReactiveAlamofire; 484 | SKIP_INSTALL = YES; 485 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 486 | SWIFT_VERSION = 3.0; 487 | }; 488 | name = Debug; 489 | }; 490 | ECFFFA521CCB985D0044D30A /* Release */ = { 491 | isa = XCBuildConfiguration; 492 | buildSettings = { 493 | CLANG_ENABLE_MODULES = YES; 494 | CODE_SIGN_IDENTITY = "iPhone Developer"; 495 | DEFINES_MODULE = YES; 496 | DYLIB_COMPATIBILITY_VERSION = 1; 497 | DYLIB_CURRENT_VERSION = 1; 498 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 499 | FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/Carthage/Build/iOS"; 500 | INFOPLIST_FILE = ReactiveAlamofire/Info.plist; 501 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 502 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 503 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 504 | PRODUCT_BUNDLE_IDENTIFIER = ReactiveKit.ReactiveAlamofire; 505 | PRODUCT_NAME = ReactiveAlamofire; 506 | SKIP_INSTALL = YES; 507 | SWIFT_VERSION = 3.0; 508 | }; 509 | name = Release; 510 | }; 511 | ECFFFA611CCBBBD10044D30A /* Debug */ = { 512 | isa = XCBuildConfiguration; 513 | buildSettings = { 514 | CODE_SIGN_IDENTITY = ""; 515 | DEFINES_MODULE = YES; 516 | DYLIB_COMPATIBILITY_VERSION = 1; 517 | DYLIB_CURRENT_VERSION = 1; 518 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 519 | FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/Carthage/Build/tvOS"; 520 | INFOPLIST_FILE = ReactiveAlamofire/Info.plist; 521 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 522 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 523 | PRODUCT_BUNDLE_IDENTIFIER = ReactiveKit.ReactiveAlamofire; 524 | PRODUCT_NAME = ReactiveAlamofire; 525 | SDKROOT = appletvos; 526 | SKIP_INSTALL = YES; 527 | SWIFT_VERSION = 3.0; 528 | TARGETED_DEVICE_FAMILY = 3; 529 | TVOS_DEPLOYMENT_TARGET = 9.0; 530 | }; 531 | name = Debug; 532 | }; 533 | ECFFFA621CCBBBD10044D30A /* Release */ = { 534 | isa = XCBuildConfiguration; 535 | buildSettings = { 536 | CODE_SIGN_IDENTITY = ""; 537 | DEFINES_MODULE = YES; 538 | DYLIB_COMPATIBILITY_VERSION = 1; 539 | DYLIB_CURRENT_VERSION = 1; 540 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 541 | FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/Carthage/Build/tvOS"; 542 | INFOPLIST_FILE = ReactiveAlamofire/Info.plist; 543 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 544 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 545 | PRODUCT_BUNDLE_IDENTIFIER = ReactiveKit.ReactiveAlamofire; 546 | PRODUCT_NAME = ReactiveAlamofire; 547 | SDKROOT = appletvos; 548 | SKIP_INSTALL = YES; 549 | SWIFT_VERSION = 3.0; 550 | TARGETED_DEVICE_FAMILY = 3; 551 | TVOS_DEPLOYMENT_TARGET = 9.0; 552 | }; 553 | name = Release; 554 | }; 555 | ECFFFA6F1CCBBC740044D30A /* Debug */ = { 556 | isa = XCBuildConfiguration; 557 | buildSettings = { 558 | APPLICATION_EXTENSION_API_ONLY = YES; 559 | CODE_SIGN_IDENTITY = ""; 560 | DEFINES_MODULE = YES; 561 | DYLIB_COMPATIBILITY_VERSION = 1; 562 | DYLIB_CURRENT_VERSION = 1; 563 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 564 | FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/Carthage/Build/watchOS"; 565 | INFOPLIST_FILE = ReactiveAlamofire/Info.plist; 566 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 567 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 568 | PRODUCT_BUNDLE_IDENTIFIER = ReactiveKit.ReactiveAlamofire; 569 | PRODUCT_NAME = ReactiveAlamofire; 570 | SDKROOT = watchos; 571 | SKIP_INSTALL = YES; 572 | SWIFT_VERSION = 3.0; 573 | TARGETED_DEVICE_FAMILY = 4; 574 | WATCHOS_DEPLOYMENT_TARGET = 2.0; 575 | }; 576 | name = Debug; 577 | }; 578 | ECFFFA701CCBBC740044D30A /* Release */ = { 579 | isa = XCBuildConfiguration; 580 | buildSettings = { 581 | APPLICATION_EXTENSION_API_ONLY = YES; 582 | CODE_SIGN_IDENTITY = ""; 583 | DEFINES_MODULE = YES; 584 | DYLIB_COMPATIBILITY_VERSION = 1; 585 | DYLIB_CURRENT_VERSION = 1; 586 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 587 | FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/Carthage/Build/watchOS"; 588 | INFOPLIST_FILE = ReactiveAlamofire/Info.plist; 589 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 590 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 591 | PRODUCT_BUNDLE_IDENTIFIER = ReactiveKit.ReactiveAlamofire; 592 | PRODUCT_NAME = ReactiveAlamofire; 593 | SDKROOT = watchos; 594 | SKIP_INSTALL = YES; 595 | SWIFT_VERSION = 3.0; 596 | TARGETED_DEVICE_FAMILY = 4; 597 | WATCHOS_DEPLOYMENT_TARGET = 2.0; 598 | }; 599 | name = Release; 600 | }; 601 | /* End XCBuildConfiguration section */ 602 | 603 | /* Begin XCConfigurationList section */ 604 | 168FF0D81D742B99000997A3 /* Build configuration list for PBXNativeTarget "ReactiveAlamofire-macOS" */ = { 605 | isa = XCConfigurationList; 606 | buildConfigurations = ( 607 | 168FF0D91D742B99000997A3 /* Debug */, 608 | 168FF0DA1D742B99000997A3 /* Release */, 609 | ); 610 | defaultConfigurationIsVisible = 0; 611 | }; 612 | ECFFFA421CCB985D0044D30A /* Build configuration list for PBXProject "ReactiveAlamofire" */ = { 613 | isa = XCConfigurationList; 614 | buildConfigurations = ( 615 | ECFFFA4E1CCB985D0044D30A /* Debug */, 616 | ECFFFA4F1CCB985D0044D30A /* Release */, 617 | ); 618 | defaultConfigurationIsVisible = 0; 619 | defaultConfigurationName = Release; 620 | }; 621 | ECFFFA501CCB985D0044D30A /* Build configuration list for PBXNativeTarget "ReactiveAlamofire-iOS" */ = { 622 | isa = XCConfigurationList; 623 | buildConfigurations = ( 624 | ECFFFA511CCB985D0044D30A /* Debug */, 625 | ECFFFA521CCB985D0044D30A /* Release */, 626 | ); 627 | defaultConfigurationIsVisible = 0; 628 | defaultConfigurationName = Release; 629 | }; 630 | ECFFFA601CCBBBD10044D30A /* Build configuration list for PBXNativeTarget "ReactiveAlamofire-tvOS" */ = { 631 | isa = XCConfigurationList; 632 | buildConfigurations = ( 633 | ECFFFA611CCBBBD10044D30A /* Debug */, 634 | ECFFFA621CCBBBD10044D30A /* Release */, 635 | ); 636 | defaultConfigurationIsVisible = 0; 637 | defaultConfigurationName = Release; 638 | }; 639 | ECFFFA6E1CCBBC740044D30A /* Build configuration list for PBXNativeTarget "ReactiveAlamofire-watchOS" */ = { 640 | isa = XCConfigurationList; 641 | buildConfigurations = ( 642 | ECFFFA6F1CCBBC740044D30A /* Debug */, 643 | ECFFFA701CCBBC740044D30A /* Release */, 644 | ); 645 | defaultConfigurationIsVisible = 0; 646 | defaultConfigurationName = Release; 647 | }; 648 | /* End XCConfigurationList section */ 649 | }; 650 | rootObject = ECFFFA3F1CCB985D0044D30A /* Project object */; 651 | } 652 | -------------------------------------------------------------------------------- /ReactiveAlamofire.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ReactiveAlamofire.xcodeproj/xcshareddata/xcschemes/ReactiveAlamofire-iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /ReactiveAlamofire.xcodeproj/xcshareddata/xcschemes/ReactiveAlamofire-macOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /ReactiveAlamofire.xcodeproj/xcshareddata/xcschemes/ReactiveAlamofire-tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /ReactiveAlamofire.xcodeproj/xcshareddata/xcschemes/ReactiveAlamofire-watchOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /ReactiveAlamofire.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ReactiveAlamofire/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 2.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ReactiveAlamofire/ReactiveAlamofire.h: -------------------------------------------------------------------------------- 1 | // 2 | // ReactiveAlamofire.h 3 | // ReactiveAlamofire 4 | // 5 | // Created by Srdan Rasic on 23/04/16. 6 | // Copyright © 2016 ReactiveKit. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for ReactiveAlamofire. 12 | FOUNDATION_EXPORT double ReactiveAlamofireVersionNumber; 13 | 14 | //! Project version string for ReactiveAlamofire. 15 | FOUNDATION_EXPORT const unsigned char ReactiveAlamofireVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Sources/Request.swift: -------------------------------------------------------------------------------- 1 | // 2 | // The MIT License (MIT) 3 | // 4 | // Copyright (c) 2016 Srdan Rasic (@srdanrasic) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | // 24 | 25 | import Alamofire 26 | import ReactiveKit 27 | 28 | extension DataRequest { 29 | 30 | public func toSignal() -> Signal<(URLRequest?, HTTPURLResponse?, Data?), NSError> { 31 | return Signal { observer in 32 | 33 | let request = self .response { response in 34 | if let error = response.error { 35 | observer.failed(error as NSError) 36 | } else { 37 | observer.next(response.request, response.response, response.data) 38 | observer.completed() 39 | } 40 | } 41 | 42 | request.resume() 43 | 44 | return BlockDisposable { 45 | request.cancel() 46 | } 47 | } 48 | } 49 | 50 | public func toSignal(_ responseSerializer: S) -> Signal { 51 | return Signal { observer in 52 | 53 | let request = self.response(responseSerializer: responseSerializer) { response in 54 | switch response.result { 55 | case .success(let value): 56 | observer.next(value) 57 | observer.completed() 58 | case .failure(let error): 59 | observer.failed(error as NSError) 60 | } 61 | } 62 | 63 | request.resume() 64 | 65 | return BlockDisposable { 66 | request.cancel() 67 | } 68 | } 69 | } 70 | 71 | public func toDataSignal() -> Signal { 72 | return toSignal(DataRequest.dataResponseSerializer()) 73 | } 74 | 75 | public func toStringSignal(encoding: String.Encoding? = nil) -> Signal { 76 | return toSignal(DataRequest.stringResponseSerializer(encoding: encoding)) 77 | } 78 | 79 | public func toJSONSignal(options: JSONSerialization.ReadingOptions = .allowFragments) -> Signal { 80 | return toSignal(DataRequest.jsonResponseSerializer(options: options)) 81 | } 82 | 83 | public func toPropertyListSignal(options: PropertyListSerialization.ReadOptions = PropertyListSerialization.ReadOptions()) -> Signal { 84 | return toSignal(DataRequest.propertyListResponseSerializer(options: options)) 85 | } 86 | } 87 | 88 | /// Streaming API 89 | 90 | extension DataRequest { 91 | 92 | public func toStreamingSignal() -> Signal { 93 | return Signal { observer in 94 | 95 | let request = self 96 | .stream { data in 97 | observer.next(data) 98 | }.response { response in 99 | if let error = response.error { 100 | observer.failed(error as NSError) 101 | } else { 102 | observer.completed() 103 | } 104 | } 105 | 106 | request.resume() 107 | 108 | return BlockDisposable { 109 | request.cancel() 110 | } 111 | } 112 | } 113 | 114 | // public func toStringStreamingSignal(delimiter: String, encoding: String.Encoding = .utf8) -> Signal { 115 | // return toSignal() 116 | // .tryMap { data -> ReactiveKit.Result in 117 | // if let string = String(data: data, encoding: encoding) { 118 | // return .success(string) 119 | // } else { 120 | // return .failure(NSError(domain: "toStringStreamingSignal: Could not decode string!", code: 0, userInfo: nil)) 121 | // } 122 | // } 123 | // .flatMapLatest { string in 124 | // Signal.sequence(string.characters.map { String($0) }) 125 | // } 126 | // .split { character in 127 | // character == delimiter 128 | // } 129 | // .map { 130 | // $0.joined(separator: "") 131 | // } 132 | // } 133 | // 134 | // public func toJSONStreamingSignal(delimiter: String = "\n", encoding: String.Encoding = .utf8, options: JSONSerialization.ReadingOptions = .allowFragments) -> Signal { 135 | // return toStringStreamingSignal(delimiter: delimiter, encoding: encoding) 136 | // .map { message in 137 | // message.trimmingCharacters(in: .whitespacesAndNewlines) 138 | // } 139 | // .filter { message in 140 | // !message.isEmpty 141 | // } 142 | // .tryMap { message -> ReactiveKit.Result in 143 | // do { 144 | // guard let data = message.data(using: encoding) else { 145 | // return .failure(NSError(domain: "toJSONStreamingSignal: Could not encode string!", code: 0, userInfo: nil)) 146 | // } 147 | // let json = try JSONSerialization.jsonObject(with: data, options: options) 148 | // return .success(json) 149 | // } catch { 150 | // return .failure(error as NSError) 151 | // } 152 | // } 153 | // } 154 | } 155 | 156 | extension SignalProtocol { 157 | 158 | public func split(_ isDelimiter: @escaping (Element) -> Bool) -> Signal<[Element], Error> { 159 | return Signal { observer in 160 | var buffer: [Element] = [] 161 | return self.observe { event in 162 | switch event { 163 | case .next(let element): 164 | if isDelimiter(element) { 165 | observer.next(buffer) 166 | buffer.removeAll() 167 | } else { 168 | buffer.append(element) 169 | } 170 | case .completed: 171 | observer.completed() 172 | case .failed(let error): 173 | observer.failed(error) 174 | } 175 | } 176 | } 177 | } 178 | } 179 | --------------------------------------------------------------------------------